Merge branch 'rs/merge-compact-summary'
Hotfix.
* rs/merge-compact-summary:
merge: don't document non-existing --compact-summary argument
diff --git a/.cirrus.yml b/.cirrus.yml
index 1fbdc26..fef04a3 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -5,11 +5,13 @@
env:
GIT_PROVE_OPTS: "--timer --jobs 10"
GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers"
- MAKEFLAGS: "-j4"
+ GIT_SKIP_TESTS: t7815.12
+ MAKEFLAGS: -j4
DEFAULT_TEST_TARGET: prove
+ DEFAULT_UNIT_TEST_TARGET: unit-tests-prove
DEVELOPER: 1
freebsd_instance:
- image_family: freebsd-13-4
+ image_family: freebsd-14-3
memory: 2G
install_script:
pkg install -y gettext gmake perl5
@@ -19,4 +21,4 @@
build_script:
- su git -c gmake
test_script:
- - su git -c 'gmake DEFAULT_UNIT_TEST_TARGET=unit-tests-prove test unit-tests'
+ - su git -c 'gmake test unit-tests'
diff --git a/.clang-format b/.clang-format
index 9547fe1..dcfd0aa 100644
--- a/.clang-format
+++ b/.clang-format
@@ -12,7 +12,15 @@
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
-ColumnLimit: 80
+
+# While we do want to enforce a character limit of 80 characters, we often
+# allow lines to overflow that limit to prioritize readability. Setting a
+# character limit here with penalties has been finicky and creates too many
+# false positives.
+#
+# NEEDSWORK: It would be nice if we can find optimal settings to ensure we
+# can re-enable the limit here.
+ColumnLimit: 0
# C Language specifics
Language: Cpp
@@ -210,16 +218,11 @@
# No empty line at the start of a block.
KeepEmptyLinesAtTheStartOfBlocks: false
-# Penalties
-# This decides what order things should be done if a line is too long
-PenaltyBreakAssignment: 5
-PenaltyBreakBeforeFirstCallParameter: 5
-PenaltyBreakComment: 5
-PenaltyBreakFirstLessLess: 0
-PenaltyBreakOpenParenthesis: 300
-PenaltyBreakString: 5
-PenaltyExcessCharacter: 10
-PenaltyReturnTypeOnItsOwnLine: 300
-
# Don't sort #include's
SortIncludes: false
+
+# Remove optional braces of control statements (if, else, for, and while)
+# according to the LLVM coding style. This avoids braces on simple
+# single-statement bodies of statements but keeps braces if one side of
+# if/else if/.../else cascade has multi-statement body.
+RemoveBracesLLVM: true
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 124301d..01a0437 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -147,9 +147,13 @@
key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }}
- name: build with cov-build
run: |
- export PATH="$RUNNER_TEMP/cov-analysis/bin:$PATH" &&
+ export PATH="$PATH:$RUNNER_TEMP/cov-analysis/bin" &&
cov-configure --gcc &&
- cov-build --dir cov-int make
+ if ! cov-build --dir cov-int make
+ then
+ cat cov-int/build-log.txt
+ exit 1
+ fi
- name: package the build
run: tar -czvf cov-int.tgz cov-int
- name: submit the build to Coverity Scan
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7dbf9f7..d122e79 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -298,7 +298,7 @@
path: build
- name: Test
shell: pwsh
- run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
+ run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
regular:
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bb6d5b9..af10ebb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -178,7 +178,7 @@
- job: "build:msvc-meson"
artifacts: true
script:
- - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
+ - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
parallel: 10
test:fuzz-smoke-tests:
diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc
index 61bdd58..f8d2eba 100644
--- a/Documentation/BreakingChanges.adoc
+++ b/Documentation/BreakingChanges.adoc
@@ -118,6 +118,53 @@
<20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>,
<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.
+* The default storage format for references in newly created repositories will
+ be changed from "files" to "reftable". The "reftable" format provides
+ multiple advantages over the "files" format:
++
+ ** It is impossible to store two references that only differ in casing on
+ case-insensitive filesystems with the "files" format. This issue is common
+ on Windows and macOS platforms. As the "reftable" backend does not use
+ filesystem paths to encode reference names this problem goes away.
+ ** Similarly, macOS normalizes path names that contain unicode characters,
+ which has the consequence that you cannot store two names with unicode
+ characters that are encoded differently with the "files" backend. Again,
+ this is not an issue with the "reftable" backend.
+ ** Deleting references with the "files" backend requires Git to rewrite the
+ complete "packed-refs" file. In large repositories with many references
+ this file can easily be dozens of megabytes in size, in extreme cases it
+ may be gigabytes. The "reftable" backend uses tombstone markers for
+ deleted references and thus does not have to rewrite all of its data.
+ ** Repository housekeeping with the "files" backend typically performs
+ all-into-one repacks of references. This can be quite expensive, and
+ consequently housekeeping is a tradeoff between the number of loose
+ references that accumulate and slow down operations that read references,
+ and compressing those loose references into the "packed-refs" file. The
+ "reftable" backend uses geometric compaction after every write, which
+ amortizes costs and ensures that the backend is always in a
+ well-maintained state.
+ ** Operations that write multiple references at once are not atomic with the
+ "files" backend. Consequently, Git may see in-between states when it reads
+ references while a reference transaction is in the process of being
+ committed to disk.
+ ** Writing many references at once is slow with the "files" backend because
+ every reference is created as a separate file. The "reftable" backend
+ significantly outperforms the "files" backend by multiple orders of
+ magnitude.
+ ** The reftable backend uses a binary format with prefix compression for
+ reference names. As a result, the format uses less space compared to the
+ "packed-refs" file.
++
+Users that get immediate benefit from the "reftable" backend could continue to
+opt-in to the "reftable" format manually by setting the "init.defaultRefFormat"
+config. But defaults matter, and we think that overall users will have a better
+experience with less platform-specific quirks when they use the new backend by
+default.
++
+A prerequisite for this change is that the ecosystem is ready to support the
+"reftable" format. Most importantly, alternative implementations of Git like
+JGit, libgit2 and Gitoxide need to support it.
+
=== Removals
* Support for grafting commits has long been superseded by git-replace(1).
@@ -183,6 +230,14 @@
timeframe, in preference to its synonym "--annotate-stdin". Git 3.0
removes the support for "--stdin" altogether.
+* The git-whatchanged(1) command has outlived its usefulness more than
+ 10 years ago, and takes more keystrokes to type than its rough
+ equivalent `git log --raw`. We have nominated the command for
+ removal, have changed the command to refuse to work unless the
+ `--i-still-use-this` option is given, and asked the users to report
+ when they do so. So far there hasn't been a single complaint.
++
+The command will be removed.
== Superseded features that will not be deprecated
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index c1046ab..224f097 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -298,6 +298,17 @@
. since late 2021 with 44ba10d6, we have had variables declared in
the for loop "for (int i = 0; i < 10; i++)".
+ . since late 2023 with 8277dbe987 we have been using the bool type
+ from <stdbool.h>.
+
+ C99 features we have test balloons for:
+
+ . since late 2024 with v2.48.0-rc0~20, we have test balloons for
+ compound literal syntax, e.g., (struct foo){ .member = value };
+ our hope is that no platforms we care about have trouble using
+ them, and officially adopt its wider use in mid 2026. Do not add
+ more use of the syntax until that happens.
+
New C99 features that we cannot use yet:
. %z and %zu as a printf() argument for a size_t (the %z being for
@@ -315,6 +326,9 @@
encouraged to have a blank line between the end of the declarations
and the first statement in the block.
+ - Do not explicitly initialize global variables to 0 or NULL;
+ instead, let BSS take care of the zero initialization.
+
- NULL pointers shall be written as NULL, not as 0.
- When declaring pointers, the star sides with the variable
@@ -610,8 +624,9 @@
- `S_init()` initializes a structure without allocating the
structure itself.
- - `S_release()` releases a structure's contents without freeing the
- structure.
+ - `S_release()` releases a structure's contents without reinitializing
+ the structure for immediate reuse, and without freeing the structure
+ itself.
- `S_clear()` is equivalent to `S_release()` followed by `S_init()`
such that the structure is directly usable after clearing it. When
@@ -877,6 +892,17 @@
As a side effect, backquoted placeholders are correctly typeset, but
this style is not recommended.
+ When documenting multiple related `git config` variables, place them on
+ a separate line instead of separating them by commas. For example, do
+ not write this:
+ `core.var1`, `core.var2`::
+ Description common to `core.var1` and `core.var2`.
+
+Instead write this:
+ `core.var1`::
+ `core.var2`::
+ Description common to `core.var1` and `core.var2`.
+
Synopsis Syntax
The synopsis (a paragraph with [synopsis] attribute) is automatically
diff --git a/Documentation/Makefile b/Documentation/Makefile
index b109d25..df2ce18 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -510,7 +510,12 @@
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
grep -v -e '#' -e '^$$' | \
sort >tmp-meson-diff/meson.adoc && \
- ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
+ ls git*.adoc scalar.adoc | \
+ grep -v -e git-bisect-lk2009.adoc \
+ -e git-pack-redundant.adoc \
+ -e git-tools.adoc \
+ -e git-whatchanged.adoc \
+ >tmp-meson-diff/actual.adoc && \
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
echo "Meson man pages differ from actual man pages:"; \
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc
index bfe8f5f..413a9fd 100644
--- a/Documentation/MyFirstObjectWalk.adoc
+++ b/Documentation/MyFirstObjectWalk.adoc
@@ -43,7 +43,7 @@
#include "builtin.h"
#include "trace.h"
-int cmd_walken(int argc, const char **argv, const char *prefix)
+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
trace_printf(_("cmd_walken incoming...\n"));
return 0;
@@ -83,23 +83,36 @@
}
----
-Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:
+Also add the relevant line in `builtin.h` near `cmd_version()`:
----
-int cmd_walken(int argc, const char **argv, const char *prefix);
+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
----
-Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,
+Include the command in `git.c` in `commands[]` near the entry for `version`,
maintaining alphabetical ordering:
----
{ "walken", cmd_walken, RUN_SETUP },
----
-Add it to the `Makefile` near the line for `builtin/worktree.o`:
+Add an entry for the new command in the both the Make and Meson build system,
+before the entry for `worktree`:
+- In the `Makefile`:
----
+...
BUILTIN_OBJS += builtin/walken.o
+...
+----
+
+- In the `meson.build` file:
+----
+builtin_sources = [
+ ...
+ 'builtin/walken.c',
+ ...
+]
----
Build and test out your command, without forgetting to ensure the `DEVELOPER`
@@ -193,7 +206,7 @@
Next, we should have a look at any relevant configuration settings (i.e.,
settings readable and settable from `git config`). This is done by providing a
-callback to `git_config()`; within that callback, you can also invoke methods
+callback to `repo_config()`; within that callback, you can also invoke methods
from other components you may need that need to intercept these options. Your
callback will be invoked once per each configuration value which Git knows about
(global, local, worktree, etc.).
@@ -221,14 +234,14 @@
}
----
-Make sure to invoke `git_config()` with it in your `cmd_walken()`:
+Make sure to invoke `repo_config()` with it in your `cmd_walken()`:
----
-int cmd_walken(int argc, const char **argv, const char *prefix)
+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...
- git_config(git_walken_config, NULL);
+ repo_config(repo, git_walken_config, NULL);
...
}
@@ -250,14 +263,14 @@
...
-int cmd_walken(int argc, const char **argv, const char *prefix)
+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
/* This can go wherever you like in your declarations.*/
struct rev_info rev;
...
- /* This should go after the git_config() call. */
- repo_init_revisions(the_repository, &rev, prefix);
+ /* This should go after the repo_config() call. */
+ repo_init_revisions(repo, &rev, prefix);
...
}
@@ -305,7 +318,7 @@
`repo_init_revisions()`:
----
-int cmd_walken(int argc, const char **argv, const char *prefix)
+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...
diff --git a/Documentation/RelNotes/2.43.7.adoc b/Documentation/RelNotes/2.43.7.adoc
new file mode 100644
index 0000000..95702a0
--- /dev/null
+++ b/Documentation/RelNotes/2.43.7.adoc
@@ -0,0 +1,73 @@
+Git v2.43.7 Release Notes
+=========================
+
+This release includes fixes for CVE-2025-27613, CVE-2025-27614,
+CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
+CVE-2025-48386.
+
+Fixes since v2.43.6
+-------------------
+
+ * CVE-2025-27613, Gitk:
+
+ When a user clones an untrusted repository and runs Gitk without
+ additional command arguments, any writable file can be created and
+ truncated. The option "Support per-file encoding" must have been
+ enabled. The operation "Show origin of this line" is affected as
+ well, regardless of the option being enabled or not.
+
+ * CVE-2025-27614, Gitk:
+
+ A Git repository can be crafted in such a way that a user who has
+ cloned the repository can be tricked into running any script
+ supplied by the attacker by invoking `gitk filename`, where
+ `filename` has a particular structure.
+
+ * CVE-2025-46334, Git GUI (Windows only):
+
+ A malicious repository can ship versions of sh.exe or typical
+ textconv filter programs such as astextplain. On Windows, path
+ lookup can find such executables in the worktree. These programs
+ are invoked when the user selects "Git Bash" or "Browse Files" from
+ the menu.
+
+ * CVE-2025-46835, Git GUI:
+
+ When a user clones an untrusted repository and is tricked into
+ editing a file located in a maliciously named directory in the
+ repository, then Git GUI can create and overwrite any writable
+ file.
+
+ * CVE-2025-48384, Git:
+
+ When reading a config value, Git strips any trailing carriage
+ return and line feed (CRLF). When writing a config entry, values
+ with a trailing CR are not quoted, causing the CR to be lost when
+ the config is later read. When initializing a submodule, if the
+ submodule path contains a trailing CR, the altered path is read
+ resulting in the submodule being checked out to an incorrect
+ location. If a symlink exists that points the altered path to the
+ submodule hooks directory, and the submodule contains an executable
+ post-checkout hook, the script may be unintentionally executed
+ after checkout.
+
+ * CVE-2025-48385, Git:
+
+ When cloning a repository Git knows to optionally fetch a bundle
+ advertised by the remote server, which allows the server-side to
+ offload parts of the clone to a CDN. The Git client does not
+ perform sufficient validation of the advertised bundles, which
+ allows the remote side to perform protocol injection.
+
+ This protocol injection can cause the client to write the fetched
+ bundle to a location controlled by the adversary. The fetched
+ content is fully controlled by the server, which can in the worst
+ case lead to arbitrary code execution.
+
+ * CVE-2025-48386, Git:
+
+ The wincred credential helper uses a static buffer (`target`) as a
+ unique key for storing and comparing against internal storage. This
+ credential helper does not properly bounds check the available
+ space remaining in the buffer before appending to it with
+ `wcsncat()`, leading to potential buffer overflows.
diff --git a/Documentation/RelNotes/2.44.4.adoc b/Documentation/RelNotes/2.44.4.adoc
new file mode 100644
index 0000000..8db4d5b
--- /dev/null
+++ b/Documentation/RelNotes/2.44.4.adoc
@@ -0,0 +1,7 @@
+Git v2.44.4 Release Notes
+=========================
+
+This release merges up the fixes that appears in v2.43.7 to address
+the following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334,
+CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386.
+See the release notes for v2.43.7 for details.
diff --git a/Documentation/RelNotes/2.45.4.adoc b/Documentation/RelNotes/2.45.4.adoc
new file mode 100644
index 0000000..5b50d8d
--- /dev/null
+++ b/Documentation/RelNotes/2.45.4.adoc
@@ -0,0 +1,7 @@
+Git v2.45.4 Release Notes
+=========================
+
+This release merges up the fixes that appears in v2.43.7, and v2.44.4
+to address the following CVEs: CVE-2025-27613, CVE-2025-27614,
+CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
+CVE-2025-48386. See the release notes for v2.43.7 for details.
diff --git a/Documentation/RelNotes/2.46.4.adoc b/Documentation/RelNotes/2.46.4.adoc
new file mode 100644
index 0000000..622f4c7
--- /dev/null
+++ b/Documentation/RelNotes/2.46.4.adoc
@@ -0,0 +1,7 @@
+Git v2.46.4 Release Notes
+=========================
+
+This release merges up the fixes that appears in v2.43.7, v2.44.4, and
+v2.45.4 to address the following CVEs: CVE-2025-27613, CVE-2025-27614,
+CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
+CVE-2025-48386. See the release notes for v2.43.7 for details.
diff --git a/Documentation/RelNotes/2.47.3.adoc b/Documentation/RelNotes/2.47.3.adoc
new file mode 100644
index 0000000..bc2a2b8
--- /dev/null
+++ b/Documentation/RelNotes/2.47.3.adoc
@@ -0,0 +1,8 @@
+Git v2.47.3 Release Notes
+=========================
+
+This release merges up the fixes that appears in v2.43.7, v2.44.4,
+v2.45.4, and v2.46.4 to address the following CVEs: CVE-2025-27613,
+CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, CVE-2025-48384,
+CVE-2025-48385, and CVE-2025-48386. See the release notes for v2.43.7
+for details.
diff --git a/Documentation/RelNotes/2.48.2.adoc b/Documentation/RelNotes/2.48.2.adoc
new file mode 100644
index 0000000..f3f2f90
--- /dev/null
+++ b/Documentation/RelNotes/2.48.2.adoc
@@ -0,0 +1,8 @@
+Git v2.48.2 Release Notes
+=========================
+
+This release merges up the fixes that appears in v2.43.7, v2.44.4,
+v2.45.4, v2.46.4, and v2.47.3 to address the following CVEs:
+CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835,
+CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release
+notes for v2.43.7 for details.
diff --git a/Documentation/RelNotes/2.49.1.adoc b/Documentation/RelNotes/2.49.1.adoc
new file mode 100644
index 0000000..c619e8b
--- /dev/null
+++ b/Documentation/RelNotes/2.49.1.adoc
@@ -0,0 +1,12 @@
+Git v2.49.1 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.43.7, v2.44.4,
+v2.45.4, v2.46.4, v2.47.3, and v2.48.2 to address the following CVEs:
+CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835,
+CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release
+notes for v2.43.7 for details.
+
+It also contains some updates to various CI bits to work around
+and/or to adjust to the deprecation of use of Ubuntu 20.04 GitHub
+Actions CI, updates to to Fedora base image.
diff --git a/Documentation/RelNotes/2.50.0.adoc b/Documentation/RelNotes/2.50.0.adoc
index 95349ea..e857473 100644
--- a/Documentation/RelNotes/2.50.0.adoc
+++ b/Documentation/RelNotes/2.50.0.adoc
@@ -36,7 +36,7 @@
* Auth-related (and unrelated) error handling in send-email has been
made more robust.
- * Updating multiple references have only been possible in all-or-none
+ * Updating multiple references have only been possible in an all-or-nothing
fashion with transactions, but it can be more efficient to batch
multiple updates even when some of them are allowed to fail in a
best-effort manner. A new "best effort batches of updates" mode
@@ -53,7 +53,7 @@
* The build procedure installs bash (but not zsh) completion script.
- * send-email has been updated to work better with Outlook's smtp server.
+ * send-email has been updated to work better with Outlook's SMTP server.
* "git diff --minimal" used to give non-minimal output when its
optimization kicked in, which has been disabled.
@@ -62,7 +62,7 @@
delta chains from forming in a corner case even when there is no
such cycle.
- * Make repository clean-up tasks "gc" can do available to "git
+ * Make repository clean-up tasks that "gc" can do available to "git
maintenance" front-end.
* Bundle-URI feature did not use refs recorded in the bundle other
@@ -188,7 +188,7 @@
been dropped.
* The code path to access the "packed-refs" file while "fsck" is
- taught to mmap the file, instead of reading the whole file in the
+ taught to mmap the file, instead of reading the whole file into
memory.
* Assorted fixes for issues found with CodeQL.
@@ -201,6 +201,17 @@
we ended up checking for these non-existent files repeatedly, which
has been optimized by memoizing the non-existence.
+ * Build settings have been improved for BSD based systems.
+
+ * Newer version of libcURL detected curl_easy_setopt() calls we made
+ with platform-natural "int" when we should have used "long", which
+ all have been corrected.
+
+ * Tests that compare $HOME and $(pwd), which should be the same
+ directory unless the tests chdir's around, would fail when the user
+ enters the test directory via symbolic links, which has been
+ corrected.
+
Fixes since v2.49
-----------------
@@ -316,8 +327,9 @@
* Fix for scheduled maintenance tasks on platforms using launchctl.
(merge eb2d7beb0e jh/gc-launchctl-schedule-fix later to maint).
- * Update to arm64 Windows port.
- (merge 436a42215e js/windows-arm64 later to maint).
+ * Update to arm64 Windows port (part of which had been reverted as it
+ broke builds for existing platforms, which may need to be redone in
+ future releases).
* hashmap API clean-up to ensure hashmap_clear() leaves a cleared map
in a reusable state.
@@ -380,14 +392,19 @@
reverse failed to give the mode bits of the path "removed" by the
patch to the file it creates, which has been corrected.
- * "git verify-refs" (and hence "git fsck --reference") started
- erroring out in a repository in which secondary worktrees were
- prepared with Git 2.43 or lower.
+ * "git verify-refs" errored out in a repository in which
+ linked worktrees were prepared with Git 2.43 or lower.
(merge d5b3c38b8a sj/ref-contents-check-fix later to maint).
- * Update total_ram() functrion on BSD variants.
+ * Update total_ram() function on BSD variants.
- * Update online_cpus() functrion on BSD variants.
+ * Update online_cpus() function on BSD variants.
+
+ * Revert a botched bswap.h change that broke ntohll() functions on
+ big-endian systems with __builtin_bswap32/64().
+
+ * Fixes for GitHub Actions Coverity job.
+ (merge 3cc4fc1ebd js/github-ci-win-coverity-fix later to maint).
* Other code cleanup, docfix, build fix, etc.
(merge 227c4f33a0 ja/doc-block-delimiter-markup-fix later to maint).
diff --git a/Documentation/RelNotes/2.50.1.adoc b/Documentation/RelNotes/2.50.1.adoc
new file mode 100644
index 0000000..aa4a71a
--- /dev/null
+++ b/Documentation/RelNotes/2.50.1.adoc
@@ -0,0 +1,8 @@
+Git v2.50.1 Release Notes
+=========================
+
+This release merges up the fixes that appear in v2.43.7, v2.44.4,
+v2.45.4, v2.46.4, v2.47.3, v2.48.2, and v2.49.1 to address the
+following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334,
+CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
+CVE-2025-48386. See the release notes for v2.43.7 for details.
diff --git a/Documentation/RelNotes/2.51.0.adoc b/Documentation/RelNotes/2.51.0.adoc
new file mode 100644
index 0000000..a73ea3e
--- /dev/null
+++ b/Documentation/RelNotes/2.51.0.adoc
@@ -0,0 +1,341 @@
+Git v2.51 Release Notes
+=======================
+
+UI, Workflows & Features
+------------------------
+
+ * Userdiff patterns for the R language have been added.
+
+ * Documentation for "git send-email" has been updated with a bit more
+ credential helper and OAuth information.
+
+ * "git cat-file --batch" learns to understand %(objectmode) atom to
+ allow the caller to tell missing objects (due to repository
+ corruption) and submodules (whose commit objects are OK to be
+ missing) apart.
+
+ * "git diff --no-index dirA dirB" can limit the comparison with
+ pathspec at the end of the command line, just like normal "git
+ diff".
+
+ * "git subtree" (in contrib/) learned to grok GPG signing its commits.
+
+ * "git whatchanged" that is longer to type than "git log --raw"
+ which is its modern rough equivalent has outlived its usefulness
+ more than 10 years ago. Plan to deprecate and remove it.
+
+ * An interchange format for stash entries is defined, and subcommand
+ of "git stash" to import/export has been added.
+
+ * "git merge/pull" has been taught the "--compact-summary" option to
+ use the compact-summary format, intead of diffstat, when showing
+ the summary of the incoming changes.
+
+ * "git imap-send" has been broken for a long time, which has been
+ resurrected and then taught to talk OAuth2.0 etc.
+
+ * Some error messages from "git imap-send" has been updated.
+
+ * When "git daemon" sees a signal while attempting to accept() a new
+ client, instead of retrying, it skipped it by mistake, which has
+ been corrected.
+
+ * The reftable ref backend has matured enough; Git 3.0 will make it
+ the default format in a newly created repositories by default.
+
+ * "netrc" credential helper has been improved to understand textual
+ service names (like smtp) in addition to the numeric port numbers
+ (like 25).
+
+ * Lift the limitation to use changed-path filter in "git log" so that
+ it can be used for a pathspec with multiple literal paths.
+
+ * Clean up the way how signature on commit objects are exported to
+ and imported from fast-import stream.
+
+ * Remove unsupported, unused, and unsupportable old option from "git
+ log".
+
+ * Document recently added "git imap-send --list" with an example.
+
+ * "git pull" learned to pay attention to pull.autostash configuration
+ variable, which overrides rebase/merge.autostash.
+
+ * "git for-each-ref" learns "--start-after" option to help
+ applications that want to page its output.
+
+ * "git switch" and "git restore" are declared to be no longer
+ experimental.
+
+ * "git -c alias.foo=bar foo -h baz" reported "'foo' is aliased to
+ 'bar'" and then went on to run "git foo -h baz", which was
+ unexpected. Tighten the rule so that alias expansion is reported
+ only when "-h" is the sole option.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+ * "git pack-objects" learned to find delta bases from blobs at the
+ same path, using the --path-walk API.
+
+ * CodingGuidelines update.
+
+ * Add settings for Solaris 10 & 11.
+
+ * Meson-based build/test framework now understands TAP output
+ generated by our tests.
+
+ * "Do not explicitly initialize to zero" rule has been clarified in
+ the CodingGuidelines document.
+
+ * A test helper "test_seq" function learned the "-f <fmt>" option,
+ which allowed us to simplify a lot of test scripts.
+
+ * A lot of stale stuff has been removed from the contrib/ hierarchy.
+
+ * "git push" and "git fetch" are taught to update refs in batches to
+ gain performance.
+
+ * Some code paths in "git prune" used to ignore the passed-in
+ repository object and used the `the_repository` singleton instance
+ instead, which has been corrected.
+
+ * Update ".clang-format" and ".editorconfig" to match our style guide
+ a bit better.
+
+ * "make coccicheck" succeeds even when spatch made suggestions, which
+ has been updated to fail in such a case.
+
+ * Code clean-up around object access API.
+
+ * Define .precision to more canned parse-options type to avoid bugs
+ coming from using a variable with a wrong type to capture the
+ parsed values.
+
+ * Flipping the default hash function to SHA-256 at Git 3.0 boundary
+ is planned.
+
+ * Declare weather-balloon we raised for "bool" type 18 months ago a
+ success and officially allow using the type in our codebase.
+
+ * GIT_TEST_INSTALLED was not honored in the recent topic related to
+ SHA256 hashes, which has been corrected.
+
+ * The pop_most_recent_commit() function can have quite expensive
+ worst case performance characteristics, which has been optimized by
+ using prio-queue data structure.
+
+ * Move structure definition from unrelated header file to where it
+ belongs.
+
+ * To help our developers, document what C99 language features are
+ being considered for adoption, in addition to what past experiments
+ have already decided.
+
+ * The reftable unit tests are now ported to the "clar" unit testing
+ framework.
+
+ * Redefine where the multi-pack-index sits in the object subsystem,
+ which recently was restructured to allow multiple backends that
+ support a single object source that belongs to one repository. A
+ MIDX does span multiple "object sources".
+
+ * Reduce implicit assumption and dependence on the_repository in the
+ object-file subsystem.
+
+
+Fixes since v2.50
+-----------------
+
+Unless otherwise noted, all the changes in 2.50.X maintenance track,
+including security updates, are included in this release.
+
+ * A memory-leak in an error code path has been plugged.
+ (merge 7082da85cb ly/commit-graph-graph-write-leakfix later to maint).
+
+ * A memory-leak in an error code path has been plugged.
+ (merge aedebdb6b9 ly/fetch-pack-leakfix later to maint).
+
+ * Some leftover references to documentation source files that no
+ longer exist, due to recent ".txt" -> ".adoc" renaming, have been
+ corrected.
+ (merge 3717a5775a jw/doc-txt-to-adoc-refs later to maint).
+
+ * "git stash -p <pathspec>" improvements.
+ (merge 468817bab2 pw/stash-p-pathspec-fixes later to maint).
+
+ * "git send-email" incremented its internal message counter when a
+ message was edited, which made logic that treats the first message
+ specially misbehave, which has been corrected.
+ (merge 2cc27b3501 ag/send-email-edit-threading-fix later to maint).
+
+ * "git stash" recorded a wrong branch name when submodules are
+ present in the current checkout, which has been corrected.
+ (merge ffb36c64f2 kj/stash-onbranch-submodule-fix later to maint).
+
+ * When asking to apply mailmap to both author and committer field
+ while showing a commit object, the field that appears later was not
+ correctly parsed and replaced, which has been corrected.
+ (merge abf94a283f sa/multi-mailmap-fix later to maint).
+
+ * "git maintenance" lacked the care "git gc" had to avoid holding
+ onto the repository lock for too long during packing refs, which
+ has been remedied.
+ (merge 1b5074e614 ps/maintenance-ref-lock later to maint).
+
+ * Avoid regexp_constraint and instead use comparison_constraint when
+ listing functions to exclude from application of coccinelle rules,
+ as spatch can be built with different regexp engine X-<.
+ (merge f2ad545813 jc/cocci-avoid-regexp-constraint later to maint).
+
+ * Updating submodules from the upstream did not work well when
+ submodule's HEAD is detached, which has been improved.
+ (merge ca62f524c1 jk/submodule-remote-lookup-cleanup later to maint).
+
+ * Remove unnecessary check from "git daemon" code.
+ (merge 0c856224d2 cb/daemon-fd-check-fix later to maint).
+
+ * Use of sysctl() system call to learn the total RAM size used on
+ BSDs has been corrected.
+ (merge 781c1cf571 cb/total-ram-bsd-fix later to maint).
+
+ * Drop FreeBSD 4 support and declare that we support only FreeBSD 12
+ or later, which has memmem() supported.
+ (merge 0392f976a7 bs/config-mak-freebsd later to maint).
+
+ * A diff-filter with negative-only specification like "git log
+ --diff-filter=d" did not trigger correctly, which has been fixed.
+ (merge 375ac087c5 jk/all-negative-diff-filter-fix later to maint).
+
+ * A failure to open the index file for writing due to conflicting
+ access did not state what went wrong, which has been corrected.
+ (merge 9455397a5c hy/read-cache-lock-error-fix later to maint).
+
+ * Tempfile removal fix in the codepath to sign commits with SSH keys.
+ (merge 4498127b04 re/ssh-sign-buffer-fix later to maint).
+
+ * Code and test clean-up around string-list API.
+ (merge 6e5b26c3ff sj/string-list later to maint).
+
+ * "git apply -N" should start from the current index and register
+ only new files, but it instead started from an empty index, which
+ has been corrected.
+ (merge 2b49d97fcb rp/apply-intent-to-add-fix later to maint).
+
+ * Leakfix with a new and a bit invasive test on pack-bitmap files.
+ (merge bfd5522e98 ly/load-bitmap-leakfix later to maint).
+
+ * "git fetch --prune" used to be O(n^2) expensive when there are many
+ refs, which has been corrected.
+ (merge 87d8d8c5d0 ph/fetch-prune-optim later to maint).
+
+ * When a ref creation at refs/heads/foo/bar fails, the files backend
+ now removes refs/heads/foo/ if the directory is otherwise not used.
+ (merge a3a7f20516 ps/refs-files-remove-empty-parent later to maint).
+
+ * "pack-objects" has been taught to avoid pointing into objects in
+ cruft packs from midx.
+
+ * "git remote" now detects remote names that overlap with each other
+ (e.g., remote nickname "outer" and "outer/inner" are used at the
+ same time), as it will lead to overlapping remote-tracking
+ branches.
+ (merge a5a727c448 jk/remote-avoid-overlapping-names later to maint).
+
+ * The gpg.program configuration variable, which names a pathname to
+ the (custom) GPG compatible program, can now be spelled with ~tilde
+ expansion.
+ (merge 7d275cd5c0 jb/gpg-program-variable-is-a-pathname later to maint).
+
+ * Our <sane-ctype.h> header file relied on that the system-supplied
+ <ctype.h> header is not later included, which would override our
+ macro definitions, but "amazon linux" broke this assumption. Fix
+ this by preemptively including <ctype.h> near the beginning of
+ <sane-ctype.h> ourselves.
+ (merge 9d3b33125f ps/sane-ctype-workaround later to maint).
+
+ * Clean-up compat/bswap.h mess.
+ (merge f4ac32c03a ss/compat-bswap-revamp later to maint).
+
+ * Meson-based build did not handle libexecdir setting correctly,
+ which has been corrected.
+ (merge 056dbe8612 rj/meson-libexecdir-fix later to maint).
+
+ * Document that we do not require "real" name when signing your
+ patches off.
+ (merge 1f0fed312a bc/contribution-under-non-real-names later to maint).
+
+ * "git commit" that concludes a conflicted merge failed to notice and remove
+ existing comment added automatically (like "# Conflicts:") when the
+ core.commentstring is set to 'auto'.
+ (merge 92b7c7c9f5 ac/auto-comment-char-fix later to maint).
+
+ * "git rebase -i" with bogus rebase.instructionFormat configuration
+ failed to produce the todo file after recording the state files,
+ leading to confused "git status"; this has been corrected.
+ (merge ade14bffd7 ow/rebase-verify-insn-fmt-before-initializing-state later to maint).
+
+ * A few file descriptors left unclosed upon program completion in a
+ few test helper programs are now closed.
+ (merge 0f1b33815b hl/test-helper-fd-close later to maint).
+
+ * Interactive prompt code did not correctly strip CRLF from the end
+ of line on Windows.
+ (merge 711a20827b js/prompt-crlf-fix later to maint).
+
+ * The config API had a set of convenience wrapper functions that
+ implicitly use the_repository instance; they have been removed and
+ inlined at the calling sites.
+
+ * "git add/etc -p" now honor the diff.context configuration variable,
+ and also they learn to honor the -U<n> command-line option.
+ (merge 2b3ae04011 lm/add-p-context later to maint).
+
+ * The case where a new submodule takes a path where there used to be a
+ completely different subproject is now dealt with a bit better than
+ before.
+ (merge 5ed8c5b465 kj/renamed-submodule later to maint).
+
+ * The deflate codepath in "git archive --format=zip" had a
+ longstanding bug coming from misuse of zlib API, which has been
+ corrected.
+
+ * Other code cleanup, docfix, build fix, etc.
+ (merge b257adb571 lo/my-first-ow-doc-update later to maint).
+ (merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
+ (merge 5dceb8bd05 ly/do-not-localize-bug-messages later to maint).
+ (merge 61372dd613 ly/commit-buffer-reencode-leakfix later to maint).
+ (merge 81cd1eef7d ly/pack-bitmap-root-leakfix later to maint).
+ (merge bfc9f9cc64 ly/submodule-update-failure-leakfix later to maint).
+ (merge 65dff89c6b ma/doc-diff-cc-headers later to maint).
+ (merge efb61591ee jm/bundle-uri-debug-output-to-fp later to maint).
+ (merge a3d278bb64 ly/prepare-show-merge-leakfix later to maint).
+ (merge 1fde1c5daf ac/preload-index-wo-the-repository later to maint).
+ (merge 855cfc65ae rm/t2400-modernize later to maint).
+ (merge 2939494284 ly/run-builtin-use-passed-in-repo later to maint).
+ (merge ff73f375bb jg/mailinfo-leakfix later to maint).
+ (merge 996f14c02b jj/doc-branch-markup-fix later to maint).
+ (merge 1e77de1864 cb/ci-freebsd-update-to-14.3 later to maint).
+ (merge b0e9d25865 jk/fix-leak-send-pack later to maint).
+ (merge f3a9558c8c bs/remote-helpers-doc-markup-fix later to maint).
+ (merge c4e9775c60 kh/doc-config-subcommands later to maint).
+ (merge de404249ab ps/perlless-test-fixes later to maint).
+ (merge 953049eed8 ts/merge-orig-head-doc-fix later to maint).
+ (merge 0c83bbc704 rj/freebsd-sysinfo-build-fix later to maint).
+ (merge ad7780b38f ps/doc-pack-refs-auto-with-files-backend-fix later to maint).
+ (merge f4fa8a3687 rh/doc-glob-pathspec-fix later to maint).
+ (merge b27be108c8 ja/doc-git-log-markup later to maint).
+ (merge 14d7583beb pw/config-kvi-remove-path later to maint).
+ (merge f31abb421d jc/do-not-scan-argv-without-parsing later to maint).
+ (merge 26552cb62a jk/unleak-reflog-expire-entry later to maint).
+ (merge 339d95fda9 jc/ci-print-test-failures-fix later to maint).
+ (merge 8c3add51a8 cb/meson-avoid-broken-macos-pcre2 later to maint).
+ (merge 5247da07b8 ps/meson-clar-decls-fix later to maint).
+ (merge f3ef347bb2 ch/t7450-recursive-clone-test-fix later to maint).
+ (merge 4ac3302a1a jc/doc-release-vs-clear later to maint).
+ (merge 3bdd897413 ms/meson-with-ancient-git-wo-ls-files-dedup later to maint).
+ (merge cca758d324 kh/doc-fast-import-historical later to maint).
+ (merge 9b0781196a jc/test-hashmap-is-still-here later to maint).
+ (merge 1bad05bacc jk/revert-squelch-compiler-warning later to maint).
+ (merge 3a7e783d9c dl/squelch-maybe-uninitialized later to maint).
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 958e3cc..86ca7f6 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -408,8 +408,15 @@
from that of the project you are accustomed to.
[[real-name]]
-Also notice that a real name is used in the `Signed-off-by` trailer. Please
-don't hide your real name.
+Please use a known identity in the `Signed-off-by` trailer, since we cannot
+accept anonymous contributions. It is common, but not required, to use some form
+of your real name. We realize that some contributors are not comfortable doing
+so or prefer to contribute under a pseudonym or preferred name and we can accept
+your patch either way, as long as the name and email you use are distinctive,
+identifying, and not misleading.
+
+The goal of this policy is to allow us to have sufficient information to contact
+you if questions arise about your contribution.
[[commit-trailers]]
If you like, you can put extra trailers at the end:
diff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in
index 9d91393..ff9ea0a 100644
--- a/Documentation/asciidoc.conf.in
+++ b/Documentation/asciidoc.conf.in
@@ -43,7 +43,7 @@
endif::doctype-book[]
[literal-inlinemacro]
-{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
+{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$%]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
endif::backend-docbook[]
diff --git a/Documentation/asciidoctor-extensions.rb.in b/Documentation/asciidoctor-extensions.rb.in
index 8b7b161..fe64a62 100644
--- a/Documentation/asciidoctor-extensions.rb.in
+++ b/Documentation/asciidoctor-extensions.rb.in
@@ -73,7 +73,7 @@
elsif type == :monospaced
node.text.gsub(/(\.\.\.?)([^\]$\.])/, '<literal>\1</literal>\2')
.gsub(/^\.\.\.?$/, '<literal>\0</literal>')
- .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*]+\.{0,2})+|,)}, '\1<literal>\2</literal>')
+ .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*%]+\.{0,2})+|,)}, '\1<literal>\2</literal>')
.gsub(/(<[-a-zA-Z0-9.]+>)/, '<emphasis>\1</emphasis>')
else
open, close, supports_phrase = QUOTE_TAGS[type]
@@ -102,7 +102,7 @@
if node.type == :monospaced
node.text.gsub(/(\.\.\.?)([^\]$.])/, '<code>\1</code>\2')
.gsub(/^\.\.\.?$/, '<code>\0</code>')
- .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1<code>\2</code>')
+ .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*%]+\.{0,2})+)}, '\1<code>\2</code>')
.gsub(/(<[-a-zA-Z0-9.]+>)/, '<em>\1</em>')
else
diff --git a/Documentation/config/branch.adoc b/Documentation/config/branch.adoc
index e35ea7a..a4db9fa 100644
--- a/Documentation/config/branch.adoc
+++ b/Documentation/config/branch.adoc
@@ -69,9 +69,9 @@
`git fetch`) to lookup the default branch for merging. Without
this option, `git pull` defaults to merge the first refspec fetched.
Specify multiple values to get an octopus merge.
- If you wish to setup `git pull` so that it merges into <name> from
+ If you wish to setup `git pull` so that it merges into _<name>_ from
another branch in the local repository, you can point
- branch.<name>.merge to the desired branch, and use the relative path
+ `branch.<name>.merge` to the desired branch, and use the relative path
setting `.` (a period) for `branch.<name>.remote`.
`branch.<name>.mergeOptions`::
diff --git a/Documentation/config/core.adoc b/Documentation/config/core.adoc
index 9fde1ab..3fbe83e 100644
--- a/Documentation/config/core.adoc
+++ b/Documentation/config/core.adoc
@@ -696,12 +696,6 @@
Defaults to `PERL5LIB` to account for the fact that Git for
Windows insists on using its own Perl interpreter.
-core.restrictinheritedhandles::
- Windows-only: override whether spawned processes inherit only standard
- file handles (`stdin`, `stdout` and `stderr`) or all handles. Can be
- `auto`, `true` or `false`. Defaults to `auto`, which means `true` on
- Windows 7 and later, and `false` on older Windows versions.
-
core.createObject::
You can set this to 'link', in which case a hardlink followed by
a delete of the source are used to make sure that object creation
diff --git a/Documentation/config/feature.adoc b/Documentation/config/feature.adoc
index f061b64..924f5ff 100644
--- a/Documentation/config/feature.adoc
+++ b/Documentation/config/feature.adoc
@@ -20,6 +20,16 @@
+
* `pack.allowPackReuse=multi` may improve the time it takes to create a pack by
reusing objects from multiple packs instead of just one.
++
+* `pack.usePathWalk` may speed up packfile creation and make the packfiles be
+significantly smaller in the presence of certain filename collisions with Git's
+default name-hash.
++
+* `init.defaultRefFormat=reftable` causes newly initialized repositories to use
+the reftable format for storing references. This new format solves issues with
+case-insensitive filesystems, compresses better and performs significantly
+better with many use cases. Refer to Documentation/technical/reftable.adoc for
+more information on this new storage format.
feature.manyFiles::
Enable config options that optimize for repos with many files in the
diff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc
index 7410e93..ab0710e 100644
--- a/Documentation/config/format.adoc
+++ b/Documentation/config/format.adoc
@@ -68,9 +68,15 @@
Defaults to true.
format.pretty::
+ifndef::with-breaking-changes[]
The default pretty format for log/show/whatchanged command.
See linkgit:git-log[1], linkgit:git-show[1],
linkgit:git-whatchanged[1].
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ The default pretty format for log/show command.
+ See linkgit:git-log[1], linkgit:git-show[1].
+endif::with-breaking-changes[]
format.thread::
The default threading style for 'git format-patch'. Can be
diff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc
index 02da427..31d7be3 100644
--- a/Documentation/config/gitcvs.adoc
+++ b/Documentation/config/gitcvs.adoc
@@ -47,7 +47,8 @@
May not contain double colons (`:`). Default: 'SQLite'.
See linkgit:git-cvsserver[1].
-gitcvs.dbUser, gitcvs.dbPass::
+gitcvs.dbUser::
+gitcvs.dbPass::
Database user and password. Only useful if setting `gitcvs.dbDriver`,
since SQLite has no concept of database users and/or passwords.
'gitcvs.dbUser' supports variable substitution (see
diff --git a/Documentation/config/gpg.adoc b/Documentation/config/gpg.adoc
index 5cf32b1..240e46c 100644
--- a/Documentation/config/gpg.adoc
+++ b/Documentation/config/gpg.adoc
@@ -1,5 +1,5 @@
gpg.program::
- Use this custom program instead of "`gpg`" found on `$PATH` when
+ Pathname of the program to use instead of "`gpg`" when
making or verifying a PGP signature. The program must support the
same command-line interface as GPG, namely, to verify a detached
signature, "`gpg --verify $signature - <$file`" is run, and the
diff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc
index 6739328..9da5c29 100644
--- a/Documentation/config/http.adoc
+++ b/Documentation/config/http.adoc
@@ -289,7 +289,8 @@
significantly since the entire buffer is allocated even for small
pushes.
-http.lowSpeedLimit, http.lowSpeedTime::
+http.lowSpeedLimit::
+http.lowSpeedTime::
If the HTTP transfer speed, in bytes per second, is less than
'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,
the transfer is aborted.
diff --git a/Documentation/config/imap.adoc b/Documentation/config/imap.adoc
index 3d28f72..4682a6b 100644
--- a/Documentation/config/imap.adoc
+++ b/Documentation/config/imap.adoc
@@ -1,7 +1,9 @@
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.
+ folder. For example: `INBOX.Drafts`, `INBOX/Drafts` or
+ `[Gmail]/Drafts`. The IMAP folder to interact with MUST be specified;
+ the value of this configuration variable is used as the fallback
+ default value when the `--folder` option is not given.
imap.tunnel::
Command used to set up a tunnel to the IMAP server through which
@@ -40,5 +42,6 @@
Specify the authentication method for authenticating with the IMAP server.
If Git was built with the NO_CURL option, or if your curl version is older
than 7.34.0, or if you're running git-imap-send with the `--no-curl`
- option, the only supported method is 'CRAM-MD5'. If this is not set
- then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
+ option, the only supported methods are `PLAIN`, `CRAM-MD5`, `OAUTHBEARER`
+ and `XOAUTH2`. If this is not set then `git imap-send` uses the basic IMAP
+ plaintext `LOGIN` command.
diff --git a/Documentation/config/log.adoc b/Documentation/config/log.adoc
index 9003a82..16e00e8 100644
--- a/Documentation/config/log.adoc
+++ b/Documentation/config/log.adoc
@@ -1,64 +1,76 @@
-log.abbrevCommit::
- If true, makes linkgit:git-log[1], linkgit:git-show[1], and
- linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
+`log.abbrevCommit`::
+ If `true`, make
+ifndef::with-breaking-changes[]
+ linkgit:git-log[1], linkgit:git-show[1], and
+ linkgit:git-whatchanged[1]
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ linkgit:git-log[1] and linkgit:git-show[1]
+endif::with-breaking-changes[]
+ assume `--abbrev-commit`. You may
override this option with `--no-abbrev-commit`.
-log.date::
- Set the default date-time mode for the 'log' command.
- Setting a value for log.date is similar to using 'git log''s
+`log.date`::
+ Set the default date-time mode for the `log` command.
+ Setting a value for log.date is similar to using `git log`'s
`--date` option. See linkgit:git-log[1] for details.
+
If the format is set to "auto:foo" and the pager is in use, format
"foo" will be used for the date format. Otherwise, "default" will
be used.
-log.decorate::
+`log.decorate`::
Print out the ref names of any commits that are shown by the log
- command. If 'short' is specified, the ref name prefixes 'refs/heads/',
- 'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
- specified, the full ref name (including prefix) will be printed.
- If 'auto' is specified, then if the output is going to a terminal,
- the ref names are shown as if 'short' were given, otherwise no ref
- names are shown. This is the same as the `--decorate` option
- of the `git log`.
+ command. Possible values are:
++
+----
+`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
+ `refs/remotes/` are not printed.
+`full`;; the full ref name (including prefix) are printed.
+`auto`;; if the output is going to a terminal,
+ the ref names are shown as if `short` were given, otherwise no ref
+ names are shown.
+----
++
+This is the same as the `--decorate` option of the `git log`.
-log.initialDecorationSet::
+`log.initialDecorationSet`::
By default, `git log` only shows decorations for certain known ref
namespaces. If 'all' is specified, then show all refs as
decorations.
-log.excludeDecoration::
+`log.excludeDecoration`::
Exclude the specified patterns from the log decorations. This is
similar to the `--decorate-refs-exclude` command-line option, but
the config option can be overridden by the `--decorate-refs`
option.
-log.diffMerges::
+`log.diffMerges`::
Set diff format to be used when `--diff-merges=on` is
specified, see `--diff-merges` in linkgit:git-log[1] for
details. Defaults to `separate`.
-log.follow::
+`log.follow`::
If `true`, `git log` will act as if the `--follow` option was used when
a single <path> is given. This has the same limitations as `--follow`,
i.e. it cannot be used to follow multiple files and does not work well
on non-linear history.
-log.graphColors::
+`log.graphColors`::
A list of colors, separated by commas, that can be used to draw
history lines in `git log --graph`.
-log.showRoot::
+`log.showRoot`::
If true, the initial commit will be shown as a big creation event.
This is equivalent to a diff against an empty tree.
Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
normally hide the root commit will now show it. True by default.
-log.showSignature::
+`log.showSignature`::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1] assume `--show-signature`.
-log.mailmap::
+`log.mailmap`::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise
assume `--no-use-mailmap`. True by default.
diff --git a/Documentation/config/pack.adoc b/Documentation/config/pack.adoc
index da52737..75402d5 100644
--- a/Documentation/config/pack.adoc
+++ b/Documentation/config/pack.adoc
@@ -155,6 +155,10 @@
commits contain certain types of direct renames. Default is
`true`.
+pack.usePathWalk::
+ Enable the `--path-walk` option by default for `git pack-objects`
+ processes. See linkgit:git-pack-objects[1] for full details.
+
pack.preferBitmapTips::
When selecting which commits will receive bitmaps, prefer a
commit at the tip of any reference that is a suffix of any value
diff --git a/Documentation/config/pull.adoc b/Documentation/config/pull.adoc
index 9349e09..125c930 100644
--- a/Documentation/config/pull.adoc
+++ b/Documentation/config/pull.adoc
@@ -29,5 +29,21 @@
The default merge strategy to use when pulling multiple branches
at once.
+pull.autoStash::
+ When set to true, automatically create a temporary stash entry
+ to record the local changes before the operation begins, and
+ restore them after the operation completes. When your "git
+ pull" rebases (instead of merges), this may be convenient, since
+ unlike merging pull that tolerates local changes that do not
+ interfere with the merge, rebasing pull refuses to work with any
+ local changes.
++
+If `pull.autostash` is set (either to true or false),
+`merge.autostash` and `rebase.autostash` are ignored. If
+`pull.autostash` is not set at all, depending on the value of
+`pull.rebase`, `merge.autostash` or `rebase.autostash` is used
+instead. Can be overridden by the `--[no-]autostash` command line
+option.
+
pull.twohead::
The default merge strategy to use when pulling a single branch.
diff --git a/Documentation/config/repack.adoc b/Documentation/config/repack.adoc
index c79af6d..e9e78dc 100644
--- a/Documentation/config/repack.adoc
+++ b/Documentation/config/repack.adoc
@@ -39,3 +39,10 @@
a cruft pack and the respective parameters are not given over
the command line. See similarly named `pack.*` configuration
variables for defaults and meaning.
+
+repack.midxMustContainCruft::
+ When set to true, linkgit:git-repack[1] will unconditionally include
+ cruft pack(s), if any, in the multi-pack index when invoked with
+ `--write-midx`. When false, cruft packs are only included in the MIDX
+ when necessary (e.g., because they might be required to form a
+ reachability closure with MIDX bitmaps). Defaults to true.
diff --git a/Documentation/config/sendemail.adoc b/Documentation/config/sendemail.adoc
index 5ffcfc9..4722334 100644
--- a/Documentation/config/sendemail.adoc
+++ b/Documentation/config/sendemail.adoc
@@ -1,38 +1,38 @@
sendemail.identity::
A configuration identity. When given, causes values in the
- 'sendemail.<identity>' subsection to take precedence over
- values in the 'sendemail' section. The default identity is
+ `sendemail.<identity>` subsection to take precedence over
+ values in the `sendemail` section. The default identity is
the value of `sendemail.identity`.
sendemail.smtpEncryption::
See linkgit:git-send-email[1] for description. Note that this
- setting is not subject to the 'identity' mechanism.
+ setting is not subject to the `identity` mechanism.
sendemail.smtpSSLCertPath::
Path to ca-certificates (either a directory or a single file).
Set it to an empty string to disable certificate verification.
sendemail.<identity>.*::
- Identity-specific versions of the 'sendemail.*' parameters
+ Identity-specific versions of the `sendemail.*` parameters
found below, taking precedence over those when this
identity is selected, through either the command-line or
`sendemail.identity`.
sendemail.multiEdit::
- If true (default), a single editor instance will be spawned to edit
+ If `true` (default), a single editor instance will be spawned to edit
files you have to edit (patches when `--annotate` is used, and the
- summary when `--compose` is used). If false, files will be edited one
+ summary when `--compose` is used). If `false`, files will be edited one
after the other, spawning a new editor each time.
sendemail.confirm::
Sets the default for whether to confirm before sending. Must be
- one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm`
+ one of `always`, `never`, `cc`, `compose`, or `auto`. See `--confirm`
in the linkgit:git-send-email[1] documentation for the meaning of these
values.
sendemail.mailmap::
- If true, makes linkgit:git-send-email[1] assume `--mailmap`,
- otherwise assume `--no-mailmap`. False by default.
+ If `true`, makes linkgit:git-send-email[1] assume `--mailmap`,
+ otherwise assume `--no-mailmap`. `False` by default.
sendemail.mailmap.file::
The location of a linkgit:git-send-email[1] specific augmenting
@@ -51,7 +51,7 @@
sendemail.aliasFileType::
Format of the file(s) specified in sendemail.aliasesFile. Must be
- one of 'mutt', 'mailrc', 'pine', 'elm', 'gnus', or 'sendmail'.
+ one of `mutt`, `mailrc`, `pine`, `elm`, `gnus`, or `sendmail`.
+
What an alias file in each format looks like can be found in
the documentation of the email program of the same name. The
@@ -96,12 +96,17 @@
linkgit:git-send-email[1] command-line options. See its
documentation for details.
+sendemail.outlookidfix::
+ If `true`, makes linkgit:git-send-email[1] assume `--outlook-id-fix`,
+ and if `false` assume `--no-outlook-id-fix`. If not specified, it will
+ behave the same way as if `--outlook-id-fix` is not specified.
+
sendemail.signedOffCc (deprecated)::
Deprecated alias for `sendemail.signedOffByCc`.
sendemail.smtpBatchSize::
Number of messages to be sent per connection, after that a relogin
- will happen. If the value is 0 or undefined, send all messages in
+ will happen. If the value is `0` or undefined, send all messages in
one connection.
See also the `--batch-size` option of linkgit:git-send-email[1].
@@ -111,5 +116,5 @@
sendemail.forbidSendmailVariables::
To avoid common misconfiguration mistakes, linkgit:git-send-email[1]
- will abort with a warning if any configuration options for "sendmail"
+ will abort with a warning if any configuration options for `sendmail`
exist. Set this variable to bypass the check.
diff --git a/Documentation/diff-context-options.adoc b/Documentation/diff-context-options.adoc
new file mode 100644
index 0000000..e161260
--- /dev/null
+++ b/Documentation/diff-context-options.adoc
@@ -0,0 +1,10 @@
+`-U<n>`::
+`--unified=<n>`::
+ Generate diffs with _<n>_ lines of context. Defaults to `diff.context`
+ or 3 if the config option is unset.
+
+`--inter-hunk-context=<n>`::
+ Show the context between diff hunks, up to the specified _<number>_
+ of lines, thereby fusing hunks that are close to each other.
+ Defaults to `diff.interHunkContext` or 0 if the config option
+ is unset.
diff --git a/Documentation/diff-generate-patch.adoc b/Documentation/diff-generate-patch.adoc
index e5c813c..7b6cdd1 100644
--- a/Documentation/diff-generate-patch.adoc
+++ b/Documentation/diff-generate-patch.adoc
@@ -138,7 +138,7 @@
+
[synopsis]
index <hash>,<hash>..<hash>
-mode <mode>,<mode>`..`<mode>
+mode <mode>,<mode>..<mode>
new file mode <mode>
deleted file mode <mode>,<mode>
+
diff --git a/Documentation/diff-options.adoc b/Documentation/diff-options.adoc
index 640eb6e..f3a35d8 100644
--- a/Documentation/diff-options.adoc
+++ b/Documentation/diff-options.adoc
@@ -37,32 +37,32 @@
endif::git-format-patch[]
ifdef::git-log[]
--m::
+`-m`::
Show diffs for merge commits in the default format. This is
similar to `--diff-merges=on`, except `-m` will
produce no output unless `-p` is given as well.
--c::
+`-c`::
Produce combined diff output for merge commits.
Shortcut for `--diff-merges=combined -p`.
---cc::
+`--cc`::
Produce dense combined diff output for merge commits.
Shortcut for `--diff-merges=dense-combined -p`.
---dd::
+`--dd`::
Produce diff with respect to first parent for both merge and
regular commits.
Shortcut for `--diff-merges=first-parent -p`.
---remerge-diff::
+`--remerge-diff`::
Produce remerge-diff output for merge commits.
Shortcut for `--diff-merges=remerge -p`.
---no-diff-merges::
+`--no-diff-merges`::
Synonym for `--diff-merges=off`.
---diff-merges=<format>::
+`--diff-merges=<format>`::
Specify diff format to be used for merge commits. Default is
{diff-merges-default} unless `--first-parent` is in use, in
which case `first-parent` is the default.
@@ -70,48 +70,54 @@
The following formats are supported:
+
--
-off, none::
+`off`::
+`none`::
Disable output of diffs for merge commits. Useful to override
implied value.
-on, m::
+`on`::
+`m`::
Make diff output for merge commits to be shown in the default
format. The default format can be changed using
`log.diffMerges` configuration variable, whose default value
is `separate`.
-first-parent, 1::
+`first-parent`::
+`1`::
Show full diff with respect to first parent. This is the same
format as `--patch` produces for non-merge commits.
-separate::
+`separate`::
Show full diff with respect to each of parents.
Separate log entry and diff is generated for each parent.
-combined, c::
+`combined`::
+`c`::
Show differences from each of the parents to the merge
result simultaneously instead of showing pairwise diff between
a parent and the result one at a time. Furthermore, it lists
only files which were modified from all parents.
-dense-combined, cc::
+`dense-combined`::
+`cc`::
Further compress output produced by `--diff-merges=combined`
by omitting uninteresting hunks whose contents in the parents
have only two variants and the merge result picks one of them
without modification.
-remerge, r::
- Remerge two-parent merge commits to create a temporary tree
+`remerge`::
+`r`:: Remerge two-parent merge commits to create a temporary tree
object--potentially containing files with conflict markers
and such. A diff is then shown between that temporary tree
and the actual merge commit.
+--
+
The output emitted when this option is used is subject to change, and
so is its interaction with other options (unless explicitly
documented).
---
---combined-all-paths::
+
+`--combined-all-paths`::
Cause combined diffs (used for merge commits) to
list the name of the file from all parents. It thus only has
effect when `--diff-merges=[dense-]combined` is in use, and
diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
index eba0b41..b7a7358 100644
--- a/Documentation/git-add.adoc
+++ b/Documentation/git-add.adoc
@@ -104,6 +104,8 @@
initial command menu and directly jumps to the `patch` subcommand.
See ``Interactive mode'' for details.
+include::diff-context-options.adoc[]
+
`-e`::
`--edit`::
Open the diff vs. the index in an editor and let the user
diff --git a/Documentation/git-apply.adoc b/Documentation/git-apply.adoc
index 952518b..6c71ee6 100644
--- a/Documentation/git-apply.adoc
+++ b/Documentation/git-apply.adoc
@@ -75,13 +75,14 @@
tree. If `--check` is in effect, merely check that it would
apply cleanly to the index entry.
+-N::
--intent-to-add::
When applying the patch only to the working tree, mark new
files to be added to the index later (see `--intent-to-add`
- option in linkgit:git-add[1]). This option is ignored unless
- running in a Git repository and `--index` is not specified.
- Note that `--index` could be implied by other options such
- as `--cached` or `--3way`.
+ option in linkgit:git-add[1]). This option is ignored if
+ `--index` or `--cached` are used, and has no effect outside a Git
+ repository. Note that `--index` could be implied by other options
+ such as `--3way`.
-3::
--3way::
diff --git a/Documentation/git-cat-file.adoc b/Documentation/git-cat-file.adoc
index cde79ad..180d1ad 100644
--- a/Documentation/git-cat-file.adoc
+++ b/Documentation/git-cat-file.adoc
@@ -307,6 +307,11 @@
`objecttype`::
The type of the object (the same as `cat-file -t` reports).
+`objectmode`::
+ If the specified object has mode information (such as a tree or
+ index entry), the mode expressed as an octal integer. Otherwise,
+ empty string.
+
`objectsize`::
The size, in bytes, of the object (the same as `cat-file -s`
reports).
@@ -368,6 +373,14 @@
<object> SP ambiguous LF
------------
+If a name is specified that refers to a submodule entry in a tree and the
+target object does not exist in the repository, then `cat-file` will ignore
+any custom format and print (with the object ID of the submodule):
+
+------------
+<oid> SP submodule LF
+------------
+
If `--follow-symlinks` is used, and a symlink in the repository points
outside the repository, then `cat-file` will ignore any custom format
and print:
diff --git a/Documentation/git-checkout.adoc b/Documentation/git-checkout.adoc
index ee83b6d..40e02cf 100644
--- a/Documentation/git-checkout.adoc
+++ b/Documentation/git-checkout.adoc
@@ -289,6 +289,8 @@
Note that this option uses the no overlay mode by default (see also
`--overlay`), and currently doesn't support overlay mode.
+include::diff-context-options.adoc[]
+
`--ignore-other-worktrees`::
`git checkout` refuses when the wanted branch is already checked
out or otherwise in use by another worktree. This option makes
diff --git a/Documentation/git-commit.adoc b/Documentation/git-commit.adoc
index dc21902..ae988a8 100644
--- a/Documentation/git-commit.adoc
+++ b/Documentation/git-commit.adoc
@@ -76,6 +76,8 @@
which changes to commit. See linkgit:git-add[1] for
details.
+include::diff-context-options.adoc[]
+
`-C <commit>`::
`--reuse-message=<commit>`::
Take an existing _<commit>_ object, and reuse the log message
diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
index 936e0c5..511b2e2 100644
--- a/Documentation/git-config.adoc
+++ b/Documentation/git-config.adoc
@@ -10,9 +10,9 @@
--------
[verse]
'git config list' [<file-option>] [<display-option>] [--includes]
-'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>
-'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>
-'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>
+'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name>
+'git config set' [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>
+'git config unset' [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>
'git config rename-section' [<file-option>] <old-name> <new-name>
'git config remove-section' [<file-option>] <name>
'git config edit' [<file-option>]
@@ -26,7 +26,7 @@
Multiple lines can be added to an option by using the `--append` option.
If you want to update or unset an option which can occur on multiple
-lines, a `value-pattern` (which is an extended regular expression,
+lines, `--value=<pattern>` (which is an extended regular expression,
unless the `--fixed-value` option is given) needs to be given. Only the
existing values that match the pattern are updated or unset. If
you want to handle the lines that do *not* match the pattern, just
@@ -109,7 +109,7 @@
--replace-all::
Default behavior is to replace at most one line. This replaces
- all lines matching the key (and optionally the `value-pattern`).
+ all lines matching the key (and optionally `--value=<pattern>`).
--append::
Adds a new line to the option without altering any existing
@@ -200,11 +200,19 @@
section in linkgit:gitrevisions[7] for a more complete list of
ways to spell blob names.
+`--value=<pattern>`::
+`--no-value`::
+ With `get`, `set`, and `unset`, match only against
+ _<pattern>_. The pattern is an extended regular expression unless
+ `--fixed-value` is given.
++
+Use `--no-value` to unset _<pattern>_.
+
--fixed-value::
- When used with the `value-pattern` argument, treat `value-pattern` as
+ When used with `--value=<pattern>`, treat _<pattern>_ as
an exact string instead of a regular expression. This will restrict
the name/value pairs that are matched to only those where the value
- is exactly equal to the `value-pattern`.
+ is exactly equal to _<pattern>_.
--type <type>::
'git config' will ensure that any input or output is valid under the given
@@ -259,6 +267,12 @@
Output only the names of config variables for `list` or
`get`.
+`--show-names`::
+`--no-show-names`::
+ With `get`, show config keys in addition to their values. The
+ default is `--no-show-names` unless `--url` is given and there
+ are no subsections in _<name>_.
+
--show-origin::
Augment the output of all queried config options with the
origin type (file, standard input, blob, command line) and
diff --git a/Documentation/git-diff.adoc b/Documentation/git-diff.adoc
index dec173a..272331a 100644
--- a/Documentation/git-diff.adoc
+++ b/Documentation/git-diff.adoc
@@ -14,7 +14,7 @@
git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
git diff [<options>] <commit>...<commit> [--] [<path>...]
git diff [<options>] <blob> <blob>
-git diff [<options>] --no-index [--] <path> <path>
+git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]
DESCRIPTION
-----------
@@ -31,14 +31,18 @@
further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1].
-`git diff [<options>] --no-index [--] <path> <path>`::
+`git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]`::
This form is to compare the given two paths on the
filesystem. You can omit the `--no-index` option when
running the command in a working tree controlled by Git and
at least one of the paths points outside the working tree,
or when running the command outside a working tree
- controlled by Git. This form implies `--exit-code`.
+ controlled by Git. This form implies `--exit-code`. If both
+ paths point to directories, additional pathspecs may be
+ provided. These will limit the files included in the
+ difference. All such pathspecs must be relative as they
+ apply to both sides of the diff.
`git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]`::
diff --git a/Documentation/git-fast-export.adoc b/Documentation/git-fast-export.adoc
index 43bbb4f..297b57b 100644
--- a/Documentation/git-fast-export.adoc
+++ b/Documentation/git-fast-export.adoc
@@ -50,6 +50,23 @@
is the same as how earlier versions of this command without
this option behaved.
+
+When exported, a signature starts with:
++
+gpgsig <git-hash-algo> <signature-format>
++
+where <git-hash-algo> is the Git object hash so either "sha1" or
+"sha256", and <signature-format> is the signature type, so "openpgp",
+"x509", "ssh" or "unknown".
++
+For example, an OpenPGP signature on a SHA-1 commit starts with
+`gpgsig sha1 openpgp`, while an SSH signature on a SHA-256 commit
+starts with `gpgsig sha256 ssh`.
++
+While all the signatures of a commit are exported, an importer may
+choose to accept only some of them. For example
+linkgit:git-fast-import[1] currently stores at most one signature per
+Git hash algorithm in each commit.
++
NOTE: This is highly experimental and the format of the data stream may
change in the future without compatibility guarantees.
diff --git a/Documentation/git-fast-import.adoc b/Documentation/git-fast-import.adoc
index 250d866..6f9763c 100644
--- a/Documentation/git-fast-import.adoc
+++ b/Documentation/git-fast-import.adoc
@@ -182,7 +182,7 @@
is able to keep up with fast-import and feed it a constant stream of data,
import times for projects holding 10+ years of history and containing
100,000+ individual commits are generally completed in just 1-2
-hours on quite modest (~$2,000 USD) hardware.
+hours on quite modest hardware (~$2,000 USD in 2007).
Most bottlenecks appear to be in foreign source data access (the
source just cannot extract revisions fast enough) or disk IO (fast-import
@@ -445,7 +445,7 @@
original-oid?
('author' (SP <name>)? SP LT <email> GT SP <when> LF)?
'committer' (SP <name>)? SP LT <email> GT SP <when> LF
- ('gpgsig' SP <alg> LF data)?
+ ('gpgsig' SP <algo> SP <format> LF data)?
('encoding' SP <encoding> LF)?
data
('from' SP <commit-ish> LF)?
@@ -518,13 +518,39 @@
^^^^^^^^
The optional `gpgsig` command is used to include a PGP/GPG signature
-that signs the commit data.
+or other cryptographic signature that signs the commit data.
-Here <alg> specifies which hashing algorithm is used for this
-signature, either `sha1` or `sha256`.
+....
+ 'gpgsig' SP <git-hash-algo> SP <signature-format> LF data
+....
-NOTE: This is highly experimental and the format of the data stream may
-change in the future without compatibility guarantees.
+The `gpgsig` command takes two arguments:
+
+* `<git-hash-algo>` specifies which Git object format this signature
+ applies to, either `sha1` or `sha256`. This allows to know which
+ representation of the commit was signed (the SHA-1 or the SHA-256
+ version) which helps with both signature verification and
+ interoperability between repos with different hash functions.
+
+* `<signature-format>` specifies the type of signature, such as
+ `openpgp`, `x509`, `ssh`, or `unknown`. This is a convenience for
+ tools that process the stream, so they don't have to parse the ASCII
+ armor to identify the signature type.
+
+A commit may have at most one signature for the SHA-1 object format
+(stored in the "gpgsig" header) and one for the SHA-256 object format
+(stored in the "gpgsig-sha256" header).
+
+See below for a detailed description of the `data` command which
+contains the raw signature data.
+
+Signatures are not yet checked in the current implementation
+though. (Already setting the `extensions.compatObjectFormat`
+configuration option might help with verifying both SHA-1 and SHA-256
+object format signatures when it will be implemented.)
+
+NOTE: This is highly experimental and the format of the `gpgsig`
+command may change in the future without compatibility guarantees.
`encoding`
^^^^^^^^^^
diff --git a/Documentation/git-for-each-ref.adoc b/Documentation/git-for-each-ref.adoc
index 5ef89fc..0609409 100644
--- a/Documentation/git-for-each-ref.adoc
+++ b/Documentation/git-for-each-ref.adoc
@@ -7,14 +7,14 @@
SYNOPSIS
--------
-[verse]
-'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
+[synopsis]
+git for-each-ref [--count=<count>] [--shell|--perl|--python|--tcl]
[(--sort=<key>)...] [--format=<format>]
- [--include-root-refs] [ --stdin | <pattern>... ]
- [--points-at=<object>]
+ [--include-root-refs] [--points-at=<object>]
[--merged[=<object>]] [--no-merged[=<object>]]
[--contains[=<object>]] [--no-contains[=<object>]]
- [--exclude=<pattern> ...]
+ [(--exclude=<pattern>)...] [--start-after=<marker>]
+ [ --stdin | <pattern>... ]
DESCRIPTION
-----------
@@ -108,6 +108,15 @@
--include-root-refs::
List root refs (HEAD and pseudorefs) apart from regular refs.
+--start-after=<marker>::
+ Allows paginating the output by skipping references up to and including the
+ specified marker. When paging, it should be noted that references may be
+ deleted, modified or added between invocations. Output will only yield those
+ references which follow the marker lexicographically. Output begins from the
+ first reference that would come after the marker alphabetically. Cannot be
+ used with `--sort=<key>` or `--stdin` options, or the _<pattern>_ argument(s)
+ to limit the refs.
+
FIELD NAMES
-----------
diff --git a/Documentation/git-imap-send.adoc b/Documentation/git-imap-send.adoc
index 26ccf4e..278e5cc 100644
--- a/Documentation/git-imap-send.adoc
+++ b/Documentation/git-imap-send.adoc
@@ -9,21 +9,24 @@
SYNOPSIS
--------
[verse]
-'git imap-send' [-v] [-q] [--[no-]curl]
+'git imap-send' [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>]
+'git imap-send' --list
DESCRIPTION
-----------
-This command uploads a mailbox generated with 'git format-patch'
+This command uploads a mailbox generated with `git format-patch`
into an IMAP drafts folder. This allows patches to be sent as
other email is when using mail clients that cannot read mailbox
files directly. The command also works with any general mailbox
-in which emails have the fields "From", "Date", and "Subject" in
+in which emails have the fields `From`, `Date`, and `Subject` in
that order.
Typical usage is something like:
-git format-patch --signoff --stdout --attach origin | git imap-send
+------
+$ git format-patch --signoff --stdout --attach origin | git imap-send
+------
OPTIONS
@@ -37,6 +40,11 @@
--quiet::
Be quiet.
+-f <folder>::
+--folder=<folder>::
+ Specify the folder in which the emails have to saved.
+ For example: `--folder=[Gmail]/Drafts` or `-f INBOX/Drafts`.
+
--curl::
Use libcurl to communicate with the IMAP server, unless tunneling
into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
@@ -47,6 +55,8 @@
using libcurl. Ignored if Git was built with the NO_OPENSSL option
set.
+--list::
+ Run the IMAP LIST command to output a list of all the folders present.
CONFIGURATION
-------------
@@ -58,6 +68,34 @@
include::config/imap.adoc[]
+GETTING A LIST OF AVAILABLE FOLDERS
+-----------------------------------
+
+In order to send an email to a specific folder, you need to know the correct name of
+intended folder in your mailbox. The names like "Junk", "Trash" etc. displayed by
+various email clients need not be the actual names of the folders stored in the mail
+server of your email provider.
+
+In order to get the correct folder name to be used with `git imap-send`, you can run
+`git imap-send --list`. This will display a list of valid folder names. An example
+of such an output when run on a Gmail account is:
+
+.........................
+* LIST (\HasNoChildren) "/" "INBOX"
+* LIST (\HasChildren \Noselect) "/" "[Gmail]"
+* LIST (\All \HasNoChildren) "/" "[Gmail]/All Mail"
+* LIST (\Drafts \HasNoChildren) "/" "[Gmail]/Drafts"
+* LIST (\HasNoChildren \Important) "/" "[Gmail]/Important"
+* LIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"
+* LIST (\HasNoChildren \Junk) "/" "[Gmail]/Spam"
+* LIST (\Flagged \HasNoChildren) "/" "[Gmail]/Starred"
+* LIST (\HasNoChildren \Trash) "/" "[Gmail]/Trash"
+.........................
+
+Here, you can observe that the correct name for the "Junk" folder is `[Gmail]/Spam`
+and for the "Trash" folder is `[Gmail]/Trash`. Similar logic can be used to determine
+other folders as well.
+
EXAMPLES
--------
Using tunnel mode:
@@ -102,20 +140,56 @@
---------
[imap]
- folder = "[Gmail]/Drafts"
- host = imaps://imap.gmail.com
- user = user@gmail.com
- port = 993
+ folder = "[Gmail]/Drafts"
+ host = imaps://imap.gmail.com
+ user = user@gmail.com
+ port = 993
---------
+Gmail does not allow using your regular password for `git imap-send`.
+If you have multi-factor authentication set up on your Gmail account, you
+can generate an app-specific password for use with `git imap-send`.
+Visit https://security.google.com/settings/security/apppasswords to create
+it. Alternatively, use OAuth2.0 authentication as described below.
+
[NOTE]
You might need to instead use: `folder = "[Google Mail]/Drafts"` if you get an error
-that the "Folder doesn't exist".
+that the "Folder doesn't exist". You can also run `git imap-send --list` to get a
+list of available folders.
[NOTE]
If your Gmail account is set to another language than English, the name of the "Drafts"
folder will be localized.
+If you want to use OAuth2.0 based authentication, you can specify
+`OAUTHBEARER` or `XOAUTH2` mechanism in your config. It is more secure
+than using app-specific passwords, and also does not enforce the need of
+having multi-factor authentication. You will have to use an OAuth2.0
+access token in place of your password when using this authentication.
+
+---------
+[imap]
+ folder = "[Gmail]/Drafts"
+ host = imaps://imap.gmail.com
+ user = user@gmail.com
+ port = 993
+ authmethod = OAUTHBEARER
+---------
+
+Using Outlook's IMAP interface:
+
+Unlike Gmail, Outlook only supports OAuth2.0 based authentication. Also, it
+supports only `XOAUTH2` as the mechanism.
+
+---------
+[imap]
+ folder = "Drafts"
+ host = imaps://outlook.office365.com
+ user = user@outlook.com
+ port = 993
+ authmethod = XOAUTH2
+---------
+
Once the commits are ready to be sent, run the following command:
$ git format-patch --cover-letter -M --stdout origin/master | git imap-send
@@ -124,6 +198,10 @@
interface will wrap lines no matter what, so you need to use a real
IMAP client).
+In case you are using OAuth2.0 authentication, it is easier to use credential
+helpers to generate tokens. Credential helpers suggested in
+linkgit:git-send-email[1] can be used for `git imap-send` as well.
+
CAUTION
-------
It is still your responsibility to make sure that the email message
diff --git a/Documentation/git-log.adoc b/Documentation/git-log.adoc
index ae8a7e2..b6f3d92 100644
--- a/Documentation/git-log.adoc
+++ b/Documentation/git-log.adoc
@@ -8,8 +8,8 @@
SYNOPSIS
--------
-[verse]
-'git log' [<options>] [<revision-range>] [[--] <path>...]
+[synopsis]
+git log [<options>] [<revision-range>] [[--] <path>...]
DESCRIPTION
-----------
@@ -27,28 +27,34 @@
OPTIONS
-------
---follow::
+`--follow`::
Continue listing the history of a file beyond renames
(works only for a single file).
---no-decorate::
---decorate[=short|full|auto|no]::
- Print out the ref names of any commits that are shown. If 'short' is
- specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
- 'refs/remotes/' will not be printed. If 'full' is specified, the
- full ref name (including prefix) will be printed. If 'auto' is
- specified, then if the output is going to a terminal, the ref names
- are shown as if 'short' were given, otherwise no ref names are
- shown. The option `--decorate` is short-hand for `--decorate=short`.
- Default to configuration value of `log.decorate` if configured,
- otherwise, `auto`.
+`--no-decorate`::
+`--decorate[=(short|full|auto|no)]`::
+ Print out the ref names of any commits that are shown. Possible values
+ are:
++
+----
+`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
+ `refs/remotes/` are not printed.
+`full`;; the full ref name (including prefix) is printed.
+`auto`:: if the output is going to a terminal, the ref names
+ are shown as if `short` were given, otherwise no ref names are
+ shown.
+----
++
+The option `--decorate` is short-hand for `--decorate=short`. Default to
+configuration value of `log.decorate` if configured, otherwise, `auto`.
---decorate-refs=<pattern>::
---decorate-refs-exclude=<pattern>::
+`--decorate-refs=<pattern>`::
+`--decorate-refs-exclude=<pattern>`::
For each candidate reference, do not use it for decoration if it
- matches any patterns given to `--decorate-refs-exclude` or if it
- doesn't match any of the patterns given to `--decorate-refs`. The
- `log.excludeDecoration` config option allows excluding refs from
+ matches any of the _<pattern>_ parameters given to
+ `--decorate-refs-exclude` or if it doesn't match any of the
+ _<pattern>_ parameters given to `--decorate-refs`.
+ The `log.excludeDecoration` config option allows excluding refs from
the decorations, but an explicit `--decorate-refs` pattern will
override a match in `log.excludeDecoration`.
+
@@ -56,51 +62,51 @@
used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`,
`refs/stash/`, or `refs/tags/`.
---clear-decorations::
+`--clear-decorations`::
When specified, this option clears all previous `--decorate-refs`
or `--decorate-refs-exclude` options and relaxes the default
decoration filter to include all references. This option is
assumed if the config value `log.initialDecorationSet` is set to
`all`.
---source::
+`--source`::
Print out the ref name given on the command line by which each
commit was reached.
---[no-]mailmap::
---[no-]use-mailmap::
+`--[no-]mailmap`::
+`--[no-]use-mailmap`::
Use mailmap file to map author and committer names and email
addresses to canonical real names and email addresses. See
linkgit:git-shortlog[1].
---full-diff::
+`--full-diff`::
Without this flag, `git log -p <path>...` shows commits that
touch the specified paths, and diffs about the same specified
paths. With this, the full diff is shown for commits that touch
- the specified paths; this means that "<path>..." limits only
+ the specified paths; this means that "`<path>...`" limits only
commits, and doesn't limit diff for those commits.
+
Note that this affects all diff-based output types, e.g. those
produced by `--stat`, etc.
---log-size::
- Include a line ``log size <number>'' in the output for each commit,
- where <number> is the length of that commit's message in bytes.
+`--log-size`::
+ Include a line `log size <number>` in the output for each commit,
+ where _<number>_ is the length of that commit's message in bytes.
Intended to speed up tools that read log messages from `git log`
output by allowing them to allocate space in advance.
include::line-range-options.adoc[]
-<revision-range>::
+_<revision-range>_::
Show only commits in the specified revision range. When no
- <revision-range> is specified, it defaults to `HEAD` (i.e. the
+ _<revision-range>_ is specified, it defaults to `HEAD` (i.e. the
whole history leading to the current commit). `origin..HEAD`
specifies all the commits reachable from the current commit
(i.e. `HEAD`), but not from `origin`. For a complete list of
- ways to spell <revision-range>, see the 'Specifying Ranges'
+ ways to spell _<revision-range>_, see the 'Specifying Ranges'
section of linkgit:gitrevisions[7].
-[--] <path>...::
+`[--] <path>...`::
Show only commits that are enough to explain how the files
that match the specified paths came to be. See 'History
Simplification' below for details and other simplification
@@ -145,14 +151,14 @@
`git log --since="2 weeks ago" -- gitk`::
- Show the changes during the last two weeks to the file 'gitk'.
+ Show the changes during the last two weeks to the file `gitk`.
The `--` is necessary to avoid confusion with the *branch* named
- 'gitk'
+ `gitk`
`git log --name-status release..test`::
- Show the commits that are in the "test" branch but not yet
- in the "release" branch, along with the list of paths
+ Show the commits that are in the "`test`" branch but not yet
+ in the "`release`" branch, along with the list of paths
each commit modifies.
`git log --follow builtin/rev-list.c`::
@@ -164,7 +170,7 @@
`git log --branches --not --remotes=origin`::
Shows all commits that are in any of local branches but not in
- any of remote-tracking branches for 'origin' (what you have that
+ any of remote-tracking branches for `origin` (what you have that
origin doesn't).
`git log master --not --remotes=*/master`::
@@ -200,11 +206,11 @@
See linkgit:git-config[1] for core variables and linkgit:git-diff[1]
for settings related to diff generation.
-format.pretty::
+`format.pretty`::
Default for the `--format` option. (See 'Pretty Formats' above.)
Defaults to `medium`.
-i18n.logOutputEncoding::
+`i18n.logOutputEncoding`::
Encoding to use when displaying logs. (See 'Discussion' above.)
Defaults to the value of `i18n.commitEncoding` if set, and UTF-8
otherwise.
diff --git a/Documentation/git-maintenance.adoc b/Documentation/git-maintenance.adoc
index 931f3e0..540b5cf 100644
--- a/Documentation/git-maintenance.adoc
+++ b/Documentation/git-maintenance.adoc
@@ -172,7 +172,7 @@
worktree-prune::
The `worktree-prune` task deletes stale or broken worktrees. See
- linkit:git-worktree[1] for more information.
+ linkgit:git-worktree[1] for more information.
OPTIONS
-------
diff --git a/Documentation/git-merge.adoc b/Documentation/git-merge.adoc
index d53923c..a055384 100644
--- a/Documentation/git-merge.adoc
+++ b/Documentation/git-merge.adoc
@@ -28,8 +28,8 @@
`master`:
------------
- A---B---C topic
- /
+ A---B---C topic
+ /
D---E---F---G master
------------
@@ -38,11 +38,11 @@
its current commit (`C`) on top of `master`, and record the result
in a new commit along with the names of the two parent commits and
a log message from the user describing the changes. Before the operation,
-`ORIG_HEAD` is set to the tip of the current branch (`C`).
+`ORIG_HEAD` is set to the tip of the current branch (`G`).
------------
- A---B---C topic
- / \
+ A---B---C topic
+ / \
D---E---F---G---H master
------------
diff --git a/Documentation/git-pack-objects.adoc b/Documentation/git-pack-objects.adoc
index 7f69ae4..eba014c 100644
--- a/Documentation/git-pack-objects.adoc
+++ b/Documentation/git-pack-objects.adoc
@@ -10,13 +10,13 @@
--------
[verse]
'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
- [--no-reuse-delta] [--delta-base-offset] [--non-empty]
- [--local] [--incremental] [--window=<n>] [--depth=<n>]
- [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
- [--cruft] [--cruft-expiration=<time>]
- [--stdout [--filter=<filter-spec>] | <base-name>]
- [--shallow] [--keep-true-parents] [--[no-]sparse]
- [--name-hash-version=<n>] < <object-list>
+ [--no-reuse-delta] [--delta-base-offset] [--non-empty]
+ [--local] [--incremental] [--window=<n>] [--depth=<n>]
+ [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
+ [--cruft] [--cruft-expiration=<time>]
+ [--stdout [--filter=<filter-spec>] | <base-name>]
+ [--shallow] [--keep-true-parents] [--[no-]sparse]
+ [--name-hash-version=<n>] [--path-walk] < <object-list>
DESCRIPTION
@@ -87,13 +87,21 @@
reference was included in the resulting packfile. This
can be useful to send new tags to native Git clients.
---stdin-packs::
+--stdin-packs[=<mode>]::
Read the basenames of packfiles (e.g., `pack-1234abcd.pack`)
from the standard input, instead of object names or revision
arguments. The resulting pack contains all objects listed in the
included packs (those not beginning with `^`), excluding any
objects listed in the excluded packs (beginning with `^`).
+
+When `mode` is "follow", objects from packs not listed on stdin receive
+special treatment. Objects within unlisted packs will be included if
+those objects are (1) reachable from the included packs, and (2) not
+found in any excluded packs. This mode is useful, for example, to
+resurrect once-unreachable objects found in cruft packs to generate
+packs which are closed under reachability up to the boundary set by the
+excluded packs.
++
Incompatible with `--revs`, or options that imply `--revs` (such as
`--all`), with the exception of `--unpacked`, which is compatible.
@@ -375,6 +383,17 @@
when writing reachability bitmap files with `--write-bitmap-index` and it
will be automatically changed to version `1`.
+--path-walk::
+ Perform compression by first organizing objects by path, then a
+ second pass that compresses across paths as normal. This has the
+ potential to improve delta compression especially in the presence
+ of filenames that cause collisions in Git's default name-hash
+ algorithm.
++
+Incompatible with `--delta-islands`, `--shallow`, or `--filter`. The
+`--use-bitmap-index` option will be ignored in the presence of
+`--path-walk.`
+
DELTA ISLANDS
-------------
diff --git a/Documentation/git-pack-refs.adoc b/Documentation/git-pack-refs.adoc
index 652c549..42b9005 100644
--- a/Documentation/git-pack-refs.adoc
+++ b/Documentation/git-pack-refs.adoc
@@ -66,7 +66,10 @@
behavior depends on the ref format used by the repository and may change in the
future.
+
- - "files": No special handling for `--auto` has been implemented.
+ - "files": Loose references are packed into the `packed-refs` file
+ based on the ratio of loose references to the size of the
+ `packed-refs` file. The bigger the `packed-refs` file, the more loose
+ references need to exist before we repack.
+
- "reftable": Tables are compacted such that they form a geometric
sequence. For two tables N and N+1, where N+1 is newer, this
diff --git a/Documentation/git-repack.adoc b/Documentation/git-repack.adoc
index e1cd75e..d12c498 100644
--- a/Documentation/git-repack.adoc
+++ b/Documentation/git-repack.adoc
@@ -11,7 +11,7 @@
[verse]
'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
- [--write-midx] [--name-hash-version=<n>]
+ [--write-midx] [--name-hash-version=<n>] [--path-walk]
DESCRIPTION
-----------
@@ -258,6 +258,9 @@
Provide this argument to the underlying `git pack-objects` process.
See linkgit:git-pack-objects[1] for full details.
+--path-walk::
+ Pass the `--path-walk` option to the underlying `git pack-objects`
+ process. See linkgit:git-pack-objects[1] for full details.
CONFIGURATION
-------------
diff --git a/Documentation/git-reset.adoc b/Documentation/git-reset.adoc
index 53ab88c..50e8a0b 100644
--- a/Documentation/git-reset.adoc
+++ b/Documentation/git-reset.adoc
@@ -125,6 +125,8 @@
separated with _NUL_ character and all other characters are taken
literally (including newlines and quotes).
+include::diff-context-options.adoc[]
+
`--`::
Do not interpret any more arguments as options.
diff --git a/Documentation/git-restore.adoc b/Documentation/git-restore.adoc
index 877b777..961eef0 100644
--- a/Documentation/git-restore.adoc
+++ b/Documentation/git-restore.adoc
@@ -28,8 +28,6 @@
See "Reset, restore and revert" in linkgit:git[1] for the differences
between the three commands.
-THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
-
OPTIONS
-------
`-s <tree>`::
@@ -52,6 +50,8 @@
Mode" section of linkgit:git-add[1] to learn how to operate
the `--patch` mode.
+include::diff-context-options.adoc[]
+
`-W`::
`--worktree`::
`-S`::
diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
index 26fda63..5335502 100644
--- a/Documentation/git-send-email.adoc
+++ b/Documentation/git-send-email.adoc
@@ -21,7 +21,7 @@
Patches can be specified as files, directories (which will send all
files in the directory), or directly as a revision list. In the
last case, any format accepted by linkgit:git-format-patch[1] can
-be passed to git send-email, as well as options understood by
+be passed to `git send-email`, as well as options understood by
linkgit:git-format-patch[1].
The header of the email is configurable via command-line options. If not
@@ -35,11 +35,11 @@
This is what linkgit:git-format-patch[1] generates. Most headers and MIME
formatting are ignored.
-2. The original format used by Greg Kroah-Hartman's 'send_lots_of_email.pl'
+2. The original format used by Greg Kroah-Hartman's `send_lots_of_email.pl`
script
+
-This format expects the first line of the file to contain the "Cc:" value
-and the "Subject:" of the message as the second line.
+This format expects the first line of the file to contain the `Cc:` value
+and the `Subject:` of the message as the second line.
OPTIONS
@@ -54,13 +54,13 @@
`sendemail.multiEdit`.
--bcc=<address>,...::
- Specify a "Bcc:" value for each email. Default is the value of
+ Specify a `Bcc:` value for each email. Default is the value of
`sendemail.bcc`.
+
This option may be specified multiple times.
--cc=<address>,...::
- Specify a starting "Cc:" value for each email.
+ Specify a starting `Cc:` value for each email.
Default is the value of `sendemail.cc`.
+
This option may be specified multiple times.
@@ -69,14 +69,14 @@
Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1])
to edit an introductory message for the patch series.
+
-When `--compose` is used, git send-email will use the From, To, Cc, Bcc,
-Subject, Reply-To, and In-Reply-To headers specified in the message. If
-the body of the message (what you type after the headers and a blank
-line) only contains blank (or Git: prefixed) lines, the summary won't be
+When `--compose` is used, `git send-email` will use the `From`, `To`, `Cc`,
+`Bcc`, `Subject`, `Reply-To`, and `In-Reply-To` headers specified in the
+message. If the body of the message (what you type after the headers and a
+blank line) only contains blank (or `Git:` prefixed) lines, the summary won't be
sent, but the headers mentioned above will be used unless they are
removed.
+
-Missing From or In-Reply-To headers will be prompted for.
+Missing `From` or `In-Reply-To` headers will be prompted for.
+
See the CONFIGURATION section for `sendemail.multiEdit`.
@@ -85,13 +85,13 @@
the value of the `sendemail.from` configuration option is used. If
neither the command-line option nor `sendemail.from` are set, then the
user will be prompted for the value. The default for the prompt will be
- the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
- set, as returned by "git var -l".
+ the value of `GIT_AUTHOR_IDENT`, or `GIT_COMMITTER_IDENT` if that is not
+ set, as returned by `git var -l`.
--reply-to=<address>::
Specify the address where replies from recipients should go to.
Use this if replies to messages should go to another address than what
- is specified with the --from parameter.
+ is specified with the `--from` parameter.
--in-reply-to=<identifier>::
Make the first mail (or all the mails with `--no-thread`) appear as a
@@ -112,14 +112,14 @@
[PATCH v2 2/3] New tests
[PATCH v2 3/3] Implementation
+
-Only necessary if --compose is also set. If --compose
+Only necessary if `--compose` is also set. If `--compose`
is not set, this will be prompted for.
--[no-]outlook-id-fix::
Microsoft Outlook SMTP servers discard the Message-ID sent via email and
assign a new random Message-ID, thus breaking threads.
+
-With `--outlook-id-fix`, 'git send-email' uses a mechanism specific to
+With `--outlook-id-fix`, `git send-email` uses a mechanism specific to
Outlook servers to learn the Message-ID the server assigned to fix the
threading. Use it only when you know that the server reports the
rewritten Message-ID the same way as Outlook servers do.
@@ -130,14 +130,14 @@
--subject=<string>::
Specify the initial subject of the email thread.
- Only necessary if --compose is also set. If --compose
+ Only necessary if `--compose` is also set. If `--compose`
is not set, this will be prompted for.
--to=<address>,...::
Specify the primary recipient of the emails generated. Generally, this
will be the upstream maintainer of the project involved. Default is the
value of the `sendemail.to` configuration value; if that is unspecified,
- and --to-cmd is not specified, this will be prompted for.
+ and `--to-cmd` is not specified, this will be prompted for.
+
This option may be specified multiple times.
@@ -145,30 +145,30 @@
When encountering a non-ASCII message or subject that does not
declare its encoding, add headers/quoting to indicate it is
encoded in <encoding>. Default is the value of the
- 'sendemail.assume8bitEncoding'; if that is unspecified, this
+ `sendemail.assume8bitEncoding`; if that is unspecified, this
will be prompted for if any non-ASCII files are encountered.
+
Note that no attempts whatsoever are made to validate the encoding.
--compose-encoding=<encoding>::
Specify encoding of compose message. Default is the value of the
- 'sendemail.composeEncoding'; if that is unspecified, UTF-8 is assumed.
+ `sendemail.composeEncoding`; if that is unspecified, UTF-8 is assumed.
--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)::
Specify the transfer encoding to be used to send the message over SMTP.
- 7bit will fail upon encountering a non-ASCII message. quoted-printable
+ `7bit` will fail upon encountering a non-ASCII message. `quoted-printable`
can be useful when the repository contains files that contain carriage
- returns, but makes the raw patch email file (as saved from a MUA) much
- harder to inspect manually. base64 is even more fool proof, but also
- even more opaque. auto will use 8bit when possible, and quoted-printable
- otherwise.
+ returns, but makes the raw patch email file (as saved from an MUA) much
+ harder to inspect manually. `base64` is even more fool proof, but also
+ even more opaque. `auto` will use `8bit` when possible, and
+ `quoted-printable` otherwise.
+
Default is the value of the `sendemail.transferEncoding` configuration
value; if that is unspecified, default to `auto`.
--xmailer::
--no-xmailer::
- Add (or prevent adding) the "X-Mailer:" header. By default,
+ Add (or prevent adding) the `X-Mailer:` header. By default,
the header is added, but it can be turned off by setting the
`sendemail.xmailer` configuration variable to `false`.
@@ -178,9 +178,9 @@
--envelope-sender=<address>::
Specify the envelope sender used to send the emails.
This is useful if your default address is not the address that is
- subscribed to a list. In order to use the 'From' address, set the
- value to "auto". If you use the sendmail binary, you must have
- suitable privileges for the -f parameter. Default is the value of the
+ subscribed to a list. In order to use the `From` address, set the
+ value to `auto`. If you use the `sendmail` binary, you must have
+ suitable privileges for the `-f` parameter. Default is the value of the
`sendemail.envelopeSender` configuration variable; if that is
unspecified, choosing the envelope sender is left to your MTA.
@@ -189,27 +189,27 @@
be sendmail-like; specifically, it must support the `-i` option.
The command will be executed in the shell if necessary. Default
is the value of `sendemail.sendmailCmd`. If unspecified, and if
- --smtp-server is also unspecified, git-send-email will search
- for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
+ `--smtp-server` is also unspecified, `git send-email` will search
+ for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH`.
--smtp-encryption=<encryption>::
Specify in what way encrypting begins for the SMTP connection.
- Valid values are 'ssl' and 'tls'. Any other value reverts to plain
+ Valid values are `ssl` and `tls`. Any other value reverts to plain
(unencrypted) SMTP, which defaults to port 25.
Despite the names, both values will use the same newer version of TLS,
- but for historic reasons have these names. 'ssl' refers to "implicit"
+ but for historic reasons have these names. `ssl` refers to "implicit"
encryption (sometimes called SMTPS), that uses port 465 by default.
- 'tls' refers to "explicit" encryption (often known as STARTTLS),
+ `tls` refers to "explicit" encryption (often known as STARTTLS),
that uses port 25 by default. Other ports might be used by the SMTP
server, which are not the default. Commonly found alternative port for
- 'tls' and unencrypted is 587. You need to check your provider's
+ `tls` and unencrypted is 587. You need to check your provider's
documentation or your server configuration to make sure
for your own case. Default is the value of `sendemail.smtpEncryption`.
--smtp-domain=<FQDN>::
Specifies the Fully Qualified Domain Name (FQDN) used in the
HELO/EHLO command to the SMTP server. Some servers require the
- FQDN to match your IP address. If not set, git send-email attempts
+ FQDN to match your IP address. If not set, `git send-email` attempts
to determine your FQDN automatically. Default is the value of
`sendemail.smtpDomain`.
@@ -223,10 +223,10 @@
+
If at least one of the specified mechanisms matches the ones advertised by the
SMTP server and if it is supported by the utilized SASL library, the mechanism
-is used for authentication. If neither 'sendemail.smtpAuth' nor `--smtp-auth`
+is used for authentication. If neither `sendemail.smtpAuth` nor `--smtp-auth`
is specified, all mechanisms supported by the SASL library can be used. The
-special value 'none' maybe specified to completely disable authentication
-independently of `--smtp-user`
+special value `none` maybe specified to completely disable authentication
+independently of `--smtp-user`.
--smtp-pass[=<password>]::
Password for SMTP-AUTH. The argument is optional: If no
@@ -238,16 +238,16 @@
or on the command line. If a username has been specified (with
`--smtp-user` or a `sendemail.smtpUser`), but no password has been
specified (with `--smtp-pass` or `sendemail.smtpPass`), then
-a password is obtained using 'git-credential'.
+a password is obtained using linkgit:git-credential[1].
--no-smtp-auth::
- Disable SMTP authentication. Short hand for `--smtp-auth=none`
+ Disable SMTP authentication. Short hand for `--smtp-auth=none`.
--smtp-server=<host>::
If set, specifies the outgoing SMTP server to use (e.g.
`smtp.example.com` or a raw IP address). If unspecified, and if
`--sendmail-cmd` is also unspecified, the default is to search
- for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a
+ for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a
program is available, falling back to `localhost` otherwise.
+
For backward compatibility, this option can also specify a full pathname
@@ -260,7 +260,7 @@
Specifies a port different from the default port (SMTP
servers typically listen to smtp port 25, but may also listen to
submission port 587, or the common SSL smtp port 465);
- symbolic port names (e.g. "submission" instead of 587)
+ symbolic port names (e.g. `submission` instead of 587)
are also accepted. The port can also be set with the
`sendemail.smtpServerPort` configuration variable.
@@ -269,23 +269,25 @@
Default value can be specified by the `sendemail.smtpServerOption`
configuration option.
+
-The --smtp-server-option option must be repeated for each option you want
+The `--smtp-server-option` option must be repeated for each option you want
to pass to the server. Likewise, different lines in the configuration files
must be used for each option.
--smtp-ssl::
- Legacy alias for '--smtp-encryption ssl'.
+ Legacy alias for `--smtp-encryption ssl`.
--smtp-ssl-cert-path::
Path to a store of trusted CA certificates for SMTP SSL/TLS
certificate validation (either a directory that has been processed
- by 'c_rehash', or a single file containing one or more PEM format
- certificates concatenated together: see verify(1) -CAfile and
- -CApath for more information on these). Set it to an empty string
- to disable certificate verification. Defaults to the value of the
- `sendemail.smtpSSLCertPath` configuration variable, if set, or the
- backing SSL library's compiled-in default otherwise (which should
- be the best choice on most platforms).
+ by `c_rehash`, or a single file containing one or more PEM format
+ certificates concatenated together: see the description of the
+ `-CAfile` _<file>_ and the `-CApath` _<dir>_ options of
+ https://docs.openssl.org/master/man1/openssl-verify/
+ [OpenSSL's verify(1) manual page] for more information on these).
+ Set it to an empty string to disable certificate verification.
+ Defaults to the value of the `sendemail.smtpSSLCertPath` configuration
+ variable, if set, or the backing SSL library's compiled-in default
+ otherwise (which should be the best choice on most platforms).
--smtp-user=<user>::
Username for SMTP-AUTH. Default is the value of `sendemail.smtpUser`;
@@ -298,18 +300,18 @@
connection and authentication problems.
--batch-size=<num>::
- Some email servers (e.g. smtp.163.com) limit the number emails to be
+ Some email servers (e.g. 'smtp.163.com') limit the number of emails to be
sent per session (connection) and this will lead to a failure when
sending many messages. With this option, send-email will disconnect after
- sending $<num> messages and wait for a few seconds (see --relogin-delay)
- and reconnect, to work around such a limit. You may want to
- use some form of credential helper to avoid having to retype
- your password every time this happens. Defaults to the
+ sending _<num>_ messages and wait for a few seconds
+ (see `--relogin-delay`) and reconnect, to work around such a limit.
+ You may want to use some form of credential helper to avoid having to
+ retype your password every time this happens. Defaults to the
`sendemail.smtpBatchSize` configuration variable.
--relogin-delay=<int>::
- Waiting $<int> seconds before reconnecting to SMTP server. Used together
- with --batch-size option. Defaults to the `sendemail.smtpReloginDelay`
+ Waiting _<int>_ seconds before reconnecting to SMTP server. Used together
+ with `--batch-size` option. Defaults to the `sendemail.smtpReloginDelay`
configuration variable.
Automating
@@ -318,7 +320,7 @@
--no-to::
--no-cc::
--no-bcc::
- Clears any list of "To:", "Cc:", "Bcc:" addresses previously
+ Clears any list of `To:`, `Cc:`, `Bcc:` addresses previously
set via config.
--no-identity::
@@ -327,13 +329,13 @@
--to-cmd=<command>::
Specify a command to execute once per patch file which
- should generate patch file specific "To:" entries.
+ should generate patch file specific `To:` entries.
Output of this command must be single email address per line.
- Default is the value of 'sendemail.toCmd' configuration value.
+ Default is the value of `sendemail.toCmd` configuration value.
--cc-cmd=<command>::
Specify a command to execute once per patch file which
- should generate patch file specific "Cc:" entries.
+ should generate patch file specific `Cc:` entries.
Output of this command must be single email address per line.
Default is the value of `sendemail.ccCmd` configuration value.
@@ -341,7 +343,7 @@
Specify a command that is executed once per outgoing message
and output RFC 2822 style header lines to be inserted into
them. When the `sendemail.headerCmd` configuration variable is
- set, its value is always used. When --header-cmd is provided
+ set, its value is always used. When `--header-cmd` is provided
at the command line, its value takes precedence over the
`sendemail.headerCmd` configuration variable.
@@ -350,7 +352,7 @@
--[no-]chain-reply-to::
If this is set, each email will be sent as a reply to the previous
- email sent. If disabled with "--no-chain-reply-to", all emails after
+ email sent. If disabled with `--no-chain-reply-to`, all emails after
the first will be sent as replies to the first email sent. When using
this, it is recommended that the first file given be an overview of the
entire patch series. Disabled by default, but the `sendemail.chainReplyTo`
@@ -358,79 +360,80 @@
--identity=<identity>::
A configuration identity. When given, causes values in the
- 'sendemail.<identity>' subsection to take precedence over
- values in the 'sendemail' section. The default identity is
+ `sendemail.<identity>` subsection to take precedence over
+ values in the `sendemail` section. The default identity is
the value of `sendemail.identity`.
--[no-]signed-off-by-cc::
- If this is set, add emails found in the `Signed-off-by` trailer or Cc: lines to the
- cc list. Default is the value of `sendemail.signedOffByCc` configuration
- value; if that is unspecified, default to --signed-off-by-cc.
+ If this is set, add emails found in the `Signed-off-by` trailer or `Cc:`
+ lines to the cc list. Default is the value of `sendemail.signedOffByCc`
+ configuration value; if that is unspecified, default to
+ `--signed-off-by-cc`.
--[no-]cc-cover::
- If this is set, emails found in Cc: headers in the first patch of
+ If this is set, emails found in `Cc:` headers in the first patch of
the series (typically the cover letter) are added to the cc list
- for each email set. Default is the value of 'sendemail.ccCover'
- configuration value; if that is unspecified, default to --no-cc-cover.
+ for each email set. Default is the value of `sendemail.ccCover`
+ configuration value; if that is unspecified, default to `--no-cc-cover`.
--[no-]to-cover::
- If this is set, emails found in To: headers in the first patch of
+ If this is set, emails found in `To:` headers in the first patch of
the series (typically the cover letter) are added to the to list
- for each email set. Default is the value of 'sendemail.toCover'
- configuration value; if that is unspecified, default to --no-to-cover.
+ for each email set. Default is the value of `sendemail.toCover`
+ configuration value; if that is unspecified, default to `--no-to-cover`.
--suppress-cc=<category>::
Specify an additional category of recipients to suppress the
auto-cc of:
+
--
-- 'author' will avoid including the patch author.
-- 'self' will avoid including the sender.
-- 'cc' will avoid including anyone mentioned in Cc lines in the patch header
- except for self (use 'self' for that).
-- 'bodycc' will avoid including anyone mentioned in Cc lines in the
- patch body (commit message) except for self (use 'self' for that).
-- 'sob' will avoid including anyone mentioned in the Signed-off-by trailers except
- for self (use 'self' for that).
-- 'misc-by' will avoid including anyone mentioned in Acked-by,
+- `author` will avoid including the patch author.
+- `self` will avoid including the sender.
+- `cc` will avoid including anyone mentioned in Cc lines in the patch header
+ except for self (use `self` for that).
+- `bodycc` will avoid including anyone mentioned in Cc lines in the
+ patch body (commit message) except for self (use `self` for that).
+- `sob` will avoid including anyone mentioned in the Signed-off-by trailers except
+ for self (use `self` for that).
+- `misc-by` will avoid including anyone mentioned in Acked-by,
Reviewed-by, Tested-by and other "-by" lines in the patch body,
- except Signed-off-by (use 'sob' for that).
-- 'cccmd' will avoid running the --cc-cmd.
-- 'body' is equivalent to 'sob' + 'bodycc' + 'misc-by'.
-- 'all' will suppress all auto cc values.
+ except Signed-off-by (use `sob` for that).
+- `cccmd` will avoid running the --cc-cmd.
+- `body` is equivalent to `sob` + `bodycc` + `misc-by`.
+- `all` will suppress all auto cc values.
--
+
Default is the value of `sendemail.suppressCc` configuration value; if
-that is unspecified, default to 'self' if --suppress-from is
-specified, as well as 'body' if --no-signed-off-cc is specified.
+that is unspecified, default to `self` if `--suppress-from` is
+specified, as well as `body` if `--no-signed-off-cc` is specified.
--[no-]suppress-from::
- If this is set, do not add the From: address to the cc: list.
+ If this is set, do not add the `From:` address to the `Cc:` list.
Default is the value of `sendemail.suppressFrom` configuration
- value; if that is unspecified, default to --no-suppress-from.
+ value; if that is unspecified, default to `--no-suppress-from`.
--[no-]thread::
- If this is set, the In-Reply-To and References headers will be
+ If this is set, the `In-Reply-To` and `References` headers will be
added to each email sent. Whether each mail refers to the
- previous email (`deep` threading per 'git format-patch'
+ previous email (`deep` threading per `git format-patch`
wording) or to the first email (`shallow` threading) is
- governed by "--[no-]chain-reply-to".
+ governed by `--[no-]chain-reply-to`.
+
-If disabled with "--no-thread", those headers will not be added
-(unless specified with --in-reply-to). Default is the value of the
+If disabled with `--no-thread`, those headers will not be added
+(unless specified with `--in-reply-to`). Default is the value of the
`sendemail.thread` configuration value; if that is unspecified,
-default to --thread.
+default to `--thread`.
+
It is up to the user to ensure that no In-Reply-To header already
-exists when 'git send-email' is asked to add it (especially note that
-'git format-patch' can be configured to do the threading itself).
+exists when `git send-email` is asked to add it (especially note that
+`git format-patch` can be configured to do the threading itself).
Failure to do so may not produce the expected result in the
recipient's MUA.
--[no-]mailmap::
Use the mailmap file (see linkgit:gitmailmap[5]) to map all
addresses to their canonical real name and email address. Additional
- mailmap data specific to git-send-email may be provided using the
+ mailmap data specific to `git send-email` may be provided using the
`sendemail.mailmap.file` or `sendemail.mailmap.blob` configuration
values. Defaults to `sendemail.mailmap`.
@@ -441,17 +444,17 @@
Confirm just before sending:
+
--
-- 'always' will always confirm before sending
-- 'never' will never confirm before sending
-- 'cc' will confirm before sending when send-email has automatically
- added addresses from the patch to the Cc list
-- 'compose' will confirm before sending the first message when using --compose.
-- 'auto' is equivalent to 'cc' + 'compose'
+- `always` will always confirm before sending.
+- `never` will never confirm before sending.
+- `cc` will confirm before sending when send-email has automatically
+ added addresses from the patch to the Cc list.
+- `compose` will confirm before sending the first message when using --compose.
+- `auto` is equivalent to `cc` + `compose`.
--
+
Default is the value of `sendemail.confirm` configuration value; if that
-is unspecified, default to 'auto' unless any of the suppress options
-have been specified, in which case default to 'compose'.
+is unspecified, default to `auto` unless any of the suppress options
+have been specified, in which case default to `compose`.
--dry-run::
Do everything except actually send the emails.
@@ -460,10 +463,10 @@
When an argument may be understood either as a reference or as a file name,
choose to understand it as a format-patch argument (`--format-patch`)
or as a file name (`--no-format-patch`). By default, when such a conflict
- occurs, git send-email will fail.
+ occurs, `git send-email` will fail.
--quiet::
- Make git-send-email less verbose. One line per email should be
+ Make `git send-email` less verbose. One line per email should be
all that is output.
--[no-]validate::
@@ -474,7 +477,7 @@
* Invoke the sendemail-validate hook if present (see linkgit:githooks[5]).
* Warn of patches that contain lines longer than
998 characters unless a suitable transfer encoding
- ('auto', 'base64', or 'quoted-printable') is used;
+ (`auto`, `base64`, or `quoted-printable`) is used;
this is due to SMTP limits as described by
https://www.ietf.org/rfc/rfc5322.txt.
--
@@ -493,13 +496,13 @@
Instead of the normal operation, dump the shorthand alias names from
the configured alias file(s), one per line in alphabetical order. Note
that this only includes the alias name and not its expanded email addresses.
- See 'sendemail.aliasesFile' for more information about aliases.
+ See `sendemail.aliasesFile` for more information about aliases.
--translate-aliases::
Instead of the normal operation, read from standard input and
interpret each line as an email alias. Translate it according to the
configured alias file(s). Output each translated name and email
- address to standard output, one per line. See 'sendemail.aliasFile'
+ address to standard output, one per line. See `sendemail.aliasFile`
for more information about aliases.
CONFIGURATION
@@ -524,15 +527,18 @@
smtpServerPort = 587
----
+Gmail does not allow using your regular password for `git send-email`.
If you have multi-factor authentication set up on your Gmail account, you can
-generate an app-specific password for use with 'git send-email'. Visit
+generate an app-specific password for use with `git send-email`. Visit
https://security.google.com/settings/security/apppasswords to create it.
-You can also use OAuth2.0 authentication with Gmail. `OAUTHBEARER` and
-`XOAUTH2` are common methods used for this type of authentication. Gmail
-supports both of them. As an example, if you want to use `OAUTHBEARER`, edit
-your `~/.gitconfig` file and add `smtpAuth = OAUTHBEARER` to your account
-settings:
+Alternatively, instead of using an app-specific password, you can use
+OAuth2.0 authentication with Gmail. OAuth2.0 is more secure than
+app-specific passwords, and works regardless of whether you have multi-factor
+authentication set up. `OAUTHBEARER` and `XOAUTH2` are common mechanisms used
+for this type of authentication. Gmail supports both of them. As an example,
+if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
+`smtpAuth = OAUTHBEARER` to your account settings:
----
[sendemail]
@@ -543,11 +549,15 @@
smtpAuth = OAUTHBEARER
----
+Another alternative is using a tool developed by Google known as
+https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail[sendgmail]
+to send emails using `git send-email`.
+
Use Microsoft Outlook as the SMTP Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike Gmail, Microsoft Outlook no longer supports app-specific passwords.
Therefore, OAuth2.0 authentication must be used for Outlook. Also, it only
-supports `XOAUTH2` authentication method.
+supports `XOAUTH2` authentication mechanism.
Edit `~/.gitconfig` to specify your account settings for Outlook and use its
SMTP server with `git send-email`:
@@ -579,8 +589,7 @@
If you are using OAuth2.0 authentication, you need to use an access token in
place of a password when prompted. Various OAuth2.0 token generators are
-available online. Community maintained credential helpers for Gmail and Outlook
-are also available:
+available online. Community maintained credential helpers are also available:
- https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail]
(cross platform, dedicated helper for authenticating Gmail accounts)
@@ -588,15 +597,65 @@
- https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook]
(cross platform, dedicated helper for authenticating Microsoft Outlook accounts)
+ - https://github.com/AdityaGarg8/git-credential-email[git-credential-yahoo]
+ (cross platform, dedicated helper for authenticating Yahoo accounts)
+
+ - https://github.com/AdityaGarg8/git-credential-email[git-credential-aol]
+ (cross platform, dedicated helper for authenticating AOL accounts)
+
You can also see linkgit:gitcredentials[7] for more OAuth based authentication
helpers.
+Proton Mail does not provide an SMTP server to send emails. If you are a paid
+customer of Proton Mail, you can use
+https://proton.me/mail/bridge[Proton Mail Bridge]
+officially provided by Proton Mail to create a local SMTP server for sending
+emails. For both free and paid users, community maintained projects like
+https://github.com/AdityaGarg8/git-credential-email[git-protonmail] can be
+used.
+
Note: the following core Perl modules that may be installed with your
distribution of Perl are required:
-MIME::Base64, MIME::QuotedPrint, Net::Domain and Net::SMTP.
-These additional Perl modules are also required:
-Authen::SASL and Mail::Address.
+https://metacpan.org/pod/MIME::Base64[MIME::Base64],
+https://metacpan.org/pod/MIME::QuotedPrint[MIME::QuotedPrint],
+https://metacpan.org/pod/Net::Domain[Net::Domain] and
+https://metacpan.org/pod/Net::SMTP[Net::SMTP].
+
+These additional Perl modules are also required:
+
+https://metacpan.org/pod/Authen::SASL[Authen::SASL] and
+https://metacpan.org/pod/Mail::Address[Mail::Address].
+
+Exploiting the `sendmailCmd` option of `git send-email`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Apart from sending emails via an SMTP server, `git send-email` can also send
+emails through any application that supports sendmail-like commands. You can
+read documentation of `--sendmail-cmd=<command>` above for more information.
+This ability can be very useful if you want to use another application as an
+SMTP client for `git send-email`, or if your email provider uses proprietary
+APIs instead of SMTP to send emails.
+
+As an example, lets see how to configure https://marlam.de/msmtp/[msmtp], a
+popular SMTP client found in many Linux distributions. Edit `~/.gitconfig`
+to instruct `git-send-email` to use it for sending emails.
+
+----
+[sendemail]
+ sendmailCmd = /usr/bin/msmtp # Change this to the path where msmtp is installed
+----
+
+Links of a few such community maintained helpers are:
+
+ - https://marlam.de/msmtp/[msmtp]
+ (popular SMTP client with many features, available for Linux and macOS)
+
+ - https://github.com/AdityaGarg8/git-credential-email[git-protonmail]
+ (cross platform client that can send emails using the ProtonMail API)
+
+ - https://github.com/AdityaGarg8/git-credential-email[git-msgraph]
+ (cross platform client that can send emails using the Microsoft Graph API)
SEE ALSO
--------
diff --git a/Documentation/git-stash.adoc b/Documentation/git-stash.adoc
index 1a5177f..e2300a1 100644
--- a/Documentation/git-stash.adoc
+++ b/Documentation/git-stash.adoc
@@ -23,6 +23,8 @@
'git stash' clear
'git stash' create [<message>]
'git stash' store [(-m | --message) <message>] [-q | --quiet] <commit>
+'git stash' export (--print | --to-ref <ref>) [<stash>...]
+'git stash' import <commit>
DESCRIPTION
-----------
@@ -154,6 +156,18 @@
reflog. This is intended to be useful for scripts. It is
probably not the command you want to use; see "push" above.
+export ( --print | --to-ref <ref> ) [<stash>...]::
+
+ Export the specified stashes, or all of them if none are specified, to
+ a chain of commits which can be transferred using the normal fetch and
+ push mechanisms, then imported using the `import` subcommand.
+
+import <commit>::
+
+ Import the specified stashes from the specified commit, which must have been
+ created by `export`, and add them to the list of stashes. To replace the
+ existing stashes, use `clear` first.
+
OPTIONS
-------
-a::
@@ -208,6 +222,8 @@
The `--patch` option implies `--keep-index`. You can use
`--no-keep-index` to override this.
+include::diff-context-options.adoc[]
+
-S::
--staged::
This option is only valid for `push` and `save` commands.
@@ -242,6 +258,19 @@
+
Quiet, suppress feedback messages.
+--print::
+ This option is only valid for the `export` command.
++
+Create the chain of commits representing the exported stashes without
+storing it anywhere in the ref namespace and print the object ID to
+standard output. This is designed for scripts.
+
+--to-ref::
+ This option is only valid for the `export` command.
++
+Create the chain of commits representing the exported stashes and store
+it to the specified ref.
+
\--::
This option is only valid for `push` command.
+
@@ -259,7 +288,7 @@
<stash>::
This option is only valid for `apply`, `branch`, `drop`, `pop`,
- `show` commands.
+ `show`, and `export` commands.
+
A reference of the form `stash@{<revision>}`. When no `<stash>` is
given, the latest stash is assumed (that is, `stash@{0}`).
diff --git a/Documentation/git-submodule.adoc b/Documentation/git-submodule.adoc
index 87d8e0f..503c84a 100644
--- a/Documentation/git-submodule.adoc
+++ b/Documentation/git-submodule.adoc
@@ -307,6 +307,13 @@
--force::
This option is only valid for add, deinit and update commands.
When running add, allow adding an otherwise ignored submodule path.
+ This option is also used to bypass a check that the submodule's name
+ is not already in use. By default, 'git submodule add' will fail if
+ the proposed name (which is derived from the path) is already registered
+ for another submodule in the repository. Using '--force' allows the command
+ to proceed by automatically generating a unique name by appending a number
+ to the conflicting name (e.g., if a submodule named 'child' exists, it will
+ try 'child1', and so on).
When running deinit the submodule working trees will be removed even
if they contain local changes.
When running update (only effective with the checkout procedure),
diff --git a/Documentation/git-switch.adoc b/Documentation/git-switch.adoc
index 9f62abf..87707e9 100644
--- a/Documentation/git-switch.adoc
+++ b/Documentation/git-switch.adoc
@@ -29,8 +29,6 @@
however if the operation leads to loss of local changes, unless told
otherwise with `--discard-changes` or `--merge`.
-THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
-
OPTIONS
-------
_<branch>_::
diff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc
index 8e55e0b..d214840 100644
--- a/Documentation/git-whatchanged.adoc
+++ b/Documentation/git-whatchanged.adoc
@@ -8,8 +8,14 @@
SYNOPSIS
--------
-[verse]
-'git whatchanged' <option>...
+[synopsis]
+git whatchanged <option>...
+
+WARNING
+-------
+`git whatchanged` has been deprecated and is scheduled for removal in
+a future version of Git, as it is merely `git log` with different
+default; `whatchanged` is not even shorter to type than `log --raw`.
DESCRIPTION
-----------
diff --git a/Documentation/gitcredentials.adoc b/Documentation/gitcredentials.adoc
index b49923d..3337bb4 100644
--- a/Documentation/gitcredentials.adoc
+++ b/Documentation/gitcredentials.adoc
@@ -133,10 +133,6 @@
- https://github.com/hickford/git-credential-oauth[git-credential-oauth] (cross platform, included in many Linux distributions)
- - https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail] (cross platform, dedicated helper to authenticate Gmail accounts for linkgit:git-send-email[1])
-
- - https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook] (cross platform, dedicated helper to authenticate Microsoft Outlook accounts for linkgit:git-send-email[1])
-
CREDENTIAL CONTEXTS
-------------------
diff --git a/Documentation/gitprotocol-v2.adoc b/Documentation/gitprotocol-v2.adoc
index 5598c93..9a57005 100644
--- a/Documentation/gitprotocol-v2.adoc
+++ b/Documentation/gitprotocol-v2.adoc
@@ -54,7 +54,7 @@
`version=2` through the respective side-channel for the transport being
used which inevitably sets `GIT_PROTOCOL`. More information can be
found in linkgit:gitprotocol-pack[5] and linkgit:gitprotocol-http[5], as well as the
-`GIT_PROTOCOL` definition in `git.txt`. In all cases the
+`GIT_PROTOCOL` definition in linkgit:git[1]. In all cases the
response from the server is the capability advertisement.
Git Transport
@@ -99,7 +99,7 @@
linkgit:git-upload-pack[1].
The server may need to be configured to pass this header's contents via
-the `GIT_PROTOCOL` variable. See the discussion in `git-http-backend.txt`.
+the `GIT_PROTOCOL` variable. See the discussion in linkgit:git-http-backend[1].
Capability Advertisement
------------------------
diff --git a/Documentation/gitremote-helpers.adoc b/Documentation/gitremote-helpers.adoc
index d0be008..39cdece 100644
--- a/Documentation/gitremote-helpers.adoc
+++ b/Documentation/gitremote-helpers.adoc
@@ -498,7 +498,7 @@
ask for the tag specifically. Some helpers may be able to
use this option to avoid a second network connection.
-'option dry-run' {'true'|'false'}:
+'option dry-run' {'true'|'false'}::
If true, pretend the operation completed successfully,
but don't actually change any repository data. For most
helpers this only applies to the 'push', if supported.
diff --git a/Documentation/glossary-content.adoc b/Documentation/glossary-content.adoc
index 575c18f..e423e47 100644
--- a/Documentation/glossary-content.adoc
+++ b/Documentation/glossary-content.adoc
@@ -418,9 +418,8 @@
- A leading "`**`" followed by a slash means match in all
directories. For example, "`**/foo`" matches file or directory
- "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
- matches file or directory "`bar`" anywhere that is directly
- under directory "`foo`".
+ "`foo`" anywhere. "`**/foo/bar`" matches file or directory "`bar`"
+ anywhere that is directly under directory "`foo`".
- A trailing "`/**`" matches everything inside. For example,
"`abc/**`" matches all files inside directory "abc", relative
diff --git a/Documentation/line-range-format.adoc b/Documentation/line-range-format.adoc
index 9b51e9f..3cc2a14 100644
--- a/Documentation/line-range-format.adoc
+++ b/Documentation/line-range-format.adoc
@@ -1,30 +1,30 @@
-'<start>' and '<end>' can take one of these forms:
+_<start>_ and _<end>_ can take one of these forms:
-- number
+- _<number>_
+
-If '<start>' or '<end>' is a number, it specifies an
+If _<start>_ or _<end>_ is a number, it specifies an
absolute line number (lines count from 1).
+
-- `/regex/`
+- `/<regex>/`
+
This form will use the first line matching the given
-POSIX regex. If '<start>' is a regex, it will search from the end of
+POSIX _<regex>_. If _<start>_ is a regex, it will search from the end of
the previous `-L` range, if any, otherwise from the start of file.
-If '<start>' is `^/regex/`, it will search from the start of file.
-If '<end>' is a regex, it will search
-starting at the line given by '<start>'.
+If _<start>_ is `^/<regex>/`, it will search from the start of file.
+If _<end>_ is a regex, it will search starting at the line given by
+_<start>_.
+
-- +offset or -offset
+- `+<offset>` or `-<offset>`
+
-This is only valid for '<end>' and will specify a number
-of lines before or after the line given by '<start>'.
+This is only valid for _<end>_ and will specify a number
+of lines before or after the line given by _<start>_.
+
-If `:<funcname>` is given in place of '<start>' and '<end>', it is a
+If `:<funcname>` is given in place of _<start>_ and _<end>_, it is a
regular expression that denotes the range from the first funcname line
-that matches '<funcname>', up to the next funcname line. `:<funcname>`
+that matches _<funcname>_, up to the next funcname line. `:<funcname>`
searches from the end of the previous `-L` range, if any, otherwise
from the start of file. `^:<funcname>` searches from the start of
file. The function names are determined in the same way as `git diff`
diff --git a/Documentation/line-range-options.adoc b/Documentation/line-range-options.adoc
index f275df3..c44ba05 100644
--- a/Documentation/line-range-options.adoc
+++ b/Documentation/line-range-options.adoc
@@ -1,12 +1,12 @@
--L<start>,<end>:<file>::
--L:<funcname>:<file>::
+`-L<start>,<end>:<file>`::
+`-L:<funcname>:<file>`::
- Trace the evolution of the line range given by '<start>,<end>',
- or by the function name regex '<funcname>', within the '<file>'. You may
+ Trace the evolution of the line range given by `<start>,<end>`,
+ or by the function name regex _<funcname>_, within the _<file>_. You may
not give any pathspec limiters. This is currently limited to
a walk starting from a single revision, i.e., you may only
give zero or one positive revision arguments, and
- '<start>' and '<end>' (or '<funcname>') must exist in the starting revision.
+ _<start>_ and _<end>_ (or _<funcname>_) must exist in the starting revision.
You can specify this option more than once. Implies `--patch`.
Patch output can be suppressed using `--no-patch`, but other diff formats
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 1433acf..4404c62 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -158,7 +158,6 @@
'git-verify-tag.adoc' : 1,
'git-version.adoc' : 1,
'git-web--browse.adoc' : 1,
- 'git-whatchanged.adoc' : 1,
'git-worktree.adoc' : 1,
'git-write-tree.adoc' : 1,
'git.adoc' : 1,
@@ -207,6 +206,7 @@
manpages_breaking_changes = {
'git-pack-redundant.adoc' : 1,
+ 'git-whatchanged.adoc' : 1,
}
if not get_option('breaking_changes')
@@ -375,8 +375,7 @@
output: fs.stem(manpage) + '.xml',
)
- manpage_path = fs.stem(manpage) + '.' + category.to_string()
- manpage_target = custom_target(
+ custom_target(
command: [
xmlto,
'-m', '@INPUT0@',
@@ -392,7 +391,7 @@
'manpage-normal.xsl',
'manpage-bold-literal.xsl',
],
- output: manpage_path,
+ output: fs.stem(manpage) + '.' + category.to_string(),
install: true,
install_dir: get_option('mandir') / 'man' + category.to_string(),
)
diff --git a/Documentation/pretty-formats.adoc b/Documentation/pretty-formats.adoc
index 07475de..9ed0417 100644
--- a/Documentation/pretty-formats.adoc
+++ b/Documentation/pretty-formats.adoc
@@ -2,11 +2,11 @@
--------------
If the commit is a merge, and if the pretty-format
-is not 'oneline', 'email' or 'raw', an additional line is
-inserted before the 'Author:' line. This line begins with
+is not `oneline`, `email` or `raw`, an additional line is
+inserted before the `Author:` line. This line begins with
"Merge: " and the hashes of ancestral commits are printed,
separated by spaces. Note that the listed commits may not
-necessarily be the list of the *direct* parent commits if you
+necessarily be the list of the 'direct' parent commits if you
have limited your view of history: for example, if you are
only interested in changes related to a certain directory or
file.
@@ -14,24 +14,24 @@
There are several built-in formats, and you can define
additional formats by setting a pretty.<name>
config option to either another format name, or a
-'format:' string, as described below (see
+`format:` string, as described below (see
linkgit:git-config[1]). Here are the details of the
built-in formats:
-* 'oneline'
+* `oneline`
<hash> <title-line>
+
This is designed to be as compact as possible.
-* 'short'
+* `short`
commit <hash>
Author: <author>
<title-line>
-* 'medium'
+* `medium`
commit <hash>
Author: <author>
@@ -41,7 +41,7 @@
<full-commit-message>
-* 'full'
+* `full`
commit <hash>
Author: <author>
@@ -51,7 +51,7 @@
<full-commit-message>
-* 'fuller'
+* `fuller`
commit <hash>
Author: <author>
@@ -63,18 +63,18 @@
<full-commit-message>
-* 'reference'
+* `reference`
<abbrev-hash> (<title-line>, <short-author-date>)
+
This format is used to refer to another commit in a commit message and
-is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`. By default,
+is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default,
the date is formatted with `--date=short` unless another `--date` option
is explicitly specified. As with any `format:` with format
placeholders, its output is not affected by other options like
`--decorate` and `--walk-reflogs`.
-* 'email'
+* `email`
From <hash> <date>
From: <author>
@@ -83,30 +83,30 @@
<full-commit-message>
-* 'mboxrd'
+* `mboxrd`
+
-Like 'email', but lines in the commit message starting with "From "
+Like `email`, but lines in the commit message starting with "From "
(preceded by zero or more ">") are quoted with ">" so they aren't
confused as starting a new commit.
-* 'raw'
+* `raw`
+
-The 'raw' format shows the entire commit exactly as
+The `raw` format shows the entire commit exactly as
stored in the commit object. Notably, the hashes are
-displayed in full, regardless of whether --abbrev or
---no-abbrev are used, and 'parents' information show the
+displayed in full, regardless of whether `--abbrev` or
+`--no-abbrev` are used, and 'parents' information show the
true parent commits, without taking grafts or history
simplification into account. Note that this format affects the way
commits are displayed, but not the way the diff is shown e.g. with
`git log --raw`. To get full object names in a raw diff format,
use `--no-abbrev`.
-* 'format:<format-string>'
+* `format:<format-string>`
+
-The 'format:<format-string>' format allows you to specify which information
+The `format:<format-string>` format allows you to specify which information
you want to show. It works a little bit like printf format,
-with the notable exception that you get a newline with '%n'
-instead of '\n'.
+with the notable exception that you get a newline with `%n`
+instead of `\n`.
+
E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"'
would show something like this:
@@ -120,158 +120,161 @@
The placeholders are:
- Placeholders that expand to a single literal character:
-'%n':: newline
-'%%':: a raw '%'
-'%x00':: '%x' followed by two hexadecimal digits is replaced with a
+++%n++:: newline
+++%%++:: a raw ++%++
+++%x00++:: ++%x++ followed by two hexadecimal digits is replaced with a
byte with the hexadecimal digits' value (we will call this
"literal formatting code" in the rest of this document).
- Placeholders that affect formatting of later placeholders:
-'%Cred':: switch color to red
-'%Cgreen':: switch color to green
-'%Cblue':: switch color to blue
-'%Creset':: reset color
-'%C(...)':: color specification, as described under Values in the
+++%Cred++:: switch color to red
+++%Cgreen++:: switch color to green
+++%Cblue++:: switch color to blue
+++%Creset++:: reset color
+++%C(++_<spec>_++)++:: color specification, as described under Values in the
"CONFIGURATION FILE" section of linkgit:git-config[1]. By
default, colors are shown only when enabled for log output
(by `color.diff`, `color.ui`, or `--color`, and respecting
the `auto` settings of the former if we are going to a
- terminal). `%C(auto,...)` is accepted as a historical
- synonym for the default (e.g., `%C(auto,red)`). Specifying
- `%C(always,...)` will show the colors even when color is
+ terminal). ++%C(auto,++_<spec>_++)++ is accepted as a historical
+ synonym for the default (e.g., ++%C(auto,red)++). Specifying
+ ++%C(always,++_<spec>_++)++ will show the colors even when color is
not otherwise enabled (though consider just using
- `--color=always` to enable color for the whole output,
+ `--color=always` to enable color for the whole output,
including this format and anything else git might color).
- `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
+ `auto` alone (i.e. ++%C(auto)++) will turn on auto coloring
on the next placeholders until the color is switched
again.
-'%m':: left (`<`), right (`>`) or boundary (`-`) mark
-'%w([<w>[,<i1>[,<i2>]]])':: switch line wrapping, like the -w option of
+++%m++:: left (`<`), right (`>`) or boundary (`-`) mark
+++%w(++`[<w>[,<i1>[,<i2>]]]`++)++:: switch line wrapping, like the `-w` option of
linkgit:git-shortlog[1].
-'%<( <N> [,trunc|ltrunc|mtrunc])':: make the next placeholder take at
+++%<(++`<n>[,(trunc|ltrunc|mtrunc)]`++)++:: make the next placeholder take at
least N column widths, padding spaces on
the right if necessary. Optionally
- truncate (with ellipsis '..') at the left (ltrunc) `..ft`,
+ truncate (with ellipsis `..`) at the left (ltrunc) `..ft`,
the middle (mtrunc) `mi..le`, or the end
(trunc) `rig..`, if the output is longer than
- N columns.
+ _<n>_ columns.
Note 1: that truncating
- only works correctly with N >= 2.
- Note 2: spaces around the N and M (see below)
+ only works correctly with _<n>_ >= 2.
+ Note 2: spaces around the _<n>_ and _<m>_ (see below)
values are optional.
Note 3: Emojis and other wide characters
will take two display columns, which may
over-run column boundaries.
Note 4: decomposed character combining marks
may be misplaced at padding boundaries.
-'%<|( <M> )':: make the next placeholder take at least until Mth
+++%<|(++_<m>_ ++)++:: make the next placeholder take at least until _<m>_ th
display column, padding spaces on the right if necessary.
- Use negative M values for column positions measured
+ Use negative _<m>_ values for column positions measured
from the right hand edge of the terminal window.
-'%>( <N> )', '%>|( <M> )':: similar to '%<( <N> )', '%<|( <M> )' respectively,
+++%>(++_<n>_++)++::
+++%>|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++ respectively,
but padding spaces on the left
-'%>>( <N> )', '%>>|( <M> )':: similar to '%>( <N> )', '%>|( <M> )'
+++%>>(++_<n>_++)++::
+++%>>|(++_<m>_++)++:: similar to ++%>(++_<n>_++)++, ++%>|(++_<m>_++)++
respectively, except that if the next
placeholder takes more spaces than given and
there are spaces on its left, use those
spaces
-'%><( <N> )', '%><|( <M> )':: similar to '%<( <N> )', '%<|( <M> )'
+++%><(++_<n>_++)++::
+++%><|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++
respectively, but padding both sides
(i.e. the text is centered)
- Placeholders that expand to information extracted from the commit:
-'%H':: commit hash
-'%h':: abbreviated commit hash
-'%T':: tree hash
-'%t':: abbreviated tree hash
-'%P':: parent hashes
-'%p':: abbreviated parent hashes
-'%an':: author name
-'%aN':: author name (respecting .mailmap, see linkgit:git-shortlog[1]
++%H+:: commit hash
++%h+:: abbreviated commit hash
++%T+:: tree hash
++%t+:: abbreviated tree hash
++%P+:: parent hashes
++%p+:: abbreviated parent hashes
++%an+:: author name
++%aN+:: author name (respecting .mailmap, see linkgit:git-shortlog[1]
or linkgit:git-blame[1])
-'%ae':: author email
-'%aE':: author email (respecting .mailmap, see linkgit:git-shortlog[1]
++%ae+:: author email
++%aE+:: author email (respecting .mailmap, see linkgit:git-shortlog[1]
or linkgit:git-blame[1])
-'%al':: author email local-part (the part before the '@' sign)
-'%aL':: author local-part (see '%al') respecting .mailmap, see
++%al+:: author email local-part (the part before the `@` sign)
++%aL+:: author local-part (see +%al+) respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-'%ad':: author date (format respects --date= option)
-'%aD':: author date, RFC2822 style
-'%ar':: author date, relative
-'%at':: author date, UNIX timestamp
-'%ai':: author date, ISO 8601-like format
-'%aI':: author date, strict ISO 8601 format
-'%as':: author date, short format (`YYYY-MM-DD`)
-'%ah':: author date, human style (like the `--date=human` option of
++%ad+:: author date (format respects --date= option)
++%aD+:: author date, RFC2822 style
++%ar+:: author date, relative
++%at+:: author date, UNIX timestamp
++%ai+:: author date, ISO 8601-like format
++%aI+:: author date, strict ISO 8601 format
++%as+:: author date, short format (`YYYY-MM-DD`)
++%ah+:: author date, human style (like the `--date=human` option of
linkgit:git-rev-list[1])
-'%cn':: committer name
-'%cN':: committer name (respecting .mailmap, see
++%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
++%ce+:: committer email
++%cE+:: committer email (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-'%cl':: committer email local-part (the part before the '@' sign)
-'%cL':: committer local-part (see '%cl') respecting .mailmap, see
++%cl+:: committer email local-part (the part before the `@` sign)
++%cL+:: committer local-part (see +%cl+) respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-'%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-like format
-'%cI':: committer date, strict ISO 8601 format
-'%cs':: committer date, short format (`YYYY-MM-DD`)
-'%ch':: committer date, human style (like the `--date=human` option of
++%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-like format
++%cI+:: committer date, strict ISO 8601 format
++%cs+:: committer date, short format (`YYYY-MM-DD`)
++%ch+:: committer date, human style (like the `--date=human` option of
linkgit:git-rev-list[1])
-'%d':: ref names, like the --decorate option of linkgit:git-log[1]
-'%D':: ref names without the " (", ")" wrapping.
-'%(decorate[:<options>])'::
++%d+:: ref names, like the --decorate option of linkgit:git-log[1]
++%D+:: ref names without the " (", ")" wrapping.
+++%(decorate++`[:<option>,...]`++)++::
ref names with custom decorations. The `decorate` string may be followed by a
colon and zero or more comma-separated options. Option values may contain
literal formatting codes. These must be used for commas (`%x2C`) and closing
parentheses (`%x29`), due to their role in the option syntax.
+
-** 'prefix=<value>': Shown before the list of ref names. Defaults to "{nbsp}`(`".
-** 'suffix=<value>': Shown after the list of ref names. Defaults to "`)`".
-** 'separator=<value>': Shown between ref names. Defaults to "`,`{nbsp}".
-** 'pointer=<value>': Shown between HEAD and the branch it points to, if any.
- Defaults to "{nbsp}`->`{nbsp}".
-** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}".
+** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}+(+".
+** `suffix=<value>`: Shown after the list of ref names. Defaults to "+)+".
+** `separator=<value>`: Shown between ref names. Defaults to "+,+{nbsp}".
+** `pointer=<value>`: Shown between HEAD and the branch it points to, if any.
+ Defaults to "{nbsp}+->+{nbsp}".
+** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}".
+
For example, to produce decorations with no wrapping
or tag annotations, and spaces as separators:
+
-`%(decorate:prefix=,suffix=,tag=,separator= )`
+++%(decorate:prefix=,suffix=,tag=,separator= )++
-'%(describe[:<options>])'::
+++%(describe++`[:<option>,...]`++)++::
human-readable name, like linkgit:git-describe[1]; empty string for
undescribable commits. The `describe` string may be followed by a colon and
zero or more comma-separated options. Descriptions can be inconsistent when
tags are added or removed at the same time.
+
-** 'tags[=<bool-value>]': Instead of only considering annotated tags,
+** `tags[=<bool-value>]`: Instead of only considering annotated tags,
consider lightweight tags as well.
-** 'abbrev=<number>': Instead of using the default number of hexadecimal digits
+** `abbrev=<number>`: Instead of using the default number of hexadecimal digits
(which will vary according to the number of objects in the repository with a
default of 7) of the abbreviated object name, use <number> digits, or as many
digits as needed to form a unique object name.
-** 'match=<pattern>': Only consider tags matching the given
- `glob(7)` pattern, excluding the "refs/tags/" prefix.
-** 'exclude=<pattern>': Do not consider tags matching the given
- `glob(7)` pattern, excluding the "refs/tags/" prefix.
+** `match=<pattern>`: Only consider tags matching the given
+ `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
+** `exclude=<pattern>`: Do not consider tags matching the given
+ `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
-'%S':: ref name given on the command line by which the commit was reached
++%S+:: ref name given on the command line by which the commit was reached
(like `git log --source`), only works with `git log`
-'%e':: encoding
-'%s':: subject
-'%f':: sanitized subject line, suitable for a filename
-'%b':: body
-'%B':: raw body (unwrapped subject and body)
++%e+:: encoding
++%s+:: subject
++%f+:: sanitized subject line, suitable for a filename
++%b+:: body
++%B+:: raw body (unwrapped subject and body)
ifndef::git-rev-list[]
-'%N':: commit notes
++%N+:: commit notes
endif::git-rev-list[]
-'%GG':: raw verification message from GPG for a signed commit
-'%G?':: show "G" for a good (valid) signature,
++%GG+:: raw verification message from GPG for a signed commit
++%G?+:: show "G" for a good (valid) signature,
"B" for a bad signature,
"U" for a good signature with unknown validity,
"X" for a good signature that has expired,
@@ -279,86 +282,86 @@
"R" for a good signature made by a revoked key,
"E" if the signature cannot be checked (e.g. missing key)
and "N" for no signature
-'%GS':: show the name of the signer for a signed commit
-'%GK':: show the key used to sign a signed commit
-'%GF':: show the fingerprint of the key used to sign a signed commit
-'%GP':: show the fingerprint of the primary key whose subkey was used
++%GS+:: show the name of the signer for a signed commit
++%GK+:: show the key used to sign a signed commit
++%GF+:: show the fingerprint of the key used to sign a signed commit
++%GP+:: show the fingerprint of the primary key whose subkey was used
to sign a signed commit
-'%GT':: show the trust level for the key used to sign a signed commit
-'%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
++%GT+:: show the trust level for the key used to sign a signed commit
++%gD+:: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
minutes ago}`; the format follows the rules described for the
`-g` option. The portion before the `@` is the refname as
given on the command line (so `git log -g refs/heads/master`
would yield `refs/heads/master@{0}`).
-'%gd':: shortened reflog selector; same as `%gD`, but the refname
++%gd+:: shortened reflog selector; same as `%gD`, but the refname
portion is shortened for human readability (so
`refs/heads/master` becomes just `master`).
-'%gn':: reflog identity name
-'%gN':: reflog identity name (respecting .mailmap, see
++%gn+:: reflog identity name
++%gN+:: reflog identity name (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-'%ge':: reflog identity email
-'%gE':: reflog identity email (respecting .mailmap, see
++%ge+:: reflog identity email
++%gE+:: reflog identity email (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-'%gs':: reflog subject
-'%(trailers[:<options>])'::
++%gs+:: reflog subject
+++%(trailers++`[:<option>,...]`++)++::
display the trailers of the body as interpreted by
linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
a colon and zero or more comma-separated options. If any option is provided
multiple times, the last occurrence wins.
+
-** 'key=<key>': only show trailers with specified <key>. Matching is done
+** `key=<key>`: only show trailers with specified <key>. Matching is done
case-insensitively and trailing colon is optional. If option is
given multiple times trailer lines matching any of the keys are
shown. This option automatically enables the `only` option so that
non-trailer lines in the trailer block are hidden. If that is not
desired it can be disabled with `only=false`. E.g.,
- `%(trailers:key=Reviewed-by)` shows trailer lines with key
+ +%(trailers:key=Reviewed-by)+ shows trailer lines with key
`Reviewed-by`.
-** 'only[=<bool>]': select whether non-trailer lines from the trailer
+** `only[=<bool>]`: select whether non-trailer lines from the trailer
block should be included.
-** 'separator=<sep>': specify the separator inserted between trailer
+** `separator=<sep>`: specify the separator inserted between trailer
lines. Defaults to a line feed character. The string <sep> may contain
the literal formatting codes described above. To use comma as
separator one must use `%x2C` as it would otherwise be parsed as
- next option. E.g., `%(trailers:key=Ticket,separator=%x2C )`
+ next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+
shows all trailer lines whose key is "Ticket" separated by a comma
and a space.
-** 'unfold[=<bool>]': make it behave as if interpret-trailer's `--unfold`
+** `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold`
option was given. E.g.,
- `%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
-** 'keyonly[=<bool>]': only show the key part of the trailer.
-** 'valueonly[=<bool>]': only show the value part of the trailer.
-** 'key_value_separator=<sep>': specify the separator inserted between
+ +%(trailers:only,unfold=true)+ unfolds and shows all trailer lines.
+** `keyonly[=<bool>]`: only show the key part of the trailer.
+** `valueonly[=<bool>]`: only show the value part of the trailer.
+** `key_value_separator=<sep>`: specify the separator inserted between
the key and value of each trailer. Defaults to ": ". Otherwise it
- shares the same semantics as 'separator=<sep>' above.
+ shares the same semantics as `separator=<sep>` above.
NOTE: Some placeholders may depend on other options given to the
-revision traversal engine. For example, the `%g*` reflog options will
+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` and `%D` placeholders will use the "short"
+`git log -g`). The +%d+ and +%D+ placeholders will use the "short"
decoration format if `--decorate` was not already provided on the command
line.
The boolean options accept an optional value `[=<bool-value>]`. The
-values taken by `--type=bool` git-config[1], like `yes` and `off`,
+values taken by `--type=bool` linkgit:git-config[1], like `yes` and `off`,
are all accepted. Giving a boolean option without `=<value>` is
equivalent to giving it with `=true`.
-If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
+If you add a `+` (plus sign) after +%+ of a placeholder, a line-feed
is inserted immediately before the expansion if and only if the
placeholder expands to a non-empty string.
-If you add a `-` (minus sign) after '%' of a placeholder, all consecutive
+If you add a `-` (minus sign) after +%+ of a placeholder, all consecutive
line-feeds immediately preceding the expansion are deleted if and only if the
placeholder expands to an empty string.
-If you add a ` ` (space) after '%' of a placeholder, a space
+If you add a `' '` (space) after +%+ of a placeholder, a space
is inserted immediately before the expansion if and only if the
placeholder expands to a non-empty string.
-* 'tformat:'
+* `tformat:`
+
-The 'tformat:' format works exactly like 'format:', except that it
+The `tformat:` format works exactly like `format:`, except that it
provides "terminator" semantics instead of "separator" semantics. In
other words, each commit has the message terminator character (usually a
newline) appended, rather than a separator placed between entries.
@@ -378,7 +381,7 @@
7134973
---------------------
+
-In addition, any unrecognized string that has a `%` in it is interpreted
+In addition, any unrecognized string that has a +%+ in it is interpreted
as if it has `tformat:` in front of it. For example, these two are
equivalent:
+
diff --git a/Documentation/pretty-options.adoc b/Documentation/pretty-options.adoc
index 23888cd..8aac51d 100644
--- a/Documentation/pretty-options.adoc
+++ b/Documentation/pretty-options.adoc
@@ -1,38 +1,38 @@
---pretty[=<format>]::
---format=<format>::
+`--pretty[=<format>]`::
+`--format=<format>`::
Pretty-print the contents of the commit logs in a given format,
- where '<format>' can be one of 'oneline', 'short', 'medium',
- 'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'
- and 'tformat:<string>'. When '<format>' is none of the above,
- and has '%placeholder' in it, it acts as if
- '--pretty=tformat:<format>' were given.
+ where '<format>' can be one of `oneline`, `short`, `medium`,
+ `full`, `fuller`, `reference`, `email`, `raw`, `format:<string>`
+ and `tformat:<string>`. When _<format>_ is none of the above,
+ and has `%<placeholder>` in it, it acts as if
+ `--pretty=tformat:<format>` were given.
+
See the "PRETTY FORMATS" section for some additional details for each
-format. When '=<format>' part is omitted, it defaults to 'medium'.
+format. When `=<format>` part is omitted, it defaults to `medium`.
+
-Note: you can specify the default pretty format in the repository
+NOTE: you can specify the default pretty format in the repository
configuration (see linkgit:git-config[1]).
---abbrev-commit::
+`--abbrev-commit`::
Instead of showing the full 40-byte hexadecimal commit object
name, show a prefix that names the object uniquely.
- "--abbrev=<n>" (which also modifies diff output, if it is displayed)
+ `--abbrev=<n>` (which also modifies diff output, if it is displayed)
option can be used to specify the minimum length of the prefix.
+
-This should make "--pretty=oneline" a whole lot more readable for
+This should make `--pretty=oneline` a whole lot more readable for
people using 80-column terminals.
---no-abbrev-commit::
+`--no-abbrev-commit`::
Show the full 40-byte hexadecimal commit object name. This negates
`--abbrev-commit`, either explicit or implied by other options such
- as "--oneline". It also overrides the `log.abbrevCommit` variable.
+ as `--oneline`. It also overrides the `log.abbrevCommit` variable.
---oneline::
- This is a shorthand for "--pretty=oneline --abbrev-commit"
+`--oneline`::
+ This is a shorthand for `--pretty=oneline --abbrev-commit`
used together.
---encoding=<encoding>::
+`--encoding=<encoding>`::
Commit objects record the character encoding used for the log message
in their encoding header; this option can be used to tell the
command to re-code the commit log message in the encoding
@@ -44,25 +44,30 @@
to convert the commit, we will quietly output the original
object verbatim.
---expand-tabs=<n>::
---expand-tabs::
---no-expand-tabs::
+`--expand-tabs=<n>`::
+`--expand-tabs`::
+`--no-expand-tabs`::
Perform a tab expansion (replace each tab with enough spaces
- to fill to the next display column that is a multiple of '<n>')
+ to fill to the next display column that is a multiple of _<n>_)
in the log message before showing it in the output.
`--expand-tabs` is a short-hand for `--expand-tabs=8`, and
`--no-expand-tabs` is a short-hand for `--expand-tabs=0`,
which disables tab expansion.
+
By default, tabs are expanded in pretty formats that indent the log
-message by 4 spaces (i.e. 'medium', which is the default, 'full',
-and 'fuller').
+message by 4 spaces (i.e. `medium`, which is the default, `full`,
+and `fuller`).
ifndef::git-rev-list[]
---notes[=<ref>]::
+`--notes[=<ref>]`::
Show the notes (see linkgit:git-notes[1]) that annotate the
commit, when showing the commit log message. This is the default
+ifndef::with-breaking-changes[]
for `git log`, `git show` and `git whatchanged` commands when
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ for `git log` and `git show` commands when
+endif::with-breaking-changes[]
there is no `--pretty`, `--format`, or `--oneline` option given
on the command line.
+
@@ -75,28 +80,29 @@
with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise
`refs/notes/` is prefixed to form the full name of the ref.
+
-Multiple --notes options can be combined to control which notes are
-being displayed. Examples: "--notes=foo" will show only notes from
-"refs/notes/foo"; "--notes=foo --notes" will show both notes from
+Multiple `--notes` options can be combined to control which notes are
+being displayed. Examples: "`--notes=foo`" will show only notes from
+`refs/notes/foo`; "`--notes=foo --notes`" will show both notes from
"refs/notes/foo" and from the default notes ref(s).
---no-notes::
+`--no-notes`::
Do not show notes. This negates the above `--notes` option, by
resetting the list of notes refs from which notes are shown.
Options are parsed in the order given on the command line, so e.g.
- "--notes --notes=foo --no-notes --notes=bar" will only show notes
- from "refs/notes/bar".
+ "`--notes --notes=foo --no-notes --notes=bar`" will only show notes
+ from `refs/notes/bar`.
---show-notes-by-default::
+`--show-notes-by-default`::
Show the default notes unless options for displaying specific
notes are given.
---show-notes[=<ref>]::
---[no-]standard-notes::
- These options are deprecated. Use the above --notes/--no-notes
+`--show-notes[=<ref>]`::
+`--standard-notes`::
+`--no-standard-notes`::
+ These options are deprecated. Use the above `--notes`/`--no-notes`
options instead.
endif::git-rev-list[]
---show-signature::
+`--show-signature`::
Check the validity of a signed commit object by passing the signature
to `gpg --verify` and show the output.
diff --git a/Documentation/rev-list-description.adoc b/Documentation/rev-list-description.adoc
index a9efa7f..82c680e 100644
--- a/Documentation/rev-list-description.adoc
+++ b/Documentation/rev-list-description.adoc
@@ -26,8 +26,8 @@
means "list all the commits which are reachable from 'foo' or 'bar', but
not from 'baz'".
-A special notation "'<commit1>'..'<commit2>'" can be used as a
-short-hand for "^'<commit1>' '<commit2>'". For example, either of
+A special notation "`<commit1>..<commit2>`" can be used as a
+short-hand for "`^<commit1> <commit2>`". For example, either of
the following may be used interchangeably:
ifdef::git-rev-list[]
@@ -43,7 +43,7 @@
-----------------------------------------------------------------------
endif::git-log[]
-Another special notation is "'<commit1>'...'<commit2>'" which is useful
+Another special notation is "`<commit1>...<commit2>`" which is useful
for merges. The resulting set of commits is the symmetric difference
between the two operands. The following two commands are equivalent:
diff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc
index d38875e..d9665d8 100644
--- a/Documentation/rev-list-options.adoc
+++ b/Documentation/rev-list-options.adoc
@@ -6,60 +6,60 @@
limiting may be applied.
Using more options generally further limits the output (e.g.
-`--since=<date1>` limits to commits newer than `<date1>`, and using it
+`--since=<date1>` limits to commits newer than _<date1>_, and using it
with `--grep=<pattern>` further limits to commits whose log message
-has a line that matches `<pattern>`), unless otherwise noted.
+has a line that matches _<pattern>_), unless otherwise noted.
Note that these are applied before commit
ordering and formatting options, such as `--reverse`.
--<number>::
--n <number>::
---max-count=<number>::
- Limit the number of commits to output.
+`-<number>`::
+`-n <number>`::
+`--max-count=<number>`::
+ Limit the output to _<number>_ commits.
---skip=<number>::
- Skip 'number' commits before starting to show the commit output.
+`--skip=<number>`::
+ Skip _<number>_ commits before starting to show the commit output.
---since=<date>::
---after=<date>::
- Show commits more recent than a specific date.
+`--since=<date>`::
+`--after=<date>`::
+ Show commits more recent than _<date>_.
---since-as-filter=<date>::
- Show all commits more recent than a specific date. This visits
+`--since-as-filter=<date>`::
+ Show all commits more recent than _<date>_. This visits
all commits in the range, rather than stopping at the first commit which
- is older than a specific date.
+ is older than _<date>_.
---until=<date>::
---before=<date>::
- Show commits older than a specific date.
+`--until=<date>`::
+`--before=<date>`::
+ Show commits older than _<date>_.
ifdef::git-rev-list[]
---max-age=<timestamp>::
---min-age=<timestamp>::
+`--max-age=<timestamp>`::
+`--min-age=<timestamp>`::
Limit the commits output to specified time range.
endif::git-rev-list[]
---author=<pattern>::
---committer=<pattern>::
+`--author=<pattern>`::
+`--committer=<pattern>`::
Limit the commits output to ones with author/committer
- header lines that match the specified pattern (regular
- expression). With more than one `--author=<pattern>`,
- commits whose author matches any of the given patterns are
+ header lines that match the _<pattern>_ regular
+ expression. With more than one `--author=<pattern>`,
+ commits whose author matches any of the _<pattern>_ are
chosen (similarly for multiple `--committer=<pattern>`).
---grep-reflog=<pattern>::
+`--grep-reflog=<pattern>`::
Limit the commits output to ones with reflog entries that
- match the specified pattern (regular expression). With
+ match the _<pattern>_ regular expression. With
more than one `--grep-reflog`, commits whose reflog message
matches any of the given patterns are chosen. It is an
error to use this option unless `--walk-reflogs` is in use.
---grep=<pattern>::
+`--grep=<pattern>`::
Limit the commits output to ones with a log message that
- matches the specified pattern (regular expression). With
+ matches the _<pattern>_ regular expression. With
more than one `--grep=<pattern>`, commits whose message
- matches any of the given patterns are chosen (but see
+ matches any of the _<pattern>_ are chosen (but see
`--all-match`).
ifndef::git-rev-list[]
+
@@ -67,35 +67,35 @@
matched as if it were part of the log message.
endif::git-rev-list[]
---all-match::
+`--all-match`::
Limit the commits output to ones that match all given `--grep`,
instead of ones that match at least one.
---invert-grep::
+`--invert-grep`::
Limit the commits output to ones with a log message that do not
- match the pattern specified with `--grep=<pattern>`.
+ match the _<pattern>_ specified with `--grep=<pattern>`.
--i::
---regexp-ignore-case::
+`-i`::
+`--regexp-ignore-case`::
Match the regular expression limiting patterns without regard to letter
case.
---basic-regexp::
+`--basic-regexp`::
Consider the limiting patterns to be basic regular expressions;
this is the default.
--E::
---extended-regexp::
+`-E`::
+`--extended-regexp`::
Consider the limiting patterns to be extended regular expressions
instead of the default basic regular expressions.
--F::
---fixed-strings::
+`-F`::
+`--fixed-strings`::
Consider the limiting patterns to be fixed strings (don't interpret
pattern as a regular expression).
--P::
---perl-regexp::
+`-P`::
+`--perl-regexp`::
Consider the limiting patterns to be Perl-compatible regular
expressions.
+
@@ -103,20 +103,20 @@
compile-time dependency. If Git wasn't compiled with support for them
providing this option will cause it to die.
---remove-empty::
+`--remove-empty`::
Stop when a given path disappears from the tree.
---merges::
+`--merges`::
Print only merge commits. This is exactly the same as `--min-parents=2`.
---no-merges::
+`--no-merges`::
Do not print commits with more than one parent. This is
exactly the same as `--max-parents=1`.
---min-parents=<number>::
---max-parents=<number>::
---no-min-parents::
---no-max-parents::
+`--min-parents=<number>`::
+`--max-parents=<number>`::
+`--no-min-parents`::
+`--no-max-parents`::
Show only commits which have at least (or at most) that many parent
commits. In particular, `--max-parents=1` is the same as `--no-merges`,
`--min-parents=2` is the same as `--merges`. `--max-parents=0`
@@ -126,7 +126,7 @@
again. Equivalent forms are `--min-parents=0` (any commit has 0 or more
parents) and `--max-parents=-1` (negative numbers denote no upper limit).
---first-parent::
+`--first-parent`::
When finding commits to include, follow only the first
parent commit upon seeing a merge commit. This option
can give a better overview when viewing the evolution of
@@ -141,14 +141,14 @@
to `first-parent`, see `--diff-merges=first-parent` for details.
endif::git-log[]
---exclude-first-parent-only::
+`--exclude-first-parent-only`::
When finding commits to exclude (with a '{caret}'), follow only
the first parent commit upon seeing a merge commit.
This can be used to find the set of changes in a topic branch
from the point where it diverged from the remote branch, given
that arbitrary merges can be valid topic branch changes.
---not::
+`--not`::
Reverses the meaning of the '{caret}' prefix (or lack thereof)
for all following revision specifiers, up to the next `--not`.
When used on the command line before --stdin, the revisions passed
@@ -156,37 +156,37 @@
via standard input, the revisions passed on the command line will
not be affected by it.
---all::
+`--all`::
Pretend as if all the refs in `refs/`, along with `HEAD`, are
- listed on the command line as '<commit>'.
+ listed on the command line as _<commit>_.
---branches[=<pattern>]::
+`--branches[=<pattern>]`::
Pretend as if all the refs in `refs/heads` are listed
- on the command line as '<commit>'. If '<pattern>' is given, limit
- branches to ones matching given shell glob. If pattern lacks '?',
+ on the command line as _<commit>_. If _<pattern>_ is given, limit
+ branches to ones matching given shell glob. If _<pattern>_ lacks '?',
'{asterisk}', or '[', '/{asterisk}' at the end is implied.
---tags[=<pattern>]::
+`--tags[=<pattern>]`::
Pretend as if all the refs in `refs/tags` are listed
- on the command line as '<commit>'. If '<pattern>' is given, limit
+ on the command line as _<commit>_. If _<pattern>_ is given, limit
tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}',
or '[', '/{asterisk}' at the end is implied.
---remotes[=<pattern>]::
+`--remotes[=<pattern>]`::
Pretend as if all the refs in `refs/remotes` are listed
- on the command line as '<commit>'. If '<pattern>' is given, limit
+ on the command line as _<commit>_. If _<pattern>_ is given, limit
remote-tracking branches to ones matching given shell glob.
If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
---glob=<glob-pattern>::
- Pretend as if all the refs matching shell glob '<glob-pattern>'
- are listed on the command line as '<commit>'. Leading 'refs/',
+`--glob=<glob-pattern>`::
+ Pretend as if all the refs matching shell glob _<glob-pattern>_
+ are listed on the command line as _<commit>_. Leading 'refs/',
is automatically prepended if missing. If pattern lacks '?', '{asterisk}',
or '[', '/{asterisk}' at the end is implied.
---exclude=<glob-pattern>::
+`--exclude=<glob-pattern>`::
- Do not include refs matching '<glob-pattern>' that the next `--all`,
+ Do not include refs matching _<glob-pattern>_ that the next `--all`,
`--branches`, `--tags`, `--remotes`, or `--glob` would otherwise
consider. Repetitions of this option accumulate exclusion patterns
up to the next `--all`, `--branches`, `--tags`, `--remotes`, or
@@ -199,7 +199,7 @@
or `--all`. If a trailing '/{asterisk}' is intended, it must be given
explicitly.
---exclude-hidden=[fetch|receive|uploadpack]::
+`--exclude-hidden=(fetch|receive|uploadpack)`::
Do not include refs that would be hidden by `git-fetch`,
`git-receive-pack` or `git-upload-pack` by consulting the appropriate
`fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs`
@@ -207,11 +207,11 @@
linkgit:git-config[1]). This option affects the next pseudo-ref option
`--all` or `--glob` and is cleared after processing them.
---reflog::
+`--reflog`::
Pretend as if all objects mentioned by reflogs are listed on the
- command line as `<commit>`.
+ command line as _<commit>_.
---alternate-refs::
+`--alternate-refs`::
Pretend as if all objects mentioned as ref tips of alternate
repositories were listed on the command line. An alternate
repository is any repository whose object directory is specified
@@ -219,7 +219,7 @@
be modified by `core.alternateRefsCommand`, etc. See
linkgit:git-config[1].
---single-worktree::
+`--single-worktree`::
By default, all working trees will be examined by the
following options when there are more than one (see
linkgit:git-worktree[1]): `--all`, `--reflog` and
@@ -227,19 +227,19 @@
This option forces them to examine the current working tree
only.
---ignore-missing::
+`--ignore-missing`::
Upon seeing an invalid object name in the input, pretend as if
the bad input was not given.
ifndef::git-rev-list[]
---bisect::
+`--bisect`::
Pretend as if the bad bisection ref `refs/bisect/bad`
was listed and as if it was followed by `--not` and the good
bisection refs `refs/bisect/good-*` on the command
line.
endif::git-rev-list[]
---stdin::
+`--stdin`::
In addition to getting arguments from the command line, read
them from standard input as well. This accepts commits and
pseudo-options like `--all` and `--glob=`. When a `--` separator
@@ -249,15 +249,15 @@
influence any subsequent command line arguments.
ifdef::git-rev-list[]
---quiet::
+`--quiet`::
Don't print anything to standard output. This form
is primarily meant to allow the caller to
test the exit status to see if a range of objects is fully
connected (or not). It is faster than redirecting stdout
to `/dev/null` as the output does not have to be formatted.
---disk-usage::
---disk-usage=human::
+`--disk-usage`::
+`--disk-usage=human`::
Suppress normal output; instead, print the sum of the bytes used
for on-disk storage by the selected commits or objects. This is
equivalent to piping the output into `git cat-file
@@ -269,11 +269,11 @@
in human-readable string(e.g. 12.24 Kib, 3.50 Mib).
endif::git-rev-list[]
---cherry-mark::
+`--cherry-mark`::
Like `--cherry-pick` (see below) but mark equivalent commits
with `=` rather than omitting them, and inequivalent ones with `+`.
---cherry-pick::
+`--cherry-pick`::
Omit any commit that introduces the same change as
another commit on the ``other side'' when the set of
commits are limited with symmetric difference.
@@ -286,8 +286,8 @@
cherry-picked from branch A). With this option, such pairs of commits are
excluded from the output.
---left-only::
---right-only::
+`--left-only`::
+`--right-only`::
List only commits on the respective side of a symmetric difference,
i.e. only those which would be marked `<` resp. `>` by
`--left-right`.
@@ -298,20 +298,20 @@
More precisely, `--cherry-pick --right-only --no-merges` gives the exact
list.
---cherry::
+`--cherry`::
A synonym for `--right-only --cherry-mark --no-merges`; useful to
limit the output to the commits on our side and mark those that
have been applied to the other side of a forked history with
`git log --cherry upstream...mybranch`, similar to
`git cherry upstream mybranch`.
--g::
---walk-reflogs::
+`-g`::
+`--walk-reflogs`::
Instead of walking the commit ancestry chain, walk
reflog entries from the most recent one to older ones.
When this option is used you cannot specify commits to
- exclude (that is, '{caret}commit', 'commit1..commit2',
- and 'commit1\...commit2' notations cannot be used).
+ exclude (that is, `^<commit>`, `<commit1>..<commit2>`,
+ and `<commit1>...<commit2>` notations cannot be used).
+
With `--pretty` format other than `oneline` and `reference` (for obvious reasons),
this causes the output to have two extra lines of information
@@ -340,29 +340,29 @@
+
Under `--pretty=reference`, this information will not be shown at all.
---merge::
+`--merge`::
Show commits touching conflicted paths in the range `HEAD...<other>`,
where `<other>` is the first existing pseudoref in `MERGE_HEAD`,
`CHERRY_PICK_HEAD`, `REVERT_HEAD` or `REBASE_HEAD`. Only works
when the index has unmerged entries. This option can be used to show
relevant commits when resolving conflicts from a 3-way merge.
---boundary::
+`--boundary`::
Output excluded boundary commits. Boundary commits are
prefixed with `-`.
ifdef::git-rev-list[]
---use-bitmap-index::
+`--use-bitmap-index`::
Try to speed up the traversal using the pack bitmap index (if
one is available). Note that when traversing with `--objects`,
trees and blobs will not have their associated path printed.
---progress=<header>::
+`--progress=<header>`::
Show progress reports on stderr as objects are considered. The
`<header>` text will be printed with each progress update.
--z::
+`-z`::
Instead of being newline-delimited, each outputted object and its
accompanying metadata is delimited using NUL bytes. Output is printed
in the following form:
@@ -397,56 +397,56 @@
The following options select the commits to be shown:
-<paths>::
+`<paths>`::
Commits modifying the given <paths> are selected.
---simplify-by-decoration::
+`--simplify-by-decoration`::
Commits that are referred by some branch or tag are selected.
Note that extra commits can be shown to give a meaningful history.
The following options affect the way the simplification is performed:
-Default mode::
+`Default mode`::
Simplifies the history to the simplest history explaining the
final state of the tree. Simplest because it prunes some side
branches if the end result is the same (i.e. merging branches
with the same content)
---show-pulls::
+`--show-pulls`::
Include all commits from the default mode, but also any merge
commits that are not TREESAME to the first parent but are
TREESAME to a later parent. This mode is helpful for showing
the merge commits that "first introduced" a change to a branch.
---full-history::
+`--full-history`::
Same as the default mode, but does not prune some history.
---dense::
+`--dense`::
Only the selected commits are shown, plus some to have a
meaningful history.
---sparse::
+`--sparse`::
All commits in the simplified history are shown.
---simplify-merges::
+`--simplify-merges`::
Additional option to `--full-history` to remove some needless
merges from the resulting history, as there are no selected
commits contributing to this merge.
---ancestry-path[=<commit>]::
- When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), and a commit <commit> in that range,
+`--ancestry-path[=<commit>]`::
+ When given a range of commits to display (e.g. `<commit1>..<commit2>`
+ or `<commit2> ^<commit1>`), and a commit _<commit>_ in that range,
only display commits in that range
- that are ancestors of <commit>, descendants of <commit>, or
- <commit> itself. If no commit is specified, use 'commit1' (the
- excluded part of the range) as <commit>. Can be passed multiple
+ that are ancestors of _<commit>_, descendants of _<commit>_, or
+ _<commit>_ itself. If no commit is specified, use _<commit1>_ (the
+ excluded part of the range) as _<commit>_. Can be passed multiple
times; if so, a commit is included if it is any of the commits
given or if it is an ancestor or descendant of one of them.
A more detailed explanation follows.
-Suppose you specified `foo` as the <paths>. We shall call commits
+Suppose you specified `foo` as the _<paths>_. We shall call commits
that modify `foo` !TREESAME, and the rest TREESAME. (In a diff
filtered for `foo`, they look different and equal, respectively.)
@@ -466,22 +466,22 @@
each merge. The commits are:
* `I` is the initial commit, in which `foo` exists with contents
- ``asdf'', and a file `quux` exists with contents ``quux''. Initial
+ `asdf`, and a file `quux` exists with contents `quux`. Initial
commits are compared to an empty tree, so `I` is !TREESAME.
-* In `A`, `foo` contains just ``foo''.
+* In `A`, `foo` contains just `foo`.
* `B` contains the same change as `A`. Its merge `M` is trivial and
hence TREESAME to all parents.
-* `C` does not change `foo`, but its merge `N` changes it to ``foobar'',
+* `C` does not change `foo`, but its merge `N` changes it to `foobar`,
so it is not TREESAME to any parent.
-* `D` sets `foo` to ``baz''. Its merge `O` combines the strings from
- `N` and `D` to ``foobarbaz''; i.e., it is not TREESAME to any parent.
+* `D` sets `foo` to `baz`. Its merge `O` combines the strings from
+ `N` and `D` to `foobarbaz`; i.e., it is not TREESAME to any parent.
-* `E` changes `quux` to ``xyzzy'', and its merge `P` combines the
- strings to ``quux xyzzy''. `P` is TREESAME to `O`, but not to `E`.
+* `E` changes `quux` to `xyzzy`, and its merge `P` combines the
+ strings to `quux xyzzy`. `P` is TREESAME to `O`, but not to `E`.
* `X` is an independent root commit that added a new file `side`, and `Y`
modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and
@@ -517,7 +517,7 @@
not affect the commits selected in default mode, so we have shown the
parent lines.
---full-history without parent rewriting::
+`--full-history` without parent rewriting::
This mode differs from the default in one point: always follow
all parents of a merge, even if it is TREESAME to one of them.
Even if more than one side of the merge has commits that are
@@ -536,7 +536,7 @@
about the parent/child relationships between the commits, so we show
them disconnected.
---full-history with parent rewriting::
+`--full-history` with parent rewriting::
Ordinary commits are only included if they are !TREESAME
(though this can be changed, see `--sparse` below).
+
@@ -560,18 +560,18 @@
In addition to the above settings, you can change whether TREESAME
affects inclusion:
---dense::
+`--dense`::
Commits that are walked are included if they are not TREESAME
to any parent.
---sparse::
+`--sparse`::
All commits that are walked are included.
+
Note that without `--full-history`, this still simplifies merges: if
one of the parents is TREESAME, we follow only that one, so the other
sides of the merge are never walked.
---simplify-merges::
+`--simplify-merges`::
First, build a history graph in the same way that
`--full-history` with parent rewriting does (see above).
+
@@ -618,9 +618,9 @@
There is another simplification mode available:
---ancestry-path[=<commit>]::
+`--ancestry-path[=<commit>]`::
Limit the displayed commits to those which are an ancestor of
- <commit>, or which are a descendant of <commit>, or are <commit>
+ _<commit>_, or which are a descendant of _<commit>_, or are _<commit>_
itself.
+
As an example use case, consider the following commit history:
@@ -636,15 +636,15 @@
A regular 'D..M' computes the set of commits that are ancestors of `M`,
but excludes the ones that are ancestors of `D`. This is useful to see
what happened to the history leading to `M` since `D`, in the sense
-that ``what does `M` have that did not exist in `D`''. The result in this
+that "what does `M` have that did not exist in `D`". The result in this
example would be all the commits, except `A` and `B` (and `D` itself,
of course).
+
When we want to find out what commits in `M` are contaminated with the
bug introduced by `D` and need fixing, however, we might want to view
-only the subset of 'D..M' that are actually descendants of `D`, i.e.
+only the subset of `D..M` that are actually descendants of `D`, i.e.
excluding `C` and `K`. This is exactly what the `--ancestry-path`
-option does. Applied to the 'D..M' range, it results in:
+option does. Applied to the `D..M` range, it results in:
+
-----------------------------------------------------------------------
E-------F
@@ -655,7 +655,7 @@
-----------------------------------------------------------------------
+
We can also use `--ancestry-path=D` instead of `--ancestry-path` which
-means the same thing when applied to the 'D..M' range but is just more
+means the same thing when applied to the `D..M` range but is just more
explicit.
+
If we instead are interested in a given topic within this range, and all
@@ -770,7 +770,7 @@
the change `X` came to override the changes from `A` and `B` in its
commit message.
---show-pulls::
+`--show-pulls`::
In addition to the commits shown in the default history, show
each merge commit that is not TREESAME to its first parent but
is TREESAME to a later parent.
@@ -819,7 +819,7 @@
Bisection Helpers
~~~~~~~~~~~~~~~~~
---bisect::
+`--bisect`::
Limit output to the one commit object which is roughly halfway between
included and excluded commits. Note that the bad bisection ref
`refs/bisect/bad` is added to the included commits (if it
@@ -843,7 +843,7 @@
generate and test new 'midpoint's until the commit chain is of length
one.
---bisect-vars::
+`--bisect-vars`::
This calculates the same as `--bisect`, except that refs in
`refs/bisect/` are not used, and except that this outputs
text ready to be eval'ed by the shell. These lines will assign the
@@ -855,7 +855,7 @@
`bisect_bad`, and the number of commits we are bisecting right now to
`bisect_all`.
---bisect-all::
+`--bisect-all`::
This outputs all the commit objects between the included and excluded
commits, ordered by their distance to the included and excluded
commits. Refs in `refs/bisect/` are not used. The farthest
@@ -878,15 +878,15 @@
By default, the commits are shown in reverse chronological order.
---date-order::
+`--date-order`::
Show no parents before all of its children are shown, but
otherwise show commits in the commit timestamp order.
---author-date-order::
+`--author-date-order`::
Show no parents before all of its children are shown, but
otherwise show commits in the author timestamp order.
---topo-order::
+`--topo-order`::
Show no parents before all of its children are shown, and
avoid showing commits on multiple lines of history
intermixed.
@@ -910,8 +910,8 @@
avoid showing the commits from two parallel development track mixed
together.
---reverse::
- Output the commits chosen to be shown (see Commit Limiting
+`--reverse`::
+ Output the commits chosen to be shown (see 'Commit Limiting'
section above) in reverse order. Cannot be combined with
`--walk-reflogs`.
endif::git-shortlog[]
@@ -923,39 +923,39 @@
These options are mostly targeted for packing of Git repositories.
ifdef::git-rev-list[]
---objects::
+`--objects`::
Print the object IDs of any object referenced by the listed
- commits. `--objects foo ^bar` thus means ``send me
+ commits. `--objects foo ^bar` thus means "send me
all object IDs which I need to download if I have the commit
- object _bar_ but not _foo_''. See also `--object-names` below.
+ object `bar` but not `foo`". See also `--object-names` below.
---in-commit-order::
+`--in-commit-order`::
Print tree and blob ids in order of the commits. The tree
and blob ids are printed after they are first referenced
by a commit.
---objects-edge::
+`--objects-edge`::
Similar to `--objects`, but also print the IDs of excluded
- commits prefixed with a ``-'' character. This is used by
+ commits prefixed with a "`-`" character. This is used by
linkgit:git-pack-objects[1] to build a ``thin'' pack, which records
objects in deltified form based on objects contained in these
excluded commits to reduce network traffic.
---objects-edge-aggressive::
+`--objects-edge-aggressive`::
Similar to `--objects-edge`, but it tries harder to find excluded
commits at the cost of increased time. This is used instead of
`--objects-edge` to build ``thin'' packs for shallow repositories.
---indexed-objects::
+`--indexed-objects`::
Pretend as if all trees and blobs used by the index are listed
on the command line. Note that you probably want to use
`--objects`, too.
---unpacked::
+`--unpacked`::
Only useful with `--objects`; print the object IDs that are not
in packs.
---object-names::
+`--object-names`::
Only useful with `--objects`; print the names of the object IDs
that are found. This is the default behavior. Note that the
"name" of each object is ambiguous, and mostly intended as a
@@ -964,52 +964,52 @@
to remove newlines; and if an object would appear multiple times
with different names, only one name is shown.
---no-object-names::
+`--no-object-names`::
Only useful with `--objects`; does not print the names of the object
IDs that are found. This inverts `--object-names`. This flag allows
the output to be more easily parsed by commands such as
linkgit:git-cat-file[1].
---filter=<filter-spec>::
+`--filter=<filter-spec>`::
Only useful with one of the `--objects*`; omits objects (usually
- blobs) from the list of printed objects. The '<filter-spec>'
+ blobs) from the list of printed objects. The _<filter-spec>_
may be one of the following:
+
-The form '--filter=blob:none' omits all blobs.
+The form `--filter=blob:none` omits all blobs.
+
-The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
-bytes or units. n may be zero. The suffixes k, m, and g can be used
-to name units in KiB, MiB, or GiB. For example, 'blob:limit=1k'
+The form `--filter=blob:limit=<n>[kmg]` omits blobs of size at least _<n>_
+bytes or units. _<n>_ may be zero. The suffixes `k`, `m`, and `g` can be used
+to name units in KiB, MiB, or GiB. For example, `blob:limit=1k`
is the same as 'blob:limit=1024'.
+
-The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects
+The form `--filter=object:type=(tag|commit|tree|blob)` omits all objects
which are not of the requested type.
+
-The form '--filter=sparse:oid=<blob-ish>' uses a sparse-checkout
-specification contained in the blob (or blob-expression) '<blob-ish>'
+The form `--filter=sparse:oid=<blob-ish>` uses a sparse-checkout
+specification contained in the blob (or blob-expression) _<blob-ish>_
to omit blobs that would not be required for a sparse checkout on
the requested refs.
+
-The form '--filter=tree:<depth>' omits all blobs and trees whose depth
-from the root tree is >= <depth> (minimum depth if an object is located
-at multiple depths in the commits traversed). <depth>=0 will not include
+The form `--filter=tree:<depth>` omits all blobs and trees whose depth
+from the root tree is >= _<depth>_ (minimum depth if an object is located
+at multiple depths in the commits traversed). _<depth>_=0 will not include
any trees or blobs unless included explicitly in the command-line (or
-standard input when --stdin is used). <depth>=1 will include only the
+standard input when `--stdin` is used). _<depth>_=1 will include only the
tree and blobs which are referenced directly by a commit reachable from
-<commit> or an explicitly-given object. <depth>=2 is like <depth>=1
+_<commit>_ or an explicitly-given object. _<depth>_=2 is like <depth>=1
while also including trees and blobs one more level removed from an
explicitly-given commit or tree.
+
-Note that the form '--filter=sparse:path=<path>' that wants to read
+Note that the form `--filter=sparse:path=<path>` that wants to read
from an arbitrary path on the filesystem has been dropped for security
reasons.
+
-Multiple '--filter=' flags can be specified to combine filters. Only
+Multiple `--filter=` flags can be specified to combine filters. Only
objects which are accepted by every filter are included.
+
-The form '--filter=combine:<filter1>+<filter2>+...<filterN>' can also be
+The form `--filter=combine:<filter1>+<filter2>+...<filterN>` can also be
used to combined several filters, but this is harder than just repeating
-the '--filter' flag and is usually not necessary. Filters are joined by
+the `--filter` flag and is usually not necessary. Filters are joined by
'{plus}' and individual filters are %-encoded (i.e. URL-encoded).
Besides the '{plus}' and '%' characters, the following characters are
reserved and also must be encoded: `~!@#$^&*()[]{}\;",<>?`+'`+
@@ -1017,52 +1017,52 @@
space and newline.
+
Other arbitrary characters can also be encoded. For instance,
-'combine:tree:3+blob:none' and 'combine:tree%3A3+blob%3Anone' are
+`combine:tree:3+blob:none` and `combine:tree%3A3+blob%3Anone` are
equivalent.
---no-filter::
+`--no-filter`::
Turn off any previous `--filter=` argument.
---filter-provided-objects::
+`--filter-provided-objects`::
Filter the list of explicitly provided objects, which would otherwise
always be printed even if they did not match any of the filters. Only
useful with `--filter=`.
---filter-print-omitted::
+`--filter-print-omitted`::
Only useful with `--filter=`; prints a list of the objects omitted
by the filter. Object IDs are prefixed with a ``~'' character.
---missing=<missing-action>::
+`--missing=<missing-action>`::
A debug option to help with future "partial clone" development.
This option specifies how missing objects are handled.
+
-The form '--missing=error' requests that rev-list stop with an error if
+The form `--missing=error` requests that rev-list stop with an error if
a missing object is encountered. This is the default action.
+
-The form '--missing=allow-any' will allow object traversal to continue
+The form `--missing=allow-any` will allow object traversal to continue
if a missing object is encountered. Missing objects will silently be
omitted from the results.
+
-The form '--missing=allow-promisor' is like 'allow-any', but will only
+The form `--missing=allow-promisor` is like `allow-any`, but will only
allow object traversal to continue for EXPECTED promisor missing objects.
Unexpected missing objects will raise an error.
+
-The form '--missing=print' is like 'allow-any', but will also print a
+The form `--missing=print` is like `allow-any`, but will also print a
list of the missing objects. Object IDs are prefixed with a ``?'' character.
+
-The form '--missing=print-info' is like 'print', but will also print additional
+The form `--missing=print-info` is like `print`, but will also print additional
information about the missing object inferred from its containing object. The
information is all printed on the same line with the missing object ID in the
form: `?<oid> [<token>=<value>]...`. The `<token>=<value>` pairs containing
-additional information are separated from each other by a SP. The value is
-encoded in a token specific fashion, but SP or LF contained in value are always
+additional information are separated from each other by a _SP_. The value is
+encoded in a token specific fashion, but _SP_ or _LF_ contained in value are always
expected to be represented in such a way that the resulting encoded value does
not have either of these two problematic bytes. Each `<token>=<value>` may be
one of the following:
+
--
* The `path=<path>` shows the path of the missing object inferred from a
- containing object. A path containing SP or special characters is enclosed in
+ containing object. A path containing _SP_ or special characters is enclosed in
double-quotes in the C style as needed.
+
* The `type=<type>` shows the type of the missing object inferred from a
@@ -1073,7 +1073,7 @@
considered as missing too, and the traversal will ignore them. In case
we cannot get their Object ID though, an error will be raised.
---exclude-promisor-objects::
+`--exclude-promisor-objects`::
(For internal use only.) Prefilter object traversal at
promisor boundary. This is used with partial clone. This is
stronger than `--missing=allow-promisor` because it limits the
@@ -1081,7 +1081,7 @@
objects.
endif::git-rev-list[]
---no-walk[=(sorted|unsorted)]::
+`--no-walk[=(sorted|unsorted)]`::
Only show the given commits, but do not traverse their ancestors.
This has no effect if a range is specified. If the argument
`unsorted` is given, the commits are shown in the order they were
@@ -1090,7 +1090,7 @@
by commit time.
Cannot be combined with `--graph`.
---do-walk::
+`--do-walk`::
Overrides a previous `--no-walk`.
endif::git-shortlog[]
@@ -1100,16 +1100,21 @@
ifdef::git-rev-list[]
Using these options, linkgit:git-rev-list[1] will act similar to the
-more specialized family of commit log tools: linkgit:git-log[1],
-linkgit:git-show[1], and linkgit:git-whatchanged[1]
+more specialized family of commit log tools:
+ifndef::with-breaking-changes[]
+linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+linkgit:git-log[1] and linkgit:git-show[1].
+endif::with-breaking-changes[]
endif::git-rev-list[]
include::pretty-options.adoc[]
---relative-date::
+`--relative-date`::
Synonym for `--date=relative`.
---date=<format>::
+`--date=<format>`::
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. By default, dates
@@ -1159,12 +1164,12 @@
1970). As with `--raw`, this is always in UTC and therefore `-local`
has no effect.
-`--date=format:...` feeds the format `...` to your system `strftime`,
-except for %s, %z, and %Z, which are handled internally.
+`--date=format:<format>` feeds the _<format>_ to your system `strftime`,
+except for `%s`, `%z`, and `%Z`, which are handled internally.
Use `--date=format:%c` to show the date in your system locale's
-preferred format. See the `strftime` manual for a complete list of
+preferred format. See the `strftime`(3) manual for a complete list of
format placeholders. When using `-local`, the correct syntax is
-`--date=format-local:...`.
+`--date=format-local:<format>`.
`--date=default` is the default format, and is based on ctime(3)
output. It shows a single line with three-letter day of the week,
@@ -1174,33 +1179,33 @@
--
ifdef::git-rev-list[]
---header::
+`--header`::
Print the contents of the commit in raw-format; each record is
separated with a NUL character.
---no-commit-header::
+`--no-commit-header`::
Suppress the header line containing "commit" and the object ID printed before
the specified format. This has no effect on the built-in formats; only custom
formats are affected.
---commit-header::
+`--commit-header`::
Overrides a previous `--no-commit-header`.
endif::git-rev-list[]
---parents::
+`--parents`::
Print also the parents of the commit (in the form "commit parent...").
Also enables parent rewriting, see 'History Simplification' above.
---children::
+`--children`::
Print also the children of the commit (in the form "commit child...").
Also enables parent rewriting, see 'History Simplification' above.
ifdef::git-rev-list[]
---timestamp::
+`--timestamp`::
Print the raw commit timestamp.
endif::git-rev-list[]
---left-right::
+`--left-right`::
Mark which side of a symmetric difference a commit is reachable from.
Commits from the left side are prefixed with `<` and those from
the right with `>`. If combined with `--boundary`, those
@@ -1229,7 +1234,7 @@
-xxxxxxx... 1st on a
-----------------------------------------------------------------------
---graph::
+`--graph`::
Draw a text-based graphical representation of the commit history
on the left hand side of the output. This may cause extra lines
to be printed in between commits, in order for the graph history
@@ -1241,15 +1246,15 @@
This implies the `--topo-order` option by default, but the
`--date-order` option may also be specified.
---show-linear-break[=<barrier>]::
- When --graph is not used, all history branches are flattened
+`--show-linear-break[=<barrier>]`::
+ When `--graph` is not used, all history branches are flattened
which can make it hard to see that the two consecutive commits
do not belong to a linear branch. This option puts a barrier
- in between them in that case. If `<barrier>` is specified, it
+ in between them in that case. If _<barrier>_ is specified, it
is the string that will be shown instead of the default one.
ifdef::git-rev-list[]
---count::
+`--count`::
Print a number stating how many commits would have been
listed, and suppress all other output. When used together
with `--left-right`, instead print the counts for left and
diff --git a/Documentation/technical/api-path-walk.adoc b/Documentation/technical/api-path-walk.adoc
index 3e08921..34c905e 100644
--- a/Documentation/technical/api-path-walk.adoc
+++ b/Documentation/technical/api-path-walk.adoc
@@ -56,6 +56,14 @@
the revision walk so that the walk emits commits marked with the
`UNINTERESTING` flag.
+`edge_aggressive`::
+ For performance reasons, usually only the boundary commits are
+ explored to find UNINTERESTING objects. However, in the case of
+ shallow clones it can be helpful to mark all trees and blobs
+ reachable from UNINTERESTING tip commits as UNINTERESTING. This
+ matches the behavior of `--objects-edge-aggressive` in the
+ revision API.
+
`pl`::
This pattern list pointer allows focusing the path-walk search to
a set of patterns, only emitting paths that match the given
@@ -69,4 +77,5 @@
See example usages in:
`t/helper/test-path-walk.c`,
+ `builtin/pack-objects.c`,
`builtin/backfill.c`
diff --git a/Documentation/technical/build-systems.adoc b/Documentation/technical/build-systems.adoc
index d9dafb4..3c5237b 100644
--- a/Documentation/technical/build-systems.adoc
+++ b/Documentation/technical/build-systems.adoc
@@ -32,7 +32,10 @@
- OpenBSD
The platforms which must be supported by the tool should be aligned with our
-[platform support policy](platform-support.txt).
+platform support policy (see platform-support.adoc).
+// once we lose AsciiDoc compatibility, we can start writing the above as:
+// xref:platform-support.adoc#platform-support-policy[platform support policy]
+// or something like that, but until then....
=== Auto-detection of supported features
diff --git a/Documentation/technical/sparse-checkout.adoc b/Documentation/technical/sparse-checkout.adoc
index 8202172..0f750ef 100644
--- a/Documentation/technical/sparse-checkout.adoc
+++ b/Documentation/technical/sparse-checkout.adoc
@@ -440,7 +440,7 @@
* blame (only matters when one or more -C flags are passed)
* and annotate
* log
- * whatchanged
+ * whatchanged (may not exist anymore)
* ls-files
* diff-index
* diff-tree
diff --git a/Documentation/user-manual.adoc b/Documentation/user-manual.adoc
index d2b478a..7696987 100644
--- a/Documentation/user-manual.adoc
+++ b/Documentation/user-manual.adoc
@@ -4240,7 +4240,7 @@
- an entry in `BUILTIN_OBJECTS` in the `Makefile`.
Sometimes, more than one builtin is contained in one source file. For
-example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,
+example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,
since they share quite a bit of code. In that case, the commands which are
_not_ named like the `.c` file in which they live have to be listed in
`BUILT_INS` in the `Makefile`.
@@ -4270,7 +4270,7 @@
it does.
------------------------------------------------------------------
- git_config(git_default_config);
+ repo_config(the_repository, git_default_config);
if (argc != 3)
usage("git cat-file [-t|-s|-e|-p|<type>] <sha1>");
if (get_sha1(argv[2], sha1))
@@ -4301,11 +4301,11 @@
-----------------------------------------------------------------------------
case 0:
- buf = read_object_with_reference(sha1, argv[1], &size, NULL);
+ buf = odb_read_object_peeled(r->objects, sha1, argv[1], &size, NULL);
-----------------------------------------------------------------------------
This is how you read a blob (actually, not only a blob, but any type of
-object). To know how the function `read_object_with_reference()` actually
+object). To know how the function `odb_read_object_peeled()` actually
works, find the source code for it (something like `git grep
read_object_with | grep ":[a-z]"` in the Git repository), and read
the source.
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 1047b8d..e7e9119 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,6 +1,6 @@
#!/bin/sh
-DEF_VER=v2.50.0-rc1
+DEF_VER=v2.51.0-rc1
LF='
'
@@ -82,7 +82,7 @@
$(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ')
EOF
-REPLACED=$(printf "%s" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
+REPLACED=$(printf "%s\n" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
-e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \
-e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \
-e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \
diff --git a/Makefile b/Makefile
index 70d1543..e11340c 100644
--- a/Makefile
+++ b/Makefile
@@ -114,8 +114,6 @@
#
# Define NO_INTPTR_T if you don't have intptr_t or uintptr_t.
#
-# Define NO_UINTMAX_T if you don't have uintmax_t.
-#
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
# Patrick Mauritz).
#
@@ -1085,8 +1083,8 @@
LIB_OBJS += object-file-convert.o
LIB_OBJS += object-file.o
LIB_OBJS += object-name.o
-LIB_OBJS += object-store.o
LIB_OBJS += object.o
+LIB_OBJS += odb.o
LIB_OBJS += oid-array.o
LIB_OBJS += oidmap.o
LIB_OBJS += oidset.o
@@ -1364,29 +1362,28 @@
CLAR_TEST_SUITES += u-oidmap
CLAR_TEST_SUITES += u-oidtree
CLAR_TEST_SUITES += u-prio-queue
+CLAR_TEST_SUITES += u-reftable-basics
+CLAR_TEST_SUITES += u-reftable-block
+CLAR_TEST_SUITES += u-reftable-merged
+CLAR_TEST_SUITES += u-reftable-pq
+CLAR_TEST_SUITES += u-reftable-readwrite
+CLAR_TEST_SUITES += u-reftable-stack
+CLAR_TEST_SUITES += u-reftable-table
CLAR_TEST_SUITES += u-reftable-tree
CLAR_TEST_SUITES += u-strbuf
CLAR_TEST_SUITES += u-strcmp-offset
+CLAR_TEST_SUITES += u-string-list
CLAR_TEST_SUITES += u-strvec
CLAR_TEST_SUITES += u-trailer
CLAR_TEST_SUITES += u-urlmatch-normalization
CLAR_TEST_PROG = $(UNIT_TEST_BIN)/unit-tests$(X)
CLAR_TEST_OBJS = $(patsubst %,$(UNIT_TEST_DIR)/%.o,$(CLAR_TEST_SUITES))
CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/clar/clar.o
-CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/lib-oid.o
+CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable.o
+CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
-UNIT_TEST_PROGRAMS += t-reftable-basics
-UNIT_TEST_PROGRAMS += t-reftable-block
-UNIT_TEST_PROGRAMS += t-reftable-merged
-UNIT_TEST_PROGRAMS += t-reftable-pq
-UNIT_TEST_PROGRAMS += t-reftable-readwrite
-UNIT_TEST_PROGRAMS += t-reftable-record
-UNIT_TEST_PROGRAMS += t-reftable-stack
-UNIT_TEST_PROGRAMS += t-reftable-table
-UNIT_TEST_PROGS = $(patsubst %,$(UNIT_TEST_BIN)/%$X,$(UNIT_TEST_PROGRAMS))
UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
-UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable.o
# xdiff and reftable libs may in turn depend on what is in libgit.a
GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
@@ -1918,9 +1915,6 @@
ifdef NO_INTPTR_T
COMPAT_CFLAGS += -DNO_INTPTR_T
endif
-ifdef NO_UINTMAX_T
- BASIC_CFLAGS += -Duintmax_t=uint32_t
-endif
ifdef NO_SOCKADDR_STORAGE
ifdef NO_IPV6
BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in
@@ -3473,11 +3467,14 @@
coccicheck-test: $(COCCI_TEST_RES_GEN)
coccicheck: coccicheck-test
+
ifdef SPATCH_CONCAT_COCCI
-coccicheck: contrib/coccinelle/ALL.cocci.patch
+COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = contrib/coccinelle/ALL.cocci.patch
else
-coccicheck: $(COCCICHECK_PATCHES_INTREE)
+COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = $(COCCICHECK_PATCHES_INTREE)
endif
+coccicheck: $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES)
+ ! grep -q ^ $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES) /dev/null
# See contrib/coccinelle/README
coccicheck-pending: coccicheck-test
diff --git a/RelNotes b/RelNotes
index eaaaf87..48f1577 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.50.0.adoc
\ No newline at end of file
+Documentation/RelNotes/2.51.0.adoc
\ No newline at end of file
diff --git a/add-interactive.c b/add-interactive.c
index 97ff35b..3e692b4 100644
--- a/add-interactive.c
+++ b/add-interactive.c
@@ -36,11 +36,14 @@ static void init_color(struct repository *r, struct add_i_state *s,
free(key);
}
-void init_add_i_state(struct add_i_state *s, struct repository *r)
+void init_add_i_state(struct add_i_state *s, struct repository *r,
+ struct add_p_opt *add_p_opt)
{
const char *value;
s->r = r;
+ s->context = -1;
+ s->interhunkcontext = -1;
if (repo_config_get_value(r, "color.interactive", &value))
s->use_color = -1;
@@ -78,9 +81,27 @@ void init_add_i_state(struct add_i_state *s, struct repository *r)
repo_config_get_string(r, "diff.algorithm",
&s->interactive_diff_algorithm);
+ if (!repo_config_get_int(r, "diff.context", &s->context))
+ if (s->context < 0)
+ die(_("%s cannot be negative"), "diff.context");
+ if (!repo_config_get_int(r, "diff.interHunkContext", &s->interhunkcontext))
+ if (s->interhunkcontext < 0)
+ die(_("%s cannot be negative"), "diff.interHunkContext");
+
repo_config_get_bool(r, "interactive.singlekey", &s->use_single_key);
if (s->use_single_key)
setbuf(stdin, NULL);
+
+ if (add_p_opt->context != -1) {
+ if (add_p_opt->context < 0)
+ die(_("%s cannot be negative"), "--unified");
+ s->context = add_p_opt->context;
+ }
+ if (add_p_opt->interhunkcontext != -1) {
+ if (add_p_opt->interhunkcontext < 0)
+ die(_("%s cannot be negative"), "--inter-hunk-context");
+ s->interhunkcontext = add_p_opt->interhunkcontext;
+ }
}
void clear_add_i_state(struct add_i_state *s)
@@ -969,6 +990,10 @@ static int run_patch(struct add_i_state *s, const struct pathspec *ps,
opts->prompt = N_("Patch update");
count = list_and_choose(s, files, opts);
if (count > 0) {
+ struct add_p_opt add_p_opt = {
+ .context = s->context,
+ .interhunkcontext = s->interhunkcontext,
+ };
struct strvec args = STRVEC_INIT;
struct pathspec ps_selected = { 0 };
@@ -979,7 +1004,7 @@ static int run_patch(struct add_i_state *s, const struct pathspec *ps,
parse_pathspec(&ps_selected,
PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL,
PATHSPEC_LITERAL_PATH, "", args.v);
- res = run_add_p(s->r, ADD_P_ADD, NULL, &ps_selected);
+ res = run_add_p(s->r, ADD_P_ADD, &add_p_opt, NULL, &ps_selected);
strvec_clear(&args);
clear_pathspec(&ps_selected);
}
@@ -1014,10 +1039,13 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
if (count > 0) {
struct child_process cmd = CHILD_PROCESS_INIT;
- strvec_pushl(&cmd.args, "git", "diff", "-p", "--cached",
- oid_to_hex(!is_initial ? &oid :
- s->r->hash_algo->empty_tree),
- "--", NULL);
+ strvec_pushl(&cmd.args, "git", "diff", "-p", "--cached", NULL);
+ if (s->context != -1)
+ strvec_pushf(&cmd.args, "--unified=%i", s->context);
+ if (s->interhunkcontext != -1)
+ strvec_pushf(&cmd.args, "--inter-hunk-context=%i", s->interhunkcontext);
+ strvec_pushl(&cmd.args, oid_to_hex(!is_initial ? &oid :
+ s->r->hash_algo->empty_tree), "--", NULL);
for (i = 0; i < files->items.nr; i++)
if (files->selected[i])
strvec_push(&cmd.args,
@@ -1110,7 +1138,8 @@ static void command_prompt_help(struct add_i_state *s)
_("(empty) select nothing"));
}
-int run_add_i(struct repository *r, const struct pathspec *ps)
+int run_add_i(struct repository *r, const struct pathspec *ps,
+ struct add_p_opt *add_p_opt)
{
struct add_i_state s = { NULL };
struct print_command_item_data data = { "[", "]" };
@@ -1153,7 +1182,7 @@ int run_add_i(struct repository *r, const struct pathspec *ps)
->util = util;
}
- init_add_i_state(&s, r);
+ init_add_i_state(&s, r, add_p_opt);
/*
* When color was asked for, use the prompt color for
diff --git a/add-interactive.h b/add-interactive.h
index 693f125..4213dcd 100644
--- a/add-interactive.h
+++ b/add-interactive.h
@@ -3,6 +3,13 @@
#include "color.h"
+struct add_p_opt {
+ int context;
+ int interhunkcontext;
+};
+
+#define ADD_P_OPT_INIT { .context = -1, .interhunkcontext = -1 }
+
struct add_i_state {
struct repository *r;
int use_color;
@@ -18,14 +25,17 @@ struct add_i_state {
int use_single_key;
char *interactive_diff_filter, *interactive_diff_algorithm;
+ int context, interhunkcontext;
};
-void init_add_i_state(struct add_i_state *s, struct repository *r);
+void init_add_i_state(struct add_i_state *s, struct repository *r,
+ struct add_p_opt *add_p_opt);
void clear_add_i_state(struct add_i_state *s);
struct repository;
struct pathspec;
-int run_add_i(struct repository *r, const struct pathspec *ps);
+int run_add_i(struct repository *r, const struct pathspec *ps,
+ struct add_p_opt *add_p_opt);
enum add_p_mode {
ADD_P_ADD,
@@ -36,6 +46,7 @@ enum add_p_mode {
};
int run_add_p(struct repository *r, enum add_p_mode mode,
- const char *revision, const struct pathspec *ps);
+ struct add_p_opt *o, const char *revision,
+ const struct pathspec *ps);
#endif
diff --git a/add-patch.c b/add-patch.c
index 95c67d8..302e6ba 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -414,7 +414,6 @@ static int normalize_marker(const char *p)
static int parse_diff(struct add_p_state *s, const struct pathspec *ps)
{
struct strvec args = STRVEC_INIT;
- const char *diff_algorithm = s->s.interactive_diff_algorithm;
struct strbuf *plain = &s->plain, *colored = NULL;
struct child_process cp = CHILD_PROCESS_INIT;
char *p, *pend, *colored_p = NULL, *colored_pend = NULL, marker = '\0';
@@ -424,8 +423,12 @@ static int parse_diff(struct add_p_state *s, const struct pathspec *ps)
int res;
strvec_pushv(&args, s->mode->diff_cmd);
- if (diff_algorithm)
- strvec_pushf(&args, "--diff-algorithm=%s", diff_algorithm);
+ if (s->s.context != -1)
+ strvec_pushf(&args, "--unified=%i", s->s.context);
+ if (s->s.interhunkcontext != -1)
+ strvec_pushf(&args, "--inter-hunk-context=%i", s->s.interhunkcontext);
+ if (s->s.interactive_diff_algorithm)
+ strvec_pushf(&args, "--diff-algorithm=%s", s->s.interactive_diff_algorithm);
if (s->revision) {
struct object_id oid;
strvec_push(&args,
@@ -1760,14 +1763,15 @@ static int patch_update_file(struct add_p_state *s,
}
int run_add_p(struct repository *r, enum add_p_mode mode,
- const char *revision, const struct pathspec *ps)
+ struct add_p_opt *o, const char *revision,
+ const struct pathspec *ps)
{
struct add_p_state s = {
{ r }, STRBUF_INIT, STRBUF_INIT, STRBUF_INIT, STRBUF_INIT
};
size_t i, binary_count = 0;
- init_add_i_state(&s.s, r);
+ init_add_i_state(&s.s, r, o);
if (mode == ADD_P_STASH)
s.mode = &patch_mode_stash;
diff --git a/apply.c b/apply.c
index 8bbe6ed..a2ceb3f 100644
--- a/apply.c
+++ b/apply.c
@@ -14,7 +14,7 @@
#include "abspath.h"
#include "base85.h"
#include "config.h"
-#include "object-store.h"
+#include "odb.h"
#include "delta.h"
#include "diff.h"
#include "dir.h"
@@ -48,9 +48,9 @@ struct gitdiff_data {
static void git_apply_config(void)
{
- git_config_get_string("apply.whitespace", &apply_default_whitespace);
- git_config_get_string("apply.ignorewhitespace", &apply_default_ignorewhitespace);
- git_config(git_xmerge_config, NULL);
+ repo_config_get_string(the_repository, "apply.whitespace", &apply_default_whitespace);
+ repo_config_get_string(the_repository, "apply.ignorewhitespace", &apply_default_ignorewhitespace);
+ repo_config(the_repository, git_xmerge_config, NULL);
}
static int parse_whitespace_option(struct apply_state *state, const char *option)
@@ -3204,14 +3204,14 @@ static int apply_binary(struct apply_state *state,
return 0; /* deletion patch */
}
- if (has_object(the_repository, &oid, 0)) {
+ if (odb_has_object(the_repository->objects, &oid, 0)) {
/* We already have the postimage */
enum object_type type;
unsigned long size;
char *result;
- result = repo_read_object_file(the_repository, &oid, &type,
- &size);
+ result = odb_read_object(the_repository->objects, &oid,
+ &type, &size);
if (!result)
return error(_("the necessary postimage %s for "
"'%s' cannot be read"),
@@ -3273,8 +3273,8 @@ static int read_blob_object(struct strbuf *buf, const struct object_id *oid, uns
unsigned long sz;
char *result;
- result = repo_read_object_file(the_repository, oid, &type,
- &sz);
+ result = odb_read_object(the_repository->objects, oid,
+ &type, &sz);
if (!result)
return -1;
/* XXX read_sha1_file NUL-terminates */
@@ -3503,7 +3503,7 @@ static int resolve_to(struct image *image, const struct object_id *result_id)
image_clear(image);
- data = repo_read_object_file(the_repository, result_id, &type, &size);
+ data = odb_read_object(the_repository->objects, result_id, &type, &size);
if (!data || type != OBJ_BLOB)
die("unable to read blob object %s", oid_to_hex(result_id));
strbuf_attach(&image->buf, data, size, size + 1);
@@ -3621,7 +3621,7 @@ static int try_threeway(struct apply_state *state,
/* Preimage the patch was prepared for */
if (patch->is_new)
- write_object_file("", 0, OBJ_BLOB, &pre_oid);
+ odb_write_object(the_repository->objects, "", 0, OBJ_BLOB, &pre_oid);
else if (repo_get_oid(the_repository, patch->old_oid_prefix, &pre_oid) ||
read_blob_object(&buf, &pre_oid, patch->old_mode))
return error(_("repository lacks the necessary blob to perform 3-way merge."));
@@ -3637,7 +3637,8 @@ static int try_threeway(struct apply_state *state,
return -1;
}
/* post_oid is theirs */
- write_object_file(tmp_image.buf.buf, tmp_image.buf.len, OBJ_BLOB, &post_oid);
+ odb_write_object(the_repository->objects, tmp_image.buf.buf,
+ tmp_image.buf.len, OBJ_BLOB, &post_oid);
image_clear(&tmp_image);
/* our_oid is ours */
@@ -3650,7 +3651,8 @@ static int try_threeway(struct apply_state *state,
return error(_("cannot read the current contents of '%s'"),
patch->old_name);
}
- write_object_file(tmp_image.buf.buf, tmp_image.buf.len, OBJ_BLOB, &our_oid);
+ odb_write_object(the_repository->objects, tmp_image.buf.buf,
+ tmp_image.buf.len, OBJ_BLOB, &our_oid);
image_clear(&tmp_image);
/* in-core three-way merge between post and our using pre as base */
@@ -4360,7 +4362,8 @@ static int add_index_file(struct apply_state *state,
}
fill_stat_cache_info(state->repo->index, ce, &st);
}
- if (write_object_file(buf, size, OBJ_BLOB, &ce->oid) < 0) {
+ if (odb_write_object(the_repository->objects, buf, size,
+ OBJ_BLOB, &ce->oid) < 0) {
discard_cache_entry(ce);
return error(_("unable to create backing store "
"for newly created file %s"), path);
@@ -4565,7 +4568,7 @@ static int create_file(struct apply_state *state, struct patch *patch)
if (patch->conflicted_threeway)
return add_conflicted_stages_file(state, patch);
- else if (state->update_index)
+ else if (state->check_index || (state->ita_only && patch->is_new > 0))
return add_index_file(state, path, mode, buf, size);
return 0;
}
@@ -4833,7 +4836,7 @@ static int apply_patch(struct apply_state *state,
LOCK_DIE_ON_ERROR);
}
- if (state->check_index && read_apply_cache(state) < 0) {
+ if ((state->check_index || state->update_index) && read_apply_cache(state) < 0) {
error(_("unable to read index file"));
res = -128;
goto end;
diff --git a/archive-tar.c b/archive-tar.c
index 282b481..73b63dd 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -11,7 +11,7 @@
#include "hex.h"
#include "tar.h"
#include "archive.h"
-#include "object-store.h"
+#include "odb.h"
#include "strbuf.h"
#include "streaming.h"
#include "run-command.h"
@@ -537,7 +537,7 @@ void init_tar_archiver(void)
tar_filter_config("tar.tgz.remote", "true", NULL);
tar_filter_config("tar.tar.gz.command", internal_gzip_command, NULL);
tar_filter_config("tar.tar.gz.remote", "true", NULL);
- git_config(git_tar_config, NULL);
+ repo_config(the_repository, git_tar_config, NULL);
for (i = 0; i < nr_tar_filters; i++) {
/* omit any filters that never had a command configured */
if (tar_filters[i]->filter_command)
diff --git a/archive-zip.c b/archive-zip.c
index 405da6f..bea5bdd 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -12,7 +12,7 @@
#include "hex.h"
#include "streaming.h"
#include "utf8.h"
-#include "object-store.h"
+#include "odb.h"
#include "strbuf.h"
#include "userdiff.h"
#include "write-or-die.h"
@@ -492,14 +492,22 @@ static int write_zip_entry(struct archiver_args *args,
zstream.next_in = buf;
zstream.avail_in = 0;
- result = git_deflate(&zstream, Z_FINISH);
- if (result != Z_STREAM_END)
- die("deflate error (%d)", result);
+
+ do {
+ result = git_deflate(&zstream, Z_FINISH);
+ if (result != Z_OK && result != Z_STREAM_END)
+ die("deflate error (%d)", result);
+
+ out_len = zstream.next_out - compressed;
+ if (out_len > 0) {
+ write_or_die(1, compressed, out_len);
+ compressed_size += out_len;
+ zstream.next_out = compressed;
+ zstream.avail_out = sizeof(compressed);
+ }
+ } while (result != Z_STREAM_END);
git_deflate_end(&zstream);
- out_len = zstream.next_out - compressed;
- write_or_die(1, compressed, out_len);
- compressed_size += out_len;
zip_offset += compressed_size;
write_zip_data_desc(size, compressed_size, crc);
@@ -632,7 +640,7 @@ static int write_zip_archive(const struct archiver *ar UNUSED,
{
int err;
- git_config(archive_zip_config, NULL);
+ repo_config(the_repository, archive_zip_config, NULL);
dos_time(&args->time, &zip_date, &zip_time);
diff --git a/archive.c b/archive.c
index 8309ea2..310672b 100644
--- a/archive.c
+++ b/archive.c
@@ -14,7 +14,7 @@
#include "pretty.h"
#include "setup.h"
#include "refs.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "tree.h"
#include "tree-walk.h"
@@ -98,7 +98,7 @@ static void *object_file_to_archive(const struct archiver_args *args,
(args->tree ? &args->tree->object.oid : NULL), oid);
path += args->baselen;
- buffer = repo_read_object_file(the_repository, oid, type, sizep);
+ buffer = odb_read_object(the_repository->objects, oid, type, sizep);
if (buffer && S_ISREG(mode)) {
struct strbuf buf = STRBUF_INIT;
size_t size = 0;
@@ -215,7 +215,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
/* Stream it? */
if (S_ISREG(mode) && !args->convert &&
- oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&
+ odb_read_object_info(args->repo->objects, oid, &size) == OBJ_BLOB &&
size > repo_settings_get_big_file_threshold(the_repository))
return write_entry(args, oid, path.buf, path.len, mode, NULL, size);
@@ -760,8 +760,8 @@ int write_archive(int argc, const char **argv, const char *prefix,
const char **argv_copy;
int rc;
- git_config_get_bool("uploadarchive.allowunreachable", &remote_allow_unreachable);
- git_config(git_default_config, NULL);
+ repo_config_get_bool(the_repository, "uploadarchive.allowunreachable", &remote_allow_unreachable);
+ repo_config(the_repository, git_default_config, NULL);
describe_status.max_invocations = 1;
ctx.date_mode.type = DATE_NORMAL;
diff --git a/attr.c b/attr.c
index 86b6109..d1daeb0 100644
--- a/attr.c
+++ b/attr.c
@@ -22,7 +22,7 @@
#include "read-cache-ll.h"
#include "refs.h"
#include "revision.h"
-#include "object-store.h"
+#include "odb.h"
#include "setup.h"
#include "thread-utils.h"
#include "tree-walk.h"
@@ -779,7 +779,7 @@ static struct attr_stack *read_attr_from_blob(struct index_state *istate,
if (get_tree_entry(istate->repo, tree_oid, path, &oid, &mode))
return NULL;
- buf = repo_read_object_file(istate->repo, &oid, &type, &sz);
+ buf = odb_read_object(istate->repo->objects, &oid, &type, &sz);
if (!buf || type != OBJ_BLOB) {
free(buf);
return NULL;
diff --git a/bisect.c b/bisect.c
index a327468..f244745 100644
--- a/bisect.c
+++ b/bisect.c
@@ -20,7 +20,7 @@
#include "commit-slab.h"
#include "commit-reach.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "dir.h"
@@ -155,9 +155,9 @@ static void show_list(const char *debug, int counted, int nr,
unsigned commit_flags = commit->object.flags;
enum object_type type;
unsigned long size;
- char *buf = repo_read_object_file(the_repository,
- &commit->object.oid, &type,
- &size);
+ char *buf = odb_read_object(the_repository->objects,
+ &commit->object.oid, &type,
+ &size);
const char *subject_start;
int subject_len;
diff --git a/bisect.h b/bisect.h
index 944439b..8621460 100644
--- a/bisect.h
+++ b/bisect.h
@@ -27,14 +27,6 @@ struct commit_list *filter_skipped(struct commit_list *list,
#define FIND_BISECTION_ALL (1u<<0)
#define FIND_BISECTION_FIRST_PARENT_ONLY (1u<<1)
-struct rev_list_info {
- struct rev_info *revs;
- int flags;
- int show_timestamp;
- int hdr_termination;
- const char *header_prefix;
-};
-
/*
* enum bisect_error represents the following return codes:
* BISECT_OK: success code. Internally, it means that next
diff --git a/blame.c b/blame.c
index 57daa45..f1c0670 100644
--- a/blame.c
+++ b/blame.c
@@ -3,7 +3,7 @@
#include "git-compat-util.h"
#include "refs.h"
-#include "object-store.h"
+#include "odb.h"
#include "cache-tree.h"
#include "mergesort.h"
#include "commit.h"
@@ -116,7 +116,7 @@ static void verify_working_tree_path(struct repository *r,
unsigned short mode;
if (!get_tree_entry(r, commit_oid, path, &blob_oid, &mode) &&
- oid_object_info(r, &blob_oid, NULL) == OBJ_BLOB)
+ odb_read_object_info(r->objects, &blob_oid, NULL) == OBJ_BLOB)
return;
}
@@ -277,7 +277,8 @@ static struct commit *fake_working_tree_commit(struct repository *r,
convert_to_git(r->index, path, buf.buf, buf.len, &buf, 0);
origin->file.ptr = buf.buf;
origin->file.size = buf.len;
- pretend_object_file(the_repository, buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);
+ odb_pretend_object(the_repository->objects, buf.buf, buf.len,
+ OBJ_BLOB, &origin->blob_oid);
/*
* Read the current index, replace the path entry with
@@ -1041,9 +1042,9 @@ static void fill_origin_blob(struct diff_options *opt,
&o->blob_oid, 1, &file->ptr, &file_size))
;
else
- file->ptr = repo_read_object_file(the_repository,
- &o->blob_oid, &type,
- &file_size);
+ file->ptr = odb_read_object(the_repository->objects,
+ &o->blob_oid, &type,
+ &file_size);
file->size = file_size;
if (!file->ptr)
@@ -1245,7 +1246,7 @@ static int fill_blob_sha1_and_mode(struct repository *r,
return 0;
if (get_tree_entry(r, &origin->commit->object.oid, origin->path, &origin->blob_oid, &origin->mode))
goto error_out;
- if (oid_object_info(r, &origin->blob_oid, NULL) != OBJ_BLOB)
+ if (odb_read_object_info(r->objects, &origin->blob_oid, NULL) != OBJ_BLOB)
goto error_out;
return 0;
error_out:
@@ -1310,7 +1311,7 @@ static void add_bloom_key(struct blame_bloom_data *bd,
}
bd->keys[bd->nr] = xmalloc(sizeof(struct bloom_key));
- fill_bloom_key(path, strlen(path), bd->keys[bd->nr], bd->settings);
+ bloom_key_fill(bd->keys[bd->nr], path, strlen(path), bd->settings);
bd->nr++;
}
@@ -2869,10 +2870,9 @@ void setup_scoreboard(struct blame_scoreboard *sb,
&sb->final_buf_size))
;
else
- sb->final_buf = repo_read_object_file(the_repository,
- &o->blob_oid,
- &type,
- &sb->final_buf_size);
+ sb->final_buf = odb_read_object(the_repository->objects,
+ &o->blob_oid, &type,
+ &sb->final_buf_size);
if (!sb->final_buf)
die(_("cannot read blob %s for path %s"),
diff --git a/bloom.c b/bloom.c
index 0c8d2ce..b86015f 100644
--- a/bloom.c
+++ b/bloom.c
@@ -107,7 +107,7 @@ int load_bloom_filter_from_graph(struct commit_graph *g,
* Not considered to be cryptographically secure.
* Implemented as described in https://en.wikipedia.org/wiki/MurmurHash#Algorithm
*/
-uint32_t murmur3_seeded_v2(uint32_t seed, const char *data, size_t len)
+static uint32_t murmur3_seeded_v2(uint32_t seed, const char *data, size_t len)
{
const uint32_t c1 = 0xcc9e2d51;
const uint32_t c2 = 0x1b873593;
@@ -221,9 +221,7 @@ static uint32_t murmur3_seeded_v1(uint32_t seed, const char *data, size_t len)
return seed;
}
-void fill_bloom_key(const char *data,
- size_t len,
- struct bloom_key *key,
+void bloom_key_fill(struct bloom_key *key, const char *data, size_t len,
const struct bloom_filter_settings *settings)
{
int i;
@@ -243,7 +241,7 @@ void fill_bloom_key(const char *data,
key->hashes[i] = hash0 + i * hash1;
}
-void clear_bloom_key(struct bloom_key *key)
+void bloom_key_clear(struct bloom_key *key)
{
FREE_AND_NULL(key->hashes);
}
@@ -280,6 +278,55 @@ void deinit_bloom_filters(void)
deep_clear_bloom_filter_slab(&bloom_filters, free_one_bloom_filter);
}
+struct bloom_keyvec *bloom_keyvec_new(const char *path, size_t len,
+ const struct bloom_filter_settings *settings)
+{
+ struct bloom_keyvec *vec;
+ const char *p;
+ size_t sz;
+ size_t nr = 1;
+
+ p = path;
+ while (*p) {
+ /*
+ * At this point, the path is normalized to use Unix-style
+ * path separators. This is required due to how the
+ * changed-path Bloom filters store the paths.
+ */
+ if (*p == '/')
+ nr++;
+ p++;
+ }
+
+ sz = sizeof(struct bloom_keyvec);
+ sz += nr * sizeof(struct bloom_key);
+ vec = (struct bloom_keyvec *)xcalloc(1, sz);
+ if (!vec)
+ return NULL;
+ vec->count = nr;
+
+ bloom_key_fill(&vec->key[0], path, len, settings);
+ nr = 1;
+ p = path + len - 1;
+ while (p > path) {
+ if (*p == '/') {
+ bloom_key_fill(&vec->key[nr++], path, p - path, settings);
+ }
+ p--;
+ }
+ assert(nr == vec->count);
+ return vec;
+}
+
+void bloom_keyvec_free(struct bloom_keyvec *vec)
+{
+ if (!vec)
+ return;
+ for (size_t nr = 0; nr < vec->count; nr++)
+ bloom_key_clear(&vec->key[nr]);
+ free(vec);
+}
+
static int pathmap_cmp(const void *hashmap_cmp_fn_data UNUSED,
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
@@ -500,9 +547,9 @@ struct bloom_filter *get_or_compute_bloom_filter(struct repository *r,
hashmap_for_each_entry(&pathmap, &iter, e, entry) {
struct bloom_key key;
- fill_bloom_key(e->path, strlen(e->path), &key, settings);
+ bloom_key_fill(&key, e->path, strlen(e->path), settings);
add_key_to_filter(&key, filter, settings);
- clear_bloom_key(&key);
+ bloom_key_clear(&key);
}
cleanup:
@@ -540,3 +587,26 @@ int bloom_filter_contains(const struct bloom_filter *filter,
return 1;
}
+
+int bloom_filter_contains_vec(const struct bloom_filter *filter,
+ const struct bloom_keyvec *vec,
+ const struct bloom_filter_settings *settings)
+{
+ int ret = 1;
+
+ for (size_t nr = 0; ret > 0 && nr < vec->count; nr++)
+ ret = bloom_filter_contains(filter, &vec->key[nr], settings);
+
+ return ret;
+}
+
+uint32_t test_bloom_murmur3_seeded(uint32_t seed, const char *data, size_t len,
+ int version)
+{
+ assert(version == 1 || version == 2);
+
+ if (version == 2)
+ return murmur3_seeded_v2(seed, data, len);
+ else
+ return murmur3_seeded_v1(seed, data, len);
+}
diff --git a/bloom.h b/bloom.h
index 6e46489..92ab210 100644
--- a/bloom.h
+++ b/bloom.h
@@ -74,24 +74,40 @@ struct bloom_key {
uint32_t *hashes;
};
+/*
+ * A bloom_keyvec is a vector of bloom_keys, which
+ * can be used to store multiple keys for a single
+ * pathspec item.
+ */
+struct bloom_keyvec {
+ size_t count;
+ struct bloom_key key[FLEX_ARRAY];
+};
+
int load_bloom_filter_from_graph(struct commit_graph *g,
struct bloom_filter *filter,
uint32_t graph_pos);
-/*
- * Calculate the murmur3 32-bit hash value for the given data
- * using the given seed.
- * Produces a uniformly distributed hash value.
- * Not considered to be cryptographically secure.
- * Implemented as described in https://en.wikipedia.org/wiki/MurmurHash#Algorithm
- */
-uint32_t murmur3_seeded_v2(uint32_t seed, const char *data, size_t len);
-
-void fill_bloom_key(const char *data,
- size_t len,
- struct bloom_key *key,
+void bloom_key_fill(struct bloom_key *key, const char *data, size_t len,
const struct bloom_filter_settings *settings);
-void clear_bloom_key(struct bloom_key *key);
+void bloom_key_clear(struct bloom_key *key);
+
+/*
+ * bloom_keyvec_new - Allocate and populate a bloom_keyvec with keys for the
+ * given path.
+ *
+ * This function splits the input path by '/' and generates a bloom key for each
+ * prefix, in reverse order of specificity. For example, given the input
+ * "a/b/c", it will generate bloom keys for:
+ * - "a/b/c"
+ * - "a/b"
+ * - "a"
+ *
+ * The resulting keys are stored in a newly allocated bloom_keyvec.
+ */
+struct bloom_keyvec *bloom_keyvec_new(const char *path, size_t len,
+ const struct bloom_filter_settings *settings);
+void bloom_keyvec_free(struct bloom_keyvec *vec);
void add_key_to_filter(const struct bloom_key *key,
struct bloom_filter *filter,
@@ -137,4 +153,18 @@ int bloom_filter_contains(const struct bloom_filter *filter,
const struct bloom_key *key,
const struct bloom_filter_settings *settings);
+/*
+ * bloom_filter_contains_vec - Check if all keys in a key vector are in the
+ * Bloom filter.
+ *
+ * Returns 1 if **all** keys in the vector are present in the filter,
+ * 0 if **any** key is not present.
+ */
+int bloom_filter_contains_vec(const struct bloom_filter *filter,
+ const struct bloom_keyvec *v,
+ const struct bloom_filter_settings *settings);
+
+uint32_t test_bloom_murmur3_seeded(uint32_t seed, const char *data, size_t len,
+ int version);
+
#endif
diff --git a/branch.c b/branch.c
index 6d01d7d..26be358 100644
--- a/branch.c
+++ b/branch.c
@@ -116,7 +116,7 @@ static int install_branch_config_multiple_remotes(int flag, const char *local,
}
strbuf_addf(&key, "branch.%s.remote", local);
- if (git_config_set_gently(key.buf, origin ? origin : ".") < 0)
+ if (repo_config_set_gently(the_repository, key.buf, origin ? origin : ".") < 0)
goto out_err;
strbuf_reset(&key);
@@ -127,16 +127,16 @@ static int install_branch_config_multiple_remotes(int flag, const char *local,
* more than one is provided, use CONFIG_REGEX_NONE to preserve what
* we've written so far.
*/
- if (git_config_set_gently(key.buf, NULL) < 0)
+ if (repo_config_set_gently(the_repository, key.buf, NULL) < 0)
goto out_err;
for_each_string_list_item(item, remotes)
- if (git_config_set_multivar_gently(key.buf, item->string, CONFIG_REGEX_NONE, 0) < 0)
+ if (repo_config_set_multivar_gently(the_repository, key.buf, item->string, CONFIG_REGEX_NONE, 0) < 0)
goto out_err;
if (rebasing) {
strbuf_reset(&key);
strbuf_addf(&key, "branch.%s.rebase", local);
- if (git_config_set_gently(key.buf, "true") < 0)
+ if (repo_config_set_gently(the_repository, key.buf, "true") < 0)
goto out_err;
}
strbuf_release(&key);
@@ -230,7 +230,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
return -1;
}
- if (branch->merge_nr < 1 || !branch->merge_name || !branch->merge_name[0]) {
+ if (branch->merge_nr < 1 || !branch->merge || !branch->merge[0] || !branch->merge[0]->src) {
warning(_("asked to inherit tracking from '%s', but no merge configuration is set"),
bare_ref);
return -1;
@@ -238,7 +238,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
tracking->remote = branch->remote_name;
for (i = 0; i < branch->merge_nr; i++)
- string_list_append(tracking->srcs, branch->merge_name[i]);
+ string_list_append(tracking->srcs, branch->merge[i]->src);
return 0;
}
@@ -355,7 +355,7 @@ int read_branch_desc(struct strbuf *buf, const char *branch_name)
char *v = NULL;
struct strbuf name = STRBUF_INIT;
strbuf_addf(&name, "branch.%s.description", branch_name);
- if (git_config_get_string(name.buf, &v)) {
+ if (repo_config_get_string(the_repository, name.buf, &v)) {
strbuf_release(&name);
return -1;
}
diff --git a/builtin/add.c b/builtin/add.c
index 7c292ff..0235854 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -7,6 +7,7 @@
#include "builtin.h"
#include "advice.h"
#include "config.h"
+#include "environment.h"
#include "lockfile.h"
#include "editor.h"
#include "dir.h"
@@ -29,6 +30,7 @@ static const char * const builtin_add_usage[] = {
NULL
};
static int patch_interactive, add_interactive, edit_interactive;
+static struct add_p_opt add_p_opt = ADD_P_OPT_INIT;
static int take_worktree_changes;
static int add_renormalize;
static int pathspec_file_nul;
@@ -157,7 +159,7 @@ static int refresh(struct repository *repo, int verbose, const struct pathspec *
int interactive_add(struct repository *repo,
const char **argv,
const char *prefix,
- int patch)
+ int patch, struct add_p_opt *add_p_opt)
{
struct pathspec pathspec;
int ret;
@@ -169,9 +171,9 @@ int interactive_add(struct repository *repo,
prefix, argv);
if (patch)
- ret = !!run_add_p(repo, ADD_P_ADD, NULL, &pathspec);
+ ret = !!run_add_p(repo, ADD_P_ADD, add_p_opt, NULL, &pathspec);
else
- ret = !!run_add_i(repo, &pathspec);
+ ret = !!run_add_i(repo, &pathspec, add_p_opt);
clear_pathspec(&pathspec);
return ret;
@@ -253,6 +255,8 @@ static struct option builtin_add_options[] = {
OPT_GROUP(""),
OPT_BOOL('i', "interactive", &add_interactive, N_("interactive picking")),
OPT_BOOL('p', "patch", &patch_interactive, N_("select hunks interactively")),
+ OPT_DIFF_UNIFIED(&add_p_opt.context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&add_p_opt.interhunkcontext),
OPT_BOOL('e', "edit", &edit_interactive, N_("edit current diff and apply")),
OPT__FORCE(&ignored_too, N_("allow adding otherwise ignored files"), 0),
OPT_BOOL('u', "update", &take_worktree_changes, N_("update tracked files")),
@@ -394,6 +398,11 @@ int cmd_add(int argc,
prepare_repo_settings(repo);
repo->settings.command_requires_full_index = 0;
+ if (add_p_opt.context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (add_p_opt.interhunkcontext < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
if (patch_interactive)
add_interactive = 1;
if (add_interactive) {
@@ -401,7 +410,12 @@ int cmd_add(int argc,
die(_("options '%s' and '%s' cannot be used together"), "--dry-run", "--interactive/--patch");
if (pathspec_from_file)
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
- exit(interactive_add(repo, argv + 1, prefix, patch_interactive));
+ exit(interactive_add(repo, argv + 1, prefix, patch_interactive, &add_p_opt));
+ } else {
+ if (add_p_opt.context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--interactive/--patch");
+ if (add_p_opt.interhunkcontext != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--interactive/--patch");
}
if (edit_interactive) {
diff --git a/builtin/am.c b/builtin/am.c
index e32a3b4..6073d64 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -162,18 +162,18 @@ static void am_state_init(struct am_state *state)
state->prec = 4;
- git_config_get_bool("am.threeway", &state->threeway);
+ repo_config_get_bool(the_repository, "am.threeway", &state->threeway);
state->utf8 = 1;
- git_config_get_bool("am.messageid", &state->message_id);
+ repo_config_get_bool(the_repository, "am.messageid", &state->message_id);
state->scissors = SCISSORS_UNSET;
state->quoted_cr = quoted_cr_unset;
strvec_init(&state->git_apply_opts);
- if (!git_config_get_bool("commit.gpgsign", &gpgsign))
+ if (!repo_config_get_bool(the_repository, "commit.gpgsign", &gpgsign))
state->sign_commit = gpgsign ? "" : NULL;
}
@@ -965,7 +965,7 @@ static int split_mail(struct am_state *state, enum patch_format patch_format,
{
if (keep_cr < 0) {
keep_cr = 0;
- git_config_get_bool("am.keepcr", &keep_cr);
+ repo_config_get_bool(the_repository, "am.keepcr", &keep_cr);
}
switch (patch_format) {
@@ -1000,7 +1000,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
if (!patch_format) {
fprintf_ln(stderr, _("Patch format detection failed."));
- exit(128);
+ die(NULL);
}
if (mkdir(state->dir, 0777) < 0 && errno != EEXIST)
@@ -1178,7 +1178,7 @@ static void NORETURN die_user_resolve(const struct am_state *state)
strbuf_release(&sb);
}
- exit(128);
+ die(NULL);
}
/**
@@ -2406,6 +2406,7 @@ int cmd_am(int argc,
.type = OPTION_CALLBACK,
.long_name = "show-current-patch",
.value = &resume_mode,
+ .precision = sizeof(resume_mode),
.argh = "(diff|raw)",
.help = N_("show the patch being applied"),
.flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
@@ -2444,7 +2445,7 @@ int cmd_am(int argc,
show_usage_with_options_if_asked(argc, argv, usage, options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
am_state_init(&state);
diff --git a/builtin/apply.c b/builtin/apply.c
index a1e20c5..d642a40 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -29,7 +29,7 @@ int cmd_apply(int argc,
* cf. https://lore.kernel.org/git/xmqqcypfcmn4.fsf@gitster.g/
*/
if (!the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
argc = apply_parse_options(argc, argv,
&state, &force_apply, &options,
diff --git a/builtin/backfill.c b/builtin/backfill.c
index fa82ad2..80056ab 100644
--- a/builtin/backfill.c
+++ b/builtin/backfill.c
@@ -13,7 +13,7 @@
#include "tree.h"
#include "tree-walk.h"
#include "object.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "oidset.h"
#include "promisor-remote.h"
@@ -67,8 +67,8 @@ static int fill_missing_blobs(const char *path UNUSED,
return 0;
for (size_t i = 0; i < list->nr; i++) {
- if (!has_object(ctx->repo, &list->oid[i],
- OBJECT_INFO_FOR_PREFETCH))
+ if (!odb_has_object(ctx->repo->objects, &list->oid[i],
+ OBJECT_INFO_FOR_PREFETCH))
oid_array_append(&ctx->current_batch, &list->oid[i]);
}
diff --git a/builtin/blame.c b/builtin/blame.c
index 944952e..5b10e84 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -28,7 +28,7 @@
#include "line-log.h"
#include "progress.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "pager.h"
#include "blame.h"
#include "refs.h"
@@ -197,9 +197,7 @@ static void commit_info_destroy(struct commit_info *ci)
strbuf_release(&ci->summary);
}
-static void get_commit_info(struct commit *commit,
- struct commit_info *ret,
- int detailed)
+static void get_commit_info(struct commit *commit, struct commit_info *ret)
{
int len;
const char *subject, *encoding;
@@ -211,11 +209,6 @@ static void get_commit_info(struct commit *commit,
&ret->author, &ret->author_mail,
&ret->author_time, &ret->author_tz);
- if (!detailed) {
- repo_unuse_commit_buffer(the_repository, commit, message);
- return;
- }
-
get_ac_line(message, "\ncommitter ",
&ret->committer, &ret->committer_mail,
&ret->committer_time, &ret->committer_tz);
@@ -263,7 +256,7 @@ static int emit_one_suspect_detail(struct blame_origin *suspect, int repeat)
return 0;
suspect->commit->object.flags |= METAINFO_SHOWN;
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
printf("author %s\n", ci.author.buf);
printf("author-mail %s\n", ci.author_mail.buf);
printf("author-time %"PRItime"\n", ci.author_time);
@@ -471,7 +464,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
const char *default_color = NULL, *color = NULL, *reset = NULL;
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
oid_to_hex_r(hex, &suspect->commit->object.oid);
cp = blame_nth_line(sb, ent->lno);
@@ -665,7 +658,7 @@ static void find_alignment(struct blame_scoreboard *sb, int *option)
if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
struct commit_info ci = COMMIT_INFO_INIT;
suspect->commit->object.flags |= METAINFO_SHOWN;
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
if (*option & OUTPUT_SHOW_EMAIL)
num = utf8_strwidth(ci.author_mail.buf);
else
@@ -837,7 +830,7 @@ static int is_a_rev(const char *name)
if (repo_get_oid(the_repository, name, &oid))
return 0;
- return OBJ_NONE < oid_object_info(the_repository, &oid, NULL);
+ return OBJ_NONE < odb_read_object_info(the_repository->objects, &oid, NULL);
}
static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata)
@@ -848,7 +841,7 @@ static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata)
oidcpy(&oid, oid_ret);
while (1) {
struct object *obj;
- int kind = oid_object_info(r, &oid, NULL);
+ int kind = odb_read_object_info(r->objects, &oid, NULL);
if (kind == OBJ_COMMIT) {
oidcpy(oid_ret, &oid);
return 0;
@@ -947,7 +940,7 @@ int cmd_blame(int argc,
const char *const *opt_usage = cmd_is_annotate ? annotate_opt_usage : blame_opt_usage;
setup_default_color_by_age();
- git_config(git_blame_config, &output_option);
+ repo_config(the_repository, git_blame_config, &output_option);
repo_init_revisions(the_repository, &revs, NULL);
revs.date_mode = blame_date_mode;
revs.diffopt.flags.allow_textconv = 1;
diff --git a/builtin/branch.c b/builtin/branch.c
index c150131..fa5ced4 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -699,7 +699,7 @@ static int edit_branch_description(const char *branch_name)
strbuf_addf(&name, "branch.%s.description", branch_name);
if (buf.len || exists)
- git_config_set(name.buf, buf.len ? buf.buf : NULL);
+ repo_config_set(the_repository, name.buf, buf.len ? buf.buf : NULL);
strbuf_release(&name);
strbuf_release(&buf);
@@ -791,7 +791,7 @@ int cmd_branch(int argc,
* Try to set sort keys from config. If config does not set any,
* fall back on default (refname) sorting.
*/
- git_config(git_branch_config, &sorting_options);
+ repo_config(the_repository, git_branch_config, &sorting_options);
if (!sorting_options.nr)
string_list_append(&sorting_options, "refname");
@@ -987,10 +987,10 @@ int cmd_branch(int argc,
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.remote", branch->name);
- git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.merge", branch->name);
- git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
strbuf_release(&buf);
} else if (!noncreate_actions && argc > 0 && argc <= 2) {
const char *branch_name = argv[0];
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 67a5ff2..fce0b06 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -24,7 +24,7 @@
#include "pack-bitmap.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "mailmap.h"
@@ -74,7 +74,7 @@ static int filter_object(const char *path, unsigned mode,
{
enum object_type type;
- *buf = repo_read_object_file(the_repository, oid, &type, size);
+ *buf = odb_read_object(the_repository->objects, oid, &type, size);
if (!*buf)
return error(_("cannot read object %s '%s'"),
oid_to_hex(oid), path);
@@ -132,7 +132,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
switch (opt) {
case 't':
oi.typep = &type;
- if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0)
+ if (odb_read_object_info_extended(the_repository->objects, &oid, &oi, flags) < 0)
die("git cat-file: could not get object info");
printf("%s\n", type_name(type));
ret = 0;
@@ -146,7 +146,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
oi.contentp = (void**)&buf;
}
- if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0)
+ if (odb_read_object_info_extended(the_repository->objects, &oid, &oi, flags) < 0)
die("git cat-file: could not get object info");
if (use_mailmap && (type == OBJ_COMMIT || type == OBJ_TAG)) {
@@ -160,8 +160,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
goto cleanup;
case 'e':
- ret = !has_object(the_repository, &oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR);
+ ret = !odb_has_object(the_repository->objects, &oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR);
goto cleanup;
case 'w':
@@ -180,7 +180,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
/* else fallthrough */
case 'p':
- type = oid_object_info(the_repository, &oid, NULL);
+ type = odb_read_object_info(the_repository->objects, &oid, NULL);
if (type < 0)
die("Not a valid object name %s", obj_name);
@@ -197,8 +197,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
ret = stream_blob(&oid);
goto cleanup;
}
- buf = repo_read_object_file(the_repository, &oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects, &oid,
+ &type, &size);
if (!buf)
die("Cannot read object %s", obj_name);
@@ -217,11 +217,10 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
if (exp_type_id == OBJ_BLOB) {
struct object_id blob_oid;
- if (oid_object_info(the_repository, &oid, NULL) == OBJ_TAG) {
- char *buffer = repo_read_object_file(the_repository,
- &oid,
- &type,
- &size);
+ if (odb_read_object_info(the_repository->objects,
+ &oid, NULL) == OBJ_TAG) {
+ char *buffer = odb_read_object(the_repository->objects,
+ &oid, &type, &size);
const char *target;
if (!buffer)
@@ -235,7 +234,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
} else
oidcpy(&blob_oid, &oid);
- if (oid_object_info(the_repository, &blob_oid, NULL) == OBJ_BLOB) {
+ if (odb_read_object_info(the_repository->objects,
+ &blob_oid, NULL) == OBJ_BLOB) {
ret = stream_blob(&blob_oid);
goto cleanup;
}
@@ -246,8 +246,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
* fall-back to the usual case.
*/
}
- buf = read_object_with_reference(the_repository, &oid,
- exp_type_id, &size, NULL);
+ buf = odb_read_object_peeled(the_repository->objects, &oid,
+ exp_type_id, &size, NULL);
if (use_mailmap) {
size_t s = size;
@@ -275,6 +275,7 @@ struct expand_data {
struct object_id oid;
enum object_type type;
unsigned long size;
+ unsigned short mode;
off_t disk_size;
const char *rest;
struct object_id delta_base_oid;
@@ -294,7 +295,7 @@ struct expand_data {
/*
* After a mark_query run, this object_info is set up to be
- * passed to oid_object_info_extended. It will point to the data
+ * passed to odb_read_object_info_extended. It will point to the data
* elements above, so you can retrieve the response from there.
*/
struct object_info info;
@@ -306,6 +307,7 @@ struct expand_data {
*/
unsigned skip_object_info : 1;
};
+#define EXPAND_DATA_INIT { .mode = S_IFINVALID }
static int is_atom(const char *atom, const char *s, int slen)
{
@@ -345,6 +347,9 @@ static int expand_atom(struct strbuf *sb, const char *atom, int len,
else
strbuf_addstr(sb,
oid_to_hex(&data->delta_base_oid));
+ } else if (is_atom("objectmode", atom, len)) {
+ if (!data->mark_query && !(S_IFINVALID == data->mode))
+ strbuf_addf(sb, "%06o", data->mode);
} else
return 0;
return 1;
@@ -401,10 +406,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
if (!textconv_object(the_repository,
data->rest, 0100644, oid,
1, &contents, &size))
- contents = repo_read_object_file(the_repository,
- oid,
- &type,
- &size);
+ contents = odb_read_object(the_repository->objects,
+ oid, &type, &size);
if (!contents)
die("could not convert '%s' %s",
oid_to_hex(oid), data->rest);
@@ -421,8 +424,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
unsigned long size;
void *contents;
- contents = repo_read_object_file(the_repository, oid, &type,
- &size);
+ contents = odb_read_object(the_repository->objects, oid,
+ &type, &size);
if (!contents)
die("object %s disappeared", oid_to_hex(oid));
@@ -484,14 +487,17 @@ static void batch_object_write(const char *obj_name,
data->info.sizep = &data->size;
if (pack)
- ret = packed_object_info(the_repository, pack, offset,
- &data->info);
+ ret = packed_object_info(the_repository, pack,
+ offset, &data->info);
else
- ret = oid_object_info_extended(the_repository,
- &data->oid, &data->info,
- OBJECT_INFO_LOOKUP_REPLACE);
+ ret = odb_read_object_info_extended(the_repository->objects,
+ &data->oid, &data->info,
+ OBJECT_INFO_LOOKUP_REPLACE);
if (ret < 0) {
- report_object_status(opt, obj_name, &data->oid, "missing");
+ if (data->mode == S_IFGITLINK)
+ report_object_status(opt, oid_to_hex(&data->oid), &data->oid, "submodule");
+ else
+ report_object_status(opt, obj_name, &data->oid, "missing");
return;
}
@@ -531,8 +537,8 @@ static void batch_object_write(const char *obj_name,
size_t s = data->size;
char *buf = NULL;
- buf = repo_read_object_file(the_repository, &data->oid, &data->type,
- &data->size);
+ buf = odb_read_object(the_repository->objects, &data->oid,
+ &data->type, &data->size);
if (!buf)
die(_("unable to read %s"), oid_to_hex(&data->oid));
buf = replace_idents_using_mailmap(buf, &s);
@@ -613,6 +619,7 @@ static void batch_one_object(const char *obj_name,
goto out;
}
+ data->mode = ctx.mode;
batch_object_write(obj_name, scratch, opt, data, NULL, 0);
out:
@@ -841,7 +848,7 @@ static void batch_each_object(struct batch_options *opt,
};
struct bitmap_index *bitmap = prepare_bitmap_git(the_repository);
- for_each_loose_object(batch_one_object_loose, &payload, 0);
+ for_each_loose_object(the_repository->objects, batch_one_object_loose, &payload, 0);
if (bitmap && !for_each_bitmapped_object(bitmap, &opt->objects_filter,
batch_one_object_bitmapped, &payload)) {
@@ -866,16 +873,15 @@ static int batch_objects(struct batch_options *opt)
{
struct strbuf input = STRBUF_INIT;
struct strbuf output = STRBUF_INIT;
- struct expand_data data;
+ struct expand_data data = EXPAND_DATA_INIT;
int save_warning;
int retval = 0;
/*
* Expand once with our special mark_query flag, which will prime the
- * object_info to be handed to oid_object_info_extended for each
+ * object_info to be handed to odb_read_object_info_extended for each
* object.
*/
- memset(&data, 0, sizeof(data));
data.mark_query = 1;
expand_format(&output,
opt->format ? opt->format : DEFAULT_FORMAT,
@@ -1089,7 +1095,7 @@ int cmd_cat_file(int argc,
OPT_END()
};
- git_config(git_cat_file_config, NULL);
+ repo_config(the_repository, git_cat_file_config, NULL);
batch.buffer_output = -1;
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 7cf275b..51ed48c 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -119,7 +119,7 @@ int cmd_check_attr(int argc,
if (!is_bare_repository())
setup_work_tree();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_attr_options,
check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 7b7831d..644c9a4 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -2,6 +2,7 @@
#include "builtin.h"
#include "config.h"
#include "dir.h"
+#include "environment.h"
#include "gettext.h"
#include "quote.h"
#include "pathspec.h"
@@ -159,7 +160,7 @@ int cmd_check_ignore(int argc,
int num_ignored;
struct dir_struct dir = DIR_INIT;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_ignore_options,
check_ignore_usage, 0);
diff --git a/builtin/check-mailmap.c b/builtin/check-mailmap.c
index be2cebe..9cc5c59 100644
--- a/builtin/check-mailmap.c
+++ b/builtin/check-mailmap.c
@@ -1,6 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "ident.h"
#include "mailmap.h"
@@ -56,7 +57,7 @@ int cmd_check_mailmap(int argc,
int i;
struct string_list mailmap = STRING_LIST_INIT_NODUP;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_mailmap_options,
check_mailmap_usage, 0);
if (argc == 0 && !use_stdin)
diff --git a/builtin/checkout--worker.c b/builtin/checkout--worker.c
index da9345a..e0772b7 100644
--- a/builtin/checkout--worker.c
+++ b/builtin/checkout--worker.c
@@ -4,6 +4,7 @@
#include "builtin.h"
#include "config.h"
#include "entry.h"
+#include "environment.h"
#include "gettext.h"
#include "parallel-checkout.h"
#include "parse-options.h"
@@ -132,7 +133,7 @@ int cmd_checkout__worker(int argc,
checkout_worker_usage,
checkout_worker_options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, checkout_worker_options,
checkout_worker_usage, 0);
if (argc > 0)
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 7f74bc7..188128a 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -9,6 +9,7 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "lockfile.h"
#include "quote.h"
diff --git a/builtin/checkout.c b/builtin/checkout.c
index d185982..f945347 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -20,7 +20,7 @@
#include "merge-ort-wrappers.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
@@ -61,6 +61,8 @@ static const char * const restore_usage[] = {
struct checkout_opts {
int patch_mode;
+ int patch_context;
+ int patch_interhunk_context;
int quiet;
int merge;
int force;
@@ -104,7 +106,12 @@ struct checkout_opts {
struct tree *source_tree;
};
-#define CHECKOUT_OPTS_INIT { .conflict_style = -1, .merge = -1 }
+#define CHECKOUT_OPTS_INIT { \
+ .conflict_style = -1, \
+ .merge = -1, \
+ .patch_context = -1, \
+ .patch_interhunk_context = -1, \
+}
struct branch_info {
char *name; /* The short name used */
@@ -291,7 +298,7 @@ static int checkout_merged(int pos, const struct checkout *state,
read_mmblob(&ours, &threeway[1]);
read_mmblob(&theirs, &threeway[2]);
- git_config_get_bool("merge.renormalize", &renormalize);
+ repo_config_get_bool(the_repository, "merge.renormalize", &renormalize);
ll_opts.renormalize = renormalize;
ll_opts.conflict_style = conflict_style;
merge_status = ll_merge(&result_buf, path, &ancestor, "base",
@@ -320,7 +327,7 @@ static int checkout_merged(int pos, const struct checkout *state,
* (it also writes the merge result to the object database even
* when it may contain conflicts).
*/
- if (write_object_file(result_buf.ptr, result_buf.size, OBJ_BLOB, &oid))
+ if (odb_write_object(the_repository->objects, result_buf.ptr, result_buf.size, OBJ_BLOB, &oid))
die(_("Unable to add merge result for '%s'"), path);
free(result_buf.ptr);
ce = make_transient_cache_entry(mode, &oid, path, 2, ce_mem_pool);
@@ -539,6 +546,10 @@ static int checkout_paths(const struct checkout_opts *opts,
if (opts->patch_mode) {
enum add_p_mode patch_mode;
+ struct add_p_opt add_p_opt = {
+ .context = opts->patch_context,
+ .interhunkcontext = opts->patch_interhunk_context,
+ };
const char *rev = new_branch_info->name;
char rev_oid[GIT_MAX_HEXSZ + 1];
@@ -564,8 +575,8 @@ static int checkout_paths(const struct checkout_opts *opts,
else
BUG("either flag must have been set, worktree=%d, index=%d",
opts->checkout_worktree, opts->checkout_index);
- return !!run_add_p(the_repository, patch_mode, rev,
- &opts->pathspec);
+ return !!run_add_p(the_repository, patch_mode, &add_p_opt,
+ rev, &opts->pathspec);
}
repo_hold_locked_index(the_repository, &lock_file, LOCK_DIE_ON_ERROR);
@@ -838,7 +849,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
init_tree_desc(&trees[0], &tree->object.oid,
tree->buffer, tree->size);
if (parse_tree(new_tree) < 0)
- exit(128);
+ die(NULL);
tree = new_tree;
init_tree_desc(&trees[1], &tree->object.oid,
tree->buffer, tree->size);
@@ -913,7 +924,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
work,
old_tree);
if (ret < 0)
- exit(128);
+ die(NULL);
ret = reset_tree(new_tree,
opts, 0,
writeout_error, new_branch_info);
@@ -1738,6 +1749,8 @@ static struct option *add_checkout_path_options(struct checkout_opts *opts,
N_("checkout their version for unmerged files"),
3, PARSE_OPT_NONEG),
OPT_BOOL('p', "patch", &opts->patch_mode, N_("select hunks interactively")),
+ OPT_DIFF_UNIFIED(&opts->patch_context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&opts->patch_interhunk_context),
OPT_BOOL(0, "ignore-skip-worktree-bits", &opts->ignore_skipworktree,
N_("do not limit pathspecs to sparse entries only")),
OPT_PATHSPEC_FROM_FILE(&opts->pathspec_from_file),
@@ -1764,7 +1777,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
opts->prefix = prefix;
opts->show_progress = -1;
- git_config(git_checkout_config, opts);
+ repo_config(the_repository, git_checkout_config, opts);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
@@ -1780,6 +1793,18 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
argc = parse_options(argc, argv, prefix, options,
usagestr, parseopt_flags);
+ if (opts->patch_context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (opts->patch_interhunk_context < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
+ if (!opts->patch_mode) {
+ if (opts->patch_context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--patch");
+ if (opts->patch_interhunk_context != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--patch");
+ }
+
if (opts->show_progress < 0) {
if (opts->quiet)
opts->show_progress = 0;
diff --git a/builtin/clean.c b/builtin/clean.c
index 053c94f..a1977b9 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -13,6 +13,7 @@
#include "abspath.h"
#include "config.h"
#include "dir.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "path.h"
@@ -949,7 +950,7 @@ int cmd_clean(int argc,
OPT_END()
};
- git_config(git_clean_config, NULL);
+ repo_config(the_repository, git_clean_config, NULL);
argc = parse_options(argc, argv, prefix, options, builtin_clean_usage,
0);
diff --git a/builtin/clone.c b/builtin/clone.c
index 91b9cd0..c990f39 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -25,7 +25,7 @@
#include "refs.h"
#include "refspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "tree.h"
#include "tree-walk.h"
#include "unpack-trees.h"
@@ -171,7 +171,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
} else {
struct strbuf sb = STRBUF_INIT;
strbuf_addf(&sb, "%s/objects", ref_git);
- add_to_alternates_file(sb.buf);
+ odb_add_to_alternates_file(the_repository->objects, sb.buf);
strbuf_release(&sb);
}
@@ -212,12 +212,14 @@ static void copy_alternates(struct strbuf *src, const char *src_repo)
if (!line.len || line.buf[0] == '#')
continue;
if (is_absolute_path(line.buf)) {
- add_to_alternates_file(line.buf);
+ odb_add_to_alternates_file(the_repository->objects,
+ line.buf);
continue;
}
abs_path = mkpathdup("%s/objects/%s", src_repo, line.buf);
if (!normalize_path_copy(abs_path, abs_path))
- add_to_alternates_file(abs_path);
+ odb_add_to_alternates_file(the_repository->objects,
+ abs_path);
else
warning("skipping invalid relative alternate: %s/%s",
src_repo, line.buf);
@@ -352,7 +354,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)
struct strbuf alt = STRBUF_INIT;
get_common_dir(&alt, src_repo);
strbuf_addstr(&alt, "/objects");
- add_to_alternates_file(alt.buf);
+ odb_add_to_alternates_file(the_repository->objects, alt.buf);
strbuf_release(&alt);
} else {
struct strbuf src = STRBUF_INIT;
@@ -504,7 +506,7 @@ static void write_followtags(const struct ref *refs, const char *msg)
continue;
if (ends_with(ref->name, "^{}"))
continue;
- if (!has_object(the_repository, &ref->old_oid, 0))
+ if (!odb_has_object(the_repository->objects, &ref->old_oid, 0))
continue;
refs_update_ref(get_main_ref_store(the_repository), msg,
ref->name, &ref->old_oid, NULL, 0,
@@ -760,16 +762,16 @@ static int write_one_config(const char *key, const char *value,
{
/*
* give git_clone_config a chance to write config values back to the
- * environment, since git_config_set_multivar_gently only deals with
+ * environment, since repo_config_set_multivar_gently only deals with
* config-file writes
*/
int apply_failed = git_clone_config(key, value, ctx, data);
if (apply_failed)
return apply_failed;
- return git_config_set_multivar_gently(key,
- value ? value : "true",
- CONFIG_REGEX_NONE, 0);
+ return repo_config_set_multivar_gently(the_repository, key,
+ value ? value : "true",
+ CONFIG_REGEX_NONE, 0);
}
static void write_config(struct string_list *config)
@@ -820,12 +822,12 @@ static void write_refspec_config(const char *src_ref_prefix,
/* Configure the remote */
if (value.len) {
strbuf_addf(&key, "remote.%s.fetch", remote_name);
- git_config_set_multivar(key.buf, value.buf, "^$", 0);
+ repo_config_set_multivar(the_repository, key.buf, value.buf, "^$", 0);
strbuf_reset(&key);
if (option_mirror) {
strbuf_addf(&key, "remote.%s.mirror", remote_name);
- git_config_set(key.buf, "true");
+ repo_config_set(the_repository, key.buf, "true");
strbuf_reset(&key);
}
}
@@ -999,7 +1001,7 @@ int cmd_clone(int argc,
packet_trace_identity("clone");
- git_config(git_clone_config, NULL);
+ repo_config(the_repository, git_clone_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_clone_options,
builtin_clone_usage, 0);
@@ -1148,7 +1150,7 @@ int cmd_clone(int argc,
strbuf_reset(&sb);
}
- if (!git_config_get_bool("submodule.stickyRecursiveClone", &val) &&
+ if (!repo_config_get_bool(the_repository, "submodule.stickyRecursiveClone", &val) &&
val)
string_list_append(&option_config, "submodule.recurse=true");
@@ -1240,7 +1242,7 @@ int cmd_clone(int argc,
* re-read config after init_db and write_config to pick up any config
* injected by --template and --config, respectively.
*/
- git_config(git_clone_config, NULL);
+ repo_config(the_repository, git_clone_config, NULL);
/*
* If option_reject_shallow is specified from CLI option,
@@ -1292,18 +1294,18 @@ int cmd_clone(int argc,
src_ref_prefix = "refs/";
strbuf_addstr(&branch_top, src_ref_prefix);
- git_config_set("core.bare", "true");
+ repo_config_set(the_repository, "core.bare", "true");
} else if (!option_rev) {
strbuf_addf(&branch_top, "refs/remotes/%s/", remote_name);
}
strbuf_addf(&key, "remote.%s.url", remote_name);
- git_config_set(key.buf, repo);
+ repo_config_set(the_repository, key.buf, repo);
strbuf_reset(&key);
if (!option_tags) {
strbuf_addf(&key, "remote.%s.tagOpt", remote_name);
- git_config_set(key.buf, "--no-tags");
+ repo_config_set(the_repository, key.buf, "--no-tags");
strbuf_reset(&key);
}
@@ -1465,7 +1467,7 @@ int cmd_clone(int argc,
warning(_("failed to fetch objects from bundle URI '%s'"),
bundle_uri);
else if (has_heuristic)
- git_config_set_gently("fetch.bundleuri", bundle_uri);
+ repo_config_set_gently(the_repository, "fetch.bundleuri", bundle_uri);
remote_state_clear(the_repository->remote_state);
free(the_repository->remote_state);
diff --git a/builtin/column.c b/builtin/column.c
index ce6443d..87dce3c 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -42,9 +42,9 @@ int cmd_column(int argc,
/* This one is special and must be the first one */
if (argc > 1 && starts_with(argv[1], "--command=")) {
command = argv[1] + 10;
- git_config(column_config, (void *)command);
+ repo_config(the_repository, column_config, (void *)command);
} else
- git_config(column_config, NULL);
+ repo_config(the_repository, column_config, NULL);
memset(&copts, 0, sizeof(copts));
copts.padding = 1;
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index a783a86..4992ac1 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -2,11 +2,12 @@
#include "builtin.h"
#include "commit.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "commit-graph.h"
-#include "object-store.h"
+#include "odb.h"
#include "progress.h"
#include "replace-object.h"
#include "strbuf.h"
@@ -66,7 +67,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
struct repository *repo UNUSED)
{
struct commit_graph *graph = NULL;
- struct object_directory *odb = NULL;
+ struct odb_source *source = NULL;
char *graph_name;
char *chain_name;
enum { OPENED_NONE, OPENED_GRAPH, OPENED_CHAIN } opened = OPENED_NONE;
@@ -101,9 +102,9 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
if (opts.progress)
flags |= COMMIT_GRAPH_WRITE_PROGRESS;
- odb = find_odb(the_repository, opts.obj_dir);
- graph_name = get_commit_graph_filename(odb);
- chain_name = get_commit_graph_chain_filename(odb);
+ source = odb_find_source(the_repository->objects, opts.obj_dir);
+ graph_name = get_commit_graph_filename(source);
+ chain_name = get_commit_graph_chain_filename(source);
if (open_commit_graph(graph_name, &fd, &st))
opened = OPENED_GRAPH;
else if (errno != ENOENT)
@@ -120,7 +121,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
if (opened == OPENED_NONE)
return 0;
else if (opened == OPENED_GRAPH)
- graph = load_commit_graph_one_fd_st(the_repository, fd, &st, odb);
+ graph = load_commit_graph_one_fd_st(the_repository, fd, &st, source);
else
graph = load_commit_graph_chain_fd_st(the_repository, fd, &st,
&incomplete_chain);
@@ -221,7 +222,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
struct string_list pack_indexes = STRING_LIST_INIT_DUP;
struct strbuf buf = STRBUF_INIT;
struct oidset commits = OIDSET_INIT;
- struct object_directory *odb = NULL;
+ struct odb_source *source = NULL;
int result = 0;
enum commit_graph_write_flags flags = 0;
struct progress *progress = NULL;
@@ -265,7 +266,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
trace2_cmd_mode("write");
- git_config(git_commit_graph_write_config, &opts);
+ repo_config(the_repository, git_commit_graph_write_config, &opts);
argc = parse_options(argc, argv, prefix,
options,
@@ -289,10 +290,10 @@ static int graph_write(int argc, const char **argv, const char *prefix,
git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0))
flags |= COMMIT_GRAPH_WRITE_BLOOM_FILTERS;
- odb = find_odb(the_repository, opts.obj_dir);
+ source = odb_find_source(the_repository->objects, opts.obj_dir);
if (opts.reachable) {
- if (write_commit_graph_reachable(odb, flags, &write_opts))
+ if (write_commit_graph_reachable(source, flags, &write_opts))
result = 1;
goto cleanup;
}
@@ -311,6 +312,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
while (strbuf_getline(&buf, stdin) != EOF) {
if (read_one_commit(&commits, progress, buf.buf)) {
result = 1;
+ stop_progress(&progress);
goto cleanup;
}
}
@@ -318,7 +320,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
stop_progress(&progress);
}
- if (write_commit_graph(odb,
+ if (write_commit_graph(source,
opts.stdin_packs ? &pack_indexes : NULL,
opts.stdin_commits ? &commits : NULL,
flags,
@@ -346,7 +348,7 @@ int cmd_commit_graph(int argc,
};
struct option *options = parse_options_concat(builtin_commit_graph_options, common_opts);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
disable_replace_refs();
save_commit_buffer = 0;
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index ad6b2c9..5189e68 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -6,10 +6,11 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "parse-options.h"
@@ -48,7 +49,7 @@ static int parse_parent_arg_callback(const struct option *opt,
if (repo_get_oid_commit(the_repository, arg, &oid))
die(_("not a valid object name %s"), arg);
- assert_oid_type(&oid, OBJ_COMMIT);
+ odb_assert_oid_type(the_repository->objects, &oid, OBJ_COMMIT);
new_parent(lookup_commit(the_repository, &oid), parents);
return 0;
}
@@ -125,7 +126,7 @@ int cmd_commit_tree(int argc,
};
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
show_usage_with_options_if_asked(argc, argv,
commit_tree_usage, options);
diff --git a/builtin/commit.c b/builtin/commit.c
index fba0dde..b5b9608 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -19,6 +19,7 @@
#include "environment.h"
#include "diff.h"
#include "commit.h"
+#include "add-interactive.h"
#include "gettext.h"
#include "revision.h"
#include "wt-status.h"
@@ -122,6 +123,7 @@ static const char *edit_message, *use_message;
static char *fixup_message, *fixup_commit, *squash_message;
static const char *fixup_prefix;
static int all, also, interactive, patch_interactive, only, amend, signoff;
+static struct add_p_opt add_p_opt = ADD_P_OPT_INIT;
static int edit_flag = -1; /* unspecified */
static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship;
static int config_commit_verbose = -1; /* unspecified */
@@ -207,9 +209,9 @@ static void status_init_config(struct wt_status *s, config_fn_t fn)
{
wt_status_prepare(the_repository, s);
init_diff_ui_defaults();
- git_config(fn, s);
+ repo_config(the_repository, fn, s);
determine_whence(s);
- s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after git_config() */
+ s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after repo_config() */
}
static void rollback_index_files(void)
@@ -354,6 +356,11 @@ static const char *prepare_index(const char **argv, const char *prefix,
const char *ret;
char *path = NULL;
+ if (add_p_opt.context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (add_p_opt.interhunkcontext < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
if (is_status)
refresh_flags |= REFRESH_UNMERGED;
parse_pathspec(&pathspec, 0,
@@ -400,7 +407,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
old_index_env = xstrdup_or_null(getenv(INDEX_ENVIRONMENT));
setenv(INDEX_ENVIRONMENT, the_repository->index_file, 1);
- if (interactive_add(the_repository, argv, prefix, patch_interactive) != 0)
+ if (interactive_add(the_repository, argv, prefix, patch_interactive, &add_p_opt) != 0)
die(_("interactive add failed"));
the_repository->index_file = old_repo_index_file;
@@ -424,6 +431,11 @@ static const char *prepare_index(const char **argv, const char *prefix,
commit_style = COMMIT_NORMAL;
ret = get_lock_file_path(&index_lock);
goto out;
+ } else {
+ if (add_p_opt.context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--interactive/--patch");
+ if (add_p_opt.interhunkcontext != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--interactive/--patch");
}
/*
@@ -688,6 +700,10 @@ static void adjust_comment_line_char(const struct strbuf *sb)
char candidates[] = "#;@!$%^&|:";
char *candidate;
const char *p;
+ size_t cutoff;
+
+ /* Ignore comment chars in trailing comments (e.g., Conflicts:) */
+ cutoff = sb->len - ignored_log_message_bytes(sb->buf, sb->len);
if (!memchr(sb->buf, candidates[0], sb->len)) {
free(comment_line_str_to_free);
@@ -700,7 +716,7 @@ static void adjust_comment_line_char(const struct strbuf *sb)
candidate = strchr(candidates, *p);
if (candidate)
*candidate = ' ';
- for (p = sb->buf; *p; p++) {
+ for (p = sb->buf; p + 1 < sb->buf + cutoff; p++) {
if ((p[0] == '\n' || p[0] == '\r') && p[1]) {
candidate = strchr(candidates, p[1]);
if (candidate)
@@ -1722,6 +1738,8 @@ int cmd_commit(int argc,
OPT_BOOL('i', "include", &also, N_("add specified files to index for commit")),
OPT_BOOL(0, "interactive", &interactive, N_("interactively add files")),
OPT_BOOL('p', "patch", &patch_interactive, N_("interactively add changes")),
+ OPT_DIFF_UNIFIED(&add_p_opt.context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&add_p_opt.interhunkcontext),
OPT_BOOL('o', "only", &only, N_("commit only specified files")),
OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit and commit-msg hooks")),
OPT_BOOL(0, "dry-run", &dry_run, N_("show what would be committed")),
diff --git a/builtin/config.c b/builtin/config.c
index f70d635..59fb113 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -17,9 +17,9 @@
static const char *const builtin_config_usage[] = {
N_("git config list [<file-option>] [<display-option>] [--includes]"),
- N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
- N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
- N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
+ N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name>"),
+ N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"),
+ N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"),
N_("git config rename-section [<file-option>] <old-name> <new-name>"),
N_("git config remove-section [<file-option>] <name>"),
N_("git config edit [<file-option>]"),
@@ -33,17 +33,17 @@ static const char *const builtin_config_list_usage[] = {
};
static const char *const builtin_config_get_usage[] = {
- N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
+ N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<pattern>] [--fixed-value] [--default=<default>] <name>"),
NULL
};
static const char *const builtin_config_set_usage[] = {
- N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
+ N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"),
NULL
};
static const char *const builtin_config_unset_usage[] = {
- N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
+ N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"),
NULL
};
@@ -966,12 +966,12 @@ static int cmd_config_set(int argc, const char **argv, const char *prefix,
value = normalize_value(argv[0], argv[1], type, &default_kvi);
if ((flags & CONFIG_FLAGS_MULTI_REPLACE) || value_pattern) {
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], value, value_pattern,
- comment, flags);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], value, value_pattern,
+ comment, flags);
} else {
- ret = git_config_set_in_file_gently(location_opts.source.file,
- argv[0], comment, value);
+ ret = repo_config_set_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], comment, value);
if (ret == CONFIG_NOTHING_SET)
error(_("cannot overwrite multiple values with a single value\n"
" Use a regexp, --add or --replace-all to change %s."), argv[0]);
@@ -1010,12 +1010,12 @@ static int cmd_config_unset(int argc, const char **argv, const char *prefix,
check_write(&location_opts.source);
if ((flags & CONFIG_FLAGS_MULTI_REPLACE) || value_pattern)
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], NULL, value_pattern,
- NULL, flags);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], NULL, value_pattern,
+ NULL, flags);
else
- ret = git_config_set_in_file_gently(location_opts.source.file, argv[0],
- NULL, NULL);
+ ret = repo_config_set_in_file_gently(the_repository, location_opts.source.file, argv[0],
+ NULL, NULL);
location_options_release(&location_opts);
return ret;
@@ -1091,7 +1091,7 @@ static int show_editor(struct config_location_options *opts)
die(_("editing stdin is not supported"));
if (opts->source.blob)
die(_("editing blobs is not supported"));
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
config_file = opts->source.file ?
xstrdup(opts->source.file) :
repo_git_path(the_repository, "config");
@@ -1296,7 +1296,7 @@ static int cmd_config_actions(int argc, const char **argv, const char *prefix)
check_write(&location_opts.source);
check_argc(argc, 2, 2);
value = normalize_value(argv[0], argv[1], display_opts.type, &default_kvi);
- ret = git_config_set_in_file_gently(location_opts.source.file, argv[0], comment, value);
+ ret = repo_config_set_in_file_gently(the_repository, location_opts.source.file, argv[0], comment, value);
if (ret == CONFIG_NOTHING_SET)
error(_("cannot overwrite multiple values with a single value\n"
" Use a regexp, --add or --replace-all to change %s."), argv[0]);
@@ -1305,26 +1305,26 @@ static int cmd_config_actions(int argc, const char **argv, const char *prefix)
check_write(&location_opts.source);
check_argc(argc, 2, 3);
value = normalize_value(argv[0], argv[1], display_opts.type, &default_kvi);
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], value, argv[2],
- comment, flags);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], value, argv[2],
+ comment, flags);
}
else if (actions == ACTION_ADD) {
check_write(&location_opts.source);
check_argc(argc, 2, 2);
value = normalize_value(argv[0], argv[1], display_opts.type, &default_kvi);
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], value,
- CONFIG_REGEX_NONE,
- comment, flags);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], value,
+ CONFIG_REGEX_NONE,
+ comment, flags);
}
else if (actions == ACTION_REPLACE_ALL) {
check_write(&location_opts.source);
check_argc(argc, 2, 3);
value = normalize_value(argv[0], argv[1], display_opts.type, &default_kvi);
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], value, argv[2],
- comment, flags | CONFIG_FLAGS_MULTI_REPLACE);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], value, argv[2],
+ comment, flags | CONFIG_FLAGS_MULTI_REPLACE);
}
else if (actions == ACTION_GET) {
check_argc(argc, 1, 2);
@@ -1350,19 +1350,19 @@ static int cmd_config_actions(int argc, const char **argv, const char *prefix)
check_write(&location_opts.source);
check_argc(argc, 1, 2);
if (argc == 2)
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], NULL, argv[1],
- NULL, flags);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], NULL, argv[1],
+ NULL, flags);
else
- ret = git_config_set_in_file_gently(location_opts.source.file,
- argv[0], NULL, NULL);
+ ret = repo_config_set_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], NULL, NULL);
}
else if (actions == ACTION_UNSET_ALL) {
check_write(&location_opts.source);
check_argc(argc, 1, 2);
- ret = git_config_set_multivar_in_file_gently(location_opts.source.file,
- argv[0], NULL, argv[1],
- NULL, flags | CONFIG_FLAGS_MULTI_REPLACE);
+ ret = repo_config_set_multivar_in_file_gently(the_repository, location_opts.source.file,
+ argv[0], NULL, argv[1],
+ NULL, flags | CONFIG_FLAGS_MULTI_REPLACE);
}
else if (actions == ACTION_RENAME_SECTION) {
check_write(&location_opts.source);
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index a88c0c9..a61d3b4 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -7,6 +7,7 @@
#include "builtin.h"
#include "config.h"
#include "dir.h"
+#include "environment.h"
#include "gettext.h"
#include "path.h"
#include "parse-options.h"
@@ -80,10 +81,10 @@ static int count_cruft(const char *basename UNUSED, const char *path,
return 0;
}
-static int print_alternate(struct object_directory *odb, void *data UNUSED)
+static int print_alternate(struct odb_source *alternate, void *data UNUSED)
{
printf("alternate: ");
- quote_c_style(odb->path, NULL, stdout, 0);
+ quote_c_style(alternate->path, NULL, stdout, 0);
putchar('\n');
return 0;
}
@@ -106,7 +107,7 @@ int cmd_count_objects(int argc,
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, opts, count_objects_usage, 0);
/* we do not take arguments other than flags for now */
@@ -117,7 +118,7 @@ int cmd_count_objects(int argc,
report_linked_checkout_garbage(the_repository);
}
- for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
+ for_each_loose_file_in_source(the_repository->objects->sources,
count_loose, count_cruft, NULL, NULL);
if (verbose) {
@@ -159,7 +160,7 @@ int cmd_count_objects(int argc,
printf("prune-packable: %lu\n", packed_loose);
printf("garbage: %lu\n", garbage);
printf("size-garbage: %s\n", garbage_buf.buf);
- foreach_alt_odb(print_alternate, NULL);
+ odb_for_each_alternate(the_repository->objects, print_alternate, NULL);
strbuf_release(&loose_buf);
strbuf_release(&pack_buf);
strbuf_release(&garbage_buf);
diff --git a/builtin/credential-cache--daemon.c b/builtin/credential-cache--daemon.c
index 5065ff4..65cc619 100644
--- a/builtin/credential-cache--daemon.c
+++ b/builtin/credential-cache--daemon.c
@@ -307,7 +307,7 @@ int cmd_credential_cache_daemon(int argc,
OPT_END()
};
- git_config_get_bool("credentialcache.ignoresighup", &ignore_sighup);
+ repo_config_get_bool(the_repository, "credentialcache.ignoresighup", &ignore_sighup);
argc = parse_options(argc, argv, prefix, options, usage, 0);
socket_path = argv[0];
diff --git a/builtin/credential-store.c b/builtin/credential-store.c
index e669e99..b74e06c 100644
--- a/builtin/credential-store.c
+++ b/builtin/credential-store.c
@@ -66,7 +66,7 @@ static void rewrite_credential_file(const char *fn, struct credential *c,
{
int timeout_ms = 1000;
- git_config_get_int("credentialstore.locktimeoutms", &timeout_ms);
+ repo_config_get_int(the_repository, "credentialstore.locktimeoutms", &timeout_ms);
if (hold_lock_file_for_update_timeout(&credential_lock, fn, 0, timeout_ms) < 0)
die_errno(_("unable to get credential storage lock in %d ms"), timeout_ms);
if (extra)
diff --git a/builtin/credential.c b/builtin/credential.c
index 2e11b15..a295c80 100644
--- a/builtin/credential.c
+++ b/builtin/credential.c
@@ -3,6 +3,7 @@
#include "git-compat-util.h"
#include "credential.h"
#include "builtin.h"
+#include "environment.h"
#include "config.h"
static const char usage_msg[] =
@@ -16,7 +17,7 @@ int cmd_credential(int argc,
const char *op;
struct credential c = CREDENTIAL_INIT;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
show_usage_if_asked(argc, argv, usage_msg);
if (argc != 2)
diff --git a/builtin/describe.c b/builtin/describe.c
index 2d50883..d7dd813 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -19,7 +19,7 @@
#include "setup.h"
#include "strvec.h"
#include "run-command.h"
-#include "object-store.h"
+#include "odb.h"
#include "list-objects.h"
#include "commit-slab.h"
#include "wildmatch.h"
@@ -552,7 +552,8 @@ static void describe(const char *arg, int last_one)
if (cmit)
describe_commit(&oid, &sb);
- else if (oid_object_info(the_repository, &oid, NULL) == OBJ_BLOB)
+ else if (odb_read_object_info(the_repository->objects,
+ &oid, NULL) == OBJ_BLOB)
describe_blob(oid, &sb);
else
die(_("%s is neither a commit nor blob"), arg);
@@ -622,7 +623,7 @@ int cmd_describe(int argc,
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, describe_usage, 0);
if (abbrev < 0)
abbrev = DEFAULT_ABBREV;
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 99b1749..ea91347 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -31,7 +31,7 @@ int cmd_diff_files(int argc,
show_usage_if_asked(argc, argv, diff_files_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index 81c0bc8..522dacf 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -28,7 +28,7 @@ int cmd_diff_index(int argc,
show_usage_if_asked(argc, argv, diff_cache_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index e31cc79..49dd4d0 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -124,7 +124,7 @@ int cmd_diff_tree(int argc,
show_usage_if_asked(argc, argv, diff_tree_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
diff --git a/builtin/diff.c b/builtin/diff.c
index fa96380..9a89e25 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -35,7 +35,7 @@ static const char builtin_diff_usage[] =
" or: git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]\n"
" or: git diff [<options>] <commit>...<commit> [--] [<path>...]\n"
" or: git diff [<options>] <blob> <blob>\n"
-" or: git diff [<options>] --no-index [--] <path> <path>"
+" or: git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]"
"\n"
COMMON_DIFF_OPTIONS_HELP;
@@ -483,10 +483,10 @@ int cmd_diff(int argc,
* configurable via a command line option.
*/
if (nongit)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
init_diff_ui_defaults();
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
prefix = precompose_argv_prefix(argc, argv, prefix);
repo_init_revisions(the_repository, &rev, prefix);
diff --git a/builtin/difftool.c b/builtin/difftool.c
index a3b64ce..e4bc1f8 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -30,7 +30,7 @@
#include "strbuf.h"
#include "lockfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "dir.h"
#include "entry.h"
#include "setup.h"
@@ -320,7 +320,7 @@ static char *get_symlink(struct repository *repo,
} else {
enum object_type type;
unsigned long size;
- data = repo_read_object_file(repo, oid, &type, &size);
+ data = odb_read_object(repo->objects, oid, &type, &size);
if (!data)
die(_("could not read object %s for symlink %s"),
oid_to_hex(oid), path);
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index fcf6b00..c06ee0b 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -9,12 +9,13 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "refspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "object.h"
#include "tag.h"
@@ -29,6 +30,7 @@
#include "quote.h"
#include "remote.h"
#include "blob.h"
+#include "gpg-interface.h"
static const char *const fast_export_usage[] = {
N_("git fast-export [<rev-list-opts>]"),
@@ -323,7 +325,7 @@ static void export_blob(const struct object_id *oid)
object = (struct object *)lookup_blob(the_repository, oid);
eaten = 0;
} else {
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf)
die("could not read blob %s", oid_to_hex(oid));
if (check_object_signature(the_repository, oid, buf, size,
@@ -652,6 +654,38 @@ static const char *find_commit_multiline_header(const char *msg,
return strbuf_detach(&val, NULL);
}
+static void print_signature(const char *signature, const char *object_hash)
+{
+ if (!signature)
+ return;
+
+ printf("gpgsig %s %s\ndata %u\n%s\n",
+ object_hash,
+ get_signature_format(signature),
+ (unsigned)strlen(signature),
+ signature);
+}
+
+static const char *append_signatures_for_header(struct string_list *signatures,
+ const char *pos,
+ const char *header,
+ const char *object_hash)
+{
+ const char *signature;
+ const char *start = pos;
+ const char *end = pos;
+
+ while ((signature = find_commit_multiline_header(start + 1,
+ header,
+ &end))) {
+ string_list_append(signatures, signature)->util = (void *)object_hash;
+ free((char *)signature);
+ start = end;
+ }
+
+ return end;
+}
+
static void handle_commit(struct commit *commit, struct rev_info *rev,
struct string_list *paths_of_changed_objects)
{
@@ -660,7 +694,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
const char *author, *author_end, *committer, *committer_end;
const char *encoding = NULL;
size_t encoding_len;
- const char *signature_alg = NULL, *signature = NULL;
+ struct string_list signatures = STRING_LIST_INIT_DUP;
const char *message;
char *reencoded = NULL;
struct commit_list *p;
@@ -700,10 +734,11 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
}
if (*commit_buffer_cursor == '\n') {
- if ((signature = find_commit_multiline_header(commit_buffer_cursor + 1, "gpgsig", &commit_buffer_cursor)))
- signature_alg = "sha1";
- else if ((signature = find_commit_multiline_header(commit_buffer_cursor + 1, "gpgsig-sha256", &commit_buffer_cursor)))
- signature_alg = "sha256";
+ const char *after_sha1 = append_signatures_for_header(&signatures, commit_buffer_cursor,
+ "gpgsig", "sha1");
+ const char *after_sha256 = append_signatures_for_header(&signatures, commit_buffer_cursor,
+ "gpgsig-sha256", "sha256");
+ commit_buffer_cursor = (after_sha1 > after_sha256) ? after_sha1 : after_sha256;
}
message = strstr(commit_buffer_cursor, "\n\n");
@@ -769,30 +804,30 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
printf("%.*s\n%.*s\n",
(int)(author_end - author), author,
(int)(committer_end - committer), committer);
- if (signature) {
+ if (signatures.nr) {
switch (signed_commit_mode) {
case SIGN_ABORT:
die("encountered signed commit %s; use "
"--signed-commits=<mode> to handle it",
oid_to_hex(&commit->object.oid));
case SIGN_WARN_VERBATIM:
- warning("exporting signed commit %s",
- oid_to_hex(&commit->object.oid));
+ warning("exporting %"PRIuMAX" signature(s) for commit %s",
+ (uintmax_t)signatures.nr, oid_to_hex(&commit->object.oid));
/* fallthru */
case SIGN_VERBATIM:
- printf("gpgsig %s\ndata %u\n%s",
- signature_alg,
- (unsigned)strlen(signature),
- signature);
+ for (size_t i = 0; i < signatures.nr; i++) {
+ struct string_list_item *item = &signatures.items[i];
+ print_signature(item->string, item->util);
+ }
break;
case SIGN_WARN_STRIP:
- warning("stripping signature from commit %s",
+ warning("stripping signature(s) from commit %s",
oid_to_hex(&commit->object.oid));
/* fallthru */
case SIGN_STRIP:
break;
}
- free((char *)signature);
+ string_list_clear(&signatures, 0);
}
if (!reencoded && encoding)
printf("encoding %.*s\n", (int)encoding_len, encoding);
@@ -869,8 +904,8 @@ static void handle_tag(const char *name, struct tag *tag)
return;
}
- buf = repo_read_object_file(the_repository, &tag->object.oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects, &tag->object.oid,
+ &type, &size);
if (!buf)
die("could not read tag %s", oid_to_hex(&tag->object.oid));
message = memmem(buf, size, "\n\n", 2);
@@ -1200,7 +1235,7 @@ static void import_marks(char *input_file, int check_exists)
if (last_idnum < mark)
last_idnum = mark;
- type = oid_object_info(the_repository, &oid, NULL);
+ type = odb_read_object_info(the_repository->objects, &oid, NULL);
if (type < 0)
die("object not found: %s", oid_to_hex(&oid));
@@ -1327,7 +1362,7 @@ int cmd_fast_export(int argc,
usage_with_options (fast_export_usage, options);
/* we handle encodings */
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
repo_init_revisions(the_repository, &revs, prefix);
init_revision_sources(&revision_sources);
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index b2839c5..2c35f93 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -24,11 +24,12 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "mem-pool.h"
#include "commit-reach.h"
#include "khash.h"
#include "date.h"
+#include "gpg-interface.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
@@ -763,7 +764,8 @@ static void start_packfile(void)
struct packed_git *p;
int pack_fd;
- pack_fd = odb_mkstemp(&tmp_file, "pack/tmp_pack_XXXXXX");
+ pack_fd = odb_mkstemp(the_repository->objects, &tmp_file,
+ "pack/tmp_pack_XXXXXX");
FLEX_ALLOC_STR(p, pack_name, tmp_file.buf);
strbuf_release(&tmp_file);
@@ -820,11 +822,11 @@ static char *keep_pack(const char *curr_index_name)
die_errno("failed to write keep file");
odb_pack_name(pack_data->repo, &name, pack_data->hash, "pack");
- if (finalize_object_file(pack_data->pack_name, name.buf))
+ if (finalize_object_file(pack_data->repo, pack_data->pack_name, name.buf))
die("cannot store pack file");
odb_pack_name(pack_data->repo, &name, pack_data->hash, "idx");
- if (finalize_object_file(curr_index_name, name.buf))
+ if (finalize_object_file(pack_data->repo, curr_index_name, name.buf))
die("cannot store index file");
free((void *)curr_index_name);
return strbuf_detach(&name, NULL);
@@ -1264,7 +1266,7 @@ static void load_tree(struct tree_entry *root)
die("Can't load tree %s", oid_to_hex(oid));
} else {
enum object_type type;
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf || type != OBJ_TREE)
die("Can't load tree %s", oid_to_hex(oid));
}
@@ -1755,8 +1757,8 @@ static void insert_object_entry(struct mark_set **s, struct object_id *oid, uint
struct object_entry *e;
e = find_object(oid);
if (!e) {
- enum object_type type = oid_object_info(the_repository,
- oid, NULL);
+ enum object_type type = odb_read_object_info(the_repository->objects,
+ oid, NULL);
if (type < 0)
die("object not found: %s", oid_to_hex(oid));
e = insert_object(oid);
@@ -2415,8 +2417,8 @@ static void file_change_m(const char *p, struct branch *b)
enum object_type expected = S_ISDIR(mode) ?
OBJ_TREE: OBJ_BLOB;
enum object_type type = oe ? oe->type :
- oid_object_info(the_repository, &oid,
- NULL);
+ odb_read_object_info(the_repository->objects,
+ &oid, NULL);
if (type < 0)
die("%s not found: %s",
S_ISDIR(mode) ? "Tree" : "Blob",
@@ -2534,10 +2536,9 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa
oidcpy(&commit_oid, &commit_oe->idx.oid);
} else if (!repo_get_oid(the_repository, p, &commit_oid)) {
unsigned long size;
- char *buf = read_object_with_reference(the_repository,
- &commit_oid,
- OBJ_COMMIT, &size,
- &commit_oid);
+ char *buf = odb_read_object_peeled(the_repository->objects,
+ &commit_oid, OBJ_COMMIT, &size,
+ &commit_oid);
if (!buf || size < the_hash_algo->hexsz + 6)
die("Not a valid commit: %s", p);
free(buf);
@@ -2552,7 +2553,7 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa
die("Not a blob (actually a %s): %s",
type_name(oe->type), command_buf.buf);
} else if (!is_null_oid(&oid)) {
- enum object_type type = oid_object_info(the_repository, &oid,
+ enum object_type type = odb_read_object_info(the_repository->objects, &oid,
NULL);
if (type < 0)
die("Blob not found: %s", command_buf.buf);
@@ -2603,9 +2604,8 @@ static void parse_from_existing(struct branch *b)
unsigned long size;
char *buf;
- buf = read_object_with_reference(the_repository,
- &b->oid, OBJ_COMMIT, &size,
- &b->oid);
+ buf = odb_read_object_peeled(the_repository->objects, &b->oid,
+ OBJ_COMMIT, &size, &b->oid);
parse_from_commit(b, buf, size);
free(buf);
}
@@ -2698,10 +2698,9 @@ static struct hash_list *parse_merge(unsigned int *count)
oidcpy(&n->oid, &oe->idx.oid);
} else if (!repo_get_oid(the_repository, from, &n->oid)) {
unsigned long size;
- char *buf = read_object_with_reference(the_repository,
- &n->oid,
- OBJ_COMMIT,
- &size, &n->oid);
+ char *buf = odb_read_object_peeled(the_repository->objects,
+ &n->oid, OBJ_COMMIT,
+ &size, &n->oid);
if (!buf || size < the_hash_algo->hexsz + 6)
die("Not a valid commit: %s", from);
free(buf);
@@ -2718,15 +2717,82 @@ static struct hash_list *parse_merge(unsigned int *count)
return list;
}
+struct signature_data {
+ char *hash_algo; /* "sha1" or "sha256" */
+ char *sig_format; /* "openpgp", "x509", "ssh", or "unknown" */
+ struct strbuf data; /* The actual signature data */
+};
+
+static void parse_one_signature(struct signature_data *sig, const char *v)
+{
+ char *args = xstrdup(v); /* Will be freed when sig->hash_algo is freed */
+ char *space = strchr(args, ' ');
+
+ if (!space)
+ die("Expected gpgsig format: 'gpgsig <hash-algo> <signature-format>', "
+ "got 'gpgsig %s'", args);
+ *space = '\0';
+
+ sig->hash_algo = args;
+ sig->sig_format = space + 1;
+
+ /* Validate hash algorithm */
+ if (strcmp(sig->hash_algo, "sha1") &&
+ strcmp(sig->hash_algo, "sha256"))
+ die("Unknown git hash algorithm in gpgsig: '%s'", sig->hash_algo);
+
+ /* Validate signature format */
+ if (!valid_signature_format(sig->sig_format))
+ die("Invalid signature format in gpgsig: '%s'", sig->sig_format);
+ if (!strcmp(sig->sig_format, "unknown"))
+ warning("'unknown' signature format in gpgsig");
+
+ /* Read signature data */
+ read_next_command();
+ parse_data(&sig->data, 0, NULL);
+}
+
+static void add_gpgsig_to_commit(struct strbuf *commit_data,
+ const char *header,
+ struct signature_data *sig)
+{
+ struct string_list siglines = STRING_LIST_INIT_NODUP;
+
+ if (!sig->hash_algo)
+ return;
+
+ strbuf_addstr(commit_data, header);
+ string_list_split_in_place(&siglines, sig->data.buf, "\n", -1);
+ strbuf_add_separated_string_list(commit_data, "\n ", &siglines);
+ strbuf_addch(commit_data, '\n');
+ string_list_clear(&siglines, 1);
+ strbuf_release(&sig->data);
+ free(sig->hash_algo);
+}
+
+static void store_signature(struct signature_data *stored_sig,
+ struct signature_data *new_sig,
+ const char *hash_type)
+{
+ if (stored_sig->hash_algo) {
+ warning("multiple %s signatures found, "
+ "ignoring additional signature",
+ hash_type);
+ strbuf_release(&new_sig->data);
+ free(new_sig->hash_algo);
+ } else {
+ *stored_sig = *new_sig;
+ }
+}
+
static void parse_new_commit(const char *arg)
{
- static struct strbuf sig = STRBUF_INIT;
static struct strbuf msg = STRBUF_INIT;
- struct string_list siglines = STRING_LIST_INIT_NODUP;
+ struct signature_data sig_sha1 = { NULL, NULL, STRBUF_INIT };
+ struct signature_data sig_sha256 = { NULL, NULL, STRBUF_INIT };
struct branch *b;
char *author = NULL;
char *committer = NULL;
- char *sig_alg = NULL;
char *encoding = NULL;
struct hash_list *merge_list = NULL;
unsigned int merge_count;
@@ -2750,13 +2816,23 @@ static void parse_new_commit(const char *arg)
}
if (!committer)
die("Expected committer but didn't get one");
- if (skip_prefix(command_buf.buf, "gpgsig ", &v)) {
- sig_alg = xstrdup(v);
+
+ /* Process signatures (up to 2: one "sha1" and one "sha256") */
+ while (skip_prefix(command_buf.buf, "gpgsig ", &v)) {
+ struct signature_data sig = { NULL, NULL, STRBUF_INIT };
+
+ parse_one_signature(&sig, v);
+
+ if (!strcmp(sig.hash_algo, "sha1"))
+ store_signature(&sig_sha1, &sig, "SHA-1");
+ else if (!strcmp(sig.hash_algo, "sha256"))
+ store_signature(&sig_sha256, &sig, "SHA-256");
+ else
+ BUG("parse_one_signature() returned unknown hash algo");
+
read_next_command();
- parse_data(&sig, 0, NULL);
- read_next_command();
- } else
- strbuf_setlen(&sig, 0);
+ }
+
if (skip_prefix(command_buf.buf, "encoding ", &v)) {
encoding = xstrdup(v);
read_next_command();
@@ -2830,23 +2906,14 @@ static void parse_new_commit(const char *arg)
strbuf_addf(&new_data,
"encoding %s\n",
encoding);
- if (sig_alg) {
- if (!strcmp(sig_alg, "sha1"))
- strbuf_addstr(&new_data, "gpgsig ");
- else if (!strcmp(sig_alg, "sha256"))
- strbuf_addstr(&new_data, "gpgsig-sha256 ");
- else
- die("Expected gpgsig algorithm sha1 or sha256, got %s", sig_alg);
- string_list_split_in_place(&siglines, sig.buf, "\n", -1);
- strbuf_add_separated_string_list(&new_data, "\n ", &siglines);
- strbuf_addch(&new_data, '\n');
- }
+
+ add_gpgsig_to_commit(&new_data, "gpgsig ", &sig_sha1);
+ add_gpgsig_to_commit(&new_data, "gpgsig-sha256 ", &sig_sha256);
+
strbuf_addch(&new_data, '\n');
strbuf_addbuf(&new_data, &msg);
- string_list_clear(&siglines, 1);
free(author);
free(committer);
- free(sig_alg);
free(encoding);
if (!store_object(OBJ_COMMIT, &new_data, NULL, &b->oid, next_mark))
@@ -2894,7 +2961,8 @@ static void parse_new_tag(const char *arg)
} else if (!repo_get_oid(the_repository, from, &oid)) {
struct object_entry *oe = find_object(&oid);
if (!oe) {
- type = oid_object_info(the_repository, &oid, NULL);
+ type = odb_read_object_info(the_repository->objects,
+ &oid, NULL);
if (type < 0)
die("Not a valid object: %s", from);
} else
@@ -3000,7 +3068,7 @@ static void cat_blob(struct object_entry *oe, struct object_id *oid)
char *buf;
if (!oe || oe->pack_id == MAX_PACK_ID) {
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
} else {
type = oe->type;
buf = gfi_unpack_entry(oe, &size);
@@ -3084,8 +3152,8 @@ static struct object_entry *dereference(struct object_entry *oe,
const unsigned hexsz = the_hash_algo->hexsz;
if (!oe) {
- enum object_type type = oid_object_info(the_repository, oid,
- NULL);
+ enum object_type type = odb_read_object_info(the_repository->objects,
+ oid, NULL);
if (type < 0)
die("object not found: %s", oid_to_hex(oid));
/* cache it! */
@@ -3108,8 +3176,8 @@ static struct object_entry *dereference(struct object_entry *oe,
buf = gfi_unpack_entry(oe, &size);
} else {
enum object_type unused;
- buf = repo_read_object_file(the_repository, oid, &unused,
- &size);
+ buf = odb_read_object(the_repository->objects, oid,
+ &unused, &size);
}
if (!buf)
die("Can't load object %s", oid_to_hex(oid));
@@ -3524,25 +3592,25 @@ static void git_pack_config(void)
int limit;
unsigned long packsizelimit_value;
- if (!git_config_get_ulong("pack.depth", &max_depth)) {
+ if (!repo_config_get_ulong(the_repository, "pack.depth", &max_depth)) {
if (max_depth > MAX_DEPTH)
max_depth = MAX_DEPTH;
}
- if (!git_config_get_int("pack.indexversion", &indexversion_value)) {
+ if (!repo_config_get_int(the_repository, "pack.indexversion", &indexversion_value)) {
pack_idx_opts.version = indexversion_value;
if (pack_idx_opts.version > 2)
git_die_config(the_repository, "pack.indexversion",
"bad pack.indexVersion=%"PRIu32, pack_idx_opts.version);
}
- if (!git_config_get_ulong("pack.packsizelimit", &packsizelimit_value))
+ if (!repo_config_get_ulong(the_repository, "pack.packsizelimit", &packsizelimit_value))
max_packsize = packsizelimit_value;
- if (!git_config_get_int("fastimport.unpacklimit", &limit))
+ if (!repo_config_get_int(the_repository, "fastimport.unpacklimit", &limit))
unpack_limit = limit;
- else if (!git_config_get_int("transfer.unpacklimit", &limit))
+ else if (!repo_config_get_int(the_repository, "transfer.unpacklimit", &limit))
unpack_limit = limit;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
static const char fast_import_usage[] =
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index d07eec9..d9e42ba 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -274,8 +274,10 @@ int cmd_fetch_pack(int argc,
}
close(fd[0]);
close(fd[1]);
- if (finish_connect(conn))
- return 1;
+ if (finish_connect(conn)) {
+ ret = 1;
+ goto cleanup;
+ }
ret = !fetched_refs;
@@ -291,6 +293,7 @@ int cmd_fetch_pack(int argc,
printf("%s %s\n",
oid_to_hex(&ref->old_oid), ref->name);
+cleanup:
for (size_t i = 0; i < nr_sought; i++)
free_one_ref(sought_to_free[i]);
free(sought_to_free);
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 40a0e8d..24645c4 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -14,7 +14,7 @@
#include "refs.h"
#include "refspec.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "oidset.h"
#include "oid-array.h"
#include "commit.h"
@@ -366,9 +366,9 @@ static void find_non_local_tags(const struct ref *refs,
*/
if (ends_with(ref->name, "^{}")) {
if (item &&
- !has_object(the_repository, &ref->old_oid, 0) &&
+ !odb_has_object(the_repository->objects, &ref->old_oid, 0) &&
!oidset_contains(&fetch_oids, &ref->old_oid) &&
- !has_object(the_repository, &item->oid, 0) &&
+ !odb_has_object(the_repository->objects, &item->oid, 0) &&
!oidset_contains(&fetch_oids, &item->oid))
clear_item(item);
item = NULL;
@@ -382,7 +382,7 @@ static void find_non_local_tags(const struct ref *refs,
* fetch.
*/
if (item &&
- !has_object(the_repository, &item->oid, 0) &&
+ !odb_has_object(the_repository->objects, &item->oid, 0) &&
!oidset_contains(&fetch_oids, &item->oid))
clear_item(item);
@@ -403,7 +403,7 @@ static void find_non_local_tags(const struct ref *refs,
* checked to see if it needs fetching.
*/
if (item &&
- !has_object(the_repository, &item->oid, 0) &&
+ !odb_has_object(the_repository->objects, &item->oid, 0) &&
!oidset_contains(&fetch_oids, &item->oid))
clear_item(item);
@@ -640,9 +640,6 @@ static struct ref *get_ref_map(struct remote *remote,
return ref_map;
}
-#define STORE_REF_ERROR_OTHER 1
-#define STORE_REF_ERROR_DF_CONFLICT 2
-
static int s_update_ref(const char *action,
struct ref *ref,
struct ref_transaction *transaction,
@@ -650,7 +647,6 @@ static int s_update_ref(const char *action,
{
char *msg;
char *rla = getenv("GIT_REFLOG_ACTION");
- struct ref_transaction *our_transaction = NULL;
struct strbuf err = STRBUF_INIT;
int ret;
@@ -660,43 +656,10 @@ static int s_update_ref(const char *action,
rla = default_rla.buf;
msg = xstrfmt("%s: %s", rla, action);
- /*
- * If no transaction was passed to us, we manage the transaction
- * ourselves. Otherwise, we trust the caller to handle the transaction
- * lifecycle.
- */
- if (!transaction) {
- transaction = our_transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
- 0, &err);
- if (!transaction) {
- ret = STORE_REF_ERROR_OTHER;
- goto out;
- }
- }
-
ret = ref_transaction_update(transaction, ref->name, &ref->new_oid,
check_old ? &ref->old_oid : NULL,
NULL, NULL, 0, msg, &err);
- if (ret) {
- ret = STORE_REF_ERROR_OTHER;
- goto out;
- }
- if (our_transaction) {
- switch (ref_transaction_commit(our_transaction, &err)) {
- case 0:
- break;
- case REF_TRANSACTION_ERROR_NAME_CONFLICT:
- ret = STORE_REF_ERROR_DF_CONFLICT;
- goto out;
- default:
- ret = STORE_REF_ERROR_OTHER;
- goto out;
- }
- }
-
-out:
- ref_transaction_free(our_transaction);
if (ret)
error("%s", err.buf);
strbuf_release(&err);
@@ -910,8 +873,8 @@ static int update_local_ref(struct ref *ref,
struct commit *current = NULL, *updated;
int fast_forward = 0;
- if (!has_object(the_repository, &ref->new_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (!odb_has_object(the_repository->objects, &ref->new_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
die(_("object %s not found"), oid_to_hex(&ref->new_oid));
if (oideq(&ref->old_oid, &ref->new_oid)) {
@@ -992,7 +955,7 @@ static int update_local_ref(struct ref *ref,
fast_forward = repo_in_merge_bases(the_repository, current,
updated);
if (fast_forward < 0)
- exit(128);
+ die(NULL);
forced_updates_ms += (getnanotime() - t_before) / 1000000;
} else {
fast_forward = 1;
@@ -1139,7 +1102,6 @@ N_("it took %.2f seconds to check forced updates; you can use\n"
"to avoid this check\n");
static int store_updated_refs(struct display_state *display_state,
- const char *remote_name,
int connectivity_checked,
struct ref_transaction *transaction, struct ref *ref_map,
struct fetch_head *fetch_head,
@@ -1277,11 +1239,6 @@ static int store_updated_refs(struct display_state *display_state,
}
}
- if (rc & STORE_REF_ERROR_DF_CONFLICT)
- error(_("some local refs could not be updated; try running\n"
- " 'git remote prune %s' to remove any old, conflicting "
- "branches"), remote_name);
-
if (advice_enabled(ADVICE_FETCH_SHOW_FORCED_UPDATES)) {
if (!config->show_forced_updates) {
warning(_(warn_show_forced_updates));
@@ -1330,7 +1287,8 @@ static int check_exist_and_connected(struct ref *ref_map)
* we need all direct targets to exist.
*/
for (r = rm; r; r = r->next) {
- if (!has_object(the_repository, &r->old_oid, HAS_OBJECT_RECHECK_PACKED))
+ if (!odb_has_object(the_repository->objects, &r->old_oid,
+ HAS_OBJECT_RECHECK_PACKED))
return -1;
}
@@ -1365,9 +1323,8 @@ static int fetch_and_consume_refs(struct display_state *display_state,
}
trace2_region_enter("fetch", "consume_refs", the_repository);
- ret = store_updated_refs(display_state, transport->remote->name,
- connectivity_checked, transaction, ref_map,
- fetch_head, config);
+ ret = store_updated_refs(display_state, connectivity_checked,
+ transaction, ref_map, fetch_head, config);
trace2_region_leave("fetch", "consume_refs", the_repository);
out:
@@ -1383,9 +1340,10 @@ static int prune_refs(struct display_state *display_state,
int result = 0;
struct ref *ref, *stale_refs = get_stale_heads(rs, ref_map);
struct strbuf err = STRBUF_INIT;
- const char *dangling_msg = dry_run
- ? _(" (%s will become dangling)")
- : _(" (%s has become dangling)");
+ struct string_list refnames = STRING_LIST_INIT_NODUP;
+
+ for (ref = stale_refs; ref; ref = ref->next)
+ string_list_append(&refnames, ref->name);
if (!dry_run) {
if (transaction) {
@@ -1396,15 +1354,9 @@ static int prune_refs(struct display_state *display_state,
goto cleanup;
}
} else {
- struct string_list refnames = STRING_LIST_INIT_NODUP;
-
- for (ref = stale_refs; ref; ref = ref->next)
- string_list_append(&refnames, ref->name);
-
result = refs_delete_refs(get_main_ref_store(the_repository),
"fetch: prune", &refnames,
0);
- string_list_clear(&refnames, 0);
}
}
@@ -1416,12 +1368,14 @@ static int prune_refs(struct display_state *display_state,
_("(none)"), ref->name,
&ref->new_oid, &ref->old_oid,
summary_width);
- refs_warn_dangling_symref(get_main_ref_store(the_repository),
- stderr, dangling_msg, ref->name);
}
+ string_list_sort(&refnames);
+ refs_warn_dangling_symrefs(get_main_ref_store(the_repository),
+ stderr, " ", dry_run, &refnames);
}
cleanup:
+ string_list_clear(&refnames, 0);
strbuf_release(&err);
free_refs(stale_refs);
return result;
@@ -1485,7 +1439,7 @@ static void add_negotiation_tips(struct git_transport_options *smart_options)
struct object_id oid;
if (repo_get_oid(the_repository, s, &oid))
die(_("%s is not a valid object"), s);
- if (!has_object(the_repository, &oid, 0))
+ if (!odb_has_object(the_repository->objects, &oid, 0))
die(_("the object %s does not exist"), s);
oid_array_append(oids, &oid);
continue;
@@ -1687,6 +1641,36 @@ static int set_head(const struct ref *remote_refs, struct remote *remote)
return result;
}
+struct ref_rejection_data {
+ int *retcode;
+ int conflict_msg_shown;
+ const char *remote_name;
+};
+
+static void ref_transaction_rejection_handler(const char *refname,
+ const struct object_id *old_oid UNUSED,
+ const struct object_id *new_oid UNUSED,
+ const char *old_target UNUSED,
+ const char *new_target UNUSED,
+ enum ref_transaction_error err,
+ void *cb_data)
+{
+ struct ref_rejection_data *data = cb_data;
+
+ if (err == REF_TRANSACTION_ERROR_NAME_CONFLICT && !data->conflict_msg_shown) {
+ error(_("some local refs could not be updated; try running\n"
+ " 'git remote prune %s' to remove any old, conflicting "
+ "branches"), data->remote_name);
+ data->conflict_msg_shown = 1;
+ } else {
+ const char *reason = ref_transaction_error_msg(err);
+
+ error(_("fetching ref %s failed: %s"), refname, reason);
+ }
+
+ *data->retcode = 1;
+}
+
static int do_fetch(struct transport *transport,
struct refspec *rs,
const struct fetch_config *config)
@@ -1807,6 +1791,24 @@ static int do_fetch(struct transport *transport,
retcode = 1;
}
+ /*
+ * If not atomic, we can still use batched updates, which would be much
+ * more performant. We don't initiate the transaction before pruning,
+ * since pruning must be an independent step, to avoid F/D conflicts.
+ *
+ * TODO: if reference transactions gain logical conflict resolution, we
+ * can delete and create refs (with F/D conflicts) in the same transaction
+ * and this can be moved above the 'prune_refs()' block.
+ */
+ if (!transaction) {
+ transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
+ REF_TRANSACTION_ALLOW_FAILURE, &err);
+ if (!transaction) {
+ retcode = -1;
+ goto cleanup;
+ }
+ }
+
if (fetch_and_consume_refs(&display_state, transport, transaction, ref_map,
&fetch_head, config)) {
retcode = 1;
@@ -1838,16 +1840,31 @@ static int do_fetch(struct transport *transport,
free_refs(tags_ref_map);
}
- if (transaction) {
- if (retcode)
- goto cleanup;
+ if (retcode)
+ goto cleanup;
- retcode = ref_transaction_commit(transaction, &err);
+ retcode = ref_transaction_commit(transaction, &err);
+ if (retcode) {
+ /*
+ * Explicitly handle transaction cleanup to avoid
+ * aborting an already closed transaction.
+ */
+ ref_transaction_free(transaction);
+ transaction = NULL;
+ goto cleanup;
+ }
+
+ if (!atomic_fetch) {
+ struct ref_rejection_data data = {
+ .retcode = &retcode,
+ .conflict_msg_shown = 0,
+ .remote_name = transport->remote->name,
+ };
+
+ ref_transaction_for_each_rejected_update(transaction,
+ ref_transaction_rejection_handler,
+ &data);
if (retcode) {
- /*
- * Explicitly handle transaction cleanup to avoid
- * aborting an already closed transaction.
- */
ref_transaction_free(transaction);
transaction = NULL;
goto cleanup;
@@ -1978,7 +1995,7 @@ static int add_remote_or_group(const char *name, struct string_list *list)
struct remote_group_data g;
g.name = name; g.list = list;
- git_config(get_remote_group, &g);
+ repo_config(the_repository, get_remote_group, &g);
if (list->nr == prev_nr) {
struct remote *remote = remote_get(name);
if (!remote_is_configured(remote, 0))
@@ -2400,7 +2417,7 @@ int cmd_fetch(int argc,
free(anon);
}
- git_config(git_fetch_config, &config);
+ repo_config(the_repository, git_fetch_config, &config);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
@@ -2491,7 +2508,7 @@ int cmd_fetch(int argc,
if (!max_jobs)
max_jobs = online_cpus();
- if (!git_config_get_string_tmp("fetch.bundleuri", &bundle_uri) &&
+ if (!repo_config_get_string_tmp(the_repository, "fetch.bundleuri", &bundle_uri) &&
fetch_bundle_uri(the_repository, bundle_uri, NULL))
warning(_("failed to fetch bundles from '%s'"), bundle_uri);
@@ -2653,7 +2670,7 @@ int cmd_fetch(int argc,
commit_graph_flags |= COMMIT_GRAPH_WRITE_PROGRESS;
trace2_region_enter("fetch", "write-commit-graph", the_repository);
- write_commit_graph_reachable(the_repository->objects->odb,
+ write_commit_graph_reachable(the_repository->objects->sources,
commit_graph_flags,
NULL);
trace2_region_leave("fetch", "write-commit-graph", the_repository);
@@ -2666,12 +2683,12 @@ int cmd_fetch(int argc,
* but respect config settings disabling it.
*/
int opt_val;
- if (git_config_get_int("gc.autopacklimit", &opt_val))
+ if (repo_config_get_int(the_repository, "gc.autopacklimit", &opt_val))
opt_val = -1;
if (opt_val != 0)
git_config_push_parameter("gc.autoPackLimit=1");
- if (git_config_get_int("maintenance.incremental-repack.auto", &opt_val))
+ if (repo_config_get_int(the_repository, "maintenance.incremental-repack.auto", &opt_val))
opt_val = -1;
if (opt_val != 0)
git_config_push_parameter("maintenance.incremental-repack.auto=-1");
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 3b6aac2..edb93c0 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -53,7 +53,7 @@ int cmd_fmt_merge_msg(int argc,
int ret;
struct fmt_merge_msg_opts opts;
- git_config(fmt_merge_msg_config, NULL);
+ repo_config(the_repository, fmt_merge_msg_config, NULL);
argc = parse_options(argc, argv, prefix, options, fmt_merge_msg_usage,
0);
if (argc > 0)
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 3d2207e..222637a 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "commit.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "object.h"
#include "parse-options.h"
@@ -13,6 +14,7 @@ static char const * const for_each_ref_usage[] = {
N_("git for-each-ref [--points-at <object>]"),
N_("git for-each-ref [--merged [<commit>]] [--no-merged [<commit>]]"),
N_("git for-each-ref [--contains [<commit>]] [--no-contains [<commit>]]"),
+ N_("git for-each-ref [--start-after <marker>]"),
NULL
};
@@ -44,6 +46,7 @@ int cmd_for_each_ref(int argc,
OPT_GROUP(""),
OPT_INTEGER( 0 , "count", &format.array_opts.max_count, N_("show only <n> matched refs")),
OPT_STRING( 0 , "format", &format.format, N_("format"), N_("format to use for the output")),
+ OPT_STRING( 0 , "start-after", &filter.start_after, N_("marker"), N_("start iteration after the provided marker")),
OPT__COLOR(&format.use_color, N_("respect format colors")),
OPT_REF_FILTER_EXCLUDE(&filter),
OPT_REF_SORT(&sorting_options),
@@ -79,6 +82,9 @@ int cmd_for_each_ref(int argc,
if (verify_ref_format(&format))
usage_with_options(for_each_ref_usage, opts);
+ if (filter.start_after && sorting_options.nr > 1)
+ die(_("cannot use --start-after with custom sort options"));
+
sorting = ref_sorting_options(&sorting_options);
ref_sorting_set_sort_flags_all(sorting, REF_SORTING_ICASE, icase);
filter.ignore_case = icase;
@@ -100,6 +106,9 @@ int cmd_for_each_ref(int argc,
filter.name_patterns = argv;
}
+ if (filter.start_after && filter.name_patterns && filter.name_patterns[0])
+ die(_("cannot use --start-after with patterns"));
+
if (include_root_refs)
flags |= FILTER_REFS_ROOT_REFS | FILTER_REFS_DETACHED_HEAD;
diff --git a/builtin/fsck.c b/builtin/fsck.c
index e7d96a9..543a2cd 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -17,7 +17,7 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "read-cache-ll.h"
#include "replace-object.h"
@@ -71,7 +71,8 @@ static const char *printable_type(const struct object_id *oid,
const char *ret;
if (type == OBJ_NONE)
- type = oid_object_info(the_repository, oid, NULL);
+ type = odb_read_object_info(the_repository->objects,
+ oid, NULL);
ret = type_name(type);
if (!ret)
@@ -160,7 +161,7 @@ static int mark_object(struct object *obj, enum object_type type,
return 0;
if (!(obj->flags & HAS_OBJ)) {
- if (parent && !has_object(the_repository, &obj->oid, 1)) {
+ if (parent && !odb_has_object(the_repository->objects, &obj->oid, 1)) {
printf_ln(_("broken link from %7s %s\n"
" to %7s %s"),
printable_type(&parent->oid, parent->type),
@@ -232,8 +233,8 @@ static void mark_unreachable_referents(const struct object_id *oid)
* (and we want to avoid parsing blobs).
*/
if (obj->type == OBJ_NONE) {
- enum object_type type = oid_object_info(the_repository,
- &obj->oid, NULL);
+ enum object_type type = odb_read_object_info(the_repository->objects,
+ &obj->oid, NULL);
if (type > 0)
object_as_type(obj, type, 0);
}
@@ -392,7 +393,8 @@ static void check_connectivity(void)
* and ignore any that weren't present in our earlier
* traversal.
*/
- for_each_loose_object(mark_loose_unreachable_referents, NULL, 0);
+ for_each_loose_object(the_repository->objects,
+ mark_loose_unreachable_referents, NULL, 0);
for_each_packed_object(the_repository,
mark_packed_unreachable_referents,
NULL,
@@ -631,7 +633,7 @@ static int fsck_loose(const struct object_id *oid, const char *path,
oi.sizep = &size;
oi.typep = &type;
- if (read_loose_object(path, oid, &real_oid, &contents, &oi) < 0) {
+ if (read_loose_object(the_repository, path, oid, &real_oid, &contents, &oi) < 0) {
if (contents && !oideq(&real_oid, oid))
err = error(_("%s: hash-path mismatch, found at: %s"),
oid_to_hex(&real_oid), path);
@@ -686,7 +688,7 @@ static int fsck_subdir(unsigned int nr, const char *path UNUSED, void *data)
return 0;
}
-static void fsck_object_dir(const char *path)
+static void fsck_source(struct odb_source *source)
{
struct progress *progress = NULL;
struct for_each_loose_cb cb_data = {
@@ -700,8 +702,8 @@ static void fsck_object_dir(const char *path)
progress = start_progress(the_repository,
_("Checking object directories"), 256);
- for_each_loose_file_in_objdir(path, fsck_loose, fsck_cruft, fsck_subdir,
- &cb_data);
+ for_each_loose_file_in_source(source, fsck_loose,
+ fsck_cruft, fsck_subdir, &cb_data);
display_progress(progress, 256);
stop_progress(&progress);
}
@@ -956,7 +958,7 @@ int cmd_fsck(int argc,
struct repository *repo UNUSED)
{
int i;
- struct object_directory *odb;
+ struct odb_source *source;
/* fsck knows how to handle missing promisor objects */
fetch_if_missing = 0;
@@ -986,20 +988,21 @@ int cmd_fsck(int argc,
if (name_objects)
fsck_enable_object_names(&fsck_walk_options);
- git_config(git_fsck_config, &fsck_obj_options);
+ repo_config(the_repository, git_fsck_config, &fsck_obj_options);
prepare_repo_settings(the_repository);
if (check_references)
fsck_refs(the_repository);
if (connectivity_only) {
- for_each_loose_object(mark_loose_for_connectivity, NULL, 0);
+ for_each_loose_object(the_repository->objects,
+ mark_loose_for_connectivity, NULL, 0);
for_each_packed_object(the_repository,
mark_packed_for_connectivity, NULL, 0);
} else {
- prepare_alt_odb(the_repository);
- for (odb = the_repository->objects->odb; odb; odb = odb->next)
- fsck_object_dir(odb->path);
+ odb_prepare_alternates(the_repository->objects);
+ for (source = the_repository->objects->sources; source; source = source->next)
+ fsck_source(source);
if (check_full) {
struct packed_git *p;
@@ -1108,12 +1111,12 @@ int cmd_fsck(int argc,
if (the_repository->settings.core_commit_graph) {
struct child_process commit_graph_verify = CHILD_PROCESS_INIT;
- prepare_alt_odb(the_repository);
- for (odb = the_repository->objects->odb; odb; odb = odb->next) {
+ odb_prepare_alternates(the_repository->objects);
+ for (source = the_repository->objects->sources; source; source = source->next) {
child_process_init(&commit_graph_verify);
commit_graph_verify.git_cmd = 1;
strvec_pushl(&commit_graph_verify.args, "commit-graph",
- "verify", "--object-dir", odb->path, NULL);
+ "verify", "--object-dir", source->path, NULL);
if (show_progress)
strvec_push(&commit_graph_verify.args, "--progress");
else
@@ -1126,12 +1129,12 @@ int cmd_fsck(int argc,
if (the_repository->settings.core_multi_pack_index) {
struct child_process midx_verify = CHILD_PROCESS_INIT;
- prepare_alt_odb(the_repository);
- for (odb = the_repository->objects->odb; odb; odb = odb->next) {
+ odb_prepare_alternates(the_repository->objects);
+ for (source = the_repository->objects->sources; source; source = source->next) {
child_process_init(&midx_verify);
midx_verify.git_cmd = 1;
strvec_pushl(&midx_verify.args, "multi-pack-index",
- "verify", "--object-dir", odb->path, NULL);
+ "verify", "--object-dir", source->path, NULL);
if (show_progress)
strvec_push(&midx_verify.args, "--progress");
else
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c
index 0820e52..242c594 100644
--- a/builtin/fsmonitor--daemon.c
+++ b/builtin/fsmonitor--daemon.c
@@ -5,6 +5,7 @@
#include "abspath.h"
#include "config.h"
#include "dir.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "fsmonitor-ll.h"
@@ -1547,7 +1548,7 @@ int cmd_fsmonitor__daemon(int argc,
OPT_END()
};
- git_config(fsmonitor_config, NULL);
+ repo_config(the_repository, fsmonitor_config, NULL);
argc = parse_options(argc, argv, prefix, options,
builtin_fsmonitor__daemon_usage, 0);
diff --git a/builtin/gc.c b/builtin/gc.c
index 7dc94f2..0edd94a 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -114,7 +114,7 @@ static int gc_config_is_timestamp_never(const char *var)
const char *value;
timestamp_t expire;
- if (!git_config_get_value(var, &value) && value) {
+ if (!repo_config_get_value(the_repository, var, &value) && value) {
if (parse_expiry_date(value, &expire))
die(_("failed to parse '%s' value '%s'"), var, value);
return expire == 0;
@@ -178,7 +178,7 @@ static void gc_config(struct gc_config *cfg)
char *owned = NULL;
unsigned long ulongval;
- if (!git_config_get_value("gc.packrefs", &value)) {
+ if (!repo_config_get_value(the_repository, "gc.packrefs", &value)) {
if (value && !strcmp(value, "notbare"))
cfg->pack_refs = -1;
else
@@ -189,13 +189,13 @@ static void gc_config(struct gc_config *cfg)
gc_config_is_timestamp_never("gc.reflogexpireunreachable"))
cfg->prune_reflogs = 0;
- git_config_get_int("gc.aggressivewindow", &cfg->aggressive_window);
- git_config_get_int("gc.aggressivedepth", &cfg->aggressive_depth);
- git_config_get_int("gc.auto", &cfg->gc_auto_threshold);
- git_config_get_int("gc.autopacklimit", &cfg->gc_auto_pack_limit);
- git_config_get_bool("gc.autodetach", &cfg->detach_auto);
- git_config_get_bool("gc.cruftpacks", &cfg->cruft_packs);
- git_config_get_ulong("gc.maxcruftsize", &cfg->max_cruft_size);
+ repo_config_get_int(the_repository, "gc.aggressivewindow", &cfg->aggressive_window);
+ repo_config_get_int(the_repository, "gc.aggressivedepth", &cfg->aggressive_depth);
+ repo_config_get_int(the_repository, "gc.auto", &cfg->gc_auto_threshold);
+ repo_config_get_int(the_repository, "gc.autopacklimit", &cfg->gc_auto_pack_limit);
+ repo_config_get_bool(the_repository, "gc.autodetach", &cfg->detach_auto);
+ repo_config_get_bool(the_repository, "gc.cruftpacks", &cfg->cruft_packs);
+ repo_config_get_ulong(the_repository, "gc.maxcruftsize", &cfg->max_cruft_size);
if (!repo_config_get_expiry(the_repository, "gc.pruneexpire", &owned)) {
free(cfg->prune_expire);
@@ -212,23 +212,23 @@ static void gc_config(struct gc_config *cfg)
cfg->gc_log_expire = owned;
}
- git_config_get_ulong("gc.bigpackthreshold", &cfg->big_pack_threshold);
- git_config_get_ulong("pack.deltacachesize", &cfg->max_delta_cache_size);
+ repo_config_get_ulong(the_repository, "gc.bigpackthreshold", &cfg->big_pack_threshold);
+ repo_config_get_ulong(the_repository, "pack.deltacachesize", &cfg->max_delta_cache_size);
- if (!git_config_get_ulong("core.deltabasecachelimit", &ulongval))
+ if (!repo_config_get_ulong(the_repository, "core.deltabasecachelimit", &ulongval))
cfg->delta_base_cache_limit = ulongval;
- if (!git_config_get_string("gc.repackfilter", &owned)) {
+ if (!repo_config_get_string(the_repository, "gc.repackfilter", &owned)) {
free(cfg->repack_filter);
cfg->repack_filter = owned;
}
- if (!git_config_get_string("gc.repackfilterto", &owned)) {
+ if (!repo_config_get_string(the_repository, "gc.repackfilterto", &owned)) {
free(cfg->repack_filter_to);
cfg->repack_filter_to = owned;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
enum schedule_priority {
@@ -251,7 +251,24 @@ static enum schedule_priority parse_schedule(const char *value)
return SCHEDULE_NONE;
}
+enum maintenance_task_label {
+ TASK_PREFETCH,
+ TASK_LOOSE_OBJECTS,
+ TASK_INCREMENTAL_REPACK,
+ TASK_GC,
+ TASK_COMMIT_GRAPH,
+ TASK_PACK_REFS,
+ TASK_REFLOG_EXPIRE,
+ TASK_WORKTREE_PRUNE,
+ TASK_RERERE_GC,
+
+ /* Leave as final value */
+ TASK__COUNT
+};
+
struct maintenance_run_opts {
+ enum maintenance_task_label *tasks;
+ size_t tasks_nr, tasks_alloc;
int auto_flag;
int detach;
int quiet;
@@ -261,6 +278,11 @@ struct maintenance_run_opts {
.detach = -1, \
}
+static void maintenance_run_opts_release(struct maintenance_run_opts *opts)
+{
+ free(opts->tasks);
+}
+
static int pack_refs_condition(UNUSED struct gc_config *cfg)
{
/*
@@ -310,7 +332,7 @@ static int reflog_expire_condition(struct gc_config *cfg UNUSED)
};
int limit = 100;
- git_config_get_int("maintenance.reflog-expire.auto", &limit);
+ repo_config_get_int(the_repository, "maintenance.reflog-expire.auto", &limit);
if (!limit)
return 0;
if (limit < 0)
@@ -324,6 +346,7 @@ static int reflog_expire_condition(struct gc_config *cfg UNUSED)
count_reflog_entries, &data);
reflog_expiry_cleanup(&data.policy);
+ reflog_clear_expire_config(&data.policy.opts);
return data.count >= data.limit;
}
@@ -356,7 +379,7 @@ static int worktree_prune_condition(struct gc_config *cfg)
struct dirent *d;
DIR *dir = NULL;
- git_config_get_int("maintenance.worktree-prune.auto", &limit);
+ repo_config_get_int(the_repository, "maintenance.worktree-prune.auto", &limit);
if (limit <= 0) {
should_prune = limit < 0;
goto out;
@@ -401,7 +424,7 @@ static int rerere_gc_condition(struct gc_config *cfg UNUSED)
int should_gc = 0, limit = 1;
DIR *dir = NULL;
- git_config_get_int("maintenance.rerere-gc.auto", &limit);
+ repo_config_get_int(the_repository, "maintenance.rerere-gc.auto", &limit);
if (limit <= 0) {
should_gc = limit < 0;
goto out;
@@ -517,7 +540,7 @@ static uint64_t total_ram(void)
return total;
}
#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM) || defined(HW_PHYSMEM64))
- int64_t physical_memory;
+ uint64_t physical_memory;
int mib[2];
size_t length;
@@ -529,9 +552,16 @@ static uint64_t total_ram(void)
# else
mib[1] = HW_PHYSMEM;
# endif
- length = sizeof(int64_t);
- if (!sysctl(mib, 2, &physical_memory, &length, NULL, 0))
+ length = sizeof(physical_memory);
+ if (!sysctl(mib, 2, &physical_memory, &length, NULL, 0)) {
+ if (length == 4) {
+ uint32_t mem;
+
+ if (!sysctl(mib, 2, &mem, &length, NULL, 0))
+ physical_memory = mem;
+ }
return physical_memory;
+ }
#elif defined(GIT_WINDOWS_NATIVE)
MEMORYSTATUSEX memInfo;
@@ -796,22 +826,14 @@ static int report_last_gc_error(void)
return ret;
}
-static void gc_before_repack(struct maintenance_run_opts *opts,
- struct gc_config *cfg)
+static int gc_foreground_tasks(struct maintenance_run_opts *opts,
+ struct gc_config *cfg)
{
- /*
- * We may be called twice, as both the pre- and
- * post-daemonized phases will call us, but running these
- * commands more than once is pointless and wasteful.
- */
- static int done = 0;
- if (done++)
- return;
-
if (cfg->pack_refs && maintenance_task_pack_refs(opts, cfg))
- die(FAILED_RUN, "pack-refs");
+ return error(FAILED_RUN, "pack-refs");
if (cfg->prune_reflogs && maintenance_task_reflog_expire(opts, cfg))
- die(FAILED_RUN, "reflog");
+ return error(FAILED_RUN, "reflog");
+ return 0;
}
int cmd_gc(int argc,
@@ -820,12 +842,12 @@ int cmd_gc(int argc,
struct repository *repo UNUSED)
{
int aggressive = 0;
- int quiet = 0;
int force = 0;
const char *name;
pid_t pid;
int daemonized = 0;
int keep_largest_pack = -1;
+ int skip_foreground_tasks = 0;
timestamp_t dummy;
struct maintenance_run_opts opts = MAINTENANCE_RUN_OPTS_INIT;
struct gc_config cfg = GC_CONFIG_INIT;
@@ -833,7 +855,7 @@ int cmd_gc(int argc,
const char *prune_expire_arg = prune_expire_sentinel;
int ret;
struct option builtin_gc_options[] = {
- OPT__QUIET(&quiet, N_("suppress progress reporting")),
+ OPT__QUIET(&opts.quiet, N_("suppress progress reporting")),
{
.type = OPTION_STRING,
.long_name = "prune",
@@ -858,6 +880,8 @@ int cmd_gc(int argc,
N_("repack all other packs except the largest pack")),
OPT_STRING(0, "expire-to", &cfg.repack_expire_to, N_("dir"),
N_("pack prefix to store a pack containing pruned objects")),
+ OPT_HIDDEN_BOOL(0, "skip-foreground-tasks", &skip_foreground_tasks,
+ N_("skip maintenance tasks typically done in the foreground")),
OPT_END()
};
@@ -893,7 +917,7 @@ int cmd_gc(int argc,
if (cfg.aggressive_window > 0)
strvec_pushf(&repack, "--window=%d", cfg.aggressive_window);
}
- if (quiet)
+ if (opts.quiet)
strvec_push(&repack, "-q");
if (opts.auto_flag) {
@@ -908,7 +932,7 @@ int cmd_gc(int argc,
goto out;
}
- if (!quiet) {
+ if (!opts.quiet) {
if (opts.detach > 0)
fprintf(stderr, _("Auto packing the repository in background for optimum performance.\n"));
else
@@ -941,13 +965,16 @@ int cmd_gc(int argc,
goto out;
}
- if (lock_repo_for_gc(force, &pid)) {
- ret = 0;
- goto out;
- }
+ if (!skip_foreground_tasks) {
+ if (lock_repo_for_gc(force, &pid)) {
+ ret = 0;
+ goto out;
+ }
- gc_before_repack(&opts, &cfg); /* dies on failure */
- delete_tempfile(&pidfile);
+ if (gc_foreground_tasks(&opts, &cfg) < 0)
+ die(NULL);
+ delete_tempfile(&pidfile);
+ }
/*
* failure to daemonize is ok, we'll continue
@@ -976,9 +1003,10 @@ int cmd_gc(int argc,
free(path);
}
- gc_before_repack(&opts, &cfg);
+ if (opts.detach <= 0 && !skip_foreground_tasks)
+ gc_foreground_tasks(&opts, &cfg);
- if (!repository_format_precious_objects) {
+ if (!the_repository->repository_format_precious_objects) {
struct child_process repack_cmd = CHILD_PROCESS_INIT;
repack_cmd.git_cmd = 1;
@@ -993,7 +1021,7 @@ int cmd_gc(int argc,
strvec_pushl(&prune_cmd.args, "prune", "--expire", NULL);
/* run `git prune` even if using cruft packs */
strvec_push(&prune_cmd.args, cfg.prune_expire);
- if (quiet)
+ if (opts.quiet)
strvec_push(&prune_cmd.args, "--no-progress");
if (repo_has_promisor_remote(the_repository))
strvec_push(&prune_cmd.args,
@@ -1020,8 +1048,8 @@ int cmd_gc(int argc,
}
if (the_repository->settings.gc_write_commit_graph == 1)
- write_commit_graph_reachable(the_repository->objects->odb,
- !quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
+ write_commit_graph_reachable(the_repository->objects->sources,
+ !opts.quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
NULL);
if (opts.auto_flag && too_many_loose_objects(&cfg))
@@ -1035,6 +1063,7 @@ int cmd_gc(int argc,
}
out:
+ maintenance_run_opts_release(&opts);
gc_config_release(&cfg);
return 0;
}
@@ -1082,7 +1111,7 @@ static int dfs_on_ref(const char *refname UNUSED,
if (!peel_iterated_oid(the_repository, oid, &peeled))
oid = &peeled;
- if (oid_object_info(the_repository, oid, NULL) != OBJ_COMMIT)
+ if (odb_read_object_info(the_repository->objects, oid, NULL) != OBJ_COMMIT)
return 0;
commit = lookup_commit(the_repository, oid);
@@ -1133,8 +1162,8 @@ static int should_write_commit_graph(struct gc_config *cfg UNUSED)
data.num_not_in_graph = 0;
data.limit = 100;
- git_config_get_int("maintenance.commit-graph.auto",
- &data.limit);
+ repo_config_get_int(the_repository, "maintenance.commit-graph.auto",
+ &data.limit);
if (!data.limit)
return 0;
@@ -1211,8 +1240,14 @@ static int maintenance_task_prefetch(struct maintenance_run_opts *opts,
return 0;
}
-static int maintenance_task_gc(struct maintenance_run_opts *opts,
- struct gc_config *cfg UNUSED)
+static int maintenance_task_gc_foreground(struct maintenance_run_opts *opts,
+ struct gc_config *cfg)
+{
+ return gc_foreground_tasks(opts, cfg);
+}
+
+static int maintenance_task_gc_background(struct maintenance_run_opts *opts,
+ struct gc_config *cfg UNUSED)
{
struct child_process child = CHILD_PROCESS_INIT;
@@ -1226,6 +1261,7 @@ static int maintenance_task_gc(struct maintenance_run_opts *opts,
else
strvec_push(&child.args, "--no-quiet");
strvec_push(&child.args, "--no-detach");
+ strvec_push(&child.args, "--skip-foreground-tasks");
return run_command(&child);
}
@@ -1265,15 +1301,15 @@ static int loose_object_auto_condition(struct gc_config *cfg UNUSED)
{
int count = 0;
- git_config_get_int("maintenance.loose-objects.auto",
- &loose_object_auto_limit);
+ repo_config_get_int(the_repository, "maintenance.loose-objects.auto",
+ &loose_object_auto_limit);
if (!loose_object_auto_limit)
return 0;
if (loose_object_auto_limit < 0)
return 1;
- return for_each_loose_file_in_objdir(the_repository->objects->odb->path,
+ return for_each_loose_file_in_source(the_repository->objects->sources,
loose_object_count,
NULL, NULL, &count);
}
@@ -1308,7 +1344,7 @@ static int pack_loose(struct maintenance_run_opts *opts)
* Do not start pack-objects process
* if there are no loose objects.
*/
- if (!for_each_loose_file_in_objdir(r->objects->odb->path,
+ if (!for_each_loose_file_in_source(r->objects->sources,
bail_on_loose,
NULL, NULL, NULL))
return 0;
@@ -1320,7 +1356,7 @@ static int pack_loose(struct maintenance_run_opts *opts)
strvec_push(&pack_proc.args, "--quiet");
else
strvec_push(&pack_proc.args, "--no-quiet");
- strvec_pushf(&pack_proc.args, "%s/pack/loose", r->objects->odb->path);
+ strvec_pushf(&pack_proc.args, "%s/pack/loose", r->objects->sources->path);
pack_proc.in = -1;
@@ -1348,11 +1384,9 @@ static int pack_loose(struct maintenance_run_opts *opts)
else if (data.batch_size > 0)
data.batch_size--; /* Decrease for equality on limit. */
- for_each_loose_file_in_objdir(r->objects->odb->path,
+ for_each_loose_file_in_source(r->objects->sources,
write_loose_object_to_stdin,
- NULL,
- NULL,
- &data);
+ NULL, NULL, &data);
fclose(data.in);
@@ -1380,8 +1414,8 @@ static int incremental_repack_auto_condition(struct gc_config *cfg UNUSED)
if (!the_repository->settings.core_multi_pack_index)
return 0;
- git_config_get_int("maintenance.incremental-repack.auto",
- &incremental_repack_auto_limit);
+ repo_config_get_int(the_repository, "maintenance.incremental-repack.auto",
+ &incremental_repack_auto_limit);
if (!incremental_repack_auto_limit)
return 0;
@@ -1513,107 +1547,120 @@ static int maintenance_task_incremental_repack(struct maintenance_run_opts *opts
return 0;
}
-typedef int maintenance_task_fn(struct maintenance_run_opts *opts,
- struct gc_config *cfg);
-
-/*
- * An auto condition function returns 1 if the task should run
- * and 0 if the task should NOT run. See needs_to_gc() for an
- * example.
- */
-typedef int maintenance_auto_fn(struct gc_config *cfg);
+typedef int (*maintenance_task_fn)(struct maintenance_run_opts *opts,
+ struct gc_config *cfg);
+typedef int (*maintenance_auto_fn)(struct gc_config *cfg);
struct maintenance_task {
const char *name;
- maintenance_task_fn *fn;
- maintenance_auto_fn *auto_condition;
- unsigned enabled:1;
- enum schedule_priority schedule;
+ /*
+ * Work that will be executed before detaching. This should not include
+ * tasks that may run for an extended amount of time as it does cause
+ * auto-maintenance to block until foreground tasks have been run.
+ */
+ maintenance_task_fn foreground;
- /* -1 if not selected. */
- int selected_order;
+ /*
+ * Work that will be executed after detaching. When not detaching the
+ * work will be run in the foreground, as well.
+ */
+ maintenance_task_fn background;
+
+ /*
+ * An auto condition function returns 1 if the task should run and 0 if
+ * the task should NOT run. See needs_to_gc() for an example.
+ */
+ maintenance_auto_fn auto_condition;
};
-enum maintenance_task_label {
- TASK_PREFETCH,
- TASK_LOOSE_OBJECTS,
- TASK_INCREMENTAL_REPACK,
- TASK_GC,
- TASK_COMMIT_GRAPH,
- TASK_PACK_REFS,
- TASK_REFLOG_EXPIRE,
- TASK_WORKTREE_PRUNE,
- TASK_RERERE_GC,
-
- /* Leave as final value */
- TASK__COUNT
-};
-
-static struct maintenance_task tasks[] = {
+static const struct maintenance_task tasks[] = {
[TASK_PREFETCH] = {
- "prefetch",
- maintenance_task_prefetch,
+ .name = "prefetch",
+ .background = maintenance_task_prefetch,
},
[TASK_LOOSE_OBJECTS] = {
- "loose-objects",
- maintenance_task_loose_objects,
- loose_object_auto_condition,
+ .name = "loose-objects",
+ .background = maintenance_task_loose_objects,
+ .auto_condition = loose_object_auto_condition,
},
[TASK_INCREMENTAL_REPACK] = {
- "incremental-repack",
- maintenance_task_incremental_repack,
- incremental_repack_auto_condition,
+ .name = "incremental-repack",
+ .background = maintenance_task_incremental_repack,
+ .auto_condition = incremental_repack_auto_condition,
},
[TASK_GC] = {
- "gc",
- maintenance_task_gc,
- need_to_gc,
- 1,
+ .name = "gc",
+ .foreground = maintenance_task_gc_foreground,
+ .background = maintenance_task_gc_background,
+ .auto_condition = need_to_gc,
},
[TASK_COMMIT_GRAPH] = {
- "commit-graph",
- maintenance_task_commit_graph,
- should_write_commit_graph,
+ .name = "commit-graph",
+ .background = maintenance_task_commit_graph,
+ .auto_condition = should_write_commit_graph,
},
[TASK_PACK_REFS] = {
- "pack-refs",
- maintenance_task_pack_refs,
- pack_refs_condition,
+ .name = "pack-refs",
+ .foreground = maintenance_task_pack_refs,
+ .auto_condition = pack_refs_condition,
},
[TASK_REFLOG_EXPIRE] = {
- "reflog-expire",
- maintenance_task_reflog_expire,
- reflog_expire_condition,
+ .name = "reflog-expire",
+ .foreground = maintenance_task_reflog_expire,
+ .auto_condition = reflog_expire_condition,
},
[TASK_WORKTREE_PRUNE] = {
- "worktree-prune",
- maintenance_task_worktree_prune,
- worktree_prune_condition,
+ .name = "worktree-prune",
+ .background = maintenance_task_worktree_prune,
+ .auto_condition = worktree_prune_condition,
},
[TASK_RERERE_GC] = {
- "rerere-gc",
- maintenance_task_rerere_gc,
- rerere_gc_condition,
+ .name = "rerere-gc",
+ .background = maintenance_task_rerere_gc,
+ .auto_condition = rerere_gc_condition,
},
};
-static int compare_tasks_by_selection(const void *a_, const void *b_)
-{
- const struct maintenance_task *a = a_;
- const struct maintenance_task *b = b_;
+enum task_phase {
+ TASK_PHASE_FOREGROUND,
+ TASK_PHASE_BACKGROUND,
+};
- return b->selected_order - a->selected_order;
+static int maybe_run_task(const struct maintenance_task *task,
+ struct repository *repo,
+ struct maintenance_run_opts *opts,
+ struct gc_config *cfg,
+ enum task_phase phase)
+{
+ int foreground = (phase == TASK_PHASE_FOREGROUND);
+ maintenance_task_fn fn = foreground ? task->foreground : task->background;
+ const char *region = foreground ? "maintenance foreground" : "maintenance";
+ int ret = 0;
+
+ if (!fn)
+ return 0;
+ if (opts->auto_flag &&
+ (!task->auto_condition || !task->auto_condition(cfg)))
+ return 0;
+
+ trace2_region_enter(region, task->name, repo);
+ if (fn(opts, cfg)) {
+ error(_("task '%s' failed"), task->name);
+ ret = 1;
+ }
+ trace2_region_leave(region, task->name, repo);
+
+ return ret;
}
static int maintenance_run_tasks(struct maintenance_run_opts *opts,
struct gc_config *cfg)
{
- int i, found_selected = 0;
int result = 0;
struct lock_file lk;
struct repository *r = the_repository;
- char *lock_path = xstrfmt("%s/maintenance", r->objects->odb->path);
+ char *lock_path = xstrfmt("%s/maintenance", r->objects->sources->path);
if (hold_lock_file_for_update(&lk, lock_path, LOCK_NO_DEREF) < 0) {
/*
@@ -1631,6 +1678,11 @@ static int maintenance_run_tasks(struct maintenance_run_opts *opts,
}
free(lock_path);
+ for (size_t i = 0; i < opts->tasks_nr; i++)
+ if (maybe_run_task(&tasks[opts->tasks[i]], r, opts, cfg,
+ TASK_PHASE_FOREGROUND))
+ result = 1;
+
/* Failure to daemonize is ok, we'll continue in foreground. */
if (opts->detach > 0) {
trace2_region_enter("maintenance", "detach", the_repository);
@@ -1638,120 +1690,138 @@ static int maintenance_run_tasks(struct maintenance_run_opts *opts,
trace2_region_leave("maintenance", "detach", the_repository);
}
- for (i = 0; !found_selected && i < TASK__COUNT; i++)
- found_selected = tasks[i].selected_order >= 0;
-
- if (found_selected)
- QSORT(tasks, TASK__COUNT, compare_tasks_by_selection);
-
- for (i = 0; i < TASK__COUNT; i++) {
- if (found_selected && tasks[i].selected_order < 0)
- continue;
-
- if (!found_selected && !tasks[i].enabled)
- continue;
-
- if (opts->auto_flag &&
- (!tasks[i].auto_condition ||
- !tasks[i].auto_condition(cfg)))
- continue;
-
- if (opts->schedule && tasks[i].schedule < opts->schedule)
- continue;
-
- trace2_region_enter("maintenance", tasks[i].name, r);
- if (tasks[i].fn(opts, cfg)) {
- error(_("task '%s' failed"), tasks[i].name);
+ for (size_t i = 0; i < opts->tasks_nr; i++)
+ if (maybe_run_task(&tasks[opts->tasks[i]], r, opts, cfg,
+ TASK_PHASE_BACKGROUND))
result = 1;
- }
- trace2_region_leave("maintenance", tasks[i].name, r);
- }
rollback_lock_file(&lk);
return result;
}
-static void initialize_maintenance_strategy(void)
+struct maintenance_strategy {
+ struct {
+ int enabled;
+ enum schedule_priority schedule;
+ } tasks[TASK__COUNT];
+};
+
+static const struct maintenance_strategy none_strategy = { 0 };
+static const struct maintenance_strategy default_strategy = {
+ .tasks = {
+ [TASK_GC].enabled = 1,
+ },
+};
+static const struct maintenance_strategy incremental_strategy = {
+ .tasks = {
+ [TASK_COMMIT_GRAPH].enabled = 1,
+ [TASK_COMMIT_GRAPH].schedule = SCHEDULE_HOURLY,
+ [TASK_PREFETCH].enabled = 1,
+ [TASK_PREFETCH].schedule = SCHEDULE_HOURLY,
+ [TASK_INCREMENTAL_REPACK].enabled = 1,
+ [TASK_INCREMENTAL_REPACK].schedule = SCHEDULE_DAILY,
+ [TASK_LOOSE_OBJECTS].enabled = 1,
+ [TASK_LOOSE_OBJECTS].schedule = SCHEDULE_DAILY,
+ [TASK_PACK_REFS].enabled = 1,
+ [TASK_PACK_REFS].schedule = SCHEDULE_WEEKLY,
+ },
+};
+
+static void initialize_task_config(struct maintenance_run_opts *opts,
+ const struct string_list *selected_tasks)
{
+ struct strbuf config_name = STRBUF_INIT;
+ struct maintenance_strategy strategy;
const char *config_str;
- if (git_config_get_string_tmp("maintenance.strategy", &config_str))
+ /*
+ * In case the user has asked us to run tasks explicitly we only use
+ * those specified tasks. Specifically, we do _not_ want to consult the
+ * config or maintenance strategy.
+ */
+ if (selected_tasks->nr) {
+ for (size_t i = 0; i < selected_tasks->nr; i++) {
+ enum maintenance_task_label label = (intptr_t)selected_tasks->items[i].util;;
+ ALLOC_GROW(opts->tasks, opts->tasks_nr + 1, opts->tasks_alloc);
+ opts->tasks[opts->tasks_nr++] = label;
+ }
+
return;
-
- if (!strcasecmp(config_str, "incremental")) {
- tasks[TASK_GC].schedule = SCHEDULE_NONE;
- tasks[TASK_COMMIT_GRAPH].enabled = 1;
- tasks[TASK_COMMIT_GRAPH].schedule = SCHEDULE_HOURLY;
- tasks[TASK_PREFETCH].enabled = 1;
- tasks[TASK_PREFETCH].schedule = SCHEDULE_HOURLY;
- tasks[TASK_INCREMENTAL_REPACK].enabled = 1;
- tasks[TASK_INCREMENTAL_REPACK].schedule = SCHEDULE_DAILY;
- tasks[TASK_LOOSE_OBJECTS].enabled = 1;
- tasks[TASK_LOOSE_OBJECTS].schedule = SCHEDULE_DAILY;
- tasks[TASK_PACK_REFS].enabled = 1;
- tasks[TASK_PACK_REFS].schedule = SCHEDULE_WEEKLY;
}
-}
-static void initialize_task_config(int schedule)
-{
- int i;
- struct strbuf config_name = STRBUF_INIT;
+ /*
+ * Otherwise, the strategy depends on whether we run as part of a
+ * scheduled job or not:
+ *
+ * - Scheduled maintenance does not perform any housekeeping by
+ * default, but requires the user to pick a maintenance strategy.
+ *
+ * - Unscheduled maintenance uses our default strategy.
+ *
+ * Both of these are affected by the gitconfig though, which may
+ * override specific aspects of our strategy.
+ */
+ if (opts->schedule) {
+ strategy = none_strategy;
- if (schedule)
- initialize_maintenance_strategy();
+ if (!repo_config_get_string_tmp(the_repository, "maintenance.strategy", &config_str)) {
+ if (!strcasecmp(config_str, "incremental"))
+ strategy = incremental_strategy;
+ }
+ } else {
+ strategy = default_strategy;
+ }
- for (i = 0; i < TASK__COUNT; i++) {
+ for (size_t i = 0; i < TASK__COUNT; i++) {
int config_value;
- char *config_str;
strbuf_reset(&config_name);
strbuf_addf(&config_name, "maintenance.%s.enabled",
tasks[i].name);
+ if (!repo_config_get_bool(the_repository, config_name.buf, &config_value))
+ strategy.tasks[i].enabled = config_value;
+ if (!strategy.tasks[i].enabled)
+ continue;
- if (!git_config_get_bool(config_name.buf, &config_value))
- tasks[i].enabled = config_value;
-
- strbuf_reset(&config_name);
- strbuf_addf(&config_name, "maintenance.%s.schedule",
- tasks[i].name);
-
- if (!git_config_get_string(config_name.buf, &config_str)) {
- tasks[i].schedule = parse_schedule(config_str);
- free(config_str);
+ if (opts->schedule) {
+ strbuf_reset(&config_name);
+ strbuf_addf(&config_name, "maintenance.%s.schedule",
+ tasks[i].name);
+ if (!repo_config_get_string_tmp(the_repository, config_name.buf, &config_str))
+ strategy.tasks[i].schedule = parse_schedule(config_str);
+ if (strategy.tasks[i].schedule < opts->schedule)
+ continue;
}
+
+ ALLOC_GROW(opts->tasks, opts->tasks_nr + 1, opts->tasks_alloc);
+ opts->tasks[opts->tasks_nr++] = i;
}
strbuf_release(&config_name);
}
-static int task_option_parse(const struct option *opt UNUSED,
+static int task_option_parse(const struct option *opt,
const char *arg, int unset)
{
- int i, num_selected = 0;
- struct maintenance_task *task = NULL;
+ struct string_list *selected_tasks = opt->value;
+ size_t i;
BUG_ON_OPT_NEG(unset);
- for (i = 0; i < TASK__COUNT; i++) {
- if (tasks[i].selected_order >= 0)
- num_selected++;
- if (!strcasecmp(tasks[i].name, arg)) {
- task = &tasks[i];
- }
- }
-
- if (!task) {
+ for (i = 0; i < TASK__COUNT; i++)
+ if (!strcasecmp(tasks[i].name, arg))
+ break;
+ if (i >= TASK__COUNT) {
error(_("'%s' is not a valid task"), arg);
return 1;
}
- if (task->selected_order >= 0) {
+ if (unsorted_string_list_has_string(selected_tasks, arg)) {
error(_("task '%s' cannot be selected multiple times"), arg);
return 1;
}
- task->selected_order = num_selected + 1;
+ string_list_append(selected_tasks, arg)->util = (void *)(intptr_t)i;
return 0;
}
@@ -1759,8 +1829,8 @@ static int task_option_parse(const struct option *opt UNUSED,
static int maintenance_run(int argc, const char **argv, const char *prefix,
struct repository *repo UNUSED)
{
- int i;
struct maintenance_run_opts opts = MAINTENANCE_RUN_OPTS_INIT;
+ struct string_list selected_tasks = STRING_LIST_INIT_DUP;
struct gc_config cfg = GC_CONFIG_INIT;
struct option builtin_maintenance_run_options[] = {
OPT_BOOL(0, "auto", &opts.auto_flag,
@@ -1772,7 +1842,7 @@ static int maintenance_run(int argc, const char **argv, const char *prefix,
maintenance_opt_schedule),
OPT_BOOL(0, "quiet", &opts.quiet,
N_("do not report progress or other information over stderr")),
- OPT_CALLBACK_F(0, "task", NULL, N_("task"),
+ OPT_CALLBACK_F(0, "task", &selected_tasks, N_("task"),
N_("run a specific task"),
PARSE_OPT_NONEG, task_option_parse),
OPT_END()
@@ -1781,25 +1851,27 @@ static int maintenance_run(int argc, const char **argv, const char *prefix,
opts.quiet = !isatty(2);
- for (i = 0; i < TASK__COUNT; i++)
- tasks[i].selected_order = -1;
-
argc = parse_options(argc, argv, prefix,
builtin_maintenance_run_options,
builtin_maintenance_run_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
- if (opts.auto_flag && opts.schedule)
- die(_("use at most one of --auto and --schedule=<frequency>"));
+ die_for_incompatible_opt2(opts.auto_flag, "--auto",
+ opts.schedule, "--schedule=");
+ die_for_incompatible_opt2(selected_tasks.nr, "--task=",
+ opts.schedule, "--schedule=");
gc_config(&cfg);
- initialize_task_config(opts.schedule);
+ initialize_task_config(&opts, &selected_tasks);
if (argc != 0)
usage_with_options(builtin_maintenance_run_usage,
builtin_maintenance_run_options);
ret = maintenance_run_tasks(&opts, &cfg);
+
+ string_list_clear(&selected_tasks, 0);
+ maintenance_run_opts_release(&opts);
gc_config_release(&cfg);
return ret;
}
@@ -1840,13 +1912,13 @@ static int maintenance_register(int argc, const char **argv, const char *prefix,
options);
/* Disable foreground maintenance */
- git_config_set("maintenance.auto", "false");
+ repo_config_set(the_repository, "maintenance.auto", "false");
/* Set maintenance strategy, if unset */
- if (git_config_get("maintenance.strategy"))
- git_config_set("maintenance.strategy", "incremental");
+ if (repo_config_get(the_repository, "maintenance.strategy"))
+ repo_config_set(the_repository, "maintenance.strategy", "incremental");
- if (!git_config_get_string_multi(key, &list)) {
+ if (!repo_config_get_string_multi(the_repository, key, &list)) {
for_each_string_list_item(item, list) {
if (!strcmp(maintpath, item->string)) {
found = 1;
@@ -1865,7 +1937,7 @@ static int maintenance_register(int argc, const char **argv, const char *prefix,
}
if (!config_file)
die(_("$HOME not set"));
- rc = git_config_set_multivar_in_file_gently(
+ rc = repo_config_set_multivar_in_file_gently(the_repository,
config_file, "maintenance.repo", maintpath,
CONFIG_REGEX_NONE, NULL, 0);
free(global_config_file);
@@ -1915,7 +1987,7 @@ static int maintenance_unregister(int argc, const char **argv, const char *prefi
}
if (!(config_file
? git_configset_get_string_multi(&cs, key, &list)
- : git_config_get_string_multi(key, &list))) {
+ : repo_config_get_string_multi(the_repository, key, &list))) {
for_each_string_list_item(item, list) {
if (!strcmp(maintpath, item->string)) {
found = 1;
@@ -1934,7 +2006,7 @@ static int maintenance_unregister(int argc, const char **argv, const char *prefi
}
if (!config_file)
die(_("$HOME not set"));
- rc = git_config_set_multivar_in_file_gently(
+ rc = repo_config_set_multivar_in_file_gently(the_repository,
config_file, key, NULL, maintpath, NULL,
CONFIG_FLAGS_MULTI_REPLACE | CONFIG_FLAGS_FIXED_VALUE);
free(global_config_file);
@@ -2271,7 +2343,7 @@ static int launchctl_schedule_plist(const char *exec_path, enum schedule_priorit
die(_("failed to create directories for '%s'"), filename);
if ((long)lock_file_timeout_ms < 0 &&
- git_config_get_ulong("gc.launchctlplistlocktimeoutms",
+ repo_config_get_ulong(the_repository, "gc.launchctlplistlocktimeoutms",
&lock_file_timeout_ms))
lock_file_timeout_ms = 150;
@@ -3085,7 +3157,7 @@ static int update_background_schedule(const struct maintenance_start_opts *opts,
unsigned int i;
int result = 0;
struct lock_file lk;
- char *lock_path = xstrfmt("%s/schedule", the_repository->objects->odb->path);
+ char *lock_path = xstrfmt("%s/schedule", the_repository->objects->sources->path);
if (hold_lock_file_for_update(&lk, lock_path, LOCK_NO_DEREF) < 0) {
if (errno == EEXIST)
diff --git a/builtin/grep.c b/builtin/grep.c
index 3ce574a..5df6537 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -9,6 +9,7 @@
#include "builtin.h"
#include "abspath.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "config.h"
@@ -26,7 +27,7 @@
#include "submodule-config.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "pager.h"
#include "path.h"
@@ -462,7 +463,7 @@ static int grep_submodule(struct grep_opt *opt,
/*
* NEEDSWORK: repo_read_gitmodules() might call
- * add_to_alternates_memory() via config_from_gitmodules(). This
+ * odb_add_to_alternates_memory() via config_from_gitmodules(). This
* operation causes a race condition with concurrent object readings
* performed by the worker threads. That's why we need obj_read_lock()
* here. It should be removed once it's no longer necessary to add the
@@ -505,7 +506,8 @@ static int grep_submodule(struct grep_opt *opt,
* lazily registered as alternates when needed (and except in an
* unexpected code interaction, it won't be needed).
*/
- add_submodule_odb_by_path(subrepo->objects->odb->path);
+ odb_add_submodule_source_by_path(the_repository->objects,
+ subrepo->objects->sources->path);
obj_read_unlock();
memcpy(&subopt, opt, sizeof(subopt));
@@ -519,11 +521,9 @@ static int grep_submodule(struct grep_opt *opt,
struct strbuf base = STRBUF_INIT;
obj_read_lock();
- object_type = oid_object_info(subrepo, oid, NULL);
+ object_type = odb_read_object_info(subrepo->objects, oid, NULL);
obj_read_unlock();
- data = read_object_with_reference(subrepo,
- oid, OBJ_TREE,
- &size, NULL);
+ data = odb_read_object_peeled(subrepo->objects, oid, OBJ_TREE, &size, NULL);
if (!data)
die(_("unable to read tree (%s)"), oid_to_hex(oid));
@@ -572,8 +572,8 @@ static int grep_cache(struct grep_opt *opt,
void *data;
unsigned long size;
- data = repo_read_object_file(the_repository, &ce->oid,
- &type, &size);
+ data = odb_read_object(the_repository->objects, &ce->oid,
+ &type, &size);
if (!data)
die(_("unable to read tree %s"), oid_to_hex(&ce->oid));
init_tree_desc(&tree, &ce->oid, data, size);
@@ -665,8 +665,8 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,
void *data;
unsigned long size;
- data = repo_read_object_file(the_repository,
- &entry.oid, &type, &size);
+ data = odb_read_object(the_repository->objects,
+ &entry.oid, &type, &size);
if (!data)
die(_("unable to read tree (%s)"),
oid_to_hex(&entry.oid));
@@ -704,9 +704,8 @@ static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
struct strbuf base;
int hit, len;
- data = read_object_with_reference(opt->repo,
- &obj->oid, OBJ_TREE,
- &size, NULL);
+ data = odb_read_object_peeled(opt->repo->objects, &obj->oid,
+ OBJ_TREE, &size, NULL);
if (!data)
die(_("unable to read tree (%s)"), oid_to_hex(&obj->oid));
@@ -1037,7 +1036,7 @@ int cmd_grep(int argc,
grep_prefix = prefix;
grep_init(&opt, the_repository);
- git_config(grep_cmd_config, &opt);
+ repo_config(the_repository, grep_cmd_config, &opt);
/*
* If there is no -- then the paths must exist in the working
@@ -1060,7 +1059,7 @@ int cmd_grep(int argc,
if (use_index && !startup_info->have_repository) {
int fallback = 0;
- git_config_get_bool("grep.fallbacktonoindex", &fallback);
+ repo_config_get_bool(the_repository, "grep.fallbacktonoindex", &fallback);
if (fallback)
use_index = 0;
else
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 6a99ec2..5d900a6 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -8,10 +8,11 @@
#include "builtin.h"
#include "abspath.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
@@ -104,14 +105,14 @@ int cmd_hash_object(int argc,
prefix = setup_git_directory_gently(&nongit);
if (nongit && !the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
if (vpath && prefix) {
vpath_free = prefix_filename(prefix, vpath);
vpath = vpath_free;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (stdin_paths) {
if (hashstdin)
diff --git a/builtin/help.c b/builtin/help.c
index c257079..c09cbc8 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -6,6 +6,7 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "pager.h"
@@ -210,7 +211,7 @@ static enum help_format parse_help_format(const char *format)
if (!strcmp(format, "web") || !strcmp(format, "html"))
return HELP_FORMAT_WEB;
/*
- * Please update _git_config() in git-completion.bash when you
+ * Please update _repo_config() in git-completion.bash when you
* add new help formats.
*/
die(_("unrecognized help format '%s'"), format);
@@ -706,7 +707,7 @@ int cmd_help(int argc,
}
setup_git_directory_gently(&nongit);
- git_config(git_help_config, NULL);
+ repo_config(the_repository, git_help_config, NULL);
if (parsed_help_format != HELP_FORMAT_NONE)
help_format = parsed_help_format;
diff --git a/builtin/hook.c b/builtin/hook.c
index 672d2e3..7afec38 100644
--- a/builtin/hook.c
+++ b/builtin/hook.c
@@ -1,6 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hook.h"
#include "parse-options.h"
@@ -55,7 +56,7 @@ static int run(int argc, const char **argv, const char *prefix,
strvec_push(&opt.args, argv[i]);
/* Need to take into account core.hooksPath */
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
hook_name = argv[0];
if (!ignore_missing)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index bb7925b..f91c301 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -21,7 +21,7 @@
#include "packfile.h"
#include "pack-revindex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "oidset.h"
#include "path.h"
@@ -260,7 +260,8 @@ static unsigned check_object(struct object *obj)
if (!(obj->flags & FLAG_CHECKED)) {
unsigned long size;
- int type = oid_object_info(the_repository, &obj->oid, &size);
+ int type = odb_read_object_info(the_repository->objects,
+ &obj->oid, &size);
if (type <= 0)
die(_("did not receive expected object %s"),
oid_to_hex(&obj->oid));
@@ -362,7 +363,7 @@ static const char *open_pack_file(const char *pack_name)
input_fd = 0;
if (!pack_name) {
struct strbuf tmp_file = STRBUF_INIT;
- output_fd = odb_mkstemp(&tmp_file,
+ output_fd = odb_mkstemp(the_repository->objects, &tmp_file,
"pack/tmp_pack_XXXXXX");
pack_name = strbuf_detach(&tmp_file, NULL);
} else {
@@ -892,8 +893,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
if (startup_info->have_repository) {
read_lock();
- collision_test_needed = has_object(the_repository, oid,
- HAS_OBJECT_FETCH_PROMISOR);
+ collision_test_needed = odb_has_object(the_repository->objects, oid,
+ HAS_OBJECT_FETCH_PROMISOR);
read_unlock();
}
@@ -908,13 +909,13 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
enum object_type has_type;
unsigned long has_size;
read_lock();
- has_type = oid_object_info(the_repository, oid, &has_size);
+ has_type = odb_read_object_info(the_repository->objects, oid, &has_size);
if (has_type < 0)
die(_("cannot read existing object info %s"), oid_to_hex(oid));
if (has_type != type || has_size != size)
die(_("SHA1 COLLISION FOUND WITH %s !"), oid_to_hex(oid));
- has_data = repo_read_object_file(the_repository, oid,
- &has_type, &has_size);
+ has_data = odb_read_object(the_repository->objects, oid,
+ &has_type, &has_size);
read_unlock();
if (!data)
data = new_data = get_data_from_pack(obj_entry);
@@ -1501,9 +1502,9 @@ static void fix_unresolved_deltas(struct hashfile *f)
struct oid_array to_fetch = OID_ARRAY_INIT;
for (i = 0; i < nr_ref_deltas; i++) {
struct ref_delta_entry *d = sorted_by_pos[i];
- if (!oid_object_info_extended(the_repository, &d->oid,
- NULL,
- OBJECT_INFO_FOR_PREFETCH))
+ if (!odb_read_object_info_extended(the_repository->objects,
+ &d->oid, NULL,
+ OBJECT_INFO_FOR_PREFETCH))
continue;
oid_array_append(&to_fetch, &d->oid);
}
@@ -1520,8 +1521,8 @@ static void fix_unresolved_deltas(struct hashfile *f)
if (objects[d->obj_no].real_type != OBJ_REF_DELTA)
continue;
- data = repo_read_object_file(the_repository, &d->oid, &type,
- &size);
+ data = odb_read_object(the_repository->objects, &d->oid,
+ &type, &size);
if (!data)
continue;
@@ -1597,7 +1598,7 @@ static void rename_tmp_packfile(const char **final_name,
if (!*final_name || strcmp(*final_name, curr_name)) {
if (!*final_name)
*final_name = odb_pack_name(the_repository, name, hash, ext);
- if (finalize_object_file(curr_name, *final_name))
+ if (finalize_object_file(the_repository, curr_name, *final_name))
die(_("unable to rename temporary '*.%s' file to '%s'"),
ext, *final_name);
} else if (make_read_only_if_same) {
@@ -1829,7 +1830,7 @@ static void repack_local_links(void)
oidset_iter_init(&outgoing_links, &iter);
while ((oid = oidset_iter_next(&iter))) {
struct object_info info = OBJECT_INFO_INIT;
- if (oid_object_info_extended(the_repository, oid, &info, 0))
+ if (odb_read_object_info_extended(the_repository->objects, oid, &info, 0))
/* Missing; assume it is a promisor object */
continue;
if (info.whence == OI_PACKED && info.u.packed.pack->pack_promisor)
@@ -1916,7 +1917,7 @@ int cmd_index_pack(int argc,
reset_pack_idx_option(&opts);
opts.flags |= WRITE_REV;
- git_config(git_index_pack_config, &opts);
+ repo_config(the_repository, git_index_pack_config, &opts);
if (prefix && chdir(prefix))
die(_("Cannot come back to cwd"));
@@ -2034,7 +2035,7 @@ int cmd_index_pack(int argc,
* choice but to guess the object hash.
*/
if (!the_repository->hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
opts.flags &= ~(WRITE_REV | WRITE_REV_VERIFY);
if (rev_index) {
diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c
index 44d8ccd..41b0750 100644
--- a/builtin/interpret-trailers.c
+++ b/builtin/interpret-trailers.c
@@ -6,6 +6,7 @@
*/
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "string-list.h"
@@ -220,7 +221,7 @@ int cmd_interpret_trailers(int argc,
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options,
git_interpret_trailers_usage, 0);
diff --git a/builtin/log.c b/builtin/log.c
index b450cd3..c2f8bbf 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -15,7 +15,7 @@
#include "hex.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "pager.h"
#include "color.h"
#include "commit.h"
@@ -113,6 +113,15 @@ struct log_config {
int fmt_patch_name_max;
char *fmt_pretty;
char *default_date_mode;
+
+#ifndef WITH_BREAKING_CHANGES
+ /*
+ * Note: git_log_config() does not touch this member and that
+ * is very deliberate. This member is only to be used to
+ * resurrect whatchanged that is deprecated.
+ */
+ int i_still_use_this;
+#endif
};
static void log_config_init(struct log_config *cfg)
@@ -212,7 +221,7 @@ static void set_default_decoration_filter(struct decoration_filter *decoration_f
struct string_list *include = decoration_filter->include_ref_pattern;
const struct string_list *config_exclude;
- if (!git_config_get_string_multi("log.excludeDecoration",
+ if (!repo_config_get_string_multi(the_repository, "log.excludeDecoration",
&config_exclude)) {
struct string_list_item *item;
for_each_string_list_item(item, config_exclude)
@@ -226,7 +235,7 @@ static void set_default_decoration_filter(struct decoration_filter *decoration_f
* since the command-line takes precedent.
*/
if (use_default_decoration_filter &&
- !git_config_get_string("log.initialdecorationset", &value) &&
+ !repo_config_get_string(the_repository, "log.initialdecorationset", &value) &&
!strcmp("all", value))
use_default_decoration_filter = 0;
free(value);
@@ -267,6 +276,10 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
OPT__QUIET(&quiet, N_("suppress diff output")),
OPT_BOOL(0, "source", &source, N_("show source")),
OPT_BOOL(0, "use-mailmap", &mailmap, N_("use mail map file")),
+#ifndef WITH_BREAKING_CHANGES
+ OPT_HIDDEN_BOOL(0, "i-still-use-this", &cfg->i_still_use_this,
+ "<use this deprecated command>"),
+#endif
OPT_ALIAS(0, "mailmap", "use-mailmap"),
OPT_CALLBACK_F(0, "clear-decorations", NULL, NULL,
N_("clear all previously-defined decoration filters"),
@@ -378,129 +391,6 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
cmd_log_init_finish(argc, argv, prefix, rev, opt, cfg);
}
-/*
- * This gives a rough estimate for how many commits we
- * will print out in the list.
- */
-static int estimate_commit_count(struct commit_list *list)
-{
- int n = 0;
-
- while (list) {
- struct commit *commit = list->item;
- unsigned int flags = commit->object.flags;
- list = list->next;
- if (!(flags & (TREESAME | UNINTERESTING)))
- n++;
- }
- return n;
-}
-
-static void show_early_header(struct rev_info *rev, const char *stage, int nr)
-{
- if (rev->shown_one) {
- rev->shown_one = 0;
- if (rev->commit_format != CMIT_FMT_ONELINE)
- putchar(rev->diffopt.line_termination);
- }
- fprintf(rev->diffopt.file, _("Final output: %d %s\n"), nr, stage);
-}
-
-static struct itimerval early_output_timer;
-
-static void log_show_early(struct rev_info *revs, struct commit_list *list)
-{
- int i = revs->early_output;
- int show_header = 1;
- int no_free = revs->diffopt.no_free;
-
- revs->diffopt.no_free = 0;
- sort_in_topological_order(&list, revs->sort_order);
- while (list && i) {
- struct commit *commit = list->item;
- switch (simplify_commit(revs, commit)) {
- case commit_show:
- if (show_header) {
- int n = estimate_commit_count(list);
- show_early_header(revs, "incomplete", n);
- show_header = 0;
- }
- log_tree_commit(revs, commit);
- i--;
- break;
- case commit_ignore:
- break;
- case commit_error:
- revs->diffopt.no_free = no_free;
- diff_free(&revs->diffopt);
- return;
- }
- list = list->next;
- }
-
- /* Did we already get enough commits for the early output? */
- if (!i) {
- revs->diffopt.no_free = 0;
- diff_free(&revs->diffopt);
- return;
- }
-
- /*
- * ..if no, then repeat it twice a second until we
- * do.
- *
- * NOTE! We don't use "it_interval", because if the
- * reader isn't listening, we want our output to be
- * throttled by the writing, and not have the timer
- * trigger every second even if we're blocked on a
- * reader!
- */
- early_output_timer.it_value.tv_sec = 0;
- early_output_timer.it_value.tv_usec = 500000;
- setitimer(ITIMER_REAL, &early_output_timer, NULL);
-}
-
-static void early_output(int signal UNUSED)
-{
- show_early_output = log_show_early;
-}
-
-static void setup_early_output(void)
-{
- struct sigaction sa;
-
- /*
- * Set up the signal handler, minimally intrusively:
- * we only set a single volatile integer word (not
- * using sigatomic_t - trying to avoid unnecessary
- * system dependencies and headers), and using
- * SA_RESTART.
- */
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = early_output;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
- sigaction(SIGALRM, &sa, NULL);
-
- /*
- * If we can get the whole output in less than a
- * tenth of a second, don't even bother doing the
- * early-output thing..
- *
- * This is a one-time-only trigger.
- */
- early_output_timer.it_value.tv_sec = 0;
- early_output_timer.it_value.tv_usec = 100000;
- setitimer(ITIMER_REAL, &early_output_timer, NULL);
-}
-
-static void finish_early_output(struct rev_info *rev)
-{
- int n = estimate_commit_count(rev->commits);
- signal(SIGALRM, SIG_IGN);
- show_early_header(rev, "done", n);
-}
-
static int cmd_log_walk_no_free(struct rev_info *rev)
{
struct commit *commit;
@@ -508,15 +398,9 @@ static int cmd_log_walk_no_free(struct rev_info *rev)
int saved_dcctc = 0;
int result;
- if (rev->early_output)
- setup_early_output();
-
if (prepare_revision_walk(rev))
die(_("revision walk setup failed"));
- if (rev->early_output)
- finish_early_output(rev);
-
/*
* For --check and --exit-code, the exit code is based on CHECK_FAILED
* and HAS_CHANGES being accumulated in rev->diffopt, so be careful to
@@ -633,6 +517,7 @@ static int git_log_config(const char *var, const char *value,
return git_diff_ui_config(var, value, ctx, cb);
}
+#ifndef WITH_BREAKING_CHANGES
int cmd_whatchanged(int argc,
const char **argv,
const char *prefix,
@@ -645,10 +530,10 @@ int cmd_whatchanged(int argc,
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.diff = 1;
rev.simplify_history = 0;
@@ -656,6 +541,10 @@ int cmd_whatchanged(int argc,
opt.def = "HEAD";
opt.revarg_opt = REVARG_COMMITTISH;
cmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);
+
+ if (!cfg.i_still_use_this)
+ you_still_use_that("git whatchanged");
+
if (!rev.diffopt.output_format)
rev.diffopt.output_format = DIFF_FORMAT_RAW;
@@ -665,6 +554,7 @@ int cmd_whatchanged(int argc,
log_config_release(&cfg);
return ret;
}
+#endif
static void show_tagger(const char *buf, struct rev_info *rev)
{
@@ -714,7 +604,7 @@ static int show_tag_object(const struct object_id *oid, struct rev_info *rev)
{
unsigned long size;
enum object_type type;
- char *buf = repo_read_object_file(the_repository, oid, &type, &size);
+ char *buf = odb_read_object(the_repository->objects, oid, &type, &size);
unsigned long offset = 0;
if (!buf)
@@ -771,7 +661,7 @@ int cmd_show(int argc,
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
@@ -780,7 +670,7 @@ int cmd_show(int argc,
memset(&match_all, 0, sizeof(match_all));
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.diff = 1;
rev.always_show_header = 1;
@@ -888,11 +778,11 @@ int cmd_log_reflog(int argc,
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
init_reflog_walk(&rev.reflog_info);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.verbose_header = 1;
memset(&opt, 0, sizeof(opt));
@@ -933,10 +823,10 @@ int cmd_log(int argc,
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.always_show_header = 1;
memset(&opt, 0, sizeof(opt));
@@ -2139,9 +2029,9 @@ int cmd_format_patch(int argc,
format_config_init(&cfg);
init_diff_ui_defaults();
init_display_notes(&cfg.notes_opt);
- git_config(git_format_config, &cfg);
+ repo_config(the_repository, git_format_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.show_notes = cfg.show_notes;
memcpy(&rev.notes_opt, &cfg.notes_opt, sizeof(cfg.notes_opt));
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index be74f0a..c06a6f3 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -11,6 +11,7 @@
#include "builtin.h"
#include "config.h"
#include "convert.h"
+#include "environment.h"
#include "quote.h"
#include "dir.h"
#include "gettext.h"
@@ -25,7 +26,7 @@
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
-#include "object-store.h"
+#include "odb.h"
#include "hex.h"
@@ -251,7 +252,7 @@ static void expand_objectsize(struct repository *repo, struct strbuf *line,
{
if (type == OBJ_BLOB) {
unsigned long size;
- if (oid_object_info(repo, oid, &size) < 0)
+ if (odb_read_object_info(repo->objects, oid, &size) < 0)
die(_("could not get object info about '%s'"),
oid_to_hex(oid));
if (padded)
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 01a4d4d..df09000 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -112,7 +112,7 @@ int cmd_ls_remote(int argc,
* depending on what object hash the remote uses.
*/
if (!the_repository->hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
packet_trace_identity("ls-remote");
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 8aafc30..5d55731 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -7,10 +7,11 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "tree.h"
#include "path.h"
#include "quote.h"
@@ -27,7 +28,7 @@ static void expand_objectsize(struct strbuf *line, const struct object_id *oid,
{
if (type == OBJ_BLOB) {
unsigned long size;
- if (oid_object_info(the_repository, oid, &size) < 0)
+ if (odb_read_object_info(the_repository->objects, oid, &size) < 0)
die(_("could not get object info about '%s'"),
oid_to_hex(oid));
if (padded)
@@ -217,7 +218,7 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
if (type == OBJ_BLOB) {
unsigned long size;
- if (oid_object_info(the_repository, oid, &size) == OBJ_BAD)
+ if (odb_read_object_info(the_repository->objects, oid, &size) == OBJ_BAD)
xsnprintf(size_text, sizeof(size_text), "BAD");
else
xsnprintf(size_text, sizeof(size_text),
@@ -375,7 +376,7 @@ int cmd_ls_tree(int argc,
struct object_context obj_context = {0};
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, ls_tree_options,
ls_tree_usage, 0);
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 123c815..3f82781 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -2,6 +2,7 @@
#include "builtin.h"
#include "config.h"
#include "commit.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
@@ -167,7 +168,7 @@ int cmd_merge_base(int argc,
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, merge_base_usage, 0);
if (cmdmode == 'a') {
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 2b16b10..46775d0 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -7,7 +7,7 @@
#include "hex.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "config.h"
#include "gettext.h"
#include "setup.h"
@@ -97,7 +97,7 @@ int cmd_merge_file(int argc,
if (startup_info->have_repository) {
/* Read the configuration file */
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
if (0 <= git_xmerge_style)
xmp.style = git_xmerge_style;
}
@@ -155,7 +155,8 @@ int cmd_merge_file(int argc,
if (object_id && !to_stdout) {
struct object_id oid;
if (result.size) {
- if (write_object_file(result.ptr, result.size, OBJ_BLOB, &oid) < 0)
+ if (odb_write_object(the_repository->objects, result.ptr,
+ result.size, OBJ_BLOB, &oid) < 0)
ret = error(_("Could not write object file"));
} else {
oidcpy(&oid, the_hash_algo->empty_blob);
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 7f41665..203f0e6 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -1,6 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
+#include "environment.h"
#include "tree-walk.h"
#include "xdiff-interface.h"
#include "help.h"
@@ -10,7 +11,7 @@
#include "commit-reach.h"
#include "merge-ort.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "parse-options.h"
#include "blob.h"
#include "merge-blobs.h"
@@ -75,9 +76,9 @@ static void *result(struct merge_list *entry, unsigned long *size)
const char *path = entry->path;
if (!entry->stage)
- return repo_read_object_file(the_repository,
- &entry->blob->object.oid, &type,
- size);
+ return odb_read_object(the_repository->objects,
+ &entry->blob->object.oid, &type,
+ size);
base = NULL;
if (entry->stage == 1) {
base = entry->blob;
@@ -100,9 +101,9 @@ static void *origin(struct merge_list *entry, unsigned long *size)
enum object_type type;
while (entry) {
if (entry->stage == 2)
- return repo_read_object_file(the_repository,
- &entry->blob->object.oid,
- &type, size);
+ return odb_read_object(the_repository->objects,
+ &entry->blob->object.oid,
+ &type, size);
entry = entry->link;
}
return NULL;
@@ -683,7 +684,7 @@ int cmd_merge_tree(int argc,
if (argc != expected_remaining_argc)
usage_with_options(merge_tree_usage, mt_options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
/* Do the relevant type of merge */
if (o.mode == MODE_REAL)
diff --git a/builtin/merge.c b/builtin/merge.c
index 0d39c65..ce880e6 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1392,7 +1392,7 @@ int cmd_merge(int argc,
skip_prefix(branch, "refs/heads/", &branch);
init_diff_ui_defaults();
- git_config(git_merge_config, NULL);
+ repo_config(the_repository, git_merge_config, NULL);
if (!branch || is_null_oid(&head_oid))
head_commit = NULL;
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 7ac11c4..7cf6e12 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -6,7 +6,7 @@
#include "strbuf.h"
#include "replace-object.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "fsck.h"
#include "config.h"
@@ -41,7 +41,7 @@ static int mktag_fsck_error_func(struct fsck_options *o UNUSED,
fprintf_ln(stderr, _("error: tag input does not pass fsck: %s"), message);
return 1;
default:
- BUG(_("%d (FSCK_IGNORE?) should never trigger this callback"),
+ BUG("%d (FSCK_IGNORE?) should never trigger this callback",
msg_type);
}
}
@@ -54,8 +54,8 @@ static int verify_object_in_tag(struct object_id *tagged_oid, int *tagged_type)
void *buffer;
const struct object_id *repl;
- buffer = repo_read_object_file(the_repository, tagged_oid, &type,
- &size);
+ buffer = odb_read_object(the_repository->objects, tagged_oid,
+ &type, &size);
if (!buffer)
die(_("could not read tagged object '%s'"),
oid_to_hex(tagged_oid));
@@ -98,7 +98,7 @@ int cmd_mktag(int argc,
fsck_set_msg_type_from_ids(&fsck_options, FSCK_MSG_EXTRA_HEADER_ENTRY,
FSCK_WARN);
/* config might set fsck.extraHeaderEntry=* again */
- git_config(git_fsck_config, &fsck_options);
+ repo_config(the_repository, git_fsck_config, &fsck_options);
if (fsck_tag_standalone(NULL, buf.buf, buf.len, &fsck_options,
&tagged_oid, &tagged_type))
die(_("tag on stdin did not pass our strict fsck check"));
@@ -106,7 +106,7 @@ int cmd_mktag(int argc,
if (verify_object_in_tag(&tagged_oid, &tagged_type) < 0)
die(_("tag on stdin did not refer to a valid object"));
- if (write_object_file(buf.buf, buf.len, OBJ_TAG, &result) < 0)
+ if (odb_write_object(the_repository->objects, buf.buf, buf.len, OBJ_TAG, &result) < 0)
die(_("unable to write tag file"));
strbuf_release(&buf);
diff --git a/builtin/mktree.c b/builtin/mktree.c
index 4b47803..1277230 100644
--- a/builtin/mktree.c
+++ b/builtin/mktree.c
@@ -12,7 +12,7 @@
#include "tree.h"
#include "parse-options.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
static struct treeent {
unsigned mode;
@@ -63,7 +63,7 @@ static void write_tree(struct object_id *oid)
strbuf_add(&buf, ent->oid.hash, the_hash_algo->rawsz);
}
- write_object_file(buf.buf, buf.len, OBJ_TREE, oid);
+ odb_write_object(the_repository->objects, buf.buf, buf.len, OBJ_TREE, oid);
strbuf_release(&buf);
}
@@ -124,10 +124,10 @@ static void mktree_line(char *buf, int nul_term_line, int allow_missing)
/* Check the type of object identified by oid without fetching objects */
oi.typep = &obj_type;
- if (oid_object_info_extended(the_repository, &oid, &oi,
- OBJECT_INFO_LOOKUP_REPLACE |
- OBJECT_INFO_QUICK |
- OBJECT_INFO_SKIP_FETCH_OBJECT) < 0)
+ if (odb_read_object_info_extended(the_repository->objects, &oid, &oi,
+ OBJECT_INFO_LOOKUP_REPLACE |
+ OBJECT_INFO_QUICK |
+ OBJECT_INFO_SKIP_FETCH_OBJECT) < 0)
obj_type = -1;
if (obj_type < 0) {
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 69a9750..d3b9e98 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -2,12 +2,13 @@
#include "builtin.h"
#include "abspath.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "midx.h"
#include "strbuf.h"
#include "trace2.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "repository.h"
@@ -143,7 +144,7 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
- git_config(git_multi_pack_index_write_config, NULL);
+ repo_config(the_repository, git_multi_pack_index_write_config, NULL);
options = add_common_options(builtin_multi_pack_index_write_options);
@@ -290,12 +291,12 @@ int cmd_multi_pack_index(int argc,
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (the_repository &&
the_repository->objects &&
- the_repository->objects->odb)
- opts.object_dir = xstrdup(the_repository->objects->odb->path);
+ the_repository->objects->sources)
+ opts.object_dir = xstrdup(the_repository->objects->sources->path);
argc = parse_options(argc, argv, prefix, options,
builtin_multi_pack_index_usage, 0);
diff --git a/builtin/mv.c b/builtin/mv.c
index 07548fe..d439250 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -239,7 +239,7 @@ int cmd_mv(int argc,
struct strbuf pathbuf = STRBUF_INIT;
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_mv_options,
builtin_mv_usage, 0);
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index ff19963..74512e5 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -600,7 +600,7 @@ int cmd_name_rev(int argc,
mem_pool_init(&string_pool, 0);
init_commit_rev_name(&rev_names);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, opts, name_rev_usage, 0);
#ifndef WITH_BREAKING_CHANGES
diff --git a/builtin/notes.c b/builtin/notes.c
index a3f433c..6fb4144 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -16,7 +16,7 @@
#include "notes.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "pretty.h"
@@ -152,7 +152,7 @@ static void copy_obj_to_fd(int fd, const struct object_id *oid)
{
unsigned long size;
enum object_type type;
- char *buf = repo_read_object_file(the_repository, oid, &type, &size);
+ char *buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (buf) {
if (size)
write_or_die(fd, buf, size);
@@ -229,7 +229,8 @@ static void prepare_note_data(const struct object_id *object, struct note_data *
static void write_note_data(struct note_data *d, struct object_id *oid)
{
- if (write_object_file(d->buf.buf, d->buf.len, OBJ_BLOB, oid)) {
+ if (odb_write_object(the_repository->objects, d->buf.buf,
+ d->buf.len, OBJ_BLOB, oid)) {
int status = die_message(_("unable to write note object"));
if (d->edit_path)
@@ -319,7 +320,7 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
strbuf_init(&msg->buf, 0);
if (repo_get_oid(the_repository, arg, &object))
die(_("failed to resolve '%s' as a valid ref."), arg);
- if (!(value = repo_read_object_file(the_repository, &object, &type, &len)))
+ if (!(value = odb_read_object(the_repository->objects, &object, &type, &len)))
die(_("failed to read object '%s'."), arg);
if (type != OBJ_BLOB) {
strbuf_release(&msg->buf);
@@ -722,7 +723,7 @@ static int append_edit(int argc, const char **argv, const char *prefix,
unsigned long size;
enum object_type type;
struct strbuf buf = STRBUF_INIT;
- char *prev_buf = repo_read_object_file(the_repository, note, &type, &size);
+ char *prev_buf = odb_read_object(the_repository->objects, note, &type, &size);
if (!prev_buf)
die(_("unable to read %s"), oid_to_hex(note));
@@ -873,7 +874,7 @@ static int git_config_get_notes_strategy(const char *key,
{
char *value;
- if (git_config_get_string(key, &value))
+ if (repo_config_get_string(the_repository, key, &value))
return 1;
if (parse_notes_merge_strategy(value, strategy))
git_die_config(the_repository, key, _("unknown notes merge strategy %s"), value);
@@ -1145,7 +1146,7 @@ int cmd_notes(int argc,
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_notes_usage,
PARSE_OPT_SUBCOMMAND_OPTIONAL);
if (!fn) {
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 8b33edc..53a2256 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -32,7 +32,7 @@
#include "list.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "dir.h"
#include "midx.h"
@@ -41,6 +41,10 @@
#include "promisor-remote.h"
#include "pack-mtimes.h"
#include "parse-options.h"
+#include "blob.h"
+#include "tree.h"
+#include "path-walk.h"
+#include "trace2.h"
/*
* Objects we are going to pack are collected in the `to_pack` structure.
@@ -184,8 +188,14 @@ static inline void oe_set_delta_size(struct packing_data *pack,
#define SET_DELTA_SIBLING(obj, val) oe_set_delta_sibling(&to_pack, obj, val)
static const char *const pack_usage[] = {
- N_("git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"),
- N_("git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"),
+ N_("git pack-objects [-q | --progress | --all-progress] [--all-progress-implied]\n"
+ " [--no-reuse-delta] [--delta-base-offset] [--non-empty]\n"
+ " [--local] [--incremental] [--window=<n>] [--depth=<n>]\n"
+ " [--revs [--unpacked | --all]] [--keep-pack=<pack-name>]\n"
+ " [--cruft] [--cruft-expiration=<time>]\n"
+ " [--stdout [--filter=<filter-spec>] | <base-name>]\n"
+ " [--shallow] [--keep-true-parents] [--[no-]sparse]\n"
+ " [--name-hash-version=<n>] [--path-walk] < <object-list>"),
NULL
};
@@ -200,6 +210,7 @@ static int keep_unreachable, unpack_unreachable, include_tag;
static timestamp_t unpack_unreachable_expiration;
static int pack_loose_unreachable;
static int cruft;
+static int shallow = 0;
static timestamp_t cruft_expiration;
static int local;
static int have_non_local_packs;
@@ -218,6 +229,7 @@ static int delta_search_threads;
static int pack_to_stdout;
static int sparse;
static int thin;
+static int path_walk = -1;
static int num_preferred_base;
static struct progress *progress_state;
@@ -272,6 +284,12 @@ static struct oidmap configured_exclusions;
static struct oidset excluded_by_config;
static int name_hash_version = -1;
+enum stdin_packs_mode {
+ STDIN_PACKS_MODE_NONE,
+ STDIN_PACKS_MODE_STANDARD,
+ STDIN_PACKS_MODE_FOLLOW,
+};
+
/**
* Check whether the name_hash_version chosen by user input is appropriate,
* and also validate whether it is compatible with other features.
@@ -337,13 +355,13 @@ static void *get_delta(struct object_entry *entry)
void *buf, *base_buf, *delta_buf;
enum object_type type;
- buf = repo_read_object_file(the_repository, &entry->idx.oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects, &entry->idx.oid,
+ &type, &size);
if (!buf)
die(_("unable to read %s"), oid_to_hex(&entry->idx.oid));
- base_buf = repo_read_object_file(the_repository,
- &DELTA(entry)->idx.oid, &type,
- &base_size);
+ base_buf = odb_read_object(the_repository->objects,
+ &DELTA(entry)->idx.oid, &type,
+ &base_size);
if (!base_buf)
die("unable to read %s",
oid_to_hex(&DELTA(entry)->idx.oid));
@@ -506,9 +524,9 @@ static unsigned long write_no_reuse_object(struct hashfile *f, struct object_ent
&size, NULL)) != NULL)
buf = NULL;
else {
- buf = repo_read_object_file(the_repository,
- &entry->idx.oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects,
+ &entry->idx.oid, &type,
+ &size);
if (!buf)
die(_("unable to read %s"),
oid_to_hex(&entry->idx.oid));
@@ -1437,7 +1455,7 @@ static void write_pack_file(void)
strbuf_setlen(&tmpname, tmpname_len);
}
- rename_tmp_packfile_idx(&tmpname, &idx_tmp_name);
+ rename_tmp_packfile_idx(the_repository, &tmpname, &idx_tmp_name);
free(idx_tmp_name);
strbuf_release(&tmpname);
@@ -1688,11 +1706,19 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
uint32_t found_mtime)
{
int want;
+ struct odb_source *source;
struct list_head *pos;
- struct multi_pack_index *m;
- if (!exclude && local && has_loose_object_nonlocal(oid))
- return 0;
+ if (!exclude && local) {
+ /*
+ * Note that we start iterating at `sources->next` so that we
+ * skip the local object source.
+ */
+ struct odb_source *source = the_repository->objects->sources->next;
+ for (; source; source = source->next)
+ if (has_loose_object(source, oid))
+ return 0;
+ }
/*
* If we already know the pack object lives in, start checks from that
@@ -1709,9 +1735,13 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
*found_offset = 0;
}
- for (m = get_multi_pack_index(the_repository); m; m = m->next) {
+ odb_prepare_alternates(the_repository->objects);
+
+ for (source = the_repository->objects->sources; source; source = source->next) {
+ struct multi_pack_index *m = get_multi_pack_index(source);
struct pack_entry e;
- if (fill_midx_entry(the_repository, oid, &e, m)) {
+
+ if (m && fill_midx_entry(the_repository, oid, &e, m)) {
want = want_object_in_pack_one(e.p, oid, exclude, found_pack, found_offset, found_mtime);
if (want != -1)
return want;
@@ -1895,7 +1925,7 @@ static struct pbase_tree_cache *pbase_tree_get(const struct object_id *oid)
/* Did not find one. Either we got a bogus request or
* we need to read and perhaps cache.
*/
- data = repo_read_object_file(the_repository, oid, &type, &size);
+ data = odb_read_object(the_repository->objects, oid, &type, &size);
if (!data)
return NULL;
if (type != OBJ_TREE) {
@@ -2055,8 +2085,8 @@ static void add_preferred_base(struct object_id *oid)
if (window <= num_preferred_base++)
return;
- data = read_object_with_reference(the_repository, oid,
- OBJ_TREE, &size, &tree_oid);
+ data = odb_read_object_peeled(the_repository->objects, oid,
+ OBJ_TREE, &size, &tree_oid);
if (!data)
return;
@@ -2154,10 +2184,10 @@ static void prefetch_to_pack(uint32_t object_index_start) {
for (i = object_index_start; i < to_pack.nr_objects; i++) {
struct object_entry *entry = to_pack.objects + i;
- if (!oid_object_info_extended(the_repository,
- &entry->idx.oid,
- NULL,
- OBJECT_INFO_FOR_PREFETCH))
+ if (!odb_read_object_info_extended(the_repository->objects,
+ &entry->idx.oid,
+ NULL,
+ OBJECT_INFO_FOR_PREFETCH))
continue;
oid_array_append(&to_fetch, &entry->idx.oid);
}
@@ -2298,19 +2328,19 @@ static void check_object(struct object_entry *entry, uint32_t object_index)
/*
* No choice but to fall back to the recursive delta walk
- * with oid_object_info() to find about the object type
+ * with odb_read_object_info() to find about the object type
* at this point...
*/
give_up:
unuse_pack(&w_curs);
}
- if (oid_object_info_extended(the_repository, &entry->idx.oid, &oi,
- OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0) {
+ if (odb_read_object_info_extended(the_repository->objects, &entry->idx.oid, &oi,
+ OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0) {
if (repo_has_promisor_remote(the_repository)) {
prefetch_to_pack(object_index);
- if (oid_object_info_extended(the_repository, &entry->idx.oid, &oi,
- OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0)
+ if (odb_read_object_info_extended(the_repository->objects, &entry->idx.oid, &oi,
+ OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0)
type = -1;
} else {
type = -1;
@@ -2384,12 +2414,13 @@ static void drop_reused_delta(struct object_entry *entry)
if (packed_object_info(the_repository, IN_PACK(entry), entry->in_pack_offset, &oi) < 0) {
/*
* We failed to get the info from this pack for some reason;
- * fall back to oid_object_info, which may find another copy.
+ * fall back to odb_read_object_info, which may find another copy.
* And if that fails, the error will be recorded in oe_type(entry)
* and dealt with in prepare_pack().
*/
oe_set_type(entry,
- oid_object_info(the_repository, &entry->idx.oid, &size));
+ odb_read_object_info(the_repository->objects,
+ &entry->idx.oid, &size));
} else {
oe_set_type(entry, type);
}
@@ -2677,7 +2708,8 @@ unsigned long oe_get_size_slow(struct packing_data *pack,
if (e->type_ != OBJ_OFS_DELTA && e->type_ != OBJ_REF_DELTA) {
packing_data_lock(&to_pack);
- if (oid_object_info(the_repository, &e->idx.oid, &size) < 0)
+ if (odb_read_object_info(the_repository->objects,
+ &e->idx.oid, &size) < 0)
die(_("unable to get size of %s"),
oid_to_hex(&e->idx.oid));
packing_data_unlock(&to_pack);
@@ -2760,9 +2792,9 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
/* Load data if not already done */
if (!trg->data) {
packing_data_lock(&to_pack);
- trg->data = repo_read_object_file(the_repository,
- &trg_entry->idx.oid, &type,
- &sz);
+ trg->data = odb_read_object(the_repository->objects,
+ &trg_entry->idx.oid, &type,
+ &sz);
packing_data_unlock(&to_pack);
if (!trg->data)
die(_("object %s cannot be read"),
@@ -2775,9 +2807,9 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
}
if (!src->data) {
packing_data_lock(&to_pack);
- src->data = repo_read_object_file(the_repository,
- &src_entry->idx.oid, &type,
- &sz);
+ src->data = odb_read_object(the_repository->objects,
+ &src_entry->idx.oid, &type,
+ &sz);
packing_data_unlock(&to_pack);
if (!src->data) {
if (src_entry->preferred_base) {
@@ -3041,6 +3073,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
struct thread_params {
pthread_t thread;
struct object_entry **list;
+ struct packing_region *regions;
unsigned list_size;
unsigned remaining;
int window;
@@ -3283,6 +3316,242 @@ static int add_ref_tag(const char *tag UNUSED, const char *referent UNUSED, cons
return 0;
}
+static int should_attempt_deltas(struct object_entry *entry)
+{
+ if (DELTA(entry))
+ /* This happens if we decided to reuse existing
+ * delta from a pack. "reuse_delta &&" is implied.
+ */
+ return 0;
+
+ if (!entry->type_valid ||
+ oe_size_less_than(&to_pack, entry, 50))
+ return 0;
+
+ if (entry->no_try_delta)
+ return 0;
+
+ if (!entry->preferred_base) {
+ if (oe_type(entry) < 0)
+ die(_("unable to get type of object %s"),
+ oid_to_hex(&entry->idx.oid));
+ } else if (oe_type(entry) < 0) {
+ /*
+ * This object is not found, but we
+ * don't have to include it anyway.
+ */
+ return 0;
+ }
+
+ return 1;
+}
+
+static void find_deltas_for_region(struct object_entry *list,
+ struct packing_region *region,
+ unsigned int *processed)
+{
+ struct object_entry **delta_list;
+ unsigned int delta_list_nr = 0;
+
+ ALLOC_ARRAY(delta_list, region->nr);
+ for (size_t i = 0; i < region->nr; i++) {
+ struct object_entry *entry = list + region->start + i;
+ if (should_attempt_deltas(entry))
+ delta_list[delta_list_nr++] = entry;
+ }
+
+ QSORT(delta_list, delta_list_nr, type_size_sort);
+ find_deltas(delta_list, &delta_list_nr, window, depth, processed);
+ free(delta_list);
+}
+
+static void find_deltas_by_region(struct object_entry *list,
+ struct packing_region *regions,
+ size_t start, size_t nr)
+{
+ unsigned int processed = 0;
+ size_t progress_nr;
+
+ if (!nr)
+ return;
+
+ progress_nr = regions[nr - 1].start + regions[nr - 1].nr;
+
+ if (progress)
+ progress_state = start_progress(the_repository,
+ _("Compressing objects by path"),
+ progress_nr);
+
+ while (nr--)
+ find_deltas_for_region(list,
+ ®ions[start++],
+ &processed);
+
+ display_progress(progress_state, progress_nr);
+ stop_progress(&progress_state);
+}
+
+static void *threaded_find_deltas_by_path(void *arg)
+{
+ struct thread_params *me = arg;
+
+ progress_lock();
+ while (me->remaining) {
+ while (me->remaining) {
+ progress_unlock();
+ find_deltas_for_region(to_pack.objects,
+ me->regions,
+ me->processed);
+ progress_lock();
+ me->remaining--;
+ me->regions++;
+ }
+
+ me->working = 0;
+ pthread_cond_signal(&progress_cond);
+ progress_unlock();
+
+ /*
+ * We must not set ->data_ready before we wait on the
+ * condition because the main thread may have set it to 1
+ * before we get here. In order to be sure that new
+ * work is available if we see 1 in ->data_ready, it
+ * was initialized to 0 before this thread was spawned
+ * and we reset it to 0 right away.
+ */
+ pthread_mutex_lock(&me->mutex);
+ while (!me->data_ready)
+ pthread_cond_wait(&me->cond, &me->mutex);
+ me->data_ready = 0;
+ pthread_mutex_unlock(&me->mutex);
+
+ progress_lock();
+ }
+ progress_unlock();
+ /* leave ->working 1 so that this doesn't get more work assigned */
+ return NULL;
+}
+
+static void ll_find_deltas_by_region(struct object_entry *list,
+ struct packing_region *regions,
+ uint32_t start, uint32_t nr)
+{
+ struct thread_params *p;
+ int i, ret, active_threads = 0;
+ unsigned int processed = 0;
+ uint32_t progress_nr;
+ init_threaded_search();
+
+ if (!nr)
+ return;
+
+ progress_nr = regions[nr - 1].start + regions[nr - 1].nr;
+ if (delta_search_threads <= 1) {
+ find_deltas_by_region(list, regions, start, nr);
+ cleanup_threaded_search();
+ return;
+ }
+
+ if (progress > pack_to_stdout)
+ fprintf_ln(stderr,
+ Q_("Path-based delta compression using up to %d thread",
+ "Path-based delta compression using up to %d threads",
+ delta_search_threads),
+ delta_search_threads);
+ CALLOC_ARRAY(p, delta_search_threads);
+
+ if (progress)
+ progress_state = start_progress(the_repository,
+ _("Compressing objects by path"),
+ progress_nr);
+ /* Partition the work amongst work threads. */
+ for (i = 0; i < delta_search_threads; i++) {
+ unsigned sub_size = nr / (delta_search_threads - i);
+
+ p[i].window = window;
+ p[i].depth = depth;
+ p[i].processed = &processed;
+ p[i].working = 1;
+ p[i].data_ready = 0;
+
+ p[i].regions = regions;
+ p[i].list_size = sub_size;
+ p[i].remaining = sub_size;
+
+ regions += sub_size;
+ nr -= sub_size;
+ }
+
+ /* Start work threads. */
+ for (i = 0; i < delta_search_threads; i++) {
+ if (!p[i].list_size)
+ continue;
+ pthread_mutex_init(&p[i].mutex, NULL);
+ pthread_cond_init(&p[i].cond, NULL);
+ ret = pthread_create(&p[i].thread, NULL,
+ threaded_find_deltas_by_path, &p[i]);
+ if (ret)
+ die(_("unable to create thread: %s"), strerror(ret));
+ active_threads++;
+ }
+
+ /*
+ * Now let's wait for work completion. Each time a thread is done
+ * with its work, we steal half of the remaining work from the
+ * thread with the largest number of unprocessed objects and give
+ * it to that newly idle thread. This ensure good load balancing
+ * until the remaining object list segments are simply too short
+ * to be worth splitting anymore.
+ */
+ while (active_threads) {
+ struct thread_params *target = NULL;
+ struct thread_params *victim = NULL;
+ unsigned sub_size = 0;
+
+ progress_lock();
+ for (;;) {
+ for (i = 0; !target && i < delta_search_threads; i++)
+ if (!p[i].working)
+ target = &p[i];
+ if (target)
+ break;
+ pthread_cond_wait(&progress_cond, &progress_mutex);
+ }
+
+ for (i = 0; i < delta_search_threads; i++)
+ if (p[i].remaining > 2*window &&
+ (!victim || victim->remaining < p[i].remaining))
+ victim = &p[i];
+ if (victim) {
+ sub_size = victim->remaining / 2;
+ target->regions = victim->regions + victim->remaining - sub_size;
+ victim->list_size -= sub_size;
+ victim->remaining -= sub_size;
+ }
+ target->list_size = sub_size;
+ target->remaining = sub_size;
+ target->working = 1;
+ progress_unlock();
+
+ pthread_mutex_lock(&target->mutex);
+ target->data_ready = 1;
+ pthread_cond_signal(&target->cond);
+ pthread_mutex_unlock(&target->mutex);
+
+ if (!sub_size) {
+ pthread_join(target->thread, NULL);
+ pthread_cond_destroy(&target->cond);
+ pthread_mutex_destroy(&target->mutex);
+ active_threads--;
+ }
+ }
+ cleanup_threaded_search();
+ free(p);
+
+ display_progress(progress_state, progress_nr);
+ stop_progress(&progress_state);
+}
+
static void prepare_pack(int window, int depth)
{
struct object_entry **delta_list;
@@ -3307,39 +3576,21 @@ static void prepare_pack(int window, int depth)
if (!to_pack.nr_objects || !window || !depth)
return;
+ if (path_walk)
+ ll_find_deltas_by_region(to_pack.objects, to_pack.regions,
+ 0, to_pack.nr_regions);
+
ALLOC_ARRAY(delta_list, to_pack.nr_objects);
nr_deltas = n = 0;
for (i = 0; i < to_pack.nr_objects; i++) {
struct object_entry *entry = to_pack.objects + i;
- if (DELTA(entry))
- /* This happens if we decided to reuse existing
- * delta from a pack. "reuse_delta &&" is implied.
- */
+ if (!should_attempt_deltas(entry))
continue;
- if (!entry->type_valid ||
- oe_size_less_than(&to_pack, entry, 50))
- continue;
-
- if (entry->no_try_delta)
- continue;
-
- if (!entry->preferred_base) {
+ if (!entry->preferred_base)
nr_deltas++;
- if (oe_type(entry) < 0)
- die(_("unable to get type of object %s"),
- oid_to_hex(&entry->idx.oid));
- } else {
- if (oe_type(entry) < 0) {
- /*
- * This object is not found, but we
- * don't have to include it anyway.
- */
- continue;
- }
- }
delta_list[n++] = entry;
}
@@ -3494,7 +3745,6 @@ static int add_object_entry_from_pack(const struct object_id *oid,
return 0;
if (p) {
- struct rev_info *revs = _data;
struct object_info oi = OBJECT_INFO_INIT;
oi.typep = &type;
@@ -3502,6 +3752,7 @@ static int add_object_entry_from_pack(const struct object_id *oid,
die(_("could not get type of object %s in pack %s"),
oid_to_hex(oid), p->pack_name);
} else if (type == OBJ_COMMIT) {
+ struct rev_info *revs = _data;
/*
* commits in included packs are used as starting points for the
* subsequent revision walk
@@ -3517,32 +3768,48 @@ static int add_object_entry_from_pack(const struct object_id *oid,
return 0;
}
-static void show_commit_pack_hint(struct commit *commit UNUSED,
- void *data UNUSED)
+static void show_object_pack_hint(struct object *object, const char *name,
+ void *data)
{
- /* nothing to do; commits don't have a namehash */
+ enum stdin_packs_mode mode = *(enum stdin_packs_mode *)data;
+ if (mode == STDIN_PACKS_MODE_FOLLOW) {
+ if (object->type == OBJ_BLOB &&
+ !has_object(the_repository, &object->oid, 0))
+ return;
+ add_object_entry(&object->oid, object->type, name, 0);
+ } else {
+ struct object_entry *oe = packlist_find(&to_pack, &object->oid);
+ if (!oe)
+ return;
+
+ /*
+ * Our 'to_pack' list was constructed by iterating all
+ * objects packed in included packs, and so doesn't have
+ * a non-zero hash field that you would typically pick
+ * up during a reachability traversal.
+ *
+ * Make a best-effort attempt to fill in the ->hash and
+ * ->no_try_delta fields here in order to perhaps
+ * improve the delta selection process.
+ */
+ oe->hash = pack_name_hash_fn(name);
+ oe->no_try_delta = name && no_try_delta(name);
+
+ stdin_packs_hints_nr++;
+ }
}
-static void show_object_pack_hint(struct object *object, const char *name,
- void *data UNUSED)
+static void show_commit_pack_hint(struct commit *commit, void *data)
{
- struct object_entry *oe = packlist_find(&to_pack, &object->oid);
- if (!oe)
+ enum stdin_packs_mode mode = *(enum stdin_packs_mode *)data;
+
+ if (mode == STDIN_PACKS_MODE_FOLLOW) {
+ show_object_pack_hint((struct object *)commit, "", data);
return;
+ }
- /*
- * Our 'to_pack' list was constructed by iterating all objects packed in
- * included packs, and so doesn't have a non-zero hash field that you
- * would typically pick up during a reachability traversal.
- *
- * Make a best-effort attempt to fill in the ->hash and ->no_try_delta
- * here using a now in order to perhaps improve the delta selection
- * process.
- */
- oe->hash = pack_name_hash_fn(name);
- oe->no_try_delta = name && no_try_delta(name);
+ /* nothing to do; commits don't have a namehash */
- stdin_packs_hints_nr++;
}
static int pack_mtime_cmp(const void *_a, const void *_b)
@@ -3562,7 +3829,7 @@ static int pack_mtime_cmp(const void *_a, const void *_b)
return 0;
}
-static void read_packs_list_from_stdin(void)
+static void read_packs_list_from_stdin(struct rev_info *revs)
{
struct strbuf buf = STRBUF_INIT;
struct string_list include_packs = STRING_LIST_INIT_DUP;
@@ -3570,24 +3837,6 @@ static void read_packs_list_from_stdin(void)
struct string_list_item *item = NULL;
struct packed_git *p;
- struct rev_info revs;
-
- repo_init_revisions(the_repository, &revs, NULL);
- /*
- * Use a revision walk to fill in the namehash of objects in the include
- * packs. To save time, we'll avoid traversing through objects that are
- * in excluded packs.
- *
- * That may cause us to avoid populating all of the namehash fields of
- * all included objects, but our goal is best-effort, since this is only
- * an optimization during delta selection.
- */
- revs.no_kept_objects = 1;
- revs.keep_pack_cache_flags |= IN_CORE_KEEP_PACKS;
- revs.blob_objects = 1;
- revs.tree_objects = 1;
- revs.tag_objects = 1;
- revs.ignore_missing_links = 1;
while (strbuf_getline(&buf, stdin) != EOF) {
if (!buf.len)
@@ -3657,25 +3906,55 @@ static void read_packs_list_from_stdin(void)
struct packed_git *p = item->util;
for_each_object_in_pack(p,
add_object_entry_from_pack,
- &revs,
+ revs,
FOR_EACH_OBJECT_PACK_ORDER);
}
+ strbuf_release(&buf);
+ string_list_clear(&include_packs, 0);
+ string_list_clear(&exclude_packs, 0);
+}
+
+static void add_unreachable_loose_objects(struct rev_info *revs);
+
+static void read_stdin_packs(enum stdin_packs_mode mode, int rev_list_unpacked)
+{
+ struct rev_info revs;
+
+ repo_init_revisions(the_repository, &revs, NULL);
+ /*
+ * Use a revision walk to fill in the namehash of objects in the include
+ * packs. To save time, we'll avoid traversing through objects that are
+ * in excluded packs.
+ *
+ * That may cause us to avoid populating all of the namehash fields of
+ * all included objects, but our goal is best-effort, since this is only
+ * an optimization during delta selection.
+ */
+ revs.no_kept_objects = 1;
+ revs.keep_pack_cache_flags |= IN_CORE_KEEP_PACKS;
+ revs.blob_objects = 1;
+ revs.tree_objects = 1;
+ revs.tag_objects = 1;
+ revs.ignore_missing_links = 1;
+
+ /* avoids adding objects in excluded packs */
+ ignore_packed_keep_in_core = 1;
+ read_packs_list_from_stdin(&revs);
+ if (rev_list_unpacked)
+ add_unreachable_loose_objects(&revs);
+
if (prepare_revision_walk(&revs))
die(_("revision walk setup failed"));
traverse_commit_list(&revs,
show_commit_pack_hint,
show_object_pack_hint,
- NULL);
+ &mode);
trace2_data_intmax("pack-objects", the_repository, "stdin_packs_found",
stdin_packs_found_nr);
trace2_data_intmax("pack-objects", the_repository, "stdin_packs_hints",
stdin_packs_hints_nr);
-
- strbuf_release(&buf);
- string_list_clear(&include_packs, 0);
- string_list_clear(&exclude_packs, 0);
}
static void add_cruft_object_entry(const struct object_id *oid, enum object_type type,
@@ -3695,7 +3974,14 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
} else {
if (!want_object_in_pack_mtime(oid, 0, &pack, &offset, mtime))
return;
- if (!pack && type == OBJ_BLOB && !has_loose_object(oid)) {
+ if (!pack && type == OBJ_BLOB) {
+ struct odb_source *source = the_repository->objects->sources;
+ int found = 0;
+
+ for (; !found && source; source = source->next)
+ if (has_loose_object(source, oid))
+ found = 1;
+
/*
* If a traversed tree has a missing blob then we want
* to avoid adding that missing object to our pack.
@@ -3709,7 +3995,8 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
* limited to "ensure non-tip blobs which don't exist in
* packs do exist via loose objects". Confused?
*/
- return;
+ if (!found)
+ return;
}
entry = create_object_entry(oid, type, pack_name_hash_fn(name),
@@ -3773,7 +4060,6 @@ static void mark_pack_kept_in_core(struct string_list *packs, unsigned keep)
}
}
-static void add_unreachable_loose_objects(void);
static void add_objects_in_unpacked_packs(void);
static void enumerate_cruft_objects(void)
@@ -3783,7 +4069,7 @@ static void enumerate_cruft_objects(void)
_("Enumerating cruft objects"), 0);
add_objects_in_unpacked_packs();
- add_unreachable_loose_objects();
+ add_unreachable_loose_objects(NULL);
stop_progress(&progress_state);
}
@@ -3966,7 +4252,7 @@ static void show_object__ma_allow_any(struct object *obj, const char *name, void
* Quietly ignore ALL missing objects. This avoids problems with
* staging them now and getting an odd error later.
*/
- if (!has_object(the_repository, &obj->oid, 0))
+ if (!odb_has_object(the_repository->objects, &obj->oid, 0))
return;
show_object(obj, name, data);
@@ -3980,7 +4266,7 @@ static void show_object__ma_allow_promisor(struct object *obj, const char *name,
* Quietly ignore EXPECTED missing objects. This avoids problems with
* staging them now and getting an odd error later.
*/
- if (!has_object(the_repository, &obj->oid, 0) &&
+ if (!odb_has_object(the_repository->objects, &obj->oid, 0) &&
is_promisor_object(to_pack.repo, &obj->oid))
return;
@@ -4061,9 +4347,10 @@ static void add_objects_in_unpacked_packs(void)
}
static int add_loose_object(const struct object_id *oid, const char *path,
- void *data UNUSED)
+ void *data)
{
- enum object_type type = oid_object_info(the_repository, oid, NULL);
+ struct rev_info *revs = data;
+ enum object_type type = odb_read_object_info(the_repository->objects, oid, NULL);
if (type < 0) {
warning(_("loose object at %s could not be examined"), path);
@@ -4083,6 +4370,10 @@ static int add_loose_object(const struct object_id *oid, const char *path,
} else {
add_object_entry(oid, type, "", 0);
}
+
+ if (revs && type == OBJ_COMMIT)
+ add_pending_oid(revs, NULL, oid, 0);
+
return 0;
}
@@ -4091,11 +4382,10 @@ static int add_loose_object(const struct object_id *oid, const char *path,
* add_object_entry will weed out duplicates, so we just add every
* loose object we find.
*/
-static void add_unreachable_loose_objects(void)
+static void add_unreachable_loose_objects(struct rev_info *revs)
{
- for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
- add_loose_object,
- NULL, NULL, NULL);
+ for_each_loose_file_in_source(the_repository->objects->sources,
+ add_loose_object, NULL, NULL, revs);
}
static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)
@@ -4163,7 +4453,8 @@ static void loosen_unused_packed_objects(void)
if (!packlist_find(&to_pack, &oid) &&
!has_sha1_pack_kept_or_nonlocal(&oid) &&
!loosened_object_can_be_discarded(&oid, p->mtime)) {
- if (force_object_loose(&oid, p->mtime))
+ if (force_object_loose(the_repository->objects->sources,
+ &oid, p->mtime))
die(_("unable to force loose object"));
loosened_objects_nr++;
}
@@ -4272,6 +4563,93 @@ static void mark_bitmap_preferred_tips(void)
}
}
+static inline int is_oid_uninteresting(struct repository *repo,
+ struct object_id *oid)
+{
+ struct object *o = lookup_object(repo, oid);
+ return !o || (o->flags & UNINTERESTING);
+}
+
+static int add_objects_by_path(const char *path,
+ struct oid_array *oids,
+ enum object_type type,
+ void *data)
+{
+ size_t oe_start = to_pack.nr_objects;
+ size_t oe_end;
+ unsigned int *processed = data;
+
+ /*
+ * First, add all objects to the packing data, including the ones
+ * marked UNINTERESTING (translated to 'exclude') as they can be
+ * used as delta bases.
+ */
+ for (size_t i = 0; i < oids->nr; i++) {
+ int exclude;
+ struct object_info oi = OBJECT_INFO_INIT;
+ struct object_id *oid = &oids->oid[i];
+
+ /* Skip objects that do not exist locally. */
+ if ((exclude_promisor_objects || arg_missing_action != MA_ERROR) &&
+ oid_object_info_extended(the_repository, oid, &oi,
+ OBJECT_INFO_FOR_PREFETCH) < 0)
+ continue;
+
+ exclude = is_oid_uninteresting(the_repository, oid);
+
+ if (exclude && !thin)
+ continue;
+
+ add_object_entry(oid, type, path, exclude);
+ }
+
+ oe_end = to_pack.nr_objects;
+
+ /* We can skip delta calculations if it is a no-op. */
+ if (oe_end == oe_start || !window)
+ return 0;
+
+ ALLOC_GROW(to_pack.regions,
+ to_pack.nr_regions + 1,
+ to_pack.nr_regions_alloc);
+
+ to_pack.regions[to_pack.nr_regions].start = oe_start;
+ to_pack.regions[to_pack.nr_regions].nr = oe_end - oe_start;
+ to_pack.nr_regions++;
+
+ *processed += oids->nr;
+ display_progress(progress_state, *processed);
+
+ return 0;
+}
+
+static void get_object_list_path_walk(struct rev_info *revs)
+{
+ struct path_walk_info info = PATH_WALK_INFO_INIT;
+ unsigned int processed = 0;
+ int result;
+
+ info.revs = revs;
+ info.path_fn = add_objects_by_path;
+ info.path_fn_data = &processed;
+
+ /*
+ * Allow the --[no-]sparse option to be interesting here, if only
+ * for testing purposes. Paths with no interesting objects will not
+ * contribute to the resulting pack, but only create noisy preferred
+ * base objects.
+ */
+ info.prune_all_uninteresting = sparse;
+ info.edge_aggressive = shallow;
+
+ trace2_region_enter("pack-objects", "path-walk", revs->repo);
+ result = walk_objects_by_path(&info);
+ trace2_region_leave("pack-objects", "path-walk", revs->repo);
+
+ if (result)
+ die(_("failed to pack objects via path-walk"));
+}
+
static void get_object_list(struct rev_info *revs, int ac, const char **av)
{
struct setup_revision_opt s_r_opt = {
@@ -4327,15 +4705,19 @@ static void get_object_list(struct rev_info *revs, int ac, const char **av)
if (write_bitmap_index)
mark_bitmap_preferred_tips();
- if (prepare_revision_walk(revs))
- die(_("revision walk setup failed"));
- mark_edges_uninteresting(revs, show_edge, sparse);
-
if (!fn_show_object)
fn_show_object = show_object;
- traverse_commit_list(revs,
- show_commit, fn_show_object,
- NULL);
+
+ if (path_walk) {
+ get_object_list_path_walk(revs);
+ } else {
+ if (prepare_revision_walk(revs))
+ die(_("revision walk setup failed"));
+ mark_edges_uninteresting(revs, show_edge, sparse);
+ traverse_commit_list(revs,
+ show_commit, fn_show_object,
+ NULL);
+ }
if (unpack_unreachable_expiration) {
revs->ignore_missing_links = 1;
@@ -4351,7 +4733,7 @@ static void get_object_list(struct rev_info *revs, int ac, const char **av)
if (keep_unreachable)
add_objects_in_unpacked_packs();
if (pack_loose_unreachable)
- add_unreachable_loose_objects();
+ add_unreachable_loose_objects(NULL);
if (unpack_unreachable)
loosen_unused_packed_objects();
@@ -4449,7 +4831,7 @@ static int option_parse_cruft_expiration(const struct option *opt UNUSED,
static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)
{
struct object_info info = OBJECT_INFO_INIT;
- if (oid_object_info_extended(the_repository, &obj->oid, &info, 0))
+ if (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))
BUG("should_include_obj should only be called on existing objects");
return info.whence != OI_PACKED || !info.u.packed.pack->pack_promisor;
}
@@ -4458,18 +4840,34 @@ static int is_not_in_promisor_pack(struct commit *commit, void *data) {
return is_not_in_promisor_pack_obj((struct object *) commit, data);
}
+static int parse_stdin_packs_mode(const struct option *opt, const char *arg,
+ int unset)
+{
+ enum stdin_packs_mode *mode = opt->value;
+
+ if (unset)
+ *mode = STDIN_PACKS_MODE_NONE;
+ else if (!arg || !*arg)
+ *mode = STDIN_PACKS_MODE_STANDARD;
+ else if (!strcmp(arg, "follow"))
+ *mode = STDIN_PACKS_MODE_FOLLOW;
+ else
+ die(_("invalid value for '%s': '%s'"), opt->long_name, arg);
+
+ return 0;
+}
+
int cmd_pack_objects(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{
int use_internal_rev_list = 0;
- int shallow = 0;
int all_progress_implied = 0;
struct strvec rp = STRVEC_INIT;
int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
int rev_list_index = 0;
- int stdin_packs = 0;
+ enum stdin_packs_mode stdin_packs = STDIN_PACKS_MODE_NONE;
struct string_list keep_pack_list = STRING_LIST_INIT_NODUP;
struct list_objects_filter_options filter_options =
LIST_OBJECTS_FILTER_INIT;
@@ -4524,6 +4922,9 @@ int cmd_pack_objects(int argc,
OPT_SET_INT_F(0, "indexed-objects", &rev_list_index,
N_("include objects referred to by the index"),
1, PARSE_OPT_NONEG),
+ OPT_CALLBACK_F(0, "stdin-packs", &stdin_packs, N_("mode"),
+ N_("read packs from stdin"),
+ PARSE_OPT_OPTARG, parse_stdin_packs_mode),
OPT_BOOL(0, "stdin-packs", &stdin_packs,
N_("read packs from stdin")),
OPT_BOOL(0, "stdout", &pack_to_stdout,
@@ -4545,6 +4946,8 @@ int cmd_pack_objects(int argc,
N_("use the sparse reachability algorithm")),
OPT_BOOL(0, "thin", &thin,
N_("create thin packs")),
+ OPT_BOOL(0, "path-walk", &path_walk,
+ N_("use the path-walk API to walk objects when possible")),
OPT_BOOL(0, "shallow", &shallow,
N_("create packs suitable for shallow fetches")),
OPT_BOOL(0, "honor-pack-keep", &ignore_packed_keep_on_disk,
@@ -4599,7 +5002,7 @@ int cmd_pack_objects(int argc,
reset_pack_idx_option(&pack_idx_opts);
pack_idx_opts.flags |= WRITE_REV;
- git_config(git_pack_config, NULL);
+ repo_config(the_repository, git_pack_config, NULL);
if (git_env_bool(GIT_TEST_NO_WRITE_REV_INDEX, 0))
pack_idx_opts.flags &= ~WRITE_REV;
@@ -4614,6 +5017,17 @@ int cmd_pack_objects(int argc,
if (pack_to_stdout != !base_name || argc)
usage_with_options(pack_usage, pack_objects_options);
+ if (path_walk < 0) {
+ if (use_bitmap_index > 0 ||
+ !use_internal_rev_list)
+ path_walk = 0;
+ else if (the_repository->gitdir &&
+ the_repository->settings.pack_use_path_walk)
+ path_walk = 1;
+ else
+ path_walk = git_env_bool("GIT_TEST_PACK_PATH_WALK", 0);
+ }
+
if (depth < 0)
depth = 0;
if (depth >= (1 << OE_DEPTH_BITS)) {
@@ -4630,7 +5044,28 @@ int cmd_pack_objects(int argc,
window = 0;
strvec_push(&rp, "pack-objects");
- if (thin) {
+
+ if (path_walk) {
+ const char *option = NULL;
+ if (filter_options.choice)
+ option = "--filter";
+ else if (use_delta_islands)
+ option = "--delta-islands";
+
+ if (option) {
+ warning(_("cannot use %s with %s"),
+ option, "--path-walk");
+ path_walk = 0;
+ }
+ }
+ if (path_walk) {
+ strvec_push(&rp, "--boundary");
+ /*
+ * We must disable the bitmaps because we are removing
+ * the --objects / --objects-edge[-aggressive] options.
+ */
+ use_bitmap_index = 0;
+ } else if (thin) {
use_internal_rev_list = 1;
strvec_push(&rp, shallow
? "--objects-edge-aggressive"
@@ -4655,9 +5090,10 @@ int cmd_pack_objects(int argc,
strvec_push(&rp, "--unpacked");
}
- if (exclude_promisor_objects && exclude_promisor_objects_best_effort)
- die(_("options '%s' and '%s' cannot be used together"),
- "--exclude-promisor-objects", "--exclude-promisor-objects-best-effort");
+ die_for_incompatible_opt2(exclude_promisor_objects,
+ "--exclude-promisor-objects",
+ exclude_promisor_objects_best_effort,
+ "--exclude-promisor-objects-best-effort");
if (exclude_promisor_objects) {
use_internal_rev_list = 1;
fetch_if_missing = 0;
@@ -4695,13 +5131,14 @@ int cmd_pack_objects(int argc,
if (!pack_to_stdout && thin)
die(_("--thin cannot be used to build an indexable pack"));
- if (keep_unreachable && unpack_unreachable)
- die(_("options '%s' and '%s' cannot be used together"), "--keep-unreachable", "--unpack-unreachable");
+ die_for_incompatible_opt2(keep_unreachable, "--keep-unreachable",
+ unpack_unreachable, "--unpack-unreachable");
if (!rev_list_all || !rev_list_reflog || !rev_list_index)
unpack_unreachable_expiration = 0;
- if (stdin_packs && filter_options.choice)
- die(_("cannot use --filter with --stdin-packs"));
+ die_for_incompatible_opt2(stdin_packs, "--stdin-packs",
+ filter_options.choice, "--filter");
+
if (stdin_packs && use_internal_rev_list)
die(_("cannot use internal rev list with --stdin-packs"));
@@ -4709,8 +5146,8 @@ int cmd_pack_objects(int argc,
if (cruft) {
if (use_internal_rev_list)
die(_("cannot use internal rev list with --cruft"));
- if (stdin_packs)
- die(_("cannot use --stdin-packs with --cruft"));
+ die_for_incompatible_opt2(stdin_packs, "--stdin-packs",
+ cruft, "--cruft");
}
/*
@@ -4778,11 +5215,7 @@ int cmd_pack_objects(int argc,
progress_state = start_progress(the_repository,
_("Enumerating objects"), 0);
if (stdin_packs) {
- /* avoids adding objects in excluded packs */
- ignore_packed_keep_in_core = 1;
- read_packs_list_from_stdin();
- if (rev_list_unpacked)
- add_unreachable_loose_objects();
+ read_stdin_packs(stdin_packs, rev_list_unpacked);
} else if (cruft) {
read_cruft_objects();
} else if (!use_internal_rev_list) {
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 5d1fc78..fe81c29 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -13,7 +13,7 @@
#include "hex.h"
#include "packfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "strbuf.h"
#define BLKSIZE 512
@@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s
break;
}
- if (!i_still_use_this) {
- fputs(_("'git pack-redundant' is nominated for removal.\n"
- "If you still use this command, please add an extra\n"
- "option, '--i-still-use-this', on the command line\n"
- "and let us know you still use it by sending an e-mail\n"
- "to <git@vger.kernel.org>. Thanks.\n"), stderr);
- die(_("refusing to run without --i-still-use-this"));
- }
+ if (!i_still_use_this)
+ you_still_use_that("git pack-redundant");
if (load_all_packs)
load_all();
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index e47bae1..5e28d0f 100644
--- a/builtin/pack-refs.c
+++ b/builtin/pack-refs.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "refs.h"
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index cdef2ec..d26e9d0 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -3,6 +3,7 @@
#include "builtin.h"
#include "config.h"
#include "diff.h"
+#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
@@ -235,7 +236,7 @@ int cmd_patch_id(int argc,
OPT_END()
};
- git_config(git_patch_id_config, &config);
+ repo_config(the_repository, git_patch_id_config, &config);
/* verbatim implies stable */
if (config.verbatim)
@@ -254,7 +255,7 @@ int cmd_patch_id(int argc,
* the code that computes patch IDs to always use SHA1.
*/
if (!the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
generate_id_list(opts ? opts > 1 : config.stable,
opts ? opts == 3 : config.verbatim);
diff --git a/builtin/prune.c b/builtin/prune.c
index e930caa..55635a8 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "builtin.h"
@@ -17,7 +16,7 @@
#include "replace-object.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "shallow.h"
static const char * const prune_usage[] = {
@@ -64,7 +63,7 @@ static void perform_reachability_traversal(struct rev_info *revs)
return;
if (show_progress)
- progress = start_delayed_progress(the_repository,
+ progress = start_delayed_progress(revs->repo,
_("Checking connectivity"), 0);
mark_reachable_objects(revs, 1, expire, progress);
stop_progress(&progress);
@@ -78,7 +77,7 @@ static int is_object_reachable(const struct object_id *oid,
perform_reachability_traversal(revs);
- obj = lookup_object(the_repository, oid);
+ obj = lookup_object(revs->repo, oid);
return obj && (obj->flags & SEEN);
}
@@ -99,8 +98,8 @@ static int prune_object(const struct object_id *oid, const char *fullpath,
if (st.st_mtime > expire)
return 0;
if (show_only || verbose) {
- enum object_type type = oid_object_info(the_repository, oid,
- NULL);
+ enum object_type type =
+ odb_read_object_info(revs->repo->objects, oid, NULL);
printf("%s %s\n", oid_to_hex(oid),
(type > 0) ? type_name(type) : "unknown");
}
@@ -154,7 +153,7 @@ static void remove_temporary_files(const char *path)
int cmd_prune(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
struct rev_info revs;
int exclude_promisor_objects = 0;
@@ -173,20 +172,19 @@ int cmd_prune(int argc,
expire = TIME_MAX;
save_commit_buffer = 0;
disable_replace_refs();
- repo_init_revisions(the_repository, &revs, prefix);
argc = parse_options(argc, argv, prefix, options, prune_usage, 0);
- if (repository_format_precious_objects)
+ repo_init_revisions(repo, &revs, prefix);
+ if (repo->repository_format_precious_objects)
die(_("cannot prune in a precious-objects repo"));
while (argc--) {
struct object_id oid;
const char *name = *argv++;
- if (!repo_get_oid(the_repository, name, &oid)) {
- struct object *object = parse_object_or_die(the_repository, &oid,
- name);
+ if (!repo_get_oid(repo, name, &oid)) {
+ struct object *object = parse_object_or_die(repo, &oid, name);
add_pending_object(&revs, object, "");
}
else
@@ -200,16 +198,16 @@ int cmd_prune(int argc,
revs.exclude_promisor_objects = 1;
}
- for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
+ for_each_loose_file_in_source(repo->objects->sources,
prune_object, prune_cruft, prune_subdir, &revs);
prune_packed_objects(show_only ? PRUNE_PACKED_DRY_RUN : 0);
- remove_temporary_files(repo_get_object_directory(the_repository));
- s = mkpathdup("%s/pack", repo_get_object_directory(the_repository));
+ remove_temporary_files(repo_get_object_directory(repo));
+ s = mkpathdup("%s/pack", repo_get_object_directory(repo));
remove_temporary_files(s);
free(s);
- if (is_repository_shallow(the_repository)) {
+ if (is_repository_shallow(repo)) {
perform_reachability_traversal(&revs);
prune_shallow(show_only ? PRUNE_SHOW_ONLY : 0);
}
diff --git a/builtin/pull.c b/builtin/pull.c
index 6e72a2e..5ebd529 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -11,6 +11,7 @@
#include "builtin.h"
#include "advice.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "merge.h"
@@ -90,7 +91,8 @@ static char *opt_ff;
static const char *opt_verify_signatures;
static const char *opt_verify;
static int opt_autostash = -1;
-static int config_autostash;
+static int config_rebase_autostash;
+static int config_pull_autostash = -1;
static int check_trust_level = 1;
static struct strvec opt_strategies = STRVEC_INIT;
static struct strvec opt_strategy_opts = STRVEC_INIT;
@@ -312,7 +314,7 @@ static const char *config_get_ff(void)
{
const char *value;
- if (git_config_get_value("pull.ff", &value))
+ if (repo_config_get_value(the_repository, "pull.ff", &value))
return NULL;
switch (git_parse_maybe_bool(value)) {
@@ -343,7 +345,7 @@ static enum rebase_type config_get_rebase(int *rebase_unspecified)
if (curr_branch) {
char *key = xstrfmt("branch.%s.rebase", curr_branch->name);
- if (!git_config_get_value(key, &value)) {
+ if (!repo_config_get_value(the_repository, key, &value)) {
enum rebase_type ret = parse_config_rebase(key, value, 1);
free(key);
return ret;
@@ -352,7 +354,7 @@ static enum rebase_type config_get_rebase(int *rebase_unspecified)
free(key);
}
- if (!git_config_get_value("pull.rebase", &value))
+ if (!repo_config_get_value(the_repository, "pull.rebase", &value))
return parse_config_rebase("pull.rebase", value, 1);
*rebase_unspecified = 1;
@@ -367,7 +369,18 @@ static int git_pull_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{
if (!strcmp(var, "rebase.autostash")) {
- config_autostash = git_config_bool(var, value);
+ /*
+ * run_rebase() also reads this option. The reason we handle it here is
+ * that when pull.rebase is true, a fast-forward may occur without
+ * invoking run_rebase(). We need to ensure that autostash is set even
+ * in the fast-forward case.
+ *
+ * run_merge() handles merge.autostash, so we don't handle it here.
+ */
+ config_rebase_autostash = git_config_bool(var, value);
+ return 0;
+ } else if (!strcmp(var, "pull.autostash")) {
+ config_pull_autostash = git_config_bool(var, value);
return 0;
} else if (!strcmp(var, "submodule.recurse")) {
recurse_submodules = git_config_bool(var, value) ?
@@ -490,7 +503,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs
} else
fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n"
"from the remote, but no such ref was fetched."),
- *curr_branch->merge_name);
+ curr_branch->merge[0]->src);
exit(1);
}
@@ -999,13 +1012,15 @@ int cmd_pull(int argc,
if (!getenv("GIT_REFLOG_ACTION"))
set_reflog_message(argc, argv);
- git_config(git_pull_config, NULL);
+ repo_config(the_repository, git_pull_config, NULL);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
}
argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0);
+ if (opt_autostash == -1)
+ opt_autostash = config_pull_autostash;
if (recurse_submodules_cli != RECURSE_SUBMODULES_DEFAULT)
recurse_submodules = recurse_submodules_cli;
@@ -1052,7 +1067,7 @@ int cmd_pull(int argc,
if (opt_rebase) {
if (opt_autostash == -1)
- opt_autostash = config_autostash;
+ opt_autostash = config_rebase_autostash;
if (is_null_oid(&orig_head) && !is_index_unborn(the_repository->index))
die(_("Updating an unborn branch with changes added to the index."));
diff --git a/builtin/push.c b/builtin/push.c
index 92d530e..d0794b7 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -598,7 +598,7 @@ int cmd_push(int argc,
};
packet_trace_identity("push");
- git_config(git_push_config, &flags);
+ repo_config(the_repository, git_push_config, &flags);
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
push_options = (push_options_cmdline.nr
? &push_options_cmdline
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index 32ddb66..a563abf 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -54,7 +54,7 @@ int cmd_range_diff(int argc,
struct object_id oid;
const char *three_dots = NULL;
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
repo_diff_setup(the_repository, &diffopt);
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index a8f352f..34f7a59 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -6,6 +6,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
@@ -168,7 +169,7 @@ int cmd_read_tree(int argc,
opts.src_index = the_repository->index;
opts.dst_index = the_repository->index;
- git_config(git_read_tree_config, NULL);
+ repo_config(the_repository, git_read_tree_config, NULL);
argc = parse_options(argc, argv, cmd_prefix, read_tree_options,
read_tree_usage, 0);
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 2e8c4ee..3c85768 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -293,6 +293,19 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
&revisions, &shortrevisions))
goto cleanup;
+ strvec_pushl(&make_script_args, "", revisions, NULL);
+ if (opts->restrict_revision)
+ strvec_pushf(&make_script_args, "^%s",
+ oid_to_hex(&opts->restrict_revision->object.oid));
+
+ ret = sequencer_make_script(the_repository, &todo_list.buf,
+ make_script_args.nr, make_script_args.v,
+ flags);
+ if (ret) {
+ error(_("could not generate todo list"));
+ goto cleanup;
+ }
+
if (init_basic_state(&replay,
opts->head_name ? opts->head_name : "detached HEAD",
opts->onto, &opts->orig_head->object.oid))
@@ -302,28 +315,15 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
write_file(path_squash_onto(), "%s\n",
oid_to_hex(opts->squash_onto));
- strvec_pushl(&make_script_args, "", revisions, NULL);
- if (opts->restrict_revision)
- strvec_pushf(&make_script_args, "^%s",
- oid_to_hex(&opts->restrict_revision->object.oid));
+ discard_index(the_repository->index);
+ if (todo_list_parse_insn_buffer(the_repository, &replay,
+ todo_list.buf.buf, &todo_list))
+ BUG("unusable todo list");
- ret = sequencer_make_script(the_repository, &todo_list.buf,
- make_script_args.nr, make_script_args.v,
- flags);
-
- if (ret)
- error(_("could not generate todo list"));
- else {
- discard_index(the_repository->index);
- if (todo_list_parse_insn_buffer(the_repository, &replay,
- todo_list.buf.buf, &todo_list))
- BUG("unusable todo list");
-
- ret = complete_action(the_repository, &replay, flags,
- shortrevisions, opts->onto_name, opts->onto,
- &opts->orig_head->object.oid, &opts->exec,
- opts->autosquash, opts->update_refs, &todo_list);
- }
+ ret = complete_action(the_repository, &replay, flags,
+ shortrevisions, opts->onto_name, opts->onto,
+ &opts->orig_head->object.oid, &opts->exec,
+ opts->autosquash, opts->update_refs, &todo_list);
cleanup:
replay_opts_release(&replay);
@@ -340,7 +340,7 @@ static int run_sequencer_rebase(struct rebase_options *opts)
unsigned flags = 0;
int abbreviate_commands = 0, ret = 0;
- git_config_get_bool("rebase.abbreviatecommands", &abbreviate_commands);
+ repo_config_get_bool(the_repository, "rebase.abbreviatecommands", &abbreviate_commands);
flags |= opts->keep_empty ? TODO_LIST_KEEP_EMPTY : 0;
flags |= abbreviate_commands ? TODO_LIST_ABBREVIATE_CMDS : 0;
@@ -1128,6 +1128,7 @@ int cmd_rebase(int argc,
.short_name = 'n',
.long_name = "no-stat",
.value = &options.flags,
+ .precision = sizeof(options.flags),
.help = N_("do not show diffstat of what changed upstream"),
.flags = PARSE_OPT_NOARG,
.defval = REBASE_DIFFSTAT,
@@ -1244,7 +1245,7 @@ int cmd_rebase(int argc,
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
- git_config(rebase_config, &options);
+ repo_config(the_repository, rebase_config, &options);
/* options.gpg_sign_opt will be either "-S" or NULL */
gpg_sign = options.gpg_sign_opt ? "" : NULL;
FREE_AND_NULL(options.gpg_sign_opt);
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index a317d6c..1113137 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -33,7 +33,7 @@
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "protocol.h"
#include "commit-reach.h"
@@ -359,7 +359,8 @@ static void write_head_info(void)
refs_for_each_fullref_in(get_main_ref_store(the_repository), "",
exclude_patterns, show_ref_cb, &seen);
- for_each_alternate_ref(show_one_alternate_ref, &seen);
+ odb_for_each_alternate_ref(the_repository->objects,
+ show_one_alternate_ref, &seen);
oidset_clear(&seen);
strvec_clear(&excludes_vector);
@@ -759,8 +760,8 @@ static void prepare_push_cert_sha1(struct child_process *proc)
int bogs /* beginning_of_gpg_sig */;
already_done = 1;
- if (write_object_file(push_cert.buf, push_cert.len, OBJ_BLOB,
- &push_cert_oid))
+ if (odb_write_object(the_repository->objects, push_cert.buf,
+ push_cert.len, OBJ_BLOB, &push_cert_oid))
oidclr(&push_cert_oid, the_repository->hash_algo);
memset(&sigcheck, '\0', sizeof(sigcheck));
@@ -1508,8 +1509,8 @@ static const char *update(struct command *cmd, struct shallow_info *si)
}
if (!is_null_oid(new_oid) &&
- !has_object(the_repository, new_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ !odb_has_object(the_repository->objects, new_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
error("unpack should have generated %s, "
"but I can't find it!", oid_to_hex(new_oid));
ret = "bad pack";
@@ -1846,36 +1847,102 @@ static void BUG_if_skipped_connectivity_check(struct command *commands,
BUG_if_bug("connectivity check skipped???");
}
+static void ref_transaction_rejection_handler(const char *refname,
+ const struct object_id *old_oid UNUSED,
+ const struct object_id *new_oid UNUSED,
+ const char *old_target UNUSED,
+ const char *new_target UNUSED,
+ enum ref_transaction_error err,
+ void *cb_data)
+{
+ struct strmap *failed_refs = cb_data;
+
+ strmap_put(failed_refs, refname, (char *)ref_transaction_error_msg(err));
+}
+
static void execute_commands_non_atomic(struct command *commands,
struct shallow_info *si)
{
struct command *cmd;
struct strbuf err = STRBUF_INIT;
+ const char *reported_error = NULL;
+ struct strmap failed_refs = STRMAP_INIT;
- for (cmd = commands; cmd; cmd = cmd->next) {
- if (!should_process_cmd(cmd) || cmd->run_proc_receive)
- continue;
+ /*
+ * Reference updates, where D/F conflicts shouldn't arise due to
+ * one reference being deleted, while the other being created
+ * are treated as conflicts in batched updates. This is because
+ * we don't do conflict resolution inside a transaction. To
+ * mitigate this, delete references in a separate batch.
+ *
+ * NEEDSWORK: Add conflict resolution between deletion and creation
+ * of reference updates within a transaction. With that, we can
+ * combine the two phases.
+ */
+ enum processing_phase {
+ PHASE_DELETIONS,
+ PHASE_OTHERS
+ };
- transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
- 0, &err);
- if (!transaction) {
- rp_error("%s", err.buf);
- strbuf_reset(&err);
- cmd->error_string = "transaction failed to start";
- continue;
+ for (enum processing_phase phase = PHASE_DELETIONS; phase <= PHASE_OTHERS; phase++) {
+ for (cmd = commands; cmd; cmd = cmd->next) {
+ if (!should_process_cmd(cmd) || cmd->run_proc_receive)
+ continue;
+
+ if (phase == PHASE_DELETIONS && !is_null_oid(&cmd->new_oid))
+ continue;
+ else if (phase == PHASE_OTHERS && is_null_oid(&cmd->new_oid))
+ continue;
+
+ /*
+ * Lazily create a transaction only when we know there are
+ * updates to be added.
+ */
+ if (!transaction) {
+ transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
+ REF_TRANSACTION_ALLOW_FAILURE, &err);
+ if (!transaction) {
+ rp_error("%s", err.buf);
+ strbuf_reset(&err);
+ reported_error = "transaction failed to start";
+ goto failure;
+ }
+ }
+
+ cmd->error_string = update(cmd, si);
}
- cmd->error_string = update(cmd, si);
+ /* No transaction, so nothing to commit */
+ if (!transaction)
+ goto cleanup;
- if (!cmd->error_string
- && ref_transaction_commit(transaction, &err)) {
+ if (ref_transaction_commit(transaction, &err)) {
rp_error("%s", err.buf);
- strbuf_reset(&err);
- cmd->error_string = "failed to update ref";
+ reported_error = "failed to update refs";
+ goto failure;
}
+
+ ref_transaction_for_each_rejected_update(transaction,
+ ref_transaction_rejection_handler,
+ &failed_refs);
+
+ if (strmap_empty(&failed_refs))
+ goto cleanup;
+
+ failure:
+ for (cmd = commands; cmd; cmd = cmd->next) {
+ if (reported_error)
+ cmd->error_string = reported_error;
+ else if (strmap_contains(&failed_refs, cmd->ref_name))
+ cmd->error_string = strmap_get(&failed_refs, cmd->ref_name);
+ }
+
+ cleanup:
ref_transaction_free(transaction);
+ transaction = NULL;
+ strmap_clear(&failed_refs, 0);
+ strbuf_release(&err);
}
- strbuf_release(&err);
}
static void execute_commands_atomic(struct command *commands,
@@ -2136,7 +2203,7 @@ static struct command *read_head_info(struct packet_reader *reader,
use_push_options = 1;
hash = parse_feature_value(feature_list, "object-format", &len, NULL);
if (!hash) {
- hash = hash_algos[GIT_HASH_SHA1].name;
+ hash = hash_algos[GIT_HASH_SHA1_LEGACY].name;
len = strlen(hash);
}
if (xstrncmpz(the_hash_algo->name, hash, len))
@@ -2546,7 +2613,7 @@ int cmd_receive_pack(int argc,
if (!enter_repo(service_dir, 0))
die("'%s' does not appear to be a git repository", service_dir);
- git_config(receive_pack_config, NULL);
+ repo_config(the_repository, receive_pack_config, NULL);
if (cert_nonce_seed)
push_cert_nonce = prepare_push_cert_nonce(service_dir, time(NULL));
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 3acaf3e..1db26aa 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -202,7 +202,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix,
OPT_END()
};
- git_config(reflog_expire_config, &opts);
+ repo_config(the_repository, reflog_expire_config, &opts);
save_commit_buffer = 0;
do_all = status = 0;
@@ -283,6 +283,9 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix,
&cb);
free(ref);
}
+
+ reflog_clear_expire_config(&opts);
+
return status;
}
diff --git a/builtin/refs.c b/builtin/refs.c
index 998d2a2..c7ad0a2 100644
--- a/builtin/refs.c
+++ b/builtin/refs.c
@@ -88,7 +88,7 @@ static int cmd_refs_verify(int argc, const char **argv, const char *prefix,
if (argc)
usage(_("'git refs verify' takes no arguments"));
- git_config(git_fsck_config, &fsck_refs_options);
+ repo_config(the_repository, git_fsck_config, &fsck_refs_options);
prepare_repo_settings(the_repository);
worktrees = get_worktrees_without_reading_head();
diff --git a/builtin/remote.c b/builtin/remote.c
index 0d6755b..8961ae6 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -14,7 +14,7 @@
#include "rebase.h"
#include "refs.h"
#include "refspec.h"
-#include "object-store.h"
+#include "odb.h"
#include "strvec.h"
#include "commit-reach.h"
#include "progress.h"
@@ -132,7 +132,7 @@ static void add_branch(const char *key, const char *branchname,
else
strbuf_addf(tmp, "refs/heads/%s:refs/remotes/%s/%s",
branchname, remotename, branchname);
- git_config_set_multivar(key, tmp->buf, "^$", 0);
+ repo_config_set_multivar(the_repository, key, tmp->buf, "^$", 0);
}
static const char mirror_advice[] =
@@ -157,6 +157,21 @@ static int parse_mirror_opt(const struct option *opt, const char *arg, int not)
return 0;
}
+static int check_remote_collision(struct remote *remote, void *data)
+{
+ const char *name = data;
+ const char *p;
+
+ if (skip_prefix(name, remote->name, &p) && *p == '/')
+ die(_("remote name '%s' is a subset of existing remote '%s'"),
+ name, remote->name);
+ if (skip_prefix(remote->name, name, &p) && *p == '/')
+ die(_("remote name '%s' is a superset of existing remote '%s'"),
+ name, remote->name);
+
+ return 0;
+}
+
static int add(int argc, const char **argv, const char *prefix,
struct repository *repo UNUSED)
{
@@ -208,8 +223,10 @@ static int add(int argc, const char **argv, const char *prefix,
if (!valid_remote_name(name))
die(_("'%s' is not a valid remote name"), name);
+ for_each_remote(check_remote_collision, (void *)name);
+
strbuf_addf(&buf, "remote.%s.url", name);
- git_config_set(buf.buf, url);
+ repo_config_set(the_repository, buf.buf, url);
if (!mirror || mirror & MIRROR_FETCH) {
strbuf_reset(&buf);
@@ -225,14 +242,14 @@ static int add(int argc, const char **argv, const char *prefix,
if (mirror & MIRROR_PUSH) {
strbuf_reset(&buf);
strbuf_addf(&buf, "remote.%s.mirror", name);
- git_config_set(buf.buf, "true");
+ repo_config_set(the_repository, buf.buf, "true");
}
if (fetch_tags != TAGS_DEFAULT) {
strbuf_reset(&buf);
strbuf_addf(&buf, "remote.%s.tagOpt", name);
- git_config_set(buf.buf,
- fetch_tags == TAGS_SET ? "--tags" : "--no-tags");
+ repo_config_set(the_repository, buf.buf,
+ fetch_tags == TAGS_SET ? "--tags" : "--no-tags");
}
if (fetch && fetch_remote(name)) {
@@ -353,7 +370,7 @@ static void read_branches(void)
{
if (branch_list.nr)
return;
- git_config(config_read_branches, NULL);
+ repo_config(the_repository, config_read_branches, NULL);
}
struct ref_states {
@@ -454,8 +471,8 @@ static int get_push_ref_states(const struct ref *remote_refs,
info->status = PUSH_STATUS_UPTODATE;
else if (is_null_oid(&ref->old_oid))
info->status = PUSH_STATUS_CREATE;
- else if (has_object(the_repository, &ref->old_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) &&
+ else if (odb_has_object(the_repository->objects, &ref->old_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) &&
ref_newer(&ref->new_oid, &ref->old_oid))
info->status = PUSH_STATUS_FASTFORWARD;
else
@@ -634,15 +651,15 @@ static int migrate_file(struct remote *remote)
strbuf_addf(&buf, "remote.%s.url", remote->name);
for (i = 0; i < remote->url.nr; i++)
- git_config_set_multivar(buf.buf, remote->url.v[i], "^$", 0);
+ repo_config_set_multivar(the_repository, buf.buf, remote->url.v[i], "^$", 0);
strbuf_reset(&buf);
strbuf_addf(&buf, "remote.%s.push", remote->name);
for (i = 0; i < remote->push.nr; i++)
- git_config_set_multivar(buf.buf, remote->push.items[i].raw, "^$", 0);
+ repo_config_set_multivar(the_repository, buf.buf, remote->push.items[i].raw, "^$", 0);
strbuf_reset(&buf);
strbuf_addf(&buf, "remote.%s.fetch", remote->name);
for (i = 0; i < remote->fetch.nr; i++)
- git_config_set_multivar(buf.buf, remote->fetch.items[i].raw, "^$", 0);
+ repo_config_set_multivar(the_repository, buf.buf, remote->fetch.items[i].raw, "^$", 0);
#ifndef WITH_BREAKING_CHANGES
if (remote->origin == REMOTE_REMOTES)
unlink_or_warn(repo_git_path_replace(the_repository, &buf,
@@ -690,12 +707,12 @@ static void handle_push_default(const char* old_name, const char* new_name)
.origin = STRBUF_INIT,
.linenr = -1,
};
- git_config(config_read_push_default, &push_default);
+ repo_config(the_repository, config_read_push_default, &push_default);
if (push_default.scope >= CONFIG_SCOPE_COMMAND)
; /* pass */
else if (push_default.scope >= CONFIG_SCOPE_LOCAL) {
- int result = git_config_set_gently("remote.pushDefault",
- new_name);
+ int result = repo_config_set_gently(the_repository, "remote.pushDefault",
+ new_name);
if (new_name && result && result != CONFIG_NOTHING_SET)
die(_("could not set '%s'"), "remote.pushDefault");
else if (!new_name && result && result != CONFIG_NOTHING_SET)
@@ -771,7 +788,7 @@ static int mv(int argc, const char **argv, const char *prefix,
if (oldremote->fetch.nr) {
strbuf_reset(&buf);
strbuf_addf(&buf, "remote.%s.fetch", rename.new_name);
- git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
strbuf_addf(&old_remote_context, ":refs/remotes/%s/", rename.old_name);
for (i = 0; i < oldremote->fetch.nr; i++) {
char *ptr;
@@ -791,7 +808,7 @@ static int mv(int argc, const char **argv, const char *prefix,
"\tPlease update the configuration manually if necessary."),
buf2.buf);
- git_config_set_multivar(buf.buf, buf2.buf, "^$", 0);
+ repo_config_set_multivar(the_repository, buf.buf, buf2.buf, "^$", 0);
}
}
@@ -802,12 +819,12 @@ static int mv(int argc, const char **argv, const char *prefix,
if (info->remote_name && !strcmp(info->remote_name, rename.old_name)) {
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.remote", item->string);
- git_config_set(buf.buf, rename.new_name);
+ repo_config_set(the_repository, buf.buf, rename.new_name);
}
if (info->push_remote_name && !strcmp(info->push_remote_name, rename.old_name)) {
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.pushRemote", item->string);
- git_config_set(buf.buf, rename.new_name);
+ repo_config_set(the_repository, buf.buf, rename.new_name);
}
}
@@ -934,7 +951,7 @@ static int rm(int argc, const char **argv, const char *prefix,
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.%s",
item->string, *k);
- result = git_config_set_gently(buf.buf, NULL);
+ result = repo_config_set_gently(the_repository, buf.buf, NULL);
if (result && result != CONFIG_NOTHING_SET)
die(_("could not unset '%s'"), buf.buf);
}
@@ -942,7 +959,7 @@ static int rm(int argc, const char **argv, const char *prefix,
if (info->push_remote_name && !strcmp(info->push_remote_name, remote->name)) {
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.pushremote", item->string);
- result = git_config_set_gently(buf.buf, NULL);
+ result = repo_config_set_gently(the_repository, buf.buf, NULL);
if (result && result != CONFIG_NOTHING_SET)
die(_("could not unset '%s'"), buf.buf);
}
@@ -1268,7 +1285,7 @@ static int get_one_entry(struct remote *remote, void *priv)
strbuf_addf(&promisor_config, "remote.%s.partialclonefilter", remote->name);
strbuf_addf(&remote_info_buf, "%s (fetch)", remote->url.v[0]);
- if (!git_config_get_string_tmp(promisor_config.buf, &partial_clone_filter))
+ if (!repo_config_get_string_tmp(the_repository, promisor_config.buf, &partial_clone_filter))
strbuf_addf(&remote_info_buf, " [%s]", partial_clone_filter);
strbuf_release(&promisor_config);
@@ -1457,10 +1474,13 @@ static int set_head(int argc, const char **argv, const char *prefix,
};
argc = parse_options(argc, argv, prefix, options,
builtin_remote_sethead_usage, 0);
- if (argc) {
- strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
- remote = remote_get(argv[0]);
- }
+
+ /* All modes require at least a remote name. */
+ if (!argc)
+ usage_with_options(builtin_remote_sethead_usage, options);
+
+ strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
+ remote = remote_get(argv[0]);
if (!opt_a && !opt_d && argc == 2) {
head_name = xstrdup(argv[1]);
@@ -1503,7 +1523,7 @@ static int set_head(int argc, const char **argv, const char *prefix,
struct strbuf config_name = STRBUF_INIT;
strbuf_addf(&config_name,
"remote.%s.followremotehead", remote->name);
- git_config_set(config_name.buf, "warn");
+ repo_config_set(the_repository, config_name.buf, "warn");
strbuf_release(&config_name);
}
@@ -1521,9 +1541,6 @@ static int prune_remote(const char *remote, int dry_run)
struct ref_states states = REF_STATES_INIT;
struct string_list refs_to_prune = STRING_LIST_INIT_NODUP;
struct string_list_item *item;
- const char *dangling_msg = dry_run
- ? _(" %s will become dangling!")
- : _(" %s has become dangling!");
get_remote_ref_states(remote, &states, GET_REF_STATES);
@@ -1555,7 +1572,7 @@ static int prune_remote(const char *remote, int dry_run)
}
refs_warn_dangling_symrefs(get_main_ref_store(the_repository),
- stdout, dangling_msg, &refs_to_prune);
+ stdout, " ", dry_run, &refs_to_prune);
string_list_clear(&refs_to_prune, 0);
free_remote_ref_states(&states);
@@ -1623,7 +1640,7 @@ static int update(int argc, const char **argv, const char *prefix,
strvec_push(&cmd.args, argv[i]);
if (strcmp(cmd.args.v[cmd.args.nr-1], "default") == 0) {
- git_config(get_remote_default, &default_defined);
+ repo_config(the_repository, get_remote_default, &default_defined);
if (!default_defined) {
strvec_pop(&cmd.args);
strvec_push(&cmd.args, "--all");
@@ -1636,8 +1653,8 @@ static int update(int argc, const char **argv, const char *prefix,
static int remove_all_fetch_refspecs(const char *key)
{
- return git_config_set_multivar_gently(key, NULL, NULL,
- CONFIG_FLAGS_MULTI_REPLACE);
+ return repo_config_set_multivar_gently(the_repository, key, NULL, NULL,
+ CONFIG_FLAGS_MULTI_REPLACE);
}
static void add_branches(struct remote *remote, const char **branches,
@@ -1793,10 +1810,10 @@ static int set_url(int argc, const char **argv, const char *prefix,
/* Special cases that add new entry. */
if ((!oldurl && !delete_mode) || add_mode) {
if (add_mode)
- git_config_set_multivar(name_buf.buf, newurl,
+ repo_config_set_multivar(the_repository, name_buf.buf, newurl,
"^$", 0);
else
- git_config_set(name_buf.buf, newurl);
+ repo_config_set(the_repository, name_buf.buf, newurl);
goto out;
}
@@ -1817,10 +1834,10 @@ static int set_url(int argc, const char **argv, const char *prefix,
regfree(&old_regex);
if (!delete_mode)
- git_config_set_multivar(name_buf.buf, newurl, oldurl, 0);
+ repo_config_set_multivar(the_repository, name_buf.buf, newurl, oldurl, 0);
else
- git_config_set_multivar(name_buf.buf, NULL, oldurl,
- CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, name_buf.buf, NULL, oldurl,
+ CONFIG_FLAGS_MULTI_REPLACE);
out:
strbuf_release(&name_buf);
return 0;
diff --git a/builtin/repack.c b/builtin/repack.c
index 59214db..a4def39 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -17,7 +17,7 @@
#include "midx.h"
#include "packfile.h"
#include "prune-packed.h"
-#include "object-store.h"
+#include "odb.h"
#include "promisor-remote.h"
#include "shallow.h"
#include "pack.h"
@@ -39,11 +39,12 @@ static int write_bitmaps = -1;
static int use_delta_islands;
static int run_update_server_info = 1;
static char *packdir, *packtmp_name, *packtmp;
+static int midx_must_contain_cruft = 1;
static const char *const git_repack_usage[] = {
N_("git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
"[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]\n"
- "[--write-midx] [--name-hash-version=<n>]"),
+ "[--write-midx] [--name-hash-version=<n>] [--path-walk]"),
NULL
};
@@ -63,6 +64,7 @@ struct pack_objects_args {
int quiet;
int local;
int name_hash_version;
+ int path_walk;
struct list_objects_filter_options filter_options;
};
@@ -107,6 +109,10 @@ static int repack_config(const char *var, const char *value,
free(cruft_po_args->threads);
return git_config_string(&cruft_po_args->threads, var, value);
}
+ if (!strcmp(var, "repack.midxmustcontaincruft")) {
+ midx_must_contain_cruft = git_config_bool(var, value);
+ return 0;
+ }
return git_default_config(var, value, ctx, cb);
}
@@ -217,9 +223,9 @@ static void mark_packs_for_deletion(struct existing_packs *existing,
static void remove_redundant_pack(const char *dir_name, const char *base_name)
{
struct strbuf buf = STRBUF_INIT;
- struct multi_pack_index *m = get_local_multi_pack_index(the_repository);
+ struct multi_pack_index *m = get_multi_pack_index(the_repository->objects->sources);
strbuf_addf(&buf, "%s.pack", base_name);
- if (m && midx_contains_pack(m, buf.buf))
+ if (m && m->local && midx_contains_pack(m, buf.buf))
clear_midx_file(the_repository);
strbuf_insertf(&buf, 0, "%s/", dir_name);
unlink_pack_path(buf.buf, 1);
@@ -313,6 +319,8 @@ static void prepare_pack_objects(struct child_process *cmd,
strvec_pushf(&cmd->args, "--no-reuse-object");
if (args->name_hash_version)
strvec_pushf(&cmd->args, "--name-hash-version=%d", args->name_hash_version);
+ if (args->path_walk)
+ strvec_pushf(&cmd->args, "--path-walk");
if (args->local)
strvec_push(&cmd->args, "--local");
if (args->quiet)
@@ -687,6 +695,77 @@ static void free_pack_geometry(struct pack_geometry *geometry)
free(geometry->pack);
}
+static int midx_has_unknown_packs(char **midx_pack_names,
+ size_t midx_pack_names_nr,
+ struct string_list *include,
+ struct pack_geometry *geometry,
+ struct existing_packs *existing)
+{
+ size_t i;
+
+ string_list_sort(include);
+
+ for (i = 0; i < midx_pack_names_nr; i++) {
+ const char *pack_name = midx_pack_names[i];
+
+ /*
+ * Determine whether or not each MIDX'd pack from the existing
+ * MIDX (if any) is represented in the new MIDX. For each pack
+ * in the MIDX, it must either be:
+ *
+ * - In the "include" list of packs to be included in the new
+ * MIDX. Note this function is called before the include
+ * list is populated with any cruft pack(s).
+ *
+ * - Below the geometric split line (if using pack geometry),
+ * indicating that the pack won't be included in the new
+ * MIDX, but its contents were rolled up as part of the
+ * geometric repack.
+ *
+ * - In the existing non-kept packs list (if not using pack
+ * geometry), and marked as non-deleted.
+ */
+ if (string_list_has_string(include, pack_name)) {
+ continue;
+ } else if (geometry) {
+ struct strbuf buf = STRBUF_INIT;
+ uint32_t j;
+
+ for (j = 0; j < geometry->split; j++) {
+ strbuf_reset(&buf);
+ strbuf_addstr(&buf, pack_basename(geometry->pack[j]));
+ strbuf_strip_suffix(&buf, ".pack");
+ strbuf_addstr(&buf, ".idx");
+
+ if (!strcmp(pack_name, buf.buf)) {
+ strbuf_release(&buf);
+ break;
+ }
+ }
+
+ strbuf_release(&buf);
+
+ if (j < geometry->split)
+ continue;
+ } else {
+ struct string_list_item *item;
+
+ item = string_list_lookup(&existing->non_kept_packs,
+ pack_name);
+ if (item && !pack_is_marked_for_deletion(item))
+ continue;
+ }
+
+ /*
+ * If we got to this point, the MIDX includes some pack that we
+ * don't know about.
+ */
+ return 1;
+ }
+
+ return 0;
+}
+
struct midx_snapshot_ref_data {
struct tempfile *f;
struct oidset seen;
@@ -707,7 +786,7 @@ static int midx_snapshot_ref_one(const char *refname UNUSED,
if (oidset_insert(&data->seen, oid))
return 0; /* already seen */
- if (oid_object_info(the_repository, oid, NULL) != OBJ_COMMIT)
+ if (odb_read_object_info(the_repository->objects, oid, NULL) != OBJ_COMMIT)
return 0;
fprintf(data->f->fp, "%s%s\n", data->preferred ? "+" : "",
@@ -755,6 +834,8 @@ static void midx_snapshot_refs(struct tempfile *f)
static void midx_included_packs(struct string_list *include,
struct existing_packs *existing,
+ char **midx_pack_names,
+ size_t midx_pack_names_nr,
struct string_list *names,
struct pack_geometry *geometry)
{
@@ -808,26 +889,56 @@ static void midx_included_packs(struct string_list *include,
}
}
- for_each_string_list_item(item, &existing->cruft_packs) {
+ if (midx_must_contain_cruft ||
+ midx_has_unknown_packs(midx_pack_names, midx_pack_names_nr,
+ include, geometry, existing)) {
/*
- * When doing a --geometric repack, there is no need to check
- * for deleted packs, since we're by definition not doing an
- * ALL_INTO_ONE repack (hence no packs will be deleted).
- * Otherwise we must check for and exclude any packs which are
- * enqueued for deletion.
+ * If there are one or more unknown pack(s) present (see
+ * midx_has_unknown_packs() for what makes a pack
+ * "unknown") in the MIDX before the repack, keep them
+ * as they may be required to form a reachability
+ * closure if the MIDX is bitmapped.
*
- * So we could omit the conditional below in the --geometric
- * case, but doing so is unnecessary since no packs are marked
- * as pending deletion (since we only call
- * `mark_packs_for_deletion()` when doing an all-into-one
- * repack).
+ * For example, a cruft pack can be required to form a
+ * reachability closure if the MIDX is bitmapped and one
+ * or more of the bitmap's selected commits reaches a
+ * once-cruft object that was later made reachable.
*/
- if (pack_is_marked_for_deletion(item))
- continue;
+ for_each_string_list_item(item, &existing->cruft_packs) {
+ /*
+ * When doing a --geometric repack, there is no
+ * need to check for deleted packs, since we're
+ * by definition not doing an ALL_INTO_ONE
+ * repack (hence no packs will be deleted).
+ * Otherwise we must check for and exclude any
+ * packs which are enqueued for deletion.
+ *
+ * So we could omit the conditional below in the
+ * --geometric case, but doing so is unnecessary
+ * since no packs are marked as pending
+ * deletion (since we only call
+ * `mark_packs_for_deletion()` when doing an
+ * all-into-one repack).
+ */
+ if (pack_is_marked_for_deletion(item))
+ continue;
- strbuf_reset(&buf);
- strbuf_addf(&buf, "%s.idx", item->string);
- string_list_insert(include, buf.buf);
+ strbuf_reset(&buf);
+ strbuf_addf(&buf, "%s.idx", item->string);
+ string_list_insert(include, buf.buf);
+ }
+ } else {
+ /*
+ * Modern versions of Git (with the appropriate
+ * configuration setting) will write new copies of
+ * once-cruft objects when doing a --geometric repack.
+ *
+ * If the MIDX has no cruft pack, new packs written
+ * during a --geometric repack will not rely on the
+ * cruft pack to form a reachability closure, so we can
+ * avoid including them in the MIDX in that case.
+ */
+ ;
}
strbuf_release(&buf);
@@ -1142,6 +1253,8 @@ int cmd_repack(int argc,
struct tempfile *refs_snapshot = NULL;
int i, ext, ret;
int show_progress;
+ char **midx_pack_names = NULL;
+ size_t midx_pack_names_nr = 0;
/* variables to be filled by option parsing */
int delete_redundant = 0;
@@ -1184,6 +1297,8 @@ int cmd_repack(int argc,
N_("pass --no-reuse-object to git-pack-objects")),
OPT_INTEGER(0, "name-hash-version", &po_args.name_hash_version,
N_("specify the name hash version to use for grouping similar objects by path")),
+ OPT_BOOL(0, "path-walk", &po_args.path_walk,
+ N_("pass --path-walk to git-pack-objects")),
OPT_NEGBIT('n', NULL, &run_update_server_info,
N_("do not run git-update-server-info"), 1),
OPT__QUIET(&po_args.quiet, N_("be quiet")),
@@ -1225,7 +1340,7 @@ int cmd_repack(int argc,
list_objects_filter_init(&po_args.filter_options);
- git_config(repack_config, &cruft_po_args);
+ repo_config(the_repository, repack_config, &cruft_po_args);
argc = parse_options(argc, argv, prefix, builtin_repack_options,
git_repack_usage, 0);
@@ -1235,7 +1350,7 @@ int cmd_repack(int argc,
po_args.depth = xstrdup_or_null(opt_depth);
po_args.threads = xstrdup_or_null(opt_threads);
- if (delete_redundant && repository_format_precious_objects)
+ if (delete_redundant && the_repository->repository_format_precious_objects)
die(_("cannot delete packs in a precious-objects repo"));
die_for_incompatible_opt3(unpack_unreachable || (pack_everything & LOOSEN_UNREACHABLE), "-A",
@@ -1256,7 +1371,8 @@ int cmd_repack(int argc,
if (write_bitmaps && !(pack_everything & ALL_INTO_ONE) && !write_midx)
die(_(incremental_bitmap_conflict_error));
- if (write_bitmaps && po_args.local && has_alt_odb(the_repository)) {
+ if (write_bitmaps && po_args.local &&
+ odb_has_alternates(the_repository->objects)) {
/*
* When asked to do a local repack, but we have
* packfiles that are inherited from an alternate, then
@@ -1356,7 +1472,10 @@ int cmd_repack(int argc,
!(pack_everything & PACK_CRUFT))
strvec_push(&cmd.args, "--pack-loose-unreachable");
} else if (geometry.split_factor) {
- strvec_push(&cmd.args, "--stdin-packs");
+ if (midx_must_contain_cruft)
+ strvec_push(&cmd.args, "--stdin-packs");
+ else
+ strvec_push(&cmd.args, "--stdin-packs=follow");
strvec_push(&cmd.args, "--unpacked");
} else {
strvec_push(&cmd.args, "--unpacked");
@@ -1396,8 +1515,25 @@ int cmd_repack(int argc,
if (ret)
goto cleanup;
- if (!names.nr && !po_args.quiet)
- printf_ln(_("Nothing new to pack."));
+ if (!names.nr) {
+ if (!po_args.quiet)
+ printf_ln(_("Nothing new to pack."));
+ /*
+ * If we didn't write any new packs, the non-cruft packs
+ * may refer to once-unreachable objects in the cruft
+ * pack(s).
+ *
+ * If there isn't already a MIDX, the one we write
+ * must include the cruft pack(s), in case the
+ * non-cruft pack(s) refer to once-cruft objects.
+ *
+ * If there is already a MIDX, we can punt here, since
+ * midx_has_unknown_packs() will make the decision for
+ * us.
+ */
+ if (!get_multi_pack_index(the_repository->objects->sources))
+ midx_must_contain_cruft = 1;
+ }
if (pack_everything & PACK_CRUFT) {
const char *pack_prefix = find_pack_prefix(packdir, packtmp);
@@ -1478,6 +1614,19 @@ int cmd_repack(int argc,
string_list_sort(&names);
+ if (get_multi_pack_index(the_repository->objects->sources)) {
+ struct multi_pack_index *m =
+ get_multi_pack_index(the_repository->objects->sources);
+
+ ALLOC_ARRAY(midx_pack_names,
+ m->num_packs + m->num_packs_in_base);
+
+ for (; m; m = m->base_midx)
+ for (uint32_t i = 0; i < m->num_packs; i++)
+ midx_pack_names[midx_pack_names_nr++] =
+ xstrdup(m->pack_names[i]);
+ }
+
close_object_store(the_repository->objects);
/*
@@ -1519,7 +1668,8 @@ int cmd_repack(int argc,
if (write_midx) {
struct string_list include = STRING_LIST_INIT_DUP;
- midx_included_packs(&include, &existing, &names, &geometry);
+ midx_included_packs(&include, &existing, midx_pack_names,
+ midx_pack_names_nr, &names, &geometry);
ret = write_midx_included_packs(&include, &geometry, &names,
refs_snapshot ? get_tempfile_path(refs_snapshot) : NULL,
@@ -1570,6 +1720,9 @@ int cmd_repack(int argc,
string_list_clear(&names, 1);
existing_packs_release(&existing);
free_pack_geometry(&geometry);
+ for (size_t i = 0; i < midx_pack_names_nr; i++)
+ free(midx_pack_names[i]);
+ free(midx_pack_names);
pack_objects_args_release(&po_args);
pack_objects_args_release(&cruft_po_args);
diff --git a/builtin/replace.c b/builtin/replace.c
index 48c7c6a..900b560 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -11,6 +11,7 @@
#include "builtin.h"
#include "config.h"
#include "editor.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
@@ -19,7 +20,7 @@
#include "run-command.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "tag.h"
#include "wildmatch.h"
@@ -65,8 +66,8 @@ static int show_reference(const char *refname,
if (repo_get_oid(data->repo, refname, &object))
return error(_("failed to resolve '%s' as a valid ref"), refname);
- obj_type = oid_object_info(data->repo, &object, NULL);
- repl_type = oid_object_info(data->repo, oid, NULL);
+ obj_type = odb_read_object_info(data->repo->objects, &object, NULL);
+ repl_type = odb_read_object_info(data->repo->objects, oid, NULL);
printf("%s (%s) -> %s (%s)\n", refname, type_name(obj_type),
oid_to_hex(oid), type_name(repl_type));
@@ -185,8 +186,8 @@ static int replace_object_oid(const char *object_ref,
struct strbuf err = STRBUF_INIT;
int res = 0;
- obj_type = oid_object_info(the_repository, object, NULL);
- repl_type = oid_object_info(the_repository, repl, NULL);
+ obj_type = odb_read_object_info(the_repository->objects, object, NULL);
+ repl_type = odb_read_object_info(the_repository->objects, repl, NULL);
if (!force && obj_type != repl_type)
return error(_("Objects must be of the same type.\n"
"'%s' points to a replaced object of type '%s'\n"
@@ -334,7 +335,7 @@ static int edit_and_replace(const char *object_ref, int force, int raw)
if (repo_get_oid(the_repository, object_ref, &old_oid) < 0)
return error(_("not a valid object name: '%s'"), object_ref);
- type = oid_object_info(the_repository, &old_oid, NULL);
+ type = odb_read_object_info(the_repository->objects, &old_oid, NULL);
if (type < 0)
return error(_("unable to get object type for %s"),
oid_to_hex(&old_oid));
@@ -488,7 +489,8 @@ static int create_graft(int argc, const char **argv, int force, int gentle)
return -1;
}
- if (write_object_file(buf.buf, buf.len, OBJ_COMMIT, &new_oid)) {
+ if (odb_write_object(the_repository->objects, buf.buf,
+ buf.len, OBJ_COMMIT, &new_oid)) {
strbuf_release(&buf);
return error(_("could not write replacement commit for: '%s'"),
old_ref);
@@ -574,7 +576,7 @@ int cmd_replace(int argc,
};
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);
diff --git a/builtin/replay.c b/builtin/replay.c
index 225cef0..6172c8a 100644
--- a/builtin/replay.c
+++ b/builtin/replay.c
@@ -84,6 +84,7 @@ static struct commit *create_commit(struct repository *repo,
obj = parse_object(repo, &ret);
out:
+ repo_unuse_commit_buffer(the_repository, based_on, message);
free_commit_extra_headers(extra);
free_commit_list(parents);
strbuf_release(&msg);
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 1312e79..a056cb7 100644
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
@@ -66,7 +66,7 @@ int cmd_rerere(int argc,
argc = parse_options(argc, argv, prefix, options, rerere_usage, 0);
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
if (autoupdate == 1)
flags = RERERE_AUTOUPDATE;
diff --git a/builtin/reset.c b/builtin/reset.c
index dc50ffc..ed35802 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -346,6 +346,7 @@ int cmd_reset(int argc,
struct object_id oid;
struct pathspec pathspec;
int intent_to_add = 0;
+ struct add_p_opt add_p_opt = ADD_P_OPT_INIT;
const struct option options[] = {
OPT__QUIET(&quiet, N_("be quiet, only report errors")),
OPT_BOOL(0, "no-refresh", &no_refresh,
@@ -370,6 +371,8 @@ int cmd_reset(int argc,
PARSE_OPT_OPTARG,
option_parse_recurse_submodules_worktree_updater),
OPT_BOOL('p', "patch", &patch_mode, N_("select hunks interactively")),
+ OPT_DIFF_UNIFIED(&add_p_opt.context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&add_p_opt.interhunkcontext),
OPT_BOOL('N', "intent-to-add", &intent_to_add,
N_("record only the fact that removed paths will be added later")),
OPT_PATHSPEC_FROM_FILE(&pathspec_from_file),
@@ -377,7 +380,7 @@ int cmd_reset(int argc,
OPT_END()
};
- git_config(git_reset_config, NULL);
+ repo_config(the_repository, git_reset_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_reset_usage,
PARSE_OPT_KEEP_DASHDASH);
@@ -420,6 +423,11 @@ int cmd_reset(int argc,
oidcpy(&oid, &tree->object.oid);
}
+ if (add_p_opt.context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (add_p_opt.interhunkcontext < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
@@ -427,9 +435,14 @@ int cmd_reset(int argc,
if (reset_type != NONE)
die(_("options '%s' and '%s' cannot be used together"), "--patch", "--{hard,mixed,soft}");
trace2_cmd_mode("patch-interactive");
- update_ref_status = !!run_add_p(the_repository, ADD_P_RESET, rev,
- &pathspec);
+ update_ref_status = !!run_add_p(the_repository, ADD_P_RESET,
+ &add_p_opt, rev, &pathspec);
goto cleanup;
+ } else {
+ if (add_p_opt.context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--patch");
+ if (add_p_opt.interhunkcontext != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--patch");
}
/* git reset tree [--] paths... can be used to
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 0984b60..99f876b 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -14,7 +14,7 @@
#include "object.h"
#include "object-name.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "pack-bitmap.h"
#include "parse-options.h"
#include "log-tree.h"
@@ -28,6 +28,14 @@
#include "quote.h"
#include "strbuf.h"
+struct rev_list_info {
+ struct rev_info *revs;
+ int flags;
+ int show_timestamp;
+ int hdr_termination;
+ const char *header_prefix;
+};
+
static const char rev_list_usage[] =
"git rev-list [<options>] <commit>... [--] [<path>...]\n"
"\n"
@@ -110,7 +118,8 @@ static off_t get_object_disk_usage(struct object *obj)
off_t size;
struct object_info oi = OBJECT_INFO_INIT;
oi.disk_sizep = &size;
- if (oid_object_info_extended(the_repository, &obj->oid, &oi, 0) < 0)
+ if (odb_read_object_info_extended(the_repository->objects,
+ &obj->oid, &oi, 0) < 0)
die(_("unable to get disk usage of %s"), oid_to_hex(&obj->oid));
return size;
}
@@ -346,7 +355,8 @@ static void show_commit(struct commit *commit, void *data)
static int finish_object(struct object *obj, const char *name, void *cb_data)
{
struct rev_list_info *info = cb_data;
- if (oid_object_info_extended(the_repository, &obj->oid, NULL, 0) < 0) {
+ if (odb_read_object_info_extended(the_repository->objects,
+ &obj->oid, NULL, 0) < 0) {
finish_object__ma(obj, name);
return 1;
}
@@ -634,7 +644,7 @@ int cmd_rev_list(int argc,
show_usage_if_asked(argc, argv, rev_list_usage);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
repo_init_revisions(the_repository, &revs, prefix);
revs.abbrev = DEFAULT_ABBREV;
revs.commit_format = CMIT_FMT_UNSPECIFIED;
@@ -650,17 +660,21 @@ int cmd_rev_list(int argc,
*
* Let "--missing" to conditionally set fetch_if_missing.
*/
+
/*
- * NEEDSWORK: These loops that attempt to find presence of
- * options without understanding that the options they are
- * skipping are broken (e.g., it would not know "--grep
+ * NEEDSWORK: The next loop is utterly broken. It tries to
+ * notice an option is used, but without understanding if each
+ * option takes an argument, which fundamentally would not
+ * work. It would not know "--grep
* --exclude-promisor-objects" is not triggering
- * "--exclude-promisor-objects" option). We really need
- * setup_revisions() to have a mechanism to allow and disallow
- * some sets of options for different commands (like rev-list,
- * replay, etc). Such a mechanism should do an early parsing
- * of options and be able to manage the `--missing=...` and
- * `--exclude-promisor-objects` options below.
+ * "--exclude-promisor-objects" option, for example.
+ *
+ * We really need setup_revisions() to have a mechanism to
+ * allow and disallow some sets of options for different
+ * commands (like rev-list, replay, etc). Such a mechanism
+ * should do an early parsing of options and be able to manage
+ * the `--missing=...` and `--exclude-promisor-objects`
+ * options below.
*/
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 490da33..44ff1b8 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -734,7 +734,7 @@ int cmd_rev_parse(int argc,
/* No options; just report on whether we're in a git repo or not. */
if (argc == 1) {
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
return 0;
}
@@ -769,7 +769,7 @@ int cmd_rev_parse(int argc,
/* The rest of the options require a git repository. */
if (!did_repo_setup) {
prefix = setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
did_repo_setup = 1;
prepare_repo_settings(the_repository);
diff --git a/builtin/revert.c b/builtin/revert.c
index e07c221..c3f92b5 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -111,7 +111,7 @@ static int run_sequencer(int argc, const char **argv, const char *prefix,
const char * const * usage_str = revert_or_cherry_pick_usage(opts);
const char *me = action_name(opts);
const char *cleanup_arg = NULL;
- const char sentinel_value;
+ const char sentinel_value = 0; /* value not important */
const char *strategy = &sentinel_value;
const char *gpg_sign = &sentinel_value;
enum empty_action empty_opt = EMPTY_COMMIT_UNSPECIFIED;
diff --git a/builtin/rm.c b/builtin/rm.c
index a6565a6..05d89e9 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -9,6 +9,7 @@
#include "builtin.h"
#include "advice.h"
#include "config.h"
+#include "environment.h"
#include "lockfile.h"
#include "dir.h"
#include "gettext.h"
@@ -271,7 +272,7 @@ int cmd_rm(int argc,
struct pathspec pathspec;
char *seen;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_rm_options,
builtin_rm_usage, 0);
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index c6e0e9d..8b81c8a 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "hex.h"
#include "pkt-line.h"
#include "run-command.h"
@@ -304,9 +305,10 @@ int cmd_send_pack(int argc,
flags |= MATCH_REFS_MIRROR;
/* match them up */
- if (match_push_refs(local_refs, &remote_refs, &rs, flags))
- return -1;
-
+ if (match_push_refs(local_refs, &remote_refs, &rs, flags)) {
+ ret = -1;
+ goto cleanup;
+ }
if (!is_empty_cas(&cas))
apply_push_cas(&cas, remote, remote_refs);
@@ -339,10 +341,12 @@ int cmd_send_pack(int argc,
/* stable plumbing output; do not modify or localize */
fprintf(stderr, "Everything up-to-date\n");
+cleanup:
string_list_clear(&push_options, 0);
free_refs(remote_refs);
free_refs(local_refs);
refspec_clear(&rs);
+ oid_array_clear(&extra_have);
oid_array_clear(&shallow);
clear_cas_option(&cas);
return ret;
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 30075b6..b91acf4 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -187,7 +187,7 @@ static void insert_records_from_trailers(struct shortlog *log,
ctx->output_encoding);
body = strstr(commit_buffer, "\n\n");
if (!body)
- return;
+ goto out;
trailer_iterator_init(&iter, body);
while (trailer_iterator_advance(&iter)) {
@@ -206,6 +206,7 @@ static void insert_records_from_trailers(struct shortlog *log,
}
trailer_iterator_release(&iter);
+out:
strbuf_release(&ident);
repo_unuse_commit_buffer(the_repository, commit, commit_buffer);
}
@@ -418,9 +419,9 @@ int cmd_shortlog(int argc,
* git/nongit so that we do not have to do this.
*/
if (nongit && !the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
shortlog_init(&log);
repo_init_revisions(the_repository, &rev, prefix);
parse_options_start(&ctx, argc, argv, prefix, options,
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 525b231..1ab7db9 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -710,7 +710,7 @@ int cmd_show_branch(int ac,
init_commit_name_slab(&name_slab);
- git_config(git_show_branch_config, NULL);
+ repo_config(the_repository, git_show_branch_config, NULL);
/* If nothing is specified, try the default first */
if (ac == 1 && default_args.nr) {
diff --git a/builtin/show-index.c b/builtin/show-index.c
index 9d4ecf5..2c3e294 100644
--- a/builtin/show-index.c
+++ b/builtin/show-index.c
@@ -47,7 +47,7 @@ int cmd_show_index(int argc,
* the index file passed in and use that instead.
*/
if (!the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
hashsz = the_hash_algo->rawsz;
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 623a52a..0b6f9ed 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -1,11 +1,12 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs/refs-internal.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "object.h"
#include "string-list.h"
#include "parse-options.h"
@@ -35,8 +36,8 @@ static void show_one(const struct show_one_options *opts,
const char *hex;
struct object_id peeled;
- if (!has_object(the_repository, oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (!odb_has_object(the_repository->objects, oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
die("git show-ref: bad ref %s (%s)", refname,
oid_to_hex(oid));
@@ -324,7 +325,7 @@ struct repository *repo UNUSED)
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, show_ref_options,
show_ref_usage, 0);
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 1bf0159..8c333b3 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -1082,7 +1082,7 @@ int cmd_sparse_checkout(int argc,
builtin_sparse_checkout_options,
builtin_sparse_checkout_usage, 0);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
diff --git a/builtin/stash.c b/builtin/stash.c
index cfbd928..1977e50 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -28,7 +28,10 @@
#include "log-tree.h"
#include "diffcore.h"
#include "reflog.h"
+#include "reflog-walk.h"
#include "add-interactive.h"
+#include "oid-array.h"
+#include "commit.h"
#define INCLUDE_ALL_FILES 2
@@ -56,6 +59,10 @@
" [-u | --include-untracked] [-a | --all] [<message>]")
#define BUILTIN_STASH_CREATE_USAGE \
N_("git stash create [<message>]")
+#define BUILTIN_STASH_EXPORT_USAGE \
+ N_("git stash export (--print | --to-ref <ref>) [<stash>...]")
+#define BUILTIN_STASH_IMPORT_USAGE \
+ N_("git stash import <commit>")
#define BUILTIN_STASH_CLEAR_USAGE \
"git stash clear"
@@ -71,6 +78,8 @@ static const char * const git_stash_usage[] = {
BUILTIN_STASH_CLEAR_USAGE,
BUILTIN_STASH_CREATE_USAGE,
BUILTIN_STASH_STORE_USAGE,
+ BUILTIN_STASH_EXPORT_USAGE,
+ BUILTIN_STASH_IMPORT_USAGE,
NULL
};
@@ -124,6 +133,16 @@ static const char * const git_stash_save_usage[] = {
NULL
};
+static const char * const git_stash_export_usage[] = {
+ BUILTIN_STASH_EXPORT_USAGE,
+ NULL
+};
+
+static const char * const git_stash_import_usage[] = {
+ BUILTIN_STASH_IMPORT_USAGE,
+ NULL
+};
+
static const char ref_stash[] = "refs/stash";
static struct strbuf stash_index_path = STRBUF_INIT;
@@ -132,6 +151,7 @@ static struct strbuf stash_index_path = STRBUF_INIT;
* b_commit is set to the base commit
* i_commit is set to the commit containing the index tree
* u_commit is set to the commit containing the untracked files tree
+ * c_commit is set to the first parent (chain commit) when importing and is otherwise unset
* w_tree is set to the working tree
* b_tree is set to the base tree
* i_tree is set to the index tree
@@ -142,6 +162,7 @@ struct stash_info {
struct object_id b_commit;
struct object_id i_commit;
struct object_id u_commit;
+ struct object_id c_commit;
struct object_id w_tree;
struct object_id b_tree;
struct object_id i_tree;
@@ -160,6 +181,33 @@ static void free_stash_info(struct stash_info *info)
strbuf_release(&info->revision);
}
+static int check_stash_topology(struct repository *r, struct commit *stash)
+{
+ struct commit *p1, *p2, *p3 = NULL;
+
+ /* stash must have two or three parents */
+ if (!stash->parents || !stash->parents->next ||
+ (stash->parents->next->next && stash->parents->next->next->next))
+ return -1;
+ p1 = stash->parents->item;
+ p2 = stash->parents->next->item;
+ if (stash->parents->next->next)
+ p3 = stash->parents->next->next->item;
+ if (repo_parse_commit(r, p1) || repo_parse_commit(r, p2) ||
+ (p3 && repo_parse_commit(r, p3)))
+ return -1;
+ /* p2 must have a single parent, p3 must have no parents */
+ if (!p2->parents || p2->parents->next || (p3 && p3->parents))
+ return -1;
+ if (repo_parse_commit(r, p2->parents->item))
+ return -1;
+ /* p2^1 must equal p1 */
+ if (!oideq(&p1->object.oid, &p2->parents->item->object.oid))
+ return -1;
+
+ return 0;
+}
+
static void assert_stash_like(struct stash_info *info, const char *revision)
{
if (get_oidf(&info->b_commit, "%s^1", revision) ||
@@ -169,6 +217,25 @@ static void assert_stash_like(struct stash_info *info, const char *revision)
die(_("'%s' is not a stash-like commit"), revision);
}
+static int parse_stash_revision(struct strbuf *revision, const char *commit, int quiet)
+{
+ strbuf_reset(revision);
+ if (!commit) {
+ if (!refs_ref_exists(get_main_ref_store(the_repository), ref_stash)) {
+ if (!quiet)
+ fprintf_ln(stderr, _("No stash entries found."));
+ return -1;
+ }
+
+ strbuf_addf(revision, "%s@{0}", ref_stash);
+ } else if (strspn(commit, "0123456789") == strlen(commit)) {
+ strbuf_addf(revision, "%s@{%s}", ref_stash, commit);
+ } else {
+ strbuf_addstr(revision, commit);
+ }
+ return 0;
+}
+
static int get_stash_info(struct stash_info *info, int argc, const char **argv)
{
int ret;
@@ -196,17 +263,9 @@ static int get_stash_info(struct stash_info *info, int argc, const char **argv)
if (argc == 1)
commit = argv[0];
- if (!commit) {
- if (!refs_ref_exists(get_main_ref_store(the_repository), ref_stash)) {
- fprintf_ln(stderr, _("No stash entries found."));
- return -1;
- }
-
- strbuf_addf(&info->revision, "%s@{0}", ref_stash);
- } else if (strspn(commit, "0123456789") == strlen(commit)) {
- strbuf_addf(&info->revision, "%s@{%s}", ref_stash, commit);
- } else {
- strbuf_addstr(&info->revision, commit);
+ strbuf_init(&info->revision, 0);
+ if (parse_stash_revision(&info->revision, commit, 0)) {
+ return -1;
}
revision = info->revision.buf;
@@ -920,7 +979,7 @@ static int show_stash(int argc, const char **argv, const char *prefix,
int do_usage = 0;
init_diff_ui_defaults();
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
repo_init_revisions(the_repository, &rev, prefix);
argc = parse_options(argc, argv, prefix, options, git_stash_show_usage,
@@ -1242,7 +1301,8 @@ static int stash_staged(struct stash_info *info, struct strbuf *out_patch,
}
static int stash_patch(struct stash_info *info, const struct pathspec *ps,
- struct strbuf *out_patch, int quiet)
+ struct strbuf *out_patch, int quiet,
+ struct add_p_opt *add_p_opt)
{
int ret = 0;
struct child_process cp_read_tree = CHILD_PROCESS_INIT;
@@ -1267,7 +1327,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
old_index_env = xstrdup_or_null(getenv(INDEX_ENVIRONMENT));
setenv(INDEX_ENVIRONMENT, the_repository->index_file, 1);
- ret = !!run_add_p(the_repository, ADD_P_STASH, NULL, ps);
+ ret = !!run_add_p(the_repository, ADD_P_STASH, add_p_opt, NULL, ps);
the_repository->index_file = old_repo_index_file;
if (old_index_env && *old_index_env)
@@ -1362,8 +1422,8 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
}
static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_buf,
- int include_untracked, int patch_mode, int only_staged,
- struct stash_info *info, struct strbuf *patch,
+ int include_untracked, int patch_mode, struct add_p_opt *add_p_opt,
+ int only_staged, struct stash_info *info, struct strbuf *patch,
int quiet)
{
int ret = 0;
@@ -1372,6 +1432,7 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
const char *head_short_sha1 = NULL;
const char *branch_ref = NULL;
const char *branch_name = "(no branch)";
+ char *branch_name_buf = NULL;
struct commit *head_commit = NULL;
struct commit_list *parents = NULL;
struct strbuf msg = STRBUF_INIT;
@@ -1404,8 +1465,12 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
branch_ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository),
"HEAD", 0, NULL, &flags);
- if (flags & REF_ISSYMREF)
- skip_prefix(branch_ref, "refs/heads/", &branch_name);
+
+ if (flags & REF_ISSYMREF) {
+ if (skip_prefix(branch_ref, "refs/heads/", &branch_name))
+ branch_name = branch_name_buf = xstrdup(branch_name);
+ }
+
head_short_sha1 = repo_find_unique_abbrev(the_repository,
&head_commit->object.oid,
DEFAULT_ABBREV);
@@ -1439,7 +1504,7 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
untracked_commit_option = 1;
}
if (patch_mode) {
- ret = stash_patch(info, ps, patch, quiet);
+ ret = stash_patch(info, ps, patch, quiet, add_p_opt);
if (ret < 0) {
if (!quiet)
fprintf_ln(stderr, _("Cannot save the current "
@@ -1495,6 +1560,7 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
strbuf_release(&msg);
strbuf_release(&untracked_files);
free_commit_list(parents);
+ free(branch_name_buf);
return ret;
}
@@ -1513,7 +1579,7 @@ static int create_stash(int argc, const char **argv, const char *prefix UNUSED,
if (!check_changes_tracked_files(&ps))
return 0;
- ret = do_create_stash(&ps, &stash_msg_buf, 0, 0, 0, &info,
+ ret = do_create_stash(&ps, &stash_msg_buf, 0, 0, NULL, 0, &info,
NULL, 0);
if (!ret)
printf_ln("%s", oid_to_hex(&info.w_commit));
@@ -1524,7 +1590,8 @@ static int create_stash(int argc, const char **argv, const char *prefix UNUSED,
}
static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int quiet,
- int keep_index, int patch_mode, int include_untracked, int only_staged)
+ int keep_index, int patch_mode, struct add_p_opt *add_p_opt,
+ int include_untracked, int only_staged)
{
int ret = 0;
struct stash_info info = STASH_INFO_INIT;
@@ -1594,8 +1661,8 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
if (stash_msg)
strbuf_addstr(&stash_msg_buf, stash_msg);
- if (do_create_stash(ps, &stash_msg_buf, include_untracked, patch_mode, only_staged,
- &info, &patch, quiet)) {
+ if (do_create_stash(ps, &stash_msg_buf, include_untracked, patch_mode,
+ add_p_opt, only_staged, &info, &patch, quiet)) {
ret = -1;
goto done;
}
@@ -1768,6 +1835,7 @@ static int push_stash(int argc, const char **argv, const char *prefix,
const char *stash_msg = NULL;
char *pathspec_from_file = NULL;
struct pathspec ps;
+ struct add_p_opt add_p_opt = ADD_P_OPT_INIT;
struct option options[] = {
OPT_BOOL('k', "keep-index", &keep_index,
N_("keep index")),
@@ -1775,6 +1843,8 @@ static int push_stash(int argc, const char **argv, const char *prefix,
N_("stash staged changes only")),
OPT_BOOL('p', "patch", &patch_mode,
N_("stash in patch mode")),
+ OPT_DIFF_UNIFIED(&add_p_opt.context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&add_p_opt.interhunkcontext),
OPT__QUIET(&quiet, N_("quiet mode")),
OPT_BOOL('u', "include-untracked", &include_untracked,
N_("include untracked files in stash")),
@@ -1789,11 +1859,15 @@ static int push_stash(int argc, const char **argv, const char *prefix,
int ret;
if (argc) {
- force_assume = !strcmp(argv[0], "-p");
+ int flags = PARSE_OPT_KEEP_DASHDASH;
+
+ if (push_assumed)
+ flags |= PARSE_OPT_STOP_AT_NON_OPTION;
+
argc = parse_options(argc, argv, prefix, options,
push_assumed ? git_stash_usage :
- git_stash_push_usage,
- PARSE_OPT_KEEP_DASHDASH);
+ git_stash_push_usage, flags);
+ force_assume |= patch_mode;
}
if (argc) {
@@ -1826,8 +1900,20 @@ static int push_stash(int argc, const char **argv, const char *prefix,
die(_("the option '%s' requires '%s'"), "--pathspec-file-nul", "--pathspec-from-file");
}
+ if (!patch_mode) {
+ if (add_p_opt.context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--patch");
+ if (add_p_opt.interhunkcontext != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--patch");
+ }
+
+ if (add_p_opt.context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (add_p_opt.interhunkcontext < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
ret = do_push_stash(&ps, stash_msg, quiet, keep_index, patch_mode,
- include_untracked, only_staged);
+ &add_p_opt, include_untracked, only_staged);
clear_pathspec(&ps);
free(pathspec_from_file);
@@ -1852,6 +1938,7 @@ static int save_stash(int argc, const char **argv, const char *prefix,
const char *stash_msg = NULL;
struct pathspec ps;
struct strbuf stash_msg_buf = STRBUF_INIT;
+ struct add_p_opt add_p_opt = ADD_P_OPT_INIT;
struct option options[] = {
OPT_BOOL('k', "keep-index", &keep_index,
N_("keep index")),
@@ -1859,6 +1946,8 @@ static int save_stash(int argc, const char **argv, const char *prefix,
N_("stash staged changes only")),
OPT_BOOL('p', "patch", &patch_mode,
N_("stash in patch mode")),
+ OPT_DIFF_UNIFIED(&add_p_opt.context),
+ OPT_DIFF_INTERHUNK_CONTEXT(&add_p_opt.interhunkcontext),
OPT__QUIET(&quiet, N_("quiet mode")),
OPT_BOOL('u', "include-untracked", &include_untracked,
N_("include untracked files in stash")),
@@ -1877,13 +1966,404 @@ static int save_stash(int argc, const char **argv, const char *prefix,
stash_msg = strbuf_join_argv(&stash_msg_buf, argc, argv, ' ');
memset(&ps, 0, sizeof(ps));
+
+ if (add_p_opt.context < -1)
+ die(_("'%s' cannot be negative"), "--unified");
+ if (add_p_opt.interhunkcontext < -1)
+ die(_("'%s' cannot be negative"), "--inter-hunk-context");
+
+ if (!patch_mode) {
+ if (add_p_opt.context != -1)
+ die(_("the option '%s' requires '%s'"), "--unified", "--patch");
+ if (add_p_opt.interhunkcontext != -1)
+ die(_("the option '%s' requires '%s'"), "--inter-hunk-context", "--patch");
+ }
+
ret = do_push_stash(&ps, stash_msg, quiet, keep_index,
- patch_mode, include_untracked, only_staged);
+ patch_mode, &add_p_opt, include_untracked,
+ only_staged);
strbuf_release(&stash_msg_buf);
return ret;
}
+static int write_commit_with_parents(struct repository *r,
+ struct object_id *out,
+ const struct object_id *oid,
+ struct commit_list *parents)
+{
+ size_t author_len, committer_len;
+ struct commit *this;
+ const char *orig_author, *orig_committer;
+ char *author = NULL, *committer = NULL;
+ const char *buffer;
+ unsigned long bufsize;
+ const char *p;
+ struct strbuf msg = STRBUF_INIT;
+ int ret = 0;
+ struct ident_split id;
+
+ this = lookup_commit_reference(r, oid);
+ buffer = repo_get_commit_buffer(r, this, &bufsize);
+ orig_author = find_commit_header(buffer, "author", &author_len);
+ orig_committer = find_commit_header(buffer, "committer", &committer_len);
+
+ if (!orig_author || !orig_committer) {
+ ret = error(_("cannot parse commit %s"), oid_to_hex(oid));
+ goto out;
+ }
+
+ if (split_ident_line(&id, orig_author, author_len) < 0 ||
+ split_ident_line(&id, orig_committer, committer_len) < 0) {
+ ret = error(_("invalid author or committer for %s"), oid_to_hex(oid));
+ goto out;
+ }
+
+ p = strstr(buffer, "\n\n");
+ strbuf_addstr(&msg, "git stash: ");
+
+ if (p)
+ strbuf_add(&msg, p + 2, bufsize - (p + 2 - buffer));
+ strbuf_complete_line(&msg);
+
+ author = xmemdupz(orig_author, author_len);
+ committer = xmemdupz(orig_committer, committer_len);
+
+ if (commit_tree_extended(msg.buf, msg.len,
+ r->hash_algo->empty_tree, parents,
+ out, author, committer,
+ NULL, NULL)) {
+ ret = error(_("could not write commit"));
+ goto out;
+ }
+out:
+ strbuf_release(&msg);
+ repo_unuse_commit_buffer(r, this, buffer);
+ free(author);
+ free(committer);
+ return ret;
+}
+
+static int do_import_stash(struct repository *r, const char *rev)
+{
+ struct object_id chain;
+ int res = 0;
+ const char *buffer = NULL;
+ unsigned long bufsize;
+ struct commit *this = NULL;
+ struct commit_list *items = NULL, *cur;
+ char *msg = NULL;
+
+ if (repo_get_oid(r, rev, &chain))
+ return error(_("not a valid revision: %s"), rev);
+
+ this = lookup_commit_reference(r, &chain);
+ if (!this)
+ return error(_("not a commit: %s"), rev);
+
+ /*
+ * Walk the commit history, finding each stash entry, and load data into
+ * the array.
+ */
+ for (;;) {
+ const char *author, *committer;
+ size_t author_len, committer_len;
+ const char *p;
+ const char *expected = "git stash <git@stash> 1000684800 +0000";
+ const char *prefix = "git stash: ";
+ struct commit *stash;
+ struct tree *tree = repo_get_commit_tree(r, this);
+
+ if (!tree ||
+ !oideq(&tree->object.oid, r->hash_algo->empty_tree) ||
+ (this->parents &&
+ (!this->parents->next || this->parents->next->next))) {
+ res = error(_("%s is not a valid exported stash commit"),
+ oid_to_hex(&this->object.oid));
+ goto out;
+ }
+
+ buffer = repo_get_commit_buffer(r, this, &bufsize);
+
+ if (!this->parents) {
+ /*
+ * We don't have any parents. Make sure this is our
+ * root commit.
+ */
+ author = find_commit_header(buffer, "author", &author_len);
+ committer = find_commit_header(buffer, "committer", &committer_len);
+
+ if (!author || !committer) {
+ error(_("cannot parse commit %s"), oid_to_hex(&this->object.oid));
+ goto out;
+ }
+
+ if (author_len != strlen(expected) ||
+ committer_len != strlen(expected) ||
+ memcmp(author, expected, author_len) ||
+ memcmp(committer, expected, committer_len)) {
+ res = error(_("found root commit %s with invalid data"), oid_to_hex(&this->object.oid));
+ goto out;
+ }
+ break;
+ }
+
+ p = strstr(buffer, "\n\n");
+ if (!p) {
+ res = error(_("cannot parse commit %s"), oid_to_hex(&this->object.oid));
+ goto out;
+ }
+
+ p += 2;
+ if (((size_t)(bufsize - (p - buffer)) < strlen(prefix)) ||
+ memcmp(prefix, p, strlen(prefix))) {
+ res = error(_("found stash commit %s without expected prefix"), oid_to_hex(&this->object.oid));
+ goto out;
+ }
+
+ stash = this->parents->next->item;
+
+ if (repo_parse_commit(r, this->parents->item) ||
+ repo_parse_commit(r, stash)) {
+ res = error(_("cannot parse parents of commit: %s"),
+ oid_to_hex(&this->object.oid));
+ goto out;
+ }
+
+ if (check_stash_topology(r, stash)) {
+ res = error(_("%s does not look like a stash commit"),
+ oid_to_hex(&stash->object.oid));
+ goto out;
+ }
+
+ repo_unuse_commit_buffer(r, this, buffer);
+ buffer = NULL;
+ items = commit_list_insert(stash, &items);
+ this = this->parents->item;
+ }
+
+ /*
+ * Now, walk each entry, adding it to the stash as a normal stash
+ * commit.
+ */
+ for (cur = items; cur; cur = cur->next) {
+ const char *p;
+ struct object_id *oid;
+
+ this = cur->item;
+ oid = &this->object.oid;
+ buffer = repo_get_commit_buffer(r, this, &bufsize);
+ if (!buffer) {
+ res = error(_("cannot read commit buffer for %s"), oid_to_hex(oid));
+ goto out;
+ }
+
+ p = strstr(buffer, "\n\n");
+ if (!p) {
+ res = error(_("cannot parse commit %s"), oid_to_hex(oid));
+ goto out;
+ }
+
+ p += 2;
+ msg = xmemdupz(p, bufsize - (p - buffer));
+ repo_unuse_commit_buffer(r, this, buffer);
+ buffer = NULL;
+
+ if (do_store_stash(oid, msg, 1)) {
+ res = error(_("cannot save the stash for %s"), oid_to_hex(oid));
+ goto out;
+ }
+ FREE_AND_NULL(msg);
+ }
+out:
+ if (this && buffer)
+ repo_unuse_commit_buffer(r, this, buffer);
+ free_commit_list(items);
+ free(msg);
+
+ return res;
+}
+
+static int import_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo)
+{
+ struct option options[] = {
+ OPT_END()
+ };
+
+ argc = parse_options(argc, argv, prefix, options,
+ git_stash_import_usage,
+ PARSE_OPT_KEEP_DASHDASH);
+
+ if (argc != 1)
+ usage_msg_opt("a revision is required", git_stash_import_usage, options);
+
+ return do_import_stash(repo, argv[0]);
+}
+
+struct stash_entry_data {
+ struct repository *r;
+ struct commit_list **items;
+ size_t count;
+};
+
+static int collect_stash_entries(struct object_id *old_oid UNUSED,
+ struct object_id *new_oid,
+ const char *committer UNUSED,
+ timestamp_t timestamp UNUSED,
+ int tz UNUSED, const char *msg UNUSED,
+ void *cb_data)
+{
+ struct stash_entry_data *data = cb_data;
+ struct commit *stash;
+
+ data->count++;
+ stash = lookup_commit_reference(data->r, new_oid);
+ if (!stash || check_stash_topology(data->r, stash)) {
+ return error(_("%s does not look like a stash commit"),
+ oid_to_hex(new_oid));
+ }
+ data->items = commit_list_append(stash, data->items);
+ return 0;
+}
+
+static int do_export_stash(struct repository *r,
+ const char *ref,
+ int argc,
+ const char **argv)
+{
+ struct object_id base;
+ struct object_context unused;
+ struct commit *prev;
+ struct commit_list *items = NULL, **iter = &items, *cur;
+ int res = 0;
+ int i;
+ struct strbuf revision = STRBUF_INIT;
+ const char *author, *committer;
+
+ /*
+ * This is an arbitrary, fixed date, specifically the one used by git
+ * format-patch. The goal is merely to produce reproducible output.
+ */
+ prepare_fallback_ident("git stash", "git@stash");
+ author = fmt_ident("git stash", "git@stash", WANT_BLANK_IDENT,
+ "2001-09-17T00:00:00Z", 0);
+ committer = fmt_ident("git stash", "git@stash", WANT_BLANK_IDENT,
+ "2001-09-17T00:00:00Z", 0);
+
+ /* First, we create a single empty commit. */
+ if (commit_tree_extended("", 0, r->hash_algo->empty_tree, NULL,
+ &base, author, committer, NULL, NULL))
+ return error(_("unable to write base commit"));
+
+ prev = lookup_commit_reference(r, &base);
+
+ if (argc) {
+ /*
+ * Find each specified stash, and load data into the array.
+ */
+ for (i = 0; i < argc; i++) {
+ struct object_id oid;
+ struct commit *stash;
+
+ if (parse_stash_revision(&revision, argv[i], 1) ||
+ get_oid_with_context(r, revision.buf,
+ GET_OID_QUIETLY | GET_OID_GENTLY,
+ &oid, &unused)) {
+ res = error(_("unable to find stash entry %s"), argv[i]);
+ goto out;
+ }
+
+ stash = lookup_commit_reference(r, &oid);
+ if (!stash || check_stash_topology(r, stash)) {
+ res = error(_("%s does not look like a stash commit"),
+ revision.buf);
+ goto out;
+ }
+ iter = commit_list_append(stash, iter);
+ }
+ } else {
+ /*
+ * Walk the reflog, finding each stash entry, and load data into the
+ * array.
+ */
+ struct stash_entry_data cb_data = {
+ .r = r, .items = iter,
+ };
+ if (refs_for_each_reflog_ent_reverse(get_main_ref_store(r),
+ "refs/stash",
+ collect_stash_entries,
+ &cb_data) && cb_data.count)
+ goto out;
+ }
+
+ /*
+ * Now, create a set of commits identical to the regular stash commits,
+ * but where their first parents form a chain to our original empty
+ * base commit.
+ */
+ items = reverse_commit_list(items);
+ for (cur = items; cur; cur = cur->next) {
+ struct commit_list *parents = NULL;
+ struct commit_list **next = &parents;
+ struct object_id out;
+ struct commit *stash = cur->item;
+
+ next = commit_list_append(prev, next);
+ next = commit_list_append(stash, next);
+ res = write_commit_with_parents(r, &out, &stash->object.oid, parents);
+ free_commit_list(parents);
+ if (res)
+ goto out;
+ prev = lookup_commit_reference(r, &out);
+ }
+ if (ref)
+ refs_update_ref(get_main_ref_store(r), NULL, ref,
+ &prev->object.oid, NULL, 0, UPDATE_REFS_DIE_ON_ERR);
+ else
+ puts(oid_to_hex(&prev->object.oid));
+out:
+ strbuf_release(&revision);
+ free_commit_list(items);
+
+ return res;
+}
+
+enum export_action {
+ ACTION_NONE,
+ ACTION_PRINT,
+ ACTION_TO_REF,
+};
+
+static int export_stash(int argc,
+ const char **argv,
+ const char *prefix,
+ struct repository *repo)
+{
+ const char *ref = NULL;
+ enum export_action action = ACTION_NONE;
+ struct option options[] = {
+ OPT_CMDMODE(0, "print", &action,
+ N_("print the object ID instead of writing it to a ref"),
+ ACTION_PRINT),
+ OPT_STRING(0, "to-ref", &ref, "ref",
+ N_("save the data to the given ref")),
+ OPT_END()
+ };
+
+ argc = parse_options(argc, argv, prefix, options,
+ git_stash_export_usage,
+ PARSE_OPT_KEEP_DASHDASH);
+
+ if (ref && action == ACTION_NONE)
+ action = ACTION_TO_REF;
+
+ if (action == ACTION_NONE || (ref && action == ACTION_PRINT))
+ return error(_("exactly one of --print and --to-ref is required"));
+
+ return do_export_stash(repo, ref, argc, argv);
+}
+
int cmd_stash(int argc,
const char **argv,
const char *prefix,
@@ -1904,13 +2384,15 @@ int cmd_stash(int argc,
OPT_SUBCOMMAND("store", &fn, store_stash),
OPT_SUBCOMMAND("create", &fn, create_stash),
OPT_SUBCOMMAND("push", &fn, push_stash_unassumed),
+ OPT_SUBCOMMAND("export", &fn, export_stash),
+ OPT_SUBCOMMAND("import", &fn, import_stash),
OPT_SUBCOMMAND_F("save", &fn, save_stash, PARSE_OPT_NOCOMPLETE),
OPT_END()
};
const char **args_copy;
int ret;
- git_config(git_stash_config, NULL);
+ repo_config(the_repository, git_stash_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_stash_usage,
PARSE_OPT_SUBCOMMAND_OPTIONAL |
diff --git a/builtin/stripspace.c b/builtin/stripspace.c
index e147f3f..4a566cb 100644
--- a/builtin/stripspace.c
+++ b/builtin/stripspace.c
@@ -55,7 +55,7 @@ int cmd_stripspace(int argc,
if (mode == STRIP_COMMENTS || mode == COMMENT_LINES) {
setup_git_directory_gently(&nongit);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
if (strbuf_read(&buf, 0, 1024) < 0)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 53da211..07a1935 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -28,10 +28,12 @@
#include "diff.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "advice.h"
#include "branch.h"
#include "list-objects-filter-options.h"
+#include "wildmatch.h"
+#include "strbuf.h"
#define OPT_QUIET (1 << 0)
#define OPT_CACHED (1 << 1)
@@ -41,61 +43,9 @@
typedef void (*each_submodule_fn)(const struct cache_entry *list_item,
void *cb_data);
-static int repo_get_default_remote(struct repository *repo, char **default_remote)
-{
- char *dest = NULL;
- struct strbuf sb = STRBUF_INIT;
- struct ref_store *store = get_main_ref_store(repo);
- const char *refname = refs_resolve_ref_unsafe(store, "HEAD", 0, NULL,
- NULL);
-
- if (!refname)
- return die_message(_("No such ref: %s"), "HEAD");
-
- /* detached HEAD */
- if (!strcmp(refname, "HEAD")) {
- *default_remote = xstrdup("origin");
- return 0;
- }
-
- if (!skip_prefix(refname, "refs/heads/", &refname))
- return die_message(_("Expecting a full ref name, got %s"),
- refname);
-
- strbuf_addf(&sb, "branch.%s.remote", refname);
- if (repo_config_get_string(repo, sb.buf, &dest))
- *default_remote = xstrdup("origin");
- else
- *default_remote = dest;
-
- strbuf_release(&sb);
- return 0;
-}
-
-static int get_default_remote_submodule(const char *module_path, char **default_remote)
-{
- struct repository subrepo;
- int ret;
-
- if (repo_submodule_init(&subrepo, the_repository, module_path,
- null_oid(the_hash_algo)) < 0)
- return die_message(_("could not get a repository handle for submodule '%s'"),
- module_path);
- ret = repo_get_default_remote(&subrepo, default_remote);
- repo_clear(&subrepo);
-
- return ret;
-}
-
static char *get_default_remote(void)
{
- char *default_remote;
- int code = repo_get_default_remote(the_repository, &default_remote);
-
- if (code)
- exit(code);
-
- return default_remote;
+ return xstrdup(repo_default_remote(the_repository));
}
static char *resolve_relative_url(const char *rel_url, const char *up_path, int quiet)
@@ -105,7 +55,7 @@ static char *resolve_relative_url(const char *rel_url, const char *up_path, int
struct strbuf remotesb = STRBUF_INIT;
strbuf_addf(&remotesb, "remote.%s.url", remote);
- if (git_config_get_string(remotesb.buf, &remoteurl)) {
+ if (repo_config_get_string(the_repository, remotesb.buf, &remoteurl)) {
if (!quiet)
warning(_("could not look up configuration '%s'. "
"Assuming this repository is its own "
@@ -122,6 +72,46 @@ static char *resolve_relative_url(const char *rel_url, const char *up_path, int
return resolved_url;
}
+static int get_default_remote_submodule(const char *module_path, char **default_remote)
+{
+ const struct submodule *sub;
+ struct repository subrepo;
+ const char *remote_name = NULL;
+ char *url = NULL;
+
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), module_path);
+ if (sub && sub->url) {
+ url = xstrdup(sub->url);
+
+ /* Possibly a url relative to parent */
+ if (starts_with_dot_dot_slash(url) ||
+ starts_with_dot_slash(url)) {
+ char *oldurl = url;
+
+ url = resolve_relative_url(oldurl, NULL, 1);
+ free(oldurl);
+ }
+ }
+
+ if (repo_submodule_init(&subrepo, the_repository, module_path,
+ null_oid(the_hash_algo)) < 0)
+ return die_message(_("could not get a repository handle for submodule '%s'"),
+ module_path);
+
+ /* Look up by URL first */
+ if (url)
+ remote_name = repo_remote_from_url(&subrepo, url);
+ if (!remote_name)
+ remote_name = repo_default_remote(&subrepo);
+
+ *default_remote = xstrdup(remote_name);
+
+ repo_clear(&subrepo);
+ free(url);
+
+ return 0;
+}
+
/* the result should be freed by the caller. */
static char *get_submodule_displaypath(const char *path, const char *prefix,
const char *super_prefix)
@@ -303,7 +293,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
char *displaypath;
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
displaypath = get_submodule_displaypath(path, info->prefix,
info->super_prefix);
@@ -438,18 +428,6 @@ static int module_foreach(int argc, const char **argv, const char *prefix,
return ret;
}
-static int starts_with_dot_slash(const char *const path)
-{
- return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_SLASH |
- PATH_MATCH_XPLATFORM);
-}
-
-static int starts_with_dot_dot_slash(const char *const path)
-{
- return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_DOT_SLASH |
- PATH_MATCH_XPLATFORM);
-}
-
struct init_cb {
const char *prefix;
const char *super_prefix;
@@ -482,7 +460,7 @@ static void init_submodule(const char *path, const char *prefix,
*/
if (!is_submodule_active(the_repository, path)) {
strbuf_addf(&sb, "submodule.%s.active", sub->name);
- git_config_set_gently(sb.buf, "true");
+ repo_config_set_gently(the_repository, sb.buf, "true");
strbuf_reset(&sb);
}
@@ -492,7 +470,7 @@ static void init_submodule(const char *path, const char *prefix,
* .gitmodules, so look it up directly.
*/
strbuf_addf(&sb, "submodule.%s.url", sub->name);
- if (git_config_get_string(sb.buf, &url)) {
+ if (repo_config_get_string(the_repository, sb.buf, &url)) {
if (!sub->url)
die(_("No url found for submodule path '%s' in .gitmodules"),
displaypath);
@@ -508,7 +486,7 @@ static void init_submodule(const char *path, const char *prefix,
free(oldurl);
}
- if (git_config_set_gently(sb.buf, url))
+ if (repo_config_set_gently(the_repository, sb.buf, url))
die(_("Failed to register url for submodule path '%s'"),
displaypath);
if (!(flags & OPT_QUIET))
@@ -520,7 +498,7 @@ static void init_submodule(const char *path, const char *prefix,
/* Copy "update" setting when it is not set yet */
strbuf_addf(&sb, "submodule.%s.update", sub->name);
- if (git_config_get_string_tmp(sb.buf, &upd) &&
+ if (repo_config_get_string_tmp(the_repository, sb.buf, &upd) &&
sub->update_strategy.type != SM_UPDATE_UNSPECIFIED) {
if (sub->update_strategy.type == SM_UPDATE_COMMAND) {
fprintf(stderr, _("warning: command update mode suggested for submodule '%s'\n"),
@@ -530,7 +508,7 @@ static void init_submodule(const char *path, const char *prefix,
upd = submodule_update_type_to_string(sub->update_strategy.type);
}
- if (git_config_set_gently(sb.buf, upd))
+ if (repo_config_set_gently(the_repository, sb.buf, upd))
die(_("Failed to register update mode for submodule path '%s'"), displaypath);
}
strbuf_release(&sb);
@@ -573,7 +551,7 @@ static int module_init(int argc, const char **argv, const char *prefix,
* If there are no path args and submodule.active is set then,
* by default, only initialize 'active' modules.
*/
- if (!argc && !git_config_get("submodule.active"))
+ if (!argc && !repo_config_get(the_repository, "submodule.active"))
module_list_active(&list);
info.prefix = prefix;
@@ -643,7 +621,7 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
};
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
if (!submodule_from_path(the_repository, null_oid(the_hash_algo), path))
die(_("no submodule mapping found in .gitmodules for path '%s'"),
@@ -673,7 +651,7 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
"--ignore-submodules=dirty", "--quiet", "--",
path, NULL);
- git_config(git_diff_basic_config, NULL);
+ repo_config(the_repository, git_diff_basic_config, NULL);
repo_init_revisions(the_repository, &rev, NULL);
rev.abbrev = 0;
@@ -1058,7 +1036,7 @@ static void prepare_submodule_summary(struct summary_cb *info,
config_key = xstrfmt("submodule.%s.ignore",
sub->name);
- if (!git_config_get_string_tmp(config_key, &value))
+ if (!repo_config_get_string_tmp(the_repository, config_key, &value))
ignore_all = !strcmp(value, "all");
else if (sub->ignore)
ignore_all = !strcmp(sub->ignore, "all");
@@ -1132,7 +1110,7 @@ static int compute_summary_module_list(struct object_id *head_oid,
if (info->argc)
strvec_pushv(&diff_args, info->argv);
- git_config(git_diff_basic_config, NULL);
+ repo_config(the_repository, git_diff_basic_config, NULL);
repo_init_revisions(the_repository, &rev, info->prefix);
rev.abbrev = 0;
precompose_argv_prefix(diff_args.nr, diff_args.v, NULL);
@@ -1257,7 +1235,7 @@ static void sync_submodule(const char *path, const char *prefix,
return;
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
@@ -1286,7 +1264,7 @@ static void sync_submodule(const char *path, const char *prefix,
strbuf_reset(&sb);
strbuf_addf(&sb, "submodule.%s.url", sub->name);
- if (git_config_set_gently(sb.buf, super_config_url))
+ if (repo_config_set_gently(the_repository, sb.buf, super_config_url))
die(_("failed to register url for submodule path '%s'"),
displaypath);
@@ -1304,7 +1282,7 @@ static void sync_submodule(const char *path, const char *prefix,
submodule_to_gitdir(the_repository, &sb, path);
strbuf_addstr(&sb, "/config");
- if (git_config_set_in_file_gently(sb.buf, remote_key, NULL, sub_origin_url))
+ if (repo_config_set_in_file_gently(the_repository, sb.buf, remote_key, NULL, sub_origin_url))
die(_("failed to update remote for submodule '%s'"),
path);
@@ -1402,7 +1380,7 @@ static void deinit_submodule(const char *path, const char *prefix,
char *sub_git_dir = xstrfmt("%s/.git", path);
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
@@ -1582,7 +1560,7 @@ static const char alternate_error_advice[] = N_(
);
static int add_possible_reference_from_superproject(
- struct object_directory *odb, void *sas_cb)
+ struct odb_source *alt_odb, void *sas_cb)
{
struct submodule_alternate_setup *sas = sas_cb;
size_t len;
@@ -1591,12 +1569,12 @@ static int add_possible_reference_from_superproject(
* If the alternate object store is another repository, try the
* standard layout with .git/(modules/<name>)+/objects
*/
- if (strip_suffix(odb->path, "/objects", &len)) {
+ if (strip_suffix(alt_odb->path, "/objects", &len)) {
struct repository alternate;
char *sm_alternate;
struct strbuf sb = STRBUF_INIT;
struct strbuf err = STRBUF_INIT;
- strbuf_add(&sb, odb->path, len);
+ strbuf_add(&sb, alt_odb->path, len);
if (repo_init(&alternate, sb.buf, NULL) < 0)
die(_("could not get a repository handle for gitdir '%s'"),
@@ -1647,11 +1625,11 @@ static void prepare_possible_alternates(const char *sm_name,
char *sm_alternate = NULL, *error_strategy = NULL;
struct submodule_alternate_setup sas = SUBMODULE_ALTERNATE_SETUP_INIT;
- git_config_get_string("submodule.alternateLocation", &sm_alternate);
+ repo_config_get_string(the_repository, "submodule.alternateLocation", &sm_alternate);
if (!sm_alternate)
return;
- git_config_get_string("submodule.alternateErrorStrategy", &error_strategy);
+ repo_config_get_string(the_repository, "submodule.alternateErrorStrategy", &error_strategy);
if (!error_strategy)
error_strategy = xstrdup("die");
@@ -1668,7 +1646,8 @@ static void prepare_possible_alternates(const char *sm_name,
die(_("Value '%s' for submodule.alternateErrorStrategy is not recognized"), error_strategy);
if (!strcmp(sm_alternate, "superproject"))
- foreach_alt_odb(add_possible_reference_from_superproject, &sas);
+ odb_for_each_alternate(the_repository->objects,
+ add_possible_reference_from_superproject, &sas);
else if (!strcmp(sm_alternate, "no"))
; /* do nothing */
else
@@ -1724,7 +1703,7 @@ static int clone_submodule(const struct module_clone_data *clone_data,
char *to_free = NULL;
if (validate_submodule_path(clone_data_path) < 0)
- exit(128);
+ die(NULL);
if (!is_absolute_path(clone_data->path))
clone_data_path = to_free = xstrfmt("%s/%s", repo_get_work_tree(the_repository),
@@ -1831,14 +1810,14 @@ static int clone_submodule(const struct module_clone_data *clone_data,
die(_("could not get submodule directory for '%s'"), clone_data_path);
/* setup alternateLocation and alternateErrorStrategy in the cloned submodule if needed */
- git_config_get_string("submodule.alternateLocation", &sm_alternate);
+ repo_config_get_string(the_repository, "submodule.alternateLocation", &sm_alternate);
if (sm_alternate)
- git_config_set_in_file(p, "submodule.alternateLocation",
- sm_alternate);
- git_config_get_string("submodule.alternateErrorStrategy", &error_strategy);
+ repo_config_set_in_file(the_repository, p, "submodule.alternateLocation",
+ sm_alternate);
+ repo_config_get_string(the_repository, "submodule.alternateErrorStrategy", &error_strategy);
if (error_strategy)
- git_config_set_in_file(p, "submodule.alternateErrorStrategy",
- error_strategy);
+ repo_config_set_in_file(the_repository, p, "submodule.alternateErrorStrategy",
+ error_strategy);
free(sm_alternate);
free(error_strategy);
@@ -2545,7 +2524,7 @@ static int ensure_core_worktree(const char *path)
abs_path = absolute_pathdup(path);
rel_path = relative_path(abs_path, subrepo.gitdir, &sb);
- git_config_set_in_file(cfg_file, "core.worktree", rel_path);
+ repo_config_set_in_file(the_repository, cfg_file, "core.worktree", rel_path);
free(cfg_file);
free(abs_path);
@@ -2660,8 +2639,10 @@ static int update_submodule(struct update_data *update_data)
if (code)
return code;
code = remote_submodule_branch(update_data->sm_path, &branch);
- if (code)
+ if (code) {
+ free(remote_name);
return code;
+ }
remote_ref = xstrfmt("refs/remotes/%s/%s", remote_name, branch);
free(remote_name);
@@ -2851,7 +2832,7 @@ static int module_update(int argc, const char **argv, const char *prefix,
};
update_clone_config_from_gitmodules(&opt.max_jobs);
- git_config(git_update_clone_config, &opt.max_jobs);
+ repo_config(the_repository, git_update_clone_config, &opt.max_jobs);
argc = parse_options(argc, argv, prefix, module_update_options,
git_submodule_helper_usage, 0);
@@ -2899,7 +2880,7 @@ static int module_update(int argc, const char **argv, const char *prefix,
* If there are no path args and submodule.active is set then,
* by default, only initialize 'active' modules.
*/
- if (!argc && !git_config_get("submodule.active"))
+ if (!argc && !repo_config_get(the_repository, "submodule.active"))
module_list_active(&list);
info.prefix = opt.prefix;
@@ -3149,7 +3130,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix,
NULL
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
track = git_branch_track;
argc = parse_options(argc, argv, prefix, options, usage, 0);
@@ -3328,9 +3309,11 @@ static void configure_added_submodule(struct add_data *add_data)
char *key;
struct child_process add_submod = CHILD_PROCESS_INIT;
struct child_process add_gitmodules = CHILD_PROCESS_INIT;
+ const struct string_list *values;
+ int matched = 0;
key = xstrfmt("submodule.%s.url", add_data->sm_name);
- git_config_set_gently(key, add_data->realrepo);
+ repo_config_set_gently(the_repository, key, add_data->realrepo);
free(key);
add_submod.git_cmd = 1;
@@ -3370,20 +3353,28 @@ static void configure_added_submodule(struct add_data *add_data)
* is_submodule_active(), since that function needs to find
* out the value of "submodule.active" again anyway.
*/
- if (!git_config_get("submodule.active")) {
+ if (repo_config_get(the_repository, "submodule.active") || /* key absent */
+ repo_config_get_string_multi(the_repository, "submodule.active", &values)) {
/*
* If the submodule being added isn't already covered by the
* current configured pathspec, set the submodule's active flag
*/
- if (!is_submodule_active(the_repository, add_data->sm_path)) {
+ key = xstrfmt("submodule.%s.active", add_data->sm_name);
+ repo_config_set_gently(the_repository, key, "true");
+ free(key);
+ } else {
+ for (size_t i = 0; i < values->nr; i++) {
+ const char *pat = values->items[i].string;
+ if (!wildmatch(pat, add_data->sm_path, 0)) { /* match found */
+ matched = 1;
+ break;
+ }
+ }
+ if (!matched) { /* no pattern matched -> force-enable */
key = xstrfmt("submodule.%s.active", add_data->sm_name);
- git_config_set_gently(key, "true");
+ repo_config_set_gently(the_repository, key, "true");
free(key);
}
- } else {
- key = xstrfmt("submodule.%s.active", add_data->sm_name);
- git_config_set_gently(key, "true");
- free(key);
}
}
@@ -3444,6 +3435,9 @@ static int module_add(int argc, const char **argv, const char *prefix,
struct add_data add_data = ADD_DATA_INIT;
const char *ref_storage_format = NULL;
char *to_free = NULL;
+ const struct submodule *existing;
+ struct strbuf buf = STRBUF_INIT;
+ char *sm_name_to_free = NULL;
struct option options[] = {
OPT_STRING('b', "branch", &add_data.branch, N_("branch"),
N_("branch of repository to add as submodule")),
@@ -3524,7 +3518,7 @@ static int module_add(int argc, const char **argv, const char *prefix,
strip_dir_trailing_slashes(add_data.sm_path);
if (validate_submodule_path(add_data.sm_path) < 0)
- exit(128);
+ die(NULL);
die_on_index_match(add_data.sm_path, force);
die_on_repo_without_commits(add_data.sm_path);
@@ -3546,6 +3540,28 @@ static int module_add(int argc, const char **argv, const char *prefix,
if(!add_data.sm_name)
add_data.sm_name = add_data.sm_path;
+ existing = submodule_from_name(the_repository,
+ null_oid(the_hash_algo),
+ add_data.sm_name);
+
+ if (existing && strcmp(existing->path, add_data.sm_path)) {
+ if (!force) {
+ die(_("submodule name '%s' already used for path '%s'"),
+ add_data.sm_name, existing->path);
+ }
+ /* --force: build <name><n> until unique */
+ for (int i = 1; ; i++) {
+ strbuf_reset(&buf);
+ strbuf_addf(&buf, "%s%d", add_data.sm_name, i);
+ if (!submodule_from_name(the_repository,
+ null_oid(the_hash_algo),
+ buf.buf)) {
+ break;
+ }
+ }
+ add_data.sm_name = sm_name_to_free = strbuf_detach(&buf, NULL);
+ }
+
if (check_submodule_name(add_data.sm_name))
die(_("'%s' is not a valid submodule name"), add_data.sm_name);
@@ -3561,6 +3577,7 @@ static int module_add(int argc, const char **argv, const char *prefix,
ret = 0;
cleanup:
+ free(sm_name_to_free);
free(add_data.sm_path);
free(to_free);
strbuf_release(&sb);
diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c
index 299d23d..231e41e 100644
--- a/builtin/symbolic-ref.c
+++ b/builtin/symbolic-ref.c
@@ -1,6 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "refs.h"
#include "parse-options.h"
@@ -59,7 +60,7 @@ int cmd_symbolic_ref(int argc,
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options,
git_symbolic_ref_usage, 0);
if (msg && !*msg)
diff --git a/builtin/tag.c b/builtin/tag.c
index 4742b27..f0665af 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -19,7 +19,7 @@
#include "refs.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "tag.h"
#include "parse-options.h"
@@ -244,7 +244,7 @@ static void write_tag_body(int fd, const struct object_id *oid)
struct strbuf payload = STRBUF_INIT;
struct strbuf signature = STRBUF_INIT;
- orig = buf = repo_read_object_file(the_repository, oid, &type, &size);
+ orig = buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf)
return;
if (parse_signature(buf, size, &payload, &signature)) {
@@ -271,8 +271,8 @@ static int build_tag_object(struct strbuf *buf, int sign, struct object_id *resu
struct object_id *compat_oid = NULL, compat_oid_buf;
if (sign && do_sign(buf, &compat_oid, &compat_oid_buf) < 0)
return error(_("unable to sign the tag"));
- if (write_object_file_flags(buf->buf, buf->len, OBJ_TAG, result,
- compat_oid, 0) < 0)
+ if (odb_write_object_ext(the_repository->objects, buf->buf,
+ buf->len, OBJ_TAG, result, compat_oid, 0) < 0)
return error(_("unable to write tag file"));
return 0;
}
@@ -304,7 +304,7 @@ static void create_tag(const struct object_id *object, const char *object_ref,
struct strbuf header = STRBUF_INIT;
int should_edit;
- type = oid_object_info(the_repository, object, NULL);
+ type = odb_read_object_info(the_repository->objects, object, NULL);
if (type <= OBJ_NONE)
die(_("bad object type."));
@@ -401,13 +401,13 @@ static void create_reflog_msg(const struct object_id *oid, struct strbuf *sb)
}
strbuf_addstr(sb, " (");
- type = oid_object_info(the_repository, oid, NULL);
+ type = odb_read_object_info(the_repository->objects, oid, NULL);
switch (type) {
default:
strbuf_addstr(sb, "object of unknown type");
break;
case OBJ_COMMIT:
- if ((buf = repo_read_object_file(the_repository, oid, &type, &size))) {
+ if ((buf = odb_read_object(the_repository->objects, oid, &type, &size))) {
subject_len = find_commit_subject(buf, &subject_start);
strbuf_insert(sb, sb->len, subject_start, subject_len);
} else {
@@ -546,7 +546,7 @@ int cmd_tag(int argc,
* Try to set sort keys from config. If config does not set any,
* fall back on default (refname) sorting.
*/
- git_config(git_tag_config, &sorting_options);
+ repo_config(the_repository, git_tag_config, &sorting_options);
if (!sorting_options.nr)
string_list_append(&sorting_options, "refname");
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index e33acfc..87877a9 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -1,10 +1,11 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "hex.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
static char *create_temp_file(struct object_id *oid)
{
@@ -14,7 +15,7 @@ static char *create_temp_file(struct object_id *oid)
unsigned long size;
int fd;
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf || type != OBJ_BLOB)
die("unable to read blob object %s", oid_to_hex(oid));
@@ -43,7 +44,7 @@ int cmd_unpack_file(int argc,
if (repo_get_oid(the_repository, argv[1], &oid))
die("Not a valid object name %s", argv[1]);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
puts(create_temp_file(&oid));
return 0;
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index e905d5f..7ae7c82 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -9,7 +9,7 @@
#include "git-zlib.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "object.h"
#include "delta.h"
#include "pack.h"
@@ -204,8 +204,8 @@ static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf)
{
struct object_id oid;
- if (write_object_file(obj_buf->buffer, obj_buf->size,
- obj->type, &oid) < 0)
+ if (odb_write_object(the_repository->objects, obj_buf->buffer, obj_buf->size,
+ obj->type, &oid) < 0)
die("failed to write object %s", oid_to_hex(&obj->oid));
obj->flags |= FLAG_WRITTEN;
}
@@ -232,7 +232,7 @@ static int check_object(struct object *obj, enum object_type type,
if (!(obj->flags & FLAG_OPEN)) {
unsigned long size;
- int type = oid_object_info(the_repository, &obj->oid, &size);
+ int type = odb_read_object_info(the_repository->objects, &obj->oid, &size);
if (type != obj->type || type <= 0)
die("object of unexpected type");
obj->flags |= FLAG_WRITTEN;
@@ -272,16 +272,16 @@ static void write_object(unsigned nr, enum object_type type,
void *buf, unsigned long size)
{
if (!strict) {
- if (write_object_file(buf, size, type,
- &obj_list[nr].oid) < 0)
+ if (odb_write_object(the_repository->objects, buf, size, type,
+ &obj_list[nr].oid) < 0)
die("failed to write object");
added_object(nr, type, buf, size);
free(buf);
obj_list[nr].obj = NULL;
} else if (type == OBJ_BLOB) {
struct blob *blob;
- if (write_object_file(buf, size, type,
- &obj_list[nr].oid) < 0)
+ if (odb_write_object(the_repository->objects, buf, size, type,
+ &obj_list[nr].oid) < 0)
die("failed to write object");
added_object(nr, type, buf, size);
free(buf);
@@ -403,7 +403,8 @@ static void stream_blob(unsigned long size, unsigned nr)
data.zstream = &zstream;
git_inflate_init(&zstream);
- if (stream_loose_object(&in_stream, size, &info->oid))
+ if (stream_loose_object(the_repository->objects->sources,
+ &in_stream, size, &info->oid))
die(_("failed to write object in stream"));
if (data.status != Z_STREAM_END)
@@ -449,8 +450,8 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size,
delta_data = get_data(delta_size);
if (!delta_data)
return;
- if (has_object(the_repository, &base_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, &base_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
; /* Ok we have this one */
else if (resolve_against_held(nr, &base_oid,
delta_data, delta_size))
@@ -516,8 +517,8 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size,
if (resolve_against_held(nr, &base_oid, delta_data, delta_size))
return;
- base = repo_read_object_file(the_repository, &base_oid, &type,
- &base_size);
+ base = odb_read_object(the_repository->objects, &base_oid,
+ &type, &base_size);
if (!base) {
error("failed to read delta-pack base object %s",
oid_to_hex(&base_oid));
@@ -621,7 +622,7 @@ int cmd_unpack_objects(int argc,
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
quiet = !isatty(2);
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 538b619..2380f3c 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -981,6 +981,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "assume-unchanged",
.value = &mark_valid_only,
+ .precision = sizeof(mark_valid_only),
.help = N_("mark files as \"not changing\""),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
@@ -989,6 +990,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-assume-unchanged",
.value = &mark_valid_only,
+ .precision = sizeof(mark_valid_only),
.help = N_("clear assumed-unchanged bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
@@ -997,6 +999,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "skip-worktree",
.value = &mark_skip_worktree_only,
+ .precision = sizeof(mark_skip_worktree_only),
.help = N_("mark files as \"index-only\""),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
@@ -1005,6 +1008,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-skip-worktree",
.value = &mark_skip_worktree_only,
+ .precision = sizeof(mark_skip_worktree_only),
.help = N_("clear skip-worktree bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
@@ -1079,6 +1083,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "fsmonitor-valid",
.value = &mark_fsmonitor_only,
+ .precision = sizeof(mark_fsmonitor_only),
.help = N_("mark files as fsmonitor valid"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
@@ -1087,6 +1092,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-fsmonitor-valid",
.value = &mark_fsmonitor_only,
+ .precision = sizeof(mark_fsmonitor_only),
.help = N_("clear fsmonitor valid bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
@@ -1097,7 +1103,7 @@ int cmd_update_index(int argc,
show_usage_with_options_if_asked(argc, argv,
update_index_usage, options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
prepare_repo_settings(r);
the_repository->settings.command_requires_full_index = 0;
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 2b1e336..195437e 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -3,6 +3,7 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
@@ -575,30 +576,7 @@ static void print_rejected_refs(const char *refname,
void *cb_data UNUSED)
{
struct strbuf sb = STRBUF_INIT;
- const char *reason = "";
-
- switch (err) {
- case REF_TRANSACTION_ERROR_NAME_CONFLICT:
- reason = "refname conflict";
- break;
- case REF_TRANSACTION_ERROR_CREATE_EXISTS:
- reason = "reference already exists";
- break;
- case REF_TRANSACTION_ERROR_NONEXISTENT_REF:
- reason = "reference does not exist";
- break;
- case REF_TRANSACTION_ERROR_INCORRECT_OLD_VALUE:
- reason = "incorrect old value provided";
- break;
- case REF_TRANSACTION_ERROR_INVALID_NEW_VALUE:
- reason = "invalid new value provided";
- break;
- case REF_TRANSACTION_ERROR_EXPECTED_SYMREF:
- reason = "expected symref but found regular ref";
- break;
- default:
- reason = "unkown failure";
- }
+ const char *reason = ref_transaction_error_msg(err);
strbuf_addf(&sb, "rejected %s %s %s %s\n", refname,
new_oid ? oid_to_hex(new_oid) : new_target,
@@ -792,7 +770,7 @@ int cmd_update_ref(int argc,
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_update_ref_usage,
0);
if (msg && !*msg)
diff --git a/builtin/update-server-info.c b/builtin/update-server-info.c
index ba702d3..4c12968a 100644
--- a/builtin/update-server-info.c
+++ b/builtin/update-server-info.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "server-info.h"
diff --git a/builtin/var.c b/builtin/var.c
index ada642a..a2d790d 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -11,6 +11,7 @@
#include "attr.h"
#include "config.h"
#include "editor.h"
+#include "environment.h"
#include "ident.h"
#include "pager.h"
#include "refs.h"
@@ -226,11 +227,11 @@ int cmd_var(int argc,
usage(var_usage);
if (strcmp(argv[1], "-l") == 0) {
- git_config(show_config, NULL);
+ repo_config(the_repository, show_config, NULL);
list_vars();
return 0;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
git_var = get_git_var(argv[1]);
if (!git_var)
diff --git a/builtin/verify-commit.c b/builtin/verify-commit.c
index 5f749a3..62398ac 100644
--- a/builtin/verify-commit.c
+++ b/builtin/verify-commit.c
@@ -7,6 +7,7 @@
*/
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "object-name.h"
#include "commit.h"
diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index 34e4ed7..65fd662 100644
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
@@ -1,6 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "run-command.h"
#include "parse-options.h"
@@ -81,7 +82,7 @@ int cmd_verify_pack(int argc,
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, verify_pack_options,
verify_pack_usage, 0);
if (argc < 1)
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index ed1c403..cd6bc11 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -7,6 +7,7 @@
*/
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "tag.h"
#include "object-name.h"
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 88a36ea..812774a 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -379,13 +379,13 @@ static void copy_filtered_worktree_config(const char *worktree_git_dir)
if (!git_configset_get_bool(&cs, "core.bare", &bare) &&
bare &&
- git_config_set_multivar_in_file_gently(
+ repo_config_set_multivar_in_file_gently(the_repository,
to_file, "core.bare", NULL, "true", NULL, 0))
error(_("failed to unset '%s' in '%s'"),
"core.bare", to_file);
if (!git_configset_get(&cs, "core.worktree") &&
- git_config_set_in_file_gently(to_file,
- "core.worktree", NULL, NULL))
+ repo_config_set_in_file_gently(the_repository, to_file,
+ "core.worktree", NULL, NULL))
error(_("failed to unset '%s' in '%s'"),
"core.worktree", to_file);
@@ -621,7 +621,7 @@ static void print_preparing_worktree_line(int detach,
else {
struct commit *commit = lookup_commit_reference_by_name(branch);
if (!commit)
- BUG(_("unreachable: invalid reference: %s"), branch);
+ BUG("unreachable: invalid reference: %s", branch);
fprintf_ln(stderr, _("Preparing worktree (detached HEAD %s)"),
repo_find_unique_abbrev(the_repository, &commit->object.oid, DEFAULT_ABBREV));
}
@@ -1448,7 +1448,7 @@ int cmd_worktree(int ac,
OPT_END()
};
- git_config(git_worktree_config, NULL);
+ repo_config(the_repository, git_worktree_config, NULL);
if (!prefix)
prefix = "";
diff --git a/builtin/write-tree.c b/builtin/write-tree.c
index 5a8dc37..e3bd1a4 100644
--- a/builtin/write-tree.c
+++ b/builtin/write-tree.c
@@ -6,6 +6,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "tree.h"
@@ -35,6 +36,7 @@ int cmd_write_tree(int argc,
.type = OPTION_BIT,
.long_name = "ignore-cache-tree",
.value = &flags,
+ .precision = sizeof(flags),
.help = N_("only useful for debugging"),
.flags = PARSE_OPT_HIDDEN | PARSE_OPT_NOARG,
.defval = WRITE_TREE_IGNORE_CACHE_TREE,
@@ -42,7 +44,7 @@ int cmd_write_tree(int argc,
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, cmd_prefix, write_tree_options,
write_tree_usage, 0);
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 678e2ec..b2809ab 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -17,7 +17,7 @@
#include "tmp-objdir.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
static int odb_transaction_nesting;
@@ -46,7 +46,7 @@ static void finish_tmp_packfile(struct strbuf *basename,
stage_tmp_packfiles(the_repository, basename, pack_tmp_name,
written_list, nr_written, NULL, pack_idx_opts, hash,
&idx_tmp_name);
- rename_tmp_packfile_idx(basename, &idx_tmp_name);
+ rename_tmp_packfile_idx(the_repository, basename, &idx_tmp_name);
free(idx_tmp_name);
}
@@ -130,8 +130,8 @@ static void flush_batch_fsync(void)
static int already_written(struct bulk_checkin_packfile *state, struct object_id *oid)
{
/* The object may already exist in the repository */
- if (has_object(the_repository, oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return 1;
/* Might want to keep the list sorted */
diff --git a/bundle-uri.c b/bundle-uri.c
index 9accf15..57cccfc 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -14,7 +14,7 @@
#include "fetch-pack.h"
#include "remote.h"
#include "trace2.h"
-#include "object-store.h"
+#include "odb.h"
static struct {
enum bundle_list_heuristic heuristic;
@@ -122,7 +122,7 @@ void print_bundle_list(FILE *fp, struct bundle_list *list)
int i;
for (i = 0; i < BUNDLE_HEURISTIC__COUNT; i++) {
if (heuristics[i].heuristic == list->heuristic) {
- printf("\theuristic = %s\n",
+ fprintf(fp, "\theuristic = %s\n",
heuristics[list->heuristic].name);
break;
}
@@ -278,7 +278,8 @@ static char *find_temp_filename(void)
* Find a temporary filename that is available. This is briefly
* racy, but unlikely to collide.
*/
- fd = odb_mkstemp(&name, "bundles/tmp_uri_XXXXXX");
+ fd = odb_mkstemp(the_repository->objects, &name,
+ "bundles/tmp_uri_XXXXXX");
if (fd < 0) {
warning(_("failed to create temporary file"));
return NULL;
@@ -297,6 +298,28 @@ static int download_https_uri_to_file(const char *file, const char *uri)
struct strbuf line = STRBUF_INIT;
int found_get = 0;
+ /*
+ * The protocol we speak with git-remote-https(1) uses a space to
+ * separate between URI and file, so the URI itself must not contain a
+ * space. If it did, an adversary could change the location where the
+ * downloaded file is being written to.
+ *
+ * Similarly, we use newlines to separate commands from one another.
+ * Consequently, neither the URI nor the file must contain a newline or
+ * otherwise an adversary could inject arbitrary commands.
+ *
+ * TODO: Restricting newlines in the target paths may break valid
+ * usecases, even if those are a bit more on the esoteric side.
+ * If this ever becomes a problem we should probably think about
+ * alternatives. One alternative could be to use NUL-delimited
+ * requests in git-remote-http(1). Another alternative could be
+ * to use URL quoting.
+ */
+ if (strpbrk(uri, " \n"))
+ return error("bundle-uri: URI is malformed: '%s'", file);
+ if (strchr(file, '\n'))
+ return error("bundle-uri: filename is malformed: '%s'", file);
+
strvec_pushl(&cp.args, "git-remote-https", uri, NULL);
cp.err = -1;
cp.in = -1;
diff --git a/bundle.c b/bundle.c
index b0a3fee..42327f9 100644
--- a/bundle.c
+++ b/bundle.c
@@ -7,7 +7,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "repository.h"
#include "object.h"
#include "commit.h"
@@ -95,7 +95,7 @@ int read_bundle_header_fd(int fd, struct bundle_header *header,
* by an "object-format=" capability, which is being handled in
* `parse_capability()`.
*/
- header->hash_algo = &hash_algos[GIT_HASH_SHA1];
+ header->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
/* The bundle header ends with an empty line */
while (!strbuf_getwholeline_fd(&buf, fd, '\n') &&
@@ -233,7 +233,7 @@ int verify_bundle(struct repository *r,
.quiet = 1,
};
- if (!r || !r->objects || !r->objects->odb)
+ if (!r || !r->objects || !r->objects->sources)
return error(_("need a repository to verify a bundle"));
for (i = 0; i < p->nr; i++) {
@@ -305,7 +305,7 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
if (revs->max_age == -1 && revs->min_age == -1)
goto out;
- buf = repo_read_object_file(the_repository, &tag->oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, &tag->oid, &type, &size);
if (!buf)
goto out;
line = memmem(buf, size, "\ntagger ", 8);
@@ -507,7 +507,7 @@ int create_bundle(struct repository *r, const char *path,
* SHA1.
* 2. @filter is required because we parsed an object filter.
*/
- if (the_hash_algo != &hash_algos[GIT_HASH_SHA1] || revs.filter.choice)
+ if (the_hash_algo != &hash_algos[GIT_HASH_SHA1_LEGACY] || revs.filter.choice)
min_version = 3;
if (argc > 1) {
diff --git a/cache-tree.c b/cache-tree.c
index fa3858e..66ef2be 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -10,7 +10,7 @@
#include "cache-tree.h"
#include "bulk-checkin.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "read-cache-ll.h"
#include "replace-object.h"
#include "repository.h"
@@ -239,8 +239,8 @@ int cache_tree_fully_valid(struct cache_tree *it)
if (!it)
return 0;
if (it->entry_count < 0 ||
- has_object(the_repository, &it->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ odb_has_object(the_repository->objects, &it->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return 0;
for (i = 0; i < it->subtree_nr; i++) {
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
@@ -292,8 +292,8 @@ static int update_one(struct cache_tree *it,
}
if (0 <= it->entry_count &&
- has_object(the_repository, &it->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ odb_has_object(the_repository->objects, &it->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return it->entry_count;
/*
@@ -399,8 +399,9 @@ static int update_one(struct cache_tree *it,
ce_missing_ok = mode == S_IFGITLINK || missing_ok ||
!must_check_existence(ce);
if (is_null_oid(oid) ||
- (!ce_missing_ok && !has_object(the_repository, oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))) {
+ (!ce_missing_ok &&
+ !odb_has_object(the_repository->objects, oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))) {
strbuf_release(&buffer);
if (expected_missing)
return -1;
@@ -448,16 +449,15 @@ static int update_one(struct cache_tree *it,
struct object_id oid;
hash_object_file(the_hash_algo, buffer.buf, buffer.len,
OBJ_TREE, &oid);
- if (has_object(the_repository, &oid, HAS_OBJECT_RECHECK_PACKED))
+ if (odb_has_object(the_repository->objects, &oid, HAS_OBJECT_RECHECK_PACKED))
oidcpy(&it->oid, &oid);
else
to_invalidate = 1;
} else if (dryrun) {
hash_object_file(the_hash_algo, buffer.buf, buffer.len,
OBJ_TREE, &it->oid);
- } else if (write_object_file_flags(buffer.buf, buffer.len, OBJ_TREE,
- &it->oid, NULL, flags & WRITE_TREE_SILENT
- ? WRITE_OBJECT_FILE_SILENT : 0)) {
+ } else if (odb_write_object_ext(the_repository->objects, buffer.buf, buffer.len, OBJ_TREE,
+ &it->oid, NULL, flags & WRITE_TREE_SILENT ? WRITE_OBJECT_SILENT : 0)) {
strbuf_release(&buffer);
return -1;
}
diff --git a/checkout.c b/checkout.c
index 0b1cf8b..1588b11 100644
--- a/checkout.c
+++ b/checkout.c
@@ -52,7 +52,7 @@ char *unique_tracking_name(const char *name, struct object_id *oid,
{
struct tracking_name_data cb_data = TRACKING_NAME_DATA_INIT;
const char *default_remote = NULL;
- if (!git_config_get_string_tmp("checkout.defaultremote", &default_remote))
+ if (!repo_config_get_string_tmp(the_repository, "checkout.defaultremote", &default_remote))
cb_data.default_remote = default_remote;
cb_data.src_ref = xstrfmt("refs/heads/%s", name);
cb_data.dst_oid = oid;
diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh
index dc910e5..5545e77 100755
--- a/ci/print-test-failures.sh
+++ b/ci/print-test-failures.sh
@@ -41,7 +41,7 @@
case "$CI_TYPE" in
github-actions)
mkdir -p failed-test-artifacts
- echo "FAILED_TEST_ARTIFACTS=${TEST_OUTPUT_DIRECTORY:t}/failed-test-artifacts" >>$GITHUB_ENV
+ echo "FAILED_TEST_ARTIFACTS=${TEST_OUTPUT_DIRECTORY:-t}/failed-test-artifacts" >>$GITHUB_ENV
cp "${TEST_EXIT%.exit}.out" failed-test-artifacts/
tar czf failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
continue
diff --git a/ci/run-style-check.sh b/ci/run-style-check.sh
index 6cd4b1d..0832c19 100755
--- a/ci/run-style-check.sh
+++ b/ci/run-style-check.sh
@@ -5,21 +5,5 @@
baseCommit=$1
-# Remove optional braces of control statements (if, else, for, and while)
-# according to the LLVM coding style. This avoids braces on simple
-# single-statement bodies of statements but keeps braces if one side of
-# if/else if/.../else cascade has multi-statement body.
-#
-# As this rule comes with a warning [1], we want to experiment with it
-# before adding it in-tree. since the CI job for the style check is allowed
-# to fail, appending the rule here allows us to validate its efficacy.
-# While also ensuring that end-users are not affected directly.
-#
-# [1]: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removebracesllvm
-{
- cat .clang-format
- echo "RemoveBracesLLVM: true"
-} >/tmp/clang-format-rules
-
-git clang-format --style=file:/tmp/clang-format-rules \
+git clang-format --style=file:.clang-format \
--diff --extensions c,h "$baseCommit"
diff --git a/combine-diff.c b/combine-diff.c
index dfae9f7..4ea2dc9 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -2,7 +2,7 @@
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "convert.h"
#include "diff.h"
@@ -325,7 +325,7 @@ static char *grab_blob(struct repository *r,
*size = fill_textconv(r, textconv, df, &blob);
free_filespec(df);
} else {
- blob = repo_read_object_file(r, oid, &type, size);
+ blob = odb_read_object(r->objects, oid, &type, size);
if (!blob)
die(_("unable to read %s"), oid_to_hex(oid));
if (type != OBJ_BLOB)
diff --git a/commit-graph.c b/commit-graph.c
index ad3943b..e0d92b8 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -4,6 +4,7 @@
#include "git-compat-util.h"
#include "config.h"
#include "csum-file.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
@@ -13,7 +14,7 @@
#include "refs.h"
#include "hash-lookup.h"
#include "commit-graph.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "path.h"
#include "alloc.h"
@@ -37,7 +38,7 @@ void git_test_write_commit_graph_or_die(void)
if (git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0))
flags = COMMIT_GRAPH_WRITE_BLOOM_FILTERS;
- if (write_commit_graph_reachable(the_repository->objects->odb,
+ if (write_commit_graph_reachable(the_repository->objects->sources,
flags, NULL))
die("failed to write commit-graph under GIT_TEST_COMMIT_GRAPH");
}
@@ -191,21 +192,21 @@ static int commit_gen_cmp(const void *va, const void *vb)
return 0;
}
-char *get_commit_graph_filename(struct object_directory *obj_dir)
+char *get_commit_graph_filename(struct odb_source *source)
{
- return xstrfmt("%s/info/commit-graph", obj_dir->path);
+ return xstrfmt("%s/info/commit-graph", source->path);
}
-static char *get_split_graph_filename(struct object_directory *odb,
+static char *get_split_graph_filename(struct odb_source *source,
const char *oid_hex)
{
- return xstrfmt("%s/info/commit-graphs/graph-%s.graph", odb->path,
+ return xstrfmt("%s/info/commit-graphs/graph-%s.graph", source->path,
oid_hex);
}
-char *get_commit_graph_chain_filename(struct object_directory *odb)
+char *get_commit_graph_chain_filename(struct odb_source *source)
{
- return xstrfmt("%s/info/commit-graphs/commit-graph-chain", odb->path);
+ return xstrfmt("%s/info/commit-graphs/commit-graph-chain", source->path);
}
static struct commit_graph *alloc_commit_graph(void)
@@ -250,7 +251,7 @@ int open_commit_graph(const char *graph_file, int *fd, struct stat *st)
struct commit_graph *load_commit_graph_one_fd_st(struct repository *r,
int fd, struct stat *st,
- struct object_directory *odb)
+ struct odb_source *source)
{
void *graph_map;
size_t graph_size;
@@ -269,7 +270,7 @@ struct commit_graph *load_commit_graph_one_fd_st(struct repository *r,
ret = parse_commit_graph(&r->settings, graph_map, graph_size);
if (ret)
- ret->odb = odb;
+ ret->odb_source = source;
else
munmap(graph_map, graph_size);
@@ -487,7 +488,7 @@ struct commit_graph *parse_commit_graph(struct repo_settings *s,
static struct commit_graph *load_commit_graph_one(struct repository *r,
const char *graph_file,
- struct object_directory *odb)
+ struct odb_source *source)
{
struct stat st;
@@ -498,7 +499,7 @@ static struct commit_graph *load_commit_graph_one(struct repository *r,
if (!open_ok)
return NULL;
- g = load_commit_graph_one_fd_st(r, fd, &st, odb);
+ g = load_commit_graph_one_fd_st(r, fd, &st, source);
if (g)
g->filename = xstrdup(graph_file);
@@ -507,10 +508,10 @@ static struct commit_graph *load_commit_graph_one(struct repository *r,
}
static struct commit_graph *load_commit_graph_v1(struct repository *r,
- struct object_directory *odb)
+ struct odb_source *source)
{
- char *graph_name = get_commit_graph_filename(odb);
- struct commit_graph *g = load_commit_graph_one(r, graph_name, odb);
+ char *graph_name = get_commit_graph_filename(source);
+ struct commit_graph *g = load_commit_graph_one(r, graph_name, source);
free(graph_name);
return g;
@@ -649,10 +650,10 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
count = st->st_size / (the_hash_algo->hexsz + 1);
CALLOC_ARRAY(oids, count);
- prepare_alt_odb(r);
+ odb_prepare_alternates(r->objects);
for (i = 0; i < count; i++) {
- struct object_directory *odb;
+ struct odb_source *source;
if (strbuf_getline_lf(&line, fp) == EOF)
break;
@@ -665,9 +666,9 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
}
valid = 0;
- for (odb = r->objects->odb; odb; odb = odb->next) {
- char *graph_name = get_split_graph_filename(odb, line.buf);
- struct commit_graph *g = load_commit_graph_one(r, graph_name, odb);
+ for (source = r->objects->sources; source; source = source->next) {
+ char *graph_name = get_split_graph_filename(source, line.buf);
+ struct commit_graph *g = load_commit_graph_one(r, graph_name, source);
free(graph_name);
@@ -701,9 +702,9 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
}
static struct commit_graph *load_commit_graph_chain(struct repository *r,
- struct object_directory *odb)
+ struct odb_source *source)
{
- char *chain_file = get_commit_graph_chain_filename(odb);
+ char *chain_file = get_commit_graph_chain_filename(source);
struct stat st;
int fd;
struct commit_graph *g = NULL;
@@ -719,24 +720,24 @@ static struct commit_graph *load_commit_graph_chain(struct repository *r,
}
struct commit_graph *read_commit_graph_one(struct repository *r,
- struct object_directory *odb)
+ struct odb_source *source)
{
- struct commit_graph *g = load_commit_graph_v1(r, odb);
+ struct commit_graph *g = load_commit_graph_v1(r, source);
if (!g)
- g = load_commit_graph_chain(r, odb);
+ g = load_commit_graph_chain(r, source);
return g;
}
static void prepare_commit_graph_one(struct repository *r,
- struct object_directory *odb)
+ struct odb_source *source)
{
if (r->objects->commit_graph)
return;
- r->objects->commit_graph = read_commit_graph_one(r, odb);
+ r->objects->commit_graph = read_commit_graph_one(r, source);
}
/*
@@ -747,7 +748,7 @@ static void prepare_commit_graph_one(struct repository *r,
*/
static int prepare_commit_graph(struct repository *r)
{
- struct object_directory *odb;
+ struct odb_source *source;
/*
* Early return if there is no git dir or if the commit graph is
@@ -778,11 +779,11 @@ static int prepare_commit_graph(struct repository *r)
if (!commit_graph_compatible(r))
return 0;
- prepare_alt_odb(r);
- for (odb = r->objects->odb;
- !r->objects->commit_graph && odb;
- odb = odb->next)
- prepare_commit_graph_one(r, odb);
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources;
+ !r->objects->commit_graph && source;
+ source = source->next)
+ prepare_commit_graph_one(r, source);
return !!r->objects->commit_graph;
}
@@ -829,7 +830,7 @@ struct bloom_filter_settings *get_bloom_filter_settings(struct repository *r)
return NULL;
}
-void close_commit_graph(struct raw_object_store *o)
+void close_commit_graph(struct object_database *o)
{
if (!o->commit_graph)
return;
@@ -1040,7 +1041,7 @@ struct commit *lookup_commit_in_graph(struct repository *repo, const struct obje
return NULL;
if (!search_commit_pos_in_graph(id, repo->objects->commit_graph, &pos))
return NULL;
- if (commit_graph_paranoia && !has_object(repo, id, 0))
+ if (commit_graph_paranoia && !odb_has_object(repo->objects, id, 0))
return NULL;
commit = lookup_commit(repo, id);
@@ -1137,7 +1138,7 @@ struct packed_commit_list {
struct write_commit_graph_context {
struct repository *r;
- struct object_directory *odb;
+ struct odb_source *odb_source;
char *graph_name;
struct oid_array oids;
struct packed_commit_list commits;
@@ -1862,7 +1863,7 @@ static int add_ref_to_set(const char *refname UNUSED,
if (!peel_iterated_oid(the_repository, oid, &peeled))
oid = &peeled;
- if (oid_object_info(the_repository, oid, NULL) == OBJ_COMMIT)
+ if (odb_read_object_info(the_repository->objects, oid, NULL) == OBJ_COMMIT)
oidset_insert(data->commits, oid);
display_progress(data->progress, oidset_size(data->commits));
@@ -1870,7 +1871,7 @@ static int add_ref_to_set(const char *refname UNUSED,
return 0;
}
-int write_commit_graph_reachable(struct object_directory *odb,
+int write_commit_graph_reachable(struct odb_source *source,
enum commit_graph_write_flags flags,
const struct commit_graph_opts *opts)
{
@@ -1890,7 +1891,7 @@ int write_commit_graph_reachable(struct object_directory *odb,
stop_progress(&data.progress);
- result = write_commit_graph(odb, NULL, &commits,
+ result = write_commit_graph(source, NULL, &commits,
flags, opts);
oidset_clear(&commits);
@@ -1906,7 +1907,7 @@ static int fill_oids_from_packs(struct write_commit_graph_context *ctx,
int dirlen;
int ret = 0;
- strbuf_addf(&packname, "%s/pack/", ctx->odb->path);
+ strbuf_addf(&packname, "%s/pack/", ctx->odb_source->path);
dirlen = packname.len;
if (ctx->report_progress) {
strbuf_addf(&progress_title,
@@ -2060,10 +2061,10 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
strbuf_addf(&tmp_file,
"%s/info/commit-graphs/tmp_graph_XXXXXX",
- ctx->odb->path);
+ ctx->odb_source->path);
ctx->graph_name = strbuf_detach(&tmp_file, NULL);
} else {
- ctx->graph_name = get_commit_graph_filename(ctx->odb);
+ ctx->graph_name = get_commit_graph_filename(ctx->odb_source);
}
if (safe_create_leading_directories(the_repository, ctx->graph_name)) {
@@ -2073,7 +2074,7 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
}
if (ctx->split) {
- char *lock_name = get_commit_graph_chain_filename(ctx->odb);
+ char *lock_name = get_commit_graph_chain_filename(ctx->odb_source);
hold_lock_file_for_update_mode(&lk, lock_name,
LOCK_DIE_ON_ERROR, 0444);
@@ -2161,7 +2162,7 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
if (ctx->split && ctx->base_graph_name && ctx->num_commit_graphs_after > 1) {
char *new_base_hash = xstrdup(oid_to_hex(&ctx->new_base_graph->oid));
- char *new_base_name = get_split_graph_filename(ctx->new_base_graph->odb, new_base_hash);
+ char *new_base_name = get_split_graph_filename(ctx->new_base_graph->odb_source, new_base_hash);
free(ctx->commit_graph_filenames_after[ctx->num_commit_graphs_after - 2]);
free(ctx->commit_graph_hash_after[ctx->num_commit_graphs_after - 2]);
@@ -2201,14 +2202,14 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
}
}
} else {
- char *graph_name = get_commit_graph_filename(ctx->odb);
+ char *graph_name = get_commit_graph_filename(ctx->odb_source);
unlink(graph_name);
free(graph_name);
}
free(ctx->commit_graph_hash_after[ctx->num_commit_graphs_after - 1]);
ctx->commit_graph_hash_after[ctx->num_commit_graphs_after - 1] = xstrdup(hash_to_hex(file_hash));
- final_graph_name = get_split_graph_filename(ctx->odb,
+ final_graph_name = get_split_graph_filename(ctx->odb_source,
ctx->commit_graph_hash_after[ctx->num_commit_graphs_after - 1]);
free(ctx->commit_graph_filenames_after[ctx->num_commit_graphs_after - 1]);
ctx->commit_graph_filenames_after[ctx->num_commit_graphs_after - 1] = final_graph_name;
@@ -2259,7 +2260,7 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
flags != COMMIT_GRAPH_SPLIT_REPLACE) {
while (g && (g->num_commits <= st_mult(size_mult, num_commits) ||
(max_commits && num_commits > max_commits))) {
- if (g->odb != ctx->odb)
+ if (g->odb_source != ctx->odb_source)
break;
if (unsigned_add_overflows(num_commits, g->num_commits))
@@ -2281,10 +2282,10 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
"should be 1 with --split=replace");
if (ctx->num_commit_graphs_after == 2) {
- char *old_graph_name = get_commit_graph_filename(g->odb);
+ char *old_graph_name = get_commit_graph_filename(g->odb_source);
if (!strcmp(g->filename, old_graph_name) &&
- g->odb != ctx->odb) {
+ g->odb_source != ctx->odb_source) {
ctx->num_commit_graphs_after = 1;
ctx->new_base_graph = NULL;
}
@@ -2456,13 +2457,13 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
if (ctx->opts && ctx->opts->expire_time)
expire_time = ctx->opts->expire_time;
if (!ctx->split) {
- char *chain_file_name = get_commit_graph_chain_filename(ctx->odb);
+ char *chain_file_name = get_commit_graph_chain_filename(ctx->odb_source);
unlink(chain_file_name);
free(chain_file_name);
ctx->num_commit_graphs_after = 0;
}
- strbuf_addstr(&path, ctx->odb->path);
+ strbuf_addstr(&path, ctx->odb_source->path);
strbuf_addstr(&path, "/info/commit-graphs");
dir = opendir(path.buf);
@@ -2504,7 +2505,7 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
strbuf_release(&path);
}
-int write_commit_graph(struct object_directory *odb,
+int write_commit_graph(struct odb_source *source,
const struct string_list *const pack_indexes,
struct oidset *commits,
enum commit_graph_write_flags flags,
@@ -2513,7 +2514,7 @@ int write_commit_graph(struct object_directory *odb,
struct repository *r = the_repository;
struct write_commit_graph_context ctx = {
.r = r,
- .odb = odb,
+ .odb_source = source,
.append = flags & COMMIT_GRAPH_WRITE_APPEND ? 1 : 0,
.report_progress = flags & COMMIT_GRAPH_WRITE_PROGRESS ? 1 : 0,
.split = flags & COMMIT_GRAPH_WRITE_SPLIT ? 1 : 0,
diff --git a/commit-graph.h b/commit-graph.h
index 13f6628..78ab7b8 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -1,7 +1,7 @@
#ifndef COMMIT_GRAPH_H
#define COMMIT_GRAPH_H
-#include "object-store.h"
+#include "odb.h"
#include "oidset.h"
#define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH"
@@ -26,11 +26,11 @@ void git_test_write_commit_graph_or_die(void);
struct commit;
struct bloom_filter_settings;
struct repository;
-struct raw_object_store;
+struct object_database;
struct string_list;
-char *get_commit_graph_filename(struct object_directory *odb);
-char *get_commit_graph_chain_filename(struct object_directory *odb);
+char *get_commit_graph_filename(struct odb_source *source);
+char *get_commit_graph_chain_filename(struct odb_source *source);
int open_commit_graph(const char *graph_file, int *fd, struct stat *st);
int open_commit_graph_chain(const char *chain_file, int *fd, struct stat *st);
@@ -89,7 +89,7 @@ struct commit_graph {
uint32_t num_commits;
struct object_id oid;
char *filename;
- struct object_directory *odb;
+ struct odb_source *odb_source;
uint32_t num_commits_in_base;
unsigned int read_generation_data;
@@ -115,12 +115,12 @@ struct commit_graph {
struct commit_graph *load_commit_graph_one_fd_st(struct repository *r,
int fd, struct stat *st,
- struct object_directory *odb);
+ struct odb_source *source);
struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
int fd, struct stat *st,
int *incomplete_chain);
struct commit_graph *read_commit_graph_one(struct repository *r,
- struct object_directory *odb);
+ struct odb_source *source);
struct repo_settings;
@@ -173,10 +173,10 @@ struct commit_graph_opts {
* is not compatible with the commit-graph feature, then the
* methods will return 0 without writing a commit-graph.
*/
-int write_commit_graph_reachable(struct object_directory *odb,
+int write_commit_graph_reachable(struct odb_source *source,
enum commit_graph_write_flags flags,
const struct commit_graph_opts *opts);
-int write_commit_graph(struct object_directory *odb,
+int write_commit_graph(struct odb_source *source,
const struct string_list *pack_indexes,
struct oidset *commits,
enum commit_graph_write_flags flags,
@@ -186,7 +186,7 @@ int write_commit_graph(struct object_directory *odb,
int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags);
-void close_commit_graph(struct raw_object_store *);
+void close_commit_graph(struct object_database *);
void free_commit_graph(struct commit_graph *);
/*
diff --git a/commit.c b/commit.c
index e915b2b..d1e1061 100644
--- a/commit.c
+++ b/commit.c
@@ -9,7 +9,7 @@
#include "hex.h"
#include "repository.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "utf8.h"
#include "diff.h"
#include "revision.h"
@@ -31,6 +31,7 @@
#include "parse.h"
#include "object-file.h"
#include "object-file-convert.h"
+#include "prio-queue.h"
static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **);
@@ -374,7 +375,7 @@ const void *repo_get_commit_buffer(struct repository *r,
if (!ret) {
enum object_type type;
unsigned long size;
- ret = repo_read_object_file(r, &commit->object.oid, &type, &size);
+ ret = odb_read_object(r->objects, &commit->object.oid, &type, &size);
if (!ret)
die("cannot read commit object %s",
oid_to_hex(&commit->object.oid));
@@ -575,7 +576,7 @@ int repo_parse_commit_internal(struct repository *r,
if (commit_graph_paranoia == -1)
commit_graph_paranoia = git_env_bool(GIT_COMMIT_GRAPH_PARANOIA, 0);
- if (commit_graph_paranoia && !has_object(r, &item->object.oid, 0)) {
+ if (commit_graph_paranoia && !odb_has_object(r->objects, &item->object.oid, 0)) {
unparse_commit(r, &item->object.oid);
return quiet_on_missing ? -1 :
error(_("commit %s exists in commit-graph but not in the object database"),
@@ -585,7 +586,8 @@ int repo_parse_commit_internal(struct repository *r,
return 0;
}
- if (oid_object_info_extended(r, &item->object.oid, &oi, flags) < 0)
+ if (odb_read_object_info_extended(r->objects, &item->object.oid,
+ &oi, flags) < 0)
return quiet_on_missing ? -1 :
error("Could not read %s",
oid_to_hex(&item->object.oid));
@@ -738,20 +740,27 @@ void commit_list_sort_by_date(struct commit_list **list)
commit_list_sort(list, commit_list_compare_by_date);
}
-struct commit *pop_most_recent_commit(struct commit_list **list,
+struct commit *pop_most_recent_commit(struct prio_queue *queue,
unsigned int mark)
{
- struct commit *ret = pop_commit(list);
+ struct commit *ret = prio_queue_peek(queue);
+ int get_pending = 1;
struct commit_list *parents = ret->parents;
while (parents) {
struct commit *commit = parents->item;
if (!repo_parse_commit(the_repository, commit) && !(commit->object.flags & mark)) {
commit->object.flags |= mark;
- commit_list_insert_by_date(commit, list);
+ if (get_pending)
+ prio_queue_replace(queue, commit);
+ else
+ prio_queue_put(queue, commit);
+ get_pending = 0;
}
parents = parents->next;
}
+ if (get_pending)
+ prio_queue_get(queue);
return ret;
}
@@ -1274,8 +1283,8 @@ static void handle_signed_tag(const struct commit *parent, struct commit_extra_h
desc = merge_remote_util(parent);
if (!desc || !desc->obj)
return;
- buf = repo_read_object_file(the_repository, &desc->obj->oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects, &desc->obj->oid,
+ &type, &size);
if (!buf || type != OBJ_TAG)
goto free_return;
if (!parse_signature(buf, size, &payload, &signature))
@@ -1706,7 +1715,7 @@ int commit_tree_extended(const char *msg, size_t msg_len,
/* Not having i18n.commitencoding is the same as having utf-8 */
encoding_is_utf8 = is_encoding_utf8(git_commit_encoding);
- assert_oid_type(tree, OBJ_TREE);
+ odb_assert_oid_type(the_repository->objects, tree, OBJ_TREE);
if (memchr(msg, '\0', msg_len))
return error("a NUL byte in commit log message not allowed.");
@@ -1796,8 +1805,8 @@ int commit_tree_extended(const char *msg, size_t msg_len,
compat_oid = &compat_oid_buf;
}
- result = write_object_file_flags(buffer.buf, buffer.len, OBJ_COMMIT,
- ret, compat_oid, 0);
+ result = odb_write_object_ext(the_repository->objects, buffer.buf, buffer.len,
+ OBJ_COMMIT, ret, compat_oid, 0);
out:
free(parent_buf);
strbuf_release(&buffer);
diff --git a/commit.h b/commit.h
index 70c870d..1d6e0c7 100644
--- a/commit.h
+++ b/commit.h
@@ -2,6 +2,7 @@
#define COMMIT_H
#include "object.h"
+#include "add-interactive.h"
struct signature_check;
struct strbuf;
@@ -201,10 +202,10 @@ const char *repo_logmsg_reencode(struct repository *r,
const char *skip_blank_lines(const char *msg);
-/** Removes the first commit from a list sorted by date, and adds all
- * of its parents.
- **/
-struct commit *pop_most_recent_commit(struct commit_list **list,
+struct prio_queue;
+
+/* Removes the first commit from a prio_queue and adds its parents. */
+struct commit *pop_most_recent_commit(struct prio_queue *queue,
unsigned int mark);
struct commit *pop_commit(struct commit_list **stack);
@@ -257,7 +258,7 @@ int for_each_commit_graft(each_commit_graft_fn, void *);
int interactive_add(struct repository *repo,
const char **argv,
const char *prefix,
- int patch);
+ int patch, struct add_p_opt *add_p_opt);
struct commit_extra_header {
struct commit_extra_header *next;
diff --git a/compat/bswap.h b/compat/bswap.h
index 9e0f98e..28635eb 100644
--- a/compat/bswap.h
+++ b/compat/bswap.h
@@ -32,90 +32,35 @@ static inline uint64_t default_bswap64(uint64_t val)
((val & (uint64_t)0xff00000000000000ULL) >> 56));
}
-#undef bswap32
-#undef bswap64
-
-/**
+/*
* __has_builtin is available since Clang 10 and GCC 10.
* Below is a fallback for older compilers.
*/
#ifndef __has_builtin
- #define __has_builtin(x) 0
+# define __has_builtin(x) 0
#endif
-#if __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)
-#define bswap32(x) __builtin_bswap32((x))
-#define bswap64(x) __builtin_bswap64((x))
+#undef bswap32
+#undef bswap64
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#define bswap32 git_bswap32
-static inline uint32_t git_bswap32(uint32_t x)
-{
- uint32_t result;
- if (__builtin_constant_p(x))
- result = default_swab32(x);
- else
- __asm__("bswap %0" : "=r" (result) : "0" (x));
- return result;
-}
-
-#define bswap64 git_bswap64
-#if defined(__x86_64__)
-static inline uint64_t git_bswap64(uint64_t x)
-{
- uint64_t result;
- if (__builtin_constant_p(x))
- result = default_bswap64(x);
- else
- __asm__("bswap %q0" : "=r" (result) : "0" (x));
- return result;
-}
-#else
-static inline uint64_t git_bswap64(uint64_t x)
-{
- union { uint64_t i64; uint32_t i32[2]; } tmp, result;
- if (__builtin_constant_p(x))
- result.i64 = default_bswap64(x);
- else {
- tmp.i64 = x;
- result.i32[0] = git_bswap32(tmp.i32[1]);
- result.i32[1] = git_bswap32(tmp.i32[0]);
- }
- return result.i64;
-}
-#endif
-
-#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64))
+#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64))
#include <stdlib.h>
#define bswap32(x) _byteswap_ulong(x)
#define bswap64(x) _byteswap_uint64(x)
-#endif
+#define GIT_LITTLE_ENDIAN 1234
+#define GIT_BIG_ENDIAN 4321
+#define GIT_BYTE_ORDER GIT_LITTLE_ENDIAN
-#if defined(bswap32)
+#elif __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)
-#undef ntohl
-#undef htonl
-#define ntohl(x) bswap32(x)
-#define htonl(x) bswap32(x)
+#define bswap32(x) __builtin_bswap32((x))
+#define bswap64(x) __builtin_bswap64((x))
#endif
-#if defined(bswap64)
-
-#undef ntohll
-#undef htonll
-#define ntohll(x) bswap64(x)
-#define htonll(x) bswap64(x)
-
-#else
-
-#undef ntohll
-#undef htonll
-
#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
# define GIT_BYTE_ORDER __BYTE_ORDER
@@ -128,7 +73,13 @@ static inline uint64_t git_bswap64(uint64_t x)
# define GIT_LITTLE_ENDIAN LITTLE_ENDIAN
# define GIT_BIG_ENDIAN BIG_ENDIAN
-#else
+#elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__)
+
+# define GIT_BYTE_ORDER __BYTE_ORDER__
+# define GIT_LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
+# define GIT_BIG_ENDIAN __ORDER_BIG_ENDIAN__
+
+#elif !defined(GIT_BYTE_ORDER)
# define GIT_BIG_ENDIAN 4321
# define GIT_LITTLE_ENDIAN 1234
@@ -147,14 +98,33 @@ static inline uint64_t git_bswap64(uint64_t x)
#endif
-#if GIT_BYTE_ORDER == GIT_BIG_ENDIAN
-# define ntohll(n) (n)
-# define htonll(n) (n)
-#else
-# define ntohll(n) default_bswap64(n)
-# define htonll(n) default_bswap64(n)
-#endif
+#undef ntohl
+#undef htonl
+#undef ntohll
+#undef htonll
+#if GIT_BYTE_ORDER == GIT_BIG_ENDIAN
+# define ntohl(x) (x)
+# define htonl(x) (x)
+# define ntohll(x) (x)
+# define htonll(x) (x)
+#else
+
+# if defined(bswap32)
+# define ntohl(x) bswap32(x)
+# define htonl(x) bswap32(x)
+# else
+# define ntohl(x) default_swab32(x)
+# define htonl(x) default_swab32(x)
+# endif
+
+# if defined(bswap64)
+# define ntohll(x) bswap64(x)
+# define htonll(x) bswap64(x)
+# else
+# define ntohll(x) default_bswap64(x)
+# define htonll(x) default_bswap64(x)
+# endif
#endif
static inline uint16_t get_be16(const void *ptr)
diff --git a/compat/mingw-posix.h b/compat/mingw-posix.h
index 88e0cf9..631a208 100644
--- a/compat/mingw-posix.h
+++ b/compat/mingw-posix.h
@@ -96,6 +96,7 @@ struct sigaction {
unsigned sa_flags;
};
#define SA_RESTART 0
+#define SA_NOCLDSTOP 1
struct itimerval {
struct timeval it_value, it_interval;
diff --git a/compat/mingw.c b/compat/mingw.c
index 8a9972a..8538e3d 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -244,7 +244,6 @@ enum hide_dotfiles_type {
HIDE_DOTFILES_DOTGITONLY
};
-static int core_restrict_inherited_handles = -1;
static enum hide_dotfiles_type hide_dotfiles = HIDE_DOTFILES_DOTGITONLY;
static char *unset_environment_variables;
@@ -268,15 +267,6 @@ int mingw_core_config(const char *var, const char *value,
return 0;
}
- if (!strcmp(var, "core.restrictinheritedhandles")) {
- if (value && !strcasecmp(value, "auto"))
- core_restrict_inherited_handles = -1;
- else
- core_restrict_inherited_handles =
- git_config_bool(var, value);
- return 0;
- }
-
return 0;
}
@@ -588,13 +578,24 @@ static int mingw_open_existing(const wchar_t *filename, int oflags, ...)
&security_attributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle == INVALID_HANDLE_VALUE) {
DWORD err = GetLastError();
+ if (err == ERROR_ACCESS_DENIED) {
+ DWORD attrs = GetFileAttributesW(filename);
+ if (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))
+ handle = CreateFileW(filename, access,
+ FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
+ &security_attributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL| FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ }
- /* See `mingw_open_append()` for why we have this conversion. */
- if (err == ERROR_INVALID_PARAMETER)
- err = ERROR_PATH_NOT_FOUND;
+ if (handle == INVALID_HANDLE_VALUE) {
+ err = GetLastError();
- errno = err_win_to_posix(err);
- return -1;
+ /* See `mingw_open_append()` for why we have this conversion. */
+ if (err == ERROR_INVALID_PARAMETER)
+ err = ERROR_PATH_NOT_FOUND;
+
+ errno = err_win_to_posix(err);
+ return -1;
+ }
}
fd = _open_osfhandle((intptr_t)handle, oflags | O_BINARY);
@@ -1656,7 +1657,6 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
const char *dir,
int prepend_cmd, int fhin, int fhout, int fherr)
{
- static int restrict_handle_inheritance = -1;
STARTUPINFOEXW si;
PROCESS_INFORMATION pi;
LPPROC_THREAD_ATTRIBUTE_LIST attr_list = NULL;
@@ -1676,16 +1676,6 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
/* Make sure to override previous errors, if any */
errno = 0;
- if (restrict_handle_inheritance < 0)
- restrict_handle_inheritance = core_restrict_inherited_handles;
- /*
- * The following code to restrict which handles are inherited seems
- * to work properly only on Windows 7 and later, so let's disable it
- * on Windows Vista and 2008.
- */
- if (restrict_handle_inheritance < 0)
- restrict_handle_inheritance = GetVersion() >> 16 >= 7601;
-
do_unset_environment_variables();
/* Determine whether or not we are associated to a console */
@@ -1787,7 +1777,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
wenvblk = make_environment_block(deltaenv);
memset(&pi, 0, sizeof(pi));
- if (restrict_handle_inheritance && stdhandles_count &&
+ if (stdhandles_count &&
(InitializeProcThreadAttributeList(NULL, 1, 0, &size) ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER) &&
(attr_list = (LPPROC_THREAD_ATTRIBUTE_LIST)
@@ -1808,52 +1798,13 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
&si.StartupInfo, &pi);
/*
- * On Windows 2008 R2, it seems that specifying certain types of handles
- * (such as FILE_TYPE_CHAR or FILE_TYPE_PIPE) will always produce an
- * error. Rather than playing finicky and fragile games, let's just try
- * to detect this situation and simply try again without restricting any
- * handle inheritance. This is still better than failing to create
- * processes.
+ * On the off-chance that something with the file handle restriction
+ * went wrong, silently fall back to trying without it.
*/
- if (!ret && restrict_handle_inheritance && stdhandles_count) {
+ if (!ret && stdhandles_count) {
DWORD err = GetLastError();
struct strbuf buf = STRBUF_INIT;
- if (err != ERROR_NO_SYSTEM_RESOURCES &&
- /*
- * On Windows 7 and earlier, handles on pipes and character
- * devices are inherited automatically, and cannot be
- * specified in the thread handle list. Rather than trying
- * to catch each and every corner case (and running the
- * chance of *still* forgetting a few), let's just fall
- * back to creating the process without trying to limit the
- * handle inheritance.
- */
- !(err == ERROR_INVALID_PARAMETER &&
- GetVersion() >> 16 < 9200) &&
- !getenv("SUPPRESS_HANDLE_INHERITANCE_WARNING")) {
- DWORD fl = 0;
- int i;
-
- setenv("SUPPRESS_HANDLE_INHERITANCE_WARNING", "1", 1);
-
- for (i = 0; i < stdhandles_count; i++) {
- HANDLE h = stdhandles[i];
- strbuf_addf(&buf, "handle #%d: %p (type %lx, "
- "handle info (%d) %lx\n", i, h,
- GetFileType(h),
- GetHandleInformation(h, &fl),
- fl);
- }
- strbuf_addstr(&buf, "\nThis is a bug; please report it "
- "at\nhttps://github.com/git-for-windows/"
- "git/issues/new\n\n"
- "To suppress this warning, please set "
- "the environment variable\n\n"
- "\tSUPPRESS_HANDLE_INHERITANCE_WARNING=1"
- "\n");
- }
- restrict_handle_inheritance = 0;
flags &= ~EXTENDED_STARTUPINFO_PRESENT;
ret = CreateProcessW(*wcmd ? wcmd : NULL, wargs, NULL, NULL,
TRUE, flags, wenvblk, dir ? wdir : NULL,
@@ -2326,7 +2277,9 @@ int mingw_rename(const char *pold, const char *pnew)
* current system doesn't support FileRenameInfoEx. Keep us
* from using it in future calls and retry.
*/
- if (gle == ERROR_INVALID_PARAMETER) {
+ if (gle == ERROR_INVALID_PARAMETER ||
+ gle == ERROR_NOT_SUPPORTED ||
+ gle == ERROR_INVALID_FUNCTION) {
supports_file_rename_info_ex = 0;
goto repeat;
}
@@ -2561,7 +2514,9 @@ int setitimer(int type UNUSED, struct itimerval *in, struct itimerval *out)
int sigaction(int sig, struct sigaction *in, struct sigaction *out)
{
- if (sig != SIGALRM)
+ if (sig == SIGCHLD)
+ return -1;
+ else if (sig != SIGALRM)
return errno = EINVAL,
error("sigaction only implemented for SIGALRM");
if (out)
diff --git a/compat/posix.h b/compat/posix.h
index f4c71f9..067a00f 100644
--- a/compat/posix.h
+++ b/compat/posix.h
@@ -60,11 +60,11 @@
# else
# define _XOPEN_SOURCE 500
# endif
-#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
- !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
- !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \
- !defined(__CYGWIN__)
-#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
+#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \
+ !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__MirBSD__) && \
+ !defined(__USLC__) && !defined(_M_UNIX) && !defined(__sgi) && \
+ !defined(__TANDEM) && !defined(__QNX__) && !defined(__CYGWIN__)
+#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500 */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
#define _ALL_SOURCE 1
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 12e38e0..43b3be0 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -56,8 +56,8 @@ void probe_utf8_pathname_composition(void)
close(output_fd);
repo_git_path_replace(the_repository, &path, "%s", auml_nfd);
precomposed_unicode = access(path.buf, R_OK) ? 0 : 1;
- git_config_set("core.precomposeunicode",
- precomposed_unicode ? "true" : "false");
+ repo_config_set(the_repository, "core.precomposeunicode",
+ precomposed_unicode ? "true" : "false");
repo_git_path_replace(the_repository, &path, "%s", auml_nfc);
if (unlink(path.buf))
die_errno(_("failed to unlink '%s'"), path.buf);
@@ -75,7 +75,7 @@ const char *precompose_string_if_needed(const char *in)
iconv_t ic_prec;
char *out;
if (precomposed_unicode < 0)
- git_config_get_bool("core.precomposeunicode", &precomposed_unicode);
+ repo_config_get_bool(the_repository, "core.precomposeunicode", &precomposed_unicode);
if (precomposed_unicode != 1)
return in;
ic_prec = iconv_open(repo_encoding, path_encoding);
diff --git a/config.c b/config.c
index b18b561..97ffef4 100644
--- a/config.c
+++ b/config.c
@@ -6,12 +6,8 @@
*
*/
-#define USE_THE_REPOSITORY_VARIABLE
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
#include "git-compat-util.h"
#include "abspath.h"
-#include "advice.h"
#include "date.h"
#include "branch.h"
#include "config.h"
@@ -20,19 +16,15 @@
#include "environment.h"
#include "gettext.h"
#include "git-zlib.h"
-#include "ident.h"
#include "repository.h"
#include "lockfile.h"
-#include "mailmap.h"
-#include "attr.h"
#include "exec-cmd.h"
#include "strbuf.h"
#include "quote.h"
#include "hashmap.h"
#include "string-list.h"
#include "object-name.h"
-#include "object-store.h"
-#include "pager.h"
+#include "odb.h"
#include "path.h"
#include "utf8.h"
#include "color.h"
@@ -41,7 +33,6 @@
#include "strvec.h"
#include "trace2.h"
#include "wildmatch.h"
-#include "ws.h"
#include "write-or-die.h"
struct config_source {
@@ -56,7 +47,6 @@ struct config_source {
} u;
enum config_origin_type origin_type;
const char *name;
- const char *path;
enum config_error_action default_error_action;
int linenr;
int eof;
@@ -71,9 +61,6 @@ struct config_source {
};
#define CONFIG_SOURCE_INIT { 0 }
-static int pack_compression_seen;
-static int zlib_compression_seen;
-
/*
* Config that comes from trusted scopes, namely:
* - CONFIG_SCOPE_SYSTEM (e.g. /etc/gitconfig)
@@ -173,14 +160,14 @@ static int handle_path_include(const struct key_value_info *kvi,
if (!is_absolute_path(path)) {
char *slash;
- if (!kvi || !kvi->path) {
+ if (!kvi || kvi->origin_type != CONFIG_ORIGIN_FILE) {
ret = error(_("relative config includes must come from files"));
goto cleanup;
}
- slash = find_last_dir_sep(kvi->path);
+ slash = find_last_dir_sep(kvi->filename);
if (slash)
- strbuf_add(&buf, kvi->path, slash - kvi->path + 1);
+ strbuf_add(&buf, kvi->filename, slash - kvi->filename + 1);
strbuf_addstr(&buf, path);
path = buf.buf;
}
@@ -208,11 +195,12 @@ static void add_trailing_starstar_for_dir(struct strbuf *pat)
}
static int prepare_include_condition_pattern(const struct key_value_info *kvi,
- struct strbuf *pat)
+ struct strbuf *pat,
+ size_t *out)
{
struct strbuf path = STRBUF_INIT;
char *expanded;
- int prefix = 0;
+ size_t prefix = 0;
expanded = interpolate_path(pat->buf, 1);
if (expanded) {
@@ -224,11 +212,11 @@ static int prepare_include_condition_pattern(const struct key_value_info *kvi,
if (pat->buf[0] == '.' && is_dir_sep(pat->buf[1])) {
const char *slash;
- if (!kvi || !kvi->path)
+ if (!kvi || kvi->origin_type != CONFIG_ORIGIN_FILE)
return error(_("relative config include "
"conditionals must come from files"));
- strbuf_realpath(&path, kvi->path, 1);
+ strbuf_realpath(&path, kvi->filename, 1);
slash = find_last_dir_sep(path.buf);
if (!slash)
BUG("how is this possible?");
@@ -239,8 +227,10 @@ static int prepare_include_condition_pattern(const struct key_value_info *kvi,
add_trailing_starstar_for_dir(pat);
+ *out = prefix;
+
strbuf_release(&path);
- return prefix;
+ return 0;
}
static int include_by_gitdir(const struct key_value_info *kvi,
@@ -249,7 +239,8 @@ static int include_by_gitdir(const struct key_value_info *kvi,
{
struct strbuf text = STRBUF_INIT;
struct strbuf pattern = STRBUF_INIT;
- int ret = 0, prefix;
+ size_t prefix;
+ int ret = 0;
const char *git_dir;
int already_tried_absolute = 0;
@@ -260,12 +251,11 @@ static int include_by_gitdir(const struct key_value_info *kvi,
strbuf_realpath(&text, git_dir, 1);
strbuf_add(&pattern, cond, cond_len);
- prefix = prepare_include_condition_pattern(kvi, &pattern);
-
-again:
- if (prefix < 0)
+ ret = prepare_include_condition_pattern(kvi, &pattern, &prefix);
+ if (ret < 0)
goto done;
+again:
if (prefix > 0) {
/*
* perform literal matching on the prefix part so that
@@ -633,7 +623,6 @@ void kvi_from_param(struct key_value_info *out)
out->linenr = -1;
out->origin_type = CONFIG_ORIGIN_CMDLINE;
out->scope = CONFIG_SCOPE_COMMAND;
- out->path = NULL;
}
int git_config_parse_parameter(const char *text,
@@ -734,7 +723,6 @@ int git_config_from_parameters(config_fn_t fn, void *data)
if (env) {
unsigned long count;
char *endp;
- int i;
count = strtoul(env, &endp, 10);
if (*endp) {
@@ -746,10 +734,10 @@ int git_config_from_parameters(config_fn_t fn, void *data)
goto out;
}
- for (i = 0; i < count; i++) {
+ for (unsigned long i = 0; i < count; i++) {
const char *key, *value;
- strbuf_addf(&envvar, "GIT_CONFIG_KEY_%d", i);
+ strbuf_addf(&envvar, "GIT_CONFIG_KEY_%lu", i);
key = getenv_safe(&to_free, envvar.buf);
if (!key) {
ret = error(_("missing config key %s"), envvar.buf);
@@ -757,7 +745,7 @@ int git_config_from_parameters(config_fn_t fn, void *data)
}
strbuf_reset(&envvar);
- strbuf_addf(&envvar, "GIT_CONFIG_VALUE_%d", i);
+ strbuf_addf(&envvar, "GIT_CONFIG_VALUE_%lu", i);
value = getenv_safe(&to_free, envvar.buf);
if (!value) {
ret = error(_("missing config value %s"), envvar.buf);
@@ -1036,7 +1024,6 @@ static void kvi_from_source(struct config_source *cs,
out->origin_type = cs->origin_type;
out->linenr = cs->linenr;
out->scope = scope;
- out->path = cs->path;
}
static int git_parse_source(struct config_source *cs, config_fn_t fn,
@@ -1262,80 +1249,6 @@ double git_config_double(const char *name, const char *value,
return ret;
}
-static const struct fsync_component_name {
- const char *name;
- enum fsync_component component_bits;
-} fsync_component_names[] = {
- { "loose-object", FSYNC_COMPONENT_LOOSE_OBJECT },
- { "pack", FSYNC_COMPONENT_PACK },
- { "pack-metadata", FSYNC_COMPONENT_PACK_METADATA },
- { "commit-graph", FSYNC_COMPONENT_COMMIT_GRAPH },
- { "index", FSYNC_COMPONENT_INDEX },
- { "objects", FSYNC_COMPONENTS_OBJECTS },
- { "reference", FSYNC_COMPONENT_REFERENCE },
- { "derived-metadata", FSYNC_COMPONENTS_DERIVED_METADATA },
- { "committed", FSYNC_COMPONENTS_COMMITTED },
- { "added", FSYNC_COMPONENTS_ADDED },
- { "all", FSYNC_COMPONENTS_ALL },
-};
-
-static enum fsync_component parse_fsync_components(const char *var, const char *string)
-{
- enum fsync_component current = FSYNC_COMPONENTS_PLATFORM_DEFAULT;
- enum fsync_component positive = 0, negative = 0;
-
- while (string) {
- int i;
- size_t len;
- const char *ep;
- int negated = 0;
- int found = 0;
-
- string = string + strspn(string, ", \t\n\r");
- ep = strchrnul(string, ',');
- len = ep - string;
- if (!strcmp(string, "none")) {
- current = FSYNC_COMPONENT_NONE;
- goto next_name;
- }
-
- if (*string == '-') {
- negated = 1;
- string++;
- len--;
- if (!len)
- warning(_("invalid value for variable %s"), var);
- }
-
- if (!len)
- break;
-
- for (i = 0; i < ARRAY_SIZE(fsync_component_names); ++i) {
- const struct fsync_component_name *n = &fsync_component_names[i];
-
- if (strncmp(n->name, string, len))
- continue;
-
- found = 1;
- if (negated)
- negative |= n->component_bits;
- else
- positive |= n->component_bits;
- }
-
- if (!found) {
- char *component = xstrndup(string, len);
- warning(_("ignoring unknown core.fsync component '%s'"), component);
- free(component);
- }
-
-next_name:
- string = ep;
- }
-
- return (current & ~negative) | positive;
-}
-
int git_config_bool_or_int(const char *name, const char *value,
const struct key_value_info *kvi, int *is_bool)
{
@@ -1393,438 +1306,6 @@ int git_config_color(char *dest, const char *var, const char *value)
return 0;
}
-static int git_default_core_config(const char *var, const char *value,
- const struct config_context *ctx, void *cb)
-{
- /* This needs a better name */
- if (!strcmp(var, "core.filemode")) {
- trust_executable_bit = git_config_bool(var, value);
- return 0;
- }
- if (!strcmp(var, "core.trustctime")) {
- trust_ctime = git_config_bool(var, value);
- return 0;
- }
- if (!strcmp(var, "core.checkstat")) {
- if (!value)
- return config_error_nonbool(var);
- if (!strcasecmp(value, "default"))
- check_stat = 1;
- else if (!strcasecmp(value, "minimal"))
- check_stat = 0;
- else
- return error(_("invalid value for '%s': '%s'"),
- var, value);
- }
-
- if (!strcmp(var, "core.quotepath")) {
- quote_path_fully = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.symlinks")) {
- has_symlinks = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.ignorecase")) {
- ignore_case = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.attributesfile")) {
- FREE_AND_NULL(git_attributes_file);
- return git_config_pathname(&git_attributes_file, var, value);
- }
-
- if (!strcmp(var, "core.bare")) {
- is_bare_repository_cfg = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.ignorestat")) {
- assume_unchanged = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.abbrev")) {
- if (!value)
- return config_error_nonbool(var);
- if (!strcasecmp(value, "auto"))
- default_abbrev = -1;
- else if (!git_parse_maybe_bool_text(value))
- default_abbrev = GIT_MAX_HEXSZ;
- else {
- int abbrev = git_config_int(var, value, ctx->kvi);
- if (abbrev < minimum_abbrev)
- return error(_("abbrev length out of range: %d"), abbrev);
- default_abbrev = abbrev;
- }
- return 0;
- }
-
- if (!strcmp(var, "core.disambiguate"))
- return set_disambiguate_hint_config(var, value);
-
- if (!strcmp(var, "core.loosecompression")) {
- int level = git_config_int(var, value, ctx->kvi);
- if (level == -1)
- level = Z_DEFAULT_COMPRESSION;
- else if (level < 0 || level > Z_BEST_COMPRESSION)
- die(_("bad zlib compression level %d"), level);
- zlib_compression_level = level;
- zlib_compression_seen = 1;
- return 0;
- }
-
- if (!strcmp(var, "core.compression")) {
- int level = git_config_int(var, value, ctx->kvi);
- if (level == -1)
- level = Z_DEFAULT_COMPRESSION;
- else if (level < 0 || level > Z_BEST_COMPRESSION)
- die(_("bad zlib compression level %d"), level);
- if (!zlib_compression_seen)
- zlib_compression_level = level;
- if (!pack_compression_seen)
- pack_compression_level = level;
- return 0;
- }
-
- if (!strcmp(var, "core.autocrlf")) {
- if (value && !strcasecmp(value, "input")) {
- auto_crlf = AUTO_CRLF_INPUT;
- return 0;
- }
- auto_crlf = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.safecrlf")) {
- int eol_rndtrp_die;
- if (value && !strcasecmp(value, "warn")) {
- global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
- return 0;
- }
- eol_rndtrp_die = git_config_bool(var, value);
- global_conv_flags_eol = eol_rndtrp_die ?
- CONV_EOL_RNDTRP_DIE : 0;
- return 0;
- }
-
- if (!strcmp(var, "core.eol")) {
- if (value && !strcasecmp(value, "lf"))
- core_eol = EOL_LF;
- else if (value && !strcasecmp(value, "crlf"))
- core_eol = EOL_CRLF;
- else if (value && !strcasecmp(value, "native"))
- core_eol = EOL_NATIVE;
- else
- core_eol = EOL_UNSET;
- return 0;
- }
-
- if (!strcmp(var, "core.checkroundtripencoding")) {
- FREE_AND_NULL(check_roundtrip_encoding);
- return git_config_string(&check_roundtrip_encoding, var, value);
- }
-
- if (!strcmp(var, "core.editor")) {
- FREE_AND_NULL(editor_program);
- return git_config_string(&editor_program, var, value);
- }
-
- if (!strcmp(var, "core.commentchar") ||
- !strcmp(var, "core.commentstring")) {
- if (!value)
- return config_error_nonbool(var);
- else if (!strcasecmp(value, "auto"))
- auto_comment_line_char = 1;
- else if (value[0]) {
- if (strchr(value, '\n'))
- return error(_("%s cannot contain newline"), var);
- comment_line_str = value;
- FREE_AND_NULL(comment_line_str_to_free);
- auto_comment_line_char = 0;
- } else
- return error(_("%s must have at least one character"), var);
- return 0;
- }
-
- if (!strcmp(var, "core.askpass")) {
- FREE_AND_NULL(askpass_program);
- return git_config_string(&askpass_program, var, value);
- }
-
- if (!strcmp(var, "core.excludesfile")) {
- FREE_AND_NULL(excludes_file);
- return git_config_pathname(&excludes_file, var, value);
- }
-
- if (!strcmp(var, "core.whitespace")) {
- if (!value)
- return config_error_nonbool(var);
- whitespace_rule_cfg = parse_whitespace_rule(value);
- return 0;
- }
-
- if (!strcmp(var, "core.fsync")) {
- if (!value)
- return config_error_nonbool(var);
- fsync_components = parse_fsync_components(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.fsyncmethod")) {
- if (!value)
- return config_error_nonbool(var);
- if (!strcmp(value, "fsync"))
- fsync_method = FSYNC_METHOD_FSYNC;
- else if (!strcmp(value, "writeout-only"))
- fsync_method = FSYNC_METHOD_WRITEOUT_ONLY;
- else if (!strcmp(value, "batch"))
- fsync_method = FSYNC_METHOD_BATCH;
- else
- warning(_("ignoring unknown core.fsyncMethod value '%s'"), value);
-
- }
-
- if (!strcmp(var, "core.fsyncobjectfiles")) {
- if (fsync_object_files < 0)
- warning(_("core.fsyncObjectFiles is deprecated; use core.fsync instead"));
- fsync_object_files = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.preloadindex")) {
- core_preload_index = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.createobject")) {
- if (!value)
- return config_error_nonbool(var);
- if (!strcmp(value, "rename"))
- object_creation_mode = OBJECT_CREATION_USES_RENAMES;
- else if (!strcmp(value, "link"))
- object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
- else
- die(_("invalid mode for object creation: %s"), value);
- return 0;
- }
-
- if (!strcmp(var, "core.sparsecheckout")) {
- core_apply_sparse_checkout = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.sparsecheckoutcone")) {
- core_sparse_checkout_cone = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.precomposeunicode")) {
- precomposed_unicode = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.protecthfs")) {
- protect_hfs = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.protectntfs")) {
- protect_ntfs = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "core.maxtreedepth")) {
- max_allowed_tree_depth = git_config_int(var, value, ctx->kvi);
- return 0;
- }
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return platform_core_config(var, value, ctx, cb);
-}
-
-static int git_default_sparse_config(const char *var, const char *value)
-{
- if (!strcmp(var, "sparse.expectfilesoutsideofpatterns")) {
- sparse_expect_files_outside_of_patterns = git_config_bool(var, value);
- return 0;
- }
-
- /* Add other config variables here and to Documentation/config/sparse.adoc. */
- return 0;
-}
-
-static int git_default_i18n_config(const char *var, const char *value)
-{
- if (!strcmp(var, "i18n.commitencoding")) {
- FREE_AND_NULL(git_commit_encoding);
- return git_config_string(&git_commit_encoding, var, value);
- }
-
- if (!strcmp(var, "i18n.logoutputencoding")) {
- FREE_AND_NULL(git_log_output_encoding);
- return git_config_string(&git_log_output_encoding, var, value);
- }
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return 0;
-}
-
-static int git_default_branch_config(const char *var, const char *value)
-{
- if (!strcmp(var, "branch.autosetupmerge")) {
- if (value && !strcmp(value, "always")) {
- git_branch_track = BRANCH_TRACK_ALWAYS;
- return 0;
- } else if (value && !strcmp(value, "inherit")) {
- git_branch_track = BRANCH_TRACK_INHERIT;
- return 0;
- } else if (value && !strcmp(value, "simple")) {
- git_branch_track = BRANCH_TRACK_SIMPLE;
- return 0;
- }
- git_branch_track = git_config_bool(var, value);
- return 0;
- }
- if (!strcmp(var, "branch.autosetuprebase")) {
- if (!value)
- return config_error_nonbool(var);
- else if (!strcmp(value, "never"))
- autorebase = AUTOREBASE_NEVER;
- else if (!strcmp(value, "local"))
- autorebase = AUTOREBASE_LOCAL;
- else if (!strcmp(value, "remote"))
- autorebase = AUTOREBASE_REMOTE;
- else if (!strcmp(value, "always"))
- autorebase = AUTOREBASE_ALWAYS;
- else
- return error(_("malformed value for %s"), var);
- return 0;
- }
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return 0;
-}
-
-static int git_default_push_config(const char *var, const char *value)
-{
- if (!strcmp(var, "push.default")) {
- if (!value)
- return config_error_nonbool(var);
- else if (!strcmp(value, "nothing"))
- push_default = PUSH_DEFAULT_NOTHING;
- else if (!strcmp(value, "matching"))
- push_default = PUSH_DEFAULT_MATCHING;
- else if (!strcmp(value, "simple"))
- push_default = PUSH_DEFAULT_SIMPLE;
- else if (!strcmp(value, "upstream"))
- push_default = PUSH_DEFAULT_UPSTREAM;
- else if (!strcmp(value, "tracking")) /* deprecated */
- push_default = PUSH_DEFAULT_UPSTREAM;
- else if (!strcmp(value, "current"))
- push_default = PUSH_DEFAULT_CURRENT;
- else {
- error(_("malformed value for %s: %s"), var, value);
- return error(_("must be one of nothing, matching, simple, "
- "upstream or current"));
- }
- return 0;
- }
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return 0;
-}
-
-static int git_default_mailmap_config(const char *var, const char *value)
-{
- if (!strcmp(var, "mailmap.file")) {
- FREE_AND_NULL(git_mailmap_file);
- return git_config_pathname(&git_mailmap_file, var, value);
- }
-
- if (!strcmp(var, "mailmap.blob")) {
- FREE_AND_NULL(git_mailmap_blob);
- return git_config_string(&git_mailmap_blob, var, value);
- }
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return 0;
-}
-
-static int git_default_attr_config(const char *var, const char *value)
-{
- if (!strcmp(var, "attr.tree")) {
- FREE_AND_NULL(git_attr_tree);
- return git_config_string(&git_attr_tree, var, value);
- }
-
- /*
- * Add other attribute related config variables here and to
- * Documentation/config/attr.adoc.
- */
- return 0;
-}
-
-int git_default_config(const char *var, const char *value,
- const struct config_context *ctx, void *cb)
-{
- if (starts_with(var, "core."))
- return git_default_core_config(var, value, ctx, cb);
-
- if (starts_with(var, "user.") ||
- starts_with(var, "author.") ||
- starts_with(var, "committer."))
- return git_ident_config(var, value, ctx, cb);
-
- if (starts_with(var, "i18n."))
- return git_default_i18n_config(var, value);
-
- if (starts_with(var, "branch."))
- return git_default_branch_config(var, value);
-
- if (starts_with(var, "push."))
- return git_default_push_config(var, value);
-
- if (starts_with(var, "mailmap."))
- return git_default_mailmap_config(var, value);
-
- if (starts_with(var, "attr."))
- return git_default_attr_config(var, value);
-
- if (starts_with(var, "advice.") || starts_with(var, "color.advice"))
- return git_default_advice_config(var, value);
-
- if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
- pager_use_color = git_config_bool(var,value);
- return 0;
- }
-
- if (!strcmp(var, "pack.packsizelimit")) {
- pack_size_limit_cfg = git_config_ulong(var, value, ctx->kvi);
- return 0;
- }
-
- if (!strcmp(var, "pack.compression")) {
- int level = git_config_int(var, value, ctx->kvi);
- 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;
- pack_compression_seen = 1;
- return 0;
- }
-
- if (starts_with(var, "sparse."))
- return git_default_sparse_config(var, value);
-
- /* Add other config variables here and to Documentation/config.adoc. */
- return 0;
-}
-
/*
* All source specific fields in the union, die_on_error, name and the callbacks
* fgetc, ungetc, ftell of top need to be initialized before calling
@@ -1855,17 +1336,19 @@ static int do_config_from(struct config_source *top, config_fn_t fn,
static int do_config_from_file(config_fn_t fn,
const enum config_origin_type origin_type,
- const char *name, const char *path, FILE *f,
- void *data, enum config_scope scope,
+ const char *name, FILE *f, void *data,
+ enum config_scope scope,
const struct config_options *opts)
{
struct config_source top = CONFIG_SOURCE_INIT;
int ret;
+ if (origin_type == CONFIG_ORIGIN_FILE && (!name || !*name))
+ BUG("missing filename for CONFIG_ORIGIN_FILE");
+
top.u.file = f;
top.origin_type = origin_type;
top.name = name;
- top.path = path;
top.default_error_action = CONFIG_ERROR_DIE;
top.do_fgetc = config_file_fgetc;
top.do_ungetc = config_file_ungetc;
@@ -1880,8 +1363,8 @@ static int do_config_from_file(config_fn_t fn,
static int git_config_from_stdin(config_fn_t fn, void *data,
enum config_scope scope)
{
- return do_config_from_file(fn, CONFIG_ORIGIN_STDIN, "", NULL, stdin,
- data, scope, NULL);
+ return do_config_from_file(fn, CONFIG_ORIGIN_STDIN, "", stdin, data,
+ scope, NULL);
}
int git_config_from_file_with_options(config_fn_t fn, const char *filename,
@@ -1896,7 +1379,7 @@ int git_config_from_file_with_options(config_fn_t fn, const char *filename,
f = fopen_or_warn(filename, "r");
if (f) {
ret = do_config_from_file(fn, CONFIG_ORIGIN_FILE, filename,
- filename, f, data, scope, opts);
+ f, data, scope, opts);
fclose(f);
}
return ret;
@@ -1921,7 +1404,6 @@ int git_config_from_mem(config_fn_t fn,
top.u.buf.pos = 0;
top.origin_type = origin_type;
top.name = name;
- top.path = NULL;
top.default_error_action = CONFIG_ERROR_ERROR;
top.do_fgetc = config_buf_fgetc;
top.do_ungetc = config_buf_ungetc;
@@ -1942,7 +1424,7 @@ int git_config_from_blob_oid(config_fn_t fn,
unsigned long size;
int ret;
- buf = repo_read_object_file(repo, oid, &type, &size);
+ buf = odb_read_object(repo->objects, oid, &type, &size);
if (!buf)
return error(_("unable to load config blob object '%s'"), name);
if (type != OBJ_BLOB) {
@@ -2130,13 +1612,13 @@ int config_with_options(config_fn_t fn, void *data,
static void configset_iter(struct config_set *set, config_fn_t fn, void *data)
{
- int i, value_index;
+ int value_index;
struct string_list *values;
struct config_set_element *entry;
struct configset_list *list = &set->list;
struct config_context ctx = CONFIG_CONTEXT_INIT;
- for (i = 0; i < list->nr; i++) {
+ for (size_t i = 0; i < list->nr; i++) {
entry = list->items[i].e;
value_index = list->items[i].value_index;
values = &entry->value_list;
@@ -2753,7 +2235,7 @@ void git_die_config(struct repository *r, const char *key, const char *err, ...)
}
/*
- * Find all the stuff for git_config_set() below.
+ * Find all the stuff for repo_config_set() below.
*/
struct config_store_data {
@@ -2940,7 +2422,7 @@ static ssize_t write_pair(int fd, const char *key, const char *value,
if (value[0] == ' ')
quote = "\"";
for (i = 0; value[i]; i++)
- if (value[i] == ';' || value[i] == '#')
+ if (value[i] == ';' || value[i] == '#' || value[i] == '\r')
quote = "\"";
if (i && value[i - 1] == ' ')
quote = "\"";
@@ -2986,10 +2468,11 @@ static ssize_t write_pair(int fd, const char *key, const char *value,
*/
static void maybe_remove_section(struct config_store_data *store,
size_t *begin_offset, size_t *end_offset,
- int *seen_ptr)
+ unsigned *seen_ptr)
{
size_t begin;
- int i, seen, section_seen = 0;
+ int section_seen = 0;
+ unsigned int i, seen;
/*
* First, ensure that this is the first key, and that there are no
@@ -3232,7 +2715,8 @@ int repo_config_set_multivar_in_file_gently(struct repository *r,
} else {
struct stat st;
size_t copy_begin, copy_end;
- int i, new_line = 0;
+ unsigned i;
+ int new_line = 0;
struct config_options opts;
if (!value_pattern)
diff --git a/config.h b/config.h
index 29a0277..19c87fc 100644
--- a/config.h
+++ b/config.h
@@ -122,14 +122,12 @@ struct key_value_info {
int linenr;
enum config_origin_type origin_type;
enum config_scope scope;
- const char *path;
};
#define KVI_INIT { \
.filename = NULL, \
.linenr = -1, \
.origin_type = CONFIG_ORIGIN_UNKNOWN, \
.scope = CONFIG_SCOPE_UNKNOWN, \
- .path = NULL, \
}
/* Captures additional information that a config callback can use. */
@@ -165,9 +163,6 @@ struct config_context {
typedef int (*config_fn_t)(const char *, const char *,
const struct config_context *, void *);
-int git_default_config(const char *, const char *,
- const struct config_context *, void *);
-
/**
* Read a specific file in git-config format.
* This function takes the same callback and data parameters as `repo_config`.
@@ -718,140 +713,4 @@ NORETURN void git_die_config_linenr(const char *key, const char *filename, int l
lookup_config(mapping, ARRAY_SIZE(mapping), var)
int lookup_config(const char **mapping, int nr_mapping, const char *var);
-# ifdef USE_THE_REPOSITORY_VARIABLE
-static inline void git_config(config_fn_t fn, void *data)
-{
- repo_config(the_repository, fn, data);
-}
-
-static inline void git_config_clear(void)
-{
- repo_config_clear(the_repository);
-}
-
-static inline int git_config_get(const char *key)
-{
- return repo_config_get(the_repository, key);
-}
-
-static inline int git_config_get_value(const char *key, const char **value)
-{
- return repo_config_get_value(the_repository, key, value);
-}
-
-static inline int git_config_get_value_multi(const char *key, const struct string_list **dest)
-{
- return repo_config_get_value_multi(the_repository, key, dest);
-}
-
-static inline int git_config_get_string_multi(const char *key,
- const struct string_list **dest)
-{
- return repo_config_get_string_multi(the_repository, key, dest);
-}
-
-static inline int git_config_get_string(const char *key, char **dest)
-{
- return repo_config_get_string(the_repository, key, dest);
-}
-
-static inline int git_config_get_string_tmp(const char *key, const char **dest)
-{
- return repo_config_get_string_tmp(the_repository, key, dest);
-}
-
-static inline int git_config_get_int(const char *key, int *dest)
-{
- return repo_config_get_int(the_repository, key, dest);
-}
-
-static inline int git_config_get_ulong(const char *key, unsigned long *dest)
-{
- return repo_config_get_ulong(the_repository, key, dest);
-}
-
-static inline int git_config_get_bool(const char *key, int *dest)
-{
- return repo_config_get_bool(the_repository, key, dest);
-}
-
-static inline int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest)
-{
- return repo_config_get_bool_or_int(the_repository, key, is_bool, dest);
-}
-
-static inline int git_config_get_maybe_bool(const char *key, int *dest)
-{
- return repo_config_get_maybe_bool(the_repository, key, dest);
-}
-
-static inline int git_config_get_pathname(const char *key, char **dest)
-{
- return repo_config_get_pathname(the_repository, key, dest);
-}
-
-static inline void git_config_set_in_file(const char *config_filename,
- const char *key, const char *value)
-{
- repo_config_set_in_file(the_repository, config_filename, key, value);
-}
-
-static inline int git_config_set_gently(const char *key, const char *value)
-{
- return repo_config_set_gently(the_repository, key, value);
-}
-
-static inline void git_config_set(const char *key, const char *value)
-{
- repo_config_set(the_repository, key, value);
-}
-
-static inline int git_config_set_in_file_gently(
- const char *config_filename,
- const char *key,
- const char *comment,
- const char *value)
-{
- return repo_config_set_in_file_gently(the_repository, config_filename,
- key, comment, value);
-}
-
-static inline int git_config_set_multivar_in_file_gently(
- const char *config_filename,
- const char *key, const char *value,
- const char *value_pattern,
- const char *comment,
- unsigned flags)
-{
- return repo_config_set_multivar_in_file_gently(the_repository, config_filename,
- key, value, value_pattern,
- comment, flags);
-}
-
-static inline void git_config_set_multivar_in_file(
- const char *config_filename,
- const char *key,
- const char *value,
- const char *value_pattern,
- unsigned flags)
-{
- repo_config_set_multivar_in_file(the_repository, config_filename,
- key, value, value_pattern, flags);
-}
-
-static inline int git_config_set_multivar_gently(const char *key, const char *value,
- const char *value_pattern, unsigned flags)
-{
- return repo_config_set_multivar_gently(the_repository, key, value,
- value_pattern, flags);
-}
-
-static inline void git_config_set_multivar(const char *key, const char *value,
- const char *value_pattern, unsigned flags)
-{
- repo_config_set_multivar(the_repository, key, value,
- value_pattern, flags);
-}
-# endif /* USE_THE_REPOSITORY_VARIABLE */
-
#endif /* CONFIG_H */
diff --git a/config.mak.uname b/config.mak.uname
index 3e26bb0..1691c6a 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -190,9 +190,6 @@
SHELL_PATH = /bin/bash
SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
HAVE_ALLOCA_H = YesPlease
- NO_STRCASESTR = YesPlease
- NO_MEMMEM = YesPlease
- NO_MKDTEMP = YesPlease
NO_REGEX = YesPlease
NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
HAVE_DEV_TTY = YesPlease
@@ -202,7 +199,10 @@
NO_IPV6 = YesPlease
NO_SOCKADDR_STORAGE = YesPlease
NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MEMMEM = YesPlease
NO_SETENV = YesPlease
+ NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
NO_STRTOUMAX = YesPlease
GIT_TEST_CMP = cmp
@@ -212,23 +212,45 @@
NO_IPV6 = YesPlease
NO_SOCKADDR_STORAGE = YesPlease
NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MEMMEM = YesPlease
NO_SETENV = YesPlease
+ NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
NO_STRTOUMAX = YesPlease
GIT_TEST_CMP = cmp
endif
ifeq ($(uname_R),5.8)
NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MEMMEM = YesPlease
NO_SETENV = YesPlease
+ NO_STRCASESTR = YesPlease
NO_STRTOUMAX = YesPlease
GIT_TEST_CMP = cmp
endif
ifeq ($(uname_R),5.9)
NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MEMMEM = YesPlease
NO_SETENV = YesPlease
+ NO_STRCASESTR = YesPlease
NO_STRTOUMAX = YesPlease
GIT_TEST_CMP = cmp
endif
+ ifeq ($(uname_R),5.10)
+ NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MEMMEM = YesPlease
+ NO_SETENV = YesPlease
+ NO_STRCASESTR = YesPlease
+ GIT_TEST_CMP = cmp
+ endif
+ ifeq ($(uname_R),5.11)
+ NO_UNSETENV = YesPlease
+ NO_SETENV = YesPlease
+ GIT_TEST_CMP = cmp
+ endif
INSTALL = /usr/ucb/install
TAR = gtar
BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__
@@ -280,16 +302,13 @@
ifeq ($(firstword $(subst -, ,$(uname_R))),10.1)
OLD_ICONV = YesPlease
endif
- NO_MEMMEM = YesPlease
+ ifeq ($(shell v=$(uname_R) && test $${v%%.*} -lt 12 && echo 1),1)
+ NO_MEMMEM = UnfortunatelyYes
+ endif
BASIC_CFLAGS += -I/usr/local/include
BASIC_LDFLAGS += -L/usr/local/lib
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
USE_ST_TIMESPEC = YesPlease
- ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
- PTHREAD_LIBS = -pthread
- NO_UINTMAX_T = YesPlease
- NO_STRTOUMAX = YesPlease
- endif
PYTHON_PATH = /usr/local/bin/python
PERL_PATH = /usr/local/bin/perl
HAVE_PATHS_H = YesPlease
diff --git a/configure.ac b/configure.ac
index f6caab9..cfb5011 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1068,32 +1068,6 @@
GIT_CONF_SUBST([CHARSET_LIB])
#
-# Define HAVE_SYSINFO=YesPlease if sysinfo is available.
-#
-AC_DEFUN([HAVE_SYSINFO_SRC], [
-AC_LANG_PROGRAM([[
-#include <stdint.h>
-#include <sys/sysinfo.h>
-]], [[
-struct sysinfo si;
-uint64_t t = 0;
-if (!sysinfo(&si)) {
- t = si.totalram;
- if (si.mem_unit > 1)
- t *= (uint64_t)si.mem_unit;
-}
-return t;
-]])])
-
-AC_MSG_CHECKING([for sysinfo])
-AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC],
- [AC_MSG_RESULT([yes])
- HAVE_SYSINFO=YesPlease],
- [AC_MSG_RESULT([no])
- HAVE_SYSINFO=])
-GIT_CONF_SUBST([HAVE_SYSINFO])
-
-#
# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
GIT_CHECK_FUNC(clock_gettime,
[HAVE_CLOCK_GETTIME=YesPlease],
@@ -1148,14 +1122,6 @@
[NO_STRLCPY=YesPlease])
GIT_CONF_SUBST([NO_STRLCPY])
#
-# Define NO_UINTMAX_T if your platform does not have uintmax_t
-AC_CHECK_TYPE(uintmax_t,
-[NO_UINTMAX_T=],
-[NO_UINTMAX_T=YesPlease],[
-#include <inttypes.h>
-])
-GIT_CONF_SUBST([NO_UINTMAX_T])
-#
# Define NO_STRTOUMAX if you don't have strtoumax in the C library.
GIT_CHECK_FUNC(strtoumax,
[NO_STRTOUMAX=],
@@ -1221,6 +1187,41 @@
HAVE_BSD_SYSCTL=])
GIT_CONF_SUBST([HAVE_BSD_SYSCTL])
+#
+# Define HAVE_SYSINFO=YesPlease if sysinfo is available.
+#
+
+HAVE_SYSINFO=
+# on a *BSD system, sysctl() takes precedence over the
+# sysinfo() compatibility library (if installed).
+
+if test -z "$HAVE_BSD_SYSCTL"; then
+
+ AC_DEFUN([HAVE_SYSINFO_SRC], [
+ AC_LANG_PROGRAM([[
+ #include <stdint.h>
+ #include <sys/sysinfo.h>
+ ]], [[
+ struct sysinfo si;
+ uint64_t t = 0;
+ if (!sysinfo(&si)) {
+ t = si.totalram;
+ if (si.mem_unit > 1)
+ t *= (uint64_t)si.mem_unit;
+ }
+ return t;
+ ]])])
+
+ AC_MSG_CHECKING([for sysinfo])
+ AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC],
+ [AC_MSG_RESULT([yes])
+ HAVE_SYSINFO=YesPlease],
+ [AC_MSG_RESULT([no])
+ HAVE_SYSINFO=])
+ GIT_CONF_SUBST([HAVE_SYSINFO])
+
+fi
+
## Other checks.
# Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
# Enable it on Windows. By default, symrefs are still used.
diff --git a/connect.c b/connect.c
index 3280435..34cac24 100644
--- a/connect.c
+++ b/connect.c
@@ -251,7 +251,7 @@ static void process_capabilities(struct packet_reader *reader, size_t *linelen)
reader->hash_algo = &hash_algos[hash_algo];
free(hash_name);
} else {
- reader->hash_algo = &hash_algos[GIT_HASH_SHA1];
+ reader->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
}
}
@@ -500,7 +500,7 @@ static void send_capabilities(int fd_out, struct packet_reader *reader)
reader->hash_algo = &hash_algos[hash_algo];
packet_write_fmt(fd_out, "object-format=%s", reader->hash_algo->name);
} else {
- reader->hash_algo = &hash_algos[GIT_HASH_SHA1];
+ reader->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
}
if (server_feature_v2("promisor-remote", &promisor_remote_info)) {
char *reply = promisor_remote_reply(promisor_remote_info);
@@ -665,7 +665,7 @@ int server_supports_hash(const char *desired, int *feature_supported)
if (feature_supported)
*feature_supported = !!hash;
if (!hash) {
- hash = hash_algos[GIT_HASH_SHA1].name;
+ hash = hash_algos[GIT_HASH_SHA1_LEGACY].name;
len = strlen(hash);
}
while (hash) {
@@ -1028,7 +1028,7 @@ static int git_proxy_command_options(const char *var, const char *value,
static int git_use_proxy(const char *host)
{
git_proxy_command = getenv("GIT_PROXY_COMMAND");
- git_config(git_proxy_command_options, (void*)host);
+ repo_config(the_repository, git_proxy_command_options, (void*)host);
return (git_proxy_command && *git_proxy_command);
}
@@ -1154,7 +1154,7 @@ static const char *get_ssh_command(void)
if ((ssh = getenv("GIT_SSH_COMMAND")))
return ssh;
- if (!git_config_get_string_tmp("core.sshcommand", &ssh))
+ if (!repo_config_get_string_tmp(the_repository, "core.sshcommand", &ssh))
return ssh;
return NULL;
@@ -1173,7 +1173,7 @@ static void override_ssh_variant(enum ssh_variant *ssh_variant)
{
const char *variant = getenv("GIT_SSH_VARIANT");
- if (!variant && git_config_get_string_tmp("ssh.variant", &variant))
+ if (!variant && repo_config_get_string_tmp(the_repository, "ssh.variant", &variant))
return;
if (!strcmp(variant, "auto"))
diff --git a/connected.c b/connected.c
index 4415388..18c1324 100644
--- a/connected.c
+++ b/connected.c
@@ -3,7 +3,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "run-command.h"
#include "sigchain.h"
#include "connected.h"
diff --git a/contrib/coccinelle/commit.cocci b/contrib/coccinelle/commit.cocci
index af6dd4c..c528460 100644
--- a/contrib/coccinelle/commit.cocci
+++ b/contrib/coccinelle/commit.cocci
@@ -25,7 +25,8 @@
// functions, then the recommended transformation will be bogus with
// repo_get_commit_tree() on the LHS.
@@
-identifier f !~ "^(repo_get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit|set_commit_tree)$";
+identifier f != { repo_get_commit_tree, get_commit_tree_in_graph_one,
+ load_tree_for_commit, set_commit_tree };
expression c;
@@
f(...) {<...
diff --git a/contrib/coccinelle/config_fn_ctx.pending.cocci b/contrib/coccinelle/config_fn_ctx.pending.cocci
index 6d3d100..54f09fc 100644
--- a/contrib/coccinelle/config_fn_ctx.pending.cocci
+++ b/contrib/coccinelle/config_fn_ctx.pending.cocci
@@ -83,7 +83,7 @@
// The previous rules don't catch all callbacks, especially if they're defined
-// in a separate file from the git_config() call. Fix these manually.
+// in a separate file from the repo_config() call. Fix these manually.
@@
identifier C1, C2, D;
attribute name UNUSED;
diff --git a/contrib/coccinelle/the_repository.cocci b/contrib/coccinelle/the_repository.cocci
index 765ad68..ea7fe1c 100644
--- a/contrib/coccinelle/the_repository.cocci
+++ b/contrib/coccinelle/the_repository.cocci
@@ -77,7 +77,7 @@
|
- diff_setup
+ repo_diff_setup
-// object-store.h
+// odb.h
|
- read_object_file
+ repo_read_object_file
diff --git a/contrib/credential/netrc/git-credential-netrc.perl b/contrib/credential/netrc/git-credential-netrc.perl
index 9fb998a..3c0a532 100755
--- a/contrib/credential/netrc/git-credential-netrc.perl
+++ b/contrib/credential/netrc/git-credential-netrc.perl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
@@ -267,8 +267,16 @@
if (!defined $nentry->{machine}) {
next;
}
- if (defined $nentry->{port} && $nentry->{port} =~ m/^\d+$/) {
- $num_port = $nentry->{port};
+ if (defined $nentry->{port}) {
+ $num_port = Git::port_num($nentry->{port});
+ unless ($num_port) {
+ printf(STDERR "ignoring invalid port `%s' " .
+ "from netrc file\n", $nentry->{port});
+ }
+ # Since we've already validated and converted
+ # the port to its numerical value, do not
+ # capture it as the `protocol' value, as used
+ # to be the case for symbolic port names.
delete $nentry->{port};
}
diff --git a/contrib/credential/netrc/meson.build b/contrib/credential/netrc/meson.build
index 3d74547..16fa69e 100644
--- a/contrib/credential/netrc/meson.build
+++ b/contrib/credential/netrc/meson.build
@@ -17,6 +17,6 @@
workdir: meson.current_source_dir(),
env: credential_netrc_testenv,
depends: test_dependencies + bin_wrappers + [credential_netrc],
- timeout: 0,
+ kwargs: test_kwargs,
)
endif
diff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl
index 67a0ede..8a7fc25 100755
--- a/contrib/credential/netrc/test.pl
+++ b/contrib/credential/netrc/test.pl
@@ -45,7 +45,7 @@
diag "Testing with invalid data\n";
$cred = run_credential(['-f', $netrc, 'get'],
"bad data");
-ok(scalar keys %$cred == 4, "Got first found keys with bad data");
+ok(scalar keys %$cred == 3, "Got first found keys with bad data");
diag "Testing netrc file for a missing corovamilkbar entry\n";
$cred = run_credential(['-f', $netrc, 'get'],
@@ -64,12 +64,12 @@
diag "Testing netrc file for a username-specific entry\n";
$cred = run_credential(['-f', $netrc, 'get'],
- { host => 'imap', username => 'bob' });
+ { host => 'imap:993', username => 'bob' });
-ok(scalar keys %$cred == 2, "Got 2 username-specific keys");
+# Only the password field gets returned.
+ok(scalar keys %$cred == 1, "Got 1 username-specific keys");
is($cred->{password}, 'bobwillknow', "Got correct user-specific password");
-is($cred->{protocol}, 'imaps', "Got correct user-specific protocol");
diag "Testing netrc file for a host:port-specific entry\n";
$cred = run_credential(['-f', $netrc, 'get'],
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 04145b5..5683846 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -39,6 +39,14 @@ static void *xmalloc(size_t size)
static WCHAR *wusername, *password, *protocol, *host, *path, target[1024],
*password_expiry_utc, *oauth_refresh_token;
+static void target_append(const WCHAR *src)
+{
+ size_t avail = ARRAY_SIZE(target) - wcslen(target) - 1; /* -1 for NUL */
+ if (avail < wcslen(src))
+ die("target buffer overflow");
+ wcsncat(target, src, avail);
+}
+
static void write_item(const char *what, LPCWSTR wbuf, int wlen)
{
char *buf;
@@ -330,17 +338,17 @@ int main(int argc, char *argv[])
/* prepare 'target', the unique key for the credential */
wcscpy(target, L"git:");
- wcsncat(target, protocol, ARRAY_SIZE(target));
- wcsncat(target, L"://", ARRAY_SIZE(target));
+ target_append(protocol);
+ target_append(L"://");
if (wusername) {
- wcsncat(target, wusername, ARRAY_SIZE(target));
- wcsncat(target, L"@", ARRAY_SIZE(target));
+ target_append(wusername);
+ target_append(L"@");
}
if (host)
- wcsncat(target, host, ARRAY_SIZE(target));
+ target_append(host);
if (path) {
- wcsncat(target, L"/", ARRAY_SIZE(target));
- wcsncat(target, path, ARRAY_SIZE(target));
+ target_append(L"/");
+ target_append(path);
}
if (!strcmp(argv[1], "get"))
diff --git a/contrib/emacs/README b/contrib/emacs/README
deleted file mode 100644
index 977a16f..0000000
--- a/contrib/emacs/README
+++ /dev/null
@@ -1,33 +0,0 @@
-This directory used to contain various modules for Emacs support.
-
-These were added shortly after Git was first released. Since then
-Emacs's own support for Git got better than what was offered by these
-modes. There are also popular 3rd-party Git modes such as Magit which
-offer replacements for these.
-
-The following modules were available, and can be dug up from the Git
-history:
-
-* git.el:
-
- Wrapper for "git status" that provided access to other git commands.
-
- Modern alternatives to this include Magit, and VC mode that ships
- with Emacs.
-
-* git-blame.el:
-
- A wrapper for "git blame" written before Emacs's own vc-annotate
- mode learned to invoke git-blame, which can be done via C-x v g.
-
-* vc-git.el:
-
- This file used to contain the VC-mode backend for git, but it is no
- longer distributed with git. It is now maintained as part of Emacs
- and included in standard Emacs distributions starting from version
- 22.2.
-
- If you have an earlier Emacs version, upgrading to Emacs 22 is
- recommended, since the VC mode in older Emacs is not generic enough
- to be able to support git in a reasonable manner, and no attempt has
- been made to backport vc-git.el.
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
deleted file mode 100644
index 6a8a2b8..0000000
--- a/contrib/emacs/git-blame.el
+++ /dev/null
@@ -1,6 +0,0 @@
-(error "git-blame.el no longer ships with git. It's recommended
-to replace its use with Emacs's own vc-annotate. See
-contrib/emacs/README in git's
-sources (https://github.com/git/git/blob/master/contrib/emacs/README)
-for more info on suggested alternatives and for why this
-happened.")
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
deleted file mode 100644
index 03f9262..0000000
--- a/contrib/emacs/git.el
+++ /dev/null
@@ -1,6 +0,0 @@
-(error "git.el no longer ships with git. It's recommended to
-replace its use with Magit, or simply delete references to git.el
-in your initialization file(s). See contrib/emacs/README in git's
-sources (https://github.com/git/git/blob/master/contrib/emacs/README)
-for suggested alternatives and for why this happened. Emacs's own
-VC mode and Magit are viable alternatives.")
diff --git a/contrib/examples/README b/contrib/examples/README
deleted file mode 100644
index 18bc60b..0000000
--- a/contrib/examples/README
+++ /dev/null
@@ -1,20 +0,0 @@
-This directory used to contain scripted implementations of builtins
-that have since been rewritten in C.
-
-They have now been removed, but can be retrieved from an older commit
-that removed them from this directory.
-
-They're interesting for their reference value to any aspiring plumbing
-users who want to learn how pieces can be fit together, but in many
-cases have drifted enough from the actual implementations Git uses to
-be instructive.
-
-Other things that can be useful:
-
- * Some commands such as git-gc wrap other commands, and what they're
- doing behind the scenes can be seen by running them under
- GIT_TRACE=1
-
- * Doing `git log` on paths matching '*--helper.c' will show
- incremental effort in the direction of moving existing shell
- scripts to C.
diff --git a/contrib/git-resurrect.sh b/contrib/git-resurrect.sh
deleted file mode 100755
index d843df3..0000000
--- a/contrib/git-resurrect.sh
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/bin/sh
-
-USAGE="[-a] [-r] [-m] [-t] [-n] [-b <newname>] <name>"
-LONG_USAGE="git-resurrect attempts to find traces of a branch tip
-called <name>, and tries to resurrect it. Currently, the reflog is
-searched for checkout messages, and with -r also merge messages. With
--m and -t, the history of all refs is scanned for Merge <name> into
-other/Merge <other> into <name> (respectively) commit subjects, which
-is rather slow but allows you to resurrect other people's topic
-branches."
-
-OPTIONS_KEEPDASHDASH=
-OPTIONS_STUCKLONG=
-OPTIONS_SPEC="\
-git resurrect $USAGE
---
-b,branch= save branch as <newname> instead of <name>
-a,all same as -l -r -m -t
-k,keep-going full rev-list scan (instead of first match)
-l,reflog scan reflog for checkouts (enabled by default)
-r,reflog-merges scan for merges recorded in reflog
-m,merges scan for merges into other branches (slow)
-t,merge-targets scan for merges of other branches into <name>
-n,dry-run don't recreate the branch"
-
-. git-sh-setup
-
-search_reflog () {
- sed -ne 's~^\([^ ]*\) .* checkout: moving from '"$1"' .*~\1~p' \
- < "$GIT_DIR"/logs/HEAD
-}
-
-search_reflog_merges () {
- git rev-parse $(
- sed -ne 's~^[^ ]* \([^ ]*\) .* merge '"$1"':.*~\1^2~p' \
- < "$GIT_DIR"/logs/HEAD
- )
-}
-
-oid_pattern=$(git hash-object --stdin </dev/null | sed -e 's/./[0-9a-f]/g')
-
-search_merges () {
- git rev-list --all --grep="Merge branch '$1'" \
- --pretty=tformat:"%P %s" |
- sed -ne "/^$oid_pattern \($oid_pattern\) Merge .*/ {s//\1/p;$early_exit}"
-}
-
-search_merge_targets () {
- git rev-list --all --grep="Merge branch '[^']*' into $branch\$" \
- --pretty=tformat:"%H %s" --all |
- sed -ne "/^\($oid_pattern\) Merge .*/ {s//\1/p;$early_exit} "
-}
-
-dry_run=
-early_exit=q
-scan_reflog=t
-scan_reflog_merges=
-scan_merges=
-scan_merge_targets=
-new_name=
-
-while test "$#" != 0; do
- case "$1" in
- -b|--branch)
- shift
- new_name="$1"
- ;;
- -n|--dry-run)
- dry_run=t
- ;;
- --no-dry-run)
- dry_run=
- ;;
- -k|--keep-going)
- early_exit=
- ;;
- --no-keep-going)
- early_exit=q
- ;;
- -m|--merges)
- scan_merges=t
- ;;
- --no-merges)
- scan_merges=
- ;;
- -l|--reflog)
- scan_reflog=t
- ;;
- --no-reflog)
- scan_reflog=
- ;;
- -r|--reflog_merges)
- scan_reflog_merges=t
- ;;
- --no-reflog_merges)
- scan_reflog_merges=
- ;;
- -t|--merge-targets)
- scan_merge_targets=t
- ;;
- --no-merge-targets)
- scan_merge_targets=
- ;;
- -a|--all)
- scan_reflog=t
- scan_reflog_merges=t
- scan_merges=t
- scan_merge_targets=t
- ;;
- --)
- shift
- break
- ;;
- *)
- usage
- ;;
- esac
- shift
-done
-
-test "$#" = 1 || usage
-
-all_strategies="$scan_reflog$scan_reflog_merges$scan_merges$scan_merge_targets"
-if test -z "$all_strategies"; then
- die "must enable at least one of -lrmt"
-fi
-
-branch="$1"
-test -z "$new_name" && new_name="$branch"
-
-if test ! -z "$scan_reflog"; then
- if test -r "$GIT_DIR"/logs/HEAD; then
- candidates="$(search_reflog $branch)"
- else
- die 'reflog scanning requested, but' \
- '$GIT_DIR/logs/HEAD not readable'
- fi
-fi
-if test ! -z "$scan_reflog_merges"; then
- if test -r "$GIT_DIR"/logs/HEAD; then
- candidates="$candidates $(search_reflog_merges $branch)"
- else
- die 'reflog scanning requested, but' \
- '$GIT_DIR/logs/HEAD not readable'
- fi
-fi
-if test ! -z "$scan_merges"; then
- candidates="$candidates $(search_merges $branch)"
-fi
-if test ! -z "$scan_merge_targets"; then
- candidates="$candidates $(search_merge_targets $branch)"
-fi
-
-candidates="$(git rev-parse $candidates | sort -u)"
-
-if test -z "$candidates"; then
- hint=
- test "z$all_strategies" != "ztttt" \
- && hint=" (maybe try again with -a)"
- die "no candidates for $branch found$hint"
-fi
-
-echo "** Candidates for $branch **"
-for cmt in $candidates; do
- git --no-pager log --pretty=tformat:"%ct:%h [%cr] %s" --abbrev-commit -1 $cmt
-done \
-| sort -n | cut -d: -f2-
-
-newest="$(git rev-list -1 $candidates)"
-if test ! -z "$dry_run"; then
- printf "** Most recent: "
- git --no-pager log -1 --pretty=tformat:"%h %s" $newest
-elif ! git rev-parse --verify --quiet $new_name >/dev/null; then
- printf "** Restoring $new_name to "
- git --no-pager log -1 --pretty=tformat:"%h %s" $newest
- git branch $new_name $newest
-else
- printf "Most recent: "
- git --no-pager log -1 --pretty=tformat:"%h %s" $newest
- echo "** $new_name already exists, doing nothing"
-fi
diff --git a/contrib/hooks/multimail/README.Git b/contrib/hooks/multimail/README.Git
deleted file mode 100644
index c427efc..0000000
--- a/contrib/hooks/multimail/README.Git
+++ /dev/null
@@ -1,7 +0,0 @@
-git-multimail is developed as an independent project at the following
-website:
-
- https://github.com/git-multimail/git-multimail
-
-Please refer to that project page for information about how to report
-bugs or contribute to git-multimail.
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
deleted file mode 100755
index ff565eb..0000000
--- a/contrib/hooks/post-receive-email
+++ /dev/null
@@ -1,759 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2007 Andy Parkins
-#
-# An example hook script to mail out commit update information.
-#
-# NOTE: This script is no longer under active development. There
-# is another script, git-multimail, which is more capable and
-# configurable and is largely backwards-compatible with this script;
-# please see "contrib/hooks/multimail/". For instructions on how to
-# migrate from post-receive-email to git-multimail, please see
-# "README.migrate-from-post-receive-email" in that directory.
-#
-# This hook sends emails listing new revisions to the repository
-# introduced by the change being reported. The rule is that (for
-# branch updates) each commit will appear on one email and one email
-# only.
-#
-# This hook is stored in the contrib/hooks directory. Your distribution
-# will have put this somewhere standard. You should make this script
-# executable then link to it in the repository you would like to use it in.
-# For example, on debian the hook is stored in
-# /usr/share/git-core/contrib/hooks/post-receive-email:
-#
-# cd /path/to/your/repository.git
-# ln -sf /usr/share/git-core/contrib/hooks/post-receive-email hooks/post-receive
-#
-# This hook script assumes it is enabled on the central repository of a
-# project, with all users pushing only to it and not between each other. It
-# will still work if you don't operate in that style, but it would become
-# possible for the email to be from someone other than the person doing the
-# push.
-#
-# To help with debugging and use on pre-v1.5.1 git servers, this script will
-# also obey the interface of hooks/update, taking its arguments on the
-# command line. Unfortunately, hooks/update is called once for each ref.
-# To avoid firing one email per ref, this script just prints its output to
-# the screen when used in this mode. The output can then be redirected if
-# wanted.
-#
-# Config
-# ------
-# hooks.mailinglist
-# This is the list that all pushes will go to; leave it blank to not send
-# emails for every ref update.
-# hooks.announcelist
-# This is the list that all pushes of annotated tags will go to. Leave it
-# blank to default to the mailinglist field. The announce emails lists
-# the short log summary of the changes since the last annotated tag.
-# hooks.envelopesender
-# If set then the -f option is passed to sendmail to allow the envelope
-# sender address to be set
-# hooks.emailprefix
-# All emails have their subjects prefixed with this prefix, or "[SCM]"
-# if emailprefix is unset, to aid filtering
-# hooks.showrev
-# The shell command used to format each revision in the email, with
-# "%s" replaced with the commit id. Defaults to "git rev-list -1
-# --pretty %s", displaying the commit id, author, date and log
-# message. To list full patches separated by a blank line, you
-# could set this to "git show -C %s; echo".
-# To list a gitweb/cgit URL *and* a full patch for each change set, use this:
-# "t=%s; printf 'http://.../?id=%%s' \$t; echo;echo; git show -C \$t; echo"
-# Be careful if "..." contains things that will be expanded by shell "eval"
-# or printf.
-# hooks.emailmaxlines
-# The maximum number of lines that should be included in the generated
-# email body. If not specified, there is no limit.
-# Lines beyond the limit are suppressed and counted, and a final
-# line is added indicating the number of suppressed lines.
-# hooks.diffopts
-# Alternate options for the git diff-tree invocation that shows changes.
-# Default is "--stat --summary --find-copies-harder". Add -p to those
-# options to include a unified diff of changes in addition to the usual
-# summary output.
-#
-# Notes
-# -----
-# All emails include the headers "X-Git-Refname", "X-Git-Oldrev",
-# "X-Git-Newrev", and "X-Git-Reftype" to enable fine tuned filtering and
-# give information for debugging.
-#
-
-# ---------------------------- Functions
-
-#
-# Function to prepare for email generation. This decides what type
-# of update this is and whether an email should even be generated.
-#
-prep_for_email()
-{
- # --- Arguments
- oldrev=$(git rev-parse $1)
- newrev=$(git rev-parse $2)
- refname="$3"
-
- # --- Interpret
- # 0000->1234 (create)
- # 1234->2345 (update)
- # 2345->0000 (delete)
- if expr "$oldrev" : '0*$' >/dev/null
- then
- change_type="create"
- else
- if expr "$newrev" : '0*$' >/dev/null
- then
- change_type="delete"
- else
- change_type="update"
- fi
- fi
-
- # --- Get the revision types
- newrev_type=$(git cat-file -t $newrev 2> /dev/null)
- oldrev_type=$(git cat-file -t "$oldrev" 2> /dev/null)
- case "$change_type" in
- create|update)
- rev="$newrev"
- rev_type="$newrev_type"
- ;;
- delete)
- rev="$oldrev"
- rev_type="$oldrev_type"
- ;;
- esac
-
- # The revision type tells us what type the commit is, combined with
- # the location of the ref we can decide between
- # - working branch
- # - tracking branch
- # - unannoted tag
- # - annotated tag
- case "$refname","$rev_type" in
- refs/tags/*,commit)
- # un-annotated tag
- refname_type="tag"
- short_refname=${refname##refs/tags/}
- ;;
- refs/tags/*,tag)
- # annotated tag
- refname_type="annotated tag"
- short_refname=${refname##refs/tags/}
- # change recipients
- if [ -n "$announcerecipients" ]; then
- recipients="$announcerecipients"
- fi
- ;;
- refs/heads/*,commit)
- # branch
- refname_type="branch"
- short_refname=${refname##refs/heads/}
- ;;
- refs/remotes/*,commit)
- # tracking branch
- refname_type="tracking branch"
- short_refname=${refname##refs/remotes/}
- echo >&2 "*** Push-update of tracking branch, $refname"
- echo >&2 "*** - no email generated."
- return 1
- ;;
- *)
- # Anything else (is there anything else?)
- echo >&2 "*** Unknown type of update to $refname ($rev_type)"
- echo >&2 "*** - no email generated"
- return 1
- ;;
- esac
-
- # Check if we've got anyone to send to
- if [ -z "$recipients" ]; then
- case "$refname_type" in
- "annotated tag")
- config_name="hooks.announcelist"
- ;;
- *)
- config_name="hooks.mailinglist"
- ;;
- esac
- echo >&2 "*** $config_name is not set so no email will be sent"
- echo >&2 "*** for $refname update $oldrev->$newrev"
- return 1
- fi
-
- return 0
-}
-
-#
-# Top level email generation function. This calls the appropriate
-# body-generation routine after outputting the common header.
-#
-# Note this function doesn't actually generate any email output, that is
-# taken care of by the functions it calls:
-# - generate_email_header
-# - generate_create_XXXX_email
-# - generate_update_XXXX_email
-# - generate_delete_XXXX_email
-# - generate_email_footer
-#
-# Note also that this function cannot 'exit' from the script; when this
-# function is running (in hook script mode), the send_mail() function
-# is already executing in another process, connected via a pipe, and
-# if this function exits without, whatever has been generated to that
-# point will be sent as an email... even if nothing has been generated.
-#
-generate_email()
-{
- # Email parameters
- # The email subject will contain the best description of the ref
- # that we can build from the parameters
- describe=$(git describe $rev 2>/dev/null)
- if [ -z "$describe" ]; then
- describe=$rev
- fi
-
- generate_email_header
-
- # Call the correct body generation function
- fn_name=general
- case "$refname_type" in
- "tracking branch"|branch)
- fn_name=branch
- ;;
- "annotated tag")
- fn_name=atag
- ;;
- esac
-
- if [ -z "$maxlines" ]; then
- generate_${change_type}_${fn_name}_email
- else
- generate_${change_type}_${fn_name}_email | limit_lines $maxlines
- fi
-
- generate_email_footer
-}
-
-generate_email_header()
-{
- # --- Email (all stdout will be the email)
- # Generate header
- cat <<-EOF
- To: $recipients
- Subject: ${emailprefix}$projectdesc $refname_type $short_refname ${change_type}d. $describe
- MIME-Version: 1.0
- Content-Type: text/plain; charset=utf-8
- Content-Transfer-Encoding: 8bit
- X-Git-Refname: $refname
- X-Git-Reftype: $refname_type
- X-Git-Oldrev: $oldrev
- X-Git-Newrev: $newrev
- Auto-Submitted: auto-generated
-
- This is an automated email from the git hooks/post-receive script. It was
- generated because a ref change was pushed to the repository containing
- the project "$projectdesc".
-
- The $refname_type, $short_refname has been ${change_type}d
- EOF
-}
-
-generate_email_footer()
-{
- SPACE=" "
- cat <<-EOF
-
-
- hooks/post-receive
- --${SPACE}
- $projectdesc
- EOF
-}
-
-# --------------- Branches
-
-#
-# Called for the creation of a branch
-#
-generate_create_branch_email()
-{
- # This is a new branch and so oldrev is not valid
- echo " at $newrev ($newrev_type)"
- echo ""
-
- echo $LOGBEGIN
- show_new_revisions
- echo $LOGEND
-}
-
-#
-# Called for the change of a pre-existing branch
-#
-generate_update_branch_email()
-{
- # Consider this:
- # 1 --- 2 --- O --- X --- 3 --- 4 --- N
- #
- # O is $oldrev for $refname
- # N is $newrev for $refname
- # X is a revision pointed to by some other ref, for which we may
- # assume that an email has already been generated.
- # In this case we want to issue an email containing only revisions
- # 3, 4, and N. Given (almost) by
- #
- # git rev-list N ^O --not --all
- #
- # The reason for the "almost", is that the "--not --all" will take
- # precedence over the "N", and effectively will translate to
- #
- # git rev-list N ^O ^X ^N
- #
- # So, we need to build up the list more carefully. git rev-parse
- # will generate a list of revs that may be fed into git rev-list.
- # We can get it to make the "--not --all" part and then filter out
- # the "^N" with:
- #
- # git rev-parse --not --all | grep -v N
- #
- # Then, using the --stdin switch to git rev-list we have effectively
- # manufactured
- #
- # git rev-list N ^O ^X
- #
- # This leaves a problem when someone else updates the repository
- # while this script is running. Their new value of the ref we're
- # working on would be included in the "--not --all" output; and as
- # our $newrev would be an ancestor of that commit, it would exclude
- # all of our commits. What we really want is to exclude the current
- # value of $refname from the --not list, rather than N itself. So:
- #
- # git rev-parse --not --all | grep -v $(git rev-parse $refname)
- #
- # Gets us to something pretty safe (apart from the small time
- # between refname being read, and git rev-parse running - for that,
- # I give up)
- #
- #
- # Next problem, consider this:
- # * --- B --- * --- O ($oldrev)
- # \
- # * --- X --- * --- N ($newrev)
- #
- # That is to say, there is no guarantee that oldrev is a strict
- # subset of newrev (it would have required a --force, but that's
- # allowed). So, we can't simply say rev-list $oldrev..$newrev.
- # Instead we find the common base of the two revs and list from
- # there.
- #
- # As above, we need to take into account the presence of X; if
- # another branch is already in the repository and points at some of
- # the revisions that we are about to output - we don't want them.
- # The solution is as before: git rev-parse output filtered.
- #
- # Finally, tags: 1 --- 2 --- O --- T --- 3 --- 4 --- N
- #
- # Tags pushed into the repository generate nice shortlog emails that
- # summarise the commits between them and the previous tag. However,
- # those emails don't include the full commit messages that we output
- # for a branch update. Therefore we still want to output revisions
- # that have been output on a tag email.
- #
- # Luckily, git rev-parse includes just the tool. Instead of using
- # "--all" we use "--branches"; this has the added benefit that
- # "remotes/" will be ignored as well.
-
- # List all of the revisions that were removed by this update, in a
- # fast-forward update, this list will be empty, because rev-list O
- # ^N is empty. For a non-fast-forward, O ^N is the list of removed
- # revisions
- fast_forward=""
- rev=""
- for rev in $(git rev-list $newrev..$oldrev)
- do
- revtype=$(git cat-file -t "$rev")
- echo " discards $rev ($revtype)"
- done
- if [ -z "$rev" ]; then
- fast_forward=1
- fi
-
- # List all the revisions from baserev to newrev in a kind of
- # "table-of-contents"; note this list can include revisions that
- # have already had notification emails and is present to show the
- # full detail of the change from rolling back the old revision to
- # the base revision and then forward to the new revision
- for rev in $(git rev-list $oldrev..$newrev)
- do
- revtype=$(git cat-file -t "$rev")
- echo " via $rev ($revtype)"
- done
-
- if [ "$fast_forward" ]; then
- echo " from $oldrev ($oldrev_type)"
- else
- # 1. Existing revisions were removed. In this case newrev
- # is a subset of oldrev - this is the reverse of a
- # fast-forward, a rewind
- # 2. New revisions were added on top of an old revision,
- # this is a rewind and addition.
-
- # (1) certainly happened, (2) possibly. When (2) hasn't
- # happened, we set a flag to indicate that no log printout
- # is required.
-
- echo ""
-
- # Find the common ancestor of the old and new revisions and
- # compare it with newrev
- baserev=$(git merge-base $oldrev $newrev)
- rewind_only=""
- if [ "$baserev" = "$newrev" ]; then
- echo "This update discarded existing revisions and left the branch pointing at"
- echo "a previous point in the repository history."
- echo ""
- echo " * -- * -- N ($newrev)"
- echo " \\"
- echo " O -- O -- O ($oldrev)"
- echo ""
- echo "The removed revisions are not necessarily gone - if another reference"
- echo "still refers to them they will stay in the repository."
- rewind_only=1
- else
- echo "This update added new revisions after undoing existing revisions. That is"
- echo "to say, the old revision is not a strict subset of the new revision. This"
- echo "situation occurs when you --force push a change and generate a repository"
- echo "containing something like this:"
- echo ""
- echo " * -- * -- B -- O -- O -- O ($oldrev)"
- echo " \\"
- echo " N -- N -- N ($newrev)"
- echo ""
- echo "When this happens we assume that you've already had alert emails for all"
- echo "of the O revisions, and so we here report only the revisions in the N"
- echo "branch from the common base, B."
- fi
- fi
-
- echo ""
- if [ -z "$rewind_only" ]; then
- echo "Those revisions listed above that are new to this repository have"
- echo "not appeared on any other notification email; so we list those"
- echo "revisions in full, below."
-
- echo ""
- echo $LOGBEGIN
- show_new_revisions
-
- # XXX: Need a way of detecting whether git rev-list actually
- # outputted anything, so that we can issue a "no new
- # revisions added by this update" message
-
- echo $LOGEND
- else
- echo "No new revisions were added by this update."
- fi
-
- # The diffstat is shown from the old revision to the new revision.
- # This is to show the truth of what happened in this change.
- # There's no point showing the stat from the base to the new
- # revision because the base is effectively a random revision at this
- # point - the user will be interested in what this revision changed
- # - including the undoing of previous revisions in the case of
- # non-fast-forward updates.
- echo ""
- echo "Summary of changes:"
- git diff-tree $diffopts $oldrev..$newrev
-}
-
-#
-# Called for the deletion of a branch
-#
-generate_delete_branch_email()
-{
- echo " was $oldrev"
- echo ""
- echo $LOGBEGIN
- git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
- echo $LOGEND
-}
-
-# --------------- Annotated tags
-
-#
-# Called for the creation of an annotated tag
-#
-generate_create_atag_email()
-{
- echo " at $newrev ($newrev_type)"
-
- generate_atag_email
-}
-
-#
-# Called for the update of an annotated tag (this is probably a rare event
-# and may not even be allowed)
-#
-generate_update_atag_email()
-{
- echo " to $newrev ($newrev_type)"
- echo " from $oldrev (which is now obsolete)"
-
- generate_atag_email
-}
-
-#
-# Called when an annotated tag is created or changed
-#
-generate_atag_email()
-{
- # Use git for-each-ref to pull out the individual fields from the
- # tag
- eval $(git for-each-ref --shell --format='
- tagobject=%(*objectname)
- tagtype=%(*objecttype)
- tagger=%(taggername)
- tagged=%(taggerdate)' $refname
- )
-
- echo " tagging $tagobject ($tagtype)"
- case "$tagtype" in
- commit)
-
- # If the tagged object is a commit, then we assume this is a
- # release, and so we calculate which tag this tag is
- # replacing
- prevtag=$(git describe --abbrev=0 $newrev^ 2>/dev/null)
-
- if [ -n "$prevtag" ]; then
- echo " replaces $prevtag"
- fi
- ;;
- *)
- echo " length $(git cat-file -s $tagobject) bytes"
- ;;
- esac
- echo " tagged by $tagger"
- echo " on $tagged"
-
- echo ""
- echo $LOGBEGIN
-
- # Show the content of the tag message; this might contain a change
- # log or release notes so is worth displaying.
- git cat-file tag $newrev | sed -e '1,/^$/d'
-
- echo ""
- case "$tagtype" in
- commit)
- # Only commit tags make sense to have rev-list operations
- # performed on them
- if [ -n "$prevtag" ]; then
- # Show changes since the previous release
- git shortlog "$prevtag..$newrev"
- else
- # No previous tag, show all the changes since time
- # began
- git shortlog $newrev
- fi
- ;;
- *)
- # XXX: Is there anything useful we can do for non-commit
- # objects?
- ;;
- esac
-
- echo $LOGEND
-}
-
-#
-# Called for the deletion of an annotated tag
-#
-generate_delete_atag_email()
-{
- echo " was $oldrev"
- echo ""
- echo $LOGBEGIN
- git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
- echo $LOGEND
-}
-
-# --------------- General references
-
-#
-# Called when any other type of reference is created (most likely a
-# non-annotated tag)
-#
-generate_create_general_email()
-{
- echo " at $newrev ($newrev_type)"
-
- generate_general_email
-}
-
-#
-# Called when any other type of reference is updated (most likely a
-# non-annotated tag)
-#
-generate_update_general_email()
-{
- echo " to $newrev ($newrev_type)"
- echo " from $oldrev"
-
- generate_general_email
-}
-
-#
-# Called for creation or update of any other type of reference
-#
-generate_general_email()
-{
- # Unannotated tags are more about marking a point than releasing a
- # version; therefore we don't do the shortlog summary that we do for
- # annotated tags above - we simply show that the point has been
- # marked, and print the log message for the marked point for
- # reference purposes
- #
- # Note this section also catches any other reference type (although
- # there aren't any) and deals with them in the same way.
-
- echo ""
- if [ "$newrev_type" = "commit" ]; then
- echo $LOGBEGIN
- git diff-tree -s --always --encoding=UTF-8 --pretty=medium $newrev
- echo $LOGEND
- else
- # What can we do here? The tag marks an object that is not
- # a commit, so there is no log for us to display. It's
- # probably not wise to output git cat-file as it could be a
- # binary blob. We'll just say how big it is
- echo "$newrev is a $newrev_type, and is $(git cat-file -s $newrev) bytes long."
- fi
-}
-
-#
-# Called for the deletion of any other type of reference
-#
-generate_delete_general_email()
-{
- echo " was $oldrev"
- echo ""
- echo $LOGBEGIN
- git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
- echo $LOGEND
-}
-
-
-# --------------- Miscellaneous utilities
-
-#
-# Show new revisions as the user would like to see them in the email.
-#
-show_new_revisions()
-{
- # This shows all log entries that are not already covered by
- # another ref - i.e. commits that are now accessible from this
- # ref that were previously not accessible
- # (see generate_update_branch_email for the explanation of this
- # command)
-
- # Revision range passed to rev-list differs for new vs. updated
- # branches.
- if [ "$change_type" = create ]
- then
- # Show all revisions exclusive to this (new) branch.
- revspec=$newrev
- else
- # Branch update; show revisions not part of $oldrev.
- revspec=$oldrev..$newrev
- fi
-
- other_branches=$(git for-each-ref --format='%(refname)' refs/heads/ |
- grep -F -v $refname)
- git rev-parse --not $other_branches |
- if [ -z "$custom_showrev" ]
- then
- git rev-list --pretty --stdin $revspec
- else
- git rev-list --stdin $revspec |
- while read onerev
- do
- eval $(printf "$custom_showrev" $onerev)
- done
- fi
-}
-
-
-limit_lines()
-{
- lines=0
- skipped=0
- while IFS="" read -r line; do
- lines=$((lines + 1))
- if [ $lines -gt $1 ]; then
- skipped=$((skipped + 1))
- else
- printf "%s\n" "$line"
- fi
- done
- if [ $skipped -ne 0 ]; then
- echo "... $skipped lines suppressed ..."
- fi
-}
-
-
-send_mail()
-{
- if [ -n "$envelopesender" ]; then
- /usr/sbin/sendmail -t -f "$envelopesender"
- else
- /usr/sbin/sendmail -t
- fi
-}
-
-# ---------------------------- main()
-
-# --- Constants
-LOGBEGIN="- Log -----------------------------------------------------------------"
-LOGEND="-----------------------------------------------------------------------"
-
-# --- Config
-# Set GIT_DIR either from the working directory, or from the environment
-# variable.
-GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
-if [ -z "$GIT_DIR" ]; then
- echo >&2 "fatal: post-receive: GIT_DIR not set"
- exit 1
-fi
-
-projectdesc=$(sed -ne '1p' "$GIT_DIR/description" 2>/dev/null)
-# Check if the description is unchanged from it's default, and shorten it to
-# a more manageable length if it is
-if expr "$projectdesc" : "Unnamed repository.*$" >/dev/null
-then
- projectdesc="UNNAMED PROJECT"
-fi
-
-recipients=$(git config hooks.mailinglist)
-announcerecipients=$(git config hooks.announcelist)
-envelopesender=$(git config hooks.envelopesender)
-emailprefix=$(git config hooks.emailprefix || echo '[SCM] ')
-custom_showrev=$(git config hooks.showrev)
-maxlines=$(git config hooks.emailmaxlines)
-diffopts=$(git config hooks.diffopts)
-: ${diffopts:="--stat --summary --find-copies-harder"}
-
-# --- Main loop
-# Allow dual mode: run from the command line just like the update hook, or
-# if no arguments are given then run as a hook script
-if [ -n "$1" -a -n "$2" -a -n "$3" ]; then
- # Output to the terminal in command line mode - if someone wanted to
- # resend an email; they could redirect the output to sendmail
- # themselves
- prep_for_email $2 $3 $1 && PAGER= generate_email
-else
- while read oldrev newrev refname
- do
- prep_for_email $oldrev $newrev $refname || continue
- generate_email $maxlines | send_mail
- done
-fi
diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
deleted file mode 100755
index 7ba78c4..0000000
--- a/contrib/hooks/pre-auto-gc-battery
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to verify if you are on battery, in case you
-# are running Linux or OS X. Called by git-gc --auto with no arguments.
-# The hook should exit with non-zero status after issuing an appropriate
-# message if it wants to stop the auto repacking.
-#
-# This hook is stored in the contrib/hooks directory. Your distribution
-# may have put this somewhere else. If you want to use this hook, you
-# should make this script executable then link to it in the repository
-# you would like to use it in.
-#
-# For example, if the hook is stored in
-# /usr/share/git-core/contrib/hooks/pre-auto-gc-battery:
-#
-# cd /path/to/your/repository.git
-# ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \
-# hooks/pre-auto-gc
-
-if test -x /sbin/on_ac_power && (/sbin/on_ac_power;test $? -ne 1)
-then
- exit 0
-elif test "$(cat /sys/class/power_supply/AC/online 2>/dev/null)" = 1
-then
- exit 0
-elif grep -q 'on-line' /proc/acpi/ac_adapter/AC/state 2>/dev/null
-then
- exit 0
-elif grep -q '0x01$' /proc/apm 2>/dev/null
-then
- exit 0
-elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
-then
- exit 0
-elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
- grep -q "drawing from 'AC Power'"
-then
- exit 0
-fi
-
-echo "Auto packing deferred; not on AC"
-exit 1
diff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl
deleted file mode 100755
index 2770a1b..0000000
--- a/contrib/hooks/setgitperms.perl
+++ /dev/null
@@ -1,214 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 2006 Josh England
-#
-# This script can be used to save/restore full permissions and ownership data
-# within a git working tree.
-#
-# To save permissions/ownership data, place this script in your .git/hooks
-# directory and enable a `pre-commit` hook with the following lines:
-# #!/bin/sh
-# SUBDIRECTORY_OK=1 . git-sh-setup
-# $GIT_DIR/hooks/setgitperms.perl -r
-#
-# To restore permissions/ownership data, place this script in your .git/hooks
-# directory and enable a `post-merge` and `post-checkout` hook with the
-# following lines:
-# #!/bin/sh
-# SUBDIRECTORY_OK=1 . git-sh-setup
-# $GIT_DIR/hooks/setgitperms.perl -w
-#
-use strict;
-use Getopt::Long;
-use File::Find;
-use File::Basename;
-
-my $usage =
-"usage: setgitperms.perl [OPTION]... <--read|--write>
-This program uses a file `.gitmeta` to store/restore permissions and uid/gid
-info for all files/dirs tracked by git in the repository.
-
----------------------------------Read Mode-------------------------------------
--r, --read Reads perms/etc from working dir into a .gitmeta file
--s, --stdout Output to stdout instead of .gitmeta
--d, --diff Show unified diff of perms file (XOR with --stdout)
-
----------------------------------Write Mode------------------------------------
--w, --write Modify perms/etc in working dir to match the .gitmeta file
--v, --verbose Be verbose
-
-\n";
-
-my ($stdout, $showdiff, $verbose, $read_mode, $write_mode);
-
-if ((@ARGV < 0) || !GetOptions(
- "stdout", \$stdout,
- "diff", \$showdiff,
- "read", \$read_mode,
- "write", \$write_mode,
- "verbose", \$verbose,
- )) { die $usage; }
-die $usage unless ($read_mode xor $write_mode);
-
-my $topdir = `git rev-parse --show-cdup` or die "\n"; chomp $topdir;
-my $gitdir = $topdir . '.git';
-my $gitmeta = $topdir . '.gitmeta';
-
-if ($write_mode) {
- # Update the working dir permissions/ownership based on data from .gitmeta
- open (IN, "<$gitmeta") or die "Could not open $gitmeta for reading: $!\n";
- while (defined ($_ = <IN>)) {
- chomp;
- if (/^(.*) mode=(\S+)\s+uid=(\d+)\s+gid=(\d+)/) {
- # Compare recorded perms to actual perms in the working dir
- my ($path, $mode, $uid, $gid) = ($1, $2, $3, $4);
- my $fullpath = $topdir . $path;
- my (undef,undef,$wmode,undef,$wuid,$wgid) = lstat($fullpath);
- $wmode = sprintf "%04o", $wmode & 07777;
- if ($mode ne $wmode) {
- $verbose && print "Updating permissions on $path: old=$wmode, new=$mode\n";
- chmod oct($mode), $fullpath;
- }
- if ($uid != $wuid || $gid != $wgid) {
- if ($verbose) {
- # Print out user/group names instead of uid/gid
- my $pwname = getpwuid($uid);
- my $grpname = getgrgid($gid);
- my $wpwname = getpwuid($wuid);
- my $wgrpname = getgrgid($wgid);
- $pwname = $uid if !defined $pwname;
- $grpname = $gid if !defined $grpname;
- $wpwname = $wuid if !defined $wpwname;
- $wgrpname = $wgid if !defined $wgrpname;
-
- print "Updating uid/gid on $path: old=$wpwname/$wgrpname, new=$pwname/$grpname\n";
- }
- chown $uid, $gid, $fullpath;
- }
- }
- else {
- warn "Invalid input format in $gitmeta:\n\t$_\n";
- }
- }
- close IN;
-}
-elsif ($read_mode) {
- # Handle merge conflicts in the .gitperms file
- if (-e "$gitdir/MERGE_MSG") {
- if (`grep ====== $gitmeta`) {
- # Conflict not resolved -- abort the commit
- print "PERMISSIONS/OWNERSHIP CONFLICT\n";
- print " Resolve the conflict in the $gitmeta file and then run\n";
- print " `.git/hooks/setgitperms.perl --write` to reconcile.\n";
- exit 1;
- }
- elsif (`grep $gitmeta $gitdir/MERGE_MSG`) {
- # A conflict in .gitmeta has been manually resolved. Verify that
- # the working dir perms matches the current .gitmeta perms for
- # each file/dir that conflicted.
- # This is here because a `setgitperms.perl --write` was not
- # performed due to a merge conflict, so permissions/ownership
- # may not be consistent with the manually merged .gitmeta file.
- my @conflict_diff = `git show \$(cat $gitdir/MERGE_HEAD)`;
- my @conflict_files;
- my $metadiff = 0;
-
- # Build a list of files that conflicted from the .gitmeta diff
- foreach my $line (@conflict_diff) {
- if ($line =~ m|^diff --git a/$gitmeta b/$gitmeta|) {
- $metadiff = 1;
- }
- elsif ($line =~ /^diff --git/) {
- $metadiff = 0;
- }
- elsif ($metadiff && $line =~ /^\+(.*) mode=/) {
- push @conflict_files, $1;
- }
- }
-
- # Verify that each conflict file now has permissions consistent
- # with the .gitmeta file
- foreach my $file (@conflict_files) {
- my $absfile = $topdir . $file;
- my $gm_entry = `grep "^$file mode=" $gitmeta`;
- if ($gm_entry =~ /mode=(\d+) uid=(\d+) gid=(\d+)/) {
- my ($gm_mode, $gm_uid, $gm_gid) = ($1, $2, $3);
- my (undef,undef,$mode,undef,$uid,$gid) = lstat("$absfile");
- $mode = sprintf("%04o", $mode & 07777);
- if (($gm_mode ne $mode) || ($gm_uid != $uid)
- || ($gm_gid != $gid)) {
- print "PERMISSIONS/OWNERSHIP CONFLICT\n";
- print " Mismatch found for file: $file\n";
- print " Run `.git/hooks/setgitperms.perl --write` to reconcile.\n";
- exit 1;
- }
- }
- else {
- print "Warning! Permissions/ownership no longer being tracked for file: $file\n";
- }
- }
- }
- }
-
- # No merge conflicts -- write out perms/ownership data to .gitmeta file
- unless ($stdout) {
- open (OUT, ">$gitmeta.tmp") or die "Could not open $gitmeta.tmp for writing: $!\n";
- }
-
- my @files = `git ls-files`;
- my %dirs;
-
- foreach my $path (@files) {
- chomp $path;
- # We have to manually add stats for parent directories
- my $parent = dirname($path);
- while (!exists $dirs{$parent}) {
- $dirs{$parent} = 1;
- next if $parent eq '.';
- printstats($parent);
- $parent = dirname($parent);
- }
- # Now the git-tracked file
- printstats($path);
- }
-
- # diff the temporary metadata file to see if anything has changed
- # If no metadata has changed, don't overwrite the real file
- # This is just so `git commit -a` doesn't try to commit a bogus update
- unless ($stdout) {
- if (! -e $gitmeta) {
- rename "$gitmeta.tmp", $gitmeta;
- }
- else {
- my $diff = `diff -U 0 $gitmeta $gitmeta.tmp`;
- if ($diff ne '') {
- rename "$gitmeta.tmp", $gitmeta;
- }
- else {
- unlink "$gitmeta.tmp";
- }
- if ($showdiff) {
- print $diff;
- }
- }
- close OUT;
- }
- # Make sure the .gitmeta file is tracked
- system("git add $gitmeta");
-}
-
-
-sub printstats {
- my $path = $_[0];
- $path =~ s/@/\@/g;
- my (undef,undef,$mode,undef,$uid,$gid) = lstat($path);
- $path =~ s/%/\%/g;
- if ($stdout) {
- print $path;
- printf " mode=%04o uid=$uid gid=$gid\n", $mode & 07777;
- }
- else {
- print OUT $path;
- printf OUT " mode=%04o uid=$uid gid=$gid\n", $mode & 07777;
- }
-}
diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
deleted file mode 100755
index 0092d67..0000000
--- a/contrib/hooks/update-paranoid
+++ /dev/null
@@ -1,421 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use File::Spec;
-
-$ENV{PATH} = '/opt/git/bin';
-my $acl_git = '/vcs/acls.git';
-my $acl_branch = 'refs/heads/master';
-my $debug = 0;
-
-=doc
-Invoked as: update refname old-sha1 new-sha1
-
-This script is run by git-receive-pack once for each ref that the
-client is trying to modify. If we exit with a non-zero exit value
-then the update for that particular ref is denied, but updates for
-other refs in the same run of receive-pack may still be allowed.
-
-We are run after the objects have been uploaded, but before the
-ref is actually modified. We take advantage of that fact when we
-look for "new" commits and tags (the new objects won't show up in
-`rev-list --all`).
-
-This script loads and parses the content of the config file
-"users/$this_user.acl" from the $acl_branch commit of $acl_git ODB.
-The acl file is a git-config style file, but uses a slightly more
-restricted syntax as the Perl parser contained within this script
-is not nearly as permissive as git-config.
-
-Example:
-
- [user]
- committer = John Doe <john.doe@example.com>
- committer = John R. Doe <john.doe@example.com>
-
- [repository "acls"]
- allow = heads/master
- allow = CDUR for heads/jd/
- allow = C for ^tags/v\\d+$
-
-For all new commit or tag objects the committer (or tagger) line
-within the object must exactly match one of the user.committer
-values listed in the acl file ("HEAD:users/$this_user.acl").
-
-For a branch to be modified an allow line within the matching
-repository section must be matched for both the refname and the
-opcode.
-
-Repository sections are matched on the basename of the repository
-(after removing the .git suffix).
-
-The opcode abbreviations are:
-
- C: create new ref
- D: delete existing ref
- U: fast-forward existing ref (no commit loss)
- R: rewind/rebase existing ref (commit loss)
-
-if no opcodes are listed before the "for" keyword then "U" (for
-fast-forward update only) is assumed as this is the most common
-usage.
-
-Refnames are matched by always assuming a prefix of "refs/".
-This hook forbids pushing or deleting anything not under "refs/".
-
-Refnames that start with ^ are Perl regular expressions, and the ^
-is kept as part of the regexp. \\ is needed to get just one \, so
-\\d expands to \d in Perl. The 3rd allow line above is an example.
-
-Refnames that don't start with ^ but that end with / are prefix
-matches (2nd allow line above); all other refnames are strict
-equality matches (1st allow line).
-
-Anything pushed to "heads/" (ok, really "refs/heads/") must be
-a commit. Tags are not permitted here.
-
-Anything pushed to "tags/" (err, really "refs/tags/") must be an
-annotated tag. Commits, blobs, trees, etc. are not permitted here.
-Annotated tag signatures aren't checked, nor are they required.
-
-The special subrepository of 'info/new-commit-check' can
-be created and used to allow users to push new commits and
-tags from another local repository to this one, even if they
-aren't the committer/tagger of those objects. In a nut shell
-the info/new-commit-check directory is a Git repository whose
-objects/info/alternates file lists this repository and all other
-possible sources, and whose refs subdirectory contains symlinks
-to this repository's refs subdirectory, and to all other possible
-sources refs subdirectories. Yes, this means that you cannot
-use packed-refs in those repositories as they won't be resolved
-correctly.
-
-=cut
-
-my $git_dir = $ENV{GIT_DIR};
-my $new_commit_check = "$git_dir/info/new-commit-check";
-my $ref = $ARGV[0];
-my $old = $ARGV[1];
-my $new = $ARGV[2];
-my $new_type;
-my ($this_user) = getpwuid $<; # REAL_USER_ID
-my $repository_name;
-my %user_committer;
-my @allow_rules;
-my @path_rules;
-my %diff_cache;
-
-sub deny ($) {
- print STDERR "-Deny- $_[0]\n" if $debug;
- print STDERR "\ndenied: $_[0]\n\n";
- exit 1;
-}
-
-sub grant ($) {
- print STDERR "-Grant- $_[0]\n" if $debug;
- exit 0;
-}
-
-sub info ($) {
- print STDERR "-Info- $_[0]\n" if $debug;
-}
-
-sub git_value (@) {
- open(T,'-|','git',@_); local $_ = <T>; chop; close T; $_;
-}
-
-sub match_string ($$) {
- my ($acl_n, $ref) = @_;
- ($acl_n eq $ref)
- || ($acl_n =~ m,/$, && substr($ref,0,length $acl_n) eq $acl_n)
- || ($acl_n =~ m,^\^, && $ref =~ m:$acl_n:);
-}
-
-sub parse_config ($$$$) {
- my $data = shift;
- local $ENV{GIT_DIR} = shift;
- my $br = shift;
- my $fn = shift;
- return unless git_value('rev-list','--max-count=1',$br,'--',$fn);
- info "Loading $br:$fn";
- open(I,'-|','git','cat-file','blob',"$br:$fn");
- my $section = '';
- while (<I>) {
- chomp;
- if (/^\s*$/ || /^\s*#/) {
- } elsif (/^\[([a-z]+)\]$/i) {
- $section = lc $1;
- } elsif (/^\[([a-z]+)\s+"(.*)"\]$/i) {
- $section = join('.',lc $1,$2);
- } elsif (/^\s*([a-z][a-z0-9]+)\s*=\s*(.*?)\s*$/i) {
- push @{$data->{join('.',$section,lc $1)}}, $2;
- } else {
- deny "bad config file line $. in $br:$fn";
- }
- }
- close I;
-}
-
-sub all_new_committers () {
- local $ENV{GIT_DIR} = $git_dir;
- $ENV{GIT_DIR} = $new_commit_check if -d $new_commit_check;
-
- info "Getting committers of new commits.";
- my %used;
- open(T,'-|','git','rev-list','--pretty=raw',$new,'--not','--all');
- while (<T>) {
- next unless s/^committer //;
- chop;
- s/>.*$/>/;
- info "Found $_." unless $used{$_}++;
- }
- close T;
- info "No new commits." unless %used;
- keys %used;
-}
-
-sub all_new_taggers () {
- my %exists;
- open(T,'-|','git','for-each-ref','--format=%(objectname)','refs/tags');
- while (<T>) {
- chop;
- $exists{$_} = 1;
- }
- close T;
-
- info "Getting taggers of new tags.";
- my %used;
- my $obj = $new;
- my $obj_type = $new_type;
- while ($obj_type eq 'tag') {
- last if $exists{$obj};
- $obj_type = '';
- open(T,'-|','git','cat-file','tag',$obj);
- while (<T>) {
- chop;
- if (/^object ([a-z0-9]{40})$/) {
- $obj = $1;
- } elsif (/^type (.+)$/) {
- $obj_type = $1;
- } elsif (s/^tagger //) {
- s/>.*$/>/;
- info "Found $_." unless $used{$_}++;
- last;
- }
- }
- close T;
- }
- info "No new tags." unless %used;
- keys %used;
-}
-
-sub check_committers (@) {
- my @bad;
- foreach (@_) { push @bad, $_ unless $user_committer{$_}; }
- if (@bad) {
- print STDERR "\n";
- print STDERR "You are not $_.\n" foreach (sort @bad);
- deny "You cannot push changes not committed by you.";
- }
-}
-
-sub load_diff ($) {
- my $base = shift;
- my $d = $diff_cache{$base};
- unless ($d) {
- local $/ = "\0";
- my %this_diff;
- if ($base =~ /^0{40}$/) {
- # Don't load the diff at all; we are making the
- # branch and have no base to compare to in this
- # case. A file level ACL makes no sense in this
- # context. Having an empty diff will allow the
- # branch creation.
- #
- } else {
- open(T,'-|','git','diff-tree',
- '-r','--name-status','-z',
- $base,$new) or return undef;
- while (<T>) {
- my $op = $_;
- chop $op;
-
- my $path = <T>;
- chop $path;
-
- $this_diff{$path} = $op;
- }
- close T or return undef;
- }
- $d = \%this_diff;
- $diff_cache{$base} = $d;
- }
- return $d;
-}
-
-deny "No GIT_DIR inherited from caller" unless $git_dir;
-deny "Need a ref name" unless $ref;
-deny "Refusing funny ref $ref" unless $ref =~ s,^refs/,,;
-deny "Bad old value $old" unless $old =~ /^[a-z0-9]{40}$/;
-deny "Bad new value $new" unless $new =~ /^[a-z0-9]{40}$/;
-deny "Cannot determine who you are." unless $this_user;
-grant "No change requested." if $old eq $new;
-
-$repository_name = File::Spec->rel2abs($git_dir);
-$repository_name =~ m,/([^/]+)(?:\.git|/\.git)$,;
-$repository_name = $1;
-info "Updating in '$repository_name'.";
-
-my $op;
-if ($old =~ /^0{40}$/) { $op = 'C'; }
-elsif ($new =~ /^0{40}$/) { $op = 'D'; }
-else { $op = 'R'; }
-
-# This is really an update (fast-forward) if the
-# merge base of $old and $new is $old.
-#
-$op = 'U' if ($op eq 'R'
- && $ref =~ m,^heads/,
- && $old eq git_value('merge-base',$old,$new));
-
-# Load the user's ACL file. Expand groups (user.memberof) one level.
-{
- my %data = ('user.committer' => []);
- parse_config(\%data,$acl_git,$acl_branch,"external/$repository_name.acl");
-
- %data = (
- 'user.committer' => $data{'user.committer'},
- 'user.memberof' => [],
- );
- parse_config(\%data,$acl_git,$acl_branch,"users/$this_user.acl");
-
- %user_committer = map {$_ => $_} @{$data{'user.committer'}};
- my $rule_key = "repository.$repository_name.allow";
- my $rules = $data{$rule_key} || [];
-
- foreach my $group (@{$data{'user.memberof'}}) {
- my %g;
- parse_config(\%g,$acl_git,$acl_branch,"groups/$group.acl");
- my $group_rules = $g{$rule_key};
- push @$rules, @$group_rules if $group_rules;
- }
-
-RULE:
- foreach (@$rules) {
- while (/\${user\.([a-z][a-zA-Z0-9]+)}/) {
- my $k = lc $1;
- my $v = $data{"user.$k"};
- next RULE unless defined $v;
- next RULE if @$v != 1;
- next RULE unless defined $v->[0];
- s/\${user\.$k}/$v->[0]/g;
- }
-
- if (/^([AMD ]+)\s+of\s+([^\s]+)\s+for\s+([^\s]+)\s+diff\s+([^\s]+)$/) {
- my ($ops, $pth, $ref, $bst) = ($1, $2, $3, $4);
- $ops =~ s/ //g;
- $pth =~ s/\\\\/\\/g;
- $ref =~ s/\\\\/\\/g;
- push @path_rules, [$ops, $pth, $ref, $bst];
- } elsif (/^([AMD ]+)\s+of\s+([^\s]+)\s+for\s+([^\s]+)$/) {
- my ($ops, $pth, $ref) = ($1, $2, $3);
- $ops =~ s/ //g;
- $pth =~ s/\\\\/\\/g;
- $ref =~ s/\\\\/\\/g;
- push @path_rules, [$ops, $pth, $ref, $old];
- } elsif (/^([CDRU ]+)\s+for\s+([^\s]+)$/) {
- my $ops = $1;
- my $ref = $2;
- $ops =~ s/ //g;
- $ref =~ s/\\\\/\\/g;
- push @allow_rules, [$ops, $ref];
- } elsif (/^for\s+([^\s]+)$/) {
- # Mentioned, but nothing granted?
- } elsif (/^[^\s]+$/) {
- s/\\\\/\\/g;
- push @allow_rules, ['U', $_];
- }
- }
-}
-
-if ($op ne 'D') {
- $new_type = git_value('cat-file','-t',$new);
-
- if ($ref =~ m,^heads/,) {
- deny "$ref must be a commit." unless $new_type eq 'commit';
- } elsif ($ref =~ m,^tags/,) {
- deny "$ref must be an annotated tag." unless $new_type eq 'tag';
- }
-
- check_committers (all_new_committers);
- check_committers (all_new_taggers) if $new_type eq 'tag';
-}
-
-info "$this_user wants $op for $ref";
-foreach my $acl_entry (@allow_rules) {
- my ($acl_ops, $acl_n) = @$acl_entry;
- next unless $acl_ops =~ /^[CDRU]+$/; # Uhh.... shouldn't happen.
- next unless $acl_n;
- next unless $op =~ /^[$acl_ops]$/;
- next unless match_string $acl_n, $ref;
-
- # Don't test path rules on branch deletes.
- #
- grant "Allowed by: $acl_ops for $acl_n" if $op eq 'D';
-
- # Aggregate matching path rules; allow if there aren't
- # any matching this ref.
- #
- my %pr;
- foreach my $p_entry (@path_rules) {
- my ($p_ops, $p_n, $p_ref, $p_bst) = @$p_entry;
- next unless $p_ref;
- push @{$pr{$p_bst}}, $p_entry if match_string $p_ref, $ref;
- }
- grant "Allowed by: $acl_ops for $acl_n" unless %pr;
-
- # Allow only if all changes against a single base are
- # allowed by file path rules.
- #
- my @bad;
- foreach my $p_bst (keys %pr) {
- my $diff_ref = load_diff $p_bst;
- deny "Cannot difference trees." unless ref $diff_ref;
-
- my %fd = %$diff_ref;
- foreach my $p_entry (@{$pr{$p_bst}}) {
- my ($p_ops, $p_n, $p_ref, $p_bst) = @$p_entry;
- next unless $p_ops =~ /^[AMD]+$/;
- next unless $p_n;
-
- foreach my $f_n (keys %fd) {
- my $f_op = $fd{$f_n};
- next unless $f_op;
- next unless $f_op =~ /^[$p_ops]$/;
- delete $fd{$f_n} if match_string $p_n, $f_n;
- }
- last unless %fd;
- }
-
- if (%fd) {
- push @bad, [$p_bst, \%fd];
- } else {
- # All changes relative to $p_bst were allowed.
- #
- grant "Allowed by: $acl_ops for $acl_n diff $p_bst";
- }
- }
-
- foreach my $bad_ref (@bad) {
- my ($p_bst, $fd) = @$bad_ref;
- print STDERR "\n";
- print STDERR "Not allowed to make the following changes:\n";
- print STDERR "(base: $p_bst)\n";
- foreach my $f_n (sort keys %$fd) {
- print STDERR " $fd->{$f_n} $f_n\n";
- }
- }
- deny "You are not permitted to $op $ref";
-}
-close A;
-deny "You are not permitted to $op $ref";
diff --git a/contrib/mw-to-git/.gitignore b/contrib/mw-to-git/.gitignore
deleted file mode 100644
index ae545b0..0000000
--- a/contrib/mw-to-git/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-git-remote-mediawiki
-git-mw
diff --git a/contrib/mw-to-git/.perlcriticrc b/contrib/mw-to-git/.perlcriticrc
deleted file mode 100644
index b733326..0000000
--- a/contrib/mw-to-git/.perlcriticrc
+++ /dev/null
@@ -1,28 +0,0 @@
-# These 3 rules demand to add the s, m and x flag to *every* regexp. This is
-# overkill and would be harmful for readability.
-[-RegularExpressions::RequireExtendedFormatting]
-[-RegularExpressions::RequireDotMatchAnything]
-[-RegularExpressions::RequireLineBoundaryMatching]
-
-# This rule says that builtin functions should not be called with parentheses
-# e.g.: (taken from CPAN's documentation)
-# open($handle, '>', $filename); #not ok
-# open $handle, '>', $filename; #ok
-# Applying such a rule would mean modifying a huge number of lines for a
-# question of style.
-[-CodeLayout::ProhibitParensWithBuiltins]
-
-# This rule states that each system call should have its return value checked
-# The problem is that it includes the print call. Checking every print call's
-# return value would be harmful to the code readability.
-# This configuration keeps all default function but print.
-[InputOutput::RequireCheckedSyscalls]
-functions = open say close
-
-# This rule demands to add a dependency for the Readonly module. This is not
-# wished.
-[-ValuesAndExpressions::ProhibitConstantPragma]
-
-# This rule is not really useful (rather a question of style) and produces many
-# warnings among the code.
-[-ValuesAndExpressions::ProhibitNoisyQuotes]
diff --git a/contrib/mw-to-git/Git/Mediawiki.pm b/contrib/mw-to-git/Git/Mediawiki.pm
deleted file mode 100644
index 629c0ce..0000000
--- a/contrib/mw-to-git/Git/Mediawiki.pm
+++ /dev/null
@@ -1,101 +0,0 @@
-package Git::Mediawiki;
-
-require v5.26;
-use strict;
-use POSIX;
-use Git;
-
-BEGIN {
-
-our ($VERSION, @ISA, @EXPORT, @EXPORT_OK);
-
-# Totally unstable API.
-$VERSION = '0.01';
-
-require Exporter;
-
-@ISA = qw(Exporter);
-
-@EXPORT = ();
-
-# Methods which can be called as standalone functions as well:
-@EXPORT_OK = qw(clean_filename smudge_filename connect_maybe
- EMPTY HTTP_CODE_OK HTTP_CODE_PAGE_NOT_FOUND);
-}
-
-# Mediawiki filenames can contain forward slashes. This variable decides by which pattern they should be replaced
-use constant SLASH_REPLACEMENT => '%2F';
-
-# Used to test for empty strings
-use constant EMPTY => q{};
-
-# HTTP codes
-use constant HTTP_CODE_OK => 200;
-use constant HTTP_CODE_PAGE_NOT_FOUND => 404;
-
-sub clean_filename {
- my $filename = shift;
- $filename =~ s{@{[SLASH_REPLACEMENT]}}{/}g;
- # [, ], |, {, and } are forbidden by MediaWiki, even URL-encoded.
- # Do a variant of URL-encoding, i.e. looks like URL-encoding,
- # but with _ added to prevent MediaWiki from thinking this is
- # an actual special character.
- $filename =~ s/[\[\]\{\}\|]/sprintf("_%%_%x", ord($&))/ge;
- # If we use the uri escape before
- # we should unescape here, before anything
-
- return $filename;
-}
-
-sub smudge_filename {
- my $filename = shift;
- $filename =~ s{/}{@{[SLASH_REPLACEMENT]}}g;
- $filename =~ s/ /_/g;
- # Decode forbidden characters encoded in clean_filename
- $filename =~ s/_%_([0-9a-fA-F][0-9a-fA-F])/sprintf('%c', hex($1))/ge;
- return substr($filename, 0, NAME_MAX-length('.mw'));
-}
-
-sub connect_maybe {
- my $wiki = shift;
- if ($wiki) {
- return $wiki;
- }
-
- my $remote_name = shift;
- my $remote_url = shift;
- my ($wiki_login, $wiki_password, $wiki_domain);
-
- $wiki_login = Git::config("remote.${remote_name}.mwLogin");
- $wiki_password = Git::config("remote.${remote_name}.mwPassword");
- $wiki_domain = Git::config("remote.${remote_name}.mwDomain");
-
- $wiki = MediaWiki::API->new;
- $wiki->{config}->{api_url} = "${remote_url}/api.php";
- if ($wiki_login) {
- my %credential = (
- 'url' => $remote_url,
- 'username' => $wiki_login,
- 'password' => $wiki_password
- );
- Git::credential(\%credential);
- my $request = {lgname => $credential{username},
- lgpassword => $credential{password},
- lgdomain => $wiki_domain};
- if ($wiki->login($request)) {
- Git::credential(\%credential, 'approve');
- print {*STDERR} qq(Logged in mediawiki user "$credential{username}".\n);
- } else {
- print {*STDERR} qq(Failed to log in mediawiki user "$credential{username}" on ${remote_url}\n);
- print {*STDERR} ' (error ' .
- $wiki->{error}->{code} . ': ' .
- $wiki->{error}->{details} . ")\n";
- Git::credential(\%credential, 'reject');
- exit 1;
- }
- }
-
- return $wiki;
-}
-
-1; # Famous last words
diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
deleted file mode 100644
index 497ac43..0000000
--- a/contrib/mw-to-git/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (C) 2013
-# Matthieu Moy <Matthieu.Moy@imag.fr>
-#
-# To build and test:
-#
-# make
-# bin-wrapper/git mw preview Some_page.mw
-# bin-wrapper/git clone mediawiki::http://example.com/wiki/
-#
-# To install, run Git's toplevel 'make install' then run:
-#
-# make install
-
-# The default target of this Makefile is...
-all::
-
-GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
-SCRIPT_PERL=git-remote-mediawiki.perl
-SCRIPT_PERL+=git-mw.perl
-GIT_ROOT_DIR=../..
-HERE=contrib/mw-to-git/
-
-INSTALL = install
-
-SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
-INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
- -s --no-print-directory prefix=$(prefix) \
- perllibdir=$(perllibdir) perllibdir)
-DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
-INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
-
-all:: build
-
-test: all
- $(MAKE) -C t
-
-check: perlcritic test
-
-install_pm:
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
- $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
- '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
-
-build:
- $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
- build-perl-script
-
-install: install_pm
- $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
- install-perl-script
-
-clean:
- $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
- clean-perl-script
-
-perlcritic:
- perlcritic -5 $(SCRIPT_PERL)
- -perlcritic -2 $(SCRIPT_PERL)
-
-.PHONY: all test check install_pm install clean perlcritic
diff --git a/contrib/mw-to-git/bin-wrapper/git b/contrib/mw-to-git/bin-wrapper/git
deleted file mode 100755
index 6663ae5..0000000
--- a/contrib/mw-to-git/bin-wrapper/git
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# git executable wrapper script for Git-Mediawiki to run tests without
-# installing all the scripts and perl packages.
-
-GIT_ROOT_DIR=../../..
-GIT_EXEC_PATH=$(cd "$(dirname "$0")" && cd ${GIT_ROOT_DIR} && pwd)
-
-GITPERLLIB="$GIT_EXEC_PATH"'/contrib/mw-to-git'"${GITPERLLIB:+:$GITPERLLIB}"
-PATH="$GIT_EXEC_PATH"'/contrib/mw-to-git:'"$PATH"
-
-export GITPERLLIB PATH
-
-exec "${GIT_EXEC_PATH}/bin-wrappers/git" "$@"
diff --git a/contrib/mw-to-git/git-mw.perl b/contrib/mw-to-git/git-mw.perl
deleted file mode 100755
index eb52a53..0000000
--- a/contrib/mw-to-git/git-mw.perl
+++ /dev/null
@@ -1,368 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright (C) 2013
-# Benoit Person <benoit.person@ensimag.imag.fr>
-# Celestin Matte <celestin.matte@ensimag.imag.fr>
-# License: GPL v2 or later
-
-# Set of tools for git repo with a mediawiki remote.
-# Documentation & bugtracker: https://github.com/Git-Mediawiki/Git-Mediawiki
-
-use strict;
-use warnings;
-
-use Getopt::Long;
-use URI::URL qw(url);
-use LWP::UserAgent;
-use HTML::TreeBuilder;
-
-use Git;
-use MediaWiki::API;
-use Git::Mediawiki qw(clean_filename connect_maybe
- EMPTY HTTP_CODE_PAGE_NOT_FOUND);
-
-# By default, use UTF-8 to communicate with Git and the user
-binmode STDERR, ':encoding(UTF-8)';
-binmode STDOUT, ':encoding(UTF-8)';
-
-# Global parameters
-my $verbose = 0;
-sub v_print {
- if ($verbose) {
- return print {*STDERR} @_;
- }
- return;
-}
-
-# Preview parameters
-my $file_name = EMPTY;
-my $remote_name = EMPTY;
-my $preview_file_name = EMPTY;
-my $autoload = 0;
-sub file {
- $file_name = shift;
- return $file_name;
-}
-
-my %commands = (
- 'help' =>
- [\&help, {}, \&help],
- 'preview' =>
- [\&preview, {
- '<>' => \&file,
- 'output|o=s' => \$preview_file_name,
- 'remote|r=s' => \$remote_name,
- 'autoload|a' => \$autoload
- }, \&preview_help]
-);
-
-# Search for sub-command
-my $cmd = $commands{'help'};
-for (0..@ARGV-1) {
- if (defined $commands{$ARGV[$_]}) {
- $cmd = $commands{$ARGV[$_]};
- splice @ARGV, $_, 1;
- last;
- }
-};
-GetOptions( %{$cmd->[1]},
- 'help|h' => \&{$cmd->[2]},
- 'verbose|v' => \$verbose);
-
-# Launch command
-&{$cmd->[0]};
-
-############################# Preview Functions ################################
-
-sub preview_help {
- print {*STDOUT} <<'END';
-USAGE: git mw preview [--remote|-r <remote name>] [--autoload|-a]
- [--output|-o <output filename>] [--verbose|-v]
- <blob> | <filename>
-
-DESCRIPTION:
-Preview is an utiliy to preview local content of a mediawiki repo as if it was
-pushed on the remote.
-
-For that, preview searches for the remote name of the current branch's
-upstream if --remote is not set. If that remote is not found or if it
-is not a mediawiki, it lists all mediawiki remotes configured and asks
-you to replay your command with the --remote option set properly.
-
-Then, it searches for a file named 'filename'. If it's not found in
-the current dir, it will assume it's a blob.
-
-The content retrieved in the file (or in the blob) will then be parsed
-by the remote mediawiki and combined with a template retrieved from
-the mediawiki.
-
-Finally, preview will save the HTML result in a file. and autoload it
-in your default web browser if the option --autoload is present.
-
-OPTIONS:
- -r <remote name>, --remote <remote name>
- If the remote is a mediawiki, the template and the parse engine
- used for the preview will be those of that remote.
- If not, a list of valid remotes will be shown.
-
- -a, --autoload
- Try to load the HTML output in a new tab (or new window) of your
- default web browser.
-
- -o <output filename>, --output <output filename>
- Change the HTML output filename. Default filename is based on the
- input filename with its extension replaced by '.html'.
-
- -v, --verbose
- Show more information on what's going on under the hood.
-END
- exit;
-}
-
-sub preview {
- my $wiki;
- my ($remote_url, $wiki_page_name);
- my ($new_content, $template);
- my $file_content;
-
- if ($file_name eq EMPTY) {
- die "Missing file argument, see `git mw help`\n";
- }
-
- v_print("### Selecting remote\n");
- if ($remote_name eq EMPTY) {
- $remote_name = find_upstream_remote_name();
- if ($remote_name) {
- $remote_url = mediawiki_remote_url_maybe($remote_name);
- }
-
- if (! $remote_url) {
- my @valid_remotes = find_mediawiki_remotes();
-
- if ($#valid_remotes == 0) {
- print {*STDERR} "No mediawiki remote in this repo. \n";
- exit 1;
- } else {
- my $remotes_list = join("\n\t", @valid_remotes);
- print {*STDERR} <<"MESSAGE";
-There are multiple mediawiki remotes, which of:
- ${remotes_list}
-do you want ? Use the -r option to specify the remote.
-MESSAGE
- }
-
- exit 1;
- }
- } else {
- if (!is_valid_remote($remote_name)) {
- die "${remote_name} is not a remote\n";
- }
-
- $remote_url = mediawiki_remote_url_maybe($remote_name);
- if (! $remote_url) {
- die "${remote_name} is not a mediawiki remote\n";
- }
- }
- v_print("selected remote:\n\tname: ${remote_name}\n\turl: ${remote_url}\n");
-
- $wiki = connect_maybe($wiki, $remote_name, $remote_url);
-
- # Read file content
- if (! -e $file_name) {
- $file_content = git_cmd_try {
- Git::command('cat-file', 'blob', $file_name); }
- "%s failed w/ code %d";
-
- if ($file_name =~ /(.+):(.+)/) {
- $file_name = $2;
- }
- } else {
- open my $read_fh, "<", $file_name
- or die "could not open ${file_name}: $!\n";
- $file_content = do { local $/ = undef; <$read_fh> };
- close $read_fh
- or die "unable to close: $!\n";
- }
-
- v_print("### Retrieving template\n");
- ($wiki_page_name = clean_filename($file_name)) =~ s/\.[^.]+$//;
- $template = get_template($remote_url, $wiki_page_name);
-
- v_print("### Parsing local content\n");
- $new_content = $wiki->api({
- action => 'parse',
- text => $file_content,
- title => $wiki_page_name
- }, {
- skip_encoding => 1
- }) or die "No response from remote mediawiki\n";
- $new_content = $new_content->{'parse'}->{'text'}->{'*'};
-
- v_print("### Merging contents\n");
- if ($preview_file_name eq EMPTY) {
- ($preview_file_name = $file_name) =~ s/\.[^.]+$/.html/;
- }
- open(my $save_fh, '>:encoding(UTF-8)', $preview_file_name)
- or die "Could not open: $!\n";
- print {$save_fh} merge_contents($template, $new_content, $remote_url);
- close($save_fh)
- or die "Could not close: $!\n";
-
- v_print("### Results\n");
- if ($autoload) {
- v_print("Launching browser w/ file: ${preview_file_name}");
- system('git', 'web--browse', $preview_file_name);
- } else {
- print {*STDERR} "Preview file saved as: ${preview_file_name}\n";
- }
-
- exit;
-}
-
-# uses global scope variable: $remote_name
-sub merge_contents {
- my $template = shift;
- my $content = shift;
- my $remote_url = shift;
- my ($content_tree, $html_tree, $mw_content_text);
- my $template_content_id = 'bodyContent';
-
- $html_tree = HTML::TreeBuilder->new;
- $html_tree->parse($template);
-
- $content_tree = HTML::TreeBuilder->new;
- $content_tree->parse($content);
-
- $template_content_id = Git::config("remote.${remote_name}.mwIDcontent")
- || $template_content_id;
- v_print("Using '${template_content_id}' as the content ID\n");
-
- $mw_content_text = $html_tree->look_down('id', $template_content_id);
- if (!defined $mw_content_text) {
- print {*STDERR} <<"CONFIG";
-Could not combine the new content with the template. You might want to
-configure `mediawiki.IDContent` in your config:
- git config --add remote.${remote_name}.mwIDcontent <id>
-and re-run the command afterward.
-CONFIG
- exit 1;
- }
- $mw_content_text->delete_content();
- $mw_content_text->push_content($content_tree);
-
- make_links_absolute($html_tree, $remote_url);
-
- return $html_tree->as_HTML;
-}
-
-sub make_links_absolute {
- my $html_tree = shift;
- my $remote_url = shift;
- for (@{ $html_tree->extract_links() }) {
- my ($link, $element, $attr) = @{ $_ };
- my $url = url($link)->canonical;
- if ($url !~ /#/) {
- $element->attr($attr, URI->new_abs($url, $remote_url));
- }
- }
- return $html_tree;
-}
-
-sub is_valid_remote {
- my $remote = shift;
- my @remotes = git_cmd_try {
- Git::command('remote') }
- "%s failed w/ code %d";
- my $found_remote = 0;
- foreach my $remote (@remotes) {
- if ($remote eq $remote) {
- $found_remote = 1;
- last;
- }
- }
- return $found_remote;
-}
-
-sub find_mediawiki_remotes {
- my @remotes = git_cmd_try {
- Git::command('remote'); }
- "%s failed w/ code %d";
- my $remote_url;
- my @valid_remotes = ();
- foreach my $remote (@remotes) {
- $remote_url = mediawiki_remote_url_maybe($remote);
- if ($remote_url) {
- push(@valid_remotes, $remote);
- }
- }
- return @valid_remotes;
-}
-
-sub find_upstream_remote_name {
- my $current_branch = git_cmd_try {
- Git::command_oneline('symbolic-ref', '--short', 'HEAD') }
- "%s failed w/ code %d";
- return Git::config("branch.${current_branch}.remote");
-}
-
-sub mediawiki_remote_url_maybe {
- my $remote = shift;
-
- # Find remote url
- my $remote_url = Git::config("remote.${remote}.url");
- if ($remote_url =~ s/mediawiki::(.*)/$1/) {
- return url($remote_url)->canonical;
- }
-
- return;
-}
-
-sub get_template {
- my $url = shift;
- my $page_name = shift;
- my ($req, $res, $code, $url_after);
-
- $req = LWP::UserAgent->new;
- if ($verbose) {
- $req->show_progress(1);
- }
-
- $res = $req->get("${url}/index.php?title=${page_name}");
- if (!$res->is_success) {
- $code = $res->code;
- $url_after = $res->request()->uri(); # resolve all redirections
- if ($code == HTTP_CODE_PAGE_NOT_FOUND) {
- if ($verbose) {
- print {*STDERR} <<"WARNING";
-Warning: Failed to retrieve '$page_name'. Create it on the mediawiki if you want
-all the links to work properly.
-Trying to use the mediawiki homepage as a fallback template ...
-WARNING
- }
-
- # LWP automatically redirects GET request
- $res = $req->get("${url}/index.php");
- if (!$res->is_success) {
- $url_after = $res->request()->uri(); # resolve all redirections
- die "Failed to get homepage @ ${url_after} w/ code ${code}\n";
- }
- } else {
- die "Failed to get '${page_name}' @ ${url_after} w/ code ${code}\n";
- }
- }
-
- return $res->decoded_content;
-}
-
-############################## Help Functions ##################################
-
-sub help {
- print {*STDOUT} <<'END';
-usage: git mw <command> <args>
-
-git mw commands are:
- help Display help information about git mw
- preview Parse and render local file into HTML
-END
- exit;
-}
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
deleted file mode 100755
index a562441..0000000
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ /dev/null
@@ -1,1390 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright (C) 2011
-# Jérémie Nikaes <jeremie.nikaes@ensimag.imag.fr>
-# Arnaud Lacurie <arnaud.lacurie@ensimag.imag.fr>
-# Claire Fousse <claire.fousse@ensimag.imag.fr>
-# David Amouyal <david.amouyal@ensimag.imag.fr>
-# Matthieu Moy <matthieu.moy@grenoble-inp.fr>
-# License: GPL v2 or later
-
-# Gateway between Git and MediaWiki.
-# Documentation & bugtracker: https://github.com/Git-Mediawiki/Git-Mediawiki
-
-use strict;
-use MediaWiki::API;
-use Git;
-use Git::Mediawiki qw(clean_filename smudge_filename connect_maybe
- EMPTY HTTP_CODE_OK);
-use DateTime::Format::ISO8601;
-use warnings;
-
-# By default, use UTF-8 to communicate with Git and the user
-binmode STDERR, ':encoding(UTF-8)';
-binmode STDOUT, ':encoding(UTF-8)';
-
-use URI::Escape;
-
-# It's not always possible to delete pages (may require some
-# privileges). Deleted pages are replaced with this content.
-use constant DELETED_CONTENT => "[[Category:Deleted]]\n";
-
-# It's not possible to create empty pages. New empty files in Git are
-# sent with this content instead.
-use constant EMPTY_CONTENT => "<!-- empty page -->\n";
-
-# used to reflect file creation or deletion in diff.
-use constant NULL_SHA1 => '0000000000000000000000000000000000000000';
-
-# Used on Git's side to reflect empty edit messages on the wiki
-use constant EMPTY_MESSAGE => '*Empty MediaWiki Message*';
-
-# Number of pages taken into account at once in submodule get_mw_page_list
-use constant SLICE_SIZE => 50;
-
-# Number of linked mediafile to get at once in get_linked_mediafiles
-# The query is split in small batches because of the MW API limit of
-# the number of links to be returned (500 links max).
-use constant BATCH_SIZE => 10;
-
-if (@ARGV != 2) {
- exit_error_usage();
-}
-
-my $remotename = $ARGV[0];
-my $url = $ARGV[1];
-
-# Accept both space-separated and multiple keys in config file.
-# Spaces should be written as _ anyway because we'll use chomp.
-my @tracked_pages = split(/[ \n]/, run_git_quoted(["config", "--get-all", "remote.${remotename}.pages"]));
-chomp(@tracked_pages);
-
-# Just like @tracked_pages, but for MediaWiki categories.
-my @tracked_categories = split(/[ \n]/, run_git_quoted(["config", "--get-all", "remote.${remotename}.categories"]));
-chomp(@tracked_categories);
-
-# Just like @tracked_categories, but for MediaWiki namespaces.
-my @tracked_namespaces = split(/[ \n]/, run_git_quoted(["config", "--get-all", "remote.${remotename}.namespaces"]));
-for (@tracked_namespaces) { s/_/ /g; }
-chomp(@tracked_namespaces);
-
-# Import media files on pull
-my $import_media = run_git_quoted(["config", "--get", "--bool", "remote.${remotename}.mediaimport"]);
-chomp($import_media);
-$import_media = ($import_media eq 'true');
-
-# Export media files on push
-my $export_media = run_git_quoted(["config", "--get", "--bool", "remote.${remotename}.mediaexport"]);
-chomp($export_media);
-$export_media = !($export_media eq 'false');
-
-my $wiki_login = run_git_quoted(["config", "--get", "remote.${remotename}.mwLogin"]);
-# Note: mwPassword is discouraged. Use the credential system instead.
-my $wiki_passwd = run_git_quoted(["config", "--get", "remote.${remotename}.mwPassword"]);
-my $wiki_domain = run_git_quoted(["config", "--get", "remote.${remotename}.mwDomain"]);
-chomp($wiki_login);
-chomp($wiki_passwd);
-chomp($wiki_domain);
-
-# Import only last revisions (both for clone and fetch)
-my $shallow_import = run_git_quoted(["config", "--get", "--bool", "remote.${remotename}.shallow"]);
-chomp($shallow_import);
-$shallow_import = ($shallow_import eq 'true');
-
-# Fetch (clone and pull) by revisions instead of by pages. This behavior
-# is more efficient when we have a wiki with lots of pages and we fetch
-# the revisions quite often so that they concern only few pages.
-# Possible values:
-# - by_rev: perform one query per new revision on the remote wiki
-# - by_page: query each tracked page for new revision
-my $fetch_strategy = run_git_quoted(["config", "--get", "remote.${remotename}.fetchStrategy"]);
-if (!$fetch_strategy) {
- $fetch_strategy = run_git_quoted(["config", "--get", "mediawiki.fetchStrategy"]);
-}
-chomp($fetch_strategy);
-if (!$fetch_strategy) {
- $fetch_strategy = 'by_page';
-}
-
-# Remember the timestamp corresponding to a revision id.
-my %basetimestamps;
-
-# Dumb push: don't update notes and mediawiki ref to reflect the last push.
-#
-# Configurable with mediawiki.dumbPush, or per-remote with
-# remote.<remotename>.dumbPush.
-#
-# This means the user will have to re-import the just-pushed
-# revisions. On the other hand, this means that the Git revisions
-# corresponding to MediaWiki revisions are all imported from the wiki,
-# regardless of whether they were initially created in Git or from the
-# web interface, hence all users will get the same history (i.e. if
-# the push from Git to MediaWiki loses some information, everybody
-# will get the history with information lost). If the import is
-# deterministic, this means everybody gets the same sha1 for each
-# MediaWiki revision.
-my $dumb_push = run_git_quoted(["config", "--get", "--bool", "remote.${remotename}.dumbPush"]);
-if (!$dumb_push) {
- $dumb_push = run_git_quoted(["config", "--get", "--bool", "mediawiki.dumbPush"]);
-}
-chomp($dumb_push);
-$dumb_push = ($dumb_push eq 'true');
-
-my $wiki_name = $url;
-$wiki_name =~ s{[^/]*://}{};
-# If URL is like http://user:password@example.com/, we clearly don't
-# want the password in $wiki_name. While we're there, also remove user
-# and '@' sign, to avoid author like MWUser@HTTPUser@host.com
-$wiki_name =~ s/^.*@//;
-
-# Commands parser
-while (<STDIN>) {
- chomp;
-
- if (!parse_command($_)) {
- last;
- }
-
- BEGIN { $| = 1 } # flush STDOUT, to make sure the previous
- # command is fully processed.
-}
-
-########################## Functions ##############################
-
-## error handling
-sub exit_error_usage {
- die "ERROR: git-remote-mediawiki module was not called with a correct number of\n" .
- "parameters\n" .
- "You may obtain this error because you attempted to run the git-remote-mediawiki\n" .
- "module directly.\n" .
- "This module can be used the following way:\n" .
- "\tgit clone mediawiki://<address of a mediawiki>\n" .
- "Then, use git commit, push and pull as with every normal git repository.\n";
-}
-
-sub parse_command {
- my ($line) = @_;
- my @cmd = split(/ /, $line);
- if (!defined $cmd[0]) {
- return 0;
- }
- if ($cmd[0] eq 'capabilities') {
- die("Too many arguments for capabilities\n")
- if (defined($cmd[1]));
- mw_capabilities();
- } elsif ($cmd[0] eq 'list') {
- die("Too many arguments for list\n") if (defined($cmd[2]));
- mw_list($cmd[1]);
- } elsif ($cmd[0] eq 'import') {
- die("Invalid argument for import\n")
- if ($cmd[1] eq EMPTY);
- die("Too many arguments for import\n")
- if (defined($cmd[2]));
- mw_import($cmd[1]);
- } elsif ($cmd[0] eq 'option') {
- die("Invalid arguments for option\n")
- if ($cmd[1] eq EMPTY || $cmd[2] eq EMPTY);
- die("Too many arguments for option\n")
- if (defined($cmd[3]));
- mw_option($cmd[1],$cmd[2]);
- } elsif ($cmd[0] eq 'push') {
- mw_push($cmd[1]);
- } else {
- print {*STDERR} "Unknown command. Aborting...\n";
- return 0;
- }
- return 1;
-}
-
-# MediaWiki API instance, created lazily.
-my $mediawiki;
-
-sub fatal_mw_error {
- my $action = shift;
- print STDERR "fatal: could not $action.\n";
- print STDERR "fatal: '$url' does not appear to be a mediawiki\n";
- if ($url =~ /^https/) {
- print STDERR "fatal: make sure '$url/api.php' is a valid page\n";
- print STDERR "fatal: and the SSL certificate is correct.\n";
- } else {
- print STDERR "fatal: make sure '$url/api.php' is a valid page.\n";
- }
- print STDERR "fatal: (error " .
- $mediawiki->{error}->{code} . ': ' .
- $mediawiki->{error}->{details} . ")\n";
- exit 1;
-}
-
-## Functions for listing pages on the remote wiki
-sub get_mw_tracked_pages {
- my $pages = shift;
- get_mw_page_list(\@tracked_pages, $pages);
- return;
-}
-
-sub get_mw_page_list {
- my $page_list = shift;
- my $pages = shift;
- my @some_pages = @{$page_list};
- while (@some_pages) {
- my $last_page = SLICE_SIZE;
- if ($#some_pages < $last_page) {
- $last_page = $#some_pages;
- }
- my @slice = @some_pages[0..$last_page];
- get_mw_first_pages(\@slice, $pages);
- @some_pages = @some_pages[(SLICE_SIZE + 1)..$#some_pages];
- }
- return;
-}
-
-sub get_mw_tracked_categories {
- my $pages = shift;
- foreach my $category (@tracked_categories) {
- if (index($category, ':') < 0) {
- # Mediawiki requires the Category
- # prefix, but let's not force the user
- # to specify it.
- $category = "Category:${category}";
- }
- my $mw_pages = $mediawiki->list( {
- action => 'query',
- list => 'categorymembers',
- cmtitle => $category,
- cmlimit => 'max' } )
- || die $mediawiki->{error}->{code} . ': '
- . $mediawiki->{error}->{details} . "\n";
- foreach my $page (@{$mw_pages}) {
- $pages->{$page->{title}} = $page;
- }
- }
- return;
-}
-
-sub get_mw_tracked_namespaces {
- my $pages = shift;
- foreach my $local_namespace (sort @tracked_namespaces) {
- my $namespace_id;
- if ($local_namespace eq "(Main)") {
- $namespace_id = 0;
- } else {
- $namespace_id = get_mw_namespace_id($local_namespace);
- }
- # virtual namespaces don't support allpages
- next if !defined($namespace_id) || $namespace_id < 0;
- my $mw_pages = $mediawiki->list( {
- action => 'query',
- list => 'allpages',
- apnamespace => $namespace_id,
- aplimit => 'max' } )
- || die $mediawiki->{error}->{code} . ': '
- . $mediawiki->{error}->{details} . "\n";
- print {*STDERR} "$#{$mw_pages} found in namespace $local_namespace ($namespace_id)\n";
- foreach my $page (@{$mw_pages}) {
- $pages->{$page->{title}} = $page;
- }
- }
- return;
-}
-
-sub get_mw_all_pages {
- my $pages = shift;
- # No user-provided list, get the list of pages from the API.
- my $mw_pages = $mediawiki->list({
- action => 'query',
- list => 'allpages',
- aplimit => 'max'
- });
- if (!defined($mw_pages)) {
- fatal_mw_error("get the list of wiki pages");
- }
- foreach my $page (@{$mw_pages}) {
- $pages->{$page->{title}} = $page;
- }
- return;
-}
-
-# queries the wiki for a set of pages. Meant to be used within a loop
-# querying the wiki for slices of page list.
-sub get_mw_first_pages {
- my $some_pages = shift;
- my @some_pages = @{$some_pages};
-
- my $pages = shift;
-
- # pattern 'page1|page2|...' required by the API
- my $titles = join('|', @some_pages);
-
- my $mw_pages = $mediawiki->api({
- action => 'query',
- titles => $titles,
- });
- if (!defined($mw_pages)) {
- fatal_mw_error("query the list of wiki pages");
- }
- while (my ($id, $page) = each(%{$mw_pages->{query}->{pages}})) {
- if ($id < 0) {
- print {*STDERR} "Warning: page $page->{title} not found on wiki\n";
- } else {
- $pages->{$page->{title}} = $page;
- }
- }
- return;
-}
-
-# Get the list of pages to be fetched according to configuration.
-sub get_mw_pages {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- print {*STDERR} "Listing pages on remote wiki...\n";
-
- my %pages; # hash on page titles to avoid duplicates
- my $user_defined;
- if (@tracked_pages) {
- $user_defined = 1;
- # The user provided a list of pages titles, but we
- # still need to query the API to get the page IDs.
- get_mw_tracked_pages(\%pages);
- }
- if (@tracked_categories) {
- $user_defined = 1;
- get_mw_tracked_categories(\%pages);
- }
- if (@tracked_namespaces) {
- $user_defined = 1;
- get_mw_tracked_namespaces(\%pages);
- }
- if (!$user_defined) {
- get_mw_all_pages(\%pages);
- }
- if ($import_media) {
- print {*STDERR} "Getting media files for selected pages...\n";
- if ($user_defined) {
- get_linked_mediafiles(\%pages);
- } else {
- get_all_mediafiles(\%pages);
- }
- }
- print {*STDERR} (scalar keys %pages) . " pages found.\n";
- return %pages;
-}
-
-# usage: $out = run_git_quoted(["command", "args", ...]);
-# $out = run_git_quoted(["command", "args", ...], "raw"); # don't interpret output as UTF-8.
-# $out = run_git_quoted_nostderr(["command", "args", ...]); # discard stderr
-# $out = run_git_quoted_nostderr(["command", "args", ...], "raw"); # ditto but raw instead of UTF-8 as above
-sub _run_git {
- my $args = shift;
- my $encoding = (shift || 'encoding(UTF-8)');
- open(my $git, "-|:${encoding}", @$args)
- or die "Unable to fork: $!\n";
- my $res = do {
- local $/ = undef;
- <$git>
- };
- close($git);
-
- return $res;
-}
-
-sub run_git_quoted {
- _run_git(["git", @{$_[0]}], $_[1]);
-}
-
-sub run_git_quoted_nostderr {
- _run_git(['sh', '-c', 'git "$@" 2>/dev/null', '--', @{$_[0]}], $_[1]);
-}
-
-sub get_all_mediafiles {
- my $pages = shift;
- # Attach list of all pages for media files from the API,
- # they are in a different namespace, only one namespace
- # can be queried at the same moment
- my $mw_pages = $mediawiki->list({
- action => 'query',
- list => 'allpages',
- apnamespace => get_mw_namespace_id('File'),
- aplimit => 'max'
- });
- if (!defined($mw_pages)) {
- print {*STDERR} "fatal: could not get the list of pages for media files.\n";
- print {*STDERR} "fatal: '$url' does not appear to be a mediawiki\n";
- print {*STDERR} "fatal: make sure '$url/api.php' is a valid page.\n";
- exit 1;
- }
- foreach my $page (@{$mw_pages}) {
- $pages->{$page->{title}} = $page;
- }
- return;
-}
-
-sub get_linked_mediafiles {
- my $pages = shift;
- my @titles = map { $_->{title} } values(%{$pages});
-
- my $batch = BATCH_SIZE;
- while (@titles) {
- if ($#titles < $batch) {
- $batch = $#titles;
- }
- my @slice = @titles[0..$batch];
-
- # pattern 'page1|page2|...' required by the API
- my $mw_titles = join('|', @slice);
-
- # Media files could be included or linked from
- # a page, get all related
- my $query = {
- action => 'query',
- prop => 'links|images',
- titles => $mw_titles,
- plnamespace => get_mw_namespace_id('File'),
- pllimit => 'max'
- };
- my $result = $mediawiki->api($query);
-
- while (my ($id, $page) = each(%{$result->{query}->{pages}})) {
- my @media_titles;
- if (defined($page->{links})) {
- my @link_titles
- = map { $_->{title} } @{$page->{links}};
- push(@media_titles, @link_titles);
- }
- if (defined($page->{images})) {
- my @image_titles
- = map { $_->{title} } @{$page->{images}};
- push(@media_titles, @image_titles);
- }
- if (@media_titles) {
- get_mw_page_list(\@media_titles, $pages);
- }
- }
-
- @titles = @titles[($batch+1)..$#titles];
- }
- return;
-}
-
-sub get_mw_mediafile_for_page_revision {
- # Name of the file on Wiki, with the prefix.
- my $filename = shift;
- my $timestamp = shift;
- my %mediafile;
-
- # Search if on a media file with given timestamp exists on
- # MediaWiki. In that case download the file.
- my $query = {
- action => 'query',
- prop => 'imageinfo',
- titles => "File:${filename}",
- iistart => $timestamp,
- iiend => $timestamp,
- iiprop => 'timestamp|archivename|url',
- iilimit => 1
- };
- my $result = $mediawiki->api($query);
-
- my ($fileid, $file) = each( %{$result->{query}->{pages}} );
- # If not defined it means there is no revision of the file for
- # given timestamp.
- if (defined($file->{imageinfo})) {
- $mediafile{title} = $filename;
-
- my $fileinfo = pop(@{$file->{imageinfo}});
- $mediafile{timestamp} = $fileinfo->{timestamp};
- # Mediawiki::API's download function doesn't support https URLs
- # and can't download old versions of files.
- print {*STDERR} "\tDownloading file $mediafile{title}, version $mediafile{timestamp}\n";
- $mediafile{content} = download_mw_mediafile($fileinfo->{url});
- }
- return %mediafile;
-}
-
-sub download_mw_mediafile {
- my $download_url = shift;
-
- my $response = $mediawiki->{ua}->get($download_url);
- if ($response->code == HTTP_CODE_OK) {
- # It is tempting to return
- # $response->decoded_content({charset => "none"}), but
- # when doing so, utf8::downgrade($content) fails with
- # "Wide character in subroutine entry".
- $response->decode();
- return $response->content();
- } else {
- print {*STDERR} "Error downloading mediafile from :\n";
- print {*STDERR} "URL: ${download_url}\n";
- print {*STDERR} 'Server response: ' . $response->code . q{ } . $response->message . "\n";
- exit 1;
- }
-}
-
-sub get_last_local_revision {
- # Get note regarding last mediawiki revision.
- my $note = run_git_quoted_nostderr(["notes", "--ref=${remotename}/mediawiki",
- "show", "refs/mediawiki/${remotename}/master"]);
- my @note_info = split(/ /, $note);
-
- my $lastrevision_number;
- if (!(defined($note_info[0]) && $note_info[0] eq 'mediawiki_revision:')) {
- print {*STDERR} 'No previous mediawiki revision found';
- $lastrevision_number = 0;
- } else {
- # Notes are formatted : mediawiki_revision: #number
- $lastrevision_number = $note_info[1];
- chomp($lastrevision_number);
- print {*STDERR} "Last local mediawiki revision found is ${lastrevision_number}";
- }
- return $lastrevision_number;
-}
-
-# Get the last remote revision without taking in account which pages are
-# tracked or not. This function makes a single request to the wiki thus
-# avoid a loop onto all tracked pages. This is useful for the fetch-by-rev
-# option.
-sub get_last_global_remote_rev {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- my $query = {
- action => 'query',
- list => 'recentchanges',
- prop => 'revisions',
- rclimit => '1',
- rcdir => 'older',
- };
- my $result = $mediawiki->api($query);
- return $result->{query}->{recentchanges}[0]->{revid};
-}
-
-# Get the last remote revision concerning the tracked pages and the tracked
-# categories.
-sub get_last_remote_revision {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- my %pages_hash = get_mw_pages();
- my @pages = values(%pages_hash);
-
- my $max_rev_num = 0;
-
- print {*STDERR} "Getting last revision id on tracked pages...\n";
-
- foreach my $page (@pages) {
- my $id = $page->{pageid};
-
- my $query = {
- action => 'query',
- prop => 'revisions',
- rvprop => 'ids|timestamp',
- pageids => $id,
- };
-
- my $result = $mediawiki->api($query);
-
- my $lastrev = pop(@{$result->{query}->{pages}->{$id}->{revisions}});
-
- $basetimestamps{$lastrev->{revid}} = $lastrev->{timestamp};
-
- $max_rev_num = ($lastrev->{revid} > $max_rev_num ? $lastrev->{revid} : $max_rev_num);
- }
-
- print {*STDERR} "Last remote revision found is $max_rev_num.\n";
- return $max_rev_num;
-}
-
-# Clean content before sending it to MediaWiki
-sub mediawiki_clean {
- my $string = shift;
- my $page_created = shift;
- # Mediawiki does not allow blank space at the end of a page and ends with a single \n.
- # This function right trims a string and adds a \n at the end to follow this rule
- $string =~ s/\s+$//;
- if ($string eq EMPTY && $page_created) {
- # Creating empty pages is forbidden.
- $string = EMPTY_CONTENT;
- }
- return $string."\n";
-}
-
-# Filter applied on MediaWiki data before adding them to Git
-sub mediawiki_smudge {
- my $string = shift;
- if ($string eq EMPTY_CONTENT) {
- $string = EMPTY;
- }
- # This \n is important. This is due to mediawiki's way to handle end of files.
- return "${string}\n";
-}
-
-sub literal_data {
- my ($content) = @_;
- print {*STDOUT} 'data ', bytes::length($content), "\n", $content;
- return;
-}
-
-sub literal_data_raw {
- # Output possibly binary content.
- my ($content) = @_;
- # Avoid confusion between size in bytes and in characters
- utf8::downgrade($content);
- binmode STDOUT, ':raw';
- print {*STDOUT} 'data ', bytes::length($content), "\n", $content;
- binmode STDOUT, ':encoding(UTF-8)';
- return;
-}
-
-sub mw_capabilities {
- # Revisions are imported to the private namespace
- # refs/mediawiki/$remotename/ by the helper and fetched into
- # refs/remotes/$remotename later by fetch.
- print {*STDOUT} "refspec refs/heads/*:refs/mediawiki/${remotename}/*\n";
- print {*STDOUT} "import\n";
- print {*STDOUT} "list\n";
- print {*STDOUT} "push\n";
- if ($dumb_push) {
- print {*STDOUT} "no-private-update\n";
- }
- print {*STDOUT} "\n";
- return;
-}
-
-sub mw_list {
- # MediaWiki do not have branches, we consider one branch arbitrarily
- # called master, and HEAD pointing to it.
- print {*STDOUT} "? refs/heads/master\n";
- print {*STDOUT} "\@refs/heads/master HEAD\n";
- print {*STDOUT} "\n";
- return;
-}
-
-sub mw_option {
- print {*STDERR} "remote-helper command 'option $_[0]' not yet implemented\n";
- print {*STDOUT} "unsupported\n";
- return;
-}
-
-sub fetch_mw_revisions_for_page {
- my $page = shift;
- my $id = shift;
- my $fetch_from = shift;
- my @page_revs = ();
- my $query = {
- action => 'query',
- prop => 'revisions',
- rvprop => 'ids',
- rvdir => 'newer',
- rvstartid => $fetch_from,
- rvlimit => 500,
- pageids => $id,
-
- # Let MediaWiki know that we support the latest API.
- continue => '',
- };
-
- my $revnum = 0;
- # Get 500 revisions at a time due to the mediawiki api limit
- while (1) {
- my $result = $mediawiki->api($query);
-
- # Parse each of those 500 revisions
- foreach my $revision (@{$result->{query}->{pages}->{$id}->{revisions}}) {
- my $page_rev_ids;
- $page_rev_ids->{pageid} = $page->{pageid};
- $page_rev_ids->{revid} = $revision->{revid};
- push(@page_revs, $page_rev_ids);
- $revnum++;
- }
-
- if ($result->{'query-continue'}) { # For legacy APIs
- $query->{rvstartid} = $result->{'query-continue'}->{revisions}->{rvstartid};
- } elsif ($result->{continue}) { # For newer APIs
- $query->{rvstartid} = $result->{continue}->{rvcontinue};
- $query->{continue} = $result->{continue}->{continue};
- } else {
- last;
- }
- }
- if ($shallow_import && @page_revs) {
- print {*STDERR} " Found 1 revision (shallow import).\n";
- @page_revs = sort {$b->{revid} <=> $a->{revid}} (@page_revs);
- return $page_revs[0];
- }
- print {*STDERR} " Found ${revnum} revision(s).\n";
- return @page_revs;
-}
-
-sub fetch_mw_revisions {
- my $pages = shift; my @pages = @{$pages};
- my $fetch_from = shift;
-
- my @revisions = ();
- my $n = 1;
- foreach my $page (@pages) {
- my $id = $page->{pageid};
- print {*STDERR} "page ${n}/", scalar(@pages), ': ', $page->{title}, "\n";
- $n++;
- my @page_revs = fetch_mw_revisions_for_page($page, $id, $fetch_from);
- @revisions = (@page_revs, @revisions);
- }
-
- return ($n, @revisions);
-}
-
-sub fe_escape_path {
- my $path = shift;
- $path =~ s/\\/\\\\/g;
- $path =~ s/"/\\"/g;
- $path =~ s/\n/\\n/g;
- return qq("${path}");
-}
-
-sub import_file_revision {
- my $commit = shift;
- my %commit = %{$commit};
- my $full_import = shift;
- my $n = shift;
- my $mediafile = shift;
- my %mediafile;
- if ($mediafile) {
- %mediafile = %{$mediafile};
- }
-
- my $title = $commit{title};
- my $comment = $commit{comment};
- my $content = $commit{content};
- my $author = $commit{author};
- my $date = $commit{date};
-
- print {*STDOUT} "commit refs/mediawiki/${remotename}/master\n";
- print {*STDOUT} "mark :${n}\n";
- print {*STDOUT} "committer ${author} <${author}\@${wiki_name}> " . $date->epoch . " +0000\n";
- literal_data($comment);
-
- # If it's not a clone, we need to know where to start from
- if (!$full_import && $n == 1) {
- print {*STDOUT} "from refs/mediawiki/${remotename}/master^0\n";
- }
- if ($content ne DELETED_CONTENT) {
- print {*STDOUT} 'M 644 inline ' .
- fe_escape_path("${title}.mw") . "\n";
- literal_data($content);
- if (%mediafile) {
- print {*STDOUT} 'M 644 inline '
- . fe_escape_path($mediafile{title}) . "\n";
- literal_data_raw($mediafile{content});
- }
- print {*STDOUT} "\n\n";
- } else {
- print {*STDOUT} 'D ' . fe_escape_path("${title}.mw") . "\n";
- }
-
- # mediawiki revision number in the git note
- if ($full_import && $n == 1) {
- print {*STDOUT} "reset refs/notes/${remotename}/mediawiki\n";
- }
- print {*STDOUT} "commit refs/notes/${remotename}/mediawiki\n";
- print {*STDOUT} "committer ${author} <${author}\@${wiki_name}> " . $date->epoch . " +0000\n";
- literal_data('Note added by git-mediawiki during import');
- if (!$full_import && $n == 1) {
- print {*STDOUT} "from refs/notes/${remotename}/mediawiki^0\n";
- }
- print {*STDOUT} "N inline :${n}\n";
- literal_data("mediawiki_revision: $commit{mw_revision}");
- print {*STDOUT} "\n\n";
- return;
-}
-
-# parse a sequence of
-# <cmd> <arg1>
-# <cmd> <arg2>
-# \n
-# (like batch sequence of import and sequence of push statements)
-sub get_more_refs {
- my $cmd = shift;
- my @refs;
- while (1) {
- my $line = <STDIN>;
- if ($line =~ /^$cmd (.*)$/) {
- push(@refs, $1);
- } elsif ($line eq "\n") {
- return @refs;
- } else {
- die("Invalid command in a '$cmd' batch: $_\n");
- }
- }
- return;
-}
-
-sub mw_import {
- # multiple import commands can follow each other.
- my @refs = (shift, get_more_refs('import'));
- my $processedRefs;
- foreach my $ref (@refs) {
- next if $processedRefs->{$ref}; # skip duplicates: "import refs/heads/master" being issued twice; TODO: why?
- $processedRefs->{$ref} = 1;
- mw_import_ref($ref);
- }
- print {*STDOUT} "done\n";
- return;
-}
-
-sub mw_import_ref {
- my $ref = shift;
- # The remote helper will call "import HEAD" and
- # "import refs/heads/master".
- # Since HEAD is a symbolic ref to master (by convention,
- # followed by the output of the command "list" that we gave),
- # we don't need to do anything in this case.
- if ($ref eq 'HEAD') {
- return;
- }
-
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- print {*STDERR} "Searching revisions...\n";
- my $last_local = get_last_local_revision();
- my $fetch_from = $last_local + 1;
- if ($fetch_from == 1) {
- print {*STDERR} ", fetching from beginning.\n";
- } else {
- print {*STDERR} ", fetching from here.\n";
- }
-
- my $n = 0;
- if ($fetch_strategy eq 'by_rev') {
- print {*STDERR} "Fetching & writing export data by revs...\n";
- $n = mw_import_ref_by_revs($fetch_from);
- } elsif ($fetch_strategy eq 'by_page') {
- print {*STDERR} "Fetching & writing export data by pages...\n";
- $n = mw_import_ref_by_pages($fetch_from);
- } else {
- print {*STDERR} qq(fatal: invalid fetch strategy "${fetch_strategy}".\n);
- print {*STDERR} "Check your configuration variables remote.${remotename}.fetchStrategy and mediawiki.fetchStrategy\n";
- exit 1;
- }
-
- if ($fetch_from == 1 && $n == 0) {
- print {*STDERR} "You appear to have cloned an empty MediaWiki.\n";
- # Something has to be done remote-helper side. If nothing is done, an error is
- # thrown saying that HEAD is referring to unknown object 0000000000000000000
- # and the clone fails.
- }
- return;
-}
-
-sub mw_import_ref_by_pages {
-
- my $fetch_from = shift;
- my %pages_hash = get_mw_pages();
- my @pages = values(%pages_hash);
-
- my ($n, @revisions) = fetch_mw_revisions(\@pages, $fetch_from);
-
- @revisions = sort {$a->{revid} <=> $b->{revid}} @revisions;
- my @revision_ids = map { $_->{revid} } @revisions;
-
- return mw_import_revids($fetch_from, \@revision_ids, \%pages_hash);
-}
-
-sub mw_import_ref_by_revs {
-
- my $fetch_from = shift;
- my %pages_hash = get_mw_pages();
-
- my $last_remote = get_last_global_remote_rev();
- my @revision_ids = $fetch_from..$last_remote;
- return mw_import_revids($fetch_from, \@revision_ids, \%pages_hash);
-}
-
-# Import revisions given in second argument (array of integers).
-# Only pages appearing in the third argument (hash indexed by page titles)
-# will be imported.
-sub mw_import_revids {
- my $fetch_from = shift;
- my $revision_ids = shift;
- my $pages = shift;
-
- my $n = 0;
- my $n_actual = 0;
- my $last_timestamp = 0; # Placeholder in case $rev->timestamp is undefined
-
- foreach my $pagerevid (@{$revision_ids}) {
- # Count page even if we skip it, since we display
- # $n/$total and $total includes skipped pages.
- $n++;
-
- # fetch the content of the pages
- my $query = {
- action => 'query',
- prop => 'revisions',
- rvprop => 'content|timestamp|comment|user|ids',
- revids => $pagerevid,
- };
-
- my $result = $mediawiki->api($query);
-
- if (!$result) {
- die "Failed to retrieve modified page for revision $pagerevid\n";
- }
-
- if (defined($result->{query}->{badrevids}->{$pagerevid})) {
- # The revision id does not exist on the remote wiki.
- next;
- }
-
- if (!defined($result->{query}->{pages})) {
- die "Invalid revision ${pagerevid}.\n";
- }
-
- my @result_pages = values(%{$result->{query}->{pages}});
- my $result_page = $result_pages[0];
- my $rev = $result_pages[0]->{revisions}->[0];
-
- my $page_title = $result_page->{title};
-
- if (!exists($pages->{$page_title})) {
- print {*STDERR} "${n}/", scalar(@{$revision_ids}),
- ": Skipping revision #$rev->{revid} of ${page_title}\n";
- next;
- }
-
- $n_actual++;
-
- my %commit;
- $commit{author} = $rev->{user} || 'Anonymous';
- $commit{comment} = $rev->{comment} || EMPTY_MESSAGE;
- $commit{title} = smudge_filename($page_title);
- $commit{mw_revision} = $rev->{revid};
- $commit{content} = mediawiki_smudge($rev->{'*'});
-
- if (!defined($rev->{timestamp})) {
- $last_timestamp++;
- } else {
- $last_timestamp = $rev->{timestamp};
- }
- $commit{date} = DateTime::Format::ISO8601->parse_datetime($last_timestamp);
-
- # Differentiates classic pages and media files.
- my ($namespace, $filename) = $page_title =~ /^([^:]*):(.*)$/;
- my %mediafile;
- if ($namespace) {
- my $id = get_mw_namespace_id($namespace);
- if ($id && $id == get_mw_namespace_id('File')) {
- %mediafile = get_mw_mediafile_for_page_revision($filename, $rev->{timestamp});
- }
- }
- # If this is a revision of the media page for new version
- # of a file do one common commit for both file and media page.
- # Else do commit only for that page.
- print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of $commit{title}\n";
- import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile);
- }
-
- return $n_actual;
-}
-
-sub error_non_fast_forward {
- my $advice = run_git_quoted(["config", "--bool", "advice.pushNonFastForward"]);
- chomp($advice);
- if ($advice ne 'false') {
- # Native git-push would show this after the summary.
- # We can't ask it to display it cleanly, so print it
- # ourselves before.
- print {*STDERR} "To prevent you from losing history, non-fast-forward updates were rejected\n";
- print {*STDERR} "Merge the remote changes (e.g. 'git pull') before pushing again. See the\n";
- print {*STDERR} "'Note about fast-forwards' section of 'git push --help' for details.\n";
- }
- print {*STDOUT} qq(error $_[0] "non-fast-forward"\n);
- return 0;
-}
-
-sub mw_upload_file {
- my $complete_file_name = shift;
- my $new_sha1 = shift;
- my $extension = shift;
- my $file_deleted = shift;
- my $summary = shift;
- my $newrevid;
- my $path = "File:${complete_file_name}";
- my %hashFiles = get_allowed_file_extensions();
- if (!exists($hashFiles{$extension})) {
- print {*STDERR} "${complete_file_name} is not a permitted file on this wiki.\n";
- print {*STDERR} "Check the configuration of file uploads in your mediawiki.\n";
- return $newrevid;
- }
- # Deleting and uploading a file requires a privileged user
- if ($file_deleted) {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
- my $query = {
- action => 'delete',
- title => $path,
- reason => $summary
- };
- if (!$mediawiki->edit($query)) {
- print {*STDERR} "Failed to delete file on remote wiki\n";
- print {*STDERR} "Check your permissions on the remote site. Error code:\n";
- print {*STDERR} $mediawiki->{error}->{code} . ':' . $mediawiki->{error}->{details};
- exit 1;
- }
- } else {
- # Don't let perl try to interpret file content as UTF-8 => use "raw"
- my $content = run_git_quoted(["cat-file", "blob", $new_sha1], 'raw');
- if ($content ne EMPTY) {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
- $mediawiki->{config}->{upload_url} =
- "${url}/index.php/Special:Upload";
- $mediawiki->edit({
- action => 'upload',
- filename => $complete_file_name,
- comment => $summary,
- file => [undef,
- $complete_file_name,
- Content => $content],
- ignorewarnings => 1,
- }, {
- skip_encoding => 1
- } ) || die $mediawiki->{error}->{code} . ':'
- . $mediawiki->{error}->{details} . "\n";
- my $last_file_page = $mediawiki->get_page({title => $path});
- $newrevid = $last_file_page->{revid};
- print {*STDERR} "Pushed file: ${new_sha1} - ${complete_file_name}.\n";
- } else {
- print {*STDERR} "Empty file ${complete_file_name} not pushed.\n";
- }
- }
- return $newrevid;
-}
-
-sub mw_push_file {
- my $diff_info = shift;
- # $diff_info contains a string in this format:
- # 100644 100644 <sha1_of_blob_before_commit> <sha1_of_blob_now> <status>
- my @diff_info_split = split(/[ \t]/, $diff_info);
-
- # Filename, including .mw extension
- my $complete_file_name = shift;
- # Commit message
- my $summary = shift;
- # MediaWiki revision number. Keep the previous one by default,
- # in case there's no edit to perform.
- my $oldrevid = shift;
- my $newrevid;
-
- if ($summary eq EMPTY_MESSAGE) {
- $summary = EMPTY;
- }
-
- my $new_sha1 = $diff_info_split[3];
- my $old_sha1 = $diff_info_split[2];
- my $page_created = ($old_sha1 eq NULL_SHA1);
- my $page_deleted = ($new_sha1 eq NULL_SHA1);
- $complete_file_name = clean_filename($complete_file_name);
-
- my ($title, $extension) = $complete_file_name =~ /^(.*)\.([^\.]*)$/;
- if (!defined($extension)) {
- $extension = EMPTY;
- }
- if ($extension eq 'mw') {
- my $ns = get_mw_namespace_id_for_page($complete_file_name);
- if ($ns && $ns == get_mw_namespace_id('File') && (!$export_media)) {
- print {*STDERR} "Ignoring media file related page: ${complete_file_name}\n";
- return ($oldrevid, 'ok');
- }
- my $file_content;
- if ($page_deleted) {
- # Deleting a page usually requires
- # special privileges. A common
- # convention is to replace the page
- # with this content instead:
- $file_content = DELETED_CONTENT;
- } else {
- $file_content = run_git_quoted(["cat-file", "blob", $new_sha1]);
- }
-
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- my $result = $mediawiki->edit( {
- action => 'edit',
- summary => $summary,
- title => $title,
- basetimestamp => $basetimestamps{$oldrevid},
- text => mediawiki_clean($file_content, $page_created),
- }, {
- skip_encoding => 1 # Helps with names with accentuated characters
- });
- if (!$result) {
- if ($mediawiki->{error}->{code} == 3) {
- # edit conflicts, considered as non-fast-forward
- print {*STDERR} 'Warning: Error ' .
- $mediawiki->{error}->{code} .
- ' from mediawiki: ' . $mediawiki->{error}->{details} .
- ".\n";
- return ($oldrevid, 'non-fast-forward');
- } else {
- # Other errors. Shouldn't happen => just die()
- die 'Fatal: Error ' .
- $mediawiki->{error}->{code} .
- ' from mediawiki: ' . $mediawiki->{error}->{details} . "\n";
- }
- }
- $newrevid = $result->{edit}->{newrevid};
- print {*STDERR} "Pushed file: ${new_sha1} - ${title}\n";
- } elsif ($export_media) {
- $newrevid = mw_upload_file($complete_file_name, $new_sha1,
- $extension, $page_deleted,
- $summary);
- } else {
- print {*STDERR} "Ignoring media file ${title}\n";
- }
- $newrevid = ($newrevid or $oldrevid);
- return ($newrevid, 'ok');
-}
-
-sub mw_push {
- # multiple push statements can follow each other
- my @refsspecs = (shift, get_more_refs('push'));
- my $pushed;
- for my $refspec (@refsspecs) {
- my ($force, $local, $remote) = $refspec =~ /^(\+)?([^:]*):([^:]*)$/
- or die("Invalid refspec for push. Expected <src>:<dst> or +<src>:<dst>\n");
- if ($force) {
- print {*STDERR} "Warning: forced push not allowed on a MediaWiki.\n";
- }
- if ($local eq EMPTY) {
- print {*STDERR} "Cannot delete remote branch on a MediaWiki\n";
- print {*STDOUT} "error ${remote} cannot delete\n";
- next;
- }
- if ($remote ne 'refs/heads/master') {
- print {*STDERR} "Only push to the branch 'master' is supported on a MediaWiki\n";
- print {*STDOUT} "error ${remote} only master allowed\n";
- next;
- }
- if (mw_push_revision($local, $remote)) {
- $pushed = 1;
- }
- }
-
- # Notify Git that the push is done
- print {*STDOUT} "\n";
-
- if ($pushed && $dumb_push) {
- print {*STDERR} "Just pushed some revisions to MediaWiki.\n";
- print {*STDERR} "The pushed revisions now have to be re-imported, and your current branch\n";
- print {*STDERR} "needs to be updated with these re-imported commits. You can do this with\n";
- print {*STDERR} "\n";
- print {*STDERR} " git pull --rebase\n";
- print {*STDERR} "\n";
- }
- return;
-}
-
-sub mw_push_revision {
- my $local = shift;
- my $remote = shift; # actually, this has to be "refs/heads/master" at this point.
- my $last_local_revid = get_last_local_revision();
- print {*STDERR} ".\n"; # Finish sentence started by get_last_local_revision()
- my $last_remote_revid = get_last_remote_revision();
- my $mw_revision = $last_remote_revid;
-
- # Get sha1 of commit pointed by local HEAD
- my $HEAD_sha1 = run_git_quoted_nostderr(["rev-parse", $local]);
- chomp($HEAD_sha1);
- # Get sha1 of commit pointed by remotes/$remotename/master
- my $remoteorigin_sha1 = run_git_quoted_nostderr(["rev-parse", "refs/remotes/${remotename}/master"]);
- chomp($remoteorigin_sha1);
-
- if ($last_local_revid > 0 &&
- $last_local_revid < $last_remote_revid) {
- return error_non_fast_forward($remote);
- }
-
- if ($HEAD_sha1 eq $remoteorigin_sha1) {
- # nothing to push
- return 0;
- }
-
- # Get every commit in between HEAD and refs/remotes/origin/master,
- # including HEAD and refs/remotes/origin/master
- my @commit_pairs = ();
- if ($last_local_revid > 0) {
- my $parsed_sha1 = $remoteorigin_sha1;
- # Find a path from last MediaWiki commit to pushed commit
- print {*STDERR} "Computing path from local to remote ...\n";
- my @local_ancestry = split(/\n/, run_git_quoted(["rev-list", "--boundary", "--parents", $local, "^${parsed_sha1}"]));
- my %local_ancestry;
- foreach my $line (@local_ancestry) {
- if (my ($child, $parents) = $line =~ /^-?([a-f0-9]+) ([a-f0-9 ]+)/) {
- foreach my $parent (split(/ /, $parents)) {
- $local_ancestry{$parent} = $child;
- }
- } elsif (!$line =~ /^([a-f0-9]+)/) {
- die "Unexpected output from git rev-list: ${line}\n";
- }
- }
- while ($parsed_sha1 ne $HEAD_sha1) {
- my $child = $local_ancestry{$parsed_sha1};
- if (!$child) {
- print {*STDERR} "Cannot find a path in history from remote commit to last commit\n";
- return error_non_fast_forward($remote);
- }
- push(@commit_pairs, [$parsed_sha1, $child]);
- $parsed_sha1 = $child;
- }
- } else {
- # No remote mediawiki revision. Export the whole
- # history (linearized with --first-parent)
- print {*STDERR} "Warning: no common ancestor, pushing complete history\n";
- my $history = run_git_quoted(["rev-list", "--first-parent", "--children", $local]);
- my @history = split(/\n/, $history);
- @history = @history[1..$#history];
- foreach my $line (reverse @history) {
- my @commit_info_split = split(/[ \n]/, $line);
- push(@commit_pairs, \@commit_info_split);
- }
- }
-
- foreach my $commit_info_split (@commit_pairs) {
- my $sha1_child = @{$commit_info_split}[0];
- my $sha1_commit = @{$commit_info_split}[1];
- my $diff_infos = run_git_quoted(["diff-tree", "-r", "--raw", "-z", $sha1_child, $sha1_commit]);
- # TODO: we could detect rename, and encode them with a #redirect on the wiki.
- # TODO: for now, it's just a delete+add
- my @diff_info_list = split(/\0/, $diff_infos);
- # Keep the subject line of the commit message as mediawiki comment for the revision
- my $commit_msg = run_git_quoted(["log", "--no-walk", '--format="%s"', $sha1_commit]);
- chomp($commit_msg);
- # Push every blob
- while (@diff_info_list) {
- my $status;
- # git diff-tree -z gives an output like
- # <metadata>\0<filename1>\0
- # <metadata>\0<filename2>\0
- # and we've split on \0.
- my $info = shift(@diff_info_list);
- my $file = shift(@diff_info_list);
- ($mw_revision, $status) = mw_push_file($info, $file, $commit_msg, $mw_revision);
- if ($status eq 'non-fast-forward') {
- # we may already have sent part of the
- # commit to MediaWiki, but it's too
- # late to cancel it. Stop the push in
- # the middle, but still give an
- # accurate error message.
- return error_non_fast_forward($remote);
- }
- if ($status ne 'ok') {
- die("Unknown error from mw_push_file()\n");
- }
- }
- if (!$dumb_push) {
- run_git_quoted(["notes", "--ref=${remotename}/mediawiki",
- "add", "-f", "-m",
- "mediawiki_revision: ${mw_revision}",
- $sha1_commit]);
- }
- }
-
- print {*STDOUT} "ok ${remote}\n";
- return 1;
-}
-
-sub get_allowed_file_extensions {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
-
- my $query = {
- action => 'query',
- meta => 'siteinfo',
- siprop => 'fileextensions'
- };
- my $result = $mediawiki->api($query);
- my @file_extensions = map { $_->{ext}} @{$result->{query}->{fileextensions}};
- my %hashFile = map { $_ => 1 } @file_extensions;
-
- return %hashFile;
-}
-
-# In memory cache for MediaWiki namespace ids.
-my %namespace_id;
-
-# Namespaces whose id is cached in the configuration file
-# (to avoid duplicates)
-my %cached_mw_namespace_id;
-
-# Return MediaWiki id for a canonical namespace name.
-# Ex.: "File", "Project".
-sub get_mw_namespace_id {
- $mediawiki = connect_maybe($mediawiki, $remotename, $url);
- my $name = shift;
-
- if (!exists $namespace_id{$name}) {
- # Look at configuration file, if the record for that namespace is
- # already cached. Namespaces are stored in form:
- # "Name_of_namespace:Id_namespace", ex.: "File:6".
- my @temp = split(/\n/,
- run_git_quoted(["config", "--get-all", "remote.${remotename}.namespaceCache"]));
- chomp(@temp);
- foreach my $ns (@temp) {
- my ($n, $id) = split(/:/, $ns);
- if ($id eq 'notANameSpace') {
- $namespace_id{$n} = {is_namespace => 0};
- } else {
- $namespace_id{$n} = {is_namespace => 1, id => $id};
- }
- $cached_mw_namespace_id{$n} = 1;
- }
- }
-
- if (!exists $namespace_id{$name}) {
- print {*STDERR} "Namespace ${name} not found in cache, querying the wiki ...\n";
- # NS not found => get namespace id from MW and store it in
- # configuration file.
- my $query = {
- action => 'query',
- meta => 'siteinfo',
- siprop => 'namespaces'
- };
- my $result = $mediawiki->api($query);
-
- while (my ($id, $ns) = each(%{$result->{query}->{namespaces}})) {
- if (defined($ns->{id}) && defined($ns->{canonical})) {
- $namespace_id{$ns->{canonical}} = {is_namespace => 1, id => $ns->{id}};
- if ($ns->{'*'}) {
- # alias (e.g. french Fichier: as alias for canonical File:)
- $namespace_id{$ns->{'*'}} = {is_namespace => 1, id => $ns->{id}};
- }
- }
- }
- }
-
- my $ns = $namespace_id{$name};
- my $id;
-
- if (!defined $ns) {
- my @namespaces = map { s/ /_/g; $_; } sort keys %namespace_id;
- print {*STDERR} "No such namespace ${name} on MediaWiki, known namespaces: @namespaces\n";
- $ns = {is_namespace => 0};
- $namespace_id{$name} = $ns;
- }
-
- if ($ns->{is_namespace}) {
- $id = $ns->{id};
- }
-
- # Store "notANameSpace" as special value for inexisting namespaces
- my $store_id = ($id || 'notANameSpace');
-
- # Store explicitly requested namespaces on disk
- if (!exists $cached_mw_namespace_id{$name}) {
- run_git_quoted(["config", "--add", "remote.${remotename}.namespaceCache", "${name}:${store_id}"]);
- $cached_mw_namespace_id{$name} = 1;
- }
- return $id;
-}
-
-sub get_mw_namespace_id_for_page {
- my $namespace = shift;
- if ($namespace =~ /^([^:]*):/) {
- return get_mw_namespace_id($namespace);
- } else {
- return;
- }
-}
diff --git a/contrib/mw-to-git/git-remote-mediawiki.txt b/contrib/mw-to-git/git-remote-mediawiki.txt
deleted file mode 100644
index 5da825f..0000000
--- a/contrib/mw-to-git/git-remote-mediawiki.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Git-Mediawiki is a project which aims the creation of a gate
-between git and mediawiki, allowing git users to push and pull
-objects from mediawiki just as one would do with a classic git
-repository thanks to remote-helpers.
-
-For more information, visit the wiki at
-https://github.com/Git-Mediawiki/Git-Mediawiki
diff --git a/contrib/mw-to-git/t/.gitignore b/contrib/mw-to-git/t/.gitignore
deleted file mode 100644
index 2b8dc30..0000000
--- a/contrib/mw-to-git/t/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-WEB/
-mediawiki/
-trash directory.t*/
-test-results/
diff --git a/contrib/mw-to-git/t/Makefile b/contrib/mw-to-git/t/Makefile
deleted file mode 100644
index 6c9f377..0000000
--- a/contrib/mw-to-git/t/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-#
-## Test git-remote-mediawiki
-
-# The default target of this Makefile is...
-all:: test
-
--include ../../../config.mak.autogen
--include ../../../config.mak
-
-T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
-
-.PHONY: help test clean all
-
-help:
- @echo 'Run "$(MAKE) test" to launch test scripts'
- @echo 'Run "$(MAKE) clean" to remove trash folders'
-
-test:
- @for t in $(T); do \
- echo "$$t"; \
- "./$$t" || exit 1; \
- done
-
-clean:
- $(RM) -r 'trash directory'.*
diff --git a/contrib/mw-to-git/t/README b/contrib/mw-to-git/t/README
deleted file mode 100644
index 72c4889..0000000
--- a/contrib/mw-to-git/t/README
+++ /dev/null
@@ -1,124 +0,0 @@
-Tests for Mediawiki-to-Git
-==========================
-
-Introduction
-------------
-This manual describes how to install the git-remote-mediawiki test
-environment on a machine with git installed on it.
-
-Prerequisite
-------------
-
-In order to run this test environment correctly, you will need to
-install the following packages (Debian/Ubuntu names, may need to be
-adapted for another distribution):
-
-* lighttpd
-* php
-* php-cgi
-* php-cli
-* php-curl
-* php-sqlite
-
-Principles and Technical Choices
---------------------------------
-
-The test environment makes it easy to install and manipulate one or
-several MediaWiki instances. To allow developers to run the testsuite
-easily, the environment does not require root privilege (except to
-install the required packages if needed). It starts a webserver
-instance on the user's account (using lighttpd greatly helps for
-that), and does not need a separate database daemon (thanks to the use
-of sqlite).
-
-Run the test environment
-------------------------
-
-Install a new wiki
-~~~~~~~~~~~~~~~~~~
-
-Once you have all the prerequisite, you need to install a MediaWiki
-instance on your machine. If you already have one, it is still
-strongly recommended to install one with the script provided. Here's
-how to work it:
-
-a. change directory to contrib/mw-to-git/t/
-b. if needed, edit test.config to choose your installation parameters
-c. run `./install-wiki.sh install`
-d. check on your favourite web browser if your wiki is correctly
- installed.
-
-Remove an existing wiki
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Edit the file test.config to fit the wiki you want to delete, and then
-execute the command `./install-wiki.sh delete` from the
-contrib/mw-to-git/t directory.
-
-Run the existing tests
-~~~~~~~~~~~~~~~~~~~~~~
-
-The provided tests are currently in the `contrib/mw-to-git/t` directory.
-The files are all the t936[0-9]-*.sh shell scripts.
-
-a. Run all tests:
-To do so, run "make test" from the contrib/mw-to-git/ directory.
-
-b. Run a specific test:
-To run a given test <test_name>, run ./<test_name> from the
-contrib/mw-to-git/t directory.
-
-How to create new tests
------------------------
-
-Available functions
-~~~~~~~~~~~~~~~~~~~
-
-The test environment of git-remote-mediawiki provides some functions
-useful to test its behaviour. for more details about the functions'
-parameters, please refer to the `test-gitmw-lib.sh` and
-`test-gitmw.pl` files.
-
-** `test_check_wiki_precond`:
-Check if the tests must be skipped or not. Please use this function
-at the beginning of each new test file.
-
-** `wiki_getpage`:
-Fetch a given page from the wiki and puts its content in the
-directory in parameter.
-
-** `wiki_delete_page`:
-Delete a given page from the wiki.
-
-** `wiki_edit_page`:
-Create or modify a given page in the wiki. You can specify several
-parameters like a summary for the page edition, or add the page to a
-given category.
-See test-gitmw.pl for more details.
-
-** `wiki_getallpage`:
-Fetch all pages from the wiki into a given directory. The directory
-is created if it does not exists.
-
-** `test_diff_directories`:
-Compare the content of two directories. The content must be the same.
-Use this function to compare the content of a git directory and a wiki
-one created by wiki_getallpage.
-
-** `test_contains_N_files`:
-Check if the given directory contains a given number of file.
-
-** `wiki_page_exists`:
-Tests if a given page exists on the wiki.
-
-** `wiki_reset`:
-Reset the wiki, i.e. flush the database. Use this function at the
-beginning of each new test, except if the test re-uses the same wiki
-(and history) as the previous test.
-
-How to write a new test
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Please, follow the standards given by git. See git/t/README.
-New file should be named as t936[0-9]-*.sh.
-Be sure to reset your wiki regularly with the function `wiki_reset`.
diff --git a/contrib/mw-to-git/t/install-wiki.sh b/contrib/mw-to-git/t/install-wiki.sh
deleted file mode 100755
index c215213..0000000
--- a/contrib/mw-to-git/t/install-wiki.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# This script installs or deletes a MediaWiki on your computer.
-# It requires a web server with PHP and SQLite running. In addition, if you
-# do not have MediaWiki sources on your computer, the option 'install'
-# downloads them for you.
-# Please set the CONFIGURATION VARIABLES in ./test-gitmw-lib.sh
-
-WIKI_TEST_DIR=$(cd "$(dirname "$0")" && pwd)
-
-if test -z "$WIKI_TEST_DIR"
-then
- WIKI_TEST_DIR=.
-fi
-
-. "$WIKI_TEST_DIR"/test-gitmw-lib.sh
-usage () {
- echo "usage: "
- echo " ./install-wiki.sh <install | delete | --help>"
- echo " install | -i : Install a wiki on your computer."
- echo " delete | -d : Delete the wiki and all its pages and "
- echo " content."
- echo " start | -s : Start the previously configured lighttpd daemon"
- echo " stop : Stop lighttpd daemon."
-}
-
-
-# Argument: install, delete, --help | -h
-case "$1" in
- "install" | "-i")
- wiki_install
- exit 0
- ;;
- "delete" | "-d")
- wiki_delete
- exit 0
- ;;
- "start" | "-s")
- start_lighttpd
- exit
- ;;
- "stop")
- stop_lighttpd
- exit
- ;;
- "--help" | "-h")
- usage
- exit 0
- ;;
- *)
- echo "Invalid argument: $1"
- usage
- exit 1
- ;;
-esac
diff --git a/contrib/mw-to-git/t/push-pull-tests.sh b/contrib/mw-to-git/t/push-pull-tests.sh
deleted file mode 100644
index 9da2dc5..0000000
--- a/contrib/mw-to-git/t/push-pull-tests.sh
+++ /dev/null
@@ -1,144 +0,0 @@
-test_push_pull () {
-
- test_expect_success 'Git pull works after adding a new wiki page' '
- wiki_reset &&
-
- git clone mediawiki::'"$WIKI_URL"' mw_dir_1 &&
- wiki_editpage Foo "page created after the git clone" false &&
-
- (
- cd mw_dir_1 &&
- git pull
- ) &&
-
- wiki_getallpage ref_page_1 &&
- test_diff_directories mw_dir_1 ref_page_1
- '
-
- test_expect_success 'Git pull works after editing a wiki page' '
- wiki_reset &&
-
- wiki_editpage Foo "page created before the git clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_2 &&
- wiki_editpage Foo "new line added on the wiki" true &&
-
- (
- cd mw_dir_2 &&
- git pull
- ) &&
-
- wiki_getallpage ref_page_2 &&
- test_diff_directories mw_dir_2 ref_page_2
- '
-
- test_expect_success 'git pull works on conflict handled by auto-merge' '
- wiki_reset &&
-
- wiki_editpage Foo "1 init
-3
-5
- " false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_3 &&
-
- wiki_editpage Foo "1 init
-2 content added on wiki after clone
-3
-5
- " false &&
-
- (
- cd mw_dir_3 &&
- echo "1 init
-3
-4 content added on git after clone
-5
-" >Foo.mw &&
- git commit -am "conflicting change on foo" &&
- git pull &&
- git push
- )
- '
-
- test_expect_success 'Git push works after adding a file .mw' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_4 &&
- wiki_getallpage ref_page_4 &&
- (
- cd mw_dir_4 &&
- test_path_is_missing Foo.mw &&
- touch Foo.mw &&
- echo "hello world" >>Foo.mw &&
- git add Foo.mw &&
- git commit -m "Foo" &&
- git push
- ) &&
- wiki_getallpage ref_page_4 &&
- test_diff_directories mw_dir_4 ref_page_4
- '
-
- test_expect_success 'Git push works after editing a file .mw' '
- wiki_reset &&
- wiki_editpage "Foo" "page created before the git clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_5 &&
-
- (
- cd mw_dir_5 &&
- echo "new line added in the file Foo.mw" >>Foo.mw &&
- git commit -am "edit file Foo.mw" &&
- git push
- ) &&
-
- wiki_getallpage ref_page_5 &&
- test_diff_directories mw_dir_5 ref_page_5
- '
-
- test_expect_failure 'Git push works after deleting a file' '
- wiki_reset &&
- wiki_editpage Foo "wiki page added before git clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_6 &&
-
- (
- cd mw_dir_6 &&
- git rm Foo.mw &&
- git commit -am "page Foo.mw deleted" &&
- git push
- ) &&
-
- test_must_fail wiki_page_exist Foo
- '
-
- test_expect_success 'Merge conflict expected and solving it' '
- wiki_reset &&
-
- git clone mediawiki::'"$WIKI_URL"' mw_dir_7 &&
- wiki_editpage Foo "1 conflict
-3 wiki
-4" false &&
-
- (
- cd mw_dir_7 &&
- echo "1 conflict
-2 git
-4" >Foo.mw &&
- git add Foo.mw &&
- git commit -m "conflict created" &&
- test_must_fail git pull &&
- "$PERL_PATH" -pi -e "s/[<=>].*//g" Foo.mw &&
- git commit -am "merge conflict solved" &&
- git push
- )
- '
-
- test_expect_failure 'git pull works after deleting a wiki page' '
- wiki_reset &&
- wiki_editpage Foo "wiki page added before the git clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_8 &&
-
- wiki_delete_page Foo &&
- (
- cd mw_dir_8 &&
- git pull &&
- test_path_is_missing Foo.mw
- )
- '
-}
diff --git a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh
deleted file mode 100755
index f08890d..0000000
--- a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh
+++ /dev/null
@@ -1,257 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-#
-# License: GPL v2 or later
-
-
-test_description='Test the Git Mediawiki remote helper: git clone'
-
-. ./test-gitmw-lib.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-
-test_check_precond
-
-
-test_expect_success 'Git clone creates the expected git log with one file' '
- wiki_reset &&
- wiki_editpage foo "this is not important" false -c cat -s "this must be the same" &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_1 &&
- (
- cd mw_dir_1 &&
- git log --format=%s HEAD^..HEAD >log.tmp
- ) &&
- echo "this must be the same" >msg.tmp &&
- test_cmp msg.tmp mw_dir_1/log.tmp
-'
-
-
-test_expect_success 'Git clone creates the expected git log with multiple files' '
- wiki_reset &&
- wiki_editpage daddy "this is not important" false -s="this must be the same" &&
- wiki_editpage daddy "neither is this" true -s="this must also be the same" &&
- wiki_editpage daddy "neither is this" true -s="same same same" &&
- wiki_editpage dj "dont care" false -s="identical" &&
- wiki_editpage dj "dont care either" true -s="identical too" &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_2 &&
- (
- cd mw_dir_2 &&
- git log --format=%s Daddy.mw >logDaddy.tmp &&
- git log --format=%s Dj.mw >logDj.tmp
- ) &&
- echo "same same same" >msgDaddy.tmp &&
- echo "this must also be the same" >>msgDaddy.tmp &&
- echo "this must be the same" >>msgDaddy.tmp &&
- echo "identical too" >msgDj.tmp &&
- echo "identical" >>msgDj.tmp &&
- test_cmp msgDaddy.tmp mw_dir_2/logDaddy.tmp &&
- test_cmp msgDj.tmp mw_dir_2/logDj.tmp
-'
-
-
-test_expect_success 'Git clone creates only Main_Page.mw with an empty wiki' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_3 &&
- test_contains_N_files mw_dir_3 1 &&
- test_path_is_file mw_dir_3/Main_Page.mw
-'
-
-test_expect_success 'Git clone does not fetch a deleted page' '
- wiki_reset &&
- wiki_editpage foo "this page must be deleted before the clone" false &&
- wiki_delete_page foo &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_4 &&
- test_contains_N_files mw_dir_4 1 &&
- test_path_is_file mw_dir_4/Main_Page.mw &&
- test_path_is_missing mw_dir_4/Foo.mw
-'
-
-test_expect_success 'Git clone works with page added' '
- wiki_reset &&
- wiki_editpage foo " I will be cloned" false &&
- wiki_editpage bar "I will be cloned" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_5 &&
- wiki_getallpage ref_page_5 &&
- test_diff_directories mw_dir_5 ref_page_5 &&
- wiki_delete_page foo &&
- wiki_delete_page bar
-'
-
-test_expect_success 'Git clone works with an edited page ' '
- wiki_reset &&
- wiki_editpage foo "this page will be edited" \
- false -s "first edition of page foo" &&
- wiki_editpage foo "this page has been edited and must be on the clone " true &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_6 &&
- test_path_is_file mw_dir_6/Foo.mw &&
- test_path_is_file mw_dir_6/Main_Page.mw &&
- wiki_getallpage mw_dir_6/page_ref_6 &&
- test_diff_directories mw_dir_6 mw_dir_6/page_ref_6 &&
- (
- cd mw_dir_6 &&
- git log --format=%s HEAD^ Foo.mw > ../Foo.log
- ) &&
- echo "first edition of page foo" > FooExpect.log &&
- diff FooExpect.log Foo.log
-'
-
-
-test_expect_success 'Git clone works with several pages and some deleted ' '
- wiki_reset &&
- wiki_editpage foo "this page will not be deleted" false &&
- wiki_editpage bar "I must not be erased" false &&
- wiki_editpage namnam "I will not be there at the end" false &&
- wiki_editpage nyancat "nyan nyan nyan delete me" false &&
- wiki_delete_page namnam &&
- wiki_delete_page nyancat &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_7 &&
- test_path_is_file mw_dir_7/Foo.mw &&
- test_path_is_file mw_dir_7/Bar.mw &&
- test_path_is_missing mw_dir_7/Namnam.mw &&
- test_path_is_missing mw_dir_7/Nyancat.mw &&
- wiki_getallpage mw_dir_7/page_ref_7 &&
- test_diff_directories mw_dir_7 mw_dir_7/page_ref_7
-'
-
-
-test_expect_success 'Git clone works with one specific page cloned ' '
- wiki_reset &&
- wiki_editpage foo "I will not be cloned" false &&
- wiki_editpage bar "Do not clone me" false &&
- wiki_editpage namnam "I will be cloned :)" false -s="this log must stay" &&
- wiki_editpage nyancat "nyan nyan nyan you cant clone me" false &&
- git clone -c remote.origin.pages=namnam \
- mediawiki::'"$WIKI_URL"' mw_dir_8 &&
- test_contains_N_files mw_dir_8 1 &&
- test_path_is_file mw_dir_8/Namnam.mw &&
- test_path_is_missing mw_dir_8/Main_Page.mw &&
- (
- cd mw_dir_8 &&
- echo "this log must stay" >msg.tmp &&
- git log --format=%s >log.tmp &&
- test_cmp msg.tmp log.tmp
- ) &&
- wiki_check_content mw_dir_8/Namnam.mw Namnam
-'
-
-test_expect_success 'Git clone works with multiple specific page cloned ' '
- wiki_reset &&
- wiki_editpage foo "I will be there" false &&
- wiki_editpage bar "I will not disappear" false &&
- wiki_editpage namnam "I be erased" false &&
- wiki_editpage nyancat "nyan nyan nyan you will not erase me" false &&
- wiki_delete_page namnam &&
- git clone -c remote.origin.pages="foo bar nyancat namnam" \
- mediawiki::'"$WIKI_URL"' mw_dir_9 &&
- test_contains_N_files mw_dir_9 3 &&
- test_path_is_missing mw_dir_9/Namnam.mw &&
- test_path_is_file mw_dir_9/Foo.mw &&
- test_path_is_file mw_dir_9/Nyancat.mw &&
- test_path_is_file mw_dir_9/Bar.mw &&
- wiki_check_content mw_dir_9/Foo.mw Foo &&
- wiki_check_content mw_dir_9/Bar.mw Bar &&
- wiki_check_content mw_dir_9/Nyancat.mw Nyancat
-'
-
-test_expect_success 'Mediawiki-clone of several specific pages on wiki' '
- wiki_reset &&
- wiki_editpage foo "foo 1" false &&
- wiki_editpage bar "bar 1" false &&
- wiki_editpage dummy "dummy 1" false &&
- wiki_editpage cloned_1 "cloned_1 1" false &&
- wiki_editpage cloned_2 "cloned_2 2" false &&
- wiki_editpage cloned_3 "cloned_3 3" false &&
- mkdir -p ref_page_10 &&
- wiki_getpage cloned_1 ref_page_10 &&
- wiki_getpage cloned_2 ref_page_10 &&
- wiki_getpage cloned_3 ref_page_10 &&
- git clone -c remote.origin.pages="cloned_1 cloned_2 cloned_3" \
- mediawiki::'"$WIKI_URL"' mw_dir_10 &&
- test_diff_directories mw_dir_10 ref_page_10
-'
-
-test_expect_success 'Git clone works with the shallow option' '
- wiki_reset &&
- wiki_editpage foo "1st revision, should be cloned" false &&
- wiki_editpage bar "1st revision, should be cloned" false &&
- wiki_editpage nyan "1st revision, should not be cloned" false &&
- wiki_editpage nyan "2nd revision, should be cloned" false &&
- git -c remote.origin.shallow=true clone \
- mediawiki::'"$WIKI_URL"' mw_dir_11 &&
- test_contains_N_files mw_dir_11 4 &&
- test_path_is_file mw_dir_11/Nyan.mw &&
- test_path_is_file mw_dir_11/Foo.mw &&
- test_path_is_file mw_dir_11/Bar.mw &&
- test_path_is_file mw_dir_11/Main_Page.mw &&
- (
- cd mw_dir_11 &&
- test $(git log --oneline Nyan.mw | wc -l) -eq 1 &&
- test $(git log --oneline Foo.mw | wc -l) -eq 1 &&
- test $(git log --oneline Bar.mw | wc -l) -eq 1 &&
- test $(git log --oneline Main_Page.mw | wc -l ) -eq 1
- ) &&
- wiki_check_content mw_dir_11/Nyan.mw Nyan &&
- wiki_check_content mw_dir_11/Foo.mw Foo &&
- wiki_check_content mw_dir_11/Bar.mw Bar &&
- wiki_check_content mw_dir_11/Main_Page.mw Main_Page
-'
-
-test_expect_success 'Git clone works with the shallow option with a delete page' '
- wiki_reset &&
- wiki_editpage foo "1st revision, will be deleted" false &&
- wiki_editpage bar "1st revision, should be cloned" false &&
- wiki_editpage nyan "1st revision, should not be cloned" false &&
- wiki_editpage nyan "2nd revision, should be cloned" false &&
- wiki_delete_page foo &&
- git -c remote.origin.shallow=true clone \
- mediawiki::'"$WIKI_URL"' mw_dir_12 &&
- test_contains_N_files mw_dir_12 3 &&
- test_path_is_file mw_dir_12/Nyan.mw &&
- test_path_is_missing mw_dir_12/Foo.mw &&
- test_path_is_file mw_dir_12/Bar.mw &&
- test_path_is_file mw_dir_12/Main_Page.mw &&
- (
- cd mw_dir_12 &&
- test $(git log --oneline Nyan.mw | wc -l) -eq 1 &&
- test $(git log --oneline Bar.mw | wc -l) -eq 1 &&
- test $(git log --oneline Main_Page.mw | wc -l ) -eq 1
- ) &&
- wiki_check_content mw_dir_12/Nyan.mw Nyan &&
- wiki_check_content mw_dir_12/Bar.mw Bar &&
- wiki_check_content mw_dir_12/Main_Page.mw Main_Page
-'
-
-test_expect_success 'Test of fetching a category' '
- wiki_reset &&
- wiki_editpage Foo "I will be cloned" false -c=Category &&
- wiki_editpage Bar "Meet me on the repository" false -c=Category &&
- wiki_editpage Dummy "I will not come" false &&
- wiki_editpage BarWrong "I will stay online only" false -c=NotCategory &&
- git clone -c remote.origin.categories="Category" \
- mediawiki::'"$WIKI_URL"' mw_dir_13 &&
- wiki_getallpage ref_page_13 Category &&
- test_diff_directories mw_dir_13 ref_page_13
-'
-
-test_expect_success 'Test of resistance to modification of category on wiki for clone' '
- wiki_reset &&
- wiki_editpage Tobedeleted "this page will be deleted" false -c=Catone &&
- wiki_editpage Tobeedited "this page will be modified" false -c=Catone &&
- wiki_editpage Normalone "this page wont be modified and will be on git" false -c=Catone &&
- wiki_editpage Notconsidered "this page will not appear on local" false &&
- wiki_editpage Othercategory "this page will not appear on local" false -c=Cattwo &&
- wiki_editpage Tobeedited "this page have been modified" true -c=Catone &&
- wiki_delete_page Tobedeleted &&
- git clone -c remote.origin.categories="Catone" \
- mediawiki::'"$WIKI_URL"' mw_dir_14 &&
- wiki_getallpage ref_page_14 Catone &&
- test_diff_directories mw_dir_14 ref_page_14
-'
-
-test_done
diff --git a/contrib/mw-to-git/t/t9361-mw-to-git-push-pull.sh b/contrib/mw-to-git/t/t9361-mw-to-git-push-pull.sh
deleted file mode 100755
index 9ea2014..0000000
--- a/contrib/mw-to-git/t/t9361-mw-to-git-push-pull.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-#
-# License: GPL v2 or later
-
-# tests for git-remote-mediawiki
-
-test_description='Test the Git Mediawiki remote helper: git push and git pull simple test cases'
-
-. ./test-gitmw-lib.sh
-. ./push-pull-tests.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-test_check_precond
-
-test_push_pull
-
-test_done
diff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
deleted file mode 100755
index 526d928..0000000
--- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
+++ /dev/null
@@ -1,347 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-#
-# License: GPL v2 or later
-
-# tests for git-remote-mediawiki
-
-test_description='Test git-mediawiki with special characters in filenames'
-
-. ./test-gitmw-lib.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-
-test_check_precond
-
-
-test_expect_success 'Git clone works for a wiki with accents in the page names' '
- wiki_reset &&
- wiki_editpage féé "This page must be délétéd before clone" false &&
- wiki_editpage kèè "This page must be deleted before clone" false &&
- wiki_editpage hàà "This page must be deleted before clone" false &&
- wiki_editpage kîî "This page must be deleted before clone" false &&
- wiki_editpage foo "This page must be deleted before clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_1 &&
- wiki_getallpage ref_page_1 &&
- test_diff_directories mw_dir_1 ref_page_1
-'
-
-
-test_expect_success 'Git pull works with a wiki with accents in the pages names' '
- wiki_reset &&
- wiki_editpage kîî "this page must be cloned" false &&
- wiki_editpage foo "this page must be cloned" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_2 &&
- wiki_editpage éàîôû "This page must be pulled" false &&
- (
- cd mw_dir_2 &&
- git pull
- ) &&
- wiki_getallpage ref_page_2 &&
- test_diff_directories mw_dir_2 ref_page_2
-'
-
-
-test_expect_success 'Cloning a chosen page works with accents' '
- wiki_reset &&
- wiki_editpage kîî "this page must be cloned" false &&
- git clone -c remote.origin.pages=kîî \
- mediawiki::'"$WIKI_URL"' mw_dir_3 &&
- wiki_check_content mw_dir_3/Kîî.mw Kîî &&
- test_path_is_file mw_dir_3/Kîî.mw &&
- rm -rf mw_dir_3
-'
-
-
-test_expect_success 'The shallow option works with accents' '
- wiki_reset &&
- wiki_editpage néoà "1st revision, should not be cloned" false &&
- wiki_editpage néoà "2nd revision, should be cloned" false &&
- git -c remote.origin.shallow=true clone \
- mediawiki::'"$WIKI_URL"' mw_dir_4 &&
- test_contains_N_files mw_dir_4 2 &&
- test_path_is_file mw_dir_4/Néoà.mw &&
- test_path_is_file mw_dir_4/Main_Page.mw &&
- (
- cd mw_dir_4 &&
- test $(git log --oneline Néoà.mw | wc -l) -eq 1 &&
- test $(git log --oneline Main_Page.mw | wc -l ) -eq 1
- ) &&
- wiki_check_content mw_dir_4/Néoà.mw Néoà &&
- wiki_check_content mw_dir_4/Main_Page.mw Main_Page
-'
-
-
-test_expect_success 'Cloning works when page name first letter has an accent' '
- wiki_reset &&
- wiki_editpage îî "this page must be cloned" false &&
- git clone -c remote.origin.pages=îî \
- mediawiki::'"$WIKI_URL"' mw_dir_5 &&
- test_path_is_file mw_dir_5/Îî.mw &&
- wiki_check_content mw_dir_5/Îî.mw Îî
-'
-
-
-test_expect_success 'Git push works with a wiki with accents' '
- wiki_reset &&
- wiki_editpage féé "lots of accents : éèàÖ" false &&
- wiki_editpage foo "this page must be cloned" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_6 &&
- (
- cd mw_dir_6 &&
- echo "A wild Pîkächû appears on the wiki" >Pîkächû.mw &&
- git add Pîkächû.mw &&
- git commit -m "A new page appears" &&
- git push
- ) &&
- wiki_getallpage ref_page_6 &&
- test_diff_directories mw_dir_6 ref_page_6
-'
-
-test_expect_success 'Git clone works with accentsand spaces' '
- wiki_reset &&
- wiki_editpage "é à î" "this page must be délété before the clone" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_7 &&
- wiki_getallpage ref_page_7 &&
- test_diff_directories mw_dir_7 ref_page_7
-'
-
-test_expect_success 'character $ in page name (mw -> git)' '
- wiki_reset &&
- wiki_editpage file_\$_foo "expect to be called file_$_foo" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_8 &&
- test_path_is_file mw_dir_8/File_\$_foo.mw &&
- wiki_getallpage ref_page_8 &&
- test_diff_directories mw_dir_8 ref_page_8
-'
-
-
-
-test_expect_success 'character $ in file name (git -> mw) ' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_9 &&
- (
- cd mw_dir_9 &&
- echo "this file is called File_\$_foo.mw" >File_\$_foo.mw &&
- git add . &&
- git commit -am "file File_\$_foo.mw" &&
- git pull &&
- git push
- ) &&
- wiki_getallpage ref_page_9 &&
- test_diff_directories mw_dir_9 ref_page_9
-'
-
-
-test_expect_failure 'capital at the beginning of file names' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_10 &&
- (
- cd mw_dir_10 &&
- echo "my new file foo" >foo.mw &&
- echo "my new file Foo... Finger crossed" >Foo.mw &&
- git add . &&
- git commit -am "file foo.mw" &&
- git pull &&
- git push
- ) &&
- wiki_getallpage ref_page_10 &&
- test_diff_directories mw_dir_10 ref_page_10
-'
-
-
-test_expect_failure 'special character at the beginning of file name from mw to git' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_11 &&
- wiki_editpage {char_1 "expect to be renamed {char_1" false &&
- wiki_editpage [char_2 "expect to be renamed [char_2" false &&
- (
- cd mw_dir_11 &&
- git pull
- ) &&
- test_path_is_file mw_dir_11/{char_1 &&
- test_path_is_file mw_dir_11/[char_2
-'
-
-test_expect_success 'Pull page with title containing ":" other than namespace separator' '
- wiki_editpage Foo:Bar content false &&
- (
- cd mw_dir_11 &&
- git pull
- ) &&
- test_path_is_file mw_dir_11/Foo:Bar.mw
-'
-
-test_expect_success 'Push page with title containing ":" other than namespace separator' '
- (
- cd mw_dir_11 &&
- echo content >NotANameSpace:Page.mw &&
- git add NotANameSpace:Page.mw &&
- git commit -m "add page with colon" &&
- git push
- ) &&
- wiki_page_exist NotANameSpace:Page
-'
-
-test_expect_success 'test of correct formatting for file name from mw to git' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_12 &&
- wiki_editpage char_%_7b_1 "expect to be renamed char{_1" false &&
- wiki_editpage char_%_5b_2 "expect to be renamed char{_2" false &&
- (
- cd mw_dir_12 &&
- git pull
- ) &&
- test_path_is_file mw_dir_12/Char\{_1.mw &&
- test_path_is_file mw_dir_12/Char\[_2.mw &&
- wiki_getallpage ref_page_12 &&
- mv ref_page_12/Char_%_7b_1.mw ref_page_12/Char\{_1.mw &&
- mv ref_page_12/Char_%_5b_2.mw ref_page_12/Char\[_2.mw &&
- test_diff_directories mw_dir_12 ref_page_12
-'
-
-
-test_expect_failure 'test of correct formatting for file name beginning with special character' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_13 &&
- (
- cd mw_dir_13 &&
- echo "my new file {char_1" >\{char_1.mw &&
- echo "my new file [char_2" >\[char_2.mw &&
- git add . &&
- git commit -am "committing some exotic file name..." &&
- git push &&
- git pull
- ) &&
- wiki_getallpage ref_page_13 &&
- test_path_is_file ref_page_13/{char_1.mw &&
- test_path_is_file ref_page_13/[char_2.mw &&
- test_diff_directories mw_dir_13 ref_page_13
-'
-
-
-test_expect_success 'test of correct formatting for file name from git to mw' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_14 &&
- (
- cd mw_dir_14 &&
- echo "my new file char{_1" >Char\{_1.mw &&
- echo "my new file char[_2" >Char\[_2.mw &&
- git add . &&
- git commit -m "committing some exotic file name..." &&
- git push
- ) &&
- wiki_getallpage ref_page_14 &&
- mv mw_dir_14/Char\{_1.mw mw_dir_14/Char_%_7b_1.mw &&
- mv mw_dir_14/Char\[_2.mw mw_dir_14/Char_%_5b_2.mw &&
- test_diff_directories mw_dir_14 ref_page_14
-'
-
-
-test_expect_success 'git clone with /' '
- wiki_reset &&
- wiki_editpage \/fo\/o "this is not important" false -c=Deleted &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_15 &&
- test_path_is_file mw_dir_15/%2Ffo%2Fo.mw &&
- wiki_check_content mw_dir_15/%2Ffo%2Fo.mw \/fo\/o
-'
-
-
-test_expect_success 'git push with /' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_16 &&
- echo "I will be on the wiki" >mw_dir_16/%2Ffo%2Fo.mw &&
- (
- cd mw_dir_16 &&
- git add %2Ffo%2Fo.mw &&
- git commit -m " %2Ffo%2Fo added" &&
- git push
- ) &&
- wiki_page_exist \/fo\/o &&
- wiki_check_content mw_dir_16/%2Ffo%2Fo.mw \/fo\/o
-
-'
-
-
-test_expect_success 'git clone with \' '
- wiki_reset &&
- wiki_editpage \\ko\\o "this is not important" false -c=Deleted &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_17 &&
- test_path_is_file mw_dir_17/\\ko\\o.mw &&
- wiki_check_content mw_dir_17/\\ko\\o.mw \\ko\\o
-'
-
-
-test_expect_success 'git push with \' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_18 &&
- echo "I will be on the wiki" >mw_dir_18/\\ko\\o.mw &&
- (
- cd mw_dir_18 &&
- git add \\ko\\o.mw &&
- git commit -m " \\ko\\o added" &&
- git push
- ) &&
- wiki_page_exist \\ko\\o &&
- wiki_check_content mw_dir_18/\\ko\\o.mw \\ko\\o
-
-'
-
-test_expect_success 'git clone with \ in format control' '
- wiki_reset &&
- wiki_editpage \\no\\o "this is not important" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_19 &&
- test_path_is_file mw_dir_19/\\no\\o.mw &&
- wiki_check_content mw_dir_19/\\no\\o.mw \\no\\o
-'
-
-
-test_expect_success 'git push with \ in format control' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_20 &&
- echo "I will be on the wiki" >mw_dir_20/\\fo\\o.mw &&
- (
- cd mw_dir_20 &&
- git add \\fo\\o.mw &&
- git commit -m " \\fo\\o added" &&
- git push
- ) &&
- wiki_page_exist \\fo\\o &&
- wiki_check_content mw_dir_20/\\fo\\o.mw \\fo\\o
-
-'
-
-
-test_expect_success 'fast-import meta-characters in page name (mw -> git)' '
- wiki_reset &&
- wiki_editpage \"file\"_\\_foo "expect to be called \"file\"_\\_foo" false &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_21 &&
- test_path_is_file mw_dir_21/\"file\"_\\_foo.mw &&
- wiki_getallpage ref_page_21 &&
- test_diff_directories mw_dir_21 ref_page_21
-'
-
-
-test_expect_success 'fast-import meta-characters in page name (git -> mw) ' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir_22 &&
- (
- cd mw_dir_22 &&
- echo "this file is called \"file\"_\\_foo.mw" >\"file\"_\\_foo &&
- git add . &&
- git commit -am "file \"file\"_\\_foo" &&
- git pull &&
- git push
- ) &&
- wiki_getallpage ref_page_22 &&
- test_diff_directories mw_dir_22 ref_page_22
-'
-
-
-test_done
diff --git a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
deleted file mode 100755
index 7139995..0000000
--- a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-#
-# License: GPL v2 or later
-
-# tests for git-remote-mediawiki
-
-test_description='Test the Git Mediawiki remote helper: git push and git pull simple test cases'
-
-. ./test-gitmw-lib.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-
-test_check_precond
-
-
-test_git_reimport () {
- git -c remote.origin.dumbPush=true push &&
- git -c remote.origin.mediaImport=true pull --rebase
-}
-
-# Don't bother with permissions, be administrator by default
-test_expect_success 'setup config' '
- git config --global remote.origin.mwLogin "$WIKI_ADMIN" &&
- git config --global remote.origin.mwPassword "$WIKI_PASSW" &&
- test_might_fail git config --global --unset remote.origin.mediaImport
-'
-
-test_expect_failure 'git push can upload media (File:) files' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- (
- cd mw_dir &&
- echo "hello world" >Foo.txt &&
- git add Foo.txt &&
- git commit -m "add a text file" &&
- git push &&
- "$PERL_PATH" -e "print STDOUT \"binary content: \".chr(255);" >Foo.txt &&
- git add Foo.txt &&
- git commit -m "add a text file with binary content" &&
- git push
- )
-'
-
-test_expect_failure 'git clone works on previously created wiki with media files' '
- test_when_finished "rm -rf mw_dir mw_dir_clone" &&
- git clone -c remote.origin.mediaimport=true \
- mediawiki::'"$WIKI_URL"' mw_dir_clone &&
- test_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&
- (cd mw_dir_clone && git checkout HEAD^) &&
- (cd mw_dir && git checkout HEAD^) &&
- test_path_is_file mw_dir_clone/Foo.txt &&
- test_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt
-'
-
-test_expect_success 'git push can upload media (File:) files containing valid UTF-8' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- (
- cd mw_dir &&
- "$PERL_PATH" -e "print STDOUT \"UTF-8 content: éèàéê€.\";" >Bar.txt &&
- git add Bar.txt &&
- git commit -m "add a text file with UTF-8 content" &&
- git push
- )
-'
-
-test_expect_success 'git clone works on previously created wiki with media files containing valid UTF-8' '
- test_when_finished "rm -rf mw_dir mw_dir_clone" &&
- git clone -c remote.origin.mediaimport=true \
- mediawiki::'"$WIKI_URL"' mw_dir_clone &&
- test_cmp mw_dir_clone/Bar.txt mw_dir/Bar.txt
-'
-
-test_expect_success 'git push & pull work with locally renamed media files' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- test_when_finished "rm -fr mw_dir" &&
- (
- cd mw_dir &&
- echo "A File" >Foo.txt &&
- git add Foo.txt &&
- git commit -m "add a file" &&
- git mv Foo.txt Bar.txt &&
- git commit -m "Rename a file" &&
- test_git_reimport &&
- echo "A File" >expect &&
- test_cmp expect Bar.txt &&
- test_path_is_missing Foo.txt
- )
-'
-
-test_expect_success 'git push can propagate local page deletion' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- test_when_finished "rm -fr mw_dir" &&
- (
- cd mw_dir &&
- test_path_is_missing Foo.mw &&
- echo "hello world" >Foo.mw &&
- git add Foo.mw &&
- git commit -m "Add the page Foo" &&
- git push &&
- rm -f Foo.mw &&
- git commit -am "Delete the page Foo" &&
- test_git_reimport &&
- test_path_is_missing Foo.mw
- )
-'
-
-test_expect_success 'git push can propagate local media file deletion' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- test_when_finished "rm -fr mw_dir" &&
- (
- cd mw_dir &&
- echo "hello world" >Foo.txt &&
- git add Foo.txt &&
- git commit -m "Add the text file Foo" &&
- git rm Foo.txt &&
- git commit -m "Delete the file Foo" &&
- test_git_reimport &&
- test_path_is_missing Foo.txt
- )
-'
-
-# test failure: the file is correctly uploaded, and then deleted but
-# as no page link to it, the import (which looks at page revisions)
-# doesn't notice the file deletion on the wiki. We fetch the list of
-# files from the wiki, but as the file is deleted, it doesn't appear.
-test_expect_failure 'git pull correctly imports media file deletion when no page link to it' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- test_when_finished "rm -fr mw_dir" &&
- (
- cd mw_dir &&
- echo "hello world" >Foo.txt &&
- git add Foo.txt &&
- git commit -m "Add the text file Foo" &&
- git push &&
- git rm Foo.txt &&
- git commit -m "Delete the file Foo" &&
- test_git_reimport &&
- test_path_is_missing Foo.txt
- )
-'
-
-test_expect_success 'git push properly warns about insufficient permissions' '
- wiki_reset &&
- git clone mediawiki::'"$WIKI_URL"' mw_dir &&
- test_when_finished "rm -fr mw_dir" &&
- (
- cd mw_dir &&
- echo "A File" >foo.forbidden &&
- git add foo.forbidden &&
- git commit -m "add a file" &&
- git push 2>actual &&
- test_grep "foo.forbidden is not a permitted file" actual
- )
-'
-
-test_expect_success 'setup a repository with media files' '
- wiki_reset &&
- wiki_editpage testpage "I am linking a file [[File:File.txt]]" false &&
- echo "File content" >File.txt &&
- wiki_upload_file File.txt &&
- echo "Another file content" >AnotherFile.txt &&
- wiki_upload_file AnotherFile.txt
-'
-
-test_expect_success 'git clone works with one specific page cloned and mediaimport=true' '
- git clone -c remote.origin.pages=testpage \
- -c remote.origin.mediaimport=true \
- mediawiki::'"$WIKI_URL"' mw_dir_15 &&
- test_when_finished "rm -rf mw_dir_15" &&
- test_contains_N_files mw_dir_15 3 &&
- test_path_is_file mw_dir_15/Testpage.mw &&
- test_path_is_file mw_dir_15/File:File.txt.mw &&
- test_path_is_file mw_dir_15/File.txt &&
- test_path_is_missing mw_dir_15/Main_Page.mw &&
- test_path_is_missing mw_dir_15/File:AnotherFile.txt.mw &&
- test_path_is_missing mw_dir_15/AnothetFile.txt &&
- wiki_check_content mw_dir_15/Testpage.mw Testpage &&
- test_cmp mw_dir_15/File.txt File.txt
-'
-
-test_expect_success 'git clone works with one specific page cloned and mediaimport=false' '
- test_when_finished "rm -rf mw_dir_16" &&
- git clone -c remote.origin.pages=testpage \
- mediawiki::'"$WIKI_URL"' mw_dir_16 &&
- test_contains_N_files mw_dir_16 1 &&
- test_path_is_file mw_dir_16/Testpage.mw &&
- test_path_is_missing mw_dir_16/File:File.txt.mw &&
- test_path_is_missing mw_dir_16/File.txt &&
- test_path_is_missing mw_dir_16/Main_Page.mw &&
- wiki_check_content mw_dir_16/Testpage.mw Testpage
-'
-
-# should behave like mediaimport=false
-test_expect_success 'git clone works with one specific page cloned and mediaimport unset' '
- test_when_finished "rm -fr mw_dir_17" &&
- git clone -c remote.origin.pages=testpage \
- mediawiki::'"$WIKI_URL"' mw_dir_17 &&
- test_contains_N_files mw_dir_17 1 &&
- test_path_is_file mw_dir_17/Testpage.mw &&
- test_path_is_missing mw_dir_17/File:File.txt.mw &&
- test_path_is_missing mw_dir_17/File.txt &&
- test_path_is_missing mw_dir_17/Main_Page.mw &&
- wiki_check_content mw_dir_17/Testpage.mw Testpage
-'
-
-test_done
diff --git a/contrib/mw-to-git/t/t9364-pull-by-rev.sh b/contrib/mw-to-git/t/t9364-pull-by-rev.sh
deleted file mode 100755
index 5c22457..0000000
--- a/contrib/mw-to-git/t/t9364-pull-by-rev.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-test_description='Test the Git Mediawiki remote helper: git pull by revision'
-
-. ./test-gitmw-lib.sh
-. ./push-pull-tests.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-test_check_precond
-
-test_expect_success 'configuration' '
- git config --global mediawiki.fetchStrategy by_rev
-'
-
-test_push_pull
-
-test_done
diff --git a/contrib/mw-to-git/t/t9365-continuing-queries.sh b/contrib/mw-to-git/t/t9365-continuing-queries.sh
deleted file mode 100755
index d3e7312..0000000
--- a/contrib/mw-to-git/t/t9365-continuing-queries.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-test_description='Test the Git Mediawiki remote helper: queries w/ more than 500 results'
-
-. ./test-gitmw-lib.sh
-. $TEST_DIRECTORY/test-lib.sh
-
-test_check_precond
-
-test_expect_success 'creating page w/ >500 revisions' '
- wiki_reset &&
- for i in $(test_seq 501)
- do
- echo "creating revision $i" &&
- wiki_editpage foo "revision $i<br/>" true || return 1
- done
-'
-
-test_expect_success 'cloning page w/ >500 revisions' '
- git clone mediawiki::'"$WIKI_URL"' mw_dir
-'
-
-test_done
diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh
deleted file mode 100755
index 64e46c1..0000000
--- a/contrib/mw-to-git/t/test-gitmw-lib.sh
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-# License: GPL v2 or later
-
-#
-# CONFIGURATION VARIABLES
-# You might want to change these ones
-#
-
-. ./test.config
-
-WIKI_BASE_URL=http://$SERVER_ADDR:$PORT
-WIKI_URL=$WIKI_BASE_URL/$WIKI_DIR_NAME
-CURR_DIR=$(pwd)
-TEST_OUTPUT_DIRECTORY=$(pwd)
-TEST_DIRECTORY="$CURR_DIR"/../../../t
-
-export TEST_OUTPUT_DIRECTORY TEST_DIRECTORY CURR_DIR
-
-if test "$LIGHTTPD" = "false" ; then
- PORT=80
-else
- WIKI_DIR_INST="$CURR_DIR/$WEB_WWW"
-fi
-
-wiki_upload_file () {
- "$CURR_DIR"/test-gitmw.pl upload_file "$@"
-}
-
-wiki_getpage () {
- "$CURR_DIR"/test-gitmw.pl get_page "$@"
-}
-
-wiki_delete_page () {
- "$CURR_DIR"/test-gitmw.pl delete_page "$@"
-}
-
-wiki_editpage () {
- "$CURR_DIR"/test-gitmw.pl edit_page "$@"
-}
-
-die () {
- die_with_status 1 "$@"
-}
-
-die_with_status () {
- status=$1
- shift
- echo >&2 "$*"
- exit "$status"
-}
-
-
-# Check the preconditions to run git-remote-mediawiki's tests
-test_check_precond () {
- if ! test_have_prereq PERL
- then
- skip_all='skipping gateway git-mw tests, perl not available'
- test_done
- fi
-
- GIT_EXEC_PATH=$(cd "$(dirname "$0")" && cd "../.." && pwd)
- PATH="$GIT_EXEC_PATH"'/bin-wrapper:'"$PATH"
-
- if ! test -d "$WIKI_DIR_INST/$WIKI_DIR_NAME"
- then
- skip_all='skipping gateway git-mw tests, no mediawiki found'
- test_done
- fi
-}
-
-# test_diff_directories <dir_git> <dir_wiki>
-#
-# Compare the contents of directories <dir_git> and <dir_wiki> with diff
-# and errors if they do not match. The program will
-# not look into .git in the process.
-# Warning: the first argument MUST be the directory containing the git data
-test_diff_directories () {
- rm -rf "$1_tmp"
- mkdir -p "$1_tmp"
- cp "$1"/*.mw "$1_tmp"
- diff -r -b "$1_tmp" "$2"
-}
-
-# $1=<dir>
-# $2=<N>
-#
-# Check that <dir> contains exactly <N> files
-test_contains_N_files () {
- if test $(ls -- "$1" | wc -l) -ne "$2"; then
- echo "directory $1 should contain $2 files"
- echo "it contains these files:"
- ls "$1"
- false
- fi
-}
-
-
-# wiki_check_content <file_name> <page_name>
-#
-# Compares the contents of the file <file_name> and the wiki page
-# <page_name> and exits with error 1 if they do not match.
-wiki_check_content () {
- mkdir -p wiki_tmp
- wiki_getpage "$2" wiki_tmp
- # replacement of forbidden character in file name
- page_name=$(printf "%s\n" "$2" | sed -e "s/\//%2F/g")
-
- diff -b "$1" wiki_tmp/"$page_name".mw
- if test $? -ne 0
- then
- rm -rf wiki_tmp
- error "ERROR: file $2 not found on wiki"
- fi
- rm -rf wiki_tmp
-}
-
-# wiki_page_exist <page_name>
-#
-# Check the existence of the page <page_name> on the wiki and exits
-# with error if it is absent from it.
-wiki_page_exist () {
- mkdir -p wiki_tmp
- wiki_getpage "$1" wiki_tmp
- page_name=$(printf "%s\n" "$1" | sed "s/\//%2F/g")
- if test -f wiki_tmp/"$page_name".mw ; then
- rm -rf wiki_tmp
- else
- rm -rf wiki_tmp
- error "test failed: file $1 not found on wiki"
- fi
-}
-
-# wiki_getallpagename
-#
-# Fetch the name of each page on the wiki.
-wiki_getallpagename () {
- "$CURR_DIR"/test-gitmw.pl getallpagename
-}
-
-# wiki_getallpagecategory <category>
-#
-# Fetch the name of each page belonging to <category> on the wiki.
-wiki_getallpagecategory () {
- "$CURR_DIR"/test-gitmw.pl getallpagename "$@"
-}
-
-# wiki_getallpage <dest_dir> [<category>]
-#
-# Fetch all the pages from the wiki and place them in the directory
-# <dest_dir>.
-# If <category> is define, then wiki_getallpage fetch the pages included
-# in <category>.
-wiki_getallpage () {
- if test -z "$2";
- then
- wiki_getallpagename
- else
- wiki_getallpagecategory "$2"
- fi
- mkdir -p "$1"
- while read -r line; do
- wiki_getpage "$line" $1;
- done < all.txt
-}
-
-# ================= Install part =================
-
-error () {
- echo "$@" >&2
- exit 1
-}
-
-# config_lighttpd
-#
-# Create the configuration files and the folders necessary to start lighttpd.
-# Overwrite any existing file.
-config_lighttpd () {
- mkdir -p $WEB
- mkdir -p $WEB_TMP
- mkdir -p $WEB_WWW
- cat > $WEB/lighttpd.conf <<EOF
- server.document-root = "$CURR_DIR/$WEB_WWW"
- server.port = $PORT
- server.pid-file = "$CURR_DIR/$WEB_TMP/pid"
-
- server.modules = (
- "mod_rewrite",
- "mod_redirect",
- "mod_access",
- "mod_accesslog",
- "mod_fastcgi"
- )
-
- index-file.names = ("index.php" , "index.html")
-
- mimetype.assign = (
- ".pdf" => "application/pdf",
- ".sig" => "application/pgp-signature",
- ".spl" => "application/futuresplash",
- ".class" => "application/octet-stream",
- ".ps" => "application/postscript",
- ".torrent" => "application/x-bittorrent",
- ".dvi" => "application/x-dvi",
- ".gz" => "application/x-gzip",
- ".pac" => "application/x-ns-proxy-autoconfig",
- ".swf" => "application/x-shockwave-flash",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".tar" => "application/x-tar",
- ".zip" => "application/zip",
- ".mp3" => "audio/mpeg",
- ".m3u" => "audio/x-mpegurl",
- ".wma" => "audio/x-ms-wma",
- ".wax" => "audio/x-ms-wax",
- ".ogg" => "application/ogg",
- ".wav" => "audio/x-wav",
- ".gif" => "image/gif",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".png" => "image/png",
- ".xbm" => "image/x-xbitmap",
- ".xpm" => "image/x-xpixmap",
- ".xwd" => "image/x-xwindowdump",
- ".css" => "text/css",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".js" => "text/javascript",
- ".asc" => "text/plain",
- ".c" => "text/plain",
- ".cpp" => "text/plain",
- ".log" => "text/plain",
- ".conf" => "text/plain",
- ".text" => "text/plain",
- ".txt" => "text/plain",
- ".dtd" => "text/xml",
- ".xml" => "text/xml",
- ".mpeg" => "video/mpeg",
- ".mpg" => "video/mpeg",
- ".mov" => "video/quicktime",
- ".qt" => "video/quicktime",
- ".avi" => "video/x-msvideo",
- ".asf" => "video/x-ms-asf",
- ".asx" => "video/x-ms-asf",
- ".wmv" => "video/x-ms-wmv",
- ".bz2" => "application/x-bzip",
- ".tbz" => "application/x-bzip-compressed-tar",
- ".tar.bz2" => "application/x-bzip-compressed-tar",
- "" => "text/plain"
- )
-
- fastcgi.server = ( ".php" =>
- ("localhost" =>
- ( "socket" => "$CURR_DIR/$WEB_TMP/php.socket",
- "bin-path" => "$PHP_DIR/php-cgi -c $CURR_DIR/$WEB/php.ini"
-
- )
- )
- )
-EOF
-
- cat > $WEB/php.ini <<EOF
- session.save_path ='$CURR_DIR/$WEB_TMP'
-EOF
-}
-
-# start_lighttpd
-#
-# Start or restart daemon lighttpd. If restart, rewrite configuration files.
-start_lighttpd () {
- if test -f "$WEB_TMP/pid"; then
- echo "Instance already running. Restarting..."
- stop_lighttpd
- fi
- config_lighttpd
- "$LIGHTTPD_DIR"/lighttpd -f "$WEB"/lighttpd.conf
-
- if test $? -ne 0 ; then
- echo "Could not execute http daemon lighttpd"
- exit 1
- fi
-}
-
-# stop_lighttpd
-#
-# Kill daemon lighttpd and removes files and folders associated.
-stop_lighttpd () {
- test -f "$WEB_TMP/pid" && kill $(cat "$WEB_TMP/pid")
-}
-
-wiki_delete_db () {
- rm -rf \
- "$FILES_FOLDER_DB"/* || error "Couldn't delete $FILES_FOLDER_DB/"
-}
-
-wiki_delete_db_backup () {
- rm -rf \
- "$FILES_FOLDER_POST_INSTALL_DB"/* || error "Couldn't delete $FILES_FOLDER_POST_INSTALL_DB/"
-}
-
-# Install MediaWiki using its install.php script. If the database file
-# already exists, it will be deleted.
-install_mediawiki () {
-
- localsettings="$WIKI_DIR_INST/$WIKI_DIR_NAME/LocalSettings.php"
- if test -f "$localsettings"
- then
- error "We already installed the wiki, since $localsettings exists" \
- "perhaps you wanted to run 'delete' first?"
- fi
-
- wiki_delete_db
- wiki_delete_db_backup
- mkdir \
- "$FILES_FOLDER_DB/" \
- "$FILES_FOLDER_POST_INSTALL_DB/"
-
- install_script="$WIKI_DIR_INST/$WIKI_DIR_NAME/maintenance/install.php"
- echo "Installing MediaWiki using $install_script. This may take some time ..."
-
- php "$WIKI_DIR_INST/$WIKI_DIR_NAME/maintenance/install.php" \
- --server $WIKI_BASE_URL \
- --scriptpath /wiki \
- --lang en \
- --dbtype sqlite \
- --dbpath $PWD/$FILES_FOLDER_DB/ \
- --pass "$WIKI_PASSW" \
- Git-MediaWiki-Test \
- "$WIKI_ADMIN" ||
- error "Couldn't run $install_script, see errors above. Try to run ./install-wiki.sh delete first."
- cat <<-'EOF' >>$localsettings
-# Custom settings added by test-gitmw-lib.sh
-#
-# Uploading text files is needed for
-# t9363-mw-to-git-export-import.sh
-$wgEnableUploads = true;
-$wgFileExtensions[] = 'txt';
-EOF
-
- # Copy the initially generated database file into our backup
- # folder
- cp -R "$FILES_FOLDER_DB/"* "$FILES_FOLDER_POST_INSTALL_DB/" ||
- error "Unable to copy $FILES_FOLDER_DB/* to $FILES_FOLDER_POST_INSTALL_DB/*"
-}
-
-# Install a wiki in your web server directory.
-wiki_install () {
- if test $LIGHTTPD = "true" ; then
- start_lighttpd
- fi
-
- # In this part, we change directory to $TMP in order to download,
- # unpack and copy the files of MediaWiki
- (
- mkdir -p "$WIKI_DIR_INST/$WIKI_DIR_NAME"
- if ! test -d "$WIKI_DIR_INST/$WIKI_DIR_NAME"
- then
- error "Folder $WIKI_DIR_INST/$WIKI_DIR_NAME doesn't exist.
- Please create it and launch the script again."
- fi
-
- # Fetch MediaWiki's archive if not already present in the
- # download directory
- mkdir -p "$FILES_FOLDER_DOWNLOAD"
- MW_FILENAME="mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz"
- cd "$FILES_FOLDER_DOWNLOAD"
- if ! test -f $MW_FILENAME
- then
- echo "Downloading $MW_VERSION_MAJOR.$MW_VERSION_MINOR sources ..."
- wget "http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/$MW_FILENAME" ||
- error "Unable to download "\
- "http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/"\
- "$MW_FILENAME. "\
- "Please fix your connection and launch the script again."
- echo "$MW_FILENAME downloaded in $(pwd)/;" \
- "you can delete it later if you want."
- else
- echo "Reusing existing $MW_FILENAME downloaded in $(pwd)/"
- fi
- archive_abs_path=$(pwd)/$MW_FILENAME
- cd "$WIKI_DIR_INST/$WIKI_DIR_NAME/" ||
- error "can't cd to $WIKI_DIR_INST/$WIKI_DIR_NAME/"
- tar xzf "$archive_abs_path" --strip-components=1 ||
- error "Unable to extract WikiMedia's files from $archive_abs_path to "\
- "$WIKI_DIR_INST/$WIKI_DIR_NAME"
- ) || exit 1
- echo Extracted in "$WIKI_DIR_INST/$WIKI_DIR_NAME"
-
- install_mediawiki
-
- echo "Your wiki has been installed. You can check it at
- $WIKI_URL"
-}
-
-# Reset the database of the wiki and the password of the admin
-#
-# Warning: This function must be called only in a subdirectory of t/ directory
-wiki_reset () {
- # Copy initial database of the wiki
- if ! test -d "../$FILES_FOLDER_DB"
- then
- error "No wiki database at ../$FILES_FOLDER_DB, not installed yet?"
- fi
- if ! test -d "../$FILES_FOLDER_POST_INSTALL_DB"
- then
- error "No wiki backup database at ../$FILES_FOLDER_POST_INSTALL_DB, failed installation?"
- fi
- wiki_delete_db
- cp -R "../$FILES_FOLDER_POST_INSTALL_DB/"* "../$FILES_FOLDER_DB/" ||
- error "Can't copy ../$FILES_FOLDER_POST_INSTALL_DB/* to ../$FILES_FOLDER_DB/*"
- echo "File $FILES_FOLDER_DB/* has been reset"
-}
-
-# Delete the wiki created in the web server's directory and all its content
-# saved in the database.
-wiki_delete () {
- if test $LIGHTTPD = "true"; then
- stop_lighttpd
- rm -fr "$WEB"
- else
- # Delete the wiki's directory.
- rm -rf "$WIKI_DIR_INST/$WIKI_DIR_NAME" ||
- error "Wiki's directory $WIKI_DIR_INST/" \
- "$WIKI_DIR_NAME could not be deleted"
- fi
- wiki_delete_db
- wiki_delete_db_backup
-}
diff --git a/contrib/mw-to-git/t/test-gitmw.pl b/contrib/mw-to-git/t/test-gitmw.pl
deleted file mode 100755
index c5d687f..0000000
--- a/contrib/mw-to-git/t/test-gitmw.pl
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/perl -w -s
-# Copyright (C) 2012
-# Charles Roussel <charles.roussel@ensimag.imag.fr>
-# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
-# Julien Khayat <julien.khayat@ensimag.imag.fr>
-# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
-# Simon Perrat <simon.perrat@ensimag.imag.fr>
-# License: GPL v2 or later
-
-# Usage:
-# ./test-gitmw.pl <command> [argument]*
-# Execute in terminal using the name of the function to call as first
-# parameter, and the function's arguments as following parameters
-#
-# Example:
-# ./test-gitmw.pl "get_page" foo .
-# will call <wiki_getpage> with arguments <foo> and <.>
-#
-# Available functions are:
-# "get_page"
-# "delete_page"
-# "edit_page"
-# "getallpagename"
-
-use MediaWiki::API;
-use Getopt::Long;
-use DateTime::Format::ISO8601;
-use constant SLASH_REPLACEMENT => "%2F";
-
-#Parsing of the config file
-
-my $configfile = "$ENV{'CURR_DIR'}/test.config";
-my %config;
-open my $CONFIG, "<", $configfile or die "can't open $configfile: $!";
-while (<$CONFIG>)
-{
- chomp;
- s/#.*//;
- s/^\s+//;
- s/\s+$//;
- next unless length;
- my ($key, $value) = split (/\s*=\s*/,$_, 2);
- $config{$key} = $value;
- last if ($key eq 'LIGHTTPD' and $value eq 'false');
- last if ($key eq 'PORT');
-}
-close $CONFIG or die "can't close $configfile: $!";
-
-my $wiki_address = "http://$config{'SERVER_ADDR'}".":"."$config{'PORT'}";
-my $wiki_url = "$wiki_address/$config{'WIKI_DIR_NAME'}/api.php";
-my $wiki_admin = "$config{'WIKI_ADMIN'}";
-my $wiki_admin_pass = "$config{'WIKI_PASSW'}";
-my $mw = MediaWiki::API->new;
-$mw->{config}->{api_url} = $wiki_url;
-
-
-# wiki_login <name> <password>
-#
-# Logs the user with <name> and <password> in the global variable
-# of the mediawiki $mw
-sub wiki_login {
- $mw->login( { lgname => "$_[0]",lgpassword => "$_[1]" } )
- || die "getpage: login failed";
-}
-
-# wiki_getpage <wiki_page> <dest_path>
-#
-# fetch a page <wiki_page> from the wiki referenced in the global variable
-# $mw and copies its content in directory dest_path
-sub wiki_getpage {
- my $pagename = $_[0];
- my $destdir = $_[1];
-
- my $page = $mw->get_page( { title => $pagename } );
- if (!defined($page)) {
- die "getpage: wiki does not exist";
- }
-
- my $content = $page->{'*'};
- if (!defined($content)) {
- die "getpage: page does not exist";
- }
-
- $pagename=$page->{'title'};
- # Replace spaces by underscore in the page name
- $pagename =~ s/ /_/g;
- $pagename =~ s/\//%2F/g;
- open(my $file, ">:encoding(UTF-8)", "$destdir/$pagename.mw");
- print $file "$content";
- close ($file);
-
-}
-
-# wiki_delete_page <page_name>
-#
-# delete the page with name <page_name> from the wiki referenced
-# in the global variable $mw
-sub wiki_delete_page {
- my $pagename = $_[0];
-
- my $exist=$mw->get_page({title => $pagename});
-
- if (defined($exist->{'*'})){
- $mw->edit({ action => 'delete',
- title => $pagename})
- || die $mw->{error}->{code} . ": " . $mw->{error}->{details};
- } else {
- die "no page with such name found: $pagename\n";
- }
-}
-
-# wiki_editpage <wiki_page> <wiki_content> <wiki_append> [-c=<category>] [-s=<summary>]
-#
-# Edit a page named <wiki_page> with content <wiki_content> on the wiki
-# referenced with the global variable $mw
-# If <wiki_append> == true : append <wiki_content> at the end of the actual
-# content of the page <wiki_page>
-# If <wik_page> doesn't exist, that page is created with the <wiki_content>
-sub wiki_editpage {
- my $wiki_page = $_[0];
- my $wiki_content = $_[1];
- my $wiki_append = $_[2];
- my $summary = "";
- my ($summ, $cat) = ();
- GetOptions('s=s' => \$summ, 'c=s' => \$cat);
-
- my $append = 0;
- if (defined($wiki_append) && $wiki_append eq 'true') {
- $append=1;
- }
-
- my $previous_text ="";
-
- if ($append) {
- my $ref = $mw->get_page( { title => $wiki_page } );
- $previous_text = $ref->{'*'};
- }
-
- my $text = $wiki_content;
- if (defined($previous_text)) {
- $text="$previous_text$text";
- }
-
- # Eventually, add this page to a category.
- if (defined($cat)) {
- my $category_name="[[Category:$cat]]";
- $text="$text\n $category_name";
- }
- if(defined($summ)){
- $summary=$summ;
- }
-
- $mw->edit( { action => 'edit', title => $wiki_page, summary => $summary, text => "$text"} );
-}
-
-# wiki_getallpagename [<category>]
-#
-# Fetch all pages of the wiki referenced by the global variable $mw
-# and print the names of each one in the file all.txt with a new line
-# ("\n") between these.
-# If the argument <category> is defined, then this function get only the pages
-# belonging to <category>.
-sub wiki_getallpagename {
- # fetch the pages of the wiki
- if (defined($_[0])) {
- my $mw_pages = $mw->list ( { action => 'query',
- list => 'categorymembers',
- cmtitle => "Category:$_[0]",
- cmnamespace => 0,
- cmlimit => 500 },
- )
- || die $mw->{error}->{code}.": ".$mw->{error}->{details};
- open(my $file, ">:encoding(UTF-8)", "all.txt");
- foreach my $page (@{$mw_pages}) {
- print $file "$page->{title}\n";
- }
- close ($file);
-
- } else {
- my $mw_pages = $mw->list({
- action => 'query',
- list => 'allpages',
- aplimit => 500,
- })
- || die $mw->{error}->{code}.": ".$mw->{error}->{details};
- open(my $file, ">:encoding(UTF-8)", "all.txt");
- foreach my $page (@{$mw_pages}) {
- print $file "$page->{title}\n";
- }
- close ($file);
- }
-}
-
-sub wiki_upload_file {
- my $file_name = $_[0];
- my $resultat = $mw->edit ( {
- action => 'upload',
- filename => $file_name,
- comment => 'upload a file',
- file => [ $file_name ],
- ignorewarnings=>1,
- }, {
- skip_encoding => 1
- } ) || die $mw->{error}->{code} . ' : ' . $mw->{error}->{details};
-}
-
-
-
-# Main part of this script: parse the command line arguments
-# and select which function to execute
-my $fct_to_call = shift;
-
-wiki_login($wiki_admin, $wiki_admin_pass);
-
-my %functions_to_call = (
- upload_file => \&wiki_upload_file,
- get_page => \&wiki_getpage,
- delete_page => \&wiki_delete_page,
- edit_page => \&wiki_editpage,
- getallpagename => \&wiki_getallpagename,
-);
-die "$0 ERROR: wrong argument" unless exists $functions_to_call{$fct_to_call};
-$functions_to_call{$fct_to_call}->(map { utf8::decode($_); $_ } @ARGV);
diff --git a/contrib/mw-to-git/t/test.config b/contrib/mw-to-git/t/test.config
deleted file mode 100644
index ed10b3e..0000000
--- a/contrib/mw-to-git/t/test.config
+++ /dev/null
@@ -1,40 +0,0 @@
-# Name of the web server's directory dedicated to the wiki is WIKI_DIR_NAME
-WIKI_DIR_NAME=wiki
-
-# Login and password of the wiki's admin
-WIKI_ADMIN=WikiAdmin
-WIKI_PASSW=AdminPass1
-
-# Address of the web server
-SERVER_ADDR=localhost
-
-# If LIGHTTPD is not set to true, the script will use the default
-# web server running in WIKI_DIR_INST.
-WIKI_DIR_INST=/var/www
-
-# If LIGHTTPD is set to true, the script will use Lighttpd to run
-# the wiki.
-LIGHTTPD=true
-
-# The variables below are useful only if LIGHTTPD is set to true.
-PORT=1234
-PHP_DIR=/usr/bin
-LIGHTTPD_DIR=/usr/sbin
-WEB=WEB
-WEB_TMP=$WEB/tmp
-WEB_WWW=$WEB/www
-
-# Where our configuration for the wiki is located
-FILES_FOLDER=mediawiki
-FILES_FOLDER_DOWNLOAD=$FILES_FOLDER/download
-FILES_FOLDER_DB=$FILES_FOLDER/db
-FILES_FOLDER_POST_INSTALL_DB=$FILES_FOLDER/post-install-db
-
-# The variables below are used by the script to install a wiki.
-# You should not modify these unless you are modifying the script itself.
-# tested versions: 1.19.X -> 1.21.1 -> 1.34.2
-#
-# See https://www.mediawiki.org/wiki/Download for what the latest
-# version is.
-MW_VERSION_MAJOR=1.34
-MW_VERSION_MINOR=2
diff --git a/contrib/persistent-https/LICENSE b/contrib/persistent-https/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/contrib/persistent-https/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/contrib/persistent-https/Makefile b/contrib/persistent-https/Makefile
deleted file mode 100644
index 691737e..0000000
--- a/contrib/persistent-https/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2012 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# The default target of this Makefile is...
-all::
-
-BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
-TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
-
-all:: git-remote-persistent-https git-remote-persistent-https--proxy \
- git-remote-persistent-http
-
-git-remote-persistent-https--proxy: git-remote-persistent-https
- ln -f -s git-remote-persistent-https git-remote-persistent-https--proxy
-
-git-remote-persistent-http: git-remote-persistent-https
- ln -f -s git-remote-persistent-https git-remote-persistent-http
-
-git-remote-persistent-https:
- case $$(go version) in \
- "go version go"1.[0-5].*) EQ=" " ;; *) EQ="=" ;; esac && \
- go build -o git-remote-persistent-https \
- -ldflags "-X main._BUILD_EMBED_LABEL$${EQ}$(BUILD_LABEL)"
-
-clean:
- rm -f git-remote-persistent-http* *.tar.gz
-
-tar: clean all
- @chmod 555 git-remote-persistent-https
- @tar -czf $(TAR_OUT) git-remote-persistent-http* README LICENSE
- @echo
- @echo "Created $(TAR_OUT)"
diff --git a/contrib/persistent-https/README b/contrib/persistent-https/README
deleted file mode 100644
index 7c4cd8d..0000000
--- a/contrib/persistent-https/README
+++ /dev/null
@@ -1,72 +0,0 @@
-git-remote-persistent-https
-
-The git-remote-persistent-https binary speeds up SSL operations
-by running a daemon job (git-remote-persistent-https--proxy) that
-keeps a connection open to a server.
-
-
-PRE-BUILT BINARIES
-
-Darwin amd64:
-https://commondatastorage.googleapis.com/git-remote-persistent-https/darwin_amd64.tar.gz
-
-Linux amd64:
-https://commondatastorage.googleapis.com/git-remote-persistent-https/linux_amd64.tar.gz
-
-
-INSTALLING
-
-Move all of the git-remote-persistent-http* binaries to a directory
-in PATH.
-
-
-USAGE
-
-HTTPS requests can be delegated to the proxy by using the
-"persistent-https" scheme, e.g.
-
-git clone persistent-https://kernel.googlesource.com/pub/scm/git/git
-
-Likewise, .gitconfig can be updated as follows to rewrite https urls
-to use persistent-https:
-
-[url "persistent-https"]
- insteadof = https
-[url "persistent-http"]
- insteadof = http
-
-You may also want to allow the use of the persistent-https helper for
-submodule URLs (since any https URLs pointing to submodules will be
-rewritten, and Git's out-of-the-box defaults forbid submodules from
-using unknown remote helpers):
-
-[protocol "persistent-https"]
- allow = always
-[protocol "persistent-http"]
- allow = always
-
-
-#####################################################################
-# BUILDING FROM SOURCE
-#####################################################################
-
-LOCATION
-
-The source is available in the contrib/persistent-https directory of
-the Git source repository. The Git source repository is available at
-git://git.kernel.org/pub/scm/git/git.git/
-https://kernel.googlesource.com/pub/scm/git/git
-
-
-PREREQUISITES
-
-The code is written in Go (http://golang.org/) and the Go compiler is
-required. Currently, the compiler must be built and installed from tip
-of source, in order to include a fix in the reverse http proxy:
-http://code.google.com/p/go/source/detail?r=a615b796570a2cd8591884767a7d67ede74f6648
-
-
-BUILDING
-
-Run "make" to build the binaries. See the section on
-INSTALLING above.
diff --git a/contrib/persistent-https/client.go b/contrib/persistent-https/client.go
deleted file mode 100644
index 71125b5..0000000
--- a/contrib/persistent-https/client.go
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "bufio"
- "errors"
- "fmt"
- "net"
- "net/url"
- "os"
- "os/exec"
- "strings"
- "syscall"
- "time"
-)
-
-type Client struct {
- ProxyBin string
- Args []string
-
- insecure bool
-}
-
-func (c *Client) Run() error {
- if err := c.resolveArgs(); err != nil {
- return fmt.Errorf("resolveArgs() got error: %v", err)
- }
-
- // Connect to the proxy.
- uconn, hconn, addr, err := c.connect()
- if err != nil {
- return fmt.Errorf("connect() got error: %v", err)
- }
- // Keep the unix socket connection open for the duration of the request.
- defer uconn.Close()
- // Keep a connection to the HTTP server open, so no other user can
- // bind on the same address so long as the process is running.
- defer hconn.Close()
-
- // Start the git-remote-http subprocess.
- cargs := []string{"-c", fmt.Sprintf("http.proxy=%v", addr), "remote-http"}
- cargs = append(cargs, c.Args...)
- cmd := exec.Command("git", cargs...)
-
- for _, v := range os.Environ() {
- if !strings.HasPrefix(v, "GIT_PERSISTENT_HTTPS_SECURE=") {
- cmd.Env = append(cmd.Env, v)
- }
- }
- // Set the GIT_PERSISTENT_HTTPS_SECURE environment variable when
- // the proxy is using a SSL connection. This allows credential helpers
- // to identify secure proxy connections, despite being passed an HTTP
- // scheme.
- if !c.insecure {
- cmd.Env = append(cmd.Env, "GIT_PERSISTENT_HTTPS_SECURE=1")
- }
-
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Run(); err != nil {
- if eerr, ok := err.(*exec.ExitError); ok {
- if stat, ok := eerr.ProcessState.Sys().(syscall.WaitStatus); ok && stat.ExitStatus() != 0 {
- os.Exit(stat.ExitStatus())
- }
- }
- return fmt.Errorf("git-remote-http subprocess got error: %v", err)
- }
- return nil
-}
-
-func (c *Client) connect() (uconn net.Conn, hconn net.Conn, addr string, err error) {
- uconn, err = DefaultSocket.Dial()
- if err != nil {
- if e, ok := err.(*net.OpError); ok && (os.IsNotExist(e.Err) || e.Err == syscall.ECONNREFUSED) {
- if err = c.startProxy(); err == nil {
- uconn, err = DefaultSocket.Dial()
- }
- }
- if err != nil {
- return
- }
- }
-
- if addr, err = c.readAddr(uconn); err != nil {
- return
- }
-
- // Open a tcp connection to the proxy.
- if hconn, err = net.Dial("tcp", addr); err != nil {
- return
- }
-
- // Verify the address hasn't changed ownership.
- var addr2 string
- if addr2, err = c.readAddr(uconn); err != nil {
- return
- } else if addr != addr2 {
- err = fmt.Errorf("address changed after connect. got %q, want %q", addr2, addr)
- return
- }
- return
-}
-
-func (c *Client) readAddr(conn net.Conn) (string, error) {
- conn.SetDeadline(time.Now().Add(5 * time.Second))
- data := make([]byte, 100)
- n, err := conn.Read(data)
- if err != nil {
- return "", fmt.Errorf("error reading unix socket: %v", err)
- } else if n == 0 {
- return "", errors.New("empty data response")
- }
- conn.Write([]byte{1}) // Ack
-
- var addr string
- if addrs := strings.Split(string(data[:n]), "\n"); len(addrs) != 2 {
- return "", fmt.Errorf("got %q, wanted 2 addresses", data[:n])
- } else if c.insecure {
- addr = addrs[1]
- } else {
- addr = addrs[0]
- }
- return addr, nil
-}
-
-func (c *Client) startProxy() error {
- cmd := exec.Command(c.ProxyBin)
- cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
- stdout, err := cmd.StdoutPipe()
- if err != nil {
- return err
- }
- defer stdout.Close()
- if err := cmd.Start(); err != nil {
- return err
- }
- result := make(chan error)
- go func() {
- bytes, _, err := bufio.NewReader(stdout).ReadLine()
- if line := string(bytes); err == nil && line != "OK" {
- err = fmt.Errorf("proxy returned %q, want \"OK\"", line)
- }
- result <- err
- }()
- select {
- case err := <-result:
- return err
- case <-time.After(5 * time.Second):
- return errors.New("timeout waiting for proxy to start")
- }
- panic("not reachable")
-}
-
-func (c *Client) resolveArgs() error {
- if nargs := len(c.Args); nargs == 0 {
- return errors.New("remote needed")
- } else if nargs > 2 {
- return fmt.Errorf("want at most 2 args, got %v", c.Args)
- }
-
- // Rewrite the url scheme to be http.
- idx := len(c.Args) - 1
- rawurl := c.Args[idx]
- rurl, err := url.Parse(rawurl)
- if err != nil {
- return fmt.Errorf("invalid remote: %v", err)
- }
- c.insecure = rurl.Scheme == "persistent-http"
- rurl.Scheme = "http"
- c.Args[idx] = rurl.String()
- if idx != 0 && c.Args[0] == rawurl {
- c.Args[0] = c.Args[idx]
- }
- return nil
-}
diff --git a/contrib/persistent-https/main.go b/contrib/persistent-https/main.go
deleted file mode 100644
index fd1b107..0000000
--- a/contrib/persistent-https/main.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// The git-remote-persistent-https binary speeds up SSL operations by running
-// a daemon job that keeps a connection open to a Git server. This ensures the
-// git-remote-persistent-https--proxy is running and delegating execution
-// to the git-remote-http binary with the http_proxy set to the daemon job.
-// A unix socket is used to authenticate the proxy and discover the
-// HTTP address. Note, both the client and proxy are included in the same
-// binary.
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "strings"
- "time"
-)
-
-var (
- forceProxy = flag.Bool("proxy", false, "Whether to start the binary in proxy mode")
- proxyBin = flag.String("proxy_bin", "git-remote-persistent-https--proxy", "Path to the proxy binary")
- printLabel = flag.Bool("print_label", false, "Prints the build label for the binary")
-
- // Variable that should be defined through the -X linker flag.
- _BUILD_EMBED_LABEL string
-)
-
-const (
- defaultMaxIdleDuration = 24 * time.Hour
- defaultPollUpdateInterval = 15 * time.Minute
-)
-
-func main() {
- flag.Parse()
- if *printLabel {
- // Short circuit execution to print the build label
- fmt.Println(buildLabel())
- return
- }
-
- var err error
- if *forceProxy || strings.HasSuffix(os.Args[0], "--proxy") {
- log.SetPrefix("git-remote-persistent-https--proxy: ")
- proxy := &Proxy{
- BuildLabel: buildLabel(),
- MaxIdleDuration: defaultMaxIdleDuration,
- PollUpdateInterval: defaultPollUpdateInterval,
- }
- err = proxy.Run()
- } else {
- log.SetPrefix("git-remote-persistent-https: ")
- client := &Client{
- ProxyBin: *proxyBin,
- Args: flag.Args(),
- }
- err = client.Run()
- }
- if err != nil {
- log.Fatalln(err)
- }
-}
-
-func buildLabel() string {
- if _BUILD_EMBED_LABEL == "" {
- log.Println(`unlabeled build; build with "make" to label`)
- }
- return _BUILD_EMBED_LABEL
-}
diff --git a/contrib/persistent-https/proxy.go b/contrib/persistent-https/proxy.go
deleted file mode 100644
index bb0cdba..0000000
--- a/contrib/persistent-https/proxy.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "fmt"
- "log"
- "net"
- "net/http"
- "net/http/httputil"
- "os"
- "os/exec"
- "os/signal"
- "sync"
- "syscall"
- "time"
-)
-
-type Proxy struct {
- BuildLabel string
- MaxIdleDuration time.Duration
- PollUpdateInterval time.Duration
-
- ul net.Listener
- httpAddr string
- httpsAddr string
-}
-
-func (p *Proxy) Run() error {
- hl, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- return fmt.Errorf("http listen failed: %v", err)
- }
- defer hl.Close()
-
- hsl, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- return fmt.Errorf("https listen failed: %v", err)
- }
- defer hsl.Close()
-
- p.ul, err = DefaultSocket.Listen()
- if err != nil {
- c, derr := DefaultSocket.Dial()
- if derr == nil {
- c.Close()
- fmt.Println("OK\nA proxy is already running... exiting")
- return nil
- } else if e, ok := derr.(*net.OpError); ok && e.Err == syscall.ECONNREFUSED {
- // Nothing is listening on the socket, unlink it and try again.
- syscall.Unlink(DefaultSocket.Path())
- p.ul, err = DefaultSocket.Listen()
- }
- if err != nil {
- return fmt.Errorf("unix listen failed on %v: %v", DefaultSocket.Path(), err)
- }
- }
- defer p.ul.Close()
- go p.closeOnSignal()
- go p.closeOnUpdate()
-
- p.httpAddr = hl.Addr().String()
- p.httpsAddr = hsl.Addr().String()
- fmt.Printf("OK\nListening on unix socket=%v http=%v https=%v\n",
- p.ul.Addr(), p.httpAddr, p.httpsAddr)
-
- result := make(chan error, 2)
- go p.serveUnix(result)
- go func() {
- result <- http.Serve(hl, &httputil.ReverseProxy{
- FlushInterval: 500 * time.Millisecond,
- Director: func(r *http.Request) {},
- })
- }()
- go func() {
- result <- http.Serve(hsl, &httputil.ReverseProxy{
- FlushInterval: 500 * time.Millisecond,
- Director: func(r *http.Request) {
- r.URL.Scheme = "https"
- },
- })
- }()
- return <-result
-}
-
-type socketContext struct {
- sync.WaitGroup
- mutex sync.Mutex
- last time.Time
-}
-
-func (sc *socketContext) Done() {
- sc.mutex.Lock()
- defer sc.mutex.Unlock()
- sc.last = time.Now()
- sc.WaitGroup.Done()
-}
-
-func (p *Proxy) serveUnix(result chan<- error) {
- sockCtx := &socketContext{}
- go p.closeOnIdle(sockCtx)
-
- var err error
- for {
- var uconn net.Conn
- uconn, err = p.ul.Accept()
- if err != nil {
- err = fmt.Errorf("accept failed: %v", err)
- break
- }
- sockCtx.Add(1)
- go p.handleUnixConn(sockCtx, uconn)
- }
- sockCtx.Wait()
- result <- err
-}
-
-func (p *Proxy) handleUnixConn(sockCtx *socketContext, uconn net.Conn) {
- defer sockCtx.Done()
- defer uconn.Close()
- data := []byte(fmt.Sprintf("%v\n%v", p.httpsAddr, p.httpAddr))
- uconn.SetDeadline(time.Now().Add(5 * time.Second))
- for i := 0; i < 2; i++ {
- if n, err := uconn.Write(data); err != nil {
- log.Printf("error sending http addresses: %+v\n", err)
- return
- } else if n != len(data) {
- log.Printf("sent %d data bytes, wanted %d\n", n, len(data))
- return
- }
- if _, err := uconn.Read([]byte{0, 0, 0, 0}); err != nil {
- log.Printf("error waiting for Ack: %+v\n", err)
- return
- }
- }
- // Wait without a deadline for the client to finish via EOF
- uconn.SetDeadline(time.Time{})
- uconn.Read([]byte{0, 0, 0, 0})
-}
-
-func (p *Proxy) closeOnIdle(sockCtx *socketContext) {
- for d := p.MaxIdleDuration; d > 0; {
- time.Sleep(d)
- sockCtx.Wait()
- sockCtx.mutex.Lock()
- if d = sockCtx.last.Add(p.MaxIdleDuration).Sub(time.Now()); d <= 0 {
- log.Println("graceful shutdown from idle timeout")
- p.ul.Close()
- }
- sockCtx.mutex.Unlock()
- }
-}
-
-func (p *Proxy) closeOnUpdate() {
- for {
- time.Sleep(p.PollUpdateInterval)
- if out, err := exec.Command(os.Args[0], "--print_label").Output(); err != nil {
- log.Printf("error polling for updated binary: %v\n", err)
- } else if s := string(out[:len(out)-1]); p.BuildLabel != s {
- log.Printf("graceful shutdown from updated binary: %q --> %q\n", p.BuildLabel, s)
- p.ul.Close()
- break
- }
- }
-}
-
-func (p *Proxy) closeOnSignal() {
- ch := make(chan os.Signal, 10)
- signal.Notify(ch, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM), os.Signal(syscall.SIGHUP))
- sig := <-ch
- p.ul.Close()
- switch sig {
- case os.Signal(syscall.SIGHUP):
- log.Printf("graceful shutdown from signal: %v\n", sig)
- default:
- log.Fatalf("exiting from signal: %v\n", sig)
- }
-}
diff --git a/contrib/persistent-https/socket.go b/contrib/persistent-https/socket.go
deleted file mode 100644
index 193b911..0000000
--- a/contrib/persistent-https/socket.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "fmt"
- "log"
- "net"
- "os"
- "path/filepath"
- "syscall"
-)
-
-// A Socket is a wrapper around a Unix socket that verifies directory
-// permissions.
-type Socket struct {
- Dir string
-}
-
-func defaultDir() string {
- sockPath := ".git-credential-cache"
- if home := os.Getenv("HOME"); home != "" {
- return filepath.Join(home, sockPath)
- }
- log.Printf("socket: cannot find HOME path. using relative directory %q for socket", sockPath)
- return sockPath
-}
-
-// DefaultSocket is a Socket in the $HOME/.git-credential-cache directory.
-var DefaultSocket = Socket{Dir: defaultDir()}
-
-// Listen announces the local network address of the unix socket. The
-// permissions on the socket directory are verified before attempting
-// the actual listen.
-func (s Socket) Listen() (net.Listener, error) {
- network, addr := "unix", s.Path()
- if err := s.mkdir(); err != nil {
- return nil, &net.OpError{Op: "listen", Net: network, Addr: &net.UnixAddr{Name: addr, Net: network}, Err: err}
- }
- return net.Listen(network, addr)
-}
-
-// Dial connects to the unix socket. The permissions on the socket directory
-// are verified before attempting the actual dial.
-func (s Socket) Dial() (net.Conn, error) {
- network, addr := "unix", s.Path()
- if err := s.checkPermissions(); err != nil {
- return nil, &net.OpError{Op: "dial", Net: network, Addr: &net.UnixAddr{Name: addr, Net: network}, Err: err}
- }
- return net.Dial(network, addr)
-}
-
-// Path returns the fully specified file name of the unix socket.
-func (s Socket) Path() string {
- return filepath.Join(s.Dir, "persistent-https-proxy-socket")
-}
-
-func (s Socket) mkdir() error {
- if err := s.checkPermissions(); err == nil {
- return nil
- } else if !os.IsNotExist(err) {
- return err
- }
- if err := os.MkdirAll(s.Dir, 0700); err != nil {
- return err
- }
- return s.checkPermissions()
-}
-
-func (s Socket) checkPermissions() error {
- fi, err := os.Stat(s.Dir)
- if err != nil {
- return err
- }
- if !fi.IsDir() {
- return fmt.Errorf("socket: got file, want directory for %q", s.Dir)
- }
- if fi.Mode().Perm() != 0700 {
- return fmt.Errorf("socket: got perm %o, want 700 for %q", fi.Mode().Perm(), s.Dir)
- }
- if st := fi.Sys().(*syscall.Stat_t); int(st.Uid) != os.Getuid() {
- return fmt.Errorf("socket: got uid %d, want %d for %q", st.Uid, os.Getuid(), s.Dir)
- }
- return nil
-}
diff --git a/contrib/remote-helpers/README b/contrib/remote-helpers/README
deleted file mode 100644
index ac72332..0000000
--- a/contrib/remote-helpers/README
+++ /dev/null
@@ -1,15 +0,0 @@
-The remote-helper bridges to access data stored in Mercurial and
-Bazaar are maintained outside the git.git tree in the repositories
-of their primary author:
-
- https://github.com/felipec/git-remote-hg (for Mercurial)
- https://github.com/felipec/git-remote-bzr (for Bazaar)
-
-You can pick a directory on your $PATH and download them from these
-repositories, e.g.:
-
- $ wget -O $HOME/bin/git-remote-hg \
- https://raw.github.com/felipec/git-remote-hg/master/git-remote-hg
- $ wget -O $HOME/bin/git-remote-bzr \
- https://raw.github.com/felipec/git-remote-bzr/master/git-remote-bzr
- $ chmod +x $HOME/bin/git-remote-hg $HOME/bin/git-remote-bzr
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
deleted file mode 100755
index 1c3d87f..0000000
--- a/contrib/remote-helpers/git-remote-bzr
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-cat >&2 <<'EOT'
-WARNING: git-remote-bzr is now maintained independently.
-WARNING: For more information visit https://github.com/felipec/git-remote-bzr
-WARNING:
-WARNING: You can pick a directory on your $PATH and download it, e.g.:
-WARNING: $ wget -O $HOME/bin/git-remote-bzr \
-WARNING: https://raw.github.com/felipec/git-remote-bzr/master/git-remote-bzr
-WARNING: $ chmod +x $HOME/bin/git-remote-bzr
-EOT
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
deleted file mode 100755
index 8e91883..0000000
--- a/contrib/remote-helpers/git-remote-hg
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-cat >&2 <<'EOT'
-WARNING: git-remote-hg is now maintained independently.
-WARNING: For more information visit https://github.com/felipec/git-remote-hg
-WARNING:
-WARNING: You can pick a directory on your $PATH and download it, e.g.:
-WARNING: $ wget -O $HOME/bin/git-remote-hg \
-WARNING: https://raw.github.com/felipec/git-remote-hg/master/git-remote-hg
-WARNING: $ chmod +x $HOME/bin/git-remote-hg
-EOT
diff --git a/contrib/remotes2config.sh b/contrib/remotes2config.sh
deleted file mode 100755
index 1cda19f..0000000
--- a/contrib/remotes2config.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# Use this tool to rewrite your .git/remotes/ files into the config.
-
-. git-sh-setup
-
-if [ -d "$GIT_DIR"/remotes ]; then
- echo "Rewriting $GIT_DIR/remotes" >&2
- error=0
- # rewrite into config
- {
- cd "$GIT_DIR"/remotes
- ls | while read f; do
- name=$(printf "$f" | tr -c "A-Za-z0-9-" ".")
- sed -n \
- -e "s/^URL:[ ]*\(.*\)$/remote.$name.url \1 ./p" \
- -e "s/^Pull:[ ]*\(.*\)$/remote.$name.fetch \1 ^$ /p" \
- -e "s/^Push:[ ]*\(.*\)$/remote.$name.push \1 ^$ /p" \
- < "$f"
- done
- echo done
- } | while read key value regex; do
- case $key in
- done)
- if [ $error = 0 ]; then
- mv "$GIT_DIR"/remotes "$GIT_DIR"/remotes.old
- fi ;;
- *)
- echo "git config $key "$value" $regex"
- git config $key "$value" $regex || error=1 ;;
- esac
- done
-fi
diff --git a/contrib/stats/git-common-hash b/contrib/stats/git-common-hash
deleted file mode 100755
index e27fd08..0000000
--- a/contrib/stats/git-common-hash
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# This script displays the distribution of longest common hash prefixes.
-# This can be used to determine the minimum prefix length to use
-# for object names to be unique.
-
-git rev-list --objects --all | sort | perl -lne '
- substr($_, 40) = "";
- # uncomment next line for a distribution of bits instead of hex chars
- # $_ = unpack("B*",pack("H*",$_));
- if (defined $p) {
- ($p ^ $_) =~ /^(\0*)/;
- $common = length $1;
- if (defined $pcommon) {
- $count[$pcommon > $common ? $pcommon : $common]++;
- } else {
- $count[$common]++; # first item
- }
- }
- $p = $_;
- $pcommon = $common;
- END {
- $count[$common]++; # last item
- print "$_: $count[$_]" for 0..$#count;
- }
-'
diff --git a/contrib/stats/mailmap.pl b/contrib/stats/mailmap.pl
deleted file mode 100755
index 9513f5e..0000000
--- a/contrib/stats/mailmap.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-use warnings 'all';
-use strict;
-use Getopt::Long;
-
-my $match_emails;
-my $match_names;
-my $order_by = 'count';
-Getopt::Long::Configure(qw(bundling));
-GetOptions(
- 'emails|e!' => \$match_emails,
- 'names|n!' => \$match_names,
- 'count|c' => sub { $order_by = 'count' },
- 'time|t' => sub { $order_by = 'stamp' },
-) or exit 1;
-$match_emails = 1 unless $match_names;
-
-my $email = {};
-my $name = {};
-
-open(my $fh, '-|', "git log --format='%at <%aE> %aN'");
-while(<$fh>) {
- my ($t, $e, $n) = /(\S+) <(\S+)> (.*)/;
- mark($email, $e, $n, $t);
- mark($name, $n, $e, $t);
-}
-close($fh);
-
-if ($match_emails) {
- foreach my $e (dups($email)) {
- foreach my $n (vals($email->{$e})) {
- show($n, $e, $email->{$e}->{$n});
- }
- print "\n";
- }
-}
-if ($match_names) {
- foreach my $n (dups($name)) {
- foreach my $e (vals($name->{$n})) {
- show($n, $e, $name->{$n}->{$e});
- }
- print "\n";
- }
-}
-exit 0;
-
-sub mark {
- my ($h, $k, $v, $t) = @_;
- my $e = $h->{$k}->{$v} ||= { count => 0, stamp => 0 };
- $e->{count}++;
- $e->{stamp} = $t unless $t < $e->{stamp};
-}
-
-sub dups {
- my $h = shift;
- return grep { keys($h->{$_}) > 1 } keys($h);
-}
-
-sub vals {
- my $h = shift;
- return sort {
- $h->{$b}->{$order_by} <=> $h->{$a}->{$order_by}
- } keys($h);
-}
-
-sub show {
- my ($n, $e, $h) = @_;
- print "$n <$e> ($h->{$order_by})\n";
-}
diff --git a/contrib/subtree/README b/contrib/subtree/README
index c686b4a..65d167b 100644
--- a/contrib/subtree/README
+++ b/contrib/subtree/README
@@ -1,5 +1,5 @@
-Please read git-subtree.txt for documentation.
+Please read git-subtree.adoc for documentation.
Please don't contact me using github mail; it's slow, ugly, and worst of
all, redundant. Email me instead at apenwarr@gmail.com and I'll be happy to
diff --git a/contrib/subtree/git-subtree.adoc b/contrib/subtree/git-subtree.adoc
index 004abf4..b2bcbca 100644
--- a/contrib/subtree/git-subtree.adoc
+++ b/contrib/subtree/git-subtree.adoc
@@ -9,14 +9,14 @@
SYNOPSIS
--------
[verse]
-'git subtree' [<options>] -P <prefix> add <local-commit>
-'git subtree' [<options>] -P <prefix> add <repository> <remote-ref>
-'git subtree' [<options>] -P <prefix> merge <local-commit> [<repository>]
-'git subtree' [<options>] -P <prefix> split [<local-commit>]
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] add <local-commit>
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] add <repository> <remote-ref>
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] merge <local-commit> [<repository>]
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] split [<local-commit>]
[verse]
-'git subtree' [<options>] -P <prefix> pull <repository> <remote-ref>
-'git subtree' [<options>] -P <prefix> push <repository> <refspec>
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] pull <repository> <remote-ref>
+'git subtree' [<options>] -P <prefix> [-S[<keyid>]] push <repository> <refspec>
DESCRIPTION
-----------
@@ -149,6 +149,13 @@
want to manipulate. This option is mandatory
for all commands.
+-S[<keyid>]::
+--gpg-sign[=<keyid>]::
+--no-gpg-sign::
+ GPG-sign commits. The `keyid` argument is optional and
+ defaults to the committer identity; `--no-gpg-sign` is useful to
+ countermand a `--gpg-sign` option given earlier on the command line.
+
OPTIONS FOR 'add' AND 'merge' (ALSO: 'pull', 'split --rejoin', AND 'push --rejoin')
-----------------------------------------------------------------------------------
These options for 'add' and 'merge' may also be given to 'pull' (which
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 15ae86d..3fddba7 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -26,12 +26,12 @@
fi
OPTS_SPEC="\
-git subtree add --prefix=<prefix> <commit>
-git subtree add --prefix=<prefix> <repository> <ref>
-git subtree merge --prefix=<prefix> <commit>
-git subtree split --prefix=<prefix> [<commit>]
-git subtree pull --prefix=<prefix> <repository> <ref>
-git subtree push --prefix=<prefix> <repository> <refspec>
+git subtree add --prefix=<prefix> [-S[=<key-id>]] <commit>
+git subtree add --prefix=<prefix> [-S[=<key-id>]] <repository> <ref>
+git subtree merge --prefix=<prefix> [-S[=<key-id>]] <commit>
+git subtree split --prefix=<prefix> [-S[=<key-id>]] [<commit>]
+git subtree pull --prefix=<prefix> [-S[=<key-id>]] <repository> <ref>
+git subtree push --prefix=<prefix> [-S[=<key-id>]] <repository> <refspec>
--
h,help! show the help
q,quiet! quiet
@@ -46,6 +46,7 @@
options for 'add' and 'merge' (also: 'pull', 'split --rejoin', and 'push --rejoin')
squash merge subtree changes as a single commit
m,message!= use the given message as the commit message for the merge commit
+S,gpg-sign?key-id GPG-sign commits. The keyid argument is optional and defaults to the committer identity
"
indent=0
@@ -115,7 +116,7 @@
then
set -- -h
fi
- set_args="$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
+ set_args="$(echo "$OPTS_SPEC" | git rev-parse --parseopt --stuck-long -- "$@" || echo exit $?)"
eval "$set_args"
. git-sh-setup
require_work_tree
@@ -131,9 +132,6 @@
opt="$1"
shift
case "$opt" in
- --annotate|-b|-P|-m|--onto)
- shift
- ;;
--rejoin)
arg_split_rejoin=1
;;
@@ -171,48 +169,44 @@
arg_split_annotate=
arg_addmerge_squash=
arg_addmerge_message=
+ arg_gpg_sign=
while test $# -gt 0
do
opt="$1"
shift
case "$opt" in
- -q)
+ --quiet)
arg_quiet=1
;;
- -d)
+ --debug)
arg_debug=1
;;
- --annotate)
+ --annotate=*)
test -n "$allow_split" || die_incompatible_opt "$opt" "$arg_command"
- arg_split_annotate="$1"
- shift
+ arg_split_annotate="${opt#*=}"
;;
--no-annotate)
test -n "$allow_split" || die_incompatible_opt "$opt" "$arg_command"
arg_split_annotate=
;;
- -b)
+ --branch=*)
test -n "$allow_split" || die_incompatible_opt "$opt" "$arg_command"
- arg_split_branch="$1"
- shift
+ arg_split_branch="${opt#*=}"
;;
- -P)
- arg_prefix="${1%/}"
- shift
+ --prefix=*)
+ arg_prefix="${opt#*=}"
;;
- -m)
+ --message=*)
test -n "$allow_addmerge" || die_incompatible_opt "$opt" "$arg_command"
- arg_addmerge_message="$1"
- shift
+ arg_addmerge_message="${opt#*=}"
;;
--no-prefix)
arg_prefix=
;;
- --onto)
+ --onto=*)
test -n "$allow_split" || die_incompatible_opt "$opt" "$arg_command"
- arg_split_onto="$1"
- shift
+ arg_split_onto="${opt#*=}"
;;
--no-onto)
test -n "$allow_split" || die_incompatible_opt "$opt" "$arg_command"
@@ -240,6 +234,9 @@
test -n "$allow_addmerge" || die_incompatible_opt "$opt" "$arg_command"
arg_addmerge_squash=
;;
+ --gpg-sign=* | --gpg-sign | --no-gpg-sign)
+ arg_gpg_sign="$opt"
+ ;;
--)
break
;;
@@ -272,6 +269,7 @@
debug "quiet: {$arg_quiet}"
debug "dir: {$dir}"
debug "opts: {$*}"
+ debug "gpg-sign: {$arg_gpg_sign}"
debug
"cmd_$arg_command" "$@"
@@ -537,7 +535,7 @@
printf "%s" "$arg_split_annotate"
cat
) |
- git commit-tree "$2" $3 # reads the rest of stdin
+ git commit-tree $arg_gpg_sign "$2" $3 # reads the rest of stdin
) || die "fatal: can't copy commit $1"
}
@@ -683,10 +681,10 @@
if test -n "$old"
then
squash_msg "$dir" "$oldsub" "$newsub" |
- git commit-tree "$tree" -p "$old" || exit $?
+ git commit-tree $arg_gpg_sign "$tree" -p "$old" || exit $?
else
squash_msg "$dir" "" "$newsub" |
- git commit-tree "$tree" || exit $?
+ git commit-tree $arg_gpg_sign "$tree" || exit $?
fi
}
@@ -925,11 +923,11 @@
then
rev=$(new_squash_commit "" "" "$rev") || exit $?
commit=$(add_squashed_msg "$rev" "$dir" |
- git commit-tree "$tree" $headp -p "$rev") || exit $?
+ git commit-tree $arg_gpg_sign "$tree" $headp -p "$rev") || exit $?
else
revp=$(peel_committish "$rev") || exit $?
commit=$(add_msg "$dir" $headrev "$rev" |
- git commit-tree "$tree" $headp -p "$revp") || exit $?
+ git commit-tree $arg_gpg_sign "$tree" $headp -p "$revp") || exit $?
fi
git reset "$commit" || exit $?
@@ -1080,9 +1078,9 @@
if test -n "$arg_addmerge_message"
then
git merge --no-ff -Xsubtree="$arg_prefix" \
- --message="$arg_addmerge_message" "$rev"
+ --message="$arg_addmerge_message" $arg_gpg_sign "$rev"
else
- git merge --no-ff -Xsubtree="$arg_prefix" $rev
+ git merge --no-ff -Xsubtree="$arg_prefix" $arg_gpg_sign $rev
fi
}
diff --git a/contrib/subtree/meson.build b/contrib/subtree/meson.build
index 6371416..98dd8e0 100644
--- a/contrib/subtree/meson.build
+++ b/contrib/subtree/meson.build
@@ -21,7 +21,7 @@
env: subtree_test_environment,
workdir: meson.current_source_dir() / 't',
depends: test_dependencies + bin_wrappers + [ git_subtree ],
- timeout: 0,
+ kwargs: test_kwargs,
)
endif
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 3c6103f..3edbb33 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -11,6 +11,7 @@
TEST_DIRECTORY=$(pwd)/../../../t
. "$TEST_DIRECTORY"/test-lib.sh
+. "$TEST_DIRECTORY"/lib-gpg.sh
# Use our own wrapper around test-lib.sh's test_create_repo, in order
# to set log.date=relative. `git subtree` parses the output of `git
@@ -1563,4 +1564,116 @@
)
'
+test_expect_success GPG 'add subproj with GPG signing using -S flag' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" -S FETCH_HEAD &&
+ git verify-commit HEAD &&
+ test "$(last_commit_subject)" = "Add '\''sub dir/'\'' from commit '\''$(git rev-parse FETCH_HEAD)'\''"
+ )
+'
+
+test_expect_success GPG 'add subproj with GPG signing using --gpg-sign flag' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" --gpg-sign FETCH_HEAD &&
+ git verify-commit HEAD &&
+ test "$(last_commit_subject)" = "Add '\''sub dir/'\'' from commit '\''$(git rev-parse FETCH_HEAD)'\''"
+ )
+'
+
+test_expect_success GPG 'add subproj with GPG signing using specific key ID' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" -S"$GIT_COMMITTER_EMAIL" FETCH_HEAD &&
+ git verify-commit HEAD &&
+ test "$(last_commit_subject)" = "Add '\''sub dir/'\'' from commit '\''$(git rev-parse FETCH_HEAD)'\''"
+ )
+'
+
+test_expect_success GPG 'merge with GPG signing' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" FETCH_HEAD
+ ) &&
+ test_create_commit "$test_count/sub proj" sub2 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree merge --prefix="sub dir" -S FETCH_HEAD &&
+ git verify-commit HEAD
+ )
+'
+
+test_expect_success GPG 'split with GPG signing and --rejoin' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" FETCH_HEAD
+ ) &&
+ test_create_commit "$test_count" "sub dir/main-sub1" &&
+ (
+ cd "$test_count" &&
+ git subtree split --prefix="sub dir" --rejoin -S &&
+ git verify-commit HEAD
+ )
+'
+
+test_expect_success GPG 'add with --squash and GPG signing' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git fetch ./"sub proj" HEAD &&
+ git subtree add --prefix="sub dir" --squash -S FETCH_HEAD &&
+ git verify-commit HEAD &&
+ # With --squash, the commit subject should reference the squash commit (first parent of merge)
+ squash_commit=$(git rev-parse HEAD^2) &&
+ test "$(last_commit_subject)" = "Merge commit '\''$squash_commit'\'' as '\''sub dir'\''"
+ )
+'
+
+test_expect_success GPG 'pull with GPG signing' '
+ subtree_test_create_repo "$test_count" &&
+ subtree_test_create_repo "$test_count/sub proj" &&
+ test_create_commit "$test_count" main1 &&
+ test_create_commit "$test_count/sub proj" sub1 &&
+ (
+ cd "$test_count" &&
+ git subtree add --prefix="sub dir" ./"sub proj" HEAD
+ ) &&
+ test_create_commit "$test_count/sub proj" sub2 &&
+ (
+ cd "$test_count" &&
+ git subtree pull --prefix="sub dir" -S ./"sub proj" HEAD &&
+ git verify-commit HEAD
+ )
+'
+
test_done
diff --git a/contrib/thunderbird-patch-inline/README b/contrib/thunderbird-patch-inline/README
deleted file mode 100644
index 000147b..0000000
--- a/contrib/thunderbird-patch-inline/README
+++ /dev/null
@@ -1,20 +0,0 @@
-appp.sh is a script that is supposed to be used together with ExternalEditor
-for Mozilla Thunderbird. It will let you include patches inline in e-mails
-in an easy way.
-
-Usage:
-- Generate the patch with git format-patch.
-- Start writing a new e-mail in Thunderbird.
-- Press the external editor button (or Ctrl-E) to run appp.sh
-- Select the previously generated patch file.
-- Finish editing the e-mail.
-
-Any text that is entered into the message editor before appp.sh is called
-will be moved to the section between the --- and the diffstat.
-
-All S-O-B:s and Cc:s in the patch will be added to the CC list.
-
-To set it up, just install External Editor and tell it to use appp.sh as the
-editor.
-
-Zenity is a required dependency.
diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh
deleted file mode 100755
index fdcc948..0000000
--- a/contrib/thunderbird-patch-inline/appp.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Copyright 2008 Lukas Sandström <luksan@gmail.com>
-#
-# AppendPatch - A script to be used together with ExternalEditor
-# for Mozilla Thunderbird to properly include patches inline in e-mails.
-
-# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
-
-CONFFILE=~/.appprc
-
-SEP="-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-"
-if [ -e "$CONFFILE" ] ; then
- LAST_DIR=$(grep -m 1 "^LAST_DIR=" "${CONFFILE}"|sed -e 's/^LAST_DIR=//')
- cd "${LAST_DIR}"
-else
- cd > /dev/null
-fi
-
-PATCH=$(zenity --file-selection)
-
-if [ "$?" != "0" ] ; then
- #zenity --error --text "No patchfile given."
- exit 1
-fi
-
-cd - > /dev/null
-
-SUBJECT=$(sed -n -e '/^Subject: /p' "${PATCH}")
-HEADERS=$(sed -e '/^'"${SEP}"'$/,$d' $1)
-BODY=$(sed -e "1,/${SEP}/d" $1)
-CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}")
-DIFF=$(sed -e '1,/^---$/d' "${PATCH}")
-
-CCS=$(printf '%s\n%s\n' "$CMT_MSG" "$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
- -e 's/^Signed-off-by: \(.*\)/\1,/gp')
-
-echo "$SUBJECT" > $1
-echo "Cc: $CCS" >> $1
-echo "$HEADERS" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1
-echo "$SEP" >> $1
-
-echo "$CMT_MSG" >> $1
-echo "---" >> $1
-if [ "x${BODY}x" != "xx" ] ; then
- echo >> $1
- echo "$BODY" >> $1
- echo >> $1
-fi
-echo "$DIFF" >> $1
-
-LAST_DIR=$(dirname "${PATCH}")
-
-grep -v "^LAST_DIR=" "${CONFFILE}" > "${CONFFILE}_"
-echo "LAST_DIR=${LAST_DIR}" >> "${CONFFILE}_"
-mv "${CONFFILE}_" "${CONFFILE}"
diff --git a/contrib/workdir/.gitattributes b/contrib/workdir/.gitattributes
deleted file mode 100644
index 1f78c5d..0000000
--- a/contrib/workdir/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-/git-new-workdir eol=lf
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
deleted file mode 100755
index 989197a..0000000
--- a/contrib/workdir/git-new-workdir
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-usage () {
- echo "usage:" $@
- exit 127
-}
-
-die () {
- echo $@
- exit 128
-}
-
-failed () {
- die "unable to create new workdir '$new_workdir'!"
-}
-
-if test $# -lt 2 || test $# -gt 3
-then
- usage "$0 <repository> <new_workdir> [<branch>]"
-fi
-
-orig_git=$1
-new_workdir=$2
-branch=$3
-
-# want to make sure that what is pointed to has a .git directory ...
-git_dir=$(cd "$orig_git" 2>/dev/null &&
- git rev-parse --git-dir 2>/dev/null) ||
- die "Not a git repository: \"$orig_git\""
-
-case "$git_dir" in
-.git)
- git_dir="$orig_git/.git"
- ;;
-.)
- git_dir=$orig_git
- ;;
-esac
-
-# don't link to a configured bare repository
-isbare=$(git --git-dir="$git_dir" config --bool --get core.bare)
-if test ztrue = "z$isbare"
-then
- die "\"$git_dir\" has core.bare set to true," \
- " remove from \"$git_dir/config\" to use $0"
-fi
-
-# don't link to a workdir
-if test -h "$git_dir/config"
-then
- die "\"$orig_git\" is a working directory only, please specify" \
- "a complete repository."
-fi
-
-# make sure the links in the workdir have full paths to the original repo
-git_dir=$(cd "$git_dir" && pwd) || exit 1
-
-# don't recreate a workdir over an existing directory, unless it's empty
-if test -d "$new_workdir"
-then
- if test $(ls -a1 "$new_workdir/." | wc -l) -ne 2
- then
- die "destination directory '$new_workdir' is not empty."
- fi
- cleandir="$new_workdir/.git"
-else
- cleandir="$new_workdir"
-fi
-
-mkdir -p "$new_workdir/.git" || failed
-cleandir=$(cd "$cleandir" && pwd) || failed
-
-cleanup () {
- rm -rf "$cleandir"
-}
-siglist="0 1 2 15"
-trap cleanup $siglist
-
-# create the links to the original repo. explicitly exclude index, HEAD and
-# logs/HEAD from the list since they are purely related to the current working
-# directory, and should not be shared.
-for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn reftable
-do
- # create a containing directory if needed
- case $x in
- */*)
- mkdir -p "$new_workdir/.git/${x%/*}"
- ;;
- esac
-
- ln -s "$git_dir/$x" "$new_workdir/.git/$x" || failed
-done
-
-# commands below this are run in the context of the new workdir
-cd "$new_workdir" || failed
-
-# copy the HEAD from the original repository as a default branch
-cp "$git_dir/HEAD" .git/HEAD || failed
-
-# the workdir is set up. if the checkout fails, the user can fix it.
-trap - $siglist
-
-# checkout the branch (either the same as HEAD from the original repository,
-# or the one that was asked for)
-git checkout -f $branch
diff --git a/convert.c b/convert.c
index b5f7cf6..c7d6a85 100644
--- a/convert.c
+++ b/convert.c
@@ -1326,7 +1326,7 @@ void convert_attrs(struct index_state *istate,
"eol", "text", "working-tree-encoding",
NULL);
user_convert_tail = &user_convert;
- git_config(read_convert_config, NULL);
+ repo_config(the_repository, read_convert_config, NULL);
}
git_check_attr(istate, path, check);
diff --git a/daemon.c b/daemon.c
index d1be61f..0a7b1aa 100644
--- a/daemon.c
+++ b/daemon.c
@@ -402,7 +402,7 @@ static int run_service(const char *dir, struct daemon_service *service,
if (service->overridable) {
strbuf_addf(&var, "daemon.%s", service->config_name);
- git_config_get_bool(var.buf, &enabled);
+ repo_config_get_bool(the_repository, var.buf, &enabled);
strbuf_release(&var);
}
if (!enabled) {
@@ -915,11 +915,9 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
static void child_handler(int signo UNUSED)
{
/*
- * Otherwise empty handler because systemcalls will get interrupted
- * upon signal receipt
- * SysV needs the handler to be rearmed
+ * Otherwise empty handler because systemcalls should get interrupted
+ * upon signal receipt.
*/
- signal(SIGCHLD, child_handler);
}
static int set_reuse_addr(int sockfd)
@@ -990,11 +988,6 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sockfd < 0)
continue;
- if (sockfd >= FD_SETSIZE) {
- logerror("Socket descriptor too large");
- close(sockfd);
- continue;
- }
#ifdef IPV6_V6ONLY
if (ai->ai_family == AF_INET6) {
@@ -1120,6 +1113,7 @@ static void socksetup(struct string_list *listen_addr, int listen_port, struct s
static int service_loop(struct socketlist *socklist)
{
+ struct sigaction sa;
struct pollfd *pfd;
CALLOC_ARRAY(pfd, socklist->nr);
@@ -1129,7 +1123,10 @@ static int service_loop(struct socketlist *socklist)
pfd[i].events = POLLIN;
}
- signal(SIGCHLD, child_handler);
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_NOCLDSTOP;
+ sa.sa_handler = child_handler;
+ sigaction(SIGCHLD, &sa, NULL);
for (;;) {
check_dead_children();
@@ -1153,11 +1150,19 @@ static int service_loop(struct socketlist *socklist)
#endif
} ss;
socklen_t sslen = sizeof(ss);
- int incoming = accept(pfd[i].fd, &ss.sa, &sslen);
+ int incoming;
+ int retry = 3;
+
+ redo:
+ incoming = accept(pfd[i].fd, &ss.sa, &sslen);
if (incoming < 0) {
switch (errno) {
- case EAGAIN:
case EINTR:
+ if (--retry)
+ goto redo;
+
+ /* fallthrough */
+ case EAGAIN:
case ECONNABORTED:
continue;
default:
diff --git a/diagnose.c b/diagnose.c
index b1be74b..5092bf8 100644
--- a/diagnose.c
+++ b/diagnose.c
@@ -7,7 +7,7 @@
#include "gettext.h"
#include "hex.h"
#include "strvec.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "parse-options.h"
#include "repository.h"
@@ -59,13 +59,13 @@ static void dir_file_stats_objects(const char *full_path,
(uintmax_t)st.st_size);
}
-static int dir_file_stats(struct object_directory *object_dir, void *data)
+static int dir_file_stats(struct odb_source *source, void *data)
{
struct strbuf *buf = data;
- strbuf_addf(buf, "Contents of %s:\n", object_dir->path);
+ strbuf_addf(buf, "Contents of %s:\n", source->path);
- for_each_file_in_pack_dir(object_dir->path, dir_file_stats_objects,
+ for_each_file_in_pack_dir(source->path, dir_file_stats_objects,
data);
return 0;
@@ -228,8 +228,8 @@ int create_diagnostics_archive(struct repository *r,
strbuf_reset(&buf);
strbuf_addstr(&buf, "--add-virtual-file=packs-local.txt:");
- dir_file_stats(r->objects->odb, &buf);
- foreach_alt_odb(dir_file_stats, &buf);
+ dir_file_stats(r->objects->sources, &buf);
+ odb_for_each_alternate(r->objects, dir_file_stats, &buf);
strvec_push(&archiver_args, buf.buf);
strbuf_reset(&buf);
diff --git a/diff-no-index.c b/diff-no-index.c
index 9739b2b..88ae4ce 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -15,20 +15,57 @@
#include "gettext.h"
#include "revision.h"
#include "parse-options.h"
+#include "pathspec.h"
#include "string-list.h"
#include "dir.h"
-static int read_directory_contents(const char *path, struct string_list *list)
+static int read_directory_contents(const char *path, struct string_list *list,
+ const struct pathspec *pathspec,
+ int skip)
{
+ struct strbuf match = STRBUF_INIT;
+ int len;
DIR *dir;
struct dirent *e;
if (!(dir = opendir(path)))
return error("Could not open directory %s", path);
- while ((e = readdir_skip_dot_and_dotdot(dir)))
- string_list_insert(list, e->d_name);
+ if (pathspec) {
+ strbuf_addstr(&match, path);
+ strbuf_complete(&match, '/');
+ strbuf_remove(&match, 0, skip);
+ len = match.len;
+ }
+
+ while ((e = readdir_skip_dot_and_dotdot(dir))) {
+ if (pathspec) {
+ int is_dir = 0;
+
+ strbuf_setlen(&match, len);
+ strbuf_addstr(&match, e->d_name);
+ if (NOT_CONSTANT(DTYPE(e)) != DT_UNKNOWN) {
+ is_dir = (DTYPE(e) == DT_DIR);
+ } else {
+ struct strbuf pathbuf = STRBUF_INIT;
+
+ strbuf_addstr(&pathbuf, path);
+ strbuf_complete(&pathbuf, '/');
+ is_dir = get_dtype(e, &pathbuf, 0) == DT_DIR;
+ strbuf_release(&pathbuf);
+ }
+
+ if (!match_leading_pathspec(NULL, pathspec,
+ match.buf, match.len,
+ 0, NULL, is_dir))
+ continue;
+ }
+
+ string_list_insert(list, e->d_name);
+ }
+
+ strbuf_release(&match);
closedir(dir);
return 0;
}
@@ -131,7 +168,8 @@ static struct diff_filespec *noindex_filespec(const struct git_hash_algo *algop,
}
static int queue_diff(struct diff_options *o, const struct git_hash_algo *algop,
- const char *name1, const char *name2, int recursing)
+ const char *name1, const char *name2, int recursing,
+ const struct pathspec *ps, int skip1, int skip2)
{
int mode1 = 0, mode2 = 0;
enum special special1 = SPECIAL_NONE, special2 = SPECIAL_NONE;
@@ -171,9 +209,9 @@ static int queue_diff(struct diff_options *o, const struct git_hash_algo *algop,
int i1, i2, ret = 0;
size_t len1 = 0, len2 = 0;
- if (name1 && read_directory_contents(name1, &p1))
+ if (name1 && read_directory_contents(name1, &p1, ps, skip1))
return -1;
- if (name2 && read_directory_contents(name2, &p2)) {
+ if (name2 && read_directory_contents(name2, &p2, ps, skip2)) {
string_list_clear(&p1, 0);
return -1;
}
@@ -218,7 +256,7 @@ static int queue_diff(struct diff_options *o, const struct git_hash_algo *algop,
n2 = buffer2.buf;
}
- ret = queue_diff(o, algop, n1, n2, 1);
+ ret = queue_diff(o, algop, n1, n2, 1, ps, skip1, skip2);
}
string_list_clear(&p1, 0);
string_list_clear(&p2, 0);
@@ -258,8 +296,10 @@ static void append_basename(struct strbuf *path, const char *dir, const char *fi
* DWIM "diff D F" into "diff D/F F" and "diff F D" into "diff F D/F"
* Note that we append the basename of F to D/, so "diff a/b/file D"
* becomes "diff a/b/file D/file", not "diff a/b/file D/a/b/file".
+ *
+ * Return 1 if both paths are directories, 0 otherwise.
*/
-static void fixup_paths(const char **path, struct strbuf *replacement)
+static int fixup_paths(const char **path, struct strbuf *replacement)
{
struct stat st;
unsigned int isdir0 = 0, isdir1 = 0;
@@ -282,26 +322,31 @@ static void fixup_paths(const char **path, struct strbuf *replacement)
if ((isdir0 && ispipe1) || (ispipe0 && isdir1))
die(_("cannot compare a named pipe to a directory"));
- if (isdir0 == isdir1)
- return;
+ /* if both paths are directories, we will enable pathspecs */
+ if (isdir0 && isdir1)
+ return 1;
+
if (isdir0) {
append_basename(replacement, path[0], path[1]);
path[0] = replacement->buf;
- } else {
+ } else if (isdir1) {
append_basename(replacement, path[1], path[0]);
path[1] = replacement->buf;
}
+
+ return 0;
}
static const char * const diff_no_index_usage[] = {
- N_("git diff --no-index [<options>] <path> <path>"),
+ N_("git diff --no-index [<options>] <path> <path> [<pathspec>...]"),
NULL
};
int diff_no_index(struct rev_info *revs, const struct git_hash_algo *algop,
int implicit_no_index, int argc, const char **argv)
{
- int i, no_index;
+ struct pathspec pathspec, *ps = NULL;
+ int i, no_index, skip1 = 0, skip2 = 0;
int ret = 1;
const char *paths[2];
char *to_free[ARRAY_SIZE(paths)] = { 0 };
@@ -317,13 +362,12 @@ int diff_no_index(struct rev_info *revs, const struct git_hash_algo *algop,
options = add_diff_options(no_index_options, &revs->diffopt);
argc = parse_options(argc, argv, revs->prefix, options,
diff_no_index_usage, 0);
- if (argc != 2) {
+ if (argc < 2) {
if (implicit_no_index)
warning(_("Not a git repository. Use --no-index to "
"compare two paths outside a working tree"));
usage_with_options(diff_no_index_usage, options);
}
- FREE_AND_NULL(options);
for (i = 0; i < 2; i++) {
const char *p = argv[i];
if (!strcmp(p, "-"))
@@ -337,7 +381,23 @@ int diff_no_index(struct rev_info *revs, const struct git_hash_algo *algop,
paths[i] = p;
}
- fixup_paths(paths, &replacement);
+ if (fixup_paths(paths, &replacement)) {
+ parse_pathspec(&pathspec, PATHSPEC_FROMTOP | PATHSPEC_ATTR,
+ PATHSPEC_PREFER_FULL | PATHSPEC_NO_REPOSITORY,
+ NULL, &argv[2]);
+ if (pathspec.nr)
+ ps = &pathspec;
+
+ skip1 = strlen(paths[0]);
+ skip1 += paths[0][skip1] == '/' ? 0 : 1;
+ skip2 = strlen(paths[1]);
+ skip2 += paths[1][skip2] == '/' ? 0 : 1;
+ } else if (argc > 2) {
+ warning(_("Limiting comparison with pathspecs is only "
+ "supported if both paths are directories."));
+ usage_with_options(diff_no_index_usage, options);
+ }
+ FREE_AND_NULL(options);
revs->diffopt.skip_stat_unmatch = 1;
if (!revs->diffopt.output_format)
@@ -354,7 +414,8 @@ int diff_no_index(struct rev_info *revs, const struct git_hash_algo *algop,
setup_diff_pager(&revs->diffopt);
revs->diffopt.flags.exit_with_status = 1;
- if (queue_diff(&revs->diffopt, algop, paths[0], paths[1], 0))
+ if (queue_diff(&revs->diffopt, algop, paths[0], paths[1], 0, ps,
+ skip1, skip2))
goto out;
diff_set_mnemonic_prefix(&revs->diffopt, "1/", "2/");
diffcore_std(&revs->diffopt);
@@ -370,5 +431,7 @@ int diff_no_index(struct rev_info *revs, const struct git_hash_algo *algop,
for (i = 0; i < ARRAY_SIZE(to_free); i++)
free(to_free[i]);
strbuf_release(&replacement);
+ if (ps)
+ clear_pathspec(ps);
return ret;
}
diff --git a/diff.c b/diff.c
index 90e8003..dca87e1 100644
--- a/diff.c
+++ b/diff.c
@@ -23,7 +23,7 @@
#include "color.h"
#include "run-command.h"
#include "utf8.h"
-#include "object-store.h"
+#include "odb.h"
#include "userdiff.h"
#include "submodule.h"
#include "hashmap.h"
@@ -4230,14 +4230,14 @@ int diff_populate_filespec(struct repository *r,
info.contentp = &s->data;
if (options && options->missing_object_cb) {
- if (!oid_object_info_extended(r, &s->oid, &info,
- OBJECT_INFO_LOOKUP_REPLACE |
- OBJECT_INFO_SKIP_FETCH_OBJECT))
+ if (!odb_read_object_info_extended(r->objects, &s->oid, &info,
+ OBJECT_INFO_LOOKUP_REPLACE |
+ OBJECT_INFO_SKIP_FETCH_OBJECT))
goto object_read;
options->missing_object_cb(options->missing_object_data);
}
- if (oid_object_info_extended(r, &s->oid, &info,
- OBJECT_INFO_LOOKUP_REPLACE))
+ if (odb_read_object_info_extended(r->objects, &s->oid, &info,
+ OBJECT_INFO_LOOKUP_REPLACE))
die("unable to read %s", oid_to_hex(&s->oid));
object_read:
@@ -4252,8 +4252,8 @@ int diff_populate_filespec(struct repository *r,
}
if (!info.contentp) {
info.contentp = &s->data;
- if (oid_object_info_extended(r, &s->oid, &info,
- OBJECT_INFO_LOOKUP_REPLACE))
+ if (odb_read_object_info_extended(r->objects, &s->oid, &info,
+ OBJECT_INFO_LOOKUP_REPLACE))
die("unable to read %s", oid_to_hex(&s->oid));
}
s->should_free = 1;
@@ -7019,8 +7019,8 @@ void diff_add_if_missing(struct repository *r,
{
if (filespec && filespec->oid_valid &&
!S_ISGITLINK(filespec->mode) &&
- oid_object_info_extended(r, &filespec->oid, NULL,
- OBJECT_INFO_FOR_PREFETCH))
+ odb_read_object_info_extended(r->objects, &filespec->oid, NULL,
+ OBJECT_INFO_FOR_PREFETCH))
oid_array_append(to_fetch, &filespec->oid);
}
diff --git a/dir.c b/dir.c
index a374972..dfb4d40 100644
--- a/dir.c
+++ b/dir.c
@@ -302,7 +302,7 @@ static int do_read_blob(const struct object_id *oid, struct oid_stat *oid_stat,
*size_out = 0;
*data_out = NULL;
- data = repo_read_object_file(the_repository, oid, &type, &sz);
+ data = odb_read_object(the_repository->objects, oid, &type, &sz);
if (!data || type != OBJ_BLOB) {
free(data);
return -1;
@@ -397,9 +397,12 @@ static int match_pathspec_item(struct index_state *istate,
strncmp(item->match, name - prefix, item->prefix))
return 0;
- if (item->attr_match_nr &&
- !match_pathspec_attrs(istate, name - prefix, namelen + prefix, item))
- return 0;
+ if (item->attr_match_nr) {
+ if (!istate)
+ BUG("magic PATHSPEC_ATTR requires an index");
+ if (!match_pathspec_attrs(istate, name - prefix, namelen + prefix, item))
+ return 0;
+ }
/* If the match was just the prefix, we matched */
if (!*match)
@@ -577,6 +580,16 @@ int match_pathspec(struct index_state *istate,
prefix, seen, flags);
}
+int match_leading_pathspec(struct index_state *istate,
+ const struct pathspec *ps,
+ const char *name, int namelen,
+ int prefix, char *seen, int is_dir)
+{
+ unsigned flags = is_dir ? DO_MATCH_DIRECTORY | DO_MATCH_LEADING_PATHSPEC : 0;
+ return match_pathspec_with_flags(istate, ps, name, namelen,
+ prefix, seen, flags);
+}
+
/**
* Check if a submodule is a superset of the pathspec
*/
@@ -4078,8 +4091,8 @@ void connect_work_tree_and_git_dir(const char *work_tree_,
write_file(gitfile_sb.buf, "gitdir: %s",
relative_path(git_dir, work_tree, &rel_path));
/* Update core.worktree setting */
- git_config_set_in_file(cfg_sb.buf, "core.worktree",
- relative_path(work_tree, git_dir, &rel_path));
+ repo_config_set_in_file(the_repository, cfg_sb.buf, "core.worktree",
+ relative_path(work_tree, git_dir, &rel_path));
strbuf_release(&gitfile_sb);
strbuf_release(&cfg_sb);
diff --git a/dir.h b/dir.h
index d7e71aa..fc9be7b 100644
--- a/dir.h
+++ b/dir.h
@@ -676,4 +676,27 @@ static inline int starts_with_dot_dot_slash_native(const char *const path)
return path_match_flags(path, what | PATH_MATCH_NATIVE);
}
+/**
+ * starts_with_dot_slash: convenience wrapper for
+ * patch_match_flags() with PATH_MATCH_STARTS_WITH_DOT_SLASH and
+ * PATH_MATCH_XPLATFORM.
+ */
+static inline int starts_with_dot_slash(const char *const path)
+{
+ const enum path_match_flags what = PATH_MATCH_STARTS_WITH_DOT_SLASH;
+
+ return path_match_flags(path, what | PATH_MATCH_XPLATFORM);
+}
+
+/**
+ * starts_with_dot_dot_slash: convenience wrapper for
+ * patch_match_flags() with PATH_MATCH_STARTS_WITH_DOT_DOT_SLASH and
+ * PATH_MATCH_XPLATFORM.
+ */
+static inline int starts_with_dot_dot_slash(const char *const path)
+{
+ const enum path_match_flags what = PATH_MATCH_STARTS_WITH_DOT_DOT_SLASH;
+
+ return path_match_flags(path, what | PATH_MATCH_XPLATFORM);
+}
#endif
diff --git a/editor.c b/editor.c
index b79d97b..fd174e6a 100644
--- a/editor.c
+++ b/editor.c
@@ -50,7 +50,7 @@ const char *git_sequence_editor(void)
const char *editor = getenv("GIT_SEQUENCE_EDITOR");
if (!editor)
- git_config_get_string_tmp("sequence.editor", &editor);
+ repo_config_get_string_tmp(the_repository, "sequence.editor", &editor);
if (!editor)
editor = git_editor();
diff --git a/entry.c b/entry.c
index f36ec5a..cae02eb 100644
--- a/entry.c
+++ b/entry.c
@@ -1,7 +1,7 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
-#include "object-store.h"
+#include "odb.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
@@ -93,8 +93,8 @@ void *read_blob_entry(const struct cache_entry *ce, size_t *size)
{
enum object_type type;
unsigned long ul;
- void *blob_data = repo_read_object_file(the_repository, &ce->oid,
- &type, &ul);
+ void *blob_data = odb_read_object(the_repository->objects, &ce->oid,
+ &type, &ul);
*size = ul;
if (blob_data) {
diff --git a/environment.c b/environment.c
index c61d773..ae1427b 100644
--- a/environment.c
+++ b/environment.c
@@ -12,22 +12,34 @@
#include "git-compat-util.h"
#include "abspath.h"
+#include "advice.h"
+#include "attr.h"
#include "branch.h"
+#include "color.h"
#include "convert.h"
#include "environment.h"
#include "gettext.h"
#include "git-zlib.h"
+#include "ident.h"
+#include "mailmap.h"
+#include "object-name.h"
#include "repository.h"
#include "config.h"
#include "refs.h"
#include "fmt-merge-msg.h"
#include "commit.h"
#include "strvec.h"
+#include "pager.h"
#include "path.h"
+#include "quote.h"
#include "chdir-notify.h"
#include "setup.h"
+#include "ws.h"
#include "write-or-die.h"
+static int pack_compression_seen;
+static int zlib_compression_seen;
+
int trust_executable_bit = 1;
int trust_ctime = 1;
int check_stat = 1;
@@ -37,7 +49,6 @@ int ignore_case;
int assume_unchanged;
int is_bare_repository_cfg = -1; /* unspecified */
int warn_on_object_refname_ambiguity = 1;
-int repository_format_precious_objects;
char *git_commit_encoding;
char *git_log_output_encoding;
char *apply_default_whitespace;
@@ -113,9 +124,6 @@ const char *comment_line_str = "#";
char *comment_line_str_to_free;
int auto_comment_line_char;
-/* Parallel index stat data preload? */
-int core_preload_index = 1;
-
/* This is set by setup_git_directory_gently() and/or git_default_config() */
char *git_work_tree_cfg;
@@ -235,3 +243,503 @@ int print_sha1_ellipsis(void)
}
return cached_result;
}
+
+static const struct fsync_component_name {
+ const char *name;
+ enum fsync_component component_bits;
+} fsync_component_names[] = {
+ { "loose-object", FSYNC_COMPONENT_LOOSE_OBJECT },
+ { "pack", FSYNC_COMPONENT_PACK },
+ { "pack-metadata", FSYNC_COMPONENT_PACK_METADATA },
+ { "commit-graph", FSYNC_COMPONENT_COMMIT_GRAPH },
+ { "index", FSYNC_COMPONENT_INDEX },
+ { "objects", FSYNC_COMPONENTS_OBJECTS },
+ { "reference", FSYNC_COMPONENT_REFERENCE },
+ { "derived-metadata", FSYNC_COMPONENTS_DERIVED_METADATA },
+ { "committed", FSYNC_COMPONENTS_COMMITTED },
+ { "added", FSYNC_COMPONENTS_ADDED },
+ { "all", FSYNC_COMPONENTS_ALL },
+};
+
+static enum fsync_component parse_fsync_components(const char *var, const char *string)
+{
+ enum fsync_component current = FSYNC_COMPONENTS_PLATFORM_DEFAULT;
+ enum fsync_component positive = 0, negative = 0;
+
+ while (string) {
+ size_t len;
+ const char *ep;
+ int negated = 0;
+ int found = 0;
+
+ string = string + strspn(string, ", \t\n\r");
+ ep = strchrnul(string, ',');
+ len = ep - string;
+ if (!strcmp(string, "none")) {
+ current = FSYNC_COMPONENT_NONE;
+ goto next_name;
+ }
+
+ if (*string == '-') {
+ negated = 1;
+ string++;
+ len--;
+ if (!len)
+ warning(_("invalid value for variable %s"), var);
+ }
+
+ if (!len)
+ break;
+
+ for (size_t i = 0; i < ARRAY_SIZE(fsync_component_names); ++i) {
+ const struct fsync_component_name *n = &fsync_component_names[i];
+
+ if (strncmp(n->name, string, len))
+ continue;
+
+ found = 1;
+ if (negated)
+ negative |= n->component_bits;
+ else
+ positive |= n->component_bits;
+ }
+
+ if (!found) {
+ char *component = xstrndup(string, len);
+ warning(_("ignoring unknown core.fsync component '%s'"), component);
+ free(component);
+ }
+
+next_name:
+ string = ep;
+ }
+
+ return (current & ~negative) | positive;
+}
+
+static int git_default_core_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
+{
+ /* This needs a better name */
+ if (!strcmp(var, "core.filemode")) {
+ trust_executable_bit = git_config_bool(var, value);
+ return 0;
+ }
+ if (!strcmp(var, "core.trustctime")) {
+ trust_ctime = git_config_bool(var, value);
+ return 0;
+ }
+ if (!strcmp(var, "core.checkstat")) {
+ if (!value)
+ return config_error_nonbool(var);
+ if (!strcasecmp(value, "default"))
+ check_stat = 1;
+ else if (!strcasecmp(value, "minimal"))
+ check_stat = 0;
+ else
+ return error(_("invalid value for '%s': '%s'"),
+ var, value);
+ }
+
+ if (!strcmp(var, "core.quotepath")) {
+ quote_path_fully = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.symlinks")) {
+ has_symlinks = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.ignorecase")) {
+ ignore_case = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.attributesfile")) {
+ FREE_AND_NULL(git_attributes_file);
+ return git_config_pathname(&git_attributes_file, var, value);
+ }
+
+ if (!strcmp(var, "core.bare")) {
+ is_bare_repository_cfg = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.ignorestat")) {
+ assume_unchanged = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.abbrev")) {
+ if (!value)
+ return config_error_nonbool(var);
+ if (!strcasecmp(value, "auto"))
+ default_abbrev = -1;
+ else if (!git_parse_maybe_bool_text(value))
+ default_abbrev = GIT_MAX_HEXSZ;
+ else {
+ int abbrev = git_config_int(var, value, ctx->kvi);
+ if (abbrev < minimum_abbrev)
+ return error(_("abbrev length out of range: %d"), abbrev);
+ default_abbrev = abbrev;
+ }
+ return 0;
+ }
+
+ if (!strcmp(var, "core.disambiguate"))
+ return set_disambiguate_hint_config(var, value);
+
+ if (!strcmp(var, "core.loosecompression")) {
+ int level = git_config_int(var, value, ctx->kvi);
+ if (level == -1)
+ level = Z_DEFAULT_COMPRESSION;
+ else if (level < 0 || level > Z_BEST_COMPRESSION)
+ die(_("bad zlib compression level %d"), level);
+ zlib_compression_level = level;
+ zlib_compression_seen = 1;
+ return 0;
+ }
+
+ if (!strcmp(var, "core.compression")) {
+ int level = git_config_int(var, value, ctx->kvi);
+ if (level == -1)
+ level = Z_DEFAULT_COMPRESSION;
+ else if (level < 0 || level > Z_BEST_COMPRESSION)
+ die(_("bad zlib compression level %d"), level);
+ if (!zlib_compression_seen)
+ zlib_compression_level = level;
+ if (!pack_compression_seen)
+ pack_compression_level = level;
+ return 0;
+ }
+
+ if (!strcmp(var, "core.autocrlf")) {
+ if (value && !strcasecmp(value, "input")) {
+ auto_crlf = AUTO_CRLF_INPUT;
+ return 0;
+ }
+ auto_crlf = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.safecrlf")) {
+ int eol_rndtrp_die;
+ if (value && !strcasecmp(value, "warn")) {
+ global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
+ return 0;
+ }
+ eol_rndtrp_die = git_config_bool(var, value);
+ global_conv_flags_eol = eol_rndtrp_die ?
+ CONV_EOL_RNDTRP_DIE : 0;
+ return 0;
+ }
+
+ if (!strcmp(var, "core.eol")) {
+ if (value && !strcasecmp(value, "lf"))
+ core_eol = EOL_LF;
+ else if (value && !strcasecmp(value, "crlf"))
+ core_eol = EOL_CRLF;
+ else if (value && !strcasecmp(value, "native"))
+ core_eol = EOL_NATIVE;
+ else
+ core_eol = EOL_UNSET;
+ return 0;
+ }
+
+ if (!strcmp(var, "core.checkroundtripencoding")) {
+ FREE_AND_NULL(check_roundtrip_encoding);
+ return git_config_string(&check_roundtrip_encoding, var, value);
+ }
+
+ if (!strcmp(var, "core.editor")) {
+ FREE_AND_NULL(editor_program);
+ return git_config_string(&editor_program, var, value);
+ }
+
+ if (!strcmp(var, "core.commentchar") ||
+ !strcmp(var, "core.commentstring")) {
+ if (!value)
+ return config_error_nonbool(var);
+ else if (!strcasecmp(value, "auto"))
+ auto_comment_line_char = 1;
+ else if (value[0]) {
+ if (strchr(value, '\n'))
+ return error(_("%s cannot contain newline"), var);
+ comment_line_str = value;
+ FREE_AND_NULL(comment_line_str_to_free);
+ auto_comment_line_char = 0;
+ } else
+ return error(_("%s must have at least one character"), var);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.askpass")) {
+ FREE_AND_NULL(askpass_program);
+ return git_config_string(&askpass_program, var, value);
+ }
+
+ if (!strcmp(var, "core.excludesfile")) {
+ FREE_AND_NULL(excludes_file);
+ return git_config_pathname(&excludes_file, var, value);
+ }
+
+ if (!strcmp(var, "core.whitespace")) {
+ if (!value)
+ return config_error_nonbool(var);
+ whitespace_rule_cfg = parse_whitespace_rule(value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.fsync")) {
+ if (!value)
+ return config_error_nonbool(var);
+ fsync_components = parse_fsync_components(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.fsyncmethod")) {
+ if (!value)
+ return config_error_nonbool(var);
+ if (!strcmp(value, "fsync"))
+ fsync_method = FSYNC_METHOD_FSYNC;
+ else if (!strcmp(value, "writeout-only"))
+ fsync_method = FSYNC_METHOD_WRITEOUT_ONLY;
+ else if (!strcmp(value, "batch"))
+ fsync_method = FSYNC_METHOD_BATCH;
+ else
+ warning(_("ignoring unknown core.fsyncMethod value '%s'"), value);
+
+ }
+
+ if (!strcmp(var, "core.fsyncobjectfiles")) {
+ if (fsync_object_files < 0)
+ warning(_("core.fsyncObjectFiles is deprecated; use core.fsync instead"));
+ fsync_object_files = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.createobject")) {
+ if (!value)
+ return config_error_nonbool(var);
+ if (!strcmp(value, "rename"))
+ object_creation_mode = OBJECT_CREATION_USES_RENAMES;
+ else if (!strcmp(value, "link"))
+ object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
+ else
+ die(_("invalid mode for object creation: %s"), value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.sparsecheckout")) {
+ core_apply_sparse_checkout = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.sparsecheckoutcone")) {
+ core_sparse_checkout_cone = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.precomposeunicode")) {
+ precomposed_unicode = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.protecthfs")) {
+ protect_hfs = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.protectntfs")) {
+ protect_ntfs = git_config_bool(var, value);
+ return 0;
+ }
+
+ if (!strcmp(var, "core.maxtreedepth")) {
+ max_allowed_tree_depth = git_config_int(var, value, ctx->kvi);
+ return 0;
+ }
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return platform_core_config(var, value, ctx, cb);
+}
+
+static int git_default_sparse_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "sparse.expectfilesoutsideofpatterns")) {
+ sparse_expect_files_outside_of_patterns = git_config_bool(var, value);
+ return 0;
+ }
+
+ /* Add other config variables here and to Documentation/config/sparse.adoc. */
+ return 0;
+}
+
+static int git_default_i18n_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "i18n.commitencoding")) {
+ FREE_AND_NULL(git_commit_encoding);
+ return git_config_string(&git_commit_encoding, var, value);
+ }
+
+ if (!strcmp(var, "i18n.logoutputencoding")) {
+ FREE_AND_NULL(git_log_output_encoding);
+ return git_config_string(&git_log_output_encoding, var, value);
+ }
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return 0;
+}
+
+static int git_default_branch_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "branch.autosetupmerge")) {
+ if (value && !strcmp(value, "always")) {
+ git_branch_track = BRANCH_TRACK_ALWAYS;
+ return 0;
+ } else if (value && !strcmp(value, "inherit")) {
+ git_branch_track = BRANCH_TRACK_INHERIT;
+ return 0;
+ } else if (value && !strcmp(value, "simple")) {
+ git_branch_track = BRANCH_TRACK_SIMPLE;
+ return 0;
+ }
+ git_branch_track = git_config_bool(var, value);
+ return 0;
+ }
+ if (!strcmp(var, "branch.autosetuprebase")) {
+ if (!value)
+ return config_error_nonbool(var);
+ else if (!strcmp(value, "never"))
+ autorebase = AUTOREBASE_NEVER;
+ else if (!strcmp(value, "local"))
+ autorebase = AUTOREBASE_LOCAL;
+ else if (!strcmp(value, "remote"))
+ autorebase = AUTOREBASE_REMOTE;
+ else if (!strcmp(value, "always"))
+ autorebase = AUTOREBASE_ALWAYS;
+ else
+ return error(_("malformed value for %s"), var);
+ return 0;
+ }
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return 0;
+}
+
+static int git_default_push_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "push.default")) {
+ if (!value)
+ return config_error_nonbool(var);
+ else if (!strcmp(value, "nothing"))
+ push_default = PUSH_DEFAULT_NOTHING;
+ else if (!strcmp(value, "matching"))
+ push_default = PUSH_DEFAULT_MATCHING;
+ else if (!strcmp(value, "simple"))
+ push_default = PUSH_DEFAULT_SIMPLE;
+ else if (!strcmp(value, "upstream"))
+ push_default = PUSH_DEFAULT_UPSTREAM;
+ else if (!strcmp(value, "tracking")) /* deprecated */
+ push_default = PUSH_DEFAULT_UPSTREAM;
+ else if (!strcmp(value, "current"))
+ push_default = PUSH_DEFAULT_CURRENT;
+ else {
+ error(_("malformed value for %s: %s"), var, value);
+ return error(_("must be one of nothing, matching, simple, "
+ "upstream or current"));
+ }
+ return 0;
+ }
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return 0;
+}
+
+static int git_default_mailmap_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "mailmap.file")) {
+ FREE_AND_NULL(git_mailmap_file);
+ return git_config_pathname(&git_mailmap_file, var, value);
+ }
+
+ if (!strcmp(var, "mailmap.blob")) {
+ FREE_AND_NULL(git_mailmap_blob);
+ return git_config_string(&git_mailmap_blob, var, value);
+ }
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return 0;
+}
+
+static int git_default_attr_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "attr.tree")) {
+ FREE_AND_NULL(git_attr_tree);
+ return git_config_string(&git_attr_tree, var, value);
+ }
+
+ /*
+ * Add other attribute related config variables here and to
+ * Documentation/config/attr.adoc.
+ */
+ return 0;
+}
+
+int git_default_config(const char *var, const char *value,
+ const struct config_context *ctx, void *cb)
+{
+ if (starts_with(var, "core."))
+ return git_default_core_config(var, value, ctx, cb);
+
+ if (starts_with(var, "user.") ||
+ starts_with(var, "author.") ||
+ starts_with(var, "committer."))
+ return git_ident_config(var, value, ctx, cb);
+
+ if (starts_with(var, "i18n."))
+ return git_default_i18n_config(var, value);
+
+ if (starts_with(var, "branch."))
+ return git_default_branch_config(var, value);
+
+ if (starts_with(var, "push."))
+ return git_default_push_config(var, value);
+
+ if (starts_with(var, "mailmap."))
+ return git_default_mailmap_config(var, value);
+
+ if (starts_with(var, "attr."))
+ return git_default_attr_config(var, value);
+
+ if (starts_with(var, "advice.") || starts_with(var, "color.advice"))
+ return git_default_advice_config(var, value);
+
+ if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
+ pager_use_color = git_config_bool(var,value);
+ return 0;
+ }
+
+ if (!strcmp(var, "pack.packsizelimit")) {
+ pack_size_limit_cfg = git_config_ulong(var, value, ctx->kvi);
+ return 0;
+ }
+
+ if (!strcmp(var, "pack.compression")) {
+ int level = git_config_int(var, value, ctx->kvi);
+ 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;
+ pack_compression_seen = 1;
+ return 0;
+ }
+
+ if (starts_with(var, "sparse."))
+ return git_default_sparse_config(var, value);
+
+ /* Add other config variables here and to Documentation/config.adoc. */
+ return 0;
+}
diff --git a/environment.h b/environment.h
index 3d98461..8cfce41 100644
--- a/environment.h
+++ b/environment.h
@@ -104,6 +104,9 @@ int use_optional_locks(void);
const char *get_git_namespace(void);
const char *strip_namespace(const char *namespaced_ref);
+int git_default_config(const char *, const char *,
+ const struct config_context *, void *);
+
/*
* TODO: All the below state either explicitly or implicitly relies on
* `the_repository`. We should eventually get rid of these and make the
@@ -155,7 +158,6 @@ extern int pack_compression_level;
extern unsigned long pack_size_limit_cfg;
extern int max_allowed_tree_depth;
-extern int core_preload_index;
extern int precomposed_unicode;
extern int protect_hfs;
extern int protect_ntfs;
@@ -190,8 +192,6 @@ extern enum object_creation_mode object_creation_mode;
extern int grafts_keep_true_parents;
-extern int repository_format_precious_objects;
-
const char *get_log_output_encoding(void);
const char *get_commit_output_encoding(void);
diff --git a/fetch-pack.c b/fetch-pack.c
index fa4231f..46c39f8 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -24,7 +24,7 @@
#include "oid-array.h"
#include "oidset.h"
#include "packfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "connected.h"
#include "fetch-negotiator.h"
@@ -34,6 +34,7 @@
#include "commit-graph.h"
#include "sigchain.h"
#include "mergesort.h"
+#include "prio-queue.h"
static int transfer_unpack_limit = -1;
static int fetch_unpack_limit = -1;
@@ -115,7 +116,8 @@ static void for_each_cached_alternate(struct fetch_negotiator *negotiator,
size_t i;
if (!initialized) {
- for_each_alternate_ref(cache_one_alternate, &cache);
+ odb_for_each_alternate_ref(the_repository->objects,
+ cache_one_alternate, &cache);
initialized = 1;
}
@@ -141,15 +143,15 @@ static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
commit = lookup_commit_in_graph(the_repository, oid);
if (commit) {
if (mark_tags_complete_and_check_obj_db) {
- if (!has_object(the_repository, oid, 0))
+ if (!odb_has_object(the_repository->objects, oid, 0))
die_in_commit_graph_only(oid);
}
return commit;
}
while (1) {
- if (oid_object_info_extended(the_repository, oid, &info,
- OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK))
+ if (odb_read_object_info_extended(the_repository->objects, oid, &info,
+ OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK))
return NULL;
if (type == OBJ_TAG) {
struct tag *tag = (struct tag *)
@@ -600,7 +602,7 @@ static int find_common(struct fetch_negotiator *negotiator,
return count ? retval : 0;
}
-static struct commit_list *complete;
+static struct prio_queue complete = { compare_commits_by_commit_date };
static int mark_complete(const struct object_id *oid)
{
@@ -608,7 +610,7 @@ static int mark_complete(const struct object_id *oid)
if (commit && !(commit->object.flags & COMPLETE)) {
commit->object.flags |= COMPLETE;
- commit_list_insert(commit, &complete);
+ prio_queue_put(&complete, commit);
}
return 0;
}
@@ -625,9 +627,12 @@ static int mark_complete_oid(const char *refname UNUSED,
static void mark_recent_complete_commits(struct fetch_pack_args *args,
timestamp_t cutoff)
{
- while (complete && cutoff <= complete->item->date) {
+ while (complete.nr) {
+ struct commit *item = prio_queue_peek(&complete);
+ if (item->date < cutoff)
+ break;
print_verbose(args, _("Marking %s as complete"),
- oid_to_hex(&complete->item->object.oid));
+ oid_to_hex(&item->object.oid));
pop_most_recent_commit(&complete, COMPLETE);
}
}
@@ -769,7 +774,7 @@ static void mark_complete_and_common_ref(struct fetch_negotiator *negotiator,
if (!commit) {
struct object *o;
- if (!has_object(the_repository, &ref->old_oid, 0))
+ if (!odb_has_object(the_repository->objects, &ref->old_oid, 0))
continue;
o = parse_object(the_repository, &ref->old_oid);
if (!o || o->type != OBJ_COMMIT)
@@ -797,7 +802,6 @@ static void mark_complete_and_common_ref(struct fetch_negotiator *negotiator,
refs_for_each_rawref(get_main_ref_store(the_repository),
mark_complete_oid, NULL);
for_each_cached_alternate(NULL, mark_alternate_complete);
- commit_list_sort_by_date(&complete);
if (cutoff)
mark_recent_complete_commits(args, cutoff);
}
@@ -1342,7 +1346,7 @@ static void write_fetch_command_and_capabilities(struct strbuf *req_buf,
die(_("mismatched algorithms: client %s; server %s"),
the_hash_algo->name, hash_name);
packet_buf_write(req_buf, "object-format=%s", the_hash_algo->name);
- } else if (hash_algo_by_ptr(the_hash_algo) != GIT_HASH_SHA1) {
+ } else if (hash_algo_by_ptr(the_hash_algo) != GIT_HASH_SHA1_LEGACY) {
die(_("the server does not support algorithm '%s'"),
the_hash_algo->name);
}
@@ -1900,22 +1904,22 @@ static int fetch_pack_config_cb(const char *var, const char *value,
static void fetch_pack_config(void)
{
- 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);
- git_config_get_bool("transfer.advertisesid", &advertise_sid);
+ repo_config_get_int(the_repository, "fetch.unpacklimit", &fetch_unpack_limit);
+ repo_config_get_int(the_repository, "transfer.unpacklimit", &transfer_unpack_limit);
+ repo_config_get_bool(the_repository, "repack.usedeltabaseoffset", &prefer_ofs_delta);
+ repo_config_get_bool(the_repository, "fetch.fsckobjects", &fetch_fsck_objects);
+ repo_config_get_bool(the_repository, "transfer.fsckobjects", &transfer_fsck_objects);
+ repo_config_get_bool(the_repository, "transfer.advertisesid", &advertise_sid);
if (!uri_protocols.nr) {
char *str;
- if (!git_config_get_string("fetch.uriprotocols", &str) && str) {
+ if (!repo_config_get_string(the_repository, "fetch.uriprotocols", &str) && str) {
string_list_split(&uri_protocols, str, ',', -1);
free(str);
}
}
- git_config(fetch_pack_config_cb, NULL);
+ repo_config(the_repository, fetch_pack_config_cb, NULL);
}
static void fetch_pack_setup(void)
@@ -1983,8 +1987,8 @@ static void update_shallow(struct fetch_pack_args *args,
struct oid_array extra = OID_ARRAY_INIT;
struct object_id *oid = si->shallow->oid;
for (i = 0; i < si->shallow->nr; i++)
- if (has_object(the_repository, &oid[i],
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, &oid[i],
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
oid_array_append(&extra, &oid[i]);
if (extra.nr) {
setup_alternate_shallow(&shallow_lock,
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index 501b5ac..40174ef 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -6,7 +6,7 @@
#include "environment.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "diff.h"
#include "diff-merges.h"
#include "hex.h"
@@ -526,8 +526,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
struct object_id *oid = origins.items[i].util;
enum object_type type;
unsigned long size;
- char *buf = repo_read_object_file(the_repository, oid, &type,
- &size);
+ char *buf = odb_read_object(the_repository->objects, oid,
+ &type, &size);
char *origbuf = buf;
unsigned long len = size;
struct signature_check sigc = { NULL };
diff --git a/fsck.c b/fsck.c
index 8dc8472..171b424 100644
--- a/fsck.c
+++ b/fsck.c
@@ -3,8 +3,9 @@
#include "git-compat-util.h"
#include "date.h"
#include "dir.h"
+#include "environment.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "repository.h"
#include "object.h"
@@ -1293,7 +1294,7 @@ static int fsck_blobs(struct oidset *blobs_found, struct oidset *blobs_done,
if (oidset_contains(blobs_done, oid))
continue;
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {
if (is_promisor_object(the_repository, oid))
continue;
diff --git a/fsck.h b/fsck.h
index 0c5869a..dd7df3d 100644
--- a/fsck.h
+++ b/fsck.h
@@ -287,7 +287,7 @@ const char *fsck_describe_object(struct fsck_options *options,
struct key_value_info;
/*
- * git_config() callback for use by fsck-y tools that want to support
+ * repo_config() callback for use by fsck-y tools that want to support
* fsck.<msg> fsck.skipList etc.
*/
int git_fsck_config(const char *var, const char *value,
diff --git a/fsmonitor.c b/fsmonitor.c
index 98b2b47..d07dc18 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -43,7 +43,7 @@ static int fsmonitor_hook_version(void)
{
int hook_version;
- if (git_config_get_int("core.fsmonitorhookversion", &hook_version))
+ if (repo_config_get_int(the_repository, "core.fsmonitorhookversion", &hook_version))
return -1;
if (hook_version == HOOK_INTERFACE_VERSION1 ||
diff --git a/generate-configlist.sh b/generate-configlist.sh
index b06da53..75c39ad 100755
--- a/generate-configlist.sh
+++ b/generate-configlist.sh
@@ -13,17 +13,16 @@
cat <<EOF
static const char *config_name_list[] = {
EOF
- sed -E '
-/^`?[a-zA-Z].*\..*`?::$/ {
+ sed -e '
+ /^`*[a-zA-Z].*\..*`*::$/ {
/deprecated/d;
s/::$//;
s/`//g;
s/^.*$/ "&",/;
- s/, */",\n "/g;
p;};
-d' \
+ d' \
"$SOURCE_DIR"/Documentation/*config.adoc \
- "$SOURCE_DIR"/Documentation/config/*.adoc|
+ "$SOURCE_DIR"/Documentation/config/*.adoc |
sort
cat <<EOF
NULL,
diff --git a/git-compat-util.h b/git-compat-util.h
index 4678e21..9408f46 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -460,6 +460,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));
void show_usage_if_asked(int ac, const char **av, const char *err);
+NORETURN void you_still_use_that(const char *command_name);
+
#ifndef NO_OPENSSL
#ifdef APPLE_COMMON_CRYPTO
#include "compat/apple-common-crypto.h"
@@ -895,16 +897,16 @@ static inline size_t xsize_t(off_t len)
* is done via tolower(), so it is strictly ASCII (no multi-byte characters or
* locale-specific conversions).
*/
-static inline int skip_iprefix(const char *str, const char *prefix,
+static inline bool skip_iprefix(const char *str, const char *prefix,
const char **out)
{
do {
if (!*prefix) {
*out = str;
- return 1;
+ return true;
}
} while (tolower(*str++) == tolower(*prefix++));
- return 0;
+ return false;
}
/*
@@ -912,7 +914,7 @@ static inline int skip_iprefix(const char *str, const char *prefix,
* comparison is done via tolower(), so it is strictly ASCII (no multi-byte
* characters or locale-specific conversions).
*/
-static inline int skip_iprefix_mem(const char *buf, size_t len,
+static inline bool skip_iprefix_mem(const char *buf, size_t len,
const char *prefix,
const char **out, size_t *outlen)
{
@@ -920,10 +922,10 @@ static inline int skip_iprefix_mem(const char *buf, size_t len,
if (!*prefix) {
*out = buf;
*outlen = len;
- return 1;
+ return true;
}
} while (len-- > 0 && tolower(*buf++) == tolower(*prefix++));
- return 0;
+ return false;
}
static inline int strtoul_ui(char const *s, int base, unsigned int *result)
diff --git a/git-gui/.gitignore b/git-gui/.gitignore
index ff6e0be..5130b4f 100644
--- a/git-gui/.gitignore
+++ b/git-gui/.gitignore
@@ -1,8 +1,8 @@
.DS_Store
config.mak
-Git Gui.app*
git-gui.tcl
GIT-GUI-BUILD-OPTIONS
GIT-VERSION-FILE
git-gui
+git-gui--askpass
lib/tclIndex
diff --git a/git-gui/GIT-GUI-BUILD-OPTIONS.in b/git-gui/GIT-GUI-BUILD-OPTIONS.in
index 5fd885c..3c112af 100644
--- a/git-gui/GIT-GUI-BUILD-OPTIONS.in
+++ b/git-gui/GIT-GUI-BUILD-OPTIONS.in
@@ -4,4 +4,3 @@
SHELL_PATH=@SHELL_PATH@
TCLTK_PATH=@TCLTK_PATH@
TCL_PATH=@TCL_PATH@
-TKEXECUTABLE=@TKEXECUTABLE@
diff --git a/git-gui/Makefile b/git-gui/Makefile
index 8672dd2..27bbe05 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -12,7 +12,6 @@
@$(SHELL_PATH) ./GIT-VERSION-GEN . $@
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
SCRIPT_SH = git-gui.sh
@@ -54,8 +53,6 @@
INSTALL_R1 =
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
INSTALL_X1 =
-INSTALL_A0 = find # space is required here
-INSTALL_A1 = | cpio -pud
INSTALL_L0 = rm -f # space is required here
INSTALL_L1 = && ln # space is required here
INSTALL_L2 =
@@ -80,8 +77,6 @@
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
INSTALL_X0 = src=
INSTALL_X1 = && echo ' ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
- INSTALL_A0 = src=
- INSTALL_A1 = && echo ' ' INSTALL ' ' `basename "$$src"` && find "$$src" | cpio -pud
INSTALL_L0 = dst=
INSTALL_L1 = && src=
@@ -102,18 +97,6 @@
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
endif
-ifeq ($(uname_S),Darwin)
- TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
- endif
- endif
- TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
- TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
-endif
-
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
QUIET_GEN =
endif
@@ -131,16 +114,10 @@
exedir = $(dir $(gitexecdir))share/git-gui/lib
GITGUI_RELATIVE :=
-GITGUI_MACOSXAPP :=
ifeq ($(exedir),$(gg_libdir))
GITGUI_RELATIVE := 1
endif
-ifeq ($(uname_S),Darwin)
- ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
- GITGUI_MACOSXAPP := YesPlease
- endif
-endif
ifneq (,$(findstring MINGW,$(uname_S)))
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
NO_MSGFMT=1
@@ -149,20 +126,6 @@
GITGUI_RELATIVE := 1
endif
-ifdef GITGUI_MACOSXAPP
-GITGUI_MAIN := git-gui.tcl
-
-git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-
-Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
- macosx/Info.plist \
- macosx/git-gui.icns \
- macosx/AppMain.tcl \
- $(TKEXECUTABLE)
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-endif
-
ifdef GITGUI_WINDOWS_WRAPPER
GITGUI_MAIN := git-gui.tcl
@@ -170,7 +133,7 @@
cp $< $@
endif
-$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
+$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS generate-git-gui.sh
$(QUIET_GEN)$(SHELL_PATH) generate-git-gui.sh "$<" "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
XGETTEXT ?= xgettext
@@ -207,18 +170,17 @@
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
- -e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
$@.in >$@+
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
-ifdef GITGUI_MACOSXAPP
-all:: git-gui Git\ Gui.app
-endif
+git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
+ $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< ./GIT-GUI-BUILD-OPTIONS
+
ifdef GITGUI_WINDOWS_WRAPPER
all:: git-gui
endif
-all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
+all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
install: all
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -230,10 +192,6 @@
endif
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
- $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -248,10 +206,6 @@
endif
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
@@ -265,11 +219,8 @@
@sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
clean::
- $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
+ $(RM_RF) $(GITGUI_MAIN) git-gui--askpass lib/tclIndex po/*.msg $(PO_TEMPLATE)
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
-ifdef GITGUI_MACOSXAPP
- $(RM_RF) 'Git Gui.app'* git-gui
-endif
ifdef GITGUI_WINDOWS_WRAPPER
$(RM_RF) git-gui
endif
diff --git a/git-gui/generate-macos-app.sh b/git-gui/generate-macos-app.sh
deleted file mode 100755
index 71b9fa6..0000000
--- a/git-gui/generate-macos-app.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SOURCE_DIR="$1"
-OUTPUT="$2"
-BUILD_OPTIONS="$3"
-VERSION_FILE="$4"
-
-. "$BUILD_OPTIONS"
-. "$VERSION_FILE"
-
-rm -rf "$OUTPUT" "$OUTPUT+"
-
-mkdir -p "$OUTPUT+/Contents/MacOS"
-mkdir -p "$OUTPUT+/Contents/Resources/Scripts"
-
-cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS"
-cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources"
-sed \
- -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \
- -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \
- "$SOURCE_DIR/macosx/Info.plist" \
- >"$OUTPUT+/Contents/Info.plist"
-sed \
- -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \
- -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
- "$SOURCE_DIR/macosx/AppMain.tcl" \
- >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/git-gui/generate-macos-wrapper.sh b/git-gui/generate-macos-wrapper.sh
deleted file mode 100755
index 0304937..0000000
--- a/git-gui/generate-macos-wrapper.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if test "$#" -ne 3
-then
- echo >&2 "usage: $0 <OUTPUT> <BUILD_OPTIONS> <VERSION_FILE>"
- exit 1
-fi
-
-OUTPUT="$1"
-BUILD_OPTIONS="$2"
-VERSION_FILE="$3"
-
-. "$BUILD_OPTIONS"
-
-rm -f "$OUTPUT" "$OUTPUT+"
-
-(
- echo "#!$SHELL_PATH"
- cat "$BUILD_OPTIONS" "$VERSION_FILE"
- cat <<-'EOF'
- if test "z$*" = zversion ||
- test "z$*" = z--version
- then
- echo "git-gui version $GITGUI_VERSION"
- else
- libdir="${GIT_GUI_LIB_DIR:-$GITGUI_LIBDIR}"
- exec "$libdir/Git Gui.app/Contents/MacOS/$(basename "$TKEXECUTABLE")" "$0" "$@"
- fi
- EOF
-) >"$OUTPUT+"
-
-chmod +x "$OUTPUT+"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/git-gui/generate-script.sh b/git-gui/generate-script.sh
new file mode 100755
index 0000000..0dd2da9
--- /dev/null
+++ b/git-gui/generate-script.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if test $# -ne 3
+then
+ echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
+ exit 1
+fi
+
+OUTPUT="$1"
+INPUT="$2"
+BUILD_OPTIONS="$3"
+
+. "$BUILD_OPTIONS"
+
+sed \
+ -e "1s|#!.*/sh|#!$SHELL_PATH|" \
+ -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
+ "$INPUT" >"$OUTPUT"
+
+chmod a+x "$OUTPUT"
diff --git a/git-gui/git-gui--askpass b/git-gui/git-gui--askpass.sh
similarity index 100%
rename from git-gui/git-gui--askpass
rename to git-gui/git-gui--askpass.sh
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 28572c8..a931d7f 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -30,9 +30,7 @@
##
## Tcl/Tk sanity check
-if {[catch {package require Tcl 8.5} err]
- || [catch {package require Tk 8.5} err]
-} {
+if {[catch {package require Tcl 8.6-} err]} {
catch {wm withdraw .}
tk_messageBox \
-icon error \
@@ -76,100 +74,193 @@
}
######################################################################
-##
-## PATH lookup
+## Enable Tcl8 profile in Tcl9, allowing consumption of data that has
+## bytes not conforming to the assumed encoding profile.
-set _search_path {}
-proc _which {what args} {
- global env _search_exe _search_path
-
- if {$_search_path eq {}} {
- if {[is_Windows]} {
- set gitguidir [file dirname [info script]]
- regsub -all ";" $gitguidir "\\;" gitguidir
- set env(PATH) "$gitguidir;$env(PATH)"
- set _search_path [split $env(PATH) {;}]
- # Skip empty `PATH` elements
- set _search_path [lsearch -all -inline -not -exact \
- $_search_path ""]
- set _search_exe .exe
- } else {
- set _search_path [split $env(PATH) :]
- set _search_exe {}
- }
+if {[package vcompare $::tcl_version 9.0] >= 0} {
+ rename open _strict_open
+ proc open args {
+ set f [_strict_open {*}$args]
+ chan configure $f -profile tcl8
+ return $f
}
-
- if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
- set suffix {}
- } else {
- set suffix $_search_exe
+ proc convertfrom args {
+ return [encoding convertfrom -profile tcl8 {*}$args]
}
-
- foreach p $_search_path {
- set p [file join $p $what$suffix]
- if {[file exists $p]} {
- return [file normalize $p]
- }
+} else {
+ proc convertfrom args {
+ return [encoding convertfrom {*}$args]
}
- return {}
}
-proc sanitize_command_line {command_line from_index} {
- set i $from_index
- while {$i < [llength $command_line]} {
- set cmd [lindex $command_line $i]
- if {[llength [file split $cmd]] < 2} {
- set fullpath [_which $cmd]
- if {$fullpath eq ""} {
- throw {NOT-FOUND} "$cmd not found in PATH"
- }
- lset command_line $i $fullpath
+######################################################################
+##
+## PATH lookup. Sanitize $PATH, assure exec/open use only that
+
+if {[is_Windows]} {
+ set _path_sep {;}
+} else {
+ set _path_sep {:}
+}
+
+set _search_path {}
+set _path_seen [dict create]
+foreach p [split $env(PATH) $_path_sep] {
+ # Keep only absolute paths, getting rid of ., empty, etc.
+ if {[file pathtype $p] ne {absolute}} {
+ continue
+ }
+ # Keep only the first occurence of any duplicates.
+ set norm_p [file normalize $p]
+ if {[dict exists $_path_seen $norm_p]} {
+ continue
+ }
+ dict set _path_seen $norm_p 1
+ lappend _search_path $norm_p
+}
+unset _path_seen
+
+set env(PATH) [join $_search_path $_path_sep]
+
+if {[is_Windows]} {
+ proc _which {what args} {
+ global _search_path
+
+ if {[lsearch -exact $args -script] >= 0} {
+ set suffix {}
+ } elseif {[string match *.exe [string tolower $what]]} {
+ # The search string already has the file extension
+ set suffix {}
+ } else {
+ set suffix .exe
}
- # handle piped commands, e.g. `exec A | B`
- for {incr i} {$i < [llength $command_line]} {incr i} {
- if {[lindex $command_line $i] eq "|"} {
+ foreach p $_search_path {
+ set p [file join $p $what$suffix]
+ if {[file exists $p]} {
+ return [file normalize $p]
+ }
+ }
+ return {}
+ }
+
+ proc sanitize_command_line {command_line from_index} {
+ set i $from_index
+ while {$i < [llength $command_line]} {
+ set cmd [lindex $command_line $i]
+ if {[llength [file split $cmd]] < 2} {
+ set fullpath [_which $cmd]
+ if {$fullpath eq ""} {
+ throw {NOT-FOUND} "$cmd not found in PATH"
+ }
+ lset command_line $i $fullpath
+ }
+
+ # handle piped commands, e.g. `exec A | B`
+ for {incr i} {$i < [llength $command_line]} {incr i} {
+ if {[lindex $command_line $i] eq "|"} {
+ incr i
+ break
+ }
+ }
+ }
+ return $command_line
+ }
+
+ # Override `exec` to avoid unsafe PATH lookup
+
+ rename exec real_exec
+
+ proc exec {args} {
+ # skip options
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ set arg [lindex $args $i]
+ if {$arg eq "--"} {
incr i
break
}
+ if {[string range $arg 0 0] ne "-"} {
+ break
+ }
}
+ set args [sanitize_command_line $args $i]
+ uplevel 1 real_exec $args
}
- return $command_line
+
+ # Override `open` to avoid unsafe PATH lookup
+
+ rename open real_open
+
+ proc open {args} {
+ set arg0 [lindex $args 0]
+ if {[string range $arg0 0 0] eq "|"} {
+ set command_line [string trim [string range $arg0 1 end]]
+ lset args 0 "| [sanitize_command_line $command_line 0]"
+ }
+ set fd [real_open {*}$args]
+ fconfigure $fd -eofchar {}
+ return $fd
+ }
+
+} else {
+ # On non-Windows platforms, auto_execok, exec, and open are safe, and will
+ # use the sanitized search path. But, we need _which for these.
+
+ proc _which {what args} {
+ return [lindex [auto_execok $what] 0]
+ }
}
-# Override `exec` to avoid unsafe PATH lookup
+# Wrap exec/open to sanitize arguments
-rename exec real_exec
-
-proc exec {args} {
- # skip options
- for {set i 0} {$i < [llength $args]} {incr i} {
- set arg [lindex $args $i]
- if {$arg eq "--"} {
- incr i
- break
- }
- if {[string range $arg 0 0] ne "-"} {
- break
- }
- }
- set args [sanitize_command_line $args $i]
- uplevel 1 real_exec $args
+# unsafe arguments begin with redirections or the pipe or background operators
+proc is_arg_unsafe {arg} {
+ regexp {^([<|>&]|2>)} $arg
}
-# Override `open` to avoid unsafe PATH lookup
-
-rename open real_open
-
-proc open {args} {
- set arg0 [lindex $args 0]
- if {[string range $arg0 0 0] eq "|"} {
- set command_line [string trim [string range $arg0 1 end]]
- lset args 0 "| [sanitize_command_line $command_line 0]"
+proc make_arg_safe {arg} {
+ if {[is_arg_unsafe $arg]} {
+ set arg [file join . $arg]
}
- uplevel 1 real_open $args
+ return $arg
}
+proc make_arglist_safe {arglist} {
+ set res {}
+ foreach arg $arglist {
+ lappend res [make_arg_safe $arg]
+ }
+ return $res
+}
+
+# executes one command
+# no redirections or pipelines are possible
+# cmd is a list that specifies the command and its arguments
+# calls `exec` and returns its value
+proc safe_exec {cmd} {
+ eval exec [make_arglist_safe $cmd]
+}
+
+# executes one command in the background
+# no redirections or pipelines are possible
+# cmd is a list that specifies the command and its arguments
+# calls `exec` and returns its value
+proc safe_exec_bg {cmd} {
+ eval exec [make_arglist_safe $cmd] &
+}
+
+proc safe_open_file {filename flags} {
+ # a file name starting with "|" would attempt to run a process
+ # but such a file name must be treated as a relative path
+ # hide the "|" behind "./"
+ if {[string index $filename 0] eq "|"} {
+ set filename [file join . $filename]
+ }
+ open $filename $flags
+}
+
+# End exec/open wrappers
+
######################################################################
##
## locate our library
@@ -270,11 +361,11 @@
if {[tk windowingsystem] eq "aqua"} {
catch {
- exec osascript -e [format {
+ safe_exec [list osascript -e [format {
tell application "System Events"
set frontmost of processes whose unix id is %d to true
end tell
- } [pid]]
+ } [pid]]]
}
}
@@ -286,7 +377,6 @@
set _gitdir {}
set _gitworktree {}
set _isbare {}
-set _gitexec {}
set _githtmldir {}
set _reponame {}
set _shellpath {@@SHELL_PATH@@}
@@ -304,15 +394,37 @@
# branches).
set _last_merged_branch {}
-proc shellpath {} {
- global _shellpath env
- if {[string match @@* $_shellpath]} {
- if {[info exists env(SHELL)]} {
- return $env(SHELL)
- } else {
- return /bin/sh
- }
+# for testing, allow unconfigured _shellpath
+if {[string match @@* $_shellpath]} {
+ if {[info exists env(SHELL)]} {
+ set _shellpath $env(SHELL)
+ } else {
+ set _shellpath /bin/sh
}
+}
+
+if {[is_Windows]} {
+ set _shellpath [safe_exec [list cygpath -m $_shellpath]]
+}
+
+if {![file executable $_shellpath] || \
+ !([file pathtype $_shellpath] eq {absolute})} {
+ set errmsg "The defined shell ('$_shellpath') is not usable, \
+ it must be an absolute path to an executable."
+ puts stderr $errmsg
+
+ catch {wm withdraw .}
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title "git-gui: configuration error" \
+ -message $errmsg
+ exit 1
+}
+
+
+proc shellpath {} {
+ global _shellpath
return $_shellpath
}
@@ -329,20 +441,6 @@
return [eval [list file join $_gitdir] $args]
}
-proc gitexec {args} {
- global _gitexec
- if {$_gitexec eq {}} {
- if {[catch {set _gitexec [git --exec-path]} err]} {
- error "Git not installed?\n\n$err"
- }
- set _gitexec [file normalize $_gitexec]
- }
- if {$args eq {}} {
- return $_gitexec
- }
- return [eval [list file join $_gitexec] $args]
-}
-
proc githtmldir {args} {
global _githtmldir
if {$_githtmldir eq {}} {
@@ -475,81 +573,13 @@
#'" fix poor old emacs font-lock mode
-proc _git_cmd {name} {
- global _git_cmd_path
-
- if {[catch {set v $_git_cmd_path($name)}]} {
- switch -- $name {
- version -
- --version -
- --exec-path { return [list $::_git $name] }
- }
-
- set p [gitexec git-$name$::_search_exe]
- if {[file exists $p]} {
- set v [list $p]
- } elseif {[is_Windows] && [file exists [gitexec git-$name]]} {
- # Try to determine what sort of magic will make
- # git-$name go and do its thing, because native
- # Tcl on Windows doesn't know it.
- #
- set p [gitexec git-$name]
- set f [open $p r]
- set s [gets $f]
- close $f
-
- switch -glob -- [lindex $s 0] {
- #!*sh { set i sh }
- #!*perl { set i perl }
- #!*python { set i python }
- default { error "git-$name is not supported: $s" }
- }
-
- upvar #0 _$i interp
- if {![info exists interp]} {
- set interp [_which $i]
- }
- if {$interp eq {}} {
- error "git-$name requires $i (not in PATH)"
- }
- set v [concat [list $interp] [lrange $s 1 end] [list $p]]
- } else {
- # Assume it is builtin to git somehow and we
- # aren't actually able to see a file for it.
- #
- set v [list $::_git $name]
- }
- set _git_cmd_path($name) $v
- }
- return $v
-}
-
-# Test a file for a hashbang to identify executable scripts on Windows.
-proc is_shellscript {filename} {
- if {![file exists $filename]} {return 0}
- set f [open $filename r]
- fconfigure $f -encoding binary
- set magic [read $f 2]
- close $f
- return [expr {$magic eq "#!"}]
-}
-
-# Run a command connected via pipes on stdout.
# This is for use with textconv filters and uses sh -c "..." to allow it to
-# contain a command with arguments. On windows we must check for shell
-# scripts specifically otherwise just call the filter command.
+# contain a command with arguments. We presume this
+# to be a shellscript that the configured shell (/bin/sh by default) knows
+# how to run.
proc open_cmd_pipe {cmd path} {
- global env
- if {![file executable [shellpath]]} {
- set exe [auto_execok [lindex $cmd 0]]
- if {[is_shellscript [lindex $exe 0]]} {
- set run [linsert [auto_execok sh] end -c "$cmd \"\$0\"" $path]
- } else {
- set run [concat $exe [lrange $cmd 1 end] $path]
- }
- } else {
- set run [list [shellpath] -c "$cmd \"\$0\"" $path]
- }
+ set run [list [shellpath] -c "$cmd \"\$0\"" $path]
+ set run [make_arglist_safe $run]
return [open |$run r]
}
@@ -559,9 +589,7 @@
if {![info exists _nice]} {
set _nice [_which nice]
- if {[catch {exec $_nice git version}]} {
- set _nice {}
- } elseif {[is_Windows] && [file dirname $_nice] ne [file dirname $::_git]} {
+ if {[catch {safe_exec [list $_nice git version]}]} {
set _nice {}
}
}
@@ -571,8 +599,12 @@
}
proc git {args} {
- set fd [eval [list git_read] $args]
- fconfigure $fd -translation binary -encoding utf-8
+ git_redir $args {}
+}
+
+proc git_redir {cmd redir} {
+ set fd [git_read $cmd $redir]
+ fconfigure $fd -encoding utf-8
set result [string trimright [read $fd] "\n"]
close $fd
if {$::_trace} {
@@ -581,88 +613,46 @@
return $result
}
-proc _open_stdout_stderr {cmd} {
- _trace_exec $cmd
+proc safe_open_command {cmd {redir {}}} {
+ set cmd [make_arglist_safe $cmd]
+ _trace_exec [concat $cmd $redir]
if {[catch {
- set fd [open [concat [list | ] $cmd] r]
- } err]} {
- if { [lindex $cmd end] eq {2>@1}
- && $err eq {can not find channel named "1"}
- } {
- # Older versions of Tcl 8.4 don't have this 2>@1 IO
- # redirect operator. Fallback to |& cat for those.
- # The command was not actually started, so its safe
- # to try to start it a second time.
- #
- set fd [open [concat \
- [list | ] \
- [lrange $cmd 0 end-1] \
- [list |& cat] \
- ] r]
- } else {
- error $err
- }
+ set fd [open [concat [list | ] $cmd $redir] r]
+ } err]} {
+ error $err
}
- fconfigure $fd -eofchar {}
return $fd
}
-proc git_read {args} {
- set opt [list]
+proc git_read {cmd {redir {}}} {
+ global _git
+ set cmdp [concat [list $_git] $cmd]
- while {1} {
- switch -- [lindex $args 0] {
- --nice {
- _lappend_nice opt
- }
-
- --stderr {
- lappend args 2>@1
- }
-
- default {
- break
- }
-
- }
-
- set args [lrange $args 1 end]
- }
-
- set cmdp [_git_cmd [lindex $args 0]]
- set args [lrange $args 1 end]
-
- return [_open_stdout_stderr [concat $opt $cmdp $args]]
+ return [safe_open_command $cmdp $redir]
}
-proc git_write {args} {
+proc git_read_nice {cmd} {
+ global _git
set opt [list]
- while {1} {
- switch -- [lindex $args 0] {
- --nice {
- _lappend_nice opt
- }
+ _lappend_nice opt
- default {
- break
- }
+ set cmdp [concat [list $_git] $cmd]
- }
+ return [safe_open_command [concat $opt $cmdp]]
+}
- set args [lrange $args 1 end]
- }
+proc git_write {cmd} {
+ global _git
+ set cmd [make_arglist_safe $cmd]
+ set cmdp [concat [list $_git] $cmd]
- set cmdp [_git_cmd [lindex $args 0]]
- set args [lrange $args 1 end]
-
- _trace_exec [concat $opt $cmdp $args]
- return [open [concat [list | ] $opt $cmdp $args] w]
+ _trace_exec $cmdp
+ return [open [concat [list | ] $cmdp] w]
}
proc githook_read {hook_name args} {
- set cmd [concat git hook run --ignore-missing $hook_name -- $args 2>@1]
- return [_open_stdout_stderr $cmd]
+ git_read [concat [list hook run --ignore-missing $hook_name --] $args] [list 2>@1]
}
proc kill_file_process {fd} {
@@ -670,9 +660,9 @@
catch {
if {[is_Windows]} {
- exec taskkill /pid $process
+ safe_exec [list taskkill /pid $process]
} else {
- exec kill $process
+ safe_exec [list kill $process]
}
}
}
@@ -698,27 +688,8 @@
proc load_current_branch {} {
global current_branch is_detached
- set fd [open [gitdir HEAD] r]
- fconfigure $fd -translation binary -encoding utf-8
- if {[gets $fd ref] < 1} {
- set ref {}
- }
- close $fd
-
- set pfx {ref: refs/heads/}
- set len [string length $pfx]
- if {[string equal -length $len $pfx $ref]} {
- # We're on a branch. It might not exist. But
- # HEAD looks good enough to be a branch.
- #
- set current_branch [string range $ref $len end]
- set is_detached 0
- } else {
- # Assume this is a detached head.
- #
- set current_branch HEAD
- set is_detached 1
- }
+ set current_branch [git branch --show-current]
+ set is_detached [expr [string length $current_branch] == 0]
}
auto_load tk_optionMenu
@@ -868,18 +839,9 @@
font configure ${font}italic -slant italic
}
- global use_ttk NS
- set use_ttk 0
- set NS {}
- if {$repo_config(gui.usettk)} {
- set use_ttk [package vsatisfies [package provide Tk] 8.5]
- if {$use_ttk} {
- set NS ttk
- bind [winfo class .] <<ThemeChanged>> [list InitTheme]
- pave_toplevel .
- color::sync_with_theme
- }
- }
+ bind [winfo class .] <<ThemeChanged>> [list InitTheme]
+ pave_toplevel .
+ color::sync_with_theme
global comment_string
set comment_string [get_config core.commentstring]
@@ -946,6 +908,8 @@
##
## version check
+set MIN_GIT_VERSION 2.36
+
if {[catch {set _git_version [git --version]} err]} {
catch {wm withdraw .}
tk_messageBox \
@@ -956,9 +920,10 @@
$err
-[appname] requires Git 1.5.0 or later."
+[appname] requires Git $MIN_GIT_VERSION or later."
exit 1
}
+
if {![regsub {^git version } $_git_version {} _git_version]} {
catch {wm withdraw .}
tk_messageBox \
@@ -983,92 +948,28 @@
set _real_git_version $_git_version
set _git_version [get_trimmed_version $_git_version]
-if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
- catch {wm withdraw .}
- if {[tk_messageBox \
- -icon warning \
- -type yesno \
- -default no \
- -title "[appname]: warning" \
- -message [mc "Git version cannot be determined.
+if {[catch {set vcheck [package vcompare $_git_version $MIN_GIT_VERSION]}] ||
+ [expr $vcheck < 0] } {
-%s claims it is version '%s'.
-
-%s requires at least Git 1.5.0 or later.
-
-Assume '%s' is version 1.5.0?
-" $_git $_real_git_version [appname] $_real_git_version]] eq {yes}} {
- set _git_version 1.5.0
- } else {
- exit 1
- }
-}
-unset _real_git_version
-
-proc git-version {args} {
- global _git_version
-
- switch [llength $args] {
- 0 {
- return $_git_version
- }
-
- 2 {
- set op [lindex $args 0]
- set vr [lindex $args 1]
- set cm [package vcompare $_git_version $vr]
- return [expr $cm $op 0]
- }
-
- 4 {
- set type [lindex $args 0]
- set name [lindex $args 1]
- set parm [lindex $args 2]
- set body [lindex $args 3]
-
- if {($type ne {proc} && $type ne {method})} {
- error "Invalid arguments to git-version"
- }
- if {[llength $body] < 2 || [lindex $body end-1] ne {default}} {
- error "Last arm of $type $name must be default"
- }
-
- foreach {op vr cb} [lrange $body 0 end-2] {
- if {[git-version $op $vr]} {
- return [uplevel [list $type $name $parm $cb]]
- }
- }
-
- return [uplevel [list $type $name $parm [lindex $body end]]]
- }
-
- default {
- error "git-version >= x"
- }
-
- }
-}
-
-if {[git-version < 1.5]} {
+ set msg1 [mc "Insufficient git version, require: "]
+ set msg2 [mc "git returned:"]
+ set message "$msg1 $MIN_GIT_VERSION\n$msg2 $_real_git_version"
catch {wm withdraw .}
tk_messageBox \
-icon error \
-type ok \
-title [mc "git-gui: fatal error"] \
- -message "[appname] requires Git 1.5.0 or later.
-
-You are using [git-version]:
-
-[git --version]"
+ -message $message
exit 1
}
+unset _real_git_version
######################################################################
##
## configure our library
set idx [file join $oguilib tclIndex]
-if {[catch {set fd [open $idx r]} err]} {
+if {[catch {set fd [safe_open_file $idx r]} err]} {
catch {wm withdraw .}
tk_messageBox \
-icon error \
@@ -1106,53 +1007,30 @@
##
## config file parsing
-git-version proc _parse_config {arr_name args} {
- >= 1.5.3 {
- upvar $arr_name arr
- array unset arr
- set buf {}
- catch {
- set fd_rc [eval \
- [list git_read config] \
- $args \
- [list --null --list]]
- fconfigure $fd_rc -translation binary -encoding utf-8
- set buf [read $fd_rc]
- close $fd_rc
- }
- foreach line [split $buf "\0"] {
- if {[regexp {^([^\n]+)\n(.*)$} $line line name value]} {
- if {[is_many_config $name]} {
- lappend arr($name) $value
- } else {
- set arr($name) $value
- }
- } elseif {[regexp {^([^\n]+)$} $line line name]} {
- # no value given, but interpreting them as
- # boolean will be handled as true
- set arr($name) {}
- }
- }
+proc _parse_config {arr_name args} {
+ upvar $arr_name arr
+ array unset arr
+ set buf {}
+ catch {
+ set fd_rc [git_read \
+ [concat config \
+ $args \
+ --null --list]]
+ fconfigure $fd_rc -encoding utf-8
+ set buf [read $fd_rc]
+ close $fd_rc
}
- default {
- upvar $arr_name arr
- array unset arr
- catch {
- set fd_rc [eval [list git_read config --list] $args]
- while {[gets $fd_rc line] >= 0} {
- if {[regexp {^([^=]+)=(.*)$} $line line name value]} {
- if {[is_many_config $name]} {
- lappend arr($name) $value
- } else {
- set arr($name) $value
- }
- } elseif {[regexp {^([^=]+)$} $line line name]} {
- # no value given, but interpreting them as
- # boolean will be handled as true
- set arr($name) {}
- }
+ foreach line [split $buf "\0"] {
+ if {[regexp {^([^\n]+)\n(.*)$} $line line name value]} {
+ if {[is_many_config $name]} {
+ lappend arr($name) $value
+ } else {
+ set arr($name) $value
}
- close $fd_rc
+ } elseif {[regexp {^([^\n]+)$} $line line name]} {
+ # no value given, but interpreting them as
+ # boolean will be handled as true
+ set arr($name) {}
}
}
}
@@ -1247,12 +1125,12 @@
##
## execution environment
-set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
-
# Suggest our implementation of askpass, if none is set
+set argv0dir [file dirname [file normalize $::argv0]]
if {![info exists env(SSH_ASKPASS)]} {
- set env(SSH_ASKPASS) [gitexec git-gui--askpass]
+ set env(SSH_ASKPASS) [file join $argv0dir git-gui--askpass]
}
+unset argv0dir
######################################################################
##
@@ -1272,9 +1150,23 @@
load_config 1
apply_config
choose_repository::pick
+ if {![file isdirectory $_gitdir]} {
+ exit 1
+ }
set picked 1
}
+# Use object format as hash algorithm (either "sha1" or "sha256")
+set hashalgorithm [git rev-parse --show-object-format]
+if {$hashalgorithm eq "sha1"} {
+ set hashlength 40
+} elseif {$hashalgorithm eq "sha256"} {
+ set hashlength 64
+} else {
+ puts stderr "Unknown hash algorithm: $hashalgorithm"
+ exit 1
+}
+
# we expand the _gitdir when it's just a single dot (i.e. when we're being
# run from the .git dir itself) lest the routines to find the worktree
# get confused
@@ -1291,20 +1183,7 @@
load_config 0
apply_config
-# v1.7.0 introduced --show-toplevel to return the canonical work-tree
-if {[package vcompare $_git_version 1.7.0] >= 0} {
- set _gitworktree [git rev-parse --show-toplevel]
-} else {
- # try to set work tree from environment, core.worktree or use
- # cdup to obtain a relative path to the top of the worktree. If
- # run from the top, the ./ prefix ensures normalize expands pwd.
- if {[catch { set _gitworktree $env(GIT_WORK_TREE) }]} {
- set _gitworktree [get_config core.worktree]
- if {$_gitworktree eq ""} {
- set _gitworktree [file normalize ./[git rev-parse --show-cdup]]
- }
- }
-}
+set _gitworktree [git rev-parse --show-toplevel]
if {$_prefix ne {}} {
if {$_gitworktree eq {}} {
@@ -1368,8 +1247,8 @@
set last_revert {}
set last_revert_enc {}
-set nullid "0000000000000000000000000000000000000000"
-set nullid2 "0000000000000000000000000000000000000001"
+set nullid [string repeat 0 $hashlength]
+set nullid2 "[string repeat 0 [expr $hashlength - 1]]1"
######################################################################
##
@@ -1427,7 +1306,7 @@
set merge_head [gitdir MERGE_HEAD]
if {[file exists $merge_head]} {
set ct merge
- set fd_mh [open $merge_head r]
+ set fd_mh [safe_open_file $merge_head r]
while {[gets $fd_mh line] >= 0} {
lappend mh $line
}
@@ -1446,7 +1325,7 @@
return $p
}
if {$empty_tree eq {}} {
- set empty_tree [git mktree << {}]
+ set empty_tree [git_redir [list mktree] [list << {}]]
}
return $empty_tree
}
@@ -1505,12 +1384,12 @@
} else {
set rescan_active 1
ui_status [mc "Refreshing file status..."]
- set fd_rf [git_read update-index \
+ set fd_rf [git_read [list update-index \
-q \
--unmerged \
--ignore-missing \
--refresh \
- ]
+ ]]
fconfigure $fd_rf -blocking 0 -translation binary
fileevent $fd_rf readable \
[list rescan_stage2 $fd_rf $after]
@@ -1530,18 +1409,7 @@
close $fd
}
- if {[package vcompare $::_git_version 1.6.3] >= 0} {
- set ls_others [list --exclude-standard]
- } else {
- set ls_others [list --exclude-per-directory=.gitignore]
- if {[have_info_exclude]} {
- lappend ls_others "--exclude-from=[gitdir info exclude]"
- }
- set user_exclude [get_config core.excludesfile]
- if {$user_exclude ne {} && [file readable $user_exclude]} {
- lappend ls_others "--exclude-from=[file normalize $user_exclude]"
- }
- }
+ set ls_others [list --exclude-standard]
set buf_rdi {}
set buf_rdf {}
@@ -1549,22 +1417,18 @@
set rescan_active 2
ui_status [mc "Scanning for modified files ..."]
- if {[git-version >= "1.7.2"]} {
- set fd_di [git_read diff-index --cached --ignore-submodules=dirty -z [PARENT]]
- } else {
- set fd_di [git_read diff-index --cached -z [PARENT]]
- }
- set fd_df [git_read diff-files -z]
+ set fd_di [git_read [list diff-index --cached --ignore-submodules=dirty -z [PARENT]]]
+ set fd_df [git_read [list diff-files -z]]
- fconfigure $fd_di -blocking 0 -translation binary -encoding binary
- fconfigure $fd_df -blocking 0 -translation binary -encoding binary
+ fconfigure $fd_di -blocking 0 -translation binary
+ fconfigure $fd_df -blocking 0 -translation binary
fileevent $fd_di readable [list read_diff_index $fd_di $after]
fileevent $fd_df readable [list read_diff_files $fd_df $after]
if {[is_config_true gui.displayuntracked]} {
- set fd_lo [eval git_read ls-files --others -z $ls_others]
- fconfigure $fd_lo -blocking 0 -translation binary -encoding binary
+ set fd_lo [git_read [concat ls-files --others -z $ls_others]]
+ fconfigure $fd_lo -blocking 0 -translation binary
fileevent $fd_lo readable [list read_ls_others $fd_lo $after]
incr rescan_active
}
@@ -1575,10 +1439,9 @@
set f [gitdir $file]
if {[file isfile $f]} {
- if {[catch {set fd [open $f r]}]} {
+ if {[catch {set fd [safe_open_file $f r]}]} {
return 0
}
- fconfigure $fd -eofchar {}
if {$encoding ne {}} {
fconfigure $fd -encoding $encoding
}
@@ -1599,23 +1462,23 @@
# it will be .git/MERGE_MSG (merge), .git/SQUASH_MSG (squash), or an
# empty file but existent file.
- set fd_pcm [open [gitdir PREPARE_COMMIT_MSG] a]
+ set fd_pcm [safe_open_file [gitdir PREPARE_COMMIT_MSG] a]
if {[file isfile [gitdir MERGE_MSG]]} {
set pcm_source "merge"
- set fd_mm [open [gitdir MERGE_MSG] r]
+ set fd_mm [safe_open_file [gitdir MERGE_MSG] r]
fconfigure $fd_mm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_mm]
close $fd_mm
} elseif {[file isfile [gitdir SQUASH_MSG]]} {
set pcm_source "squash"
- set fd_sm [open [gitdir SQUASH_MSG] r]
+ set fd_sm [safe_open_file [gitdir SQUASH_MSG] r]
fconfigure $fd_sm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_sm]
close $fd_sm
} elseif {[file isfile [get_config commit.template]]} {
set pcm_source "template"
- set fd_sm [open [get_config commit.template] r]
+ set fd_sm [safe_open_file [get_config commit.template] r]
fconfigure $fd_sm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_sm]
close $fd_sm
@@ -1635,7 +1498,7 @@
ui_status [mc "Calling prepare-commit-msg hook..."]
set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fconfigure $fd_ph -blocking 0 -translation binary
fileevent $fd_ph readable \
[list prepare_commit_msg_hook_wait $fd_ph]
@@ -1681,7 +1544,7 @@
set i [split [string range $buf_rdi $c [expr {$z1 - 2}]] { }]
set p [string range $buf_rdi $z1 [expr {$z2 - 1}]]
merge_state \
- [encoding convertfrom utf-8 $p] \
+ [convertfrom utf-8 $p] \
[lindex $i 4]? \
[list [lindex $i 0] [lindex $i 2]] \
[list]
@@ -1714,7 +1577,7 @@
set i [split [string range $buf_rdf $c [expr {$z1 - 2}]] { }]
set p [string range $buf_rdf $z1 [expr {$z2 - 1}]]
merge_state \
- [encoding convertfrom utf-8 $p] \
+ [convertfrom utf-8 $p] \
?[lindex $i 4] \
[list] \
[list [lindex $i 0] [lindex $i 2]]
@@ -1737,7 +1600,7 @@
set pck [split $buf_rlo "\0"]
set buf_rlo [lindex $pck end]
foreach p [lrange $pck 0 end-1] {
- set p [encoding convertfrom utf-8 $p]
+ set p [convertfrom utf-8 $p]
if {[string index $p end] eq {/}} {
set p [string range $p 0 end-1]
}
@@ -1822,10 +1685,9 @@
}
set next_icon_id 0
-set null_sha1 [string repeat 0 40]
proc merge_state {path new_state {head_info {}} {index_info {}}} {
- global file_states next_icon_id null_sha1
+ global file_states next_icon_id nullid
set s0 [string index $new_state 0]
set s1 [string index $new_state 1]
@@ -1847,7 +1709,7 @@
elseif {$s1 eq {_}} {set s1 _}
if {$s0 eq {A} && $s1 eq {_} && $head_info eq {}} {
- set head_info [list 0 $null_sha1]
+ set head_info [list 0 $nullid]
} elseif {$s0 ne {_} && [string index $state 0] eq {_}
&& $head_info eq {}} {
set head_info $index_info
@@ -2205,7 +2067,7 @@
unset env(GIT_DIR)
unset env(GIT_WORK_TREE)
}
- eval exec $cmd $revs "--" "--" &
+ safe_exec_bg [concat $cmd $revs "--" "--"]
set env(GIT_DIR) $_gitdir
set env(GIT_WORK_TREE) $_gitworktree
@@ -2242,7 +2104,7 @@
set pwd [pwd]
cd $current_diff_path
- eval exec $exe gui &
+ safe_exec_bg [concat $exe gui]
set env(GIT_DIR) $_gitdir
set env(GIT_WORK_TREE) $_gitworktree
@@ -2273,16 +2135,18 @@
proc do_explore {} {
global _gitworktree
- set explorer [get_explorer]
- eval exec $explorer [list [file nativename $_gitworktree]] &
+ set cmd [get_explorer]
+ lappend cmd [file nativename $_gitworktree]
+ safe_exec_bg $cmd
}
# Open file relative to the working tree by the default associated app.
proc do_file_open {file} {
global _gitworktree
- set explorer [get_explorer]
+ set cmd [get_explorer]
set full_file_path [file join $_gitworktree $file]
- exec $explorer [file nativename $full_file_path] &
+ lappend cmd [file nativename $full_file_path]
+ safe_exec_bg $cmd
}
set is_quitting 0
@@ -2298,7 +2162,7 @@
global ui_comm is_quitting repo_config commit_type
global GITGUI_BCK_exists GITGUI_BCK_i
global ui_comm_spell
- global ret_code use_ttk
+ global ret_code
if {$is_quitting} return
set is_quitting 1
@@ -2316,7 +2180,7 @@
if {![string match amend* $commit_type]
&& $msg ne {}} {
catch {
- set fd [open $save w]
+ set fd [safe_open_file $save w]
fconfigure $fd -encoding utf-8
puts -nonewline $fd $msg
close $fd
@@ -2356,13 +2220,8 @@
}
set cfg_geometry [list]
lappend cfg_geometry [wm geometry .]
- if {$use_ttk} {
- lappend cfg_geometry [.vpane sashpos 0]
- lappend cfg_geometry [.vpane.files sashpos 0]
- } else {
- lappend cfg_geometry [lindex [.vpane sash coord 0] 0]
- lappend cfg_geometry [lindex [.vpane.files sash coord 0] 1]
- }
+ lappend cfg_geometry [.vpane sashpos 0]
+ lappend cfg_geometry [.vpane.files sashpos 0]
if {[catch {set rc_geometry $repo_config(gui.geometry)}]} {
set rc_geometry {}
}
@@ -2760,17 +2619,16 @@
if {[is_Windows]} {
# Use /git-bash.exe if available
- set normalized [file normalize $::argv0]
- regsub "/mingw../libexec/git-core/git-gui$" \
- $normalized "/git-bash.exe" cmdLine
- if {$cmdLine != $normalized && [file exists $cmdLine]} {
- set cmdLine [list "Git Bash" $cmdLine &]
+ set _git_bash [safe_exec [list cygpath -m /git-bash.exe]]
+ if {[file executable $_git_bash]} {
+ set _bash_cmdline [list "Git Bash" $_git_bash]
} else {
- set cmdLine [list "Git Bash" bash --login -l &]
+ set _bash_cmdline [list "Git Bash" bash --login -l]
}
.mbar.repository add command \
-label [mc "Git Bash"] \
- -command {eval exec [auto_execok start] $cmdLine}
+ -command {safe_exec_bg [concat [list [_which cmd] /c start] $_bash_cmdline]}
+ unset _git_bash
}
if {[is_Windows] || ![is_bare]} {
@@ -3179,7 +3037,7 @@
if {$head eq {}} {
load_current_branch
} else {
- if {[regexp {^[0-9a-f]{1,39}$} $head]} {
+ if {[regexp [string map "@@ [expr $hashlength - 1]" {^[0-9a-f]{1,@@}$}] $head]} {
if {[catch {
set head [git rev-parse --verify $head]
} err]} {
@@ -3245,13 +3103,12 @@
# -- Branch Control
#
-${NS}::frame .branch
-if {!$use_ttk} {.branch configure -borderwidth 1 -relief sunken}
-${NS}::label .branch.l1 \
+ttk::frame .branch
+ttk::label .branch.l1 \
-text [mc "Current Branch:"] \
-anchor w \
-justify left
-${NS}::label .branch.cb \
+ttk::label .branch.cb \
-textvariable current_branch \
-anchor w \
-justify left
@@ -3261,13 +3118,9 @@
# -- Main Window Layout
#
-${NS}::panedwindow .vpane -orient horizontal
-${NS}::panedwindow .vpane.files -orient vertical
-if {$use_ttk} {
- .vpane add .vpane.files
-} else {
- .vpane add .vpane.files -sticky nsew -height 100 -width 200
-}
+ttk::panedwindow .vpane -orient horizontal
+ttk::panedwindow .vpane.files -orient vertical
+.vpane add .vpane.files
pack .vpane -anchor n -side top -fill both -expand 1
# -- Working Directory File List
@@ -3284,8 +3137,8 @@
-xscrollcommand {.vpane.files.workdir.sx set} \
-yscrollcommand {.vpane.files.workdir.sy set} \
-state disabled
-${NS}::scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]
-${NS}::scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]
+ttk::scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]
+ttk::scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]
pack .vpane.files.workdir.title -side top -fill x
pack .vpane.files.workdir.sx -side bottom -fill x
pack .vpane.files.workdir.sy -side right -fill y
@@ -3306,8 +3159,8 @@
-xscrollcommand {.vpane.files.index.sx set} \
-yscrollcommand {.vpane.files.index.sy set} \
-state disabled
-${NS}::scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]
-${NS}::scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]
+ttk::scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]
+ttk::scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]
pack .vpane.files.index.title -side top -fill x
pack .vpane.files.index.sx -side bottom -fill x
pack .vpane.files.index.sy -side right -fill y
@@ -3317,10 +3170,6 @@
#
.vpane.files add .vpane.files.workdir
.vpane.files add .vpane.files.index
-if {!$use_ttk} {
- .vpane.files paneconfigure .vpane.files.workdir -sticky news
- .vpane.files paneconfigure .vpane.files.index -sticky news
-}
proc set_selection_colors {w has_focus} {
foreach tag [list in_diff in_sel] {
@@ -3341,78 +3190,63 @@
# -- Diff and Commit Area
#
-if {$have_tk85} {
- ${NS}::panedwindow .vpane.lower -orient vertical
- ${NS}::frame .vpane.lower.commarea
- ${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
- .vpane.lower add .vpane.lower.diff
- .vpane.lower add .vpane.lower.commarea
- .vpane add .vpane.lower
- if {$use_ttk} {
- .vpane.lower pane .vpane.lower.diff -weight 1
- .vpane.lower pane .vpane.lower.commarea -weight 0
- } else {
- .vpane.lower paneconfigure .vpane.lower.diff -stretch always
- .vpane.lower paneconfigure .vpane.lower.commarea -stretch never
- }
-} else {
- frame .vpane.lower -height 300 -width 400
- frame .vpane.lower.commarea
- frame .vpane.lower.diff -relief sunken -borderwidth 1
- pack .vpane.lower.diff -fill both -expand 1
- pack .vpane.lower.commarea -side bottom -fill x
- .vpane add .vpane.lower
- .vpane paneconfigure .vpane.lower -sticky nsew
-}
+ttk::panedwindow .vpane.lower -orient vertical
+ttk::frame .vpane.lower.commarea
+ttk::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
+.vpane.lower add .vpane.lower.diff
+.vpane.lower add .vpane.lower.commarea
+.vpane add .vpane.lower
+.vpane.lower pane .vpane.lower.diff -weight 1
+.vpane.lower pane .vpane.lower.commarea -weight 0
# -- Commit Area Buttons
#
-${NS}::frame .vpane.lower.commarea.buttons
-${NS}::label .vpane.lower.commarea.buttons.l -text {} \
+ttk::frame .vpane.lower.commarea.buttons
+ttk::label .vpane.lower.commarea.buttons.l -text {} \
-anchor w \
-justify left
pack .vpane.lower.commarea.buttons.l -side top -fill x
pack .vpane.lower.commarea.buttons -side left -fill y
-${NS}::button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \
+ttk::button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \
-command ui_do_rescan
pack .vpane.lower.commarea.buttons.rescan -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.rescan conf -state}
-${NS}::button .vpane.lower.commarea.buttons.incall -text [mc "Stage Changed"] \
+ttk::button .vpane.lower.commarea.buttons.incall -text [mc "Stage Changed"] \
-command do_add_all
pack .vpane.lower.commarea.buttons.incall -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.incall conf -state}
if {![is_enabled nocommitmsg]} {
- ${NS}::button .vpane.lower.commarea.buttons.signoff -text [mc "Sign Off"] \
+ ttk::button .vpane.lower.commarea.buttons.signoff -text [mc "Sign Off"] \
-command do_signoff
pack .vpane.lower.commarea.buttons.signoff -side top -fill x
}
-${NS}::button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \
+ttk::button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \
-command do_commit
pack .vpane.lower.commarea.buttons.commit -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.commit conf -state}
if {![is_enabled nocommit]} {
- ${NS}::button .vpane.lower.commarea.buttons.push -text [mc Push] \
+ ttk::button .vpane.lower.commarea.buttons.push -text [mc Push] \
-command do_push_anywhere
pack .vpane.lower.commarea.buttons.push -side top -fill x
}
# -- Commit Message Buffer
#
-${NS}::frame .vpane.lower.commarea.buffer
-${NS}::frame .vpane.lower.commarea.buffer.header
+ttk::frame .vpane.lower.commarea.buffer
+ttk::frame .vpane.lower.commarea.buffer.header
set ui_comm .vpane.lower.commarea.buffer.frame.t
set ui_coml .vpane.lower.commarea.buffer.header.l
if {![is_enabled nocommit]} {
- ${NS}::checkbutton .vpane.lower.commarea.buffer.header.amend \
+ ttk::checkbutton .vpane.lower.commarea.buffer.header.amend \
-text [mc "Amend Last Commit"] \
-variable commit_type_is_amend \
-command do_select_commit_type
@@ -3420,7 +3254,7 @@
[list .vpane.lower.commarea.buffer.header.amend conf -state]
}
-${NS}::label $ui_coml \
+ttk::label $ui_coml \
-anchor w \
-justify left
proc trace_commit_type {varname args} {
@@ -3455,10 +3289,10 @@
-font font_diff \
-xscrollcommand {.vpane.lower.commarea.buffer.frame.sbx set} \
-yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}
-${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sbx \
+ttk::scrollbar .vpane.lower.commarea.buffer.frame.sbx \
-orient horizontal \
-command [list $ui_comm xview]
-${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \
+ttk::scrollbar .vpane.lower.commarea.buffer.frame.sby \
-orient vertical \
-command [list $ui_comm yview]
@@ -3581,9 +3415,9 @@
-yscrollcommand {.vpane.lower.diff.body.sby set} \
-state disabled
catch {$ui_diff configure -tabstyle wordprocessor}
-${NS}::scrollbar .vpane.lower.diff.body.sbx -orient horizontal \
+ttk::scrollbar .vpane.lower.diff.body.sbx -orient horizontal \
-command [list $ui_diff xview]
-${NS}::scrollbar .vpane.lower.diff.body.sby -orient vertical \
+ttk::scrollbar .vpane.lower.diff.body.sby -orient vertical \
-command [list $ui_diff yview]
pack .vpane.lower.diff.body.sbx -side bottom -fill x
pack .vpane.lower.diff.body.sby -side right -fill y
@@ -3884,29 +3718,14 @@
bind $w <Map> {}
after 0 [list after idle [list $w sashpos $pane $pos]]
}
-proc on_tk_pane_mapped {w pane x y} {
- bind $w <Map> {}
- after 0 [list after idle [list $w sash place $pane $x $y]]
-}
proc on_application_mapped {} {
- global repo_config use_ttk
+ global repo_config
bind . <Map> {}
set gm $repo_config(gui.geometry)
- if {$use_ttk} {
- bind .vpane <Map> \
- [list on_ttk_pane_mapped %W 0 [lindex $gm 1]]
- bind .vpane.files <Map> \
- [list on_ttk_pane_mapped %W 0 [lindex $gm 2]]
- } else {
- bind .vpane <Map> \
- [list on_tk_pane_mapped %W 0 \
- [lindex $gm 1] \
- [lindex [.vpane sash coord 0] 1]]
- bind .vpane.files <Map> \
- [list on_tk_pane_mapped %W 0 \
- [lindex [.vpane.files sash coord 0] 0] \
- [lindex $gm 2]]
- }
+ bind .vpane <Map> \
+ [list on_ttk_pane_mapped %W 0 [lindex $gm 1]]
+ bind .vpane.files <Map> \
+ [list on_ttk_pane_mapped %W 0 [lindex $gm 2]]
wm geometry . [lindex $gm 0]
}
if {[info exists repo_config(gui.geometry)]} {
@@ -4079,7 +3898,7 @@
}
} elseif {$m} {
catch {
- set fd [open [gitdir GITGUI_BCK] w]
+ set fd [safe_open_file [gitdir GITGUI_BCK] w]
fconfigure $fd -encoding utf-8
puts -nonewline $fd $msg
close $fd
diff --git a/git-gui/lib/about.tcl b/git-gui/lib/about.tcl
index cfa50fc..122ebfb 100644
--- a/git-gui/lib/about.tcl
+++ b/git-gui/lib/about.tcl
@@ -4,19 +4,19 @@
proc do_about {} {
global appvers copyright oguilib
global tcl_patchLevel tk_patchLevel
- global ui_comm_spell NS use_ttk
+ global ui_comm_spell
set w .about_dialog
Dialog $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
pack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10
- ${NS}::label $w.header -text [mc "About %s" [appname]] \
+ ttk::label $w.header -text [mc "About %s" [appname]] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.close -text {Close} \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.close -text {Close} \
-default active \
-command [list destroy $w]
pack $w.buttons.close -side right
@@ -44,7 +44,7 @@
set d {}
append d "git wrapper: $::_git\n"
- append d "git exec dir: [gitexec]\n"
+ append d "git exec dir: [git --exec-path]\n"
append d "git-gui lib: $oguilib"
paddedlabel $w.vers -text $v
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 8441e10..4477b84 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -63,7 +63,7 @@
field tooltip_commit {} ; # Commit(s) in tooltip
constructor new {i_commit i_path i_jump} {
- global cursor_ptr M1B M1T have_tk85 use_ttk NS
+ global cursor_ptr M1B M1T
variable active_color
variable group_colors
@@ -203,18 +203,17 @@
-width 80 \
-xscrollcommand [list $w.file_pane.out.sbx set] \
-font font_diff
- if {$have_tk85} {
$w_file configure -inactiveselectbackground darkblue
- }
+
$w_file tag conf found \
-background yellow
set w_columns [list $w_amov $w_asim $w_line $w_file]
- ${NS}::scrollbar $w.file_pane.out.sbx \
+ ttk::scrollbar $w.file_pane.out.sbx \
-orient h \
-command [list $w_file xview]
- ${NS}::scrollbar $w.file_pane.out.sby \
+ ttk::scrollbar $w.file_pane.out.sby \
-orient v \
-command [list scrollbar2many $w_columns yview]
eval grid $w_columns $w.file_pane.out.sby -sticky nsew
@@ -264,10 +263,10 @@
-background $active_color \
-font font_ui
$w_cviewer tag raise sel
- ${NS}::scrollbar $w.file_pane.cm.sbx \
+ ttk::scrollbar $w.file_pane.cm.sbx \
-orient h \
-command [list $w_cviewer xview]
- ${NS}::scrollbar $w.file_pane.cm.sby \
+ ttk::scrollbar $w.file_pane.cm.sby \
-orient v \
-command [list $w_cviewer yview]
pack $w.file_pane.cm.sby -side right -fill y
@@ -426,6 +425,7 @@
method _load {jump} {
variable group_colors
+ global hashlength
_hide_tooltip $this
@@ -436,7 +436,7 @@
$i conf -state normal
$i delete 0.0 end
foreach g [$i tag names] {
- if {[regexp {^g[0-9a-f]{40}$} $g]} {
+ if {[regexp [string map "@@ $hashlength" {^g[0-9a-f]{@@}$}] $g]} {
$i tag delete $g
}
}
@@ -470,7 +470,7 @@
$w_path conf -text [escape_path $path]
set do_textconv 0
- if {![is_config_false gui.textconv] && [git-version >= 1.7.2]} {
+ if {![is_config_false gui.textconv]} {
set filter [gitattr $path diff set]
set textconv [get_config [join [list diff $filter textconv] .]]
if {$filter ne {set} && $textconv ne {}} {
@@ -481,25 +481,25 @@
if {$do_textconv ne 0} {
set fd [open_cmd_pipe $textconv $path]
} else {
- set fd [open $path r]
+ set fd [safe_open_file $path r]
}
- fconfigure $fd -eofchar {}
} else {
if {$do_textconv ne 0} {
- set fd [git_read cat-file --textconv "$commit:$path"]
+ set fd [git_read [list cat-file --textconv "$commit:$path"]]
} else {
- set fd [git_read cat-file blob "$commit:$path"]
+ set fd [git_read [list cat-file blob "$commit:$path"]]
}
}
fconfigure $fd \
-blocking 0 \
- -translation lf \
-encoding [get_path_encoding $path]
fileevent $fd readable [cb _read_file $fd $jump]
set current_fd $fd
}
method _history_menu {} {
+ global hashlength
+
set m $w.backmenu
if {[winfo exists $m]} {
$m delete 0 end
@@ -513,7 +513,7 @@
set c [lindex $e 0]
set f [lindex $e 1]
- if {[regexp {^[0-9a-f]{40}$} $c]} {
+ if {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $c]} {
set t [string range $c 0 8]...
} elseif {$c eq {}} {
set t {Working Directory}
@@ -617,8 +617,8 @@
}
lappend options -- $path
- set fd [eval git_read --nice blame $options]
- fconfigure $fd -blocking 0 -translation lf -encoding utf-8
+ set fd [git_read_nice [concat blame $options]]
+ fconfigure $fd -blocking 0 -encoding utf-8
fileevent $fd readable [cb _read_blame $fd $cur_w $cur_d]
set current_fd $fd
set blame_lines 0
@@ -627,6 +627,7 @@
method _read_blame {fd cur_w cur_d} {
upvar #0 $cur_d line_data
variable group_colors
+ global hashlength nullid
if {$fd ne $current_fd} {
catch {close $fd}
@@ -635,7 +636,7 @@
$cur_w conf -state normal
while {[gets $fd line] >= 0} {
- if {[regexp {^([a-z0-9]{40}) (\d+) (\d+) (\d+)$} $line line \
+ if {[regexp [string map "@@ $hashlength" {^([a-z0-9]{@@}) (\d+) (\d+) (\d+)$}] $line line \
cmit original_line final_line line_count]} {
set r_commit $cmit
set r_orig_line $original_line
@@ -648,7 +649,7 @@
set oln $r_orig_line
set cmit $r_commit
- if {[regexp {^0{40}$} $cmit]} {
+ if {$cmit eq $nullid} {
set commit_abbr work
set commit_type curr_commit
} elseif {$cmit eq $commit} {
@@ -807,9 +808,7 @@
# thorough copy search; insert before the threshold
set original_options [linsert $original_options 0 -C]
}
- if {[git-version >= 1.5.3]} {
- lappend original_options -w ; # ignore indentation changes
- }
+ lappend original_options -w ; # ignore indentation changes
_exec_blame $this $w_amov @amov_data \
$original_options \
@@ -857,9 +856,7 @@
set threshold [get_config gui.copyblamethreshold]
set original_options [list -C -C "-C$threshold"]
- if {[git-version >= 1.5.3]} {
- lappend original_options -w ; # ignore indentation changes
- }
+ lappend original_options -w ; # ignore indentation changes
# Find the line range
set pos @$::cursorX,$::cursorY
@@ -986,8 +983,8 @@
if {[catch {set msg $header($cmit,message)}]} {
set msg {}
catch {
- set fd [git_read cat-file commit $cmit]
- fconfigure $fd -encoding binary -translation lf
+ set fd [git_read [list cat-file commit $cmit]]
+ fconfigure $fd -encoding iso8859-1
# By default commits are assumed to be in utf-8
set enc utf-8
while {[gets $fd line] > 0} {
@@ -1000,7 +997,7 @@
set enc [tcl_encoding $enc]
if {$enc ne {}} {
- set msg [encoding convertfrom $enc $msg]
+ set msg [convertfrom $enc $msg]
}
set msg [string trim $msg]
}
@@ -1134,7 +1131,7 @@
} else {
set diffcmd [list diff-tree --unified=0 $cparent $cmit -- $new_path]
}
- if {[catch {set fd [eval git_read $diffcmd]} err]} {
+ if {[catch {set fd [git_read $diffcmd]} err]} {
$status_operation stop [mc "Unable to display parent"]
error_popup [strcat [mc "Error loading diff:"] "\n\n$err"]
return
@@ -1144,7 +1141,6 @@
fconfigure $fd \
-blocking 0 \
- -encoding binary \
-translation binary
fileevent $fd readable [cb _read_diff_load_commit \
$fd $cparent $new_path $r_orig_line]
@@ -1298,7 +1294,7 @@
# On MacOS raising a window causes it to acquire focus.
# Tk 8.5 on MacOS seems to properly support wm transient,
# so we can safely counter the effect there.
- if {$::have_tk85 && [is_MacOSX]} {
+ if {[is_MacOSX]} {
update
if {$w eq {}} {
raise .
diff --git a/git-gui/lib/branch.tcl b/git-gui/lib/branch.tcl
index 8b0c485..97c9ec1 100644
--- a/git-gui/lib/branch.tcl
+++ b/git-gui/lib/branch.tcl
@@ -7,8 +7,8 @@
set rh refs/heads
set rh_len [expr {[string length $rh] + 1}]
set all_heads [list]
- set fd [git_read for-each-ref --format=%(refname) $rh]
- fconfigure $fd -translation binary -encoding utf-8
+ set fd [git_read [list for-each-ref --format=%(refname) $rh]]
+ fconfigure $fd -encoding utf-8
while {[gets $fd line] > 0} {
if {!$some_heads_tracking || ![is_tracking_branch $line]} {
lappend all_heads [string range $line $rh_len end]
@@ -21,11 +21,11 @@
proc load_all_tags {} {
set all_tags [list]
- set fd [git_read for-each-ref \
+ set fd [git_read [list for-each-ref \
--sort=-taggerdate \
--format=%(refname) \
- refs/tags]
- fconfigure $fd -translation binary -encoding utf-8
+ refs/tags]]
+ fconfigure $fd -encoding utf-8
while {[gets $fd line] > 0} {
if {![regsub ^refs/tags/ $line {} name]} continue
lappend all_tags $name
diff --git a/git-gui/lib/branch_checkout.tcl b/git-gui/lib/branch_checkout.tcl
index d06037d..1e6b757 100644
--- a/git-gui/lib/branch_checkout.tcl
+++ b/git-gui/lib/branch_checkout.tcl
@@ -10,7 +10,6 @@
field opt_detach 0; # force a detached head case?
constructor dialog {} {
- global use_ttk NS
make_dialog top w
wm withdraw $w
wm title $top [mc "%s (%s): Checkout Branch" [appname] [reponame]]
@@ -18,16 +17,16 @@
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- ${NS}::label $w.header -text [mc "Checkout Branch"] \
+ ttk::label $w.header -text [mc "Checkout Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.create -text [mc Checkout] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.create -text [mc Checkout] \
-default active \
-command [cb _checkout]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
@@ -36,14 +35,14 @@
$w_rev bind_listbox <Double-Button-1> [cb _checkout]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
- ${NS}::labelframe $w.options -text [mc Options]
+ ttk::labelframe $w.options -text [mc Options]
- ${NS}::checkbutton $w.options.fetch \
+ ttk::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw
- ${NS}::checkbutton $w.options.detach \
+ ttk::checkbutton $w.options.detach \
-text [mc "Detach From Local Branch"] \
-variable @opt_detach
pack $w.options.detach -anchor nw
diff --git a/git-gui/lib/branch_create.tcl b/git-gui/lib/branch_create.tcl
index ba367d5..9fded28 100644
--- a/git-gui/lib/branch_create.tcl
+++ b/git-gui/lib/branch_create.tcl
@@ -16,7 +16,7 @@
field reset_ok 0; # did the user agree to reset?
constructor dialog {} {
- global repo_config use_ttk NS
+ global repo_config
make_dialog top w
wm withdraw $w
@@ -25,39 +25,37 @@
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- ${NS}::label $w.header -text [mc "Create New Branch"] \
+ ttk::label $w.header -text [mc "Create New Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.create -text [mc Create] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.create -text [mc Create] \
-default active \
-command [cb _create]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.desc -text [mc "Branch Name"]
- ${NS}::radiobutton $w.desc.name_r \
+ ttk::labelframe $w.desc -text [mc "Branch Name"]
+ ttk::radiobutton $w.desc.name_r \
-text [mc "Name:"] \
-value user \
-variable @name_type
- if {!$use_ttk} {$w.desc.name_r configure -anchor w}
set w_name $w.desc.name_t
- ${NS}::entry $w_name \
+ ttk::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate %d %S]
grid $w.desc.name_r $w_name -sticky we -padx {0 5}
- ${NS}::radiobutton $w.desc.match_r \
+ ttk::radiobutton $w.desc.match_r \
-text [mc "Match Tracking Branch Name"] \
-value match \
-variable @name_type
- if {!$use_ttk} {$w.desc.match_r configure -anchor w}
grid $w.desc.match_r -sticky we -padx {0 5} -columnspan 2
grid columnconfigure $w.desc 1 -weight 1
@@ -66,34 +64,34 @@
set w_rev [::choose_rev::new $w.rev [mc "Starting Revision"]]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
- ${NS}::labelframe $w.options -text [mc Options]
+ ttk::labelframe $w.options -text [mc Options]
- ${NS}::frame $w.options.merge
- ${NS}::label $w.options.merge.l -text [mc "Update Existing Branch:"]
+ ttk::frame $w.options.merge
+ ttk::label $w.options.merge.l -text [mc "Update Existing Branch:"]
pack $w.options.merge.l -side left
- ${NS}::radiobutton $w.options.merge.no \
+ ttk::radiobutton $w.options.merge.no \
-text [mc No] \
-value none \
-variable @opt_merge
pack $w.options.merge.no -side left
- ${NS}::radiobutton $w.options.merge.ff \
+ ttk::radiobutton $w.options.merge.ff \
-text [mc "Fast Forward Only"] \
-value ff \
-variable @opt_merge
pack $w.options.merge.ff -side left
- ${NS}::radiobutton $w.options.merge.reset \
+ ttk::radiobutton $w.options.merge.reset \
-text [mc Reset] \
-value reset \
-variable @opt_merge
pack $w.options.merge.reset -side left
pack $w.options.merge -anchor nw
- ${NS}::checkbutton $w.options.fetch \
+ ttk::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw
- ${NS}::checkbutton $w.options.checkout \
+ ttk::checkbutton $w.options.checkout \
-text [mc "Checkout After Creation"] \
-variable @opt_checkout
pack $w.options.checkout -anchor nw
diff --git a/git-gui/lib/branch_delete.tcl b/git-gui/lib/branch_delete.tcl
index a505163..deac74a 100644
--- a/git-gui/lib/branch_delete.tcl
+++ b/git-gui/lib/branch_delete.tcl
@@ -9,7 +9,7 @@
field w_delete ; # delete button
constructor dialog {} {
- global current_branch use_ttk NS
+ global current_branch
make_dialog top w
wm withdraw $w
@@ -18,25 +18,25 @@
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- ${NS}::label $w.header -text [mc "Delete Local Branch"] \
+ ttk::label $w.header -text [mc "Delete Local Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
+ ttk::frame $w.buttons
set w_delete $w.buttons.delete
- ${NS}::button $w_delete \
+ ttk::button $w_delete \
-text [mc Delete] \
-default active \
-state disabled \
-command [cb _delete]
pack $w_delete -side right
- ${NS}::button $w.buttons.cancel \
+ ttk::button $w.buttons.cancel \
-text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.list -text [mc "Local Branches"]
+ ttk::labelframe $w.list -text [mc "Local Branches"]
set w_heads $w.list.l
slistbox $w_heads \
-height 10 \
diff --git a/git-gui/lib/branch_rename.tcl b/git-gui/lib/branch_rename.tcl
index 3a2d79a..7a3b39d 100644
--- a/git-gui/lib/branch_rename.tcl
+++ b/git-gui/lib/branch_rename.tcl
@@ -8,7 +8,7 @@
field newname
constructor dialog {} {
- global current_branch use_ttk NS
+ global current_branch
make_dialog top w
wm withdraw $w
@@ -20,31 +20,27 @@
set oldname $current_branch
set newname [get_config gui.newbranchtemplate]
- ${NS}::label $w.header -text [mc "Rename Branch"]\
+ ttk::label $w.header -text [mc "Rename Branch"]\
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.rename -text [mc Rename] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.rename -text [mc Rename] \
-default active \
-command [cb _rename]
pack $w.buttons.rename -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::frame $w.rename
- ${NS}::label $w.rename.oldname_l -text [mc "Branch:"]
- if {$use_ttk} {
- ttk::combobox $w.rename.oldname_m -textvariable @oldname \
- -values [load_all_heads] -state readonly
- } else {
- eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]
- }
+ ttk::frame $w.rename
+ ttk::label $w.rename.oldname_l -text [mc "Branch:"]
+ ttk::combobox $w.rename.oldname_m -textvariable @oldname \
+ -values [load_all_heads] -state readonly
- ${NS}::label $w.rename.newname_l -text [mc "New Name:"]
- ${NS}::entry $w.rename.newname_t \
+ ttk::label $w.rename.newname_l -text [mc "New Name:"]
+ ttk::entry $w.rename.newname_t \
-width 40 \
-textvariable @newname \
-validate key \
diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
index a982983..fe72de0 100644
--- a/git-gui/lib/browser.tcl
+++ b/git-gui/lib/browser.tcl
@@ -21,7 +21,7 @@
field ls_buf {}; # Buffered record output from ls-tree
constructor new {commit {path {}}} {
- global cursor_ptr M1B use_ttk NS
+ global cursor_ptr M1B
make_dialog top w
wm withdraw $top
wm title $top [mc "%s (%s): File Browser" [appname] [reponame]]
@@ -35,15 +35,14 @@
set browser_commit $commit
set browser_path "$browser_commit:[escape_path $path]"
- ${NS}::label $w.path \
+ ttk::label $w.path \
-textvariable @browser_path \
-anchor w \
-justify left \
-font font_uibold
- if {!$use_ttk} { $w.path configure -borderwidth 1 -relief sunken}
pack $w.path -anchor w -side top -fill x
- ${NS}::frame $w.list
+ ttk::frame $w.list
set w_list $w.list.l
text $w_list -background white -foreground black \
-borderwidth 0 \
@@ -55,18 +54,17 @@
-xscrollcommand [list $w.list.sbx set] \
-yscrollcommand [list $w.list.sby set]
rmsel_tag $w_list
- ${NS}::scrollbar $w.list.sbx -orient h -command [list $w_list xview]
- ${NS}::scrollbar $w.list.sby -orient v -command [list $w_list yview]
+ ttk::scrollbar $w.list.sbx -orient h -command [list $w_list xview]
+ ttk::scrollbar $w.list.sby -orient v -command [list $w_list yview]
pack $w.list.sbx -side bottom -fill x
pack $w.list.sby -side right -fill y
pack $w_list -side left -fill both -expand 1
pack $w.list -side top -fill both -expand 1
- ${NS}::label $w.status \
+ ttk::label $w.status \
-textvariable @browser_status \
-anchor w \
-justify left
- if {!$use_ttk} { $w.status configure -borderwidth 1 -relief sunken}
pack $w.status -anchor w -side bottom -fill x
bind $w_list <Button-1> "[cb _click 0 @%x,%y];break"
@@ -196,8 +194,8 @@
lappend browser_stack [list $tree_id $name]
$w conf -state disabled
- set fd [git_read ls-tree -z $tree_id]
- fconfigure $fd -blocking 0 -translation binary -encoding utf-8
+ set fd [git_read [list ls-tree -z $tree_id]]
+ fconfigure $fd -blocking 0 -encoding utf-8
fileevent $fd readable [cb _read $fd]
}
@@ -269,7 +267,6 @@
field w_rev ; # mega-widget to pick the initial revision
constructor dialog {} {
- global use_ttk NS
make_dialog top w
wm withdraw $top
wm title $top [mc "%s (%s): Browse Branch Files" [appname] [reponame]]
@@ -278,18 +275,18 @@
wm transient $top .
}
- ${NS}::label $w.header \
+ ttk::label $w.header \
-text [mc "Browse Branch Files"] \
-font font_uibold \
-anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.browse -text [mc Browse] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.browse -text [mc Browse] \
-default active \
-command [cb _open]
pack $w.buttons.browse -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
diff --git a/git-gui/lib/checkout_op.tcl b/git-gui/lib/checkout_op.tcl
index 21ea768..449e89e 100644
--- a/git-gui/lib/checkout_op.tcl
+++ b/git-gui/lib/checkout_op.tcl
@@ -151,7 +151,7 @@
}
method _update_ref {} {
- global null_sha1 current_branch repo_config
+ global nullid current_branch repo_config
set ref $new_ref
set new $new_hash
@@ -177,7 +177,7 @@
}
set reflog_msg "branch: Created from $new_expr"
- set cur $null_sha1
+ set cur $nullid
if {($repo_config(branch.autosetupmerge) eq {true}
|| $repo_config(branch.autosetupmerge) eq {always})
@@ -304,12 +304,12 @@
_readtree $this
} else {
ui_status [mc "Refreshing file status..."]
- set fd [git_read update-index \
+ set fd [git_read [list update-index \
-q \
--unmerged \
--ignore-missing \
--refresh \
- ]
+ ]]
fconfigure $fd -blocking 0 -translation binary
fileevent $fd readable [cb _refresh_wait $fd]
}
@@ -345,14 +345,15 @@
[mc "Updating working directory to '%s'..." [_name $this]] \
[mc "files checked out"]]
- set fd [git_read --stderr read-tree \
+ set fd [git_read [list read-tree \
-m \
-u \
-v \
--exclude-per-directory=.gitignore \
$HEAD \
$new_hash \
- ]
+ ] \
+ [list 2>@1]]
fconfigure $fd -blocking 0 -translation binary
fileevent $fd readable [cb _readtree_wait $fd $status_bar_operation]
}
@@ -461,7 +462,7 @@
if {$fd_ph ne {}} {
global pch_error
set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fconfigure $fd_ph -blocking 0 -translation binary
fileevent $fd_ph readable [cb _postcheckout_wait $fd_ph]
} else {
_update_repo_state $this
@@ -510,18 +511,8 @@
delete_this
}
-git-version proc _detach_HEAD {log new} {
- >= 1.5.3 {
- git update-ref --no-deref -m $log HEAD $new
- }
- default {
- set p [gitdir HEAD]
- file delete $p
- set fd [open $p w]
- fconfigure $fd -translation lf -encoding utf-8
- puts $fd $new
- close $fd
- }
+proc _detach_HEAD {log new} {
+ git update-ref --no-deref -m $log HEAD $new
}
method _confirm_reset {cur} {
@@ -582,7 +573,7 @@
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- set fd [git_read rev-list --pretty=oneline $cur ^$new_hash]
+ set fd [git_read [list rev-list --pretty=oneline $cur ^$new_hash]]
while {[gets $fd line] > 0} {
set abbr [string range $line 0 7]
set subj [string range $line 41 end]
diff --git a/git-gui/lib/choose_font.tcl b/git-gui/lib/choose_font.tcl
index ebe50bd..a90908a 100644
--- a/git-gui/lib/choose_font.tcl
+++ b/git-gui/lib/choose_font.tcl
@@ -17,7 +17,6 @@
constructor pick {path title a_family a_size} {
variable all_families
- global use_ttk NS
set v_family $a_family
set v_size $a_size
@@ -33,25 +32,25 @@
wm title $top "[appname] ([reponame]): $title"
wm geometry $top "+[winfo rootx $path]+[winfo rooty $path]"
- ${NS}::label $w.header -text $title -font font_uibold -anchor center
+ ttk::label $w.header -text $title -font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.select \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.select \
-text [mc Select] \
-default active \
-command [cb _select]
- ${NS}::button $w.buttons.cancel \
+ ttk::button $w.buttons.cancel \
-text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.select -side right
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::frame $w.inner
+ ttk::frame $w.inner
- ${NS}::frame $w.inner.family
- ${NS}::label $w.inner.family.l \
+ ttk::frame $w.inner.family
+ ttk::label $w.inner.family.l \
-text [mc "Font Family"] \
-anchor w
set w_family $w.inner.family.v
@@ -66,13 +65,13 @@
-height 10 \
-yscrollcommand [list $w.inner.family.sby set]
rmsel_tag $w_family
- ${NS}::scrollbar $w.inner.family.sby -command [list $w_family yview]
+ ttk::scrollbar $w.inner.family.sby -command [list $w_family yview]
pack $w.inner.family.l -side top -fill x
pack $w.inner.family.sby -side right -fill y
pack $w_family -fill both -expand 1
- ${NS}::frame $w.inner.size
- ${NS}::label $w.inner.size.l \
+ ttk::frame $w.inner.size
+ ttk::label $w.inner.size.l \
-text [mc "Font Size"] \
-anchor w
tspinbox $w.inner.size.v \
@@ -88,8 +87,8 @@
grid columnconfigure $w.inner 0 -weight 1
pack $w.inner -fill both -expand 1 -padx 5 -pady 5
- ${NS}::frame $w.example
- ${NS}::label $w.example.l \
+ ttk::frame $w.example
+ ttk::label $w.example.l \
-text [mc "Font Example"] \
-anchor w
set w_example $w.example.t
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index d23abed..7e1462a 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -10,22 +10,12 @@
field w_quit ; # Quit button
field o_cons ; # Console object (if active)
-# Status mega-widget instance during _do_clone2 (used by _copy_files and
-# _link_files). Widget is destroyed before _do_clone2 calls
-# _do_clone_checkout
-field o_status
-
-# Operation displayed by status mega-widget during _do_clone_checkout =>
-# _readtree_wait => _postcheckout_wait => _do_clone_submodules =>
-# _do_validate_submodule_cloning. The status mega-widget is a different
-# instance than that stored in $o_status in earlier operations.
-field o_status_op
-
field w_types ; # List of type buttons in clone
field w_recentlist ; # Listbox containing recent repositories
field w_localpath ; # Entry widget bound to local_path
field done 0 ; # Finished picking the repository?
+field clone_ok false ; # clone succeeeded
field local_path {} ; # Where this repository is locally
field origin_url {} ; # Where we are cloning from
field origin_name origin ; # What we shall call 'origin'
@@ -35,7 +25,7 @@
field sorted_recent ; # recent repositories (sorted)
constructor pick {} {
- global M1T M1B use_ttk NS
+ global M1T M1B
if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} {
set maxrecent 10
@@ -88,7 +78,7 @@
set w_body $w.body
set opts $w_body.options
- ${NS}::frame $w_body
+ ttk::frame $w_body
text $opts \
-cursor $::cursor_ptr \
-relief flat \
@@ -158,8 +148,8 @@
set lenrecent $maxrecent
}
- ${NS}::label $w_body.space
- ${NS}::label $w_body.recentlabel \
+ ttk::label $w_body.space
+ ttk::label $w_body.recentlabel \
-anchor w \
-text [mc "Open Recent Repository:"]
set w_recentlist $w_body.recentlist
@@ -199,10 +189,10 @@
}
pack $w_body -fill x -padx 10 -pady 10
- ${NS}::frame $w.buttons
+ ttk::frame $w.buttons
set w_next $w.buttons.next
set w_quit $w.buttons.quit
- ${NS}::button $w_quit \
+ ttk::button $w_quit \
-text [mc "Quit"] \
-command exit
pack $w_quit -side right -padx 5
@@ -303,10 +293,9 @@
}
method _next {action} {
- global NS
destroy $w_body
if {![winfo exists $w_next]} {
- ${NS}::button $w_next -default active
+ ttk::button $w_next -default active
set pos -before
if {[tk windowingsystem] eq "win32"} { set pos -after }
pack $w_next -side right -padx 5 $pos $w_quit
@@ -323,7 +312,7 @@
}
method _git_init {} {
- if {[catch {file mkdir $local_path} err]} {
+ if {[catch {git init $local_path} err]} {
error_popup [strcat \
[mc "Failed to create repository %s:" $local_path] \
"\n\n$err"]
@@ -337,13 +326,6 @@
return 0
}
- if {[catch {git init} err]} {
- error_popup [strcat \
- [mc "Failed to create repository %s:" $local_path] \
- "\n\n$err"]
- return 0
- }
-
_append_recentrepos [pwd]
set ::_gitdir .git
set ::_prefix {}
@@ -360,44 +342,29 @@
return 1
}
-proc _objdir {path} {
- set objdir [file join $path .git objects]
- if {[file isdirectory $objdir]} {
- return $objdir
- }
-
- set objdir [file join $path objects]
- if {[file isdirectory $objdir]} {
- return $objdir
- }
-
- return {}
-}
-
######################################################################
##
## Create New Repository
method _do_new {} {
- global use_ttk NS
$w_next conf \
-state disabled \
-command [cb _do_new2] \
-text [mc "Create"]
- ${NS}::frame $w_body
- ${NS}::label $w_body.h \
+ ttk::frame $w_body
+ ttk::label $w_body.h \
-font font_uibold -anchor center \
-text [mc "Create New Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
- ${NS}::frame $w_body.where
- ${NS}::label $w_body.where.l -text [mc "Directory:"]
- ${NS}::entry $w_body.where.t \
+ ttk::frame $w_body.where
+ ttk::label $w_body.where.l -text [mc "Directory:"]
+ ttk::entry $w_body.where.t \
-textvariable @local_path \
-width 50
- ${NS}::button $w_body.where.b \
+ ttk::button $w_body.where.b \
-text [mc "Browse"] \
-command [cb _new_local_path]
set w_localpath $w_body.where.t
@@ -463,56 +430,55 @@
## Clone Existing Repository
method _do_clone {} {
- global use_ttk NS
$w_next conf \
-state disabled \
-command [cb _do_clone2] \
-text [mc "Clone"]
- ${NS}::frame $w_body
- ${NS}::label $w_body.h \
+ ttk::frame $w_body
+ ttk::label $w_body.h \
-font font_uibold -anchor center \
-text [mc "Clone Existing Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
set args $w_body.args
- ${NS}::frame $w_body.args
+ ttk::frame $w_body.args
pack $args -fill both
- ${NS}::label $args.origin_l -text [mc "Source Location:"]
- ${NS}::entry $args.origin_t \
+ ttk::label $args.origin_l -text [mc "Source Location:"]
+ ttk::entry $args.origin_t \
-textvariable @origin_url \
-width 50
- ${NS}::button $args.origin_b \
+ ttk::button $args.origin_b \
-text [mc "Browse"] \
-command [cb _open_origin]
grid $args.origin_l $args.origin_t $args.origin_b -sticky ew
- ${NS}::label $args.where_l -text [mc "Target Directory:"]
- ${NS}::entry $args.where_t \
+ ttk::label $args.where_l -text [mc "Target Directory:"]
+ ttk::entry $args.where_t \
-textvariable @local_path \
-width 50
- ${NS}::button $args.where_b \
+ ttk::button $args.where_b \
-text [mc "Browse"] \
-command [cb _new_local_path]
grid $args.where_l $args.where_t $args.where_b -sticky ew
set w_localpath $args.where_t
- ${NS}::label $args.type_l -text [mc "Clone Type:"]
- ${NS}::frame $args.type_f
+ ttk::label $args.type_l -text [mc "Clone Type:"]
+ ttk::frame $args.type_f
set w_types [list]
- lappend w_types [${NS}::radiobutton $args.type_f.hardlink \
+ lappend w_types [ttk::radiobutton $args.type_f.hardlink \
-state disabled \
-text [mc "Standard (Fast, Semi-Redundant, Hardlinks)"] \
-variable @clone_type \
-value hardlink]
- lappend w_types [${NS}::radiobutton $args.type_f.full \
+ lappend w_types [ttk::radiobutton $args.type_f.full \
-state disabled \
-text [mc "Full Copy (Slower, Redundant Backup)"] \
-variable @clone_type \
-value full]
- lappend w_types [${NS}::radiobutton $args.type_f.shared \
+ lappend w_types [ttk::radiobutton $args.type_f.shared \
-state disabled \
-text [mc "Shared (Fastest, Not Recommended, No Backup)"] \
-variable @clone_type \
@@ -520,7 +486,7 @@
foreach r $w_types {
pack $r -anchor w
}
- ${NS}::checkbutton $args.type_f.recursive \
+ ttk::checkbutton $args.type_f.recursive \
-text [mc "Recursively clone submodules too"] \
-variable @recursive \
-onvalue true -offvalue false
@@ -588,6 +554,25 @@
method _do_clone2 {} {
if {[file isdirectory $origin_url]} {
set origin_url [file normalize $origin_url]
+ if {$clone_type eq {hardlink}} {
+ # cannot use hardlinks if this is a linked worktree (.gitfile or git-new-workdir)
+ if {[git -C $origin_url rev-parse --is-inside-work-tree] == {true}} {
+ set islink 0
+ set dotgit [file join $origin_url .git]
+ if {[file isfile $dotgit]} {
+ set islink 1
+ } else {
+ set objdir [file join $dotgit objects]
+ if {[file exists $objdir] && [file type $objdir] == {link}} {
+ set islink 1
+ }
+ }
+ if {$islink} {
+ info_popup [mc "Hardlinks are unavailable. Falling back to copying."]
+ set clone_type full
+ }
+ }
+ }
}
if {$clone_type eq {hardlink} && ![file isdirectory $origin_url]} {
@@ -599,14 +584,6 @@
return
}
- if {$clone_type eq {hardlink} || $clone_type eq {shared}} {
- set objdir [_objdir $origin_url]
- if {$objdir eq {}} {
- error_popup [mc "Not a Git repository: %s" [file tail $origin_url]]
- return
- }
- }
-
set giturl $origin_url
if {[file exists $local_path]} {
@@ -614,458 +591,86 @@
return
}
- if {![_git_init $this]} return
- set local_path [pwd]
-
- if {[catch {
- git config remote.$origin_name.url $giturl
- git config remote.$origin_name.fetch +refs/heads/*:refs/remotes/$origin_name/*
- } err]} {
- error_popup [strcat [mc "Failed to configure origin"] "\n\n$err"]
- return
+ set clone_options {--progress}
+ if {$recursive} {
+ append clone_options { --recurse-submodules}
}
destroy $w_body $w_next
switch -exact -- $clone_type {
- hardlink {
- set o_status [status_bar::two_line $w_body]
- pack $w_body -fill x -padx 10 -pady 10
-
- set status_op [$o_status start \
- [mc "Counting objects"] \
- [mc "buckets"]]
- update
-
- if {[file exists [file join $objdir info alternates]]} {
- set pwd [pwd]
- if {[catch {
- file mkdir [gitdir objects info]
- set f_in [open [file join $objdir info alternates] r]
- set f_cp [open [gitdir objects info alternates] w]
- fconfigure $f_in -translation binary -encoding binary
- fconfigure $f_cp -translation binary -encoding binary
- cd $objdir
- while {[gets $f_in line] >= 0} {
- puts $f_cp [file normalize $line]
- }
- close $f_in
- close $f_cp
- cd $pwd
- } err]} {
- catch {cd $pwd}
- _clone_failed $this [mc "Unable to copy objects/info/alternates: %s" $err]
- $status_op stop
- return
- }
+ full {
+ append clone_options { --no-hardlinks --no-local}
}
-
- set tolink [list]
- set buckets [glob \
- -tails \
- -nocomplain \
- -directory [file join $objdir] ??]
- set bcnt [expr {[llength $buckets] + 2}]
- set bcur 1
- $status_op update $bcur $bcnt
- update
-
- file mkdir [file join .git objects pack]
- foreach i [glob -tails -nocomplain \
- -directory [file join $objdir pack] *] {
- lappend tolink [file join pack $i]
+ shared {
+ append clone_options { --shared}
}
- $status_op update [incr bcur] $bcnt
- update
-
- foreach i $buckets {
- file mkdir [file join .git objects $i]
- foreach j [glob -tails -nocomplain \
- -directory [file join $objdir $i] *] {
- lappend tolink [file join $i $j]
- }
- $status_op update [incr bcur] $bcnt
- update
- }
- $status_op stop
-
- if {$tolink eq {}} {
- info_popup [strcat \
- [mc "Nothing to clone from %s." $origin_url] \
- "\n" \
- [mc "The 'master' branch has not been initialized."] \
- ]
- destroy $w_body
- set done 1
- return
- }
-
- set i [lindex $tolink 0]
- if {[catch {
- file link -hard \
- [file join .git objects $i] \
- [file join $objdir $i]
- } err]} {
- info_popup [mc "Hardlinks are unavailable. Falling back to copying."]
- set i [_copy_files $this $objdir $tolink]
- } else {
- set i [_link_files $this $objdir [lrange $tolink 1 end]]
- }
- if {!$i} return
-
- destroy $w_body
-
- set o_status {}
}
- full {
+
+ if {[catch {
set o_cons [console::embed \
$w_body \
[mc "Cloning from %s" $origin_url]]
pack $w_body -fill both -expand 1 -padx 10
$o_cons exec \
- [list git fetch --no-tags -k $origin_name] \
- [cb _do_clone_tags]
- }
- shared {
- set fd [open [gitdir objects info alternates] w]
- fconfigure $fd -translation binary
- puts $fd $objdir
- close $fd
- }
+ [list git clone {*}$clone_options $origin_url $local_path] \
+ [cb _do_clone2_done]
+ } err]} {
+ error_popup [strcat [mc "Clone failed."] "\n" $err]
+ return
}
- if {$clone_type eq {hardlink} || $clone_type eq {shared}} {
- if {![_clone_refs $this]} return
- set pwd [pwd]
- if {[catch {
- cd $origin_url
- set HEAD [git rev-parse --verify HEAD^0]
- } err]} {
- _clone_failed $this [mc "Not a Git repository: %s" [file tail $origin_url]]
- return 0
- }
- cd $pwd
- _do_clone_checkout $this $HEAD
+ tkwait variable @done
+ if {!$clone_ok} {
+ error_popup [mc "Clone failed."]
+ return
}
}
-method _copy_files {objdir tocopy} {
- set status_op [$o_status start \
- [mc "Copying objects"] \
- [mc "KiB"]]
- set tot 0
- set cmp 0
- foreach p $tocopy {
- incr tot [file size [file join $objdir $p]]
- }
- foreach p $tocopy {
- if {[catch {
- set f_in [open [file join $objdir $p] r]
- set f_cp [open [file join .git objects $p] w]
- fconfigure $f_in -translation binary -encoding binary
- fconfigure $f_cp -translation binary -encoding binary
-
- while {![eof $f_in]} {
- incr cmp [fcopy $f_in $f_cp -size 16384]
- $status_op update \
- [expr {$cmp / 1024}] \
- [expr {$tot / 1024}]
- update
- }
-
- close $f_in
- close $f_cp
- } err]} {
- _clone_failed $this [mc "Unable to copy object: %s" $err]
- $status_op stop
- return 0
- }
- }
- $status_op stop
- return 1
-}
-
-method _link_files {objdir tolink} {
- set total [llength $tolink]
- set status_op [$o_status start \
- [mc "Linking objects"] \
- [mc "objects"]]
- for {set i 0} {$i < $total} {} {
- set p [lindex $tolink $i]
- if {[catch {
- file link -hard \
- [file join .git objects $p] \
- [file join $objdir $p]
- } err]} {
- _clone_failed $this [mc "Unable to hardlink object: %s" $err]
- $status_op stop
- return 0
- }
-
- incr i
- if {$i % 5 == 0} {
- $status_op update $i $total
- update
- }
- }
- $status_op stop
- return 1
-}
-
-method _clone_refs {} {
- set pwd [pwd]
- if {[catch {cd $origin_url} err]} {
- error_popup [mc "Not a Git repository: %s" [file tail $origin_url]]
- return 0
- }
- set fd_in [git_read for-each-ref \
- --tcl \
- {--format=list %(refname) %(objectname) %(*objectname)}]
- cd $pwd
-
- set fd [open [gitdir packed-refs] w]
- fconfigure $fd -translation binary
- puts $fd "# pack-refs with: peeled"
- while {[gets $fd_in line] >= 0} {
- set line [eval $line]
- set refn [lindex $line 0]
- set robj [lindex $line 1]
- set tobj [lindex $line 2]
-
- if {[regsub ^refs/heads/ $refn \
- "refs/remotes/$origin_name/" refn]} {
- puts $fd "$robj $refn"
- } elseif {[string match refs/tags/* $refn]} {
- puts $fd "$robj $refn"
- if {$tobj ne {}} {
- puts $fd "^$tobj"
- }
- }
- }
- close $fd_in
- close $fd
- return 1
-}
-
-method _do_clone_tags {ok} {
- if {$ok} {
- $o_cons exec \
- [list git fetch --tags -k $origin_name] \
- [cb _do_clone_HEAD]
- } else {
- $o_cons done $ok
- _clone_failed $this [mc "Cannot fetch branches and objects. See console output for details."]
- }
-}
-
-method _do_clone_HEAD {ok} {
- if {$ok} {
- $o_cons exec \
- [list git fetch $origin_name HEAD] \
- [cb _do_clone_full_end]
- } else {
- $o_cons done $ok
- _clone_failed $this [mc "Cannot fetch tags. See console output for details."]
- }
-}
-
-method _do_clone_full_end {ok} {
+method _do_clone2_done {ok} {
$o_cons done $ok
-
if {$ok} {
- destroy $w_body
-
- set HEAD {}
- if {[file exists [gitdir FETCH_HEAD]]} {
- set fd [open [gitdir FETCH_HEAD] r]
- while {[gets $fd line] >= 0} {
- if {[regexp "^(.{40})\t\t" $line line HEAD]} {
- break
- }
- }
- close $fd
- }
-
- catch {git pack-refs}
- _do_clone_checkout $this $HEAD
- } else {
- _clone_failed $this [mc "Cannot determine HEAD. See console output for details."]
- }
-}
-
-method _clone_failed {{why {}}} {
- if {[catch {file delete -force $local_path} err]} {
- set why [strcat \
- $why \
- "\n\n" \
- [mc "Unable to cleanup %s" $local_path] \
- "\n\n" \
- $err]
- }
- if {$why ne {}} {
- update
- error_popup [strcat [mc "Clone failed."] "\n" $why]
- }
-}
-
-method _do_clone_checkout {HEAD} {
- if {$HEAD eq {}} {
- info_popup [strcat \
- [mc "No default branch obtained."] \
- "\n" \
- [mc "The 'master' branch has not been initialized."] \
- ]
- set done 1
- return
- }
- if {[catch {
- git update-ref HEAD $HEAD^0
+ if {[catch {
+ cd $local_path
+ set ::_gitdir .git
+ set ::_prefix {}
+ _append_recentrepos [pwd]
} err]} {
- info_popup [strcat \
- [mc "Cannot resolve %s as a commit." $HEAD^0] \
- "\n $err" \
- "\n" \
- [mc "The 'master' branch has not been initialized."] \
- ]
- set done 1
- return
- }
-
- set status [status_bar::two_line $w_body]
- pack $w_body -fill x -padx 10 -pady 10
-
- # We start the status operation here.
- #
- # This function calls _readtree_wait as a callback.
- #
- # _readtree_wait in turn either calls _do_clone_submodules directly,
- # or calls _postcheckout_wait as a callback which then calls
- # _do_clone_submodules.
- #
- # _do_clone_submodules calls _do_validate_submodule_cloning.
- #
- # _do_validate_submodule_cloning stops the status operation.
- #
- # There are no other calls into this chain from other code.
-
- set o_status_op [$status start \
- [mc "Creating working directory"] \
- [mc "files"]]
-
- set readtree_err {}
- set fd [git_read --stderr read-tree \
- -m \
- -u \
- -v \
- HEAD \
- HEAD \
- ]
- fconfigure $fd -blocking 0 -translation binary
- fileevent $fd readable [cb _readtree_wait $fd]
-}
-
-method _readtree_wait {fd} {
- set buf [read $fd]
- $o_status_op update_meter $buf
- append readtree_err $buf
-
- fconfigure $fd -blocking 1
- if {![eof $fd]} {
- fconfigure $fd -blocking 0
- return
- }
-
- if {[catch {close $fd}]} {
- set err $readtree_err
- regsub {^fatal: } $err {} err
- error_popup [strcat \
- [mc "Initial file checkout failed."] \
- "\n\n$err"]
- return
- }
-
- # -- Run the post-checkout hook.
- #
- set fd_ph [githook_read post-checkout [string repeat 0 40] \
- [git rev-parse HEAD] 1]
- if {$fd_ph ne {}} {
- global pch_error
- set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
- fileevent $fd_ph readable [cb _postcheckout_wait $fd_ph]
- } else {
- _do_clone_submodules $this
- }
-}
-
-method _postcheckout_wait {fd_ph} {
- global pch_error
-
- append pch_error [read $fd_ph]
- fconfigure $fd_ph -blocking 1
- if {[eof $fd_ph]} {
- if {[catch {close $fd_ph}]} {
- hook_failed_popup post-checkout $pch_error 0
+ set ok 0
}
- unset pch_error
- _do_clone_submodules $this
- return
}
- fconfigure $fd_ph -blocking 0
+ if {!$ok} {
+ set ::_gitdir {}
+ set ::_prefix {}
+ }
+ set clone_ok $ok
+ set done 1
}
-method _do_clone_submodules {} {
- if {$recursive eq {true}} {
- $o_status_op stop
- set o_status_op {}
-
- destroy $w_body
-
- set o_cons [console::embed \
- $w_body \
- [mc "Cloning submodules"]]
- pack $w_body -fill both -expand 1 -padx 10
- $o_cons exec \
- [list git submodule update --init --recursive] \
- [cb _do_validate_submodule_cloning]
- } else {
- set done 1
- }
-}
-
-method _do_validate_submodule_cloning {ok} {
- if {$ok} {
- $o_cons done $ok
- set done 1
- } else {
- _clone_failed $this [mc "Cannot clone submodules."]
- }
-}
######################################################################
##
## Open Existing Repository
method _do_open {} {
- global NS
$w_next conf \
-state disabled \
-command [cb _do_open2] \
-text [mc "Open"]
- ${NS}::frame $w_body
- ${NS}::label $w_body.h \
+ ttk::frame $w_body
+ ttk::label $w_body.h \
-font font_uibold -anchor center \
-text [mc "Open Existing Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
- ${NS}::frame $w_body.where
- ${NS}::label $w_body.where.l -text [mc "Repository:"]
- ${NS}::entry $w_body.where.t \
+ ttk::frame $w_body.where
+ ttk::label $w_body.where.l -text [mc "Repository:"]
+ ttk::entry $w_body.where.t \
-textvariable @local_path \
-width 50
- ${NS}::button $w_body.where.b \
+ ttk::button $w_body.where.b \
-text [mc "Browse"] \
-command [cb _open_local_path]
diff --git a/git-gui/lib/choose_rev.tcl b/git-gui/lib/choose_rev.tcl
index 6dae793..cd355cc 100644
--- a/git-gui/lib/choose_rev.tcl
+++ b/git-gui/lib/choose_rev.tcl
@@ -32,7 +32,7 @@
}
constructor _new {path unmerged_only title} {
- global current_branch is_detached use_ttk NS
+ global current_branch is_detached
if {![info exists ::all_remotes]} {
load_all_remotes
@@ -41,65 +41,60 @@
set w $path
if {$title ne {}} {
- ${NS}::labelframe $w -text $title
+ ttk::labelframe $w -text $title
} else {
- ${NS}::frame $w
+ ttk::frame $w
}
bind $w <Destroy> [cb _delete %W]
if {$is_detached} {
- ${NS}::radiobutton $w.detachedhead_r \
+ ttk::radiobutton $w.detachedhead_r \
-text [mc "This Detached Checkout"] \
-value HEAD \
-variable @revtype
- if {!$use_ttk} {$w.detachedhead_r configure -anchor w}
grid $w.detachedhead_r -sticky we -padx {0 5} -columnspan 2
}
- ${NS}::radiobutton $w.expr_r \
+ ttk::radiobutton $w.expr_r \
-text [mc "Revision Expression:"] \
-value expr \
-variable @revtype
- ${NS}::entry $w.expr_t \
+ ttk::entry $w.expr_t \
-width 50 \
-textvariable @c_expr \
-validate key \
-validatecommand [cb _validate %d %S]
grid $w.expr_r $w.expr_t -sticky we -padx {0 5}
- ${NS}::frame $w.types
- ${NS}::radiobutton $w.types.head_r \
+ ttk::frame $w.types
+ ttk::radiobutton $w.types.head_r \
-text [mc "Local Branch"] \
-value head \
-variable @revtype
pack $w.types.head_r -side left
- ${NS}::radiobutton $w.types.trck_r \
+ ttk::radiobutton $w.types.trck_r \
-text [mc "Tracking Branch"] \
-value trck \
-variable @revtype
pack $w.types.trck_r -side left
- ${NS}::radiobutton $w.types.tag_r \
+ ttk::radiobutton $w.types.tag_r \
-text [mc "Tag"] \
-value tag \
-variable @revtype
pack $w.types.tag_r -side left
set w_filter $w.types.filter
- ${NS}::entry $w_filter \
+ ttk::entry $w_filter \
-width 12 \
-textvariable @filter \
-validate key \
-validatecommand [cb _filter %P]
pack $w_filter -side right
- pack [${NS}::label $w.types.filter_icon \
+ pack [ttk::label $w.types.filter_icon \
-image ::choose_rev::img_find \
] -side right
grid $w.types -sticky we -padx {0 5} -columnspan 2
- if {$use_ttk} {
- ttk::frame $w.list -style SListbox.TFrame -padding 2
- } else {
- frame $w.list
- }
+ ttk::frame $w.list -style SListbox.TFrame -padding 2
set w_list $w.list.l
listbox $w_list \
-font font_diff \
@@ -109,9 +104,7 @@
-exportselection false \
-xscrollcommand [cb _sb_set $w.list.sbx h] \
-yscrollcommand [cb _sb_set $w.list.sby v]
- if {$use_ttk} {
- $w_list configure -relief flat -highlightthickness 0 -borderwidth 0
- }
+ $w_list configure -relief flat -highlightthickness 0 -borderwidth 0
pack $w_list -fill both -expand 1
grid $w.list -sticky nswe -padx {20 5} -columnspan 2
bind $w_list <Any-Motion> [cb _show_tooltip @%x,%y]
@@ -146,15 +139,15 @@
append fmt { %(*subject)}
append fmt {]}
set all_refn [list]
- set fr_fd [git_read for-each-ref \
+ set fr_fd [git_read [list for-each-ref \
--tcl \
--sort=-taggerdate \
--format=$fmt \
refs/heads \
refs/remotes \
refs/tags \
- ]
- fconfigure $fr_fd -translation lf -encoding utf-8
+ ]]
+ fconfigure $fr_fd -encoding utf-8
while {[gets $fr_fd line] > 0} {
set line [eval $line]
if {[lindex $line 1 0] eq {tag}} {
@@ -176,7 +169,7 @@
close $fr_fd
if {$unmerged_only} {
- set fr_fd [git_read rev-list --all ^$::HEAD]
+ set fr_fd [git_read [list rev-list --all ^$::HEAD]]
while {[gets $fr_fd sha1] > 0} {
if {[catch {set rlst $cmt_refn($sha1)}]} continue
foreach refn $rlst {
@@ -238,12 +231,10 @@
}
method none {text} {
- global NS use_ttk
if {![winfo exists $w.none_r]} {
- ${NS}::radiobutton $w.none_r \
+ ttk::radiobutton $w.none_r \
-value none \
-variable @revtype
- if {!$use_ttk} {$w.none_r configure -anchor w}
grid $w.none_r -sticky we -padx {0 5} -columnspan 2
}
$w.none_r configure -text $text
@@ -429,7 +420,6 @@
}
method _sb_set {sb orient first last} {
- global NS
set old_focus [focus -lastfor $w]
if {$first == 0 && $last == 1} {
@@ -445,10 +435,10 @@
if {![winfo exists $sb]} {
if {$orient eq {h}} {
- ${NS}::scrollbar $sb -orient h -command [list $w_list xview]
+ ttk::scrollbar $sb -orient h -command [list $w_list xview]
pack $sb -fill x -side bottom -before $w_list
} else {
- ${NS}::scrollbar $sb -orient v -command [list $w_list yview]
+ ttk::scrollbar $sb -orient v -command [list $w_list yview]
pack $sb -fill y -side right -before $w_list
}
if {$old_focus ne {}} {
@@ -579,8 +569,8 @@
set last {}
if {[catch {set last [file mtime [gitdir $name]]}]
- && ![catch {set g [open [gitdir logs $name] r]}]} {
- fconfigure $g -translation binary
+ && ![catch {set g [safe_open_file [gitdir logs $name] r]}]} {
+ fconfigure $g -encoding iso8859-1
while {[gets $g line] >= 0} {
if {[regexp {> ([1-9][0-9]*) } $line line when]} {
set last $when
diff --git a/git-gui/lib/class.tcl b/git-gui/lib/class.tcl
index f08506f..0b1e671 100644
--- a/git-gui/lib/class.tcl
+++ b/git-gui/lib/class.tcl
@@ -136,7 +136,6 @@
proc make_dialog {t w args} {
upvar $t top $w pfx this this
- global use_ttk
uplevel [linsert $args 0 make_toplevel $t $w]
catch {wm attributes $top -type dialog}
pave_toplevel $pfx
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index a570f9c..89eb8c7 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -27,8 +27,8 @@
if {[catch {
set name ""
set email ""
- set fd [git_read cat-file commit $curHEAD]
- fconfigure $fd -encoding binary -translation lf
+ set fd [git_read [list cat-file commit $curHEAD]]
+ fconfigure $fd -encoding iso8859-1
# By default commits are assumed to be in utf-8
set enc utf-8
while {[gets $fd line] > 0} {
@@ -43,9 +43,9 @@
set enc [tcl_encoding $enc]
if {$enc ne {}} {
- set msg [encoding convertfrom $enc $msg]
- set name [encoding convertfrom $enc $name]
- set email [encoding convertfrom $enc $email]
+ set msg [convertfrom $enc $msg]
+ set name [convertfrom $enc $name]
+ set email [convertfrom $enc $email]
}
if {$name ne {} && $email ne {}} {
set commit_author [list name $name email $email date $time]
@@ -208,35 +208,11 @@
# -- A message is required.
#
set msg [$ui_comm get 1.0 end]
- # Strip trailing whitespace
- regsub -all -line {[ \t\r]+$} $msg {} msg
- # Strip comment lines
- global comment_string
- set cmt_rx [strcat {(^|\n)} [regsub -all {\W} $comment_string {\\&}] {[^\n]*}]
- regsub -all $cmt_rx $msg {\1} msg
- # Strip leading empty lines
- regsub {^\n*} $msg {} msg
- # Compress consecutive empty lines
- regsub -all {\n{3,}} $msg "\n\n" msg
- # Strip trailing empty line
- regsub {\n\n$} $msg "\n" msg
- if {$msg eq {}} {
- error_popup [mc "Please supply a commit message.
-
-A good commit message has the following format:
-
-- First line: Describe in one sentence what you did.
-- Second line: Blank
-- Remaining lines: Describe why this change is good.
-"]
- unlock_index
- return
- }
# -- Build the message file.
#
set msg_p [gitdir GITGUI_EDITMSG]
- set msg_wt [open $msg_p w]
+ set msg_wt [safe_open_file $msg_p w]
fconfigure $msg_wt -translation lf
setup_commit_encoding $msg_wt
puts $msg_wt $msg
@@ -254,7 +230,7 @@
ui_status [mc "Calling pre-commit hook..."]
set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fconfigure $fd_ph -blocking 0 -translation binary
fileevent $fd_ph readable \
[list commit_prehook_wait $fd_ph $curHEAD $msg_p]
}
@@ -309,7 +285,7 @@
ui_status [mc "Calling commit-msg hook..."]
set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fconfigure $fd_ph -blocking 0 -translation binary
fileevent $fd_ph readable \
[list commit_commitmsg_wait $fd_ph $curHEAD $msg_p]
}
@@ -334,9 +310,54 @@
fconfigure $fd_ph -blocking 0
}
+proc wash_commit_message {msg} {
+ # Strip trailing whitespace
+ regsub -all -line {[ \t\r]+$} $msg {} msg
+ # Strip comment lines
+ global comment_string
+ set cmt_rx [strcat {(^|\n)} [regsub -all {\W} $comment_string {\\&}] {[^\n]*}]
+ regsub -all $cmt_rx $msg {\1} msg
+ # Strip leading and trailing empty lines (puts adds one \n)
+ set msg [string trim $msg \n]
+ # Compress consecutive empty lines
+ regsub -all {\n{3,}} $msg \n\n msg
+
+ return $msg
+}
+
proc commit_writetree {curHEAD msg_p} {
+ # -- Process the commit message after hooks have run.
+ #
+ set msg_fd [safe_open_file $msg_p r]
+ setup_commit_encoding $msg_fd 1
+ set msg [read $msg_fd]
+ close $msg_fd
+
+ # Process the message (strip whitespace, comments, etc.)
+ set msg [wash_commit_message $msg]
+
+ if {$msg eq {}} {
+ error_popup [mc "Please supply a commit message.
+
+A good commit message has the following format:
+
+- First line: Describe in one sentence what you did.
+- Second line: Blank
+- Remaining lines: Describe why this change is good.
+"]
+ unlock_index
+ return
+ }
+
+ # Write the processed message back to the file
+ set msg_wt [safe_open_file $msg_p w]
+ fconfigure $msg_wt -translation lf
+ setup_commit_encoding $msg_wt
+ puts $msg_wt $msg
+ close $msg_wt
+
ui_status [mc "Committing changes..."]
- set fd_wt [git_read write-tree]
+ set fd_wt [git_read [list write-tree]]
fileevent $fd_wt readable \
[list commit_committree $fd_wt $curHEAD $msg_p]
}
@@ -348,6 +369,7 @@
global file_states selected_paths rescan_active
global repo_config
global env
+ global hashlength
gets $fd_wt tree_id
if {[catch {close $fd_wt} err]} {
@@ -361,13 +383,13 @@
# -- Verify this wasn't an empty change.
#
if {$commit_type eq {normal}} {
- set fd_ot [git_read cat-file commit $PARENT]
- fconfigure $fd_ot -encoding binary -translation lf
+ set fd_ot [git_read [list cat-file commit $PARENT]]
+ fconfigure $fd_ot -encoding iso8859-1
set old_tree [gets $fd_ot]
close $fd_ot
if {[string equal -length 5 {tree } $old_tree]
- && [string length $old_tree] == 45} {
+ && [string length $old_tree] == [expr {$hashlength + 5}]} {
set old_tree [string range $old_tree 5 end]
} else {
error [mc "Commit %s appears to be corrupt" $PARENT]
@@ -399,8 +421,8 @@
foreach p [concat $PARENT $MERGE_HEAD] {
lappend cmd -p $p
}
- lappend cmd <$msg_p
- if {[catch {set cmt_id [eval git $cmd]} err]} {
+ set msgtxt [list <$msg_p]
+ if {[catch {set cmt_id [git_redir $cmd $msgtxt]} err]} {
catch {file delete $msg_p}
error_popup [strcat [mc "commit-tree failed:"] "\n\n$err"]
ui_status [mc "Commit failed."]
@@ -420,7 +442,7 @@
if {$commit_type ne {normal}} {
append reflogm " ($commit_type)"
}
- set msg_fd [open $msg_p r]
+ set msg_fd [safe_open_file $msg_p r]
setup_commit_encoding $msg_fd 1
gets $msg_fd subject
close $msg_fd
@@ -461,7 +483,7 @@
if {$fd_ph ne {}} {
global pch_error
set pch_error {}
- fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fconfigure $fd_ph -blocking 0 -translation binary
fileevent $fd_ph readable \
[list commit_postcommit_wait $fd_ph $cmt_id]
}
diff --git a/git-gui/lib/console.tcl b/git-gui/lib/console.tcl
index fafafb8..2676994 100644
--- a/git-gui/lib/console.tcl
+++ b/git-gui/lib/console.tcl
@@ -27,20 +27,20 @@
}
method _init {} {
- global M1B use_ttk NS
+ global M1B
if {$is_toplevel} {
make_dialog top w -autodelete 0
wm title $top "[appname] ([reponame]): $t_short"
} else {
- ${NS}::frame $w
+ ttk::frame $w
}
set console_cr 1.0
set w_t $w.m.t
- ${NS}::frame $w.m
- ${NS}::label $w.m.l1 \
+ ttk::frame $w.m
+ ttk::label $w.m.l1 \
-textvariable @t_long \
-anchor w \
-justify left \
@@ -78,7 +78,7 @@
"
if {$is_toplevel} {
- ${NS}::button $w.ok -text [mc "Close"] \
+ ttk::button $w.ok -text [mc "Close"] \
-state disabled \
-command [list destroy $w]
pack $w.ok -side bottom -anchor e -pady 10 -padx 10
@@ -92,10 +92,9 @@
method exec {cmd {after {}}} {
if {[lindex $cmd 0] eq {git}} {
- set fd_f [eval git_read --stderr [lrange $cmd 1 end]]
+ set fd_f [git_read [lrange $cmd 1 end] [list 2>@1]]
} else {
- lappend cmd 2>@1
- set fd_f [_open_stdout_stderr $cmd]
+ set fd_f [safe_open_command $cmd [list 2>@1]]
}
fconfigure $fd_f -blocking 0 -translation binary -encoding [encoding system]
fileevent $fd_f readable [cb _read $fd_f $after]
@@ -208,14 +207,13 @@
}
method _sb_set {sb orient first last} {
- global NS
if {![winfo exists $sb]} {
if {$first == $last || ($first == 0 && $last == 1)} return
if {$orient eq {h}} {
- ${NS}::scrollbar $sb -orient h -command [list $w_t xview]
+ ttk::scrollbar $sb -orient h -command [list $w_t xview]
pack $sb -fill x -side bottom -before $w_t
} else {
- ${NS}::scrollbar $sb -orient v -command [list $w_t yview]
+ ttk::scrollbar $sb -orient v -command [list $w_t yview]
pack $sb -fill y -side right -before $w_t
}
}
diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl
index 8578308..78732d8 100644
--- a/git-gui/lib/database.tcl
+++ b/git-gui/lib/database.tcl
@@ -2,8 +2,7 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc do_stats {} {
- global use_ttk NS
- set fd [git_read count-objects -v]
+ set fd [git_read [list count-objects -v]]
while {[gets $fd line] > 0} {
if {[regexp {^([^:]+): (\d+)$} $line _ name value]} {
set stats($name) $value
@@ -26,18 +25,18 @@
wm withdraw $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.close -text [mc Close] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.close -text [mc Close] \
-default active \
-command [list destroy $w]
- ${NS}::button $w.buttons.gc -text [mc "Compress Database"] \
+ ttk::button $w.buttons.gc -text [mc "Compress Database"] \
-default normal \
-command "destroy $w;do_gc"
pack $w.buttons.close -side right
pack $w.buttons.gc -side left
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.stat -text [mc "Database Statistics"]
+ ttk::labelframe $w.stat -text [mc "Database Statistics"]
foreach s {
{count {mc "Number of loose objects"}}
{size {mc "Disk space used by loose objects"} { KiB}}
@@ -54,8 +53,8 @@
set value "$value[lindex $s 2]"
}
- ${NS}::label $w.stat.l_$name -text [mc "%s:" $label] -anchor w
- ${NS}::label $w.stat.v_$name -text $value -anchor w
+ ttk::label $w.stat.l_$name -text [mc "%s:" $label] -anchor w
+ ttk::label $w.stat.v_$name -text $value -anchor w
grid $w.stat.l_$name $w.stat.v_$name -sticky we -padx {0 5}
}
pack $w.stat -pady 10 -padx 10
diff --git a/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index d657bfe..442737b 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -2,15 +2,13 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc apply_tab_size {{firsttab {}}} {
- global have_tk85 repo_config ui_diff
+ global repo_config ui_diff
set w [font measure font_diff "0"]
- if {$have_tk85 && $firsttab != 0} {
+ if {$firsttab != 0} {
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
- } elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
- $ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
} else {
- $ui_diff configure -tabs {}
+ $ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
}
}
@@ -191,9 +189,8 @@
set sz [string length $content]
}
file {
- set fd [open $path r]
+ set fd [safe_open_file $path r]
fconfigure $fd \
- -eofchar {} \
-encoding [get_path_encoding $path]
set content [read $fd $max_sz]
close $fd
@@ -215,7 +212,7 @@
$ui_diff insert end \
"* [mc "Git Repository (subproject)"]\n" \
d_info
- } elseif {![catch {set type [exec file $path]}]} {
+ } elseif {![catch {set type [safe_exec [list file $path]]}]} {
set n [string length $path]
if {[string equal -length $n $path $type]} {
set type [string range $type $n end]
@@ -280,9 +277,7 @@
if {$w eq $ui_index} {
lappend cmd diff-index
lappend cmd --cached
- if {[git-version >= "1.7.2"]} {
- lappend cmd --ignore-submodules=dirty
- }
+ lappend cmd --ignore-submodules=dirty
} elseif {$w eq $ui_workdir} {
if {[string first {U} $m] >= 0} {
lappend cmd diff
@@ -290,17 +285,14 @@
lappend cmd diff-files
}
}
- if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
+ if {![is_config_false gui.textconv]} {
lappend cmd --textconv
}
if {[string match {160000 *} [lindex $s 2]]
|| [string match {160000 *} [lindex $s 3]]} {
set is_submodule_diff 1
-
- if {[git-version >= "1.6.6"]} {
- lappend cmd --submodule
- }
+ lappend cmd --submodule
}
lappend cmd -p
@@ -319,15 +311,7 @@
lappend cmd $path
}
- if {$is_submodule_diff && [git-version < "1.6.6"]} {
- if {$w eq $ui_index} {
- set cmd [list submodule summary --cached -- $path]
- } else {
- set cmd [list submodule summary --files -- $path]
- }
- }
-
- if {[catch {set fd [eval git_read --nice $cmd]} err]} {
+ if {[catch {set fd [git_read_nice $cmd]} err]} {
set diff_active 0
unlock_index
ui_status [mc "Unable to display %s" [escape_path $path]]
@@ -340,6 +324,8 @@
# '++' lines which is not bijective. Thus, we need to maintain a state
# across lines.
set ::conflict_in_pre_image 0
+
+ # git-diff has eol==\n, \r if present is part of the text
fconfigure $fd \
-blocking 0 \
-encoding [get_path_encoding $path] \
@@ -603,7 +589,7 @@
if {[catch {
set enc [get_path_encoding $current_diff_path]
- set p [eval git_write $apply_cmd]
+ set p [git_write $apply_cmd]
fconfigure $p -translation binary -encoding $enc
puts -nonewline $p $wholepatch
close $p} err]} {
@@ -839,7 +825,7 @@
if {[catch {
set enc [get_path_encoding $current_diff_path]
- set p [eval git_write $apply_cmd]
+ set p [git_write $apply_cmd]
fconfigure $p -translation binary -encoding $enc
puts -nonewline $p $current_diff_header
puts -nonewline $p $wholepatch
@@ -876,7 +862,7 @@
if {[catch {
set enc $last_revert_enc
- set p [eval git_write $apply_cmd]
+ set p [git_write $apply_cmd]
fconfigure $p -translation binary -encoding $enc
puts -nonewline $p $last_revert
close $p} err]} {
diff --git a/git-gui/lib/error.tcl b/git-gui/lib/error.tcl
index 8968a57..fc0b5ad 100644
--- a/git-gui/lib/error.tcl
+++ b/git-gui/lib/error.tcl
@@ -71,13 +71,12 @@
}
proc hook_failed_popup {hook msg {is_fatal 1}} {
- global use_ttk NS
set w .hookfail
Dialog $w
wm withdraw $w
- ${NS}::frame $w.m
- ${NS}::label $w.m.l1 -text [mc "%s hook failed:" $hook] \
+ ttk::frame $w.m
+ ttk::label $w.m.l1 -text [mc "%s hook failed:" $hook] \
-anchor w \
-justify left \
-font font_uibold
@@ -89,10 +88,10 @@
-width 80 -height 10 \
-font font_diff \
-yscrollcommand [list $w.m.sby set]
- ${NS}::scrollbar $w.m.sby -command [list $w.m.t yview]
+ ttk::scrollbar $w.m.sby -command [list $w.m.t yview]
pack $w.m.l1 -side top -fill x
if {$is_fatal} {
- ${NS}::label $w.m.l2 \
+ ttk::label $w.m.l2 \
-text [mc "You must correct the above errors before committing."] \
-anchor w \
-justify left \
@@ -106,7 +105,7 @@
$w.m.t insert 1.0 $msg
$w.m.t conf -state disabled
- ${NS}::button $w.ok -text OK \
+ ttk::button $w.ok -text OK \
-width 15 \
-command "destroy $w"
pack $w.ok -side bottom -anchor e -pady 10 -padx 10
diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index d2ec24b..7aa09c7 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -22,8 +22,6 @@
}
proc rescan_on_error {err {after {}}} {
- global use_ttk NS
-
set w .indexfried
Dialog $w
wm withdraw $w
@@ -35,14 +33,14 @@
-borderwidth 0 -highlightthickness 0 \
-background [get_bg_color $w]
$w.msg tag configure bold -font font_uibold -justify center
- ${NS}::scrollbar $w.vs -command [list $w.msg yview]
+ ttk::scrollbar $w.vs -command [list $w.msg yview]
$w.msg insert end $s bold \n\n$err {}
$w.msg configure -state disabled
- ${NS}::button $w.continue \
+ ttk::button $w.continue \
-text [mc "Continue"] \
-command [list destroy $w]
- ${NS}::button $w.unlock \
+ ttk::button $w.unlock \
-text [mc "Unlock Index"] \
-command "destroy $w; _delete_indexlock"
grid $w.msg - $w.vs -sticky news
@@ -75,12 +73,11 @@
if {$batch > 25} {set batch 25}
set status_bar_operation [$::main_status start $msg [mc "files"]]
- set fd [git_write update-index -z --index-info]
+ set fd [git_write [list update-index -z --index-info]]
fconfigure $fd \
-blocking 0 \
-buffering full \
-buffersize 512 \
- -encoding binary \
-translation binary
fileevent $fd writable [list \
write_update_indexinfo \
@@ -144,12 +141,11 @@
if {$batch > 25} {set batch 25}
set status_bar_operation [$::main_status start $msg [mc "files"]]
- set fd [git_write update-index --add --remove -z --stdin]
+ set fd [git_write [list update-index --add --remove -z --stdin]]
fconfigure $fd \
-blocking 0 \
-buffering full \
-buffersize 512 \
- -encoding binary \
-translation binary
fileevent $fd writable [list \
write_update_index \
@@ -218,18 +214,17 @@
if {$batch > 25} {set batch 25}
set status_bar_operation [$::main_status start $msg [mc "files"]]
- set fd [git_write checkout-index \
+ set fd [git_write [list checkout-index \
--index \
--quiet \
--force \
-z \
--stdin \
- ]
+ ]]
fconfigure $fd \
-blocking 0 \
-buffering full \
-buffersize 512 \
- -encoding binary \
-translation binary
fileevent $fd writable [list \
write_checkout_index \
diff --git a/git-gui/lib/line.tcl b/git-gui/lib/line.tcl
index a026de9..5980ae8 100644
--- a/git-gui/lib/line.tcl
+++ b/git-gui/lib/line.tcl
@@ -9,18 +9,17 @@
field linenum {}
constructor new {i_w i_text args} {
- global use_ttk NS
set w $i_w
set ctext $i_text
- ${NS}::frame $w
- ${NS}::label $w.l -text [mc "Goto Line:"]
+ ttk::frame $w
+ ttk::label $w.l -text [mc "Goto Line:"]
tentry $w.ent \
-textvariable ${__this}::linenum \
-background lightgreen \
-validate key \
-validatecommand [cb _validate %P]
- ${NS}::button $w.bn -text [mc Go] -command [cb _goto]
+ ttk::button $w.bn -text [mc Go] -command [cb _goto]
pack $w.l -side left
pack $w.bn -side right
diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl
index 664803c..3490bed 100644
--- a/git-gui/lib/merge.tcl
+++ b/git-gui/lib/merge.tcl
@@ -93,7 +93,7 @@
set spec [$w_rev get_tracking_branch]
set cmit [$w_rev get_commit]
- set fh [open [gitdir FETCH_HEAD] w]
+ set fh [safe_open_file [gitdir FETCH_HEAD] w]
fconfigure $fh -translation lf
if {$spec eq {}} {
set remote .
@@ -112,16 +112,7 @@
close $fh
set _last_merged_branch $branch
- if {[git-version >= "2.5.0"]} {
- set cmd [list git merge --strategy=recursive FETCH_HEAD]
- } else {
- set cmd [list git]
- lappend cmd merge
- lappend cmd --strategy=recursive
- lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]
- lappend cmd HEAD
- lappend cmd $name
- }
+ set cmd [list git merge --strategy=recursive FETCH_HEAD]
ui_status [mc "Merging %s and %s..." $current_branch $stitle]
set cons [console::new [mc "Merge"] "merge $stitle"]
@@ -145,7 +136,7 @@
constructor dialog {} {
global current_branch
- global M1B use_ttk NS
+ global M1B
if {![_can_merge $this]} {
delete_this
@@ -160,21 +151,21 @@
set _start [cb _start]
- ${NS}::label $w.header \
+ ttk::label $w.header \
-text [mc "Merge Into %s" $current_branch] \
-font font_uibold
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.visualize \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.visualize \
-text [mc Visualize] \
-command [cb _visualize]
pack $w.buttons.visualize -side left
- ${NS}::button $w.buttons.merge \
+ ttk::button $w.buttons.merge \
-text [mc Merge] \
-command $_start
pack $w.buttons.merge -side right
- ${NS}::button $w.buttons.cancel \
+ ttk::button $w.buttons.cancel \
-text [mc "Cancel"] \
-command [cb _cancel]
pack $w.buttons.cancel -side right -padx 5
@@ -239,7 +230,7 @@
}
if {[ask_popup $op_question] eq {yes}} {
- set fd [git_read --stderr read-tree --reset -u -v HEAD]
+ set fd [git_read [list read-tree --reset -u -v HEAD] [list 2>@1]]
fconfigure $fd -blocking 0 -translation binary
set status_bar_operation [$::main_status \
start \
diff --git a/git-gui/lib/mergetool.tcl b/git-gui/lib/mergetool.tcl
index 8b8c16b..44be4ed 100644
--- a/git-gui/lib/mergetool.tcl
+++ b/git-gui/lib/mergetool.tcl
@@ -88,9 +88,9 @@
set merge_stages(3) {}
set merge_stages_buf {}
- set merge_stages_fd [eval git_read ls-files -u -z -- {$path}]
+ set merge_stages_fd [git_read [list ls-files -u -z -- $path]]
- fconfigure $merge_stages_fd -blocking 0 -translation binary -encoding binary
+ fconfigure $merge_stages_fd -blocking 0 -translation binary
fileevent $merge_stages_fd readable [list read_merge_stages $merge_stages_fd $cont]
}
@@ -310,7 +310,7 @@
foreach fname $stages {
if {$merge_stages($i) eq {}} {
file delete $fname
- catch { close [open $fname w] }
+ catch { close [safe_open_file $fname w] }
} else {
# A hack to support autocrlf properly
git checkout-index -f --stage=$i -- $target
@@ -360,9 +360,9 @@
# Force redirection to avoid interpreting output on stderr
# as an error, and launch the tool
- lappend cmdline {2>@1}
+ set redir [list {2>@1}]
- if {[catch { set mtool_fd [_open_stdout_stderr $cmdline] } err]} {
+ if {[catch { set mtool_fd [safe_open_command $cmdline $redir] } err]} {
delete_temp_files $mtool_tmpfiles
error_popup [mc "Could not start the merge tool:\n\n%s" $err]
return
@@ -370,7 +370,7 @@
ui_status [mc "Running merge tool..."]
- fconfigure $mtool_fd -blocking 0 -translation binary -encoding binary
+ fconfigure $mtool_fd -blocking 0 -translation binary
fileevent $mtool_fd readable [list read_mtool_output $mtool_fd]
}
diff --git a/git-gui/lib/option.tcl b/git-gui/lib/option.tcl
index e43971b..487d706 100644
--- a/git-gui/lib/option.tcl
+++ b/git-gui/lib/option.tcl
@@ -91,7 +91,7 @@
proc do_options {} {
global repo_config global_config font_descs
global repo_config_new global_config_new
- global ui_comm_spell use_ttk NS
+ global ui_comm_spell
array unset repo_config_new
array unset global_config_new
@@ -115,23 +115,23 @@
wm transient $w [winfo parent $w]
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.restore -text [mc "Restore Defaults"] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.restore -text [mc "Restore Defaults"] \
-default normal \
-command do_restore_defaults
pack $w.buttons.restore -side left
- ${NS}::button $w.buttons.save -text [mc Save] \
+ ttk::button $w.buttons.save -text [mc Save] \
-default active \
-command [list do_save_config $w]
pack $w.buttons.save -side right
- ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
+ ttk::button $w.buttons.cancel -text [mc "Cancel"] \
-default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.repo -text [mc "%s Repository" [reponame]]
- ${NS}::labelframe $w.global -text [mc "Global (All Repositories)"]
+ ttk::labelframe $w.repo -text [mc "%s Repository" [reponame]]
+ ttk::labelframe $w.global -text [mc "Global (All Repositories)"]
pack $w.repo -side left -fill both -expand 1 -pady 5 -padx 5
pack $w.global -side right -fill both -expand 1 -pady 5 -padx 5
@@ -170,7 +170,7 @@
foreach f {repo global} {
switch -glob -- $type {
b {
- ${NS}::checkbutton $w.$f.$optid -text $text \
+ ttk::checkbutton $w.$f.$optid -text $text \
-variable ${f}_config_new($name) \
-onvalue true \
-offvalue false
@@ -178,8 +178,8 @@
}
i-* {
regexp -- {-(\d+)\.\.(\d+)$} $type _junk min max
- ${NS}::frame $w.$f.$optid
- ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
+ ttk::frame $w.$f.$optid
+ ttk::label $w.$f.$optid.l -text [mc "%s:" $text]
pack $w.$f.$optid.l -side left -anchor w -fill x
tspinbox $w.$f.$optid.v \
-textvariable ${f}_config_new($name) \
@@ -193,9 +193,9 @@
}
c -
t {
- ${NS}::frame $w.$f.$optid
- ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
- ${NS}::entry $w.$f.$optid.v \
+ ttk::frame $w.$f.$optid
+ ttk::label $w.$f.$optid.l -text [mc "%s:" $text]
+ ttk::entry $w.$f.$optid.v \
-width 20 \
-textvariable ${f}_config_new($name)
pack $w.$f.$optid.l -side left -anchor w
@@ -206,7 +206,7 @@
menu $w.$f.$optid.m
build_encoding_menu $w.$f.$optid.m \
[list set ${f}_config_new($name)] 1
- ${NS}::button $w.$f.$optid.b \
+ ttk::button $w.$f.$optid.b \
-text [mc "Change"] \
-command [list popup_btn_menu \
$w.$f.$optid.m $w.$f.$optid.b]
@@ -216,17 +216,11 @@
}
s {
set opts [eval [lindex $option 3]]
- ${NS}::frame $w.$f.$optid
- ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
- if {$use_ttk} {
- ttk::combobox $w.$f.$optid.v \
- -textvariable ${f}_config_new($name) \
- -values $opts -state readonly
- } else {
- eval tk_optionMenu $w.$f.$optid.v \
- ${f}_config_new($name) \
- $opts
- }
+ ttk::frame $w.$f.$optid
+ ttk::label $w.$f.$optid.l -text [mc "%s:" $text]
+ ttk::combobox $w.$f.$optid.v \
+ -textvariable ${f}_config_new($name) \
+ -values $opts -state readonly
pack $w.$f.$optid.l -side left -anchor w -fill x
pack $w.$f.$optid.v -side right -anchor e -padx 5
pack $w.$f.$optid -side top -anchor w -fill x
@@ -250,17 +244,11 @@
set ${f}_config_new(gui.spellingdictionary) $value
}
- ${NS}::frame $w.$f.$optid
- ${NS}::label $w.$f.$optid.l -text [mc "Spelling Dictionary:"]
- if {$use_ttk} {
- ttk::combobox $w.$f.$optid.v \
- -textvariable ${f}_config_new(gui.spellingdictionary) \
- -values $all_dicts -state readonly
- } else {
- eval tk_optionMenu $w.$f.$optid.v \
- ${f}_config_new(gui.spellingdictionary) \
- $all_dicts
- }
+ ttk::frame $w.$f.$optid
+ ttk::label $w.$f.$optid.l -text [mc "Spelling Dictionary:"]
+ ttk::combobox $w.$f.$optid.v \
+ -textvariable ${f}_config_new(gui.spellingdictionary) \
+ -values $all_dicts -state readonly
pack $w.$f.$optid.l -side left -anchor w -fill x
pack $w.$f.$optid.v -side right -anchor e -padx 5
pack $w.$f.$optid -side top -anchor w -fill x
@@ -278,9 +266,9 @@
set global_config_new(gui.$font^^size) \
[font configure $font -size]
- ${NS}::frame $w.global.$name
- ${NS}::label $w.global.$name.l -text [mc "%s:" $text]
- ${NS}::button $w.global.$name.b \
+ ttk::frame $w.global.$name
+ ttk::label $w.global.$name.l -text [mc "%s:" $text]
+ ttk::button $w.global.$name.b \
-text [mc "Change Font"] \
-command [list \
tchoosefont \
@@ -289,9 +277,9 @@
global_config_new(gui.$font^^family) \
global_config_new(gui.$font^^size) \
]
- ${NS}::label $w.global.$name.f -textvariable global_config_new(gui.$font^^family)
- ${NS}::label $w.global.$name.s -textvariable global_config_new(gui.$font^^size)
- ${NS}::label $w.global.$name.pt -text [mc "pt."]
+ ttk::label $w.global.$name.f -textvariable global_config_new(gui.$font^^family)
+ ttk::label $w.global.$name.s -textvariable global_config_new(gui.$font^^size)
+ ttk::label $w.global.$name.pt -text [mc "pt."]
pack $w.global.$name.l -side left -anchor w
pack $w.global.$name.b -side right -anchor e
pack $w.global.$name.pt -side right -anchor w
diff --git a/git-gui/lib/remote.tcl b/git-gui/lib/remote.tcl
index ef77ed7..9b49b6e 100644
--- a/git-gui/lib/remote.tcl
+++ b/git-gui/lib/remote.tcl
@@ -32,7 +32,7 @@
}
if {$pat ne {}} {
- set fd [eval git_read for-each-ref --format=%(refname) $cmd]
+ set fd [git_read [concat for-each-ref --format=%(refname) $cmd]]
while {[gets $fd n] > 0} {
foreach spec $pat {
set dst [string range [lindex $spec 0] 0 end-2]
@@ -75,7 +75,7 @@
foreach name $all_remotes {
catch {
- set fd [open [file join $rm_dir $name] r]
+ set fd [safe_open_file [file join $rm_dir $name] r]
while {[gets $fd line] >= 0} {
if {[regexp {^URL:[ ]*(.+)$} $line line url]} {
set remote_url($name) $url
@@ -145,7 +145,7 @@
}
} else {
catch {
- set fd [open [gitdir remotes $r] r]
+ set fd [safe_open_file [gitdir remotes $r] r]
while {[gets $fd n] >= 0} {
if {[regexp {^Pull:[ \t]*([^:]+):} $n]} {
set enable 1
@@ -182,7 +182,7 @@
}
} else {
catch {
- set fd [open [gitdir remotes $r] r]
+ set fd [safe_open_file [gitdir remotes $r] r]
while {[gets $fd n] >= 0} {
if {[regexp {^Push:[ \t]*([^:]+):} $n]} {
set enable 1
@@ -233,8 +233,6 @@
proc update_all_remotes_menu_entry {} {
global all_remotes
- if {[git-version < 1.6.6]} { return }
-
set have_remote 0
foreach r $all_remotes {
incr have_remote
diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl
index 480a6b3..bff1376 100644
--- a/git-gui/lib/remote_add.tcl
+++ b/git-gui/lib/remote_add.tcl
@@ -13,7 +13,7 @@
field opt_action fetch; # action to do after registering the remote locally
constructor dialog {} {
- global repo_config use_ttk NS
+ global repo_config
make_dialog top w
wm withdraw $top
@@ -22,34 +22,34 @@
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- ${NS}::label $w.header -text [mc "Add New Remote"] \
+ ttk::label $w.header -text [mc "Add New Remote"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.create -text [mc Add] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.create -text [mc Add] \
-default active \
-command [cb _add]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.desc -text [mc "Remote Details"]
+ ttk::labelframe $w.desc -text [mc "Remote Details"]
- ${NS}::label $w.desc.name_l -text [mc "Name:"]
+ ttk::label $w.desc.name_l -text [mc "Name:"]
set w_name $w.desc.name_t
- ${NS}::entry $w_name \
+ ttk::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate_name %d %S]
grid $w.desc.name_l $w_name -sticky we -padx {0 5}
- ${NS}::label $w.desc.loc_l -text [mc "Location:"]
+ ttk::label $w.desc.loc_l -text [mc "Location:"]
set w_loc $w.desc.loc_t
- ${NS}::entry $w_loc \
+ ttk::entry $w_loc \
-width 40 \
-textvariable @location
grid $w.desc.loc_l $w_loc -sticky we -padx {0 5}
@@ -57,21 +57,21 @@
grid columnconfigure $w.desc 1 -weight 1
pack $w.desc -anchor nw -fill x -pady 5 -padx 5
- ${NS}::labelframe $w.action -text [mc "Further Action"]
+ ttk::labelframe $w.action -text [mc "Further Action"]
- ${NS}::radiobutton $w.action.fetch \
+ ttk::radiobutton $w.action.fetch \
-text [mc "Fetch Immediately"] \
-value fetch \
-variable @opt_action
pack $w.action.fetch -anchor nw
- ${NS}::radiobutton $w.action.push \
+ ttk::radiobutton $w.action.push \
-text [mc "Initialize Remote Repository and Push"] \
-value push \
-variable @opt_action
pack $w.action.push -anchor nw
- ${NS}::radiobutton $w.action.none \
+ ttk::radiobutton $w.action.none \
-text [mc "Do Nothing Else Now"] \
-value none \
-variable @opt_action
diff --git a/git-gui/lib/remote_branch_delete.tcl b/git-gui/lib/remote_branch_delete.tcl
index 5ba9fca..f0814ef 100644
--- a/git-gui/lib/remote_branch_delete.tcl
+++ b/git-gui/lib/remote_branch_delete.tcl
@@ -23,7 +23,7 @@
field cached
constructor dialog {} {
- global all_remotes M1B use_ttk NS
+ global all_remotes M1B
make_dialog top w
wm title $top [mc "%s (%s): Delete Branch Remotely" [appname] [reponame]]
@@ -31,32 +31,28 @@
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- ${NS}::label $w.header -text [mc "Delete Branch Remotely"] \
+ ttk::label $w.header -text [mc "Delete Branch Remotely"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.delete -text [mc Delete] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.delete -text [mc Delete] \
-default active \
-command [cb _delete]
pack $w.buttons.delete -side right
- ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
+ ttk::button $w.buttons.cancel -text [mc "Cancel"] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.dest -text [mc "From Repository"]
+ ttk::labelframe $w.dest -text [mc "From Repository"]
if {$all_remotes ne {}} {
- ${NS}::radiobutton $w.dest.remote_r \
+ ttk::radiobutton $w.dest.remote_r \
-text [mc "Remote:"] \
-value remote \
-variable @urltype
- if {$use_ttk} {
- ttk::combobox $w.dest.remote_m -textvariable @remote \
- -values $all_remotes -state readonly
- } else {
- eval tk_optionMenu $w.dest.remote_m @remote $all_remotes
- }
+ ttk::combobox $w.dest.remote_m -textvariable @remote \
+ -values $all_remotes -state readonly
grid $w.dest.remote_r $w.dest.remote_m -sticky w
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
set remote origin
@@ -68,11 +64,11 @@
} else {
set urltype url
}
- ${NS}::radiobutton $w.dest.url_r \
+ ttk::radiobutton $w.dest.url_r \
-text [mc "Arbitrary Location:"] \
-value url \
-variable @urltype
- ${NS}::entry $w.dest.url_t \
+ ttk::entry $w.dest.url_t \
-width 50 \
-textvariable @url \
-validate key \
@@ -85,19 +81,19 @@
grid columnconfigure $w.dest 1 -weight 1
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
- ${NS}::labelframe $w.heads -text [mc "Branches"]
+ ttk::labelframe $w.heads -text [mc "Branches"]
slistbox $w.heads.l \
-height 10 \
-width 70 \
-listvariable @head_list \
-selectmode extended
- ${NS}::frame $w.heads.footer
- ${NS}::label $w.heads.footer.status \
+ ttk::frame $w.heads.footer
+ ttk::label $w.heads.footer.status \
-textvariable @status \
-anchor w \
-justify left
- ${NS}::button $w.heads.footer.rescan \
+ ttk::button $w.heads.footer.rescan \
-text [mc "Rescan"] \
-command [cb _rescan]
pack $w.heads.footer.status -side left -fill x
@@ -107,8 +103,8 @@
pack $w.heads.l -side left -fill both -expand 1
pack $w.heads -fill both -expand 1 -pady 5 -padx 5
- ${NS}::labelframe $w.validate -text [mc "Delete Only If"]
- ${NS}::radiobutton $w.validate.head_r \
+ ttk::labelframe $w.validate -text [mc "Delete Only If"]
+ ttk::radiobutton $w.validate.head_r \
-text [mc "Merged Into:"] \
-value head \
-variable @checktype
@@ -116,7 +112,7 @@
trace add variable @head_list write [cb _write_head_list]
trace add variable @check_head write [cb _write_check_head]
grid $w.validate.head_r $w.validate.head_m -sticky w
- ${NS}::radiobutton $w.validate.always_r \
+ ttk::radiobutton $w.validate.always_r \
-text [mc "Always (Do not perform merge checks)"] \
-value always \
-variable @checktype
@@ -308,10 +304,9 @@
set full_list [list]
set head_cache($cache) [list]
set full_cache($cache) [list]
- set active_ls [git_read ls-remote $uri]
+ set active_ls [git_read [list ls-remote $uri]]
fconfigure $active_ls \
-blocking 0 \
- -translation lf \
-encoding utf-8
fileevent $active_ls readable [cb _read $cache $active_ls]
} else {
@@ -323,6 +318,8 @@
}
method _read {cache fd} {
+ global hashlength
+
if {$fd ne $active_ls} {
catch {close $fd}
return
@@ -330,7 +327,7 @@
while {[gets $fd line] >= 0} {
if {[string match {*^{}} $line]} continue
- if {[regexp {^([0-9a-f]{40}) (.*)$} $line _junk obj ref]} {
+ if {[regexp [string map "@@ $hashlength" {^([0-9a-f]{@@}) (.*)$}] $line _junk obj ref]} {
if {[regsub ^refs/heads/ $ref {} abr]} {
lappend head_list $abr
lappend head_cache($cache) $abr
diff --git a/git-gui/lib/search.tcl b/git-gui/lib/search.tcl
index ef1e555..47a0d8c 100644
--- a/git-gui/lib/search.tcl
+++ b/git-gui/lib/search.tcl
@@ -21,7 +21,6 @@
field smarkbot
constructor new {i_w i_text args} {
- global use_ttk NS
set w $i_w
set ctext $i_text
@@ -44,14 +43,14 @@
set history [list]
- ${NS}::frame $w
- ${NS}::label $w.l -text [mc Find:]
+ ttk::frame $w
+ ttk::label $w.l -text [mc Find:]
tentry $w.ent -textvariable ${__this}::searchstring -background lightgreen
- ${NS}::button $w.bn -text [mc Next] -command [cb find_next]
- ${NS}::button $w.bp -text [mc Prev] -command [cb find_prev]
- ${NS}::checkbutton $w.re -text [mc RegExp] \
+ ttk::button $w.bn -text [mc Next] -command [cb find_next]
+ ttk::button $w.bp -text [mc Prev] -command [cb find_prev]
+ ttk::checkbutton $w.re -text [mc RegExp] \
-variable ${__this}::regexpsearch -command [cb _incrsearch]
- ${NS}::checkbutton $w.cs -text [mc Case] \
+ ttk::checkbutton $w.cs -text [mc Case] \
-variable ${__this}::casesensitive -command [cb _incrsearch]
pack $w.l -side left
pack $w.cs -side right
diff --git a/git-gui/lib/shortcut.tcl b/git-gui/lib/shortcut.tcl
index 674a41f..4316650 100644
--- a/git-gui/lib/shortcut.tcl
+++ b/git-gui/lib/shortcut.tcl
@@ -3,26 +3,40 @@
proc do_windows_shortcut {} {
global _gitworktree
- set fn [tk_getSaveFile \
- -parent . \
- -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \
- -initialfile "Git [reponame].lnk"]
- if {$fn != {}} {
- if {[file extension $fn] ne {.lnk}} {
- set fn ${fn}.lnk
+
+ set desktop [safe_exec [list cygpath -mD]]
+ set link_file "Git [reponame].lnk"
+ set link_path [file normalize [file join $desktop $link_file]]
+
+ # on Windows, tk_getSaveFile dereferences .lnk files, so no simple
+ # filename chooser is available. Use the default or quit.
+ if {[file exists $link_path]} {
+ set answer [tk_messageBox \
+ -type yesno \
+ -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \
+ -default yes \
+ -message [mc "Replace existing shortcut: %s?" $link_file]]
+ if {$answer == no} {
+ return
}
- # Use git-gui.exe if available (ie: git-for-windows)
- set cmdLine [auto_execok git-gui.exe]
- if {$cmdLine eq {}} {
- set cmdLine [list [info nameofexecutable] \
- [file normalize $::argv0]]
- }
- if {[catch {
- win32_create_lnk $fn $cmdLine \
- [file normalize $_gitworktree]
- } err]} {
- error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
- }
+ }
+
+ # Use git-gui.exe if found, fall back to wish + launcher
+ set link_arguments {}
+ set link_target [safe_exec [list cygpath -m /cmd/git-gui.exe]]
+ if {![file executable $link_target]} {
+ set link_target [_which git-gui]
+ }
+ if {![file executable $link_target]} {
+ set link_target [file normalize [info nameofexecutable]]
+ set link_arguments [file normalize $::argv0]
+ }
+ set cmdLine [list $link_target $link_arguments]
+ if {[catch {
+ win32_create_lnk $link_path $cmdLine \
+ [file normalize $_gitworktree]
+ } err]} {
+ error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}
}
@@ -30,8 +44,8 @@
global argv0 _gitworktree oguilib
if {[catch {
- set desktop [exec cygpath \
- --desktop]
+ set desktop [safe_exec [list cygpath \
+ --desktop]]
}]} {
set desktop .
}
@@ -50,14 +64,14 @@
"CHERE_INVOKING=1 \
source /etc/profile; \
git gui"}
- exec /bin/mkshortcut.exe \
+ safe_exec [list /bin/mkshortcut.exe \
--arguments $shargs \
--desc "git-gui on $repodir" \
--icon $oguilib/git-gui.ico \
--name $fn \
--show min \
--workingdir $repodir \
- /bin/sh.exe
+ /bin/sh.exe]
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}
@@ -83,7 +97,7 @@
file mkdir $MacOS
- set fd [open [file join $Contents Info.plist] w]
+ set fd [safe_open_file [file join $Contents Info.plist] w]
puts $fd {<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -108,7 +122,7 @@
</plist>}
close $fd
- set fd [open $exe w]
+ set fd [safe_open_file $exe w]
puts $fd "#!/bin/sh"
foreach name [lsort [array names env]] {
set value $env($name)
diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl
index 538d61c..6346568 100644
--- a/git-gui/lib/spellcheck.tcl
+++ b/git-gui/lib/spellcheck.tcl
@@ -33,7 +33,6 @@
method _connect {pipe_fd} {
fconfigure $pipe_fd \
-encoding utf-8 \
- -eofchar {} \
-translation lf
if {[gets $pipe_fd s_version] <= 0} {
diff --git a/git-gui/lib/sshkey.tcl b/git-gui/lib/sshkey.tcl
index 589ff8f..7a6526d 100644
--- a/git-gui/lib/sshkey.tcl
+++ b/git-gui/lib/sshkey.tcl
@@ -7,7 +7,7 @@
~/.ssh/id_rsa.pub ~/.ssh/identity.pub
} {
if {[file exists $name]} {
- set fh [open $name r]
+ set fh [safe_open_file $name r]
set cont [read $fh]
close $fh
return [list $name $cont]
@@ -18,7 +18,7 @@
}
proc do_ssh_key {} {
- global sshkey_title have_tk85 sshkey_fd use_ttk NS
+ global sshkey_title sshkey_fd
set w .sshkey_dialog
if {[winfo exists $w]} {
@@ -38,9 +38,9 @@
set gen_state disabled
}
- ${NS}::frame $w.header
- ${NS}::label $w.header.lbl -textvariable sshkey_title -anchor w
- ${NS}::button $w.header.gen -text [mc "Generate Key"] \
+ ttk::frame $w.header
+ ttk::label $w.header.lbl -textvariable sshkey_title -anchor w
+ ttk::button $w.header.gen -text [mc "Generate Key"] \
-command [list make_ssh_key $w] -state $gen_state
pack $w.header.lbl -side left -expand 1 -fill x
pack $w.header.gen -side right
@@ -48,17 +48,14 @@
text $w.contents -width 60 -height 10 -wrap char -relief sunken
pack $w.contents -fill both -expand 1
- if {$have_tk85} {
- set clr darkblue
- if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
- $w.contents configure -inactiveselectbackground $clr
- }
+ set clr [ttk::style lookup . -selectbackground]
+ $w.contents configure -inactiveselectbackground $clr
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.close -text [mc Close] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.close -text [mc Close] \
-default active -command [list destroy $w]
pack $w.buttons.close -side right
- ${NS}::button $w.buttons.copy -text [mc "Copy To Clipboard"] \
+ ttk::button $w.buttons.copy -text [mc "Copy To Clipboard"] \
-command [list tk_textCopy $w.contents]
pack $w.buttons.copy -side left
pack $w.buttons -side bottom -fill x -pady 5 -padx 5
@@ -83,9 +80,10 @@
set sshkey_title [mc "Generating..."]
$w.header.gen configure -state disabled
- set cmdline [list sh -c {echo | ssh-keygen -q -t rsa -f ~/.ssh/id_rsa 2>&1}]
+ set cmdline [list [shellpath] -c \
+ {echo | ssh-keygen -q -t rsa -f ~/.ssh/id_rsa 2>&1}]
- if {[catch { set sshkey_fd [_open_stdout_stderr $cmdline] } err]} {
+ if {[catch { set sshkey_fd [safe_open_command $cmdline] } err]} {
error_popup [mc "Could not start ssh-keygen:\n\n%s" $err]
return
}
diff --git a/git-gui/lib/status_bar.tcl b/git-gui/lib/status_bar.tcl
index d32b141..f5c0204 100644
--- a/git-gui/lib/status_bar.tcl
+++ b/git-gui/lib/status_bar.tcl
@@ -39,7 +39,6 @@
field completed_operation_count
constructor new {path} {
- global use_ttk NS
set w $path
set w_l $w.l
set w_c $w.c
@@ -51,11 +50,8 @@
set operations [list]
set completed_operation_count 0
- ${NS}::frame $w
- if {!$use_ttk} {
- $w configure -borderwidth 1 -relief sunken
- }
- ${NS}::label $w_l \
+ ttk::frame $w
+ ttk::label $w_l \
-textvariable @status_bar_text \
-anchor w \
-justify left
@@ -72,7 +68,6 @@
}
constructor two_line {path} {
- global NS
set w $path
set w_l $w.l
set w_c $w.c
@@ -84,8 +79,8 @@
set operations [list]
set completed_operation_count 0
- ${NS}::frame $w
- ${NS}::label $w_l \
+ ttk::frame $w
+ ttk::label $w_l \
-textvariable @status_bar_text \
-anchor w \
-justify left
diff --git a/git-gui/lib/themed.tcl b/git-gui/lib/themed.tcl
index f43d84e..c18e201 100644
--- a/git-gui/lib/themed.tcl
+++ b/git-gui/lib/themed.tcl
@@ -21,10 +21,10 @@
set inactive_select_bg [convert_rgb_to_gray $select_bg]
set inactive_select_fg $select_fg
- set color::select_bg $select_bg
- set color::select_fg $select_fg
- set color::inactive_select_bg $inactive_select_bg
- set color::inactive_select_fg $inactive_select_fg
+ set ::color::select_bg $select_bg
+ set ::color::select_fg $select_fg
+ set ::color::inactive_select_bg $inactive_select_bg
+ set ::color::inactive_select_fg $inactive_select_fg
proc add_option {key val} {
option add $key $val widgetDefault
@@ -190,8 +190,7 @@
}
proc gold_frame {w args} {
- global use_ttk
- if {$use_ttk && ![is_MacOSX]} {
+ if {![is_MacOSX]} {
eval [linsert $args 0 ttk::frame $w -style Gold.TFrame]
} else {
eval [linsert $args 0 frame $w -background gold]
@@ -199,8 +198,7 @@
}
proc tlabel {w args} {
- global use_ttk
- if {$use_ttk && ![is_MacOSX]} {
+ if {![is_MacOSX]} {
set cmd [list ttk::label $w -style Color.TLabel]
foreach {k v} $args {
switch -glob -- $k {
@@ -216,17 +214,7 @@
# The padded label gets used in the about class.
proc paddedlabel {w args} {
- global use_ttk
- if {$use_ttk} {
- eval [linsert $args 0 ttk::label $w -style Padded.TLabel]
- } else {
- eval [linsert $args 0 label $w \
- -padx 5 -pady 5 \
- -justify left \
- -anchor w \
- -borderwidth 1 \
- -relief solid]
- }
+ eval [linsert $args 0 ttk::label $w -style Padded.TLabel]
}
# Create a toplevel for use as a dialog.
@@ -242,8 +230,7 @@
# Tk toplevels are not themed - so pave it over with a themed frame to get
# the base color correct per theme.
proc pave_toplevel {w} {
- global use_ttk
- if {$use_ttk && ![winfo exists $w.!paving]} {
+ if {![winfo exists $w.!paving]} {
set paving [ttk::frame $w.!paving]
place $paving -x 0 -y 0 -relwidth 1 -relheight 1
lower $paving
@@ -254,20 +241,11 @@
# On many themes the border for a scrolled listbox needs to go around the
# listbox and the scrollbar.
proc slistbox {w args} {
- global use_ttk NS
- if {$use_ttk} {
- set f [ttk::frame $w -style SListbox.TFrame -padding 2]
- } else {
- set f [frame $w -relief flat]
- }
+ set f [ttk::frame $w -style SListbox.TFrame -padding 2]
if {[catch {
- if {$use_ttk} {
- eval [linsert $args 0 listbox $f.list -relief flat \
- -highlightthickness 0 -borderwidth 0]
- } else {
- eval [linsert $args 0 listbox $f.list]
- }
- ${NS}::scrollbar $f.vs -command [list $f.list yview]
+ eval [linsert $args 0 listbox $f.list -relief flat \
+ -highlightthickness 0 -borderwidth 0]
+ ttk::scrollbar $f.vs -command [list $f.list yview]
$f.list configure -yscrollcommand [list $f.vs set]
grid $f.list $f.vs -sticky news
grid rowconfigure $f 0 -weight 1
@@ -285,67 +263,42 @@
# fetch the background color from a widget.
proc get_bg_color {w} {
- global use_ttk
- if {$use_ttk} {
- set bg [ttk::style lookup [winfo class $w] -background]
- } else {
- set bg [$w cget -background]
- }
+ set bg [ttk::style lookup [winfo class $w] -background]
return $bg
}
-# ttk::spinbox didn't get added until 8.6
+# ttk::spinbox
proc tspinbox {w args} {
- global use_ttk
- if {$use_ttk && [llength [info commands ttk::spinbox]] > 0} {
- eval [linsert $args 0 ttk::spinbox $w]
- } else {
- eval [linsert $args 0 spinbox $w]
- }
+ eval [linsert $args 0 ttk::spinbox $w]
}
# Create a text widget with any theme specific properties.
proc ttext {w args} {
- global use_ttk
- if {$use_ttk} {
- switch -- [ttk_get_current_theme] {
- "vista" - "xpnative" {
- lappend args -highlightthickness 0 -borderwidth 0
- }
+ switch -- [ttk_get_current_theme] {
+ "vista" - "xpnative" {
+ lappend args -highlightthickness 0 -borderwidth 0
}
}
set w [eval [linsert $args 0 text $w]]
- if {$use_ttk} {
- if {[winfo class [winfo parent $w]] eq "EntryFrame"} {
- bind $w <FocusIn> {[winfo parent %W] state focus}
- bind $w <FocusOut> {[winfo parent %W] state !focus}
- }
+ if {[winfo class [winfo parent $w]] eq "EntryFrame"} {
+ bind $w <FocusIn> {[winfo parent %W] state focus}
+ bind $w <FocusOut> {[winfo parent %W] state !focus}
}
return $w
}
# themed frame suitable for surrounding a text field.
proc textframe {w args} {
- global use_ttk
- if {$use_ttk} {
- if {[catch {ttk::style layout EntryFrame}]} {
- InitEntryFrame
- }
- eval [linsert $args 0 ttk::frame $w -class EntryFrame -style EntryFrame]
- } else {
- eval [linsert $args 0 frame $w]
+ if {[catch {ttk::style layout EntryFrame}]} {
+ InitEntryFrame
}
+ eval [linsert $args 0 ttk::frame $w -class EntryFrame -style EntryFrame]
return $w
}
proc tentry {w args} {
- global use_ttk
- if {$use_ttk} {
- InitTheme
- ttk::entry $w -style Edged.Entry
- } else {
- entry $w
- }
+ InitTheme
+ ttk::entry $w -style Edged.Entry
rename $w _$w
interp alias {} $w {} tentry_widgetproc $w
@@ -353,25 +306,14 @@
return $w
}
proc tentry_widgetproc {w cmd args} {
- global use_ttk
switch -- $cmd {
state {
- if {$use_ttk} {
- return [uplevel 1 [list _$w $cmd] $args]
- } else {
- if {[lsearch -exact $args pressed] != -1} {
- _$w configure -background lightpink
- } else {
- _$w configure -background lightgreen
- }
- }
+ return [uplevel 1 [list _$w $cmd] $args]
}
configure {
- if {$use_ttk} {
- if {[set n [lsearch -exact $args -background]] != -1} {
- set args [lreplace $args $n [incr n]]
- if {[llength $args] == 0} {return}
- }
+ if {[set n [lsearch -exact $args -background]] != -1} {
+ set args [lreplace $args $n [incr n]]
+ if {[llength $args] == 0} {return}
}
return [uplevel 1 [list _$w $cmd] $args]
}
diff --git a/git-gui/lib/tools.tcl b/git-gui/lib/tools.tcl
index 413f1a1..48fddfd 100644
--- a/git-gui/lib/tools.tcl
+++ b/git-gui/lib/tools.tcl
@@ -110,14 +110,14 @@
set cmdline $repo_config(guitool.$fullname.cmd)
if {[is_config_true "guitool.$fullname.noconsole"]} {
- tools_run_silent [list sh -c $cmdline] \
+ tools_run_silent [list [shellpath] -c $cmdline] \
[list tools_complete $fullname {}]
} else {
regsub {/} $fullname { / } title
set w [console::new \
[mc "Tool: %s" $title] \
[mc "Running: %s" $cmdline]]
- console::exec $w [list sh -c $cmdline] \
+ console::exec $w [list [shellpath] -c $cmdline] \
[list tools_complete $fullname $w]
}
@@ -130,8 +130,7 @@
}
proc tools_run_silent {cmd after} {
- lappend cmd 2>@1
- set fd [_open_stdout_stderr $cmd]
+ set fd [safe_open_command $cmd [list 2>@1]]
fconfigure $fd -blocking 0 -translation binary
fileevent $fd readable [list tools_consume_input $fd $after]
diff --git a/git-gui/lib/tools_dlg.tcl b/git-gui/lib/tools_dlg.tcl
index c05413c..7323621 100644
--- a/git-gui/lib/tools_dlg.tcl
+++ b/git-gui/lib/tools_dlg.tcl
@@ -16,7 +16,7 @@
field ask_args 0; # ask for additional args
constructor dialog {} {
- global repo_config use_ttk NS
+ global repo_config
make_dialog top w
wm title $top [mc "%s (%s): Add Tool" [appname] [reponame]]
@@ -25,41 +25,41 @@
wm transient $top .
}
- ${NS}::label $w.header -text [mc "Add New Tool Command"] \
+ ttk::label $w.header -text [mc "Add New Tool Command"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::checkbutton $w.buttons.global \
+ ttk::frame $w.buttons
+ ttk::checkbutton $w.buttons.global \
-text [mc "Add globally"] \
-variable @add_global
pack $w.buttons.global -side left -padx 5
- ${NS}::button $w.buttons.create -text [mc Add] \
+ ttk::button $w.buttons.create -text [mc Add] \
-default active \
-command [cb _add]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.desc -text [mc "Tool Details"]
+ ttk::labelframe $w.desc -text [mc "Tool Details"]
- ${NS}::label $w.desc.name_cmnt -anchor w\
+ ttk::label $w.desc.name_cmnt -anchor w\
-text [mc "Use '/' separators to create a submenu tree:"]
grid x $w.desc.name_cmnt -sticky we -padx {0 5} -pady {0 2}
- ${NS}::label $w.desc.name_l -text [mc "Name:"]
+ ttk::label $w.desc.name_l -text [mc "Name:"]
set w_name $w.desc.name_t
- ${NS}::entry $w_name \
+ ttk::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate_name %d %S]
grid $w.desc.name_l $w_name -sticky we -padx {0 5}
- ${NS}::label $w.desc.cmd_l -text [mc "Command:"]
+ ttk::label $w.desc.cmd_l -text [mc "Command:"]
set w_cmd $w.desc.cmd_t
- ${NS}::entry $w_cmd \
+ ttk::entry $w_cmd \
-width 40 \
-textvariable @command
grid $w.desc.cmd_l $w_cmd -sticky we -padx {0 5} -pady {0 3}
@@ -67,30 +67,30 @@
grid columnconfigure $w.desc 1 -weight 1
pack $w.desc -anchor nw -fill x -pady 5 -padx 5
- ${NS}::checkbutton $w.confirm \
+ ttk::checkbutton $w.confirm \
-text [mc "Show a dialog before running"] \
-variable @confirm -command [cb _check_enable_dlg]
- ${NS}::labelframe $w.dlg -labelwidget $w.confirm
+ ttk::labelframe $w.dlg -labelwidget $w.confirm
- ${NS}::checkbutton $w.dlg.askbranch \
+ ttk::checkbutton $w.dlg.askbranch \
-text [mc "Ask the user to select a revision (sets \$REVISION)"] \
-variable @ask_branch -state disabled
pack $w.dlg.askbranch -anchor w -padx 15
- ${NS}::checkbutton $w.dlg.askargs \
+ ttk::checkbutton $w.dlg.askargs \
-text [mc "Ask the user for additional arguments (sets \$ARGS)"] \
-variable @ask_args -state disabled
pack $w.dlg.askargs -anchor w -padx 15
pack $w.dlg -anchor nw -fill x -pady {0 8} -padx 5
- ${NS}::checkbutton $w.noconsole \
+ ttk::checkbutton $w.noconsole \
-text [mc "Don't show the command output window"] \
-variable @no_console
pack $w.noconsole -anchor w -padx 5
- ${NS}::checkbutton $w.needsfile \
+ ttk::checkbutton $w.needsfile \
-text [mc "Run only if a diff is selected (\$FILENAME not empty)"] \
-variable @needs_file
pack $w.needsfile -anchor w -padx 5
@@ -179,7 +179,7 @@
field w_names ; # name list
constructor dialog {} {
- global repo_config global_config system_config use_ttk NS
+ global repo_config global_config system_config
load_config 1
@@ -190,21 +190,21 @@
wm transient $top .
}
- ${NS}::label $w.header -text [mc "Remove Tool Commands"] \
+ ttk::label $w.header -text [mc "Remove Tool Commands"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.create -text [mc Remove] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.create -text [mc Remove] \
-default active \
-command [cb _remove]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc Cancel] \
+ ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::frame $w.list
+ ttk::frame $w.list
set w_names $w.list.l
slistbox $w_names \
-height 10 \
@@ -227,7 +227,7 @@
}
if {$local_cnt > 0} {
- ${NS}::label $w.colorlbl -foreground blue \
+ ttk::label $w.colorlbl -foreground blue \
-text [mc "(Blue denotes repository-local tools)"]
pack $w.colorlbl -fill x -pady 5 -padx 5
}
@@ -272,7 +272,7 @@
field argstr {}; # arguments
constructor dialog {fullname} {
- global M1B use_ttk NS
+ global M1B
set title [get_config "guitool.$fullname.title"]
if {$title eq {}} {
@@ -292,7 +292,7 @@
set prompt [mc "Run Command: %s" $command]
}
- ${NS}::label $w.header -text $prompt -font font_uibold -anchor center
+ ttk::label $w.header -text $prompt -font font_uibold -anchor center
pack $w.header -side top -fill x
set argprompt [get_config "guitool.$fullname.argprompt"]
@@ -306,10 +306,10 @@
set argprompt [mc "Arguments"]
}
- ${NS}::labelframe $w.arg -text $argprompt
+ ttk::labelframe $w.arg -text $argprompt
set w_args $w.arg.txt
- ${NS}::entry $w_args \
+ ttk::entry $w_args \
-width 40 \
-textvariable @argstr
pack $w_args -padx 5 -pady 5 -fill both
@@ -330,18 +330,18 @@
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
}
- ${NS}::frame $w.buttons
+ ttk::frame $w.buttons
if {$is_ask_revs} {
- ${NS}::button $w.buttons.visualize \
+ ttk::button $w.buttons.visualize \
-text [mc Visualize] \
-command [cb _visualize]
pack $w.buttons.visualize -side left
}
- ${NS}::button $w.buttons.ok \
+ ttk::button $w.buttons.ok \
-text [mc OK] \
-command [cb _start]
pack $w.buttons.ok -side right
- ${NS}::button $w.buttons.cancel \
+ ttk::button $w.buttons.cancel \
-text [mc "Cancel"] \
-command [cb _cancel]
pack $w.buttons.cancel -side right -padx 5
diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index a1a424a..020d09e 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -120,7 +120,7 @@
proc do_push_anywhere {} {
global all_remotes current_branch
global push_urltype push_remote push_url push_thin push_tags
- global push_force use_ttk NS
+ global push_force
set w .push_setup
toplevel $w
@@ -129,22 +129,22 @@
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
pave_toplevel $w
- ${NS}::label $w.header -text [mc "Push Branches"] \
+ ttk::label $w.header -text [mc "Push Branches"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x
- ${NS}::frame $w.buttons
- ${NS}::button $w.buttons.create -text [mc Push] \
+ ttk::frame $w.buttons
+ ttk::button $w.buttons.create -text [mc Push] \
-default active \
-command [list start_push_anywhere_action $w]
pack $w.buttons.create -side right
- ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
+ ttk::button $w.buttons.cancel -text [mc "Cancel"] \
-default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- ${NS}::labelframe $w.source -text [mc "Source Branches"]
+ ttk::labelframe $w.source -text [mc "Source Branches"]
slistbox $w.source.l \
-height 10 \
-width 70 \
@@ -159,20 +159,16 @@
pack $w.source.l -side left -fill both -expand 1
pack $w.source -fill both -expand 1 -pady 5 -padx 5
- ${NS}::labelframe $w.dest -text [mc "Destination Repository"]
+ ttk::labelframe $w.dest -text [mc "Destination Repository"]
if {$all_remotes ne {}} {
- ${NS}::radiobutton $w.dest.remote_r \
+ ttk::radiobutton $w.dest.remote_r \
-text [mc "Remote:"] \
-value remote \
-variable push_urltype
- if {$use_ttk} {
- ttk::combobox $w.dest.remote_m -state readonly \
- -exportselection false \
- -textvariable push_remote \
- -values $all_remotes
- } else {
- eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
- }
+ ttk::combobox $w.dest.remote_m -state readonly \
+ -exportselection false \
+ -textvariable push_remote \
+ -values $all_remotes
grid $w.dest.remote_r $w.dest.remote_m -sticky w
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
set push_remote origin
@@ -183,11 +179,11 @@
} else {
set push_urltype url
}
- ${NS}::radiobutton $w.dest.url_r \
+ ttk::radiobutton $w.dest.url_r \
-text [mc "Arbitrary Location:"] \
-value url \
-variable push_urltype
- ${NS}::entry $w.dest.url_t \
+ ttk::entry $w.dest.url_t \
-width 50 \
-textvariable push_url \
-validate key \
@@ -202,16 +198,16 @@
grid columnconfigure $w.dest 1 -weight 1
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
- ${NS}::labelframe $w.options -text [mc "Transfer Options"]
- ${NS}::checkbutton $w.options.force \
+ ttk::labelframe $w.options -text [mc "Transfer Options"]
+ ttk::checkbutton $w.options.force \
-text [mc "Force overwrite existing branch (may discard changes)"] \
-variable push_force
grid $w.options.force -columnspan 2 -sticky w
- ${NS}::checkbutton $w.options.thin \
+ ttk::checkbutton $w.options.thin \
-text [mc "Use thin pack (for slow network connections)"] \
-variable push_thin
grid $w.options.thin -columnspan 2 -sticky w
- ${NS}::checkbutton $w.options.tags \
+ ttk::checkbutton $w.options.tags \
-text [mc "Include tags"] \
-variable push_tags
grid $w.options.tags -columnspan 2 -sticky w
diff --git a/git-gui/lib/win32.tcl b/git-gui/lib/win32.tcl
index db91ab8..3aedae2 100644
--- a/git-gui/lib/win32.tcl
+++ b/git-gui/lib/win32.tcl
@@ -2,11 +2,11 @@
# Copyright (C) 2007 Shawn Pearce
proc win32_read_lnk {lnk_path} {
- return [exec cscript.exe \
+ return [safe_exec [list cscript.exe \
/E:jscript \
/nologo \
[file join $::oguilib win32_shortcut.js] \
- $lnk_path]
+ $lnk_path]]
}
proc win32_create_lnk {lnk_path lnk_exec lnk_dir} {
@@ -15,12 +15,13 @@
set lnk_args [lrange $lnk_exec 1 end]
set lnk_exec [lindex $lnk_exec 0]
- eval [list exec wscript.exe \
+ set cmd [list wscript.exe \
/E:jscript \
/nologo \
[file nativename [file join $oguilib win32_shortcut.js]] \
$lnk_path \
[file nativename [file join $oguilib git-gui.ico]] \
$lnk_dir \
- $lnk_exec] $lnk_args
+ $lnk_exec]
+ safe_exec [concat $cmd $lnk_args]
}
diff --git a/git-gui/macosx/AppMain.tcl b/git-gui/macosx/AppMain.tcl
deleted file mode 100644
index b6c6dc3..0000000
--- a/git-gui/macosx/AppMain.tcl
+++ /dev/null
@@ -1,29 +0,0 @@
-set gitexecdir {@@gitexecdir@@}
-if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
- set gitguilib $::env(GIT_GUI_LIB_DIR)
-} else {
- set gitguilib {@@GITGUI_LIBDIR@@}
-}
-
-set env(PATH) "$gitexecdir:$env(PATH)"
-
-if {[string first -psn [lindex $argv 0]] == 0} {
- lset argv 0 [file join $gitexecdir git-gui]
-}
-
-if {[file tail [lindex $argv 0]] eq {gitk}} {
- set argv0 [lindex $argv 0]
- set AppMain_source $argv0
-} else {
- set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
- set AppMain_source [file join $gitguilib git-gui.tcl]
- if {[info exists env(PWD)]} {
- cd $env(PWD)
- } elseif {[pwd] eq {/}} {
- cd $env(HOME)
- }
-}
-
-unset gitexecdir gitguilib
-set argv [lrange $argv 1 end]
-source $AppMain_source
diff --git a/git-gui/macosx/Info.plist b/git-gui/macosx/Info.plist
deleted file mode 100644
index 1ade121..0000000
--- a/git-gui/macosx/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@@GITGUI_TKEXECUTABLE@@</string>
- <key>CFBundleGetInfoString</key>
- <string>Git Gui @@GITGUI_VERSION@@ © 2006-2007 Shawn Pearce, et. al.</string>
- <key>CFBundleIconFile</key>
- <string>git-gui.icns</string>
- <key>CFBundleIdentifier</key>
- <string>cz.or.repo.git-gui</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Git Gui</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>CFBundleSignature</key>
- <string>GITg</string>
- <key>CFBundleVersion</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>NSHighResolutionCapable</key>
- <true/>
-</dict>
-</plist>
diff --git a/git-gui/macosx/git-gui.icns b/git-gui/macosx/git-gui.icns
deleted file mode 100644
index 77d88a7..0000000
--- a/git-gui/macosx/git-gui.icns
+++ /dev/null
Binary files differ
diff --git a/git-gui/meson.build b/git-gui/meson.build
index cdae85e..320ba09 100644
--- a/git-gui/meson.build
+++ b/git-gui/meson.build
@@ -19,17 +19,6 @@
build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
build_options_config.set_quoted('TCL_PATH', fs.as_posix(tclsh.full_path()))
-if target_machine.system() == 'darwin'
- tkexecutables = [
- '/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish Shell.app/Contents/MacOS/Wish Shell',
- ]
- tkexecutable = find_program(tkexecutables)
- build_options_config.set_quoted('TKEXECUTABLE', tkexecutable.full_path())
-else
- build_options_config.set('TKEXECUTABLE', '')
-endif
build_options = configure_file(
input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -49,14 +38,6 @@
build_always_stale: true,
)
-configure_file(
- input: 'git-gui--askpass',
- output: 'git-gui--askpass',
- copy: true,
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
-)
-
gitgui_main = 'git-gui'
gitgui_main_install_dir = get_option('libexecdir') / 'git-core'
@@ -70,55 +51,23 @@
install: true,
install_dir: get_option('libexecdir') / 'git-core',
)
-elif target_machine.system() == 'darwin'
- gitgui_main = 'git-gui.tcl'
- gitgui_main_install_dir = get_option('datadir') / 'git-gui/lib'
-
- custom_target(
- output: 'git-gui',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-wrapper.sh',
- '@OUTPUT@',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- ],
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
- )
-
- custom_target(
- output: 'Git Gui.app',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-app.sh',
- meson.current_source_dir(),
- meson.current_build_dir() / 'Git Gui.app',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- 'macosx/AppMain.tcl',
- 'macosx/Info.plist',
- 'macosx/git-gui.icns',
- ],
- build_by_default: true,
- install: true,
- install_dir: get_option('datadir') / 'git-gui/lib',
- )
endif
custom_target(
+ output: 'git-gui--askpass',
+ input: 'git-gui--askpass.sh',
+ command: [
+ shell,
+ meson.current_source_dir() / 'generate-script.sh',
+ '@OUTPUT@',
+ '@INPUT@',
+ meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
+ ],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
+
+custom_target(
input: 'git-gui.sh',
output: gitgui_main,
command: [
diff --git a/git-gui/po/bg.po b/git-gui/po/bg.po
index 27b0503..21f5bd5 100644
--- a/git-gui/po/bg.po
+++ b/git-gui/po/bg.po
@@ -1,15 +1,15 @@
# Bulgarian translation of git-gui po-file.
-# Copyright (C) 2012, 2013, 2014, 2015, 2016, 2024 Alexander Shopov <ash@kambanaria.org>.
+# Copyright (C) 2012, 2013, 2014, 2015, 2016, 2024, 2025 Alexander Shopov <ash@kambanaria.org>.
# This file is distributed under the same license as the git package.
-# Alexander Shopov <ash@kambanaria.org>, 2012, 2013, 2014, 2015, 2016, 2024.
+# Alexander Shopov <ash@kambanaria.org>, 2012, 2013, 2014, 2015, 2016, 2024, 2025.
#
#
msgid ""
msgstr ""
"Project-Id-Version: git-gui master\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-02-08 22:54+0100\n"
-"PO-Revision-Date: 2024-12-22 15:44+0100\n"
+"POT-Creation-Date: 2025-07-22 17:37+0200\n"
+"PO-Revision-Date: 2025-07-28 11:56+0200\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"Language: bg\n"
@@ -18,88 +18,58 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: git-gui.sh:847
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "Указан е неправилен шрифт в „%s“:"
-#: git-gui.sh:901
msgid "Main Font"
msgstr "Основен шрифт"
-#: git-gui.sh:902
msgid "Diff/Console Font"
msgstr "Шрифт за разликите/конзолата"
-#: git-gui.sh:917 git-gui.sh:931 git-gui.sh:944 git-gui.sh:1034 git-gui.sh:1053
-#: git-gui.sh:3212
msgid "git-gui: fatal error"
msgstr "git-gui: фатална грешка"
-#: git-gui.sh:918
msgid "Cannot find git in PATH."
msgstr "Командата git липсва в пътя (PATH)."
-#: git-gui.sh:945
msgid "Cannot parse Git version string:"
msgstr "Низът с версията на Git не може да се анализира:"
-#: git-gui.sh:970
-#, tcl-format
-msgid ""
-"Git version cannot be determined.\n"
-"\n"
-"%s claims it is version '%s'.\n"
-"\n"
-"%s requires at least Git 1.5.0 or later.\n"
-"\n"
-"Assume '%s' is version 1.5.0?\n"
-msgstr ""
-"Версията на Git не може да се определи.\n"
-"\n"
-"Версията на „%s“ изглежда, че е „%s“.\n"
-"\n"
-"„%s“ изисква Git, версия поне 1.5.0.\n"
-"\n"
-"Да се приеме ли, че „%s“ е версия „1.5.0“?\n"
+msgid "Insufficient git version, require: "
+msgstr "Прекалено ниска версия на git, необходима е поне: "
-#: git-gui.sh:1267
+msgid "git returned:"
+msgstr "git върна:"
+
msgid "Git directory not found:"
msgstr "Директорията на Git не е открита:"
-#: git-gui.sh:1301
msgid "Cannot move to top of working directory:"
msgstr "Не може да се премине към родителската директория."
-#: git-gui.sh:1309
msgid "Cannot use bare repository:"
msgstr "Голо хранилище не може да се използва:"
-#: git-gui.sh:1317
msgid "No working directory"
msgstr "Работната директория липсва"
-#: git-gui.sh:1491 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "Обновяване на състоянието на файла…"
-#: git-gui.sh:1551
msgid "Scanning for modified files ..."
msgstr "Проверка за променени файлове…"
-#: git-gui.sh:1629
msgid "Calling prepare-commit-msg hook..."
msgstr "Куката „prepare-commit-msg“ се изпълнява в момента…"
-#: git-gui.sh:1646
msgid "Commit declined by prepare-commit-msg hook."
msgstr "Подаването е отхвърлено от куката „prepare-commit-msg“."
-#: git-gui.sh:1804 lib/browser.tcl:252
msgid "Ready."
msgstr "Готово."
-#: git-gui.sh:1968
#, tcl-format
msgid ""
"Display limit (gui.maxfilesdisplayed = %s) reached, not showing all %s files."
@@ -108,696 +78,630 @@
"извеждане(gui.maxfilesdisplayed = %s), съответно не са показани всички %s "
"файла."
-#: git-gui.sh:2091
msgid "Unmodified"
msgstr "Непроменен"
-#: git-gui.sh:2093
msgid "Modified, not staged"
msgstr "Променен, но не е в индекса"
-#: git-gui.sh:2094 git-gui.sh:2106
msgid "Staged for commit"
msgstr "В индекса за подаване"
-#: git-gui.sh:2095 git-gui.sh:2107
msgid "Portions staged for commit"
msgstr "Части са в индекса за подаване"
-#: git-gui.sh:2096 git-gui.sh:2108
msgid "Staged for commit, missing"
msgstr "В индекса за подаване, но липсва"
-#: git-gui.sh:2098
msgid "File type changed, not staged"
msgstr "Видът на файла е сменен, но не е в индекса"
-#: git-gui.sh:2099 git-gui.sh:2100
msgid "File type changed, old type staged for commit"
msgstr "Видът на файла е сменен, но новият вид не е в индекса"
-#: git-gui.sh:2101
msgid "File type changed, staged"
msgstr "Видът на файла е сменен и е в индекса"
-#: git-gui.sh:2102
msgid "File type change staged, modification not staged"
msgstr "Видът на файла е сменен в индекса, но не и съдържанието"
-#: git-gui.sh:2103
msgid "File type change staged, file missing"
msgstr "Видът на файла е сменен в индекса, но файлът липсва"
-#: git-gui.sh:2105
msgid "Untracked, not staged"
msgstr "Неследен"
-#: git-gui.sh:2110
msgid "Missing"
msgstr "Липсващ"
-#: git-gui.sh:2111
msgid "Staged for removal"
msgstr "В индекса за изтриване"
-#: git-gui.sh:2112
msgid "Staged for removal, still present"
msgstr "В индекса за изтриване, но още го има"
-#: git-gui.sh:2114 git-gui.sh:2115 git-gui.sh:2116 git-gui.sh:2117
-#: git-gui.sh:2118 git-gui.sh:2119
msgid "Requires merge resolution"
msgstr "Изисква коригиране при сливане"
-#: git-gui.sh:2164
msgid "Couldn't find gitk in PATH"
msgstr "Командата „gitk“ липсва в пътищата, определени от променливата PATH."
-#: git-gui.sh:2210 git-gui.sh:2245
#, tcl-format
msgid "Starting %s... please wait..."
msgstr "Стартиране на „%s“…, изчакайте…"
-#: git-gui.sh:2224
msgid "Couldn't find git gui in PATH"
msgstr ""
"Командата „git gui“ липсва в пътищата, определени от променливата PATH."
-#: git-gui.sh:2726 lib/choose_repository.tcl:53
msgid "Repository"
msgstr "Хранилище"
-#: git-gui.sh:2727
msgid "Edit"
msgstr "Редактиране"
-#: git-gui.sh:2729 lib/choose_rev.tcl:567
msgid "Branch"
msgstr "Клон"
-#: git-gui.sh:2732 lib/choose_rev.tcl:554
msgid "Commit@@noun"
msgstr "Подаване"
-#: git-gui.sh:2735 lib/merge.tcl:127 lib/merge.tcl:174
msgid "Merge"
msgstr "Сливане"
-#: git-gui.sh:2736 lib/choose_rev.tcl:563
msgid "Remote"
msgstr "Отдалечено хранилище"
-#: git-gui.sh:2739
msgid "Tools"
msgstr "Команди"
-#: git-gui.sh:2748
msgid "Explore Working Copy"
msgstr "Разглеждане на работното копие"
-#: git-gui.sh:2763
msgid "Git Bash"
msgstr "Bash за Git"
-#: git-gui.sh:2772
msgid "Browse Current Branch's Files"
msgstr "Разглеждане на файловете в текущия клон"
-#: git-gui.sh:2776
msgid "Browse Branch Files..."
msgstr "Разглеждане на текущия клон…"
-#: git-gui.sh:2781
msgid "Visualize Current Branch's History"
msgstr "Визуализация на историята на текущия клон"
-#: git-gui.sh:2785
msgid "Visualize All Branch History"
msgstr "Визуализация на историята на всички клонове"
-#: git-gui.sh:2792
#, tcl-format
msgid "Browse %s's Files"
msgstr "Разглеждане на файловете в „%s“"
-#: git-gui.sh:2794
#, tcl-format
msgid "Visualize %s's History"
msgstr "Визуализация на историята на „%s“"
-#: git-gui.sh:2799 lib/database.tcl:40
msgid "Database Statistics"
msgstr "Статистика на базата от данни"
-#: git-gui.sh:2802 lib/database.tcl:33
msgid "Compress Database"
msgstr "Компресиране на базата от данни"
-#: git-gui.sh:2805
msgid "Verify Database"
msgstr "Проверка на базата от данни"
-#: git-gui.sh:2812 git-gui.sh:2816 git-gui.sh:2820
msgid "Create Desktop Icon"
msgstr "Добавяне на икона на работния плот"
-#: git-gui.sh:2828 lib/choose_repository.tcl:209 lib/choose_repository.tcl:217
msgid "Quit"
msgstr "Спиране на програмата"
-#: git-gui.sh:2836
msgid "Undo"
msgstr "Отмяна"
-#: git-gui.sh:2839
msgid "Redo"
msgstr "Повторение"
-#: git-gui.sh:2843 git-gui.sh:3461
msgid "Cut"
msgstr "Отрязване"
-#: git-gui.sh:2846 git-gui.sh:3464 git-gui.sh:3540 git-gui.sh:3633
-#: lib/console.tcl:69
msgid "Copy"
msgstr "Копиране"
-#: git-gui.sh:2849 git-gui.sh:3467
msgid "Paste"
msgstr "Поставяне"
-#: git-gui.sh:2852 git-gui.sh:3470 lib/remote_branch_delete.tcl:39
-#: lib/branch_delete.tcl:28
msgid "Delete"
msgstr "Изтриване"
-#: git-gui.sh:2856 git-gui.sh:3474 git-gui.sh:3637 lib/console.tcl:71
msgid "Select All"
msgstr "Избиране на всичко"
-#: git-gui.sh:2865
msgid "Create..."
msgstr "Създаване…"
-#: git-gui.sh:2871
msgid "Checkout..."
msgstr "Изтегляне…"
-#: git-gui.sh:2877
msgid "Rename..."
msgstr "Преименуване…"
-#: git-gui.sh:2882
msgid "Delete..."
msgstr "Изтриване…"
-#: git-gui.sh:2887
msgid "Reset..."
msgstr "Отмяна на промените…"
-#: git-gui.sh:2897
msgid "Done"
msgstr "Готово"
-#: git-gui.sh:2899
msgid "Commit@@verb"
msgstr "Подаване"
-#: git-gui.sh:2908 git-gui.sh:3400
msgid "Amend Last Commit"
msgstr "Поправяне на последното подаване"
-#: git-gui.sh:2918 git-gui.sh:3361 lib/remote_branch_delete.tcl:101
msgid "Rescan"
msgstr "Обновяване"
-#: git-gui.sh:2924
msgid "Stage To Commit"
msgstr "Към индекса за подаване"
-#: git-gui.sh:2930
msgid "Stage Changed Files To Commit"
msgstr "Всички променени файлове към индекса за подаване"
-#: git-gui.sh:2936
msgid "Unstage From Commit"
msgstr "Изваждане от индекса за подаване"
-#: git-gui.sh:2942 lib/index.tcl:521
msgid "Revert Changes"
msgstr "Връщане на оригинала"
-#: git-gui.sh:2950 git-gui.sh:3700 git-gui.sh:3731
msgid "Show Less Context"
msgstr "По-малко контекст"
-#: git-gui.sh:2954 git-gui.sh:3704 git-gui.sh:3735
msgid "Show More Context"
msgstr "Повече контекст"
-#: git-gui.sh:2961 git-gui.sh:3374 git-gui.sh:3485
msgid "Sign Off"
msgstr "Подписване"
-#: git-gui.sh:2977
msgid "Local Merge..."
msgstr "Локално сливане…"
-#: git-gui.sh:2982
msgid "Abort Merge..."
msgstr "Преустановяване на сливане…"
-#: git-gui.sh:2994 git-gui.sh:3022
msgid "Add..."
msgstr "Добавяне…"
-#: git-gui.sh:2998
msgid "Push..."
msgstr "Изтласкване…"
-#: git-gui.sh:3002
msgid "Delete Branch..."
msgstr "Изтриване на клон…"
-#: git-gui.sh:3012 git-gui.sh:3666
msgid "Options..."
msgstr "Опции…"
-#: git-gui.sh:3023
msgid "Remove..."
msgstr "Премахване…"
-#: git-gui.sh:3032 lib/choose_repository.tcl:67
msgid "Help"
msgstr "Помощ"
-#: git-gui.sh:3036 git-gui.sh:3040 lib/choose_repository.tcl:61
-#: lib/choose_repository.tcl:70 lib/about.tcl:14
#, tcl-format
msgid "About %s"
msgstr "Относно „%s“"
-#: git-gui.sh:3064
msgid "Online Documentation"
msgstr "Документация в Интернет"
-#: git-gui.sh:3067 lib/choose_repository.tcl:64 lib/choose_repository.tcl:73
msgid "Show SSH Key"
msgstr "Показване на ключа за SSH"
-#: git-gui.sh:3097 git-gui.sh:3229
msgid "usage:"
msgstr "употреба:"
-#: git-gui.sh:3101 git-gui.sh:3233
msgid "Usage"
msgstr "Употреба"
-#: git-gui.sh:3182 lib/blame.tcl:575
msgid "Error"
msgstr "Грешка"
-#: git-gui.sh:3213
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr "ФАТАЛНА ГРЕШКА: пътят „%s“ липсва: такъв файл или директория няма"
-#: git-gui.sh:3246
msgid "Current Branch:"
msgstr "Текущ клон:"
-#: git-gui.sh:3271
msgid "Unstaged Changes"
msgstr "Промени извън индекса"
-#: git-gui.sh:3293
msgid "Staged Changes (Will Commit)"
msgstr "Промени в индекса (за подаване)"
-#: git-gui.sh:3367
msgid "Stage Changed"
msgstr "Индексът е променен"
-#: git-gui.sh:3386 lib/transport.tcl:137
msgid "Push"
msgstr "Изтласкване"
-#: git-gui.sh:3413
msgid "Initial Commit Message:"
msgstr "Първоначално съобщение при подаване:"
-#: git-gui.sh:3414
msgid "Amended Commit Message:"
msgstr "Поправено съобщение при подаване:"
-#: git-gui.sh:3415
msgid "Amended Initial Commit Message:"
msgstr "Поправено първоначално съобщение при подаване:"
-#: git-gui.sh:3416
msgid "Amended Merge Commit Message:"
msgstr "Поправено съобщение при подаване със сливане:"
-#: git-gui.sh:3417
msgid "Merge Commit Message:"
msgstr "Съобщение при подаване със сливане:"
-#: git-gui.sh:3418
msgid "Commit Message:"
msgstr "Съобщение при подаване:"
-#: git-gui.sh:3477 git-gui.sh:3641 lib/console.tcl:73
msgid "Copy All"
msgstr "Копиране на всичко"
-#: git-gui.sh:3501 lib/blame.tcl:106
msgid "File:"
msgstr "Файл:"
-#: git-gui.sh:3549 lib/choose_repository.tcl:1100
msgid "Open"
msgstr "Отваряне"
-#: git-gui.sh:3629
msgid "Refresh"
msgstr "Обновяване"
-#: git-gui.sh:3650
msgid "Decrease Font Size"
msgstr "По-дребен шрифт"
-#: git-gui.sh:3654
msgid "Increase Font Size"
msgstr "По-едър шрифт"
-#: git-gui.sh:3662 lib/blame.tcl:296
msgid "Encoding"
msgstr "Кодиране"
-#: git-gui.sh:3673
msgid "Apply/Reverse Hunk"
msgstr "Прилагане/връщане на парче"
-#: git-gui.sh:3678
msgid "Apply/Reverse Line"
msgstr "Прилагане/връщане на ред"
-#: git-gui.sh:3684 git-gui.sh:3794 git-gui.sh:3805
msgid "Revert Hunk"
msgstr "Връщане на парче"
-#: git-gui.sh:3689 git-gui.sh:3801 git-gui.sh:3812
msgid "Revert Line"
msgstr "Връщане на ред"
-#: git-gui.sh:3694 git-gui.sh:3791
msgid "Undo Last Revert"
msgstr "Отмяна на последното връщане"
-#: git-gui.sh:3713
msgid "Run Merge Tool"
msgstr "Изпълнение на програмата за сливане"
-#: git-gui.sh:3718
msgid "Use Remote Version"
msgstr "Версия от отдалеченото хранилище"
-#: git-gui.sh:3722
msgid "Use Local Version"
msgstr "Локална версия"
-#: git-gui.sh:3726
msgid "Revert To Base"
msgstr "Връщане към родителската версия"
-#: git-gui.sh:3744
msgid "Visualize These Changes In The Submodule"
msgstr "Визуализиране на промените в подмодула"
-#: git-gui.sh:3748
msgid "Visualize Current Branch History In The Submodule"
msgstr "Визуализация на историята на текущия клон в историята за подмодула"
-#: git-gui.sh:3752
msgid "Visualize All Branch History In The Submodule"
msgstr "Визуализация на историята на всички клони в историята за подмодула"
-#: git-gui.sh:3757
msgid "Start git gui In The Submodule"
msgstr "Стартиране на „git gui“ за подмодула"
-#: git-gui.sh:3793
msgid "Unstage Hunk From Commit"
msgstr "Изваждане на парчето от подаването"
-#: git-gui.sh:3797
msgid "Unstage Lines From Commit"
msgstr "Изваждане на редовете от подаването"
-#: git-gui.sh:3798 git-gui.sh:3809
msgid "Revert Lines"
msgstr "Връщане на редовете"
-#: git-gui.sh:3800
msgid "Unstage Line From Commit"
msgstr "Изваждане на реда от подаването"
-#: git-gui.sh:3804
msgid "Stage Hunk For Commit"
msgstr "Добавяне на парчето за подаване"
-#: git-gui.sh:3808
msgid "Stage Lines For Commit"
msgstr "Добавяне на редовете за подаване"
-#: git-gui.sh:3811
msgid "Stage Line For Commit"
msgstr "Добавяне на реда за подаване"
-#: git-gui.sh:3861
msgid "Initializing..."
msgstr "Инициализиране…"
-#: git-gui.sh:4017
+msgid "git-gui - a graphical user interface for Git."
+msgstr "git-gui — графичен интерфейс за Git."
+
#, tcl-format
-msgid ""
-"Possible environment issues exist.\n"
-"\n"
-"The following environment variables are probably\n"
-"going to be ignored by any Git subprocess run\n"
-"by %s:\n"
-"\n"
-msgstr ""
-"Възможно е да има проблем със средата.\n"
-"\n"
-"Най-вероятно следните променливи няма да се\n"
-"вземат под внимание от подпроцесите на Git\n"
-"от %s:\n"
-"\n"
+msgid "%s (%s): File Viewer"
+msgstr "%s (%s): Преглед на файлове"
-#: git-gui.sh:4046
-msgid ""
-"\n"
-"This is due to a known issue with the\n"
-"Tcl binary distributed by Cygwin."
-msgstr ""
-"\n"
-"Това е познат проблем и се дължи на\n"
-"версията на Tcl включена в Cygwin."
+msgid "Commit:"
+msgstr "Подаване:"
-#: git-gui.sh:4051
+msgid "Copy Commit"
+msgstr "Копиране на подаване"
+
+msgid "Find Text..."
+msgstr "Търсене на текст…"
+
+msgid "Goto Line..."
+msgstr "Към ред…"
+
+msgid "Do Full Copy Detection"
+msgstr "Пълно търсене на копиране"
+
+msgid "Show History Context"
+msgstr "Показване на контекста от историята"
+
+msgid "Blame Parent Commit"
+msgstr "Анотиране на родителското подаване"
+
#, tcl-format
-msgid ""
-"\n"
-"\n"
-"A good replacement for %s\n"
-"is placing values for the user.name and\n"
-"user.email settings into your personal\n"
-"~/.gitconfig file.\n"
-msgstr ""
-"\n"
-"\n"
-"Добър заместител на „%s“\n"
-"е да поставите настройките „user.name“ и\n"
-"„user.email“ в личния си файл „~/.gitconfig“.\n"
+msgid "Reading %s..."
+msgstr "Чете се „%s“…"
-#: lib/spellcheck.tcl:57
-msgid "Unsupported spell checker"
-msgstr "Тази програма за проверка на правописа не се поддържа"
+msgid "Loading copy/move tracking annotations..."
+msgstr "Зареждане на анотациите за проследяване на копирането/преместването…"
-#: lib/spellcheck.tcl:65
-msgid "Spell checking is unavailable"
-msgstr "Липсва програма за проверка на правописа"
+msgid "lines annotated"
+msgstr "реда анотирани"
-#: lib/spellcheck.tcl:68
-msgid "Invalid spell checking configuration"
-msgstr "Неправилни настройки на проверката на правописа"
+msgid "Loading original location annotations..."
+msgstr "Зареждане на анотациите за първоначалното местоположение…"
-#: lib/spellcheck.tcl:70
+msgid "Annotation complete."
+msgstr "Анотирането завърши."
+
+msgid "Busy"
+msgstr "Операцията не е завършила"
+
+msgid "Annotation process is already running."
+msgstr "В момента тече процес на анотиране."
+
+msgid "Running thorough copy detection..."
+msgstr "Изпълнява се цялостен процес на откриване на копиране…"
+
+msgid "Loading annotation..."
+msgstr "Зареждане на анотации…"
+
+msgid "Author:"
+msgstr "Автор:"
+
+msgid "Committer:"
+msgstr "Подал:"
+
+msgid "Original File:"
+msgstr "Първоначален файл:"
+
+msgid "Cannot find HEAD commit:"
+msgstr "Подаването за връх „HEAD“ не може да се открие:"
+
+msgid "Cannot find parent commit:"
+msgstr "Родителското подаване не може да се открие"
+
+msgid "Unable to display parent"
+msgstr "Родителят не може да се покаже"
+
+msgid "Error loading diff:"
+msgstr "Грешка при зареждане на разлика:"
+
+msgid "Originally By:"
+msgstr "Първоначално от:"
+
+msgid "In File:"
+msgstr "Във файл:"
+
+msgid "Copied Or Moved Here By:"
+msgstr "Копирано или преместено тук от:"
+
#, tcl-format
-msgid "Reverting dictionary to %s."
-msgstr "Ползване на речник за език „%s“."
+msgid "%s (%s): Checkout Branch"
+msgstr "%s (%s): Клон за изтегляне"
-#: lib/spellcheck.tcl:73
-msgid "Spell checker silently failed on startup"
-msgstr "Програмата за правопис даже не стартира успешно."
+msgid "Checkout Branch"
+msgstr "Клон за изтегляне"
-#: lib/spellcheck.tcl:80
-msgid "Unrecognized spell checker"
-msgstr "Непозната програма за проверка на правописа"
+msgid "Checkout"
+msgstr "Изтегляне"
-#: lib/spellcheck.tcl:186
-msgid "No Suggestions"
-msgstr "Няма предложения"
-
-#: lib/spellcheck.tcl:388
-msgid "Unexpected EOF from spell checker"
-msgstr "Неочакван край на файл от програмата за проверка на правописа"
-
-#: lib/spellcheck.tcl:392
-msgid "Spell Checker Failed"
-msgstr "Грешка в програмата за проверка на правописа"
-
-#: lib/transport.tcl:6 lib/remote_add.tcl:132
-#, tcl-format
-msgid "fetch %s"
-msgstr "доставяне на „%s“"
-
-#: lib/transport.tcl:7
-#, tcl-format
-msgid "Fetching new changes from %s"
-msgstr "Доставяне на промените от „%s“"
-
-#: lib/transport.tcl:18
-#, tcl-format
-msgid "remote prune %s"
-msgstr "окастряне на следящите клони към „%s“"
-
-#: lib/transport.tcl:19
-#, tcl-format
-msgid "Pruning tracking branches deleted from %s"
-msgstr "Окастряне на следящите клони на изтритите клони от „%s“"
-
-#: lib/transport.tcl:25
-msgid "fetch all remotes"
-msgstr "доставяне от всички отдалечени"
-
-#: lib/transport.tcl:26
-msgid "Fetching new changes from all remotes"
-msgstr "Доставяне на промените от всички отдалечени хранилища"
-
-#: lib/transport.tcl:40
-msgid "remote prune all remotes"
-msgstr "окастряне на следящите изтрити"
-
-#: lib/transport.tcl:41
-msgid "Pruning tracking branches deleted from all remotes"
-msgstr ""
-"Окастряне на следящите клони на изтритите клони от всички отдалечени "
-"хранилища"
-
-#: lib/transport.tcl:54 lib/transport.tcl:92 lib/transport.tcl:110
-#: lib/remote_add.tcl:162
-#, tcl-format
-msgid "push %s"
-msgstr "изтласкване на „%s“"
-
-#: lib/transport.tcl:55
-#, tcl-format
-msgid "Pushing changes to %s"
-msgstr "Изтласкване на промените към „%s“"
-
-#: lib/transport.tcl:93
-#, tcl-format
-msgid "Mirroring to %s"
-msgstr "Изтласкване на всичко към „%s“"
-
-#: lib/transport.tcl:111
-#, tcl-format
-msgid "Pushing %s %s to %s"
-msgstr "Изтласкване на %s „%s“ към „%s“"
-
-#: lib/transport.tcl:132
-msgid "Push Branches"
-msgstr "Клони за изтласкване"
-
-#: lib/transport.tcl:141 lib/checkout_op.tcl:580 lib/remote_add.tcl:34
-#: lib/browser.tcl:292 lib/branch_checkout.tcl:30 lib/branch_rename.tcl:32
-#: lib/choose_font.tcl:45 lib/option.tcl:127 lib/tools_dlg.tcl:41
-#: lib/tools_dlg.tcl:202 lib/tools_dlg.tcl:345 lib/remote_branch_delete.tcl:43
-#: lib/branch_create.tcl:37 lib/branch_delete.tcl:34 lib/merge.tcl:178
msgid "Cancel"
msgstr "Отказване"
-#: lib/transport.tcl:147
-msgid "Source Branches"
-msgstr "Клони-източници"
+msgid "Revision"
+msgstr "Версия"
-#: lib/transport.tcl:162
-msgid "Destination Repository"
-msgstr "Целево хранилище"
+msgid "Options"
+msgstr "Опции"
-#: lib/transport.tcl:165 lib/remote_branch_delete.tcl:51
-msgid "Remote:"
-msgstr "Отдалечено хранилище:"
+msgid "Fetch Tracking Branch"
+msgstr "Изтегляне на промените от следения клон"
-#: lib/transport.tcl:187 lib/remote_branch_delete.tcl:72
-msgid "Arbitrary Location:"
-msgstr "Произволно местоположение:"
+msgid "Detach From Local Branch"
+msgstr "Изтриване от локалния клон"
-#: lib/transport.tcl:205
-msgid "Transfer Options"
-msgstr "Настройки при пренасянето"
+#, tcl-format
+msgid "%s (%s): Create Branch"
+msgstr "%s (%s): Създаване на клон"
-#: lib/transport.tcl:207
-msgid "Force overwrite existing branch (may discard changes)"
+msgid "Create New Branch"
+msgstr "Създаване на нов клон"
+
+msgid "Create"
+msgstr "Създаване"
+
+msgid "Branch Name"
+msgstr "Име на клона"
+
+msgid "Name:"
+msgstr "Име:"
+
+msgid "Match Tracking Branch Name"
+msgstr "Съвпадане по името на следения клон"
+
+msgid "Starting Revision"
+msgstr "Начална версия"
+
+msgid "Update Existing Branch:"
+msgstr "Обновяване на съществуващ клон:"
+
+msgid "No"
+msgstr "Не"
+
+msgid "Fast Forward Only"
+msgstr "Само тривиално превъртащо сливане"
+
+msgid "Reset"
+msgstr "Отначало"
+
+msgid "Checkout After Creation"
+msgstr "Преминаване към клона след създаването му"
+
+msgid "Please select a tracking branch."
+msgstr "Изберете клон за следени."
+
+#, tcl-format
+msgid "Tracking branch %s is not a branch in the remote repository."
+msgstr "Следящият клон — „%s“, не съществува в отдалеченото хранилище."
+
+msgid "Please supply a branch name."
+msgstr "Дайте име на клона."
+
+#, tcl-format
+msgid "'%s' is not an acceptable branch name."
+msgstr "„%s“ не може да се използва за име на клон."
+
+#, tcl-format
+msgid "%s (%s): Delete Branch"
+msgstr "%s (%s): Изтриване на клон"
+
+msgid "Delete Local Branch"
+msgstr "Изтриване на локален клон"
+
+msgid "Local Branches"
+msgstr "Локални клони"
+
+msgid "Delete Only If Merged Into"
+msgstr "Изтриване, само ако промените са слети и другаде"
+
+msgid "Always (Do not perform merge checks)"
+msgstr "Винаги (без проверка за сливане)"
+
+#, tcl-format
+msgid "The following branches are not completely merged into %s:"
+msgstr "Не всички промени в клоните са слети в „%s“:"
+
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
msgstr ""
-"Изрично презаписване на съществуващ клон (някои промени може да се загубят)"
+"Възстановяването на изтрити клони може да е трудно.\n"
+"\n"
+"Сигурни ли сте, че искате да триете?"
-#: lib/transport.tcl:211
-msgid "Use thin pack (for slow network connections)"
-msgstr "Максимална компресия (за бавни мрежови връзки)"
-
-#: lib/transport.tcl:215
-msgid "Include tags"
-msgstr "Включване на етикетите"
-
-#: lib/transport.tcl:229
#, tcl-format
-msgid "%s (%s): Push"
-msgstr "%s (%s): Изтласкване"
+msgid " - %s:"
+msgstr " — „%s:“"
-#: lib/checkout_op.tcl:85
#, tcl-format
-msgid "Fetching %s from %s"
-msgstr "Доставяне на „%s“ от „%s“"
+msgid ""
+"Failed to delete branches:\n"
+"%s"
+msgstr ""
+"Неуспешно триене на клони:\n"
+"%s"
-#: lib/checkout_op.tcl:133
#, tcl-format
-msgid "fatal: Cannot resolve %s"
-msgstr "фатална грешка: „%s“ не може да се открие"
+msgid "%s (%s): Rename Branch"
+msgstr "%s (%s): Преименуване на клон"
-#: lib/checkout_op.tcl:146 lib/sshkey.tcl:58 lib/console.tcl:81
-#: lib/database.tcl:30
-msgid "Close"
-msgstr "Затваряне"
+msgid "Rename Branch"
+msgstr "Преименуване на клон"
-#: lib/checkout_op.tcl:175
-#, tcl-format
-msgid "Branch '%s' does not exist."
-msgstr "Клонът „%s“ не съществува."
+msgid "Rename"
+msgstr "Преименуване"
-#: lib/checkout_op.tcl:194
-#, tcl-format
-msgid "Failed to configure simplified git-pull for '%s'."
-msgstr "Неуспешно настройване на опростен git-pull за „%s“."
+msgid "Branch:"
+msgstr "Клон:"
-#: lib/checkout_op.tcl:202 lib/branch_rename.tcl:102
+msgid "New Name:"
+msgstr "Ново име:"
+
+msgid "Please select a branch to rename."
+msgstr "Изберете клон за преименуване."
+
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "Клонът „%s“ вече съществува."
-#: lib/checkout_op.tcl:229
+#, tcl-format
+msgid "Failed to rename '%s'."
+msgstr "Неуспешно преименуване на „%s“."
+
+msgid "Starting..."
+msgstr "Стартиране…"
+
+#, tcl-format
+msgid "%s (%s): File Browser"
+msgstr "%s (%s): Файлов браузър"
+
+#, tcl-format
+msgid "Loading %s..."
+msgstr "Зареждане на „%s“…"
+
+msgid "[Up To Parent]"
+msgstr "[Към родителя]"
+
+#, tcl-format
+msgid "%s (%s): Browse Branch Files"
+msgstr "%s (%s): Разглеждане на файловете в клона"
+
+msgid "Browse Branch Files"
+msgstr "Разглеждане на файловете в клона"
+
+msgid "Browse"
+msgstr "Разглеждане"
+
+#, tcl-format
+msgid "Fetching %s from %s"
+msgstr "Доставяне на „%s“ от „%s“"
+
+#, tcl-format
+msgid "fatal: Cannot resolve %s"
+msgstr "фатална грешка: „%s“ не може да се открие"
+
+msgid "Close"
+msgstr "Затваряне"
+
+#, tcl-format
+msgid "Branch '%s' does not exist."
+msgstr "Клонът „%s“ не съществува."
+
+#, tcl-format
+msgid "Failed to configure simplified git-pull for '%s'."
+msgstr "Неуспешно настройване на опростен git-pull за „%s“."
+
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -810,21 +714,17 @@
"Той не може да се слее тривиално до „%s“.\n"
"Необходимо е сливане."
-#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "Стратегия за сливане „%s“ не се поддържа."
-#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "Неуспешно обновяване на „%s“."
-#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr "Индексът вече е заключен."
-#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -841,31 +741,25 @@
"\n"
"Автоматично ще започне нова проверка.\n"
-#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Работната директория се привежда към „%s“…"
-#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "файла са изтеглени"
-#: lib/checkout_op.tcl:377
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
msgstr ""
"Преустановяване на изтеглянето на „%s“ (необходимо е пофайлово сливане)."
-#: lib/checkout_op.tcl:378
msgid "File level merge required."
msgstr "Необходимо е пофайлово сливане."
-#: lib/checkout_op.tcl:382
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Оставане върху клона „%s“."
-#: lib/checkout_op.tcl:453
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -876,35 +770,25 @@
"\n"
"Ако искате да сте на клон, създайте базиран на „Това несвързано изтегляне“."
-#: lib/checkout_op.tcl:504 lib/checkout_op.tcl:508
#, tcl-format
msgid "Checked out '%s'."
msgstr "„%s“ е изтеглен."
-#: lib/checkout_op.tcl:536
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr ""
"Зануляването на „%s“ към „%s“ ще доведе до загубването на следните подавания:"
-#: lib/checkout_op.tcl:558
msgid "Recovering lost commits may not be easy."
msgstr "Възстановяването на загубените подавания може да е трудно."
-#: lib/checkout_op.tcl:563
#, tcl-format
msgid "Reset '%s'?"
msgstr "Зануляване на „%s“?"
-#: lib/checkout_op.tcl:568 lib/tools_dlg.tcl:336 lib/merge.tcl:170
msgid "Visualize"
msgstr "Визуализация"
-#: lib/checkout_op.tcl:572 lib/branch_create.tcl:85
-msgid "Reset"
-msgstr "Отначало"
-
-#: lib/checkout_op.tcl:636
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -922,344 +806,18 @@
"Това състояние е аварийно и не трябва да се случва. Програмата „%s“ ще "
"преустанови работа."
-#: lib/remote_add.tcl:20
-#, tcl-format
-msgid "%s (%s): Add Remote"
-msgstr "%s (%s): Добавяне на отдалечено хранилище"
-
-#: lib/remote_add.tcl:25
-msgid "Add New Remote"
-msgstr "Добавяне на отдалечено хранилище"
-
-#: lib/remote_add.tcl:30 lib/tools_dlg.tcl:37
-msgid "Add"
-msgstr "Добавяне"
-
-#: lib/remote_add.tcl:39
-msgid "Remote Details"
-msgstr "Данни за отдалеченото хранилище"
-
-#: lib/remote_add.tcl:41 lib/tools_dlg.tcl:51 lib/branch_create.tcl:44
-msgid "Name:"
-msgstr "Име:"
-
-#: lib/remote_add.tcl:50
-msgid "Location:"
-msgstr "Местоположение:"
-
-#: lib/remote_add.tcl:60
-msgid "Further Action"
-msgstr "Следващо действие"
-
-#: lib/remote_add.tcl:63
-msgid "Fetch Immediately"
-msgstr "Незабавно доставяне"
-
-#: lib/remote_add.tcl:69
-msgid "Initialize Remote Repository and Push"
-msgstr "Инициализиране на отдалеченото хранилище и изтласкване на промените"
-
-#: lib/remote_add.tcl:75
-msgid "Do Nothing Else Now"
-msgstr "Да не се прави нищо"
-
-#: lib/remote_add.tcl:100
-msgid "Please supply a remote name."
-msgstr "Задайте име за отдалеченото хранилище."
-
-#: lib/remote_add.tcl:113
-#, tcl-format
-msgid "'%s' is not an acceptable remote name."
-msgstr "Отдалечено хранилище не може да се казва „%s“."
-
-#: lib/remote_add.tcl:124
-#, tcl-format
-msgid "Failed to add remote '%s' of location '%s'."
-msgstr "Неуспешно добавяне на отдалеченото хранилище „%s“ от адрес „%s“."
-
-#: lib/remote_add.tcl:133
-#, tcl-format
-msgid "Fetching the %s"
-msgstr "Доставяне на „%s“"
-
-#: lib/remote_add.tcl:156
-#, tcl-format
-msgid "Do not know how to initialize repository at location '%s'."
-msgstr "Хранилището с местоположение „%s“ не може да се инициализира."
-
-#: lib/remote_add.tcl:163
-#, tcl-format
-msgid "Setting up the %s (at %s)"
-msgstr "Добавяне на хранилище „%s“ (с адрес „%s“)"
-
-#: lib/browser.tcl:17
-msgid "Starting..."
-msgstr "Стартиране…"
-
-#: lib/browser.tcl:27
-#, tcl-format
-msgid "%s (%s): File Browser"
-msgstr "%s (%s): Файлов браузър"
-
-#: lib/browser.tcl:132 lib/browser.tcl:149
-#, tcl-format
-msgid "Loading %s..."
-msgstr "Зареждане на „%s“…"
-
-#: lib/browser.tcl:193
-msgid "[Up To Parent]"
-msgstr "[Към родителя]"
-
-#: lib/browser.tcl:275
-#, tcl-format
-msgid "%s (%s): Browse Branch Files"
-msgstr "%s (%s): Разглеждане на файловете в клона"
-
-#: lib/browser.tcl:282
-msgid "Browse Branch Files"
-msgstr "Разглеждане на файловете в клона"
-
-#: lib/browser.tcl:288 lib/choose_repository.tcl:437
-#: lib/choose_repository.tcl:524 lib/choose_repository.tcl:533
-#: lib/choose_repository.tcl:1115
-msgid "Browse"
-msgstr "Разглеждане"
-
-#: lib/browser.tcl:297 lib/branch_checkout.tcl:35 lib/tools_dlg.tcl:321
-msgid "Revision"
-msgstr "Версия"
-
-#: lib/index.tcl:6
-msgid "Unable to unlock the index."
-msgstr "Индексът не може да се отключи."
-
-#: lib/index.tcl:30
-msgid "Index Error"
-msgstr "Грешка в индекса"
-
-#: lib/index.tcl:32
-msgid ""
-"Updating the Git index failed. A rescan will be automatically started to "
-"resynchronize git-gui."
-msgstr ""
-"Неуспешно обновяване на индекса на Git. Автоматично ще започне нова проверка "
-"за синхронизирането на git-gui."
-
-#: lib/index.tcl:43
-msgid "Continue"
-msgstr "Продължаване"
-
-#: lib/index.tcl:46
-msgid "Unlock Index"
-msgstr "Отключване на индекса"
-
-#: lib/index.tcl:77 lib/index.tcl:146 lib/index.tcl:220 lib/index.tcl:587
-#: lib/choose_repository.tcl:999
-msgid "files"
-msgstr "файлове"
-
-#: lib/index.tcl:326
-msgid "Unstaging selected files from commit"
-msgstr "Изваждане на избраните файлове от подаването"
-
-#: lib/index.tcl:330
-#, tcl-format
-msgid "Unstaging %s from commit"
-msgstr "Изваждане на „%s“ от подаването"
-
-#: lib/index.tcl:369
-msgid "Ready to commit."
-msgstr "Готовност за подаване."
-
-#: lib/index.tcl:378
-msgid "Adding selected files"
-msgstr "Добавяне на избраните файлове"
-
-#: lib/index.tcl:382
-#, tcl-format
-msgid "Adding %s"
-msgstr "Добавяне на „%s“"
-
-#: lib/index.tcl:412
-#, tcl-format
-msgid "Stage %d untracked files?"
-msgstr "Да се добавят ли %d неследени файла към индекса?"
-
-#: lib/index.tcl:420
-msgid "Adding all changed files"
-msgstr "Добавяне на всички променени файлове"
-
-#: lib/index.tcl:503
-#, tcl-format
-msgid "Revert changes in file %s?"
-msgstr "Да се махнат ли промените във файла „%s“?"
-
-#: lib/index.tcl:508
-#, tcl-format
-msgid "Revert changes in these %i files?"
-msgstr "Да се махнат ли промените в тези %i файла?"
-
-#: lib/index.tcl:517
-msgid "Any unstaged changes will be permanently lost by the revert."
-msgstr ""
-"Всички промени, които не са били добавени в индекса, ще се загубят "
-"безвъзвратно."
-
-#: lib/index.tcl:520 lib/index.tcl:563
-msgid "Do Nothing"
-msgstr "Нищо да не се прави"
-
-#: lib/index.tcl:545
-#, tcl-format
-msgid "Delete untracked file %s?"
-msgstr "Да се изтрие ли неследеният файл „%s“?"
-
-#: lib/index.tcl:550
-#, tcl-format
-msgid "Delete these %i untracked files?"
-msgstr "Да се изтрият ли тези %d неследени файла?"
-
-#: lib/index.tcl:560
-msgid "Files will be permanently deleted."
-msgstr "Файловете ще се изтрият окончателно."
-
-#: lib/index.tcl:564
-msgid "Delete Files"
-msgstr "Изтриване на файлове"
-
-#: lib/index.tcl:586
-msgid "Deleting"
-msgstr "Изтриване"
-
-#: lib/index.tcl:665
-msgid "Encountered errors deleting files:\n"
-msgstr "Грешки при изтриване на файловете:\n"
-
-#: lib/index.tcl:674
-#, tcl-format
-msgid "None of the %d selected files could be deleted."
-msgstr "Никой от избраните %d файла не бе изтрит."
-
-#: lib/index.tcl:679
-#, tcl-format
-msgid "%d of the %d selected files could not be deleted."
-msgstr "%d от избраните %d файла не бяха изтрити."
-
-#: lib/index.tcl:726
-msgid "Reverting selected files"
-msgstr "Махане на промените в избраните файлове"
-
-#: lib/index.tcl:730
-#, tcl-format
-msgid "Reverting %s"
-msgstr "Махане на промените в „%s“"
-
-#: lib/branch_checkout.tcl:16
-#, tcl-format
-msgid "%s (%s): Checkout Branch"
-msgstr "%s (%s): Клон за изтегляне"
-
-#: lib/branch_checkout.tcl:21
-msgid "Checkout Branch"
-msgstr "Клон за изтегляне"
-
-#: lib/branch_checkout.tcl:26
-msgid "Checkout"
-msgstr "Изтегляне"
-
-#: lib/branch_checkout.tcl:39 lib/option.tcl:310 lib/branch_create.tcl:69
-msgid "Options"
-msgstr "Опции"
-
-#: lib/branch_checkout.tcl:42 lib/branch_create.tcl:92
-msgid "Fetch Tracking Branch"
-msgstr "Изтегляне на промените от следения клон"
-
-#: lib/branch_checkout.tcl:47
-msgid "Detach From Local Branch"
-msgstr "Изтриване от локалния клон"
-
-#: lib/status_bar.tcl:263
-#, tcl-format
-msgid "%s ... %*i of %*i %s (%3i%%)"
-msgstr "%s… %*i от общо %*i %s (%3i%%)"
-
-#: lib/remote.tcl:200
-msgid "Push to"
-msgstr "Изтласкване към"
-
-#: lib/remote.tcl:218
-msgid "Remove Remote"
-msgstr "Премахване на отдалечено хранилище"
-
-#: lib/remote.tcl:223
-msgid "Prune from"
-msgstr "Окастряне от"
-
-#: lib/remote.tcl:228
-msgid "Fetch from"
-msgstr "Доставяне от"
-
-#: lib/remote.tcl:249 lib/remote.tcl:253 lib/remote.tcl:258 lib/remote.tcl:264
-msgid "All"
-msgstr "Всички"
-
-#: lib/branch_rename.tcl:15
-#, tcl-format
-msgid "%s (%s): Rename Branch"
-msgstr "%s (%s): Преименуване на клон"
-
-#: lib/branch_rename.tcl:23
-msgid "Rename Branch"
-msgstr "Преименуване на клон"
-
-#: lib/branch_rename.tcl:28
-msgid "Rename"
-msgstr "Преименуване"
-
-#: lib/branch_rename.tcl:38
-msgid "Branch:"
-msgstr "Клон:"
-
-#: lib/branch_rename.tcl:46
-msgid "New Name:"
-msgstr "Ново име:"
-
-#: lib/branch_rename.tcl:81
-msgid "Please select a branch to rename."
-msgstr "Изберете клон за преименуване."
-
-#: lib/branch_rename.tcl:92 lib/branch_create.tcl:154
-msgid "Please supply a branch name."
-msgstr "Дайте име на клона."
-
-#: lib/branch_rename.tcl:112 lib/branch_create.tcl:165
-#, tcl-format
-msgid "'%s' is not an acceptable branch name."
-msgstr "„%s“ не може да се използва за име на клон."
-
-#: lib/branch_rename.tcl:123
-#, tcl-format
-msgid "Failed to rename '%s'."
-msgstr "Неуспешно преименуване на „%s“."
-
-#: lib/choose_font.tcl:41
msgid "Select"
msgstr "Избор"
-#: lib/choose_font.tcl:55
msgid "Font Family"
msgstr "Шрифт"
-#: lib/choose_font.tcl:76
msgid "Font Size"
msgstr "Размер"
-#: lib/choose_font.tcl:93
msgid "Font Example"
msgstr "Мостра"
-#: lib/choose_font.tcl:105
msgid ""
"This is example text.\n"
"If you like this text, it can be your font."
@@ -1267,1141 +825,137 @@
"Това е примерен текст.\n"
"Ако ви харесва как изглежда, изберете шрифта."
-#: lib/option.tcl:11
-#, tcl-format
-msgid "Invalid global encoding '%s'"
-msgstr "Неправилно глобално кодиране „%s“"
-
-#: lib/option.tcl:19
-#, tcl-format
-msgid "Invalid repo encoding '%s'"
-msgstr "Неправилно кодиране „%s“ на хранилището"
-
-#: lib/option.tcl:119
-msgid "Restore Defaults"
-msgstr "Стандартни настройки"
-
-#: lib/option.tcl:123
-msgid "Save"
-msgstr "Запазване"
-
-#: lib/option.tcl:133
-#, tcl-format
-msgid "%s Repository"
-msgstr "Хранилище „%s“"
-
-#: lib/option.tcl:134
-msgid "Global (All Repositories)"
-msgstr "Глобално (за всички хранилища)"
-
-#: lib/option.tcl:140
-msgid "User Name"
-msgstr "Потребителско име"
-
-#: lib/option.tcl:141
-msgid "Email Address"
-msgstr "Адрес на е-поща"
-
-#: lib/option.tcl:143
-msgid "Summarize Merge Commits"
-msgstr "Обобщаване на подаванията при сливане"
-
-#: lib/option.tcl:144
-msgid "Merge Verbosity"
-msgstr "Подробности при сливанията"
-
-#: lib/option.tcl:145
-msgid "Show Diffstat After Merge"
-msgstr "Извеждане на статистика след сливанията"
-
-#: lib/option.tcl:146
-msgid "Use Merge Tool"
-msgstr "Използване на програма за сливане"
-
-#: lib/option.tcl:148
-msgid "Trust File Modification Timestamps"
-msgstr "Доверие във времето на промяна на файловете"
-
-#: lib/option.tcl:149
-msgid "Prune Tracking Branches During Fetch"
-msgstr "Окастряне на следящите клонове при доставяне"
-
-#: lib/option.tcl:150
-msgid "Match Tracking Branches"
-msgstr "Напасване на следящите клонове"
-
-#: lib/option.tcl:151
-msgid "Use Textconv For Diffs and Blames"
-msgstr "Използване на „textconv“ за разликите и анотирането"
-
-#: lib/option.tcl:152
-msgid "Blame Copy Only On Changed Files"
-msgstr "Анотиране на копието само по променените файлове"
-
-#: lib/option.tcl:153
-msgid "Maximum Length of Recent Repositories List"
-msgstr "Максимален брой на списъка „Скоро ползвани“ хранилища"
-
-#: lib/option.tcl:154
-msgid "Minimum Letters To Blame Copy On"
-msgstr "Минимален брой знаци за анотиране на копието"
-
-#: lib/option.tcl:155
-msgid "Blame History Context Radius (days)"
-msgstr "Исторически обхват за анотиране в дни"
-
-#: lib/option.tcl:156
-msgid "Number of Diff Context Lines"
-msgstr "Брой редове за контекста на разликите"
-
-#: lib/option.tcl:157
-msgid "Additional Diff Parameters"
-msgstr "Аргументи към командата за разликите"
-
-#: lib/option.tcl:158
-msgid "Commit Message Text Width"
-msgstr "Широчина на текста на съобщението при подаване"
-
-#: lib/option.tcl:159
-msgid "New Branch Name Template"
-msgstr "Шаблон за името на новите клони"
-
-#: lib/option.tcl:160
-msgid "Default File Contents Encoding"
-msgstr "Кодиране на файловете"
-
-#: lib/option.tcl:161
-msgid "Warn before committing to a detached head"
-msgstr "Предупреждаване при подаване към несвързан указател"
-
-#: lib/option.tcl:162
-msgid "Staging of untracked files"
-msgstr "Добавяне на неследените файлове към индекса"
-
-#: lib/option.tcl:163
-msgid "Show untracked files"
-msgstr "Показване на неследените файлове"
-
-#: lib/option.tcl:164
-msgid "Tab spacing"
-msgstr "Ширина на табулацията"
-
-#: lib/option.tcl:182 lib/option.tcl:197 lib/option.tcl:220 lib/option.tcl:282
-#: lib/database.tcl:57
-#, tcl-format
-msgid "%s:"
-msgstr "%s:"
-
-#: lib/option.tcl:210
-msgid "Change"
-msgstr "Смяна"
-
-#: lib/option.tcl:254
-msgid "Spelling Dictionary:"
-msgstr "Правописен речник:"
-
-#: lib/option.tcl:284
-msgid "Change Font"
-msgstr "Смяна на шрифта"
-
-#: lib/option.tcl:288
-#, tcl-format
-msgid "Choose %s"
-msgstr "Избор на „%s“"
-
-#: lib/option.tcl:294
-msgid "pt."
-msgstr "тчк."
-
-#: lib/option.tcl:308
-msgid "Preferences"
-msgstr "Настройки"
-
-#: lib/option.tcl:345
-msgid "Failed to completely save options:"
-msgstr "Неуспешно запазване на настройките:"
-
-#: lib/encoding.tcl:443
-msgid "Default"
-msgstr "Стандартното"
-
-#: lib/encoding.tcl:448
-#, tcl-format
-msgid "System (%s)"
-msgstr "Системното (%s)"
-
-#: lib/encoding.tcl:459 lib/encoding.tcl:465
-msgid "Other"
-msgstr "Друго"
-
-#: lib/tools.tcl:76
-#, tcl-format
-msgid "Running %s requires a selected file."
-msgstr "За изпълнението на „%s“ трябва да изберете файл."
-
-#: lib/tools.tcl:92
-#, tcl-format
-msgid "Are you sure you want to run %1$s on file \"%2$s\"?"
-msgstr "Сигурни ли сте, че искате да изпълните „%1$s“ върху файла „%2$s“?"
-
-#: lib/tools.tcl:96
-#, tcl-format
-msgid "Are you sure you want to run %s?"
-msgstr "Сигурни ли сте, че искате да изпълните „%s“?"
-
-#: lib/tools.tcl:118
-#, tcl-format
-msgid "Tool: %s"
-msgstr "Команда: %s"
-
-#: lib/tools.tcl:119
-#, tcl-format
-msgid "Running: %s"
-msgstr "Изпълнение: %s"
-
-#: lib/tools.tcl:158
-#, tcl-format
-msgid "Tool completed successfully: %s"
-msgstr "Командата завърши успешно: %s"
-
-#: lib/tools.tcl:160
-#, tcl-format
-msgid "Tool failed: %s"
-msgstr "Командата върна грешка: %s"
-
-#: lib/mergetool.tcl:8
-msgid "Force resolution to the base version?"
-msgstr "Да се използва базовата версия"
-
-#: lib/mergetool.tcl:9
-msgid "Force resolution to this branch?"
-msgstr "Да се използва версията от този клон"
-
-#: lib/mergetool.tcl:10
-msgid "Force resolution to the other branch?"
-msgstr "Да се използва версията от другия клон"
-
-#: lib/mergetool.tcl:14
-#, tcl-format
-msgid ""
-"Note that the diff shows only conflicting changes.\n"
-"\n"
-"%s will be overwritten.\n"
-"\n"
-"This operation can be undone only by restarting the merge."
-msgstr ""
-"Разликата показва само разликите с конфликт.\n"
-"\n"
-"Файлът „%s“ ще се презапише.\n"
-"\n"
-"Тази операция може да се отмени само чрез започване на сливането наново."
-
-#: lib/mergetool.tcl:45
-#, tcl-format
-msgid "File %s seems to have unresolved conflicts, still stage?"
-msgstr ""
-"Изглежда, че все още има некоригирани конфликти във файла „%s“. Да се добави "
-"ли файлът към индекса?"
-
-#: lib/mergetool.tcl:60
-#, tcl-format
-msgid "Adding resolution for %s"
-msgstr "Добавяне на корекция на конфликтите в „%s“"
-
-#: lib/mergetool.tcl:141
-msgid "Cannot resolve deletion or link conflicts using a tool"
-msgstr ""
-"Конфликтите при символни връзки или изтриване не може да се коригират с "
-"външна програма."
-
-#: lib/mergetool.tcl:146
-msgid "Conflict file does not exist"
-msgstr "Файлът, в който е конфликтът, не съществува"
-
-#: lib/mergetool.tcl:246
-#, tcl-format
-msgid "Not a GUI merge tool: '%s'"
-msgstr "Това не е графична програма за сливане: „%s“"
-
-#: lib/mergetool.tcl:275
-#, tcl-format
-msgid "Unsupported merge tool '%s'"
-msgstr "Неподдържана програма за сливане: „%s“"
-
-#: lib/mergetool.tcl:310
-msgid "Merge tool is already running, terminate it?"
-msgstr "Програмата за сливане вече е стартирана. Да се изключи ли?"
-
-#: lib/mergetool.tcl:330
-#, tcl-format
-msgid ""
-"Error retrieving versions:\n"
-"%s"
-msgstr ""
-"Грешка при изтеглянето на версии:\n"
-"%s"
-
-#: lib/mergetool.tcl:350
-#, tcl-format
-msgid ""
-"Could not start the merge tool:\n"
-"\n"
-"%s"
-msgstr ""
-"Програмата за сливане не може да се стартира:\n"
-"\n"
-"%s"
-
-#: lib/mergetool.tcl:354
-msgid "Running merge tool..."
-msgstr "Стартиране на програмата за сливане…"
-
-#: lib/mergetool.tcl:382 lib/mergetool.tcl:390
-msgid "Merge tool failed."
-msgstr "Грешка в програмата за сливане."
-
-#: lib/tools_dlg.tcl:22
-#, tcl-format
-msgid "%s (%s): Add Tool"
-msgstr "%s (%s): Добавяне на команда"
-
-#: lib/tools_dlg.tcl:28
-msgid "Add New Tool Command"
-msgstr "Добавяне на команда"
-
-#: lib/tools_dlg.tcl:34
-msgid "Add globally"
-msgstr "Глобално добавяне"
-
-#: lib/tools_dlg.tcl:46
-msgid "Tool Details"
-msgstr "Подробности за командата"
-
-#: lib/tools_dlg.tcl:49
-msgid "Use '/' separators to create a submenu tree:"
-msgstr "За създаване на подменюта използвайте знака „/“ за разделител:"
-
-#: lib/tools_dlg.tcl:60
-msgid "Command:"
-msgstr "Команда:"
-
-#: lib/tools_dlg.tcl:71
-msgid "Show a dialog before running"
-msgstr "Преди изпълнение да се извежда диалогов прозорец"
-
-#: lib/tools_dlg.tcl:77
-msgid "Ask the user to select a revision (sets $REVISION)"
-msgstr "Потребителят да укаже версия (задаване на променливата $REVISION)"
-
-#: lib/tools_dlg.tcl:82
-msgid "Ask the user for additional arguments (sets $ARGS)"
-msgstr ""
-"Потребителят да укаже допълнителни аргументи (задаване на променливата $ARGS)"
-
-#: lib/tools_dlg.tcl:89
-msgid "Don't show the command output window"
-msgstr "Без показване на прозорец с изхода от командата"
-
-#: lib/tools_dlg.tcl:94
-msgid "Run only if a diff is selected ($FILENAME not empty)"
-msgstr ""
-"Стартиране само след избор на разлика (променливата $FILENAME не е празна)"
-
-#: lib/tools_dlg.tcl:118
-msgid "Please supply a name for the tool."
-msgstr "Задайте име за командата."
-
-#: lib/tools_dlg.tcl:126
-#, tcl-format
-msgid "Tool '%s' already exists."
-msgstr "Командата „%s“ вече съществува."
-
-#: lib/tools_dlg.tcl:148
-#, tcl-format
-msgid ""
-"Could not add tool:\n"
-"%s"
-msgstr ""
-"Командата не може да се добави:\n"
-"%s"
-
-#: lib/tools_dlg.tcl:187
-#, tcl-format
-msgid "%s (%s): Remove Tool"
-msgstr "%s (%s): Премахване на команда"
-
-#: lib/tools_dlg.tcl:193
-msgid "Remove Tool Commands"
-msgstr "Премахване на команди"
-
-#: lib/tools_dlg.tcl:198
-msgid "Remove"
-msgstr "Премахване"
-
-#: lib/tools_dlg.tcl:231
-msgid "(Blue denotes repository-local tools)"
-msgstr "(командите към локалното хранилище са обозначени в синьо)"
-
-#: lib/tools_dlg.tcl:283
-#, tcl-format
-msgid "%s (%s):"
-msgstr "%s (%s):"
-
-#: lib/tools_dlg.tcl:292
-#, tcl-format
-msgid "Run Command: %s"
-msgstr "Изпълнение на командата „%s“"
-
-#: lib/tools_dlg.tcl:306
-msgid "Arguments"
-msgstr "Аргументи"
-
-#: lib/tools_dlg.tcl:341
-msgid "OK"
-msgstr "Добре"
-
-#: lib/search.tcl:48
-msgid "Find:"
-msgstr "Търсене:"
-
-#: lib/search.tcl:50
-msgid "Next"
-msgstr "Следваща поява"
-
-#: lib/search.tcl:51
-msgid "Prev"
-msgstr "Предишна поява"
-
-#: lib/search.tcl:52
-msgid "RegExp"
-msgstr "РегИзр"
-
-#: lib/search.tcl:54
-msgid "Case"
-msgstr "Главни/Малки"
-
-#: lib/shortcut.tcl:8 lib/shortcut.tcl:43 lib/shortcut.tcl:75
-#, tcl-format
-msgid "%s (%s): Create Desktop Icon"
-msgstr "%s (%s): Добавяне на икона на работния плот"
-
-#: lib/shortcut.tcl:24 lib/shortcut.tcl:65
-msgid "Cannot write shortcut:"
-msgstr "Клавишната комбинация не може да се запази:"
-
-#: lib/shortcut.tcl:140
-msgid "Cannot write icon:"
-msgstr "Иконата не може да се запази:"
-
-#: lib/remote_branch_delete.tcl:29
-#, tcl-format
-msgid "%s (%s): Delete Branch Remotely"
-msgstr "%s (%s): Изтриване на отдалечения клон"
-
-#: lib/remote_branch_delete.tcl:34
-msgid "Delete Branch Remotely"
-msgstr "Изтриване на отдалечения клон"
-
-#: lib/remote_branch_delete.tcl:48
-msgid "From Repository"
-msgstr "От хранилище"
-
-#: lib/remote_branch_delete.tcl:88
-msgid "Branches"
-msgstr "Клони"
-
-#: lib/remote_branch_delete.tcl:110
-msgid "Delete Only If"
-msgstr "Изтриване, само ако"
-
-#: lib/remote_branch_delete.tcl:112
-msgid "Merged Into:"
-msgstr "Слят в:"
-
-#: lib/remote_branch_delete.tcl:120 lib/branch_delete.tcl:53
-msgid "Always (Do not perform merge checks)"
-msgstr "Винаги (без проверка за сливане)"
-
-#: lib/remote_branch_delete.tcl:153
-msgid "A branch is required for 'Merged Into'."
-msgstr "За данните „Слят в“ е необходимо да зададете клон."
-
-#: lib/remote_branch_delete.tcl:185
-#, tcl-format
-msgid ""
-"The following branches are not completely merged into %s:\n"
-"\n"
-" - %s"
-msgstr ""
-"Следните клони не са слети напълно в „%s“:\n"
-"\n"
-" ● %s"
-
-#: lib/remote_branch_delete.tcl:190
-#, tcl-format
-msgid ""
-"One or more of the merge tests failed because you have not fetched the "
-"necessary commits. Try fetching from %s first."
-msgstr ""
-"Поне една от пробите за сливане е неуспешна, защото не сте доставили всички "
-"необходими подавания. Пробвайте първо да доставите подаванията от „%s“."
-
-#: lib/remote_branch_delete.tcl:208
-msgid "Please select one or more branches to delete."
-msgstr "Изберете поне един клон за изтриване."
-
-#: lib/remote_branch_delete.tcl:218 lib/branch_delete.tcl:115
-msgid ""
-"Recovering deleted branches is difficult.\n"
-"\n"
-"Delete the selected branches?"
-msgstr ""
-"Възстановяването на изтрити клони може да е трудно.\n"
-"\n"
-"Сигурни ли сте, че искате да триете?"
-
-#: lib/remote_branch_delete.tcl:227
-#, tcl-format
-msgid "Deleting branches from %s"
-msgstr "Изтриване на клони от „%s“"
-
-#: lib/remote_branch_delete.tcl:300
-msgid "No repository selected."
-msgstr "Не е избрано хранилище."
-
-#: lib/remote_branch_delete.tcl:305
-#, tcl-format
-msgid "Scanning %s..."
-msgstr "Претърсване на „%s“…"
-
-#: lib/choose_repository.tcl:45
msgid "Git Gui"
msgstr "ГПИ на Git"
-#: lib/choose_repository.tcl:104 lib/choose_repository.tcl:427
msgid "Create New Repository"
msgstr "Създаване на ново хранилище"
-#: lib/choose_repository.tcl:110
msgid "New..."
msgstr "Ново…"
-#: lib/choose_repository.tcl:117 lib/choose_repository.tcl:511
msgid "Clone Existing Repository"
msgstr "Клониране на съществуващо хранилище"
-#: lib/choose_repository.tcl:128
msgid "Clone..."
msgstr "Клониране…"
-#: lib/choose_repository.tcl:135 lib/choose_repository.tcl:1105
msgid "Open Existing Repository"
msgstr "Отваряне на съществуващо хранилище"
-#: lib/choose_repository.tcl:141
msgid "Open..."
msgstr "Отваряне…"
-#: lib/choose_repository.tcl:154
msgid "Recent Repositories"
msgstr "Скоро ползвани"
-#: lib/choose_repository.tcl:164
msgid "Open Recent Repository:"
msgstr "Отваряне на хранилище ползвано наскоро:"
-#: lib/choose_repository.tcl:331 lib/choose_repository.tcl:338
-#: lib/choose_repository.tcl:345
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "Неуспешно създаване на хранилището „%s“:"
-#: lib/choose_repository.tcl:422 lib/branch_create.tcl:33
-msgid "Create"
-msgstr "Създаване"
-
-#: lib/choose_repository.tcl:432
msgid "Directory:"
msgstr "Директория:"
-#: lib/choose_repository.tcl:462 lib/choose_repository.tcl:588
-#: lib/choose_repository.tcl:1139
msgid "Git Repository"
msgstr "Хранилище на Git"
-#: lib/choose_repository.tcl:487
#, tcl-format
msgid "Directory %s already exists."
msgstr "Вече съществува директория „%s“."
-#: lib/choose_repository.tcl:491
#, tcl-format
msgid "File %s already exists."
msgstr "Вече съществува файл „%s“."
-#: lib/choose_repository.tcl:506
msgid "Clone"
msgstr "Клониране"
-#: lib/choose_repository.tcl:519
msgid "Source Location:"
msgstr "Адрес на източника:"
-#: lib/choose_repository.tcl:528
msgid "Target Directory:"
msgstr "Целева директория:"
-#: lib/choose_repository.tcl:538
msgid "Clone Type:"
msgstr "Вид клониране:"
-#: lib/choose_repository.tcl:543
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Стандартно (бързо, частично споделяне на файлове, твърди връзки)"
-#: lib/choose_repository.tcl:548
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Пълно (бавно, пълноценно резервно копие)"
-#: lib/choose_repository.tcl:553
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr "Споделено (най-бързо, не се препоръчва, не прави резервно копие)"
-#: lib/choose_repository.tcl:560
msgid "Recursively clone submodules too"
msgstr "Рекурсивно клониране и на подмодулите"
-#: lib/choose_repository.tcl:594 lib/choose_repository.tcl:641
-#: lib/choose_repository.tcl:790 lib/choose_repository.tcl:864
-#: lib/choose_repository.tcl:1145 lib/choose_repository.tcl:1153
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "Това не е хранилище на Git: %s"
-#: lib/choose_repository.tcl:630
+msgid "Hardlinks are unavailable. Falling back to copying."
+msgstr "Не се поддържат твърди връзки. Преминава се към копиране."
+
msgid "Standard only available for local repository."
msgstr "Само локални хранилища може да се клонират стандартно"
-#: lib/choose_repository.tcl:634
msgid "Shared only available for local repository."
msgstr "Само локални хранилища може да се клонират споделено"
-#: lib/choose_repository.tcl:655
#, tcl-format
msgid "Location %s already exists."
msgstr "Местоположението „%s“ вече съществува."
-#: lib/choose_repository.tcl:666
-msgid "Failed to configure origin"
-msgstr "Неуспешно настройване на хранилището-източник"
-
-#: lib/choose_repository.tcl:678
-msgid "Counting objects"
-msgstr "Преброяване на обекти"
-
-#: lib/choose_repository.tcl:679
-msgid "buckets"
-msgstr "клетки"
-
-#: lib/choose_repository.tcl:703
-#, tcl-format
-msgid "Unable to copy objects/info/alternates: %s"
-msgstr "Обектите/Информацията/Синонимите не може да се копират: %s"
-
-#: lib/choose_repository.tcl:740
-#, tcl-format
-msgid "Nothing to clone from %s."
-msgstr "Няма какво да се клонира от „%s“."
-
-#: lib/choose_repository.tcl:742 lib/choose_repository.tcl:962
-#: lib/choose_repository.tcl:974
-msgid "The 'master' branch has not been initialized."
-msgstr "Основният клон — „master“ не е инициализиран."
-
-#: lib/choose_repository.tcl:755
-msgid "Hardlinks are unavailable. Falling back to copying."
-msgstr "Не се поддържат твърди връзки. Преминава се към копиране."
-
-#: lib/choose_repository.tcl:769
#, tcl-format
msgid "Cloning from %s"
msgstr "Клониране на „%s“"
-#: lib/choose_repository.tcl:800
-msgid "Copying objects"
-msgstr "Копиране на обекти"
-
-#: lib/choose_repository.tcl:801
-msgid "KiB"
-msgstr "KiB"
-
-#: lib/choose_repository.tcl:825
-#, tcl-format
-msgid "Unable to copy object: %s"
-msgstr "Неуспешно копиране на обект: %s"
-
-#: lib/choose_repository.tcl:837
-msgid "Linking objects"
-msgstr "Създаване на връзки към обектите"
-
-#: lib/choose_repository.tcl:838
-msgid "objects"
-msgstr "обекти"
-
-#: lib/choose_repository.tcl:846
-#, tcl-format
-msgid "Unable to hardlink object: %s"
-msgstr "Неуспешно създаване на твърда връзка към обект: %s"
-
-#: lib/choose_repository.tcl:903
-msgid "Cannot fetch branches and objects. See console output for details."
-msgstr ""
-"Клоните и обектите не може да се изтеглят. За повече информация погледнете "
-"изхода на конзолата."
-
-#: lib/choose_repository.tcl:914
-msgid "Cannot fetch tags. See console output for details."
-msgstr ""
-"Етикетите не може да се изтеглят. За повече информация погледнете изхода на "
-"конзолата."
-
-#: lib/choose_repository.tcl:938
-msgid "Cannot determine HEAD. See console output for details."
-msgstr ""
-"Върхът „HEAD“ не може да се определи. За повече информация погледнете изхода "
-"на конзолата."
-
-#: lib/choose_repository.tcl:947
-#, tcl-format
-msgid "Unable to cleanup %s"
-msgstr "„%s“ не може да се изчисти"
-
-#: lib/choose_repository.tcl:953
msgid "Clone failed."
msgstr "Неуспешно клониране."
-#: lib/choose_repository.tcl:960
-msgid "No default branch obtained."
-msgstr "Не е получен клон по подразбиране."
-
-#: lib/choose_repository.tcl:971
-#, tcl-format
-msgid "Cannot resolve %s as a commit."
-msgstr "Няма подаване отговарящо на „%s“."
-
-#: lib/choose_repository.tcl:998
-msgid "Creating working directory"
-msgstr "Създаване на работната директория"
-
-#: lib/choose_repository.tcl:1028
-msgid "Initial file checkout failed."
-msgstr "Неуспешно първоначално изтегляне."
-
-#: lib/choose_repository.tcl:1072
-msgid "Cloning submodules"
-msgstr "Клониране на подмодули"
-
-#: lib/choose_repository.tcl:1087
-msgid "Cannot clone submodules."
-msgstr "Подмодулите не може да се клонират."
-
-#: lib/choose_repository.tcl:1110
msgid "Repository:"
msgstr "Хранилище:"
-#: lib/choose_repository.tcl:1159
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "Неуспешно отваряне на хранилището „%s“:"
-#: lib/about.tcl:26
-msgid "git-gui - a graphical user interface for Git."
-msgstr "git-gui — графичен интерфейс за Git."
-
-#: lib/blame.tcl:74
-#, tcl-format
-msgid "%s (%s): File Viewer"
-msgstr "%s (%s): Преглед на файлове"
-
-#: lib/blame.tcl:80
-msgid "Commit:"
-msgstr "Подаване:"
-
-#: lib/blame.tcl:282
-msgid "Copy Commit"
-msgstr "Копиране на подаване"
-
-#: lib/blame.tcl:286
-msgid "Find Text..."
-msgstr "Търсене на текст…"
-
-#: lib/blame.tcl:290
-msgid "Goto Line..."
-msgstr "Към ред…"
-
-#: lib/blame.tcl:299
-msgid "Do Full Copy Detection"
-msgstr "Пълно търсене на копиране"
-
-#: lib/blame.tcl:303
-msgid "Show History Context"
-msgstr "Показване на контекста от историята"
-
-#: lib/blame.tcl:306
-msgid "Blame Parent Commit"
-msgstr "Анотиране на родителското подаване"
-
-#: lib/blame.tcl:468
-#, tcl-format
-msgid "Reading %s..."
-msgstr "Чете се „%s“…"
-
-#: lib/blame.tcl:596
-msgid "Loading copy/move tracking annotations..."
-msgstr "Зареждане на анотациите за проследяване на копирането/преместването…"
-
-#: lib/blame.tcl:613
-msgid "lines annotated"
-msgstr "реда анотирани"
-
-#: lib/blame.tcl:815
-msgid "Loading original location annotations..."
-msgstr "Зареждане на анотациите за първоначалното местоположение…"
-
-#: lib/blame.tcl:818
-msgid "Annotation complete."
-msgstr "Анотирането завърши."
-
-#: lib/blame.tcl:849
-msgid "Busy"
-msgstr "Операцията не е завършила"
-
-#: lib/blame.tcl:850
-msgid "Annotation process is already running."
-msgstr "В момента тече процес на анотиране."
-
-#: lib/blame.tcl:889
-msgid "Running thorough copy detection..."
-msgstr "Изпълнява се цялостен процес на откриване на копиране…"
-
-#: lib/blame.tcl:957
-msgid "Loading annotation..."
-msgstr "Зареждане на анотации…"
-
-#: lib/blame.tcl:1010
-msgid "Author:"
-msgstr "Автор:"
-
-#: lib/blame.tcl:1014
-msgid "Committer:"
-msgstr "Подал:"
-
-#: lib/blame.tcl:1019
-msgid "Original File:"
-msgstr "Първоначален файл:"
-
-#: lib/blame.tcl:1067
-msgid "Cannot find HEAD commit:"
-msgstr "Подаването за връх „HEAD“ не може да се открие:"
-
-#: lib/blame.tcl:1122
-msgid "Cannot find parent commit:"
-msgstr "Родителското подаване не може да се открие"
-
-#: lib/blame.tcl:1137
-msgid "Unable to display parent"
-msgstr "Родителят не може да се покаже"
-
-#: lib/blame.tcl:1138 lib/diff.tcl:345
-msgid "Error loading diff:"
-msgstr "Грешка при зареждане на разлика:"
-
-#: lib/blame.tcl:1279
-msgid "Originally By:"
-msgstr "Първоначално от:"
-
-#: lib/blame.tcl:1285
-msgid "In File:"
-msgstr "Във файл:"
-
-#: lib/blame.tcl:1290
-msgid "Copied Or Moved Here By:"
-msgstr "Копирано или преместено тук от:"
-
-#: lib/diff.tcl:77
-#, tcl-format
-msgid ""
-"No differences detected.\n"
-"\n"
-"%s has no changes.\n"
-"\n"
-"The modification date of this file was updated by another application, but "
-"the content within the file was not changed.\n"
-"\n"
-"A rescan will be automatically started to find other files which may have "
-"the same state."
-msgstr ""
-"Не са открити разлики.\n"
-"\n"
-"Няма промени в „%s“.\n"
-"\n"
-"Времето на промяна на файла е бил зададен от друга програма, но съдържанието "
-"му не е променено.\n"
-"\n"
-"Автоматично ще започне нова проверка дали няма други файлове в това "
-"състояние."
-
-#: lib/diff.tcl:117
-#, tcl-format
-msgid "Loading diff of %s..."
-msgstr "Зареждане на разликите в „%s“…"
-
-#: lib/diff.tcl:143
-msgid ""
-"LOCAL: deleted\n"
-"REMOTE:\n"
-msgstr ""
-"ЛОКАЛНО: изтрит\n"
-"ОТДАЛЕЧЕНО:\n"
-
-#: lib/diff.tcl:148
-msgid ""
-"REMOTE: deleted\n"
-"LOCAL:\n"
-msgstr ""
-"ОТДАЛЕЧЕНО: изтрит\n"
-"ЛОКАЛНО:\n"
-
-#: lib/diff.tcl:155
-msgid "LOCAL:\n"
-msgstr "ЛОКАЛНО:\n"
-
-#: lib/diff.tcl:158
-msgid "REMOTE:\n"
-msgstr "ОТДАЛЕЧЕНО:\n"
-
-#: lib/diff.tcl:220 lib/diff.tcl:344
-#, tcl-format
-msgid "Unable to display %s"
-msgstr "Файлът „%s“ не може да се покаже"
-
-#: lib/diff.tcl:221
-msgid "Error loading file:"
-msgstr "Грешка при зареждане на файл:"
-
-#: lib/diff.tcl:227
-msgid "Git Repository (subproject)"
-msgstr "Хранилище на Git (подмодул)"
-
-#: lib/diff.tcl:239
-msgid "* Binary file (not showing content)."
-msgstr "● Двоичен файл (съдържанието не се показва)."
-
-#: lib/diff.tcl:244
-#, tcl-format
-msgid ""
-"* Untracked file is %d bytes.\n"
-"* Showing only first %d bytes.\n"
-msgstr ""
-"● Неследеният файл е %d байта.\n"
-"● Показват се само първите %d байта.\n"
-
-#: lib/diff.tcl:250
-#, tcl-format
-msgid ""
-"\n"
-"* Untracked file clipped here by %s.\n"
-"* To see the entire file, use an external editor.\n"
-msgstr ""
-"\n"
-"● Неследеният файл е отрязан дотук от програмата „%s“.\n"
-"● Използвайте външен редактор, за да видите целия файл.\n"
-
-#: lib/diff.tcl:583
-msgid "Failed to unstage selected hunk."
-msgstr "Избраното парче не може да се извади от индекса."
-
-#: lib/diff.tcl:591
-msgid "Failed to revert selected hunk."
-msgstr "Избраното парче не може да се върне."
-
-#: lib/diff.tcl:594
-msgid "Failed to stage selected hunk."
-msgstr "Избраното парче не може да се добави към индекса."
-
-#: lib/diff.tcl:687
-msgid "Failed to unstage selected line."
-msgstr "Избраният ред не може да се извади от индекса."
-
-#: lib/diff.tcl:696
-msgid "Failed to revert selected line."
-msgstr "Избраният ред не може да се върне."
-
-#: lib/diff.tcl:700
-msgid "Failed to stage selected line."
-msgstr "Избраният ред не може да се добави към индекса."
-
-#: lib/diff.tcl:889
-msgid "Failed to undo last revert."
-msgstr "Неуспешна отмяна на последното връщане."
-
-#: lib/sshkey.tcl:34
-msgid "No keys found."
-msgstr "Не са открити ключове."
-
-#: lib/sshkey.tcl:37
-#, tcl-format
-msgid "Found a public key in: %s"
-msgstr "Открит е публичен ключ в „%s“"
-
-#: lib/sshkey.tcl:43
-msgid "Generate Key"
-msgstr "Генериране на ключ"
-
-#: lib/sshkey.tcl:61
-msgid "Copy To Clipboard"
-msgstr "Копиране към системния буфер"
-
-#: lib/sshkey.tcl:75
-msgid "Your OpenSSH Public Key"
-msgstr "Публичният ви ключ за OpenSSH"
-
-#: lib/sshkey.tcl:83
-msgid "Generating..."
-msgstr "Генериране…"
-
-#: lib/sshkey.tcl:89
-#, tcl-format
-msgid ""
-"Could not start ssh-keygen:\n"
-"\n"
-"%s"
-msgstr ""
-"Програмата „ssh-keygen“ не може да се стартира:\n"
-"\n"
-"%s"
-
-#: lib/sshkey.tcl:116
-msgid "Generation failed."
-msgstr "Неуспешно генериране."
-
-#: lib/sshkey.tcl:123
-msgid "Generation succeeded, but no keys found."
-msgstr "Генерирането завърши успешно, а не са намерени ключове."
-
-#: lib/sshkey.tcl:126
-#, tcl-format
-msgid "Your key is in: %s"
-msgstr "Ключът ви е в „%s“"
-
-#: lib/branch_create.tcl:23
-#, tcl-format
-msgid "%s (%s): Create Branch"
-msgstr "%s (%s): Създаване на клон"
-
-#: lib/branch_create.tcl:28
-msgid "Create New Branch"
-msgstr "Създаване на нов клон"
-
-#: lib/branch_create.tcl:42
-msgid "Branch Name"
-msgstr "Име на клона"
-
-#: lib/branch_create.tcl:57
-msgid "Match Tracking Branch Name"
-msgstr "Съвпадане по името на следения клон"
-
-#: lib/branch_create.tcl:66
-msgid "Starting Revision"
-msgstr "Начална версия"
-
-#: lib/branch_create.tcl:72
-msgid "Update Existing Branch:"
-msgstr "Обновяване на съществуващ клон:"
-
-#: lib/branch_create.tcl:75
-msgid "No"
-msgstr "Не"
-
-#: lib/branch_create.tcl:80
-msgid "Fast Forward Only"
-msgstr "Само тривиално превъртащо сливане"
-
-#: lib/branch_create.tcl:97
-msgid "Checkout After Creation"
-msgstr "Преминаване към клона след създаването му"
-
-#: lib/branch_create.tcl:132
-msgid "Please select a tracking branch."
-msgstr "Изберете клон за следени."
-
-#: lib/branch_create.tcl:141
-#, tcl-format
-msgid "Tracking branch %s is not a branch in the remote repository."
-msgstr "Следящият клон — „%s“, не съществува в отдалеченото хранилище."
-
-#: lib/console.tcl:59
-msgid "Working... please wait..."
-msgstr "В момента се извършва действие, изчакайте…"
-
-#: lib/console.tcl:186
-msgid "Success"
-msgstr "Успех"
-
-#: lib/console.tcl:200
-msgid "Error: Command Failed"
-msgstr "Грешка: неуспешно изпълнение на команда"
-
-#: lib/line.tcl:17
-msgid "Goto Line:"
-msgstr "Към ред:"
-
-#: lib/line.tcl:23
-msgid "Go"
-msgstr "Към"
-
-#: lib/choose_rev.tcl:52
msgid "This Detached Checkout"
msgstr "Това несвързано изтегляне"
-#: lib/choose_rev.tcl:60
msgid "Revision Expression:"
msgstr "Израз за версия:"
-#: lib/choose_rev.tcl:72
msgid "Local Branch"
msgstr "Локален клон"
-#: lib/choose_rev.tcl:77
msgid "Tracking Branch"
msgstr "Следящ клон"
-#: lib/choose_rev.tcl:82 lib/choose_rev.tcl:544
msgid "Tag"
msgstr "Етикет"
-#: lib/choose_rev.tcl:321
#, tcl-format
msgid "Invalid revision: %s"
msgstr "Неправилна версия: %s"
-#: lib/choose_rev.tcl:342
msgid "No revision selected."
msgstr "Не е избрана версия."
-#: lib/choose_rev.tcl:350
msgid "Revision expression is empty."
msgstr "Изразът за версия е празен."
-#: lib/choose_rev.tcl:537
msgid "Updated"
msgstr "Обновен"
-#: lib/choose_rev.tcl:565
msgid "URL"
msgstr "Адрес"
-#: lib/commit.tcl:9
msgid ""
"There is nothing to amend.\n"
"\n"
@@ -2413,7 +967,6 @@
"Ще създадете първоначалното подаване. Преди него няма други подавания, които "
"да поправите.\n"
-#: lib/commit.tcl:18
msgid ""
"Cannot amend while merging.\n"
"\n"
@@ -2426,24 +979,19 @@
"В момента все още не сте завършили операция по сливане. Не може да поправите "
"предишното подаване, освен ако първо не преустановите текущото сливане.\n"
-#: lib/commit.tcl:56
msgid "Error loading commit data for amend:"
msgstr "Грешка при зареждане на данните от подаване, които да се поправят:"
-#: lib/commit.tcl:83
msgid "Unable to obtain your identity:"
msgstr "Идентификацията ви не може да се определи:"
-#: lib/commit.tcl:88
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "Неправилно поле „GIT_COMMITTER_IDENT“:"
-#: lib/commit.tcl:138
#, tcl-format
msgid "warning: Tcl does not support encoding '%s'."
msgstr "предупреждение: Tcl не поддържа кодирането „%s“."
-#: lib/commit.tcl:158
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -2460,7 +1008,6 @@
"\n"
"Автоматично ще започне нова проверка.\n"
-#: lib/commit.tcl:182
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -2473,7 +1020,6 @@
"Във файла „%s“ има конфликти при сливане. За да го подадете, трябва първо да "
"коригирате конфликтите и да добавите файла към индекса за подаване.\n"
-#: lib/commit.tcl:190
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -2484,7 +1030,6 @@
"\n"
"Файлът „%s“ не може да се подаде чрез текущата програма.\n"
-#: lib/commit.tcl:198
msgid ""
"No changes to commit.\n"
"\n"
@@ -2494,7 +1039,6 @@
"\n"
"Трябва да добавите поне един файл към индекса, за да подадете.\n"
-#: lib/commit.tcl:213
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -2512,15 +1056,12 @@
"● Втори ред: празен.\n"
"● Останалите редове: опишете защо се налага тази промяна.\n"
-#: lib/commit.tcl:244
msgid "Calling pre-commit hook..."
msgstr "Изпълняване на куката преди подаване…"
-#: lib/commit.tcl:259
msgid "Commit declined by pre-commit hook."
msgstr "Подаването е отхвърлено от куката преди подаване."
-#: lib/commit.tcl:278
msgid ""
"You are about to commit on a detached head. This is a potentially dangerous "
"thing to do because if you switch to another branch you will lose your "
@@ -2536,32 +1077,25 @@
" \n"
"Сигурни ли сте, че искате да извършите текущото подаване?"
-#: lib/commit.tcl:299
msgid "Calling commit-msg hook..."
msgstr "Изпълняване на куката за съобщението при подаване…"
-#: lib/commit.tcl:314
msgid "Commit declined by commit-msg hook."
msgstr "Подаването е отхвърлено от куката за съобщението при подаване."
-#: lib/commit.tcl:327
msgid "Committing changes..."
msgstr "Подаване на промените…"
-#: lib/commit.tcl:344
msgid "write-tree failed:"
msgstr "неуспешно запазване на дървото (write-tree):"
-#: lib/commit.tcl:345 lib/commit.tcl:395 lib/commit.tcl:422
msgid "Commit failed."
msgstr "Неуспешно подаване."
-#: lib/commit.tcl:362
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "Подаването „%s“ изглежда повредено"
-#: lib/commit.tcl:367
msgid ""
"No changes to commit.\n"
"\n"
@@ -2576,106 +1110,63 @@
"\n"
"Автоматично ще започне нова проверка.\n"
-#: lib/commit.tcl:374
msgid "No changes to commit."
msgstr "Няма промени за подаване."
-#: lib/commit.tcl:394
msgid "commit-tree failed:"
msgstr "неуспешно подаване на дървото (commit-tree):"
-#: lib/commit.tcl:421
msgid "update-ref failed:"
msgstr "неуспешно обновяване на указателите (update-ref):"
-#: lib/commit.tcl:514
#, tcl-format
msgid "Created commit %s: %s"
msgstr "Успешно подаване %s: %s"
-#: lib/branch_delete.tcl:16
-#, tcl-format
-msgid "%s (%s): Delete Branch"
-msgstr "%s (%s): Изтриване на клон"
+msgid "Working... please wait..."
+msgstr "В момента се извършва действие, изчакайте…"
-#: lib/branch_delete.tcl:21
-msgid "Delete Local Branch"
-msgstr "Изтриване на локален клон"
+msgid "Success"
+msgstr "Успех"
-#: lib/branch_delete.tcl:39
-msgid "Local Branches"
-msgstr "Локални клони"
+msgid "Error: Command Failed"
+msgstr "Грешка: неуспешно изпълнение на команда"
-#: lib/branch_delete.tcl:51
-msgid "Delete Only If Merged Into"
-msgstr "Изтриване, само ако промените са слети и другаде"
-
-#: lib/branch_delete.tcl:103
-#, tcl-format
-msgid "The following branches are not completely merged into %s:"
-msgstr "Не всички промени в клоните са слети в „%s“:"
-
-#: lib/branch_delete.tcl:131
-#, tcl-format
-msgid " - %s:"
-msgstr " — „%s:“"
-
-#: lib/branch_delete.tcl:141
-#, tcl-format
-msgid ""
-"Failed to delete branches:\n"
-"%s"
-msgstr ""
-"Неуспешно триене на клони:\n"
-"%s"
-
-#: lib/date.tcl:25
-#, tcl-format
-msgid "Invalid date from Git: %s"
-msgstr "Неправилни данни от Git: %s"
-
-#: lib/database.tcl:42
msgid "Number of loose objects"
msgstr "Брой непакетирани обекти"
-#: lib/database.tcl:43
msgid "Disk space used by loose objects"
msgstr "Дисково пространство заето от непакетирани обекти"
-#: lib/database.tcl:44
msgid "Number of packed objects"
msgstr "Брой пакетирани обекти"
-#: lib/database.tcl:45
msgid "Number of packs"
msgstr "Брой пакети"
-#: lib/database.tcl:46
msgid "Disk space used by packed objects"
msgstr "Дисково пространство заето от пакетирани обекти"
-#: lib/database.tcl:47
msgid "Packed objects waiting for pruning"
msgstr "Пакетирани обекти за окастряне"
-#: lib/database.tcl:48
msgid "Garbage files"
msgstr "Файлове за боклука"
-#: lib/database.tcl:66
+#, tcl-format
+msgid "%s:"
+msgstr "%s:"
+
#, tcl-format
msgid "%s (%s): Database Statistics"
msgstr "%s (%s): Статистика на базата от данни"
-#: lib/database.tcl:72
msgid "Compressing the object database"
msgstr "Компресиране на базата с данни за обектите"
-#: lib/database.tcl:83
msgid "Verifying the object database with fsck-objects"
msgstr "Проверка на базата с данни за обектите с програмата „fsck-objects“"
-#: lib/database.tcl:107
#, tcl-format
msgid ""
"This repository currently has approximately %i loose objects.\n"
@@ -2692,31 +1183,228 @@
"\n"
"Да се започне ли компресирането?"
-#: lib/error.tcl:20
+#, tcl-format
+msgid "Invalid date from Git: %s"
+msgstr "Неправилни данни от Git: %s"
+
+msgid ""
+"* No differences detected; stage the file to de-list it from Unstaged "
+"Changes.\n"
+msgstr ""
+"● Няма разлики. Добавете файла към индекса, за да се извади от промените "
+"извън индекса.\n"
+
+msgid "* Click to find other files that may have the same state.\n"
+msgstr "● Натиснете, за да потърсите други файлове в това състояние.\n"
+
+#, tcl-format
+msgid "Loading diff of %s..."
+msgstr "Зареждане на разликите в „%s“…"
+
+msgid ""
+"LOCAL: deleted\n"
+"REMOTE:\n"
+msgstr ""
+"ЛОКАЛНО: изтрит\n"
+"ОТДАЛЕЧЕНО:\n"
+
+msgid ""
+"REMOTE: deleted\n"
+"LOCAL:\n"
+msgstr ""
+"ОТДАЛЕЧЕНО: изтрит\n"
+"ЛОКАЛНО:\n"
+
+msgid "LOCAL:\n"
+msgstr "ЛОКАЛНО:\n"
+
+msgid "REMOTE:\n"
+msgstr "ОТДАЛЕЧЕНО:\n"
+
+#, tcl-format
+msgid "Unable to display %s"
+msgstr "Файлът „%s“ не може да се покаже"
+
+msgid "Error loading file:"
+msgstr "Грешка при зареждане на файл:"
+
+msgid "Git Repository (subproject)"
+msgstr "Хранилище на Git (подмодул)"
+
+msgid "* Binary file (not showing content)."
+msgstr "● Двоичен файл (съдържанието не се показва)."
+
+#, tcl-format
+msgid ""
+"* Untracked file is %d bytes.\n"
+"* Showing only first %d bytes.\n"
+msgstr ""
+"● Неследеният файл е %d байта.\n"
+"● Показват се само първите %d байта.\n"
+
+#, tcl-format
+msgid ""
+"\n"
+"* Untracked file clipped here by %s.\n"
+"* To see the entire file, use an external editor.\n"
+msgstr ""
+"\n"
+"● Неследеният файл е отрязан дотук от програмата „%s“.\n"
+"● Използвайте външен редактор, за да видите целия файл.\n"
+
+msgid "Failed to unstage selected hunk."
+msgstr "Избраното парче не може да се извади от индекса."
+
+msgid "Failed to revert selected hunk."
+msgstr "Избраното парче не може да се върне."
+
+msgid "Failed to stage selected hunk."
+msgstr "Избраното парче не може да се добави към индекса."
+
+msgid "Failed to unstage selected line."
+msgstr "Избраният ред не може да се извади от индекса."
+
+msgid "Failed to revert selected line."
+msgstr "Избраният ред не може да се върне."
+
+msgid "Failed to stage selected line."
+msgstr "Избраният ред не може да се добави към индекса."
+
+msgid "Failed to undo last revert."
+msgstr "Неуспешна отмяна на последното връщане."
+
+msgid "Default"
+msgstr "Стандартното"
+
+#, tcl-format
+msgid "System (%s)"
+msgstr "Системното (%s)"
+
+msgid "Other"
+msgstr "Друго"
+
#, tcl-format
msgid "%s: error"
msgstr "%s: грешка"
-#: lib/error.tcl:36
#, tcl-format
msgid "%s: warning"
msgstr "%s: предупреждение"
-#: lib/error.tcl:80
#, tcl-format
msgid "%s hook failed:"
msgstr "%s: грешка от куката"
-#: lib/error.tcl:96
msgid "You must correct the above errors before committing."
msgstr "Преди да можете да подадете, коригирайте горните грешки."
-#: lib/error.tcl:116
#, tcl-format
msgid "%s (%s): error"
msgstr "%s (%s): грешка"
-#: lib/merge.tcl:13
+msgid "Unable to unlock the index."
+msgstr "Индексът не може да се отключи."
+
+msgid "Index Error"
+msgstr "Грешка в индекса"
+
+msgid ""
+"Updating the Git index failed. A rescan will be automatically started to "
+"resynchronize git-gui."
+msgstr ""
+"Неуспешно обновяване на индекса на Git. Автоматично ще започне нова проверка "
+"за синхронизирането на git-gui."
+
+msgid "Continue"
+msgstr "Продължаване"
+
+msgid "Unlock Index"
+msgstr "Отключване на индекса"
+
+msgid "files"
+msgstr "файлове"
+
+msgid "Unstaging selected files from commit"
+msgstr "Изваждане на избраните файлове от подаването"
+
+#, tcl-format
+msgid "Unstaging %s from commit"
+msgstr "Изваждане на „%s“ от подаването"
+
+msgid "Ready to commit."
+msgstr "Готовност за подаване."
+
+msgid "Adding selected files"
+msgstr "Добавяне на избраните файлове"
+
+#, tcl-format
+msgid "Adding %s"
+msgstr "Добавяне на „%s“"
+
+#, tcl-format
+msgid "Stage %d untracked files?"
+msgstr "Да се добавят ли %d неследени файла към индекса?"
+
+msgid "Adding all changed files"
+msgstr "Добавяне на всички променени файлове"
+
+#, tcl-format
+msgid "Revert changes in file %s?"
+msgstr "Да се махнат ли промените във файла „%s“?"
+
+#, tcl-format
+msgid "Revert changes in these %i files?"
+msgstr "Да се махнат ли промените в тези %i файла?"
+
+msgid "Any unstaged changes will be permanently lost by the revert."
+msgstr ""
+"Всички промени, които не са били добавени в индекса, ще се загубят "
+"безвъзвратно."
+
+msgid "Do Nothing"
+msgstr "Нищо да не се прави"
+
+#, tcl-format
+msgid "Delete untracked file %s?"
+msgstr "Да се изтрие ли неследеният файл „%s“?"
+
+#, tcl-format
+msgid "Delete these %i untracked files?"
+msgstr "Да се изтрият ли тези %d неследени файла?"
+
+msgid "Files will be permanently deleted."
+msgstr "Файловете ще се изтрият окончателно."
+
+msgid "Delete Files"
+msgstr "Изтриване на файлове"
+
+msgid "Deleting"
+msgstr "Изтриване"
+
+msgid "Encountered errors deleting files:\n"
+msgstr "Грешки при изтриване на файловете:\n"
+
+#, tcl-format
+msgid "None of the %d selected files could be deleted."
+msgstr "Никой от избраните %d файла не бе изтрит."
+
+#, tcl-format
+msgid "%d of the %d selected files could not be deleted."
+msgstr "%d от избраните %d файла не бяха изтрити."
+
+msgid "Reverting selected files"
+msgstr "Махане на промените в избраните файлове"
+
+#, tcl-format
+msgid "Reverting %s"
+msgstr "Махане на промените в „%s“"
+
+msgid "Goto Line:"
+msgstr "Към ред:"
+
+msgid "Go"
+msgstr "Към"
+
msgid ""
"Cannot merge while amending.\n"
"\n"
@@ -2727,7 +1415,6 @@
"Трябва да завършите поправянето на текущото подаване, преди да започнете "
"сливане.\n"
-#: lib/merge.tcl:27
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -2744,7 +1431,6 @@
"Автоматично ще започне нова проверка.\n"
"\n"
-#: lib/merge.tcl:45
#, tcl-format
msgid ""
"You are in the middle of a conflicted merge.\n"
@@ -2762,7 +1448,6 @@
"завършите текущото сливане чрез подаване. Чак тогава може да започнете ново "
"сливане.\n"
-#: lib/merge.tcl:55
#, tcl-format
msgid ""
"You are in the middle of a change.\n"
@@ -2779,39 +1464,31 @@
"Трябва да завършите текущото подаване, преди да започнете сливане. Така ще "
"можете лесно да преустановите сливането, ако възникне нужда.\n"
-#: lib/merge.tcl:108
#, tcl-format
msgid "%s of %s"
msgstr "%s от общо %s"
-#: lib/merge.tcl:126
#, tcl-format
msgid "Merging %s and %s..."
msgstr "Сливане на „%s“ и „%s“…"
-#: lib/merge.tcl:137
msgid "Merge completed successfully."
msgstr "Сливането завърши успешно."
-#: lib/merge.tcl:139
msgid "Merge failed. Conflict resolution is required."
msgstr "Неуспешно сливане — има конфликти за коригиране."
-#: lib/merge.tcl:156
#, tcl-format
msgid "%s (%s): Merge"
msgstr "%s (%s): Сливане"
-#: lib/merge.tcl:164
#, tcl-format
msgid "Merge Into %s"
msgstr "Сливане в „%s“"
-#: lib/merge.tcl:183
msgid "Revision To Merge"
msgstr "Версия за сливане"
-#: lib/merge.tcl:218
msgid ""
"Cannot abort while amending.\n"
"\n"
@@ -2821,7 +1498,6 @@
"\n"
"Трябва да завършите поправката на това подаване.\n"
-#: lib/merge.tcl:228
msgid ""
"Abort merge?\n"
"\n"
@@ -2835,7 +1511,6 @@
"\n"
"Наистина ли да се преустанови сливането?"
-#: lib/merge.tcl:234
msgid ""
"Reset changes?\n"
"\n"
@@ -2849,18 +1524,621 @@
"\n"
"Наистина ли да се занулят промените?"
-#: lib/merge.tcl:246
msgid "Aborting"
msgstr "Преустановяване"
-#: lib/merge.tcl:247
msgid "files reset"
msgstr "файла със занулени промени"
-#: lib/merge.tcl:277
msgid "Abort failed."
msgstr "Неуспешно преустановяване."
-#: lib/merge.tcl:279
msgid "Abort completed. Ready."
msgstr "Успешно преустановяване. Готовност за следващо действие."
+
+msgid "Force resolution to the base version?"
+msgstr "Да се използва базовата версия"
+
+msgid "Force resolution to this branch?"
+msgstr "Да се използва версията от този клон"
+
+msgid "Force resolution to the other branch?"
+msgstr "Да се използва версията от другия клон"
+
+#, tcl-format
+msgid ""
+"Note that the diff shows only conflicting changes.\n"
+"\n"
+"%s will be overwritten.\n"
+"\n"
+"This operation can be undone only by restarting the merge."
+msgstr ""
+"Разликата показва само разликите с конфликт.\n"
+"\n"
+"Файлът „%s“ ще се презапише.\n"
+"\n"
+"Тази операция може да се отмени само чрез започване на сливането наново."
+
+#, tcl-format
+msgid "File %s seems to have unresolved conflicts, still stage?"
+msgstr ""
+"Изглежда, че все още има некоригирани конфликти във файла „%s“. Да се добави "
+"ли файлът към индекса?"
+
+#, tcl-format
+msgid "Adding resolution for %s"
+msgstr "Добавяне на корекция на конфликтите в „%s“"
+
+msgid "Cannot resolve deletion or link conflicts using a tool"
+msgstr ""
+"Конфликтите при символни връзки или изтриване не може да се коригират с "
+"външна програма."
+
+msgid "Conflict file does not exist"
+msgstr "Файлът, в който е конфликтът, не съществува"
+
+#, tcl-format
+msgid "Not a GUI merge tool: '%s'"
+msgstr "Това не е графична програма за сливане: „%s“"
+
+#, tcl-format
+msgid ""
+"Unable to process square brackets in \"mergetool.%s.cmd\" configuration "
+"option.\n"
+"\n"
+"Please remove the square brackets."
+msgstr ""
+"Квадратните скоби в настройката „mergetool.%s.cmd“ не може да се обработят.\n"
+"\n"
+"Махнете ги."
+
+#, tcl-format
+msgid ""
+"Unsupported merge tool '%s'.\n"
+"\n"
+"To use this tool, configure \"mergetool.%s.cmd\" as shown in the git-config "
+"manual page."
+msgstr ""
+"Неподдържана програма за сливане: „%s“.\n"
+"\n"
+"За да я използвате, настройте „mergetool.%s.cmd“ както както е обяснено в "
+"страницата на ръководството за „git-config“."
+
+msgid "Merge tool is already running, terminate it?"
+msgstr "Програмата за сливане вече е стартирана. Да се изключи ли?"
+
+#, tcl-format
+msgid ""
+"Error retrieving versions:\n"
+"%s"
+msgstr ""
+"Грешка при изтеглянето на версии:\n"
+"%s"
+
+#, tcl-format
+msgid ""
+"Could not start the merge tool:\n"
+"\n"
+"%s"
+msgstr ""
+"Програмата за сливане не може да се стартира:\n"
+"\n"
+"%s"
+
+msgid "Running merge tool..."
+msgstr "Стартиране на програмата за сливане…"
+
+msgid "Merge tool failed."
+msgstr "Грешка в програмата за сливане."
+
+#, tcl-format
+msgid "Invalid global encoding '%s'"
+msgstr "Неправилно глобално кодиране „%s“"
+
+#, tcl-format
+msgid "Invalid repo encoding '%s'"
+msgstr "Неправилно кодиране „%s“ на хранилището"
+
+msgid "Restore Defaults"
+msgstr "Стандартни настройки"
+
+msgid "Save"
+msgstr "Запазване"
+
+#, tcl-format
+msgid "%s Repository"
+msgstr "Хранилище „%s“"
+
+msgid "Global (All Repositories)"
+msgstr "Глобално (за всички хранилища)"
+
+msgid "User Name"
+msgstr "Потребителско име"
+
+msgid "Email Address"
+msgstr "Адрес на е-поща"
+
+msgid "Summarize Merge Commits"
+msgstr "Обобщаване на подаванията при сливане"
+
+msgid "Merge Verbosity"
+msgstr "Подробности при сливанията"
+
+msgid "Show Diffstat After Merge"
+msgstr "Извеждане на статистика след сливанията"
+
+msgid "Use Merge Tool"
+msgstr "Използване на програма за сливане"
+
+msgid "Trust File Modification Timestamps"
+msgstr "Доверие във времето на промяна на файловете"
+
+msgid "Prune Tracking Branches During Fetch"
+msgstr "Окастряне на следящите клонове при доставяне"
+
+msgid "Match Tracking Branches"
+msgstr "Напасване на следящите клонове"
+
+msgid "Use Textconv For Diffs and Blames"
+msgstr "Използване на „textconv“ за разликите и анотирането"
+
+msgid "Blame Copy Only On Changed Files"
+msgstr "Анотиране на копието само по променените файлове"
+
+msgid "Maximum Length of Recent Repositories List"
+msgstr "Максимален брой на списъка „Скоро ползвани“ хранилища"
+
+msgid "Minimum Letters To Blame Copy On"
+msgstr "Минимален брой знаци за анотиране на копието"
+
+msgid "Blame History Context Radius (days)"
+msgstr "Исторически обхват за анотиране в дни"
+
+msgid "Number of Diff Context Lines"
+msgstr "Брой редове за контекста на разликите"
+
+msgid "Additional Diff Parameters"
+msgstr "Аргументи към командата за разликите"
+
+msgid "Commit Message Text Width"
+msgstr "Широчина на текста на съобщението при подаване"
+
+msgid "New Branch Name Template"
+msgstr "Шаблон за името на новите клони"
+
+msgid "Default File Contents Encoding"
+msgstr "Кодиране на файловете"
+
+msgid "Warn before committing to a detached head"
+msgstr "Предупреждаване при подаване към несвързан указател"
+
+msgid "Staging of untracked files"
+msgstr "Добавяне на неследените файлове към индекса"
+
+msgid "Show untracked files"
+msgstr "Показване на неследените файлове"
+
+msgid "Tab spacing"
+msgstr "Ширина на табулацията"
+
+msgid "Change"
+msgstr "Смяна"
+
+msgid "Spelling Dictionary:"
+msgstr "Правописен речник:"
+
+msgid "Change Font"
+msgstr "Смяна на шрифта"
+
+#, tcl-format
+msgid "Choose %s"
+msgstr "Избор на „%s“"
+
+msgid "pt."
+msgstr "тчк."
+
+msgid "Preferences"
+msgstr "Настройки"
+
+msgid "Failed to completely save options:"
+msgstr "Неуспешно запазване на настройките:"
+
+#, tcl-format
+msgid "%s (%s): Add Remote"
+msgstr "%s (%s): Добавяне на отдалечено хранилище"
+
+msgid "Add New Remote"
+msgstr "Добавяне на отдалечено хранилище"
+
+msgid "Add"
+msgstr "Добавяне"
+
+msgid "Remote Details"
+msgstr "Данни за отдалеченото хранилище"
+
+msgid "Location:"
+msgstr "Местоположение:"
+
+msgid "Further Action"
+msgstr "Следващо действие"
+
+msgid "Fetch Immediately"
+msgstr "Незабавно доставяне"
+
+msgid "Initialize Remote Repository and Push"
+msgstr "Инициализиране на отдалеченото хранилище и изтласкване на промените"
+
+msgid "Do Nothing Else Now"
+msgstr "Да не се прави нищо"
+
+msgid "Please supply a remote name."
+msgstr "Задайте име за отдалеченото хранилище."
+
+#, tcl-format
+msgid "'%s' is not an acceptable remote name."
+msgstr "Отдалечено хранилище не може да се казва „%s“."
+
+#, tcl-format
+msgid "Failed to add remote '%s' of location '%s'."
+msgstr "Неуспешно добавяне на отдалеченото хранилище „%s“ от адрес „%s“."
+
+#, tcl-format
+msgid "fetch %s"
+msgstr "доставяне на „%s“"
+
+#, tcl-format
+msgid "Fetching the %s"
+msgstr "Доставяне на „%s“"
+
+#, tcl-format
+msgid "Do not know how to initialize repository at location '%s'."
+msgstr "Хранилището с местоположение „%s“ не може да се инициализира."
+
+#, tcl-format
+msgid "push %s"
+msgstr "изтласкване на „%s“"
+
+#, tcl-format
+msgid "Setting up the %s (at %s)"
+msgstr "Добавяне на хранилище „%s“ (с адрес „%s“)"
+
+#, tcl-format
+msgid "%s (%s): Delete Branch Remotely"
+msgstr "%s (%s): Изтриване на отдалечения клон"
+
+msgid "Delete Branch Remotely"
+msgstr "Изтриване на отдалечения клон"
+
+msgid "From Repository"
+msgstr "От хранилище"
+
+msgid "Remote:"
+msgstr "Отдалечено хранилище:"
+
+msgid "Arbitrary Location:"
+msgstr "Произволно местоположение:"
+
+msgid "Branches"
+msgstr "Клони"
+
+msgid "Delete Only If"
+msgstr "Изтриване, само ако"
+
+msgid "Merged Into:"
+msgstr "Слят в:"
+
+msgid "A branch is required for 'Merged Into'."
+msgstr "За данните „Слят в“ е необходимо да зададете клон."
+
+#, tcl-format
+msgid ""
+"The following branches are not completely merged into %s:\n"
+"\n"
+" - %s"
+msgstr ""
+"Следните клони не са слети напълно в „%s“:\n"
+"\n"
+" ● %s"
+
+#, tcl-format
+msgid ""
+"One or more of the merge tests failed because you have not fetched the "
+"necessary commits. Try fetching from %s first."
+msgstr ""
+"Поне една от пробите за сливане е неуспешна, защото не сте доставили всички "
+"необходими подавания. Пробвайте първо да доставите подаванията от „%s“."
+
+msgid "Please select one or more branches to delete."
+msgstr "Изберете поне един клон за изтриване."
+
+#, tcl-format
+msgid "Deleting branches from %s"
+msgstr "Изтриване на клони от „%s“"
+
+msgid "No repository selected."
+msgstr "Не е избрано хранилище."
+
+#, tcl-format
+msgid "Scanning %s..."
+msgstr "Претърсване на „%s“…"
+
+msgid "Push to"
+msgstr "Изтласкване към"
+
+msgid "Remove Remote"
+msgstr "Премахване на отдалечено хранилище"
+
+msgid "Prune from"
+msgstr "Окастряне от"
+
+msgid "Fetch from"
+msgstr "Доставяне от"
+
+msgid "All"
+msgstr "Всички"
+
+msgid "Find:"
+msgstr "Търсене:"
+
+msgid "Next"
+msgstr "Следваща поява"
+
+msgid "Prev"
+msgstr "Предишна поява"
+
+msgid "RegExp"
+msgstr "РегИзр"
+
+msgid "Case"
+msgstr "Главни/Малки"
+
+#, tcl-format
+msgid "%s (%s): Create Desktop Icon"
+msgstr "%s (%s): Добавяне на икона на работния плот"
+
+msgid "Cannot write shortcut:"
+msgstr "Клавишната комбинация не може да се запази:"
+
+msgid "Cannot write icon:"
+msgstr "Иконата не може да се запази:"
+
+msgid "Unsupported spell checker"
+msgstr "Тази програма за проверка на правописа не се поддържа"
+
+msgid "Spell checking is unavailable"
+msgstr "Липсва програма за проверка на правописа"
+
+msgid "Invalid spell checking configuration"
+msgstr "Неправилни настройки на проверката на правописа"
+
+#, tcl-format
+msgid "Reverting dictionary to %s."
+msgstr "Ползване на речник за език „%s“."
+
+msgid "Spell checker silently failed on startup"
+msgstr "Програмата за правопис даже не стартира успешно."
+
+msgid "Unrecognized spell checker"
+msgstr "Непозната програма за проверка на правописа"
+
+msgid "No Suggestions"
+msgstr "Няма предложения"
+
+msgid "Unexpected EOF from spell checker"
+msgstr "Неочакван край на файл от програмата за проверка на правописа"
+
+msgid "Spell Checker Failed"
+msgstr "Грешка в програмата за проверка на правописа"
+
+msgid "No keys found."
+msgstr "Не са открити ключове."
+
+#, tcl-format
+msgid "Found a public key in: %s"
+msgstr "Открит е публичен ключ в „%s“"
+
+msgid "Generate Key"
+msgstr "Генериране на ключ"
+
+msgid "Copy To Clipboard"
+msgstr "Копиране към системния буфер"
+
+msgid "Your OpenSSH Public Key"
+msgstr "Публичният ви ключ за OpenSSH"
+
+msgid "Generating..."
+msgstr "Генериране…"
+
+#, tcl-format
+msgid ""
+"Could not start ssh-keygen:\n"
+"\n"
+"%s"
+msgstr ""
+"Програмата „ssh-keygen“ не може да се стартира:\n"
+"\n"
+"%s"
+
+msgid "Generation failed."
+msgstr "Неуспешно генериране."
+
+msgid "Generation succeeded, but no keys found."
+msgstr "Генерирането завърши успешно, а не са намерени ключове."
+
+#, tcl-format
+msgid "Your key is in: %s"
+msgstr "Ключът ви е в „%s“"
+
+#, tcl-format
+msgid "%s ... %*i of %*i %s (%3i%%)"
+msgstr "%s… %*i от общо %*i %s (%3i%%)"
+
+#, tcl-format
+msgid "%s (%s): Add Tool"
+msgstr "%s (%s): Добавяне на команда"
+
+msgid "Add New Tool Command"
+msgstr "Добавяне на команда"
+
+msgid "Add globally"
+msgstr "Глобално добавяне"
+
+msgid "Tool Details"
+msgstr "Подробности за командата"
+
+msgid "Use '/' separators to create a submenu tree:"
+msgstr "За създаване на подменюта използвайте знака „/“ за разделител:"
+
+msgid "Command:"
+msgstr "Команда:"
+
+msgid "Show a dialog before running"
+msgstr "Преди изпълнение да се извежда диалогов прозорец"
+
+msgid "Ask the user to select a revision (sets $REVISION)"
+msgstr "Потребителят да укаже версия (задаване на променливата $REVISION)"
+
+msgid "Ask the user for additional arguments (sets $ARGS)"
+msgstr ""
+"Потребителят да укаже допълнителни аргументи (задаване на променливата $ARGS)"
+
+msgid "Don't show the command output window"
+msgstr "Без показване на прозорец с изхода от командата"
+
+msgid "Run only if a diff is selected ($FILENAME not empty)"
+msgstr ""
+"Стартиране само след избор на разлика (променливата $FILENAME не е празна)"
+
+msgid "Please supply a name for the tool."
+msgstr "Задайте име за командата."
+
+#, tcl-format
+msgid "Tool '%s' already exists."
+msgstr "Командата „%s“ вече съществува."
+
+#, tcl-format
+msgid ""
+"Could not add tool:\n"
+"%s"
+msgstr ""
+"Командата не може да се добави:\n"
+"%s"
+
+#, tcl-format
+msgid "%s (%s): Remove Tool"
+msgstr "%s (%s): Премахване на команда"
+
+msgid "Remove Tool Commands"
+msgstr "Премахване на команди"
+
+msgid "Remove"
+msgstr "Премахване"
+
+msgid "(Blue denotes repository-local tools)"
+msgstr "(командите към локалното хранилище са обозначени в синьо)"
+
+#, tcl-format
+msgid "%s (%s):"
+msgstr "%s (%s):"
+
+#, tcl-format
+msgid "Run Command: %s"
+msgstr "Изпълнение на командата „%s“"
+
+msgid "Arguments"
+msgstr "Аргументи"
+
+msgid "OK"
+msgstr "Добре"
+
+#, tcl-format
+msgid "Running %s requires a selected file."
+msgstr "За изпълнението на „%s“ трябва да изберете файл."
+
+#, tcl-format
+msgid "Are you sure you want to run %1$s on file \"%2$s\"?"
+msgstr "Сигурни ли сте, че искате да изпълните „%1$s“ върху файла „%2$s“?"
+
+#, tcl-format
+msgid "Are you sure you want to run %s?"
+msgstr "Сигурни ли сте, че искате да изпълните „%s“?"
+
+#, tcl-format
+msgid "Tool: %s"
+msgstr "Команда: %s"
+
+#, tcl-format
+msgid "Running: %s"
+msgstr "Изпълнение: %s"
+
+#, tcl-format
+msgid "Tool completed successfully: %s"
+msgstr "Командата завърши успешно: %s"
+
+#, tcl-format
+msgid "Tool failed: %s"
+msgstr "Командата върна грешка: %s"
+
+#, tcl-format
+msgid "Fetching new changes from %s"
+msgstr "Доставяне на промените от „%s“"
+
+#, tcl-format
+msgid "remote prune %s"
+msgstr "окастряне на следящите клони към „%s“"
+
+#, tcl-format
+msgid "Pruning tracking branches deleted from %s"
+msgstr "Окастряне на следящите клони на изтритите клони от „%s“"
+
+msgid "fetch all remotes"
+msgstr "доставяне от всички отдалечени"
+
+msgid "Fetching new changes from all remotes"
+msgstr "Доставяне на промените от всички отдалечени хранилища"
+
+msgid "remote prune all remotes"
+msgstr "окастряне на следящите изтрити"
+
+msgid "Pruning tracking branches deleted from all remotes"
+msgstr ""
+"Окастряне на следящите клони на изтритите клони от всички отдалечени "
+"хранилища"
+
+#, tcl-format
+msgid "Pushing changes to %s"
+msgstr "Изтласкване на промените към „%s“"
+
+#, tcl-format
+msgid "Mirroring to %s"
+msgstr "Изтласкване на всичко към „%s“"
+
+#, tcl-format
+msgid "Pushing %s %s to %s"
+msgstr "Изтласкване на %s „%s“ към „%s“"
+
+msgid "Push Branches"
+msgstr "Клони за изтласкване"
+
+msgid "Source Branches"
+msgstr "Клони-източници"
+
+msgid "Destination Repository"
+msgstr "Целево хранилище"
+
+msgid "Transfer Options"
+msgstr "Настройки при пренасянето"
+
+msgid "Force overwrite existing branch (may discard changes)"
+msgstr ""
+"Изрично презаписване на съществуващ клон (някои промени може да се загубят)"
+
+msgid "Use thin pack (for slow network connections)"
+msgstr "Максимална компресия (за бавни мрежови връзки)"
+
+msgid "Include tags"
+msgstr "Включване на етикетите"
+
+#, tcl-format
+msgid "%s (%s): Push"
+msgstr "%s (%s): Изтласкване"
diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh
index b1845c5..38debe3 100755
--- a/git-gui/windows/git-gui.sh
+++ b/git-gui/windows/git-gui.sh
@@ -13,13 +13,5 @@
incr argc -2
}
-set basedir [file dirname \
- [file dirname \
- [file dirname [info script]]]]
-set bindir [file join $basedir bin]
-set bindir "$bindir;[file join $basedir mingw bin]"
-regsub -all ";" $bindir "\\;" bindir
-set env(PATH) "$bindir;$env(PATH)"
-unset bindir
-
-source [file join [file dirname [info script]] git-gui.tcl]
+set thisdir [file normalize [file dirname [info script]]]
+source [file join $thisdir git-gui.tcl]
diff --git a/git-send-email.perl b/git-send-email.perl
index 659e6c5..437f8ac 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1653,8 +1653,18 @@
default => $ask_default);
die __("Send this email reply required") unless defined $_;
if (/^n/i) {
+ # If we are skipping a message, we should make sure that
+ # the next message is treated as the successor to the
+ # previously sent message, and not the skipped message.
+ $message_num--;
return 0;
} elsif (/^e/i) {
+ # Since the same message will be sent again, we need to
+ # decrement the message number to the previous message.
+ # Otherwise, the edited message will be treated as a
+ # different message sent after the original non-edited
+ # message.
+ $message_num--;
return -1;
} elsif (/^q/i) {
cleanup_compose_files();
@@ -1778,7 +1788,8 @@
if (is_outlook($smtp_server)) {
if ($smtp->message =~ /<([^>]+)>/) {
$message_id = "<$1>";
- printf __("Outlook reassigned Message-ID to: %s\n"), $message_id;
+ $header =~ s/^(Message-ID:\s*).*\n/${1}$message_id\n/m;
+ printf __("Outlook reassigned Message-ID to: %s\n"), $message_id if $smtp->debug;
} else {
warn __("Warning: Could not retrieve Message-ID from server response.\n");
}
@@ -2101,6 +2112,17 @@
}
}
+ # Validate the SMTP server port, if provided.
+ if (defined $smtp_server_port) {
+ my $port = Git::port_num($smtp_server_port);
+ if ($port) {
+ $smtp_server_port = $port;
+ } else {
+ die sprintf(__("error: invalid SMTP port '%s'\n"),
+ $smtp_server_port);
+ }
+ }
+
# Run the loop once again to avoid gaps in the counter due to FIFO
# arguments provided by the user.
my $num = 1;
diff --git a/git.c b/git.c
index 77c4359..83eac0a 100644
--- a/git.c
+++ b/git.c
@@ -371,7 +371,7 @@ static int handle_alias(struct strvec *args)
alias_command = args->v[0];
alias_string = alias_lookup(alias_command);
if (alias_string) {
- if (args->nr > 1 && !strcmp(args->v[1], "-h"))
+ if (args->nr == 2 && !strcmp(args->v[1], "-h"))
fprintf_ln(stderr, _("'%s' is aliased to '%s'"),
alias_command, alias_string);
if (alias_string[0] == '!') {
@@ -462,12 +462,12 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv, struct
precompose_argv_prefix(argc, argv, NULL);
if (use_pager == -1 && run_setup &&
!(p->option & DELAY_PAGER_CONFIG))
- use_pager = check_pager_config(the_repository, p->cmd);
+ use_pager = check_pager_config(repo, p->cmd);
if (use_pager == -1 && p->option & USE_PAGER)
use_pager = 1;
if (run_setup && startup_info->have_repository)
/* get_git_dir() may set up repo, avoid that */
- trace_repo_setup(the_repository);
+ trace_repo_setup(repo);
commit_pager_choice();
if (!help && p->option & NEED_WORK_TREE)
@@ -646,7 +646,9 @@ static struct cmd_struct commands[] = {
{ "verify-pack", cmd_verify_pack },
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
{ "version", cmd_version },
+#ifndef WITH_BREAKING_CHANGES
{ "whatchanged", cmd_whatchanged, RUN_SETUP },
+#endif
{ "worktree", cmd_worktree, RUN_SETUP },
{ "write-tree", cmd_write_tree, RUN_SETUP },
};
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1968976..3b6acfc 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -7,7 +7,51 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.
-package require Tk
+if {[catch {package require Tcl 8.6-} err]} {
+ catch {wm withdraw .}
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title "gitk: fatal error" \
+ -message $err
+ exit 1
+}
+
+set MIN_GIT_VERSION 2.20
+regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
+if {[package vcompare $git_version $MIN_GIT_VERSION] < 0} {
+ set message "The git executable found is too old.
+The minimum required version is $MIN_GIT_VERSION.0.
+The version of git found is $git_version."
+
+ catch {wm withdraw .}
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title "gitk: fatal error" \
+ -message $message
+ exit 1
+}
+
+######################################################################
+## Enable Tcl8 profile in Tcl9, allowing consumption of data that has
+## bytes not conforming to the assumed encoding profile.
+
+if {[package vcompare $::tcl_version 9.0] >= 0} {
+ rename open _strict_open
+ proc open args {
+ set f [_strict_open {*}$args]
+ chan configure $f -profile tcl8
+ return $f
+ }
+ proc convertfrom args {
+ return [encoding convertfrom -profile tcl8 {*}$args]
+ }
+} else {
+ proc convertfrom args {
+ return [encoding convertfrom {*}$args]
+ }
+}
######################################################################
##
@@ -113,6 +157,91 @@
# End of safe PATH lookup stuff
+# Wrap exec/open to sanitize arguments
+
+# unsafe arguments begin with redirections or the pipe or background operators
+proc is_arg_unsafe {arg} {
+ regexp {^([<|>&]|2>)} $arg
+}
+
+proc make_arg_safe {arg} {
+ if {[is_arg_unsafe $arg]} {
+ set arg [file join . $arg]
+ }
+ return $arg
+}
+
+proc make_arglist_safe {arglist} {
+ set res {}
+ foreach arg $arglist {
+ lappend res [make_arg_safe $arg]
+ }
+ return $res
+}
+
+# executes one command
+# no redirections or pipelines are possible
+# cmd is a list that specifies the command and its arguments
+# calls `exec` and returns its value
+proc safe_exec {cmd} {
+ eval exec [make_arglist_safe $cmd]
+}
+
+# executes one command with redirections
+# no pipelines are possible
+# cmd is a list that specifies the command and its arguments
+# redir is a list that specifies redirections (output, background, constant(!) commands)
+# calls `exec` and returns its value
+proc safe_exec_redirect {cmd redir} {
+ eval exec [make_arglist_safe $cmd] $redir
+}
+
+proc safe_open_file {filename flags} {
+ # a file name starting with "|" would attempt to run a process
+ # but such a file name must be treated as a relative path
+ # hide the "|" behind "./"
+ if {[string index $filename 0] eq "|"} {
+ set filename [file join . $filename]
+ }
+ open $filename $flags
+}
+
+# opens a command pipeline for reading
+# cmd is a list that specifies the command and its arguments
+# calls `open` and returns the file id
+proc safe_open_command {cmd} {
+ open |[make_arglist_safe $cmd] r
+}
+
+# opens a command pipeline for reading and writing
+# cmd is a list that specifies the command and its arguments
+# calls `open` and returns the file id
+proc safe_open_command_rw {cmd} {
+ open |[make_arglist_safe $cmd] r+
+}
+
+# opens a command pipeline for reading with redirections
+# cmd is a list that specifies the command and its arguments
+# redir is a list that specifies redirections
+# calls `open` and returns the file id
+proc safe_open_command_redirect {cmd redir} {
+ set cmd [make_arglist_safe $cmd]
+ open |[concat $cmd $redir] r
+}
+
+# opens a pipeline with several commands for reading
+# cmds is a list of lists, each of which specifies a command and its arguments
+# calls `open` and returns the file id
+proc safe_open_pipeline {cmds} {
+ set cmd {}
+ foreach subcmd $cmds {
+ set cmd [concat $cmd | [make_arglist_safe $subcmd]]
+ }
+ open $cmd r
+}
+
+# End exec/open wrappers
+
proc hasworktree {} {
return [expr {[exec git rev-parse --is-bare-repository] == "false" &&
[exec git rev-parse --is-inside-git-dir] == "false"}]
@@ -238,7 +367,7 @@
set mlist {}
set nr_unmerged 0
if {[catch {
- set fd [open "| git ls-files -u" r]
+ set fd [safe_open_command {git ls-files -u}]
} err]} {
show_error {} . "[mc "Couldn't get list of unmerged files:"] $err"
exit 1
@@ -260,7 +389,7 @@
proc parseviewargs {n arglist} {
global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env
global vinlinediff
- global worddiff git_version
+ global worddiff
set vdatemode($n) 0
set vmergeonly($n) 0
@@ -311,14 +440,10 @@
"--color-words*" - "--word-diff=color" {
# These trigger a word diff in the console interface,
# so help the user by enabling our own support
- if {[package vcompare $git_version "1.7.2"] >= 0} {
- set worddiff [mc "Color words"]
- }
+ set worddiff [mc "Color words"]
}
"--word-diff*" {
- if {[package vcompare $git_version "1.7.2"] >= 0} {
- set worddiff [mc "Markup words"]
- }
+ set worddiff [mc "Markup words"]
}
"--stat=*" - "--numstat" - "--shortstat" - "--summary" -
"--check" - "--exit-code" - "--quiet" - "--topo-order" -
@@ -394,20 +519,21 @@
proc parseviewrevs {view revs} {
global vposids vnegids
+ global hashlength
if {$revs eq {}} {
set revs HEAD
} elseif {[lsearch -exact $revs --all] >= 0} {
lappend revs HEAD
}
- if {[catch {set ids [eval exec git rev-parse $revs]} err]} {
+ if {[catch {set ids [safe_exec [concat git rev-parse $revs]]} err]} {
# we get stdout followed by stderr in $err
# for an unknown rev, git rev-parse echoes it and then errors out
set errlines [split $err "\n"]
set badrev {}
for {set l 0} {$l < [llength $errlines]} {incr l} {
set line [lindex $errlines $l]
- if {!([string length $line] == 40 && [string is xdigit $line])} {
+ if {!([string length $line] == $hashlength && [string is xdigit $line])} {
if {[string match "fatal:*" $line]} {
if {[string match "fatal: ambiguous argument*" $line]
&& $badrev ne {}} {
@@ -457,16 +583,6 @@
return $ret
}
-# Escapes a list of filter paths to be passed to git log via stdin. Note that
-# paths must not be quoted.
-proc escape_filter_paths {paths} {
- set escaped [list]
- foreach path $paths {
- lappend escaped [string map {\\ \\\\ "\ " "\\\ "} $path]
- }
- return $escaped
-}
-
# Start off a git log process and arrange to read its output
proc start_rev_list {view} {
global startmsecs commitidx viewcomplete curview
@@ -476,7 +592,6 @@
global viewactive viewinstances vmergeonly
global mainheadid viewmainheadid viewmainheadid_orig
global vcanopt vflags vrevs vorigargs
- global show_notes
set startmsecs [clock clicks -milliseconds]
set commitidx($view) 0
@@ -488,7 +603,7 @@
set args $viewargs($view)
if {$viewargscmd($view) ne {}} {
if {[catch {
- set str [exec sh -c $viewargscmd($view)]
+ set str [safe_exec [list sh -c $viewargscmd($view)]]
} err]} {
error_popup "[mc "Error executing --argscmd command:"] $err"
return 0
@@ -526,10 +641,9 @@
}
if {[catch {
- set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
- --parents --boundary $args --stdin \
- "<<[join [concat $revs "--" \
- [escape_filter_paths $files]] "\\n"]"] r]
+ set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \
+ --parents --boundary $args --stdin] \
+ [list "<<[join [concat $revs "--" $files] "\n"]"]]
} err]} {
error_popup "[mc "Error executing git log:"] $err"
return 0
@@ -563,9 +677,9 @@
set pid [pid $fd]
if {$::tcl_platform(platform) eq {windows}} {
- exec taskkill /pid $pid
+ safe_exec [list taskkill /pid $pid]
} else {
- exec kill $pid
+ safe_exec [list kill $pid]
}
}
catch {close $fd}
@@ -623,7 +737,7 @@
global mainheadid viewmainheadid viewmainheadid_orig pending_select
global hasworktree
global varcid vposids vnegids vflags vrevs
- global show_notes
+ global hashlength
set hasworktree [hasworktree]
rereadrefs
@@ -657,7 +771,7 @@
# take out positive refs that we asked for before or
# that we have already seen
foreach rev $revs {
- if {[string length $rev] == 40} {
+ if {[string length $rev] == $hashlength} {
if {[lsearch -exact $oldpos $rev] < 0
&& ![info exists varcid($view,$rev)]} {
lappend newrevs $rev
@@ -680,11 +794,9 @@
set args $vorigargs($view)
}
if {[catch {
- set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
- --parents --boundary $args --stdin \
- "<<[join [concat $revs "--" \
- [escape_filter_paths \
- $vfilelimit($view)]] "\\n"]"] r]
+ set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \
+ --parents --boundary $args --stdin] \
+ [list "<<[join [concat $revs "--" $vfilelimit($view)] "\n"]"]]
} err]} {
error_popup "[mc "Error executing git log:"] $err"
return
@@ -1542,6 +1654,7 @@
global parents children curview hlview
global idpending ordertok
global varccommits varcid varctok vtokmod vfilelimit vshortids
+ global hashlength
set stuff [read $fd 500000]
# git log doesn't terminate the last commit with a null...
@@ -1624,7 +1737,7 @@
}
set ok 1
foreach id $ids {
- if {[string length $id] != 40} {
+ if {[string length $id] != $hashlength} {
set ok 0
break
}
@@ -1651,8 +1764,8 @@
# and if we already know about it, using the rewritten
# parent as a substitute parent for $id's children.
if {![catch {
- set rwid [exec git rev-list --first-parent --max-count=1 \
- $id -- $vfilelimit($view)]
+ set rwid [safe_exec [list git rev-list --first-parent --max-count=1 \
+ $id -- $vfilelimit($view)]]
}]} {
if {$rwid ne {} && [info exists varcid($view,$rwid)]} {
# use $rwid in place of $id
@@ -1772,7 +1885,7 @@
global tclencoding
# Invoke git-log to handle automatic encoding conversion
- set fd [open [concat | git log --no-color --pretty=raw -1 $id] r]
+ set fd [safe_open_command [concat git log --no-color --pretty=raw -1 $id]]
# Read the results using i18n.logoutputencoding
fconfigure $fd -translation lf -eofchar {}
if {$tclencoding != {}} {
@@ -1870,8 +1983,8 @@
return 1
}
-# Expand an abbreviated commit ID to a list of full 40-char IDs that match
-# and are present in the current view.
+# Expand an abbreviated commit ID to a list of full 40-char (or 64-char
+# for SHA256 repo) IDs that match and are present in the current view.
# This is fairly slow...
proc longid {prefix} {
global varcid curview vshortids
@@ -1899,23 +2012,24 @@
}
proc readrefs {} {
- global tagids idtags headids idheads tagobjid
+ global tagids idtags headids idheads tagobjid upstreamofref
global otherrefids idotherrefs mainhead mainheadid
global selecthead selectheadid
global hideremotes
global tclencoding
+ global hashlength
- foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
+ foreach v {tagids idtags headids idheads otherrefids idotherrefs upstreamofref} {
unset -nocomplain $v
}
- set refd [open [list | git show-ref -d] r]
+ set refd [safe_open_command [list git show-ref -d]]
if {$tclencoding != {}} {
fconfigure $refd -encoding $tclencoding
}
while {[gets $refd line] >= 0} {
- if {[string index $line 40] ne " "} continue
- set id [string range $line 0 39]
- set ref [string range $line 41 end]
+ if {[string index $line $hashlength] ne " "} continue
+ set id [string range $line 0 [expr {$hashlength - 1}]]
+ set ref [string range $line [expr {$hashlength + 1}] end]
if {![string match "refs/*" $ref]} continue
set name [string range $ref 5 end]
if {[string match "remotes/*" $name]} {
@@ -1939,8 +2053,10 @@
set tagids($name) $id
lappend idtags($id) $name
} else {
- set otherrefids($name) $id
- lappend idotherrefs($id) $name
+ if [is_other_ref_visible $name] {
+ set otherrefids($name) $id
+ lappend idotherrefs($id) $name
+ }
}
}
catch {close $refd}
@@ -1956,9 +2072,20 @@
set selectheadid {}
if {$selecthead ne {}} {
catch {
- set selectheadid [exec git rev-parse --verify $selecthead]
+ set selectheadid [safe_exec [list git rev-parse --verify $selecthead]]
}
}
+ #load the local_branch->upstream mapping
+ # the result of the for-each-ref command produces: local_branch NUL upstream
+ set refd [safe_open_command [list git for-each-ref {--format=%(refname:short)%00%(upstream)} refs/heads/]]
+ while {[gets $refd local_tracking] >= 0} {
+ set line [split $local_tracking \0]
+ if {[lindex $line 1] ne {}} {
+ set upstream_ref [string map {"refs/" ""} [lindex $line 1]]
+ set upstreamofref([lindex $line 0]) $upstream_ref
+ }
+ }
+ catch {close $refd}
}
# skip over fake commits
@@ -1999,23 +2126,12 @@
}
proc ttk_toplevel {w args} {
- global use_ttk
eval [linsert $args 0 ::toplevel $w]
- if {$use_ttk} {
- place [ttk::frame $w._toplevel_background] -x 0 -y 0 -relwidth 1 -relheight 1
- }
+ place [ttk::frame $w._toplevel_background] -x 0 -y 0 -relwidth 1 -relheight 1
return $w
}
proc make_transient {window origin} {
- global have_tk85
-
- # In MacOS Tk 8.4 transient appears to work by setting
- # overrideredirect, which is utterly useless, since the
- # windows get no border, and are not even kept above
- # the parent.
- if {!$have_tk85 && [tk windowingsystem] eq {aqua}} return
-
wm transient $window $origin
# Windows fails to place transient windows normally, so
@@ -2026,12 +2142,10 @@
}
proc show_error {w top msg} {
- global NS
- if {![info exists NS]} {set NS ""}
if {[wm state $top] eq "withdrawn"} { wm deiconify $top }
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- ${NS}::button $w.ok -default active -text [mc OK] -command "destroy $top"
+ ttk::button $w.ok -default active -text [mc OK] -command "destroy $top"
pack $w.ok -side bottom -fill x
bind $top <Visibility> "grab $top; focus $top"
bind $top <Key-Return> "destroy $top"
@@ -2053,16 +2167,16 @@
}
proc confirm_popup {msg {owner .}} {
- global confirm_ok NS
+ global confirm_ok
set confirm_ok 0
set w .confirm
ttk_toplevel $w
make_transient $w $owner
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
+ ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
pack $w.ok -side left -fill x
- ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w"
+ ttk::button $w.cancel -text [mc Cancel] -command "destroy $w"
pack $w.cancel -side right -fill x
bind $w <Visibility> "grab $w; focus $w"
bind $w <Key-Return> "set confirm_ok 1; destroy $w"
@@ -2078,8 +2192,6 @@
}
proc setoptions {} {
- global use_ttk
-
if {[tk windowingsystem] ne "win32"} {
option add *Panedwindow.showHandle 1 startupFile
option add *Panedwindow.sashRelief raised startupFile
@@ -2172,23 +2284,62 @@
$w selection clear
}
proc makedroplist {w varname args} {
- global use_ttk
- if {$use_ttk} {
- set width 0
- foreach label $args {
- set cx [string length $label]
- if {$cx > $width} {set width $cx}
- }
- set gm [ttk::combobox $w -width $width -state readonly\
- -textvariable $varname -values $args \
- -exportselection false]
- bind $gm <<ComboboxSelected>> [list $gm selection clear]
- } else {
- set gm [eval [linsert $args 0 tk_optionMenu $w $varname]]
+ set width 0
+ foreach label $args {
+ set cx [string length $label]
+ if {$cx > $width} {set width $cx}
}
+ set gm [ttk::combobox $w -width $width -state readonly\
+ -textvariable $varname -values $args \
+ -exportselection false]
+ bind $gm <<ComboboxSelected>> [list $gm selection clear]
return $gm
}
+proc scrollval {D {koff 0}} {
+ global kscroll scroll_D0
+ return [expr int(-($D / $scroll_D0) * max(1, $kscroll-$koff))]
+}
+
+proc bind_mousewheel {} {
+ global canv cflist ctext
+ bindall <MouseWheel> {allcanvs yview scroll [scrollval %D] units}
+ bindall <Shift-MouseWheel> break
+ bind $ctext <MouseWheel> {$ctext yview scroll [scrollval %D 2] units}
+ bind $ctext <Shift-MouseWheel> {$ctext xview scroll [scrollval %D 2] units}
+ bind $cflist <MouseWheel> {$cflist yview scroll [scrollval %D 2] units}
+ bind $cflist <Shift-MouseWheel> break
+ bind $canv <Shift-MouseWheel> {$canv xview scroll [scrollval %D] units}
+
+ if {[package vcompare $::tcl_version 8.7] >= 0} {
+ bindall <Alt-MouseWheel> {allcanvs yview scroll [scrollval 5*%D] units}
+ bindall <Alt-Shift-MouseWheel> break
+ bind $ctext <Alt-MouseWheel> {$ctext yview scroll [scrollval 5*%D 2] units}
+ bind $ctext <Alt-Shift-MouseWheel> {$ctext xview scroll [scrollval 5*%D 2] units}
+ bind $cflist <Alt-MouseWheel> {$cflist yview scroll [scrollval 5*%D 2] units}
+ bind $cflist <Alt-Shift-MouseWheel> break
+ bind $canv <Alt-Shift-MouseWheel> {$canv xview scroll [scrollval 5*%D] units}
+ }
+}
+
+proc bind_mousewheel_buttons {} {
+ global canv cflist ctext
+ bindall <ButtonRelease-4> {allcanvs yview scroll [scrollval 1] units}
+ bindall <ButtonRelease-5> {allcanvs yview scroll [scrollval -1] units}
+ bindall <Shift-ButtonRelease-4> break
+ bindall <Shift-ButtonRelease-5> break
+ bind $ctext <ButtonRelease-4> {$ctext yview scroll [scrollval 1 2] units}
+ bind $ctext <ButtonRelease-5> {$ctext yview scroll [scrollval -1 2] units}
+ bind $ctext <Shift-ButtonRelease-4> {$ctext xview scroll [scrollval 1 2] units}
+ bind $ctext <Shift-ButtonRelease-5> {$ctext xview scroll [scrollval -1 2] units}
+ bind $cflist <ButtonRelease-4> {$cflist yview scroll [scrollval 1 2] units}
+ bind $cflist <ButtonRelease-5> {$cflist yview scroll [scrollval -1 2] units}
+ bind $cflist <Shift-ButtonRelease-4> break
+ bind $cflist <Shift-ButtonRelease-5> break
+ bind $canv <Shift-ButtonRelease-4> {$canv xview scroll [scrollval 1] units}
+ bind $canv <Shift-ButtonRelease-5> {$canv xview scroll [scrollval -1] units}
+}
+
proc makewindow {} {
global canv canv2 canv3 linespc charspc ctext cflist cscroll
global tabstop
@@ -2207,9 +2358,8 @@
global headctxmenu progresscanv progressitem progresscoords statusw
global fprogitem fprogcoord lastprogupdate progupdatepending
global rprogitem rprogcoord rownumsel numcommits
- global have_tk85 have_tk86 use_ttk NS
- global git_version
global worddiff
+ global hashlength scroll_D0
# The "mc" arguments here are purely so that xgettext
# sees the following string as needing to be translated
@@ -2220,7 +2370,7 @@
{mc "Reread re&ferences" command rereadrefs}
{mc "&List references" command showrefs -accelerator F2}
{xx "" separator}
- {mc "Start git &gui" command {exec git gui &}}
+ {mc "Start git &gui" command {safe_exec_redirect [list git gui] [list &]}}
{xx "" separator}
{mc "&Quit" command doquit -accelerator Meta1-Q}
}}
@@ -2261,13 +2411,11 @@
makemenu .bar $bar
. configure -menu .bar
- if {$use_ttk} {
- # cover the non-themed toplevel with a themed frame.
- place [ttk::frame ._main_background] -x 0 -y 0 -relwidth 1 -relheight 1
- }
+ # cover the non-themed toplevel with a themed frame.
+ place [ttk::frame ._main_background] -x 0 -y 0 -relwidth 1 -relheight 1
# the gui has upper and lower half, parts of a paned window.
- ${NS}::panedwindow .ctop -orient vertical
+ ttk::panedwindow .ctop -orient vertical
# possibly use assumed geometry
if {![info exists geometry(pwsash0)]} {
@@ -2280,12 +2428,9 @@
}
# the upper half will have a paned window, a scroll bar to the right, and some stuff below
- ${NS}::frame .tf -height $geometry(topheight) -width $geometry(topwidth)
- ${NS}::frame .tf.histframe
- ${NS}::panedwindow .tf.histframe.pwclist -orient horizontal
- if {!$use_ttk} {
- .tf.histframe.pwclist configure -sashpad 0 -handlesize 4
- }
+ ttk::frame .tf -height $geometry(topheight) -width $geometry(topwidth)
+ ttk::frame .tf.histframe
+ ttk::panedwindow .tf.histframe.pwclist -orient horizontal
# create three canvases
set cscroll .tf.histframe.csb
@@ -2293,6 +2438,7 @@
canvas $canv \
-selectbackground $selectbgcolor \
-background $bgcolor -bd 0 \
+ -xscrollincr $linespc \
-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
.tf.histframe.pwclist add $canv
set canv2 .tf.histframe.pwclist.canv2
@@ -2305,28 +2451,22 @@
-selectbackground $selectbgcolor \
-background $bgcolor -bd 0 -yscrollincr $linespc
.tf.histframe.pwclist add $canv3
- if {$use_ttk} {
- bind .tf.histframe.pwclist <Map> {
- bind %W <Map> {}
- .tf.histframe.pwclist sashpos 1 [lindex $::geometry(pwsash1) 0]
- .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0]
- }
- } else {
- eval .tf.histframe.pwclist sash place 0 $geometry(pwsash0)
- eval .tf.histframe.pwclist sash place 1 $geometry(pwsash1)
+ bind .tf.histframe.pwclist <Map> {
+ bind %W <Map> {}
+ .tf.histframe.pwclist sashpos 1 [lindex $::geometry(pwsash1) 0]
+ .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0]
}
# a scroll bar to rule them
- ${NS}::scrollbar $cscroll -command {allcanvs yview}
- if {!$use_ttk} {$cscroll configure -highlightthickness 0}
+ ttk::scrollbar $cscroll -command {allcanvs yview}
pack $cscroll -side right -fill y
bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
lappend bglist $canv $canv2 $canv3
pack .tf.histframe.pwclist -fill both -expand 1 -side left
# we have two button bars at bottom of top frame. Bar 1
- ${NS}::frame .tf.bar
- ${NS}::frame .tf.lbar -height 15
+ ttk::frame .tf.bar
+ ttk::frame .tf.lbar -height 15
set sha1entry .tf.bar.sha1
set entries $sha1entry
@@ -2335,7 +2475,7 @@
-command gotocommit -width 8
$sha1but conf -disabledforeground [$sha1but cget -foreground]
pack .tf.bar.sha1label -side left
- ${NS}::entry $sha1entry -width 40 -font textfont -textvariable sha1string
+ ttk::entry $sha1entry -width $hashlength -font textfont -textvariable sha1string
trace add variable sha1string write sha1change
pack $sha1entry -side left -pady 2
@@ -2360,50 +2500,30 @@
image create bitmap bm-right -data $bm_right_data -foreground $uifgcolor
image create bitmap bm-right-gray -data $bm_right_data -foreground $uifgdisabledcolor
- ${NS}::button .tf.bar.leftbut -command goback -state disabled -width 26
- if {$use_ttk} {
- .tf.bar.leftbut configure -image [list bm-left disabled bm-left-gray]
- } else {
- .tf.bar.leftbut configure -image bm-left
- }
+ ttk::button .tf.bar.leftbut -command goback -state disabled -width 26
+ .tf.bar.leftbut configure -image [list bm-left disabled bm-left-gray]
pack .tf.bar.leftbut -side left -fill y
- ${NS}::button .tf.bar.rightbut -command goforw -state disabled -width 26
- if {$use_ttk} {
- .tf.bar.rightbut configure -image [list bm-right disabled bm-right-gray]
- } else {
- .tf.bar.rightbut configure -image bm-right
- }
+ ttk::button .tf.bar.rightbut -command goforw -state disabled -width 26
+ .tf.bar.rightbut configure -image [list bm-right disabled bm-right-gray]
pack .tf.bar.rightbut -side left -fill y
- ${NS}::label .tf.bar.rowlabel -text [mc "Row"]
+ ttk::label .tf.bar.rowlabel -text [mc "Row"]
set rownumsel {}
- ${NS}::label .tf.bar.rownum -width 7 -textvariable rownumsel \
+ ttk::label .tf.bar.rownum -width 7 -textvariable rownumsel \
-relief sunken -anchor e
- ${NS}::label .tf.bar.rowlabel2 -text "/"
- ${NS}::label .tf.bar.numcommits -width 7 -textvariable numcommits \
+ ttk::label .tf.bar.rowlabel2 -text "/"
+ ttk::label .tf.bar.numcommits -width 7 -textvariable numcommits \
-relief sunken -anchor e
pack .tf.bar.rowlabel .tf.bar.rownum .tf.bar.rowlabel2 .tf.bar.numcommits \
-side left
- if {!$use_ttk} {
- foreach w {rownum numcommits} {.tf.bar.$w configure -font textfont}
- }
global selectedline
trace add variable selectedline write selectedline_change
# Status label and progress bar
set statusw .tf.bar.status
- ${NS}::label $statusw -width 15 -relief sunken
+ ttk::label $statusw -width 15 -relief sunken
pack $statusw -side left -padx 5
- if {$use_ttk} {
- set progresscanv [ttk::progressbar .tf.bar.progress]
- } else {
- set h [expr {[font metrics uifont -linespace] + 2}]
- set progresscanv .tf.bar.progress
- canvas $progresscanv -relief sunken -height $h -borderwidth 2
- set progressitem [$progresscanv create rect -1 0 0 $h -fill "#00ff00"]
- set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow]
- set rprogitem [$progresscanv create rect -1 0 0 $h -fill red]
- }
+ set progresscanv [ttk::progressbar .tf.bar.progress]
pack $progresscanv -side right -expand 1 -fill x -padx {0 2}
set progresscoords {0 0}
set fprogcoord 0
@@ -2413,7 +2533,7 @@
set progupdatepending 0
# build up the bottom bar of upper window
- ${NS}::label .tf.lbar.flabel -text "[mc "Find"] "
+ ttk::label .tf.lbar.flabel -text "[mc "Find"] "
set bm_down_data {
#define down_width 16
@@ -2425,7 +2545,7 @@
0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
}
image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
- ${NS}::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
+ ttk::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
.tf.lbar.fnext configure -image bm-down
set bm_up_data {
@@ -2438,10 +2558,10 @@
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
}
image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
- ${NS}::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
+ ttk::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
.tf.lbar.fprev configure -image bm-up
- ${NS}::label .tf.lbar.flab2 -text " [mc "commit"] "
+ ttk::label .tf.lbar.flab2 -text " [mc "commit"] "
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
-side left -fill y
@@ -2457,7 +2577,7 @@
set findstring {}
set fstring .tf.lbar.findstring
lappend entries $fstring
- ${NS}::entry $fstring -width 30 -textvariable findstring
+ ttk::entry $fstring -width 30 -textvariable findstring
trace add variable findstring write find_change
set findtype [mc "Exact"]
set findtypemenu [makedroplist .tf.lbar.findtype \
@@ -2476,45 +2596,41 @@
pack .tf.bar -in .tf -side bottom -fill x
pack .tf.histframe -fill both -side top -expand 1
.ctop add .tf
- if {!$use_ttk} {
- .ctop paneconfigure .tf -height $geometry(topheight)
- .ctop paneconfigure .tf -width $geometry(topwidth)
- }
# now build up the bottom
- ${NS}::panedwindow .pwbottom -orient horizontal
+ ttk::panedwindow .pwbottom -orient horizontal
# lower left, a text box over search bar, scroll bar to the right
# if we know window height, then that will set the lower text height, otherwise
# we set lower text height which will drive window height
if {[info exists geometry(main)]} {
- ${NS}::frame .bleft -width $geometry(botwidth)
+ ttk::frame .bleft -width $geometry(botwidth)
} else {
- ${NS}::frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
+ ttk::frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
}
- ${NS}::frame .bleft.top
- ${NS}::frame .bleft.mid
- ${NS}::frame .bleft.bottom
+ ttk::frame .bleft.top
+ ttk::frame .bleft.mid
+ ttk::frame .bleft.bottom
# gap between sub-widgets
set wgap [font measure uifont "i"]
- ${NS}::button .bleft.top.search -text [mc "Search"] -command dosearch
+ ttk::button .bleft.top.search -text [mc "Search"] -command dosearch
pack .bleft.top.search -side left -padx 5
set sstring .bleft.top.sstring
set searchstring ""
- ${NS}::entry $sstring -width 20 -textvariable searchstring
+ ttk::entry $sstring -width 20 -textvariable searchstring
lappend entries $sstring
trace add variable searchstring write incrsearch
pack $sstring -side left -expand 1 -fill x
- ${NS}::radiobutton .bleft.mid.diff -text [mc "Diff"] \
+ ttk::radiobutton .bleft.mid.diff -text [mc "Diff"] \
-command changediffdisp -variable diffelide -value {0 0}
- ${NS}::radiobutton .bleft.mid.old -text [mc "Old version"] \
+ ttk::radiobutton .bleft.mid.old -text [mc "Old version"] \
-command changediffdisp -variable diffelide -value {0 1}
- ${NS}::radiobutton .bleft.mid.new -text [mc "New version"] \
+ ttk::radiobutton .bleft.mid.new -text [mc "New version"] \
-command changediffdisp -variable diffelide -value {1 0}
- ${NS}::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
+ ttk::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left -ipadx $wgap
spinbox .bleft.mid.diffcontext -width 5 \
-from 0 -increment 1 -to 10000000 \
@@ -2524,28 +2640,24 @@
trace add variable diffcontextstring write diffcontextchange
lappend entries .bleft.mid.diffcontext
pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left -ipadx $wgap
- ${NS}::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \
+ ttk::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \
-command changeignorespace -variable ignorespace
pack .bleft.mid.ignspace -side left -padx 5
set worddiff [mc "Line diff"]
- if {[package vcompare $git_version "1.7.2"] >= 0} {
- makedroplist .bleft.mid.worddiff worddiff [mc "Line diff"] \
- [mc "Markup words"] [mc "Color words"]
- trace add variable worddiff write changeworddiff
- pack .bleft.mid.worddiff -side left -padx 5
- }
+ makedroplist .bleft.mid.worddiff worddiff [mc "Line diff"] \
+ [mc "Markup words"] [mc "Color words"]
+ trace add variable worddiff write changeworddiff
+ pack .bleft.mid.worddiff -side left -padx 5
set ctext .bleft.bottom.ctext
text $ctext -background $bgcolor -foreground $fgcolor \
-state disabled -undo 0 -font textfont \
-yscrollcommand scrolltext -wrap $wrapdefault \
-xscrollcommand ".bleft.bottom.sbhorizontal set"
- if {$have_tk85} {
- $ctext conf -tabstyle wordprocessor
- }
- ${NS}::scrollbar .bleft.bottom.sb -command "$ctext yview"
- ${NS}::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h
+ $ctext conf -tabstyle wordprocessor
+ ttk::scrollbar .bleft.bottom.sb -command "$ctext yview"
+ ttk::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h
pack .bleft.top -side top -fill x
pack .bleft.mid -side top -fill x
grid $ctext .bleft.bottom.sb -sticky nsew
@@ -2596,16 +2708,13 @@
$ctext tag lower d0
.pwbottom add .bleft
- if {!$use_ttk} {
- .pwbottom paneconfigure .bleft -width $geometry(botwidth)
- }
# lower right
- ${NS}::frame .bright
- ${NS}::frame .bright.mode
- ${NS}::radiobutton .bright.mode.patch -text [mc "Patch"] \
+ ttk::frame .bright
+ ttk::frame .bright.mode
+ ttk::radiobutton .bright.mode.patch -text [mc "Patch"] \
-command reselectline -variable cmitmode -value "patch"
- ${NS}::radiobutton .bright.mode.tree -text [mc "Tree"] \
+ ttk::radiobutton .bright.mode.tree -text [mc "Tree"] \
-command reselectline -variable cmitmode -value "tree"
grid .bright.mode.patch .bright.mode.tree -sticky ew
pack .bright.mode -side top -fill x
@@ -2621,7 +2730,7 @@
-spacing1 1 -spacing3 1
lappend bglist $cflist
lappend fglist $cflist
- ${NS}::scrollbar .bright.sb -command "$cflist yview"
+ ttk::scrollbar .bright.sb -command "$cflist yview"
pack .bright.sb -side right -fill y
pack $cflist -side left -fill both -expand 1
$cflist tag configure highlight \
@@ -2656,44 +2765,31 @@
set ::BM "2"
}
- if {$use_ttk} {
- bind .ctop <Map> {
- bind %W <Map> {}
- %W sashpos 0 $::geometry(topheight)
- }
- bind .pwbottom <Map> {
- bind %W <Map> {}
- %W sashpos 0 $::geometry(botwidth)
- }
- bind .pwbottom <Configure> {resizecdetpanes %W %w}
+ bind .ctop <Map> {
+ bind %W <Map> {}
+ %W sashpos 0 $::geometry(topheight)
}
+ bind .pwbottom <Map> {
+ bind %W <Map> {}
+ %W sashpos 0 $::geometry(botwidth)
+ }
+ bind .pwbottom <Configure> {resizecdetpanes %W %w}
pack .ctop -fill both -expand 1
bindall <1> {selcanvline %W %x %y}
- #bindall <B1-Motion> {selcanvline %W %x %y}
- if {[tk windowingsystem] == "win32"} {
- bind . <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D }
- bind $ctext <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D ; break }
+
+ #Mouse / touchpad scrolling
+ if {[tk windowingsystem] == "win32" || [package vcompare $::tcl_version 8.7] >= 0} {
+ set scroll_D0 120
+ bind_mousewheel
+ } elseif {[tk windowingsystem] == "x11"} {
+ set scroll_D0 1
+ bind_mousewheel_buttons
+ } elseif {[tk windowingsystem] == "aqua"} {
+ set scroll_D0 1
+ bind_mousewheel
} else {
- bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
- bindall <ButtonRelease-5> "allcanvs yview scroll 5 units"
- bind $ctext <Button> {
- if {"%b" eq 6} {
- $ctext xview scroll -5 units
- } elseif {"%b" eq 7} {
- $ctext xview scroll 5 units
- }
- }
- if {[tk windowingsystem] eq "aqua"} {
- bindall <MouseWheel> {
- set delta [expr {- (%D)}]
- allcanvs yview scroll $delta units
- }
- bindall <Shift-MouseWheel> {
- set delta [expr {- (%D)}]
- $canv xview scroll $delta units
- }
- }
+ puts stderr [mc "Unknown windowing system, cannot bind mouse"]
}
bindall <$::BM> "canvscan mark %W %x %y"
bindall <B$::BM-Motion> "canvscan dragto %W %x %y"
@@ -2705,13 +2801,8 @@
bind . <Key-Down> "selnextline 1"
bind . <Shift-Key-Up> "dofind -1 0"
bind . <Shift-Key-Down> "dofind 1 0"
- if {$have_tk86} {
- bindkey <<NextChar>> "goforw"
- bindkey <<PrevChar>> "goback"
- } else {
- bindkey <Key-Right> "goforw"
- bindkey <Key-Left> "goback"
- }
+ bindkey <<NextChar>> "goforw"
+ bindkey <<PrevChar>> "goback"
bind . <Key-Prior> "selnextpage -1"
bind . <Key-Next> "selnextpage 1"
bind . <$M1B-Home> "allcanvs yview moveto 0.0"
@@ -2838,24 +2929,6 @@
$diff_menu configure -tearoff 0
}
-# Windows sends all mouse wheel events to the current focused window, not
-# the one where the mouse hovers, so bind those events here and redirect
-# to the correct window
-proc windows_mousewheel_redirector {W X Y D} {
- global canv canv2 canv3
- set w [winfo containing -displayof $W $X $Y]
- if {$w ne ""} {
- set u [expr {$D < 0 ? 5 : -5}]
- if {$w == $canv || $w == $canv2 || $w == $canv3} {
- allcanvs yview scroll $u units
- } else {
- catch {
- $w yview scroll $u units
- }
- }
- }
-}
-
# Update row number label when selectedline changes
proc selectedline_change {n1 n2 op} {
global selectedline rownumsel
@@ -2918,30 +2991,10 @@
# Adjust the progress bar for a change in requested extent or canvas size
proc adjustprogress {} {
- global progresscanv progressitem progresscoords
- global fprogitem fprogcoord lastprogupdate progupdatepending
- global rprogitem rprogcoord use_ttk
+ global progresscanv
+ global fprogcoord
- if {$use_ttk} {
- $progresscanv configure -value [expr {int($fprogcoord * 100)}]
- return
- }
-
- set w [expr {[winfo width $progresscanv] - 4}]
- set x0 [expr {$w * [lindex $progresscoords 0]}]
- set x1 [expr {$w * [lindex $progresscoords 1]}]
- set h [winfo height $progresscanv]
- $progresscanv coords $progressitem $x0 0 $x1 $h
- $progresscanv coords $fprogitem 0 0 [expr {$w * $fprogcoord}] $h
- $progresscanv coords $rprogitem 0 0 [expr {$w * $rprogcoord}] $h
- set now [clock clicks -milliseconds]
- if {$now >= $lastprogupdate + 100} {
- set progupdatepending 0
- update
- } elseif {!$progupdatepending} {
- set progupdatepending 1
- after [expr {$lastprogupdate + 100 - $now}] doprogupdate
- }
+ $progresscanv configure -value [expr {int($fprogcoord * 100)}]
}
proc doprogupdate {} {
@@ -3000,14 +3053,13 @@
upvar #0 viewargscmd current_viewargscmd
upvar #0 viewperm current_viewperm
upvar #0 nextviewnum current_nextviewnum
- upvar #0 use_ttk current_use_ttk
if {$stuffsaved} return
if {![winfo viewable .]} return
set remove_tmp 0
if {[catch {
set try_count 0
- while {[catch {set f [open $config_file_tmp {WRONLY CREAT EXCL}]}]} {
+ while {[catch {set f [safe_open_file $config_file_tmp {WRONLY CREAT EXCL}]}]} {
if {[incr try_count] > 50} {
error "Unable to write config file: $config_file_tmp exists"
}
@@ -3034,13 +3086,8 @@
puts $f "set geometry(state) [wm state .]"
puts $f "set geometry(topwidth) [winfo width .tf]"
puts $f "set geometry(topheight) [winfo height .tf]"
- if {$current_use_ttk} {
- puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sashpos 0] 1\""
- puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sashpos 1] 1\""
- } else {
- puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""
- puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sash coord 1]\""
- }
+ puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sashpos 0] 1\""
+ puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sashpos 1] 1\""
puts $f "set geometry(botwidth) [winfo width .bleft]"
puts $f "set geometry(botheight) [winfo height .bleft]"
@@ -3086,17 +3133,14 @@
}
proc resizeclistpanes {win w} {
- global oldwidth oldsash use_ttk
+ global oldwidth oldsash
if {[info exists oldwidth($win)]} {
if {[info exists oldsash($win)]} {
set s0 [lindex $oldsash($win) 0]
set s1 [lindex $oldsash($win) 1]
- } elseif {$use_ttk} {
+ } else {
set s0 [$win sashpos 0]
set s1 [$win sashpos 1]
- } else {
- set s0 [$win sash coord 0]
- set s1 [$win sash coord 1]
}
if {$w < 60} {
set sash0 [expr {int($w/2 - 2)}]
@@ -3118,29 +3162,20 @@
}
}
}
- if {$use_ttk} {
- $win sashpos 0 $sash0
- $win sashpos 1 $sash1
- } else {
- $win sash place 0 $sash0 [lindex $s0 1]
- $win sash place 1 $sash1 [lindex $s1 1]
- set sash0 [list $sash0 [lindex $s0 1]]
- set sash1 [list $sash1 [lindex $s1 1]]
- }
+ $win sashpos 0 $sash0
+ $win sashpos 1 $sash1
set oldsash($win) [list $sash0 $sash1]
}
set oldwidth($win) $w
}
proc resizecdetpanes {win w} {
- global oldwidth oldsash use_ttk
+ global oldwidth oldsash
if {[info exists oldwidth($win)]} {
if {[info exists oldsash($win)]} {
set s0 $oldsash($win)
- } elseif {$use_ttk} {
- set s0 [$win sashpos 0]
} else {
- set s0 [$win sash coord 0]
+ set s0 [$win sashpos 0]
}
if {$w < 60} {
set sash0 [expr {int($w*3/4 - 2)}]
@@ -3154,12 +3189,7 @@
set sash0 [expr {$w - 15}]
}
}
- if {$use_ttk} {
- $win sashpos 0 $sash0
- } else {
- $win sash place 0 $sash0 [lindex $s0 1]
- set sash0 [list $sash0 [lindex $s0 1]]
- }
+ $win sashpos 0 $sash0
set oldsash($win) $sash0
}
set oldwidth($win) $w
@@ -3180,7 +3210,7 @@
}
proc about {} {
- global bgcolor NS
+ global bgcolor
set w .about
if {[winfo exists $w]} {
raise $w
@@ -3197,7 +3227,7 @@
Use and redistribute under the terms of the GNU General Public License"] \
-justify center -aspect 400 -border 2 -bg $bgcolor -relief groove
pack $w.m -side top -fill x -padx 2 -pady 2
- ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
+ ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
pack $w.ok -side bottom
bind $w <Visibility> "focus $w.ok"
bind $w <Key-Escape> "destroy $w"
@@ -3206,7 +3236,7 @@
}
proc keys {} {
- global bgcolor NS
+ global bgcolor
set w .keys
if {[winfo exists $w]} {
raise $w
@@ -3264,7 +3294,7 @@
" \
-justify left -bg $bgcolor -border 2 -relief groove
pack $w.m -side top -fill both -padx 2 -pady 2
- ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
+ ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
bind $w <Key-Escape> [list destroy $w]
pack $w.ok -side bottom
bind $w <Visibility> "focus $w.ok"
@@ -3723,7 +3753,7 @@
set tmpdir $gitdir
}
set gitktmpformat [file join $tmpdir ".gitk-tmp.XXXXXX"]
- if {[catch {set gitktmpdir [exec mktemp -d $gitktmpformat]}]} {
+ if {[catch {set gitktmpdir [safe_exec [list mktemp -d $gitktmpformat]]}]} {
set gitktmpdir [file join $gitdir [format ".gitk-tmp.%s" [pid]]]
}
if {[catch {file mkdir $gitktmpdir} err]} {
@@ -3745,7 +3775,7 @@
proc save_file_from_commit {filename output what} {
global nullfile
- if {[catch {exec git show $filename -- > $output} err]} {
+ if {[catch {safe_exec_redirect [list git show $filename --] [list > $output]} err]} {
if {[string match "fatal: bad revision *" $err]} {
return $nullfile
}
@@ -3810,7 +3840,7 @@
if {$difffromfile ne {} && $difftofile ne {}} {
set cmd [list [shellsplit $extdifftool] $difffromfile $difftofile]
- if {[catch {set fl [open |$cmd r]} err]} {
+ if {[catch {set fl [safe_open_command $cmd]} err]} {
file delete -force $diffdir
error_popup "$extdifftool: [mc "command failed:"] $err"
} else {
@@ -3914,7 +3944,7 @@
# Find the SHA1 ID of the blob for file $fname in the index
# at stage 0 or 2
proc index_sha1 {fname} {
- set f [open [list | git ls-files -s $fname] r]
+ set f [safe_open_command [list git ls-files -s $fname]]
while {[gets $f line] >= 0} {
set info [lindex [split $line "\t"] 0]
set stage [lindex $info 2]
@@ -3974,7 +4004,7 @@
# being given an absolute path...
set f [make_relative $f]
lappend cmdline $base_commit $f
- if {[catch {eval exec $cmdline &} err]} {
+ if {[catch {safe_exec_redirect $cmdline [list &]} err]} {
error_popup "[mc "git gui blame: command failed:"] $err"
}
}
@@ -4002,7 +4032,7 @@
# must be a merge in progress...
if {[catch {
# get the last line from .git/MERGE_HEAD
- set f [open [file join $gitdir MERGE_HEAD] r]
+ set f [safe_open_file [file join $gitdir MERGE_HEAD] r]
set id [lindex [split [read $f] "\n"] end-1]
close $f
} err]} {
@@ -4025,19 +4055,17 @@
}
set line [lindex $h 1]
}
- set blameargs {}
+ set blamefile [file join $cdup $flist_menu_file]
if {$from_index ne {}} {
- lappend blameargs | git cat-file blob $from_index
- }
- lappend blameargs | git blame -p -L$line,+1
- if {$from_index ne {}} {
- lappend blameargs --contents -
+ set blameargs [list \
+ [list git cat-file blob $from_index] \
+ [list git blame -p -L$line,+1 --contents - -- $blamefile]]
} else {
- lappend blameargs $id
+ set blameargs [list \
+ [list git blame -p -L$line,+1 $id -- $blamefile]]
}
- lappend blameargs -- [file join $cdup $flist_menu_file]
if {[catch {
- set f [open $blameargs r]
+ set f [safe_open_pipeline $blameargs]
} err]} {
error_popup [mc "Couldn't start git blame: %s" $err]
return
@@ -4062,6 +4090,7 @@
proc read_line_source {fd inst} {
global blamestuff curview commfd blameinst nullid nullid2
+ global hashlength
while {[gets $fd line] >= 0} {
lappend blamestuff($inst) $line
@@ -4082,7 +4111,7 @@
set line [split [lindex $blamestuff($inst) 0] " "]
set id [lindex $line 0]
set lnum [lindex $line 1]
- if {[string length $id] == 40 && [string is xdigit $id] &&
+ if {[string length $id] == $hashlength && [string is xdigit $id] &&
[string is digit -strict $lnum]} {
# look for "filename" line
foreach l $blamestuff($inst) {
@@ -4410,16 +4439,16 @@
proc vieweditor {top n title} {
global newviewname newviewopts viewfiles bgcolor
- global known_view_options NS
+ global known_view_options
ttk_toplevel $top
wm title $top [concat $title [mc "-- criteria for selecting revisions"]]
make_transient $top .
# View name
- ${NS}::frame $top.nfr
- ${NS}::label $top.nl -text [mc "View Name"]
- ${NS}::entry $top.name -width 20 -textvariable newviewname($n)
+ ttk::frame $top.nfr
+ ttk::label $top.nl -text [mc "View Name"]
+ ttk::entry $top.name -width 20 -textvariable newviewname($n)
pack $top.nfr -in $top -fill x -pady 5 -padx 3
pack $top.nl -in $top.nfr -side left -padx {0 5}
pack $top.name -in $top.nfr -side left -padx {0 25}
@@ -4438,13 +4467,13 @@
if {$flags eq "+" || $flags eq "*"} {
set cframe $top.fr$cnt
incr cnt
- ${NS}::frame $cframe
+ ttk::frame $cframe
pack $cframe -in $top -fill x -pady 3 -padx 3
set cexpand [expr {$flags eq "*"}]
} elseif {$flags eq ".." || $flags eq "*."} {
set cframe $top.fr$cnt
incr cnt
- ${NS}::frame $cframe
+ ttk::frame $cframe
pack $cframe -in $top -fill x -pady 3 -padx [list 15 3]
set cexpand [expr {$flags eq "*."}]
} else {
@@ -4452,31 +4481,31 @@
}
if {$type eq "l"} {
- ${NS}::label $cframe.l_$id -text $title
+ ttk::label $cframe.l_$id -text $title
pack $cframe.l_$id -in $cframe -side left -pady [list 3 0] -anchor w
} elseif {$type eq "b"} {
- ${NS}::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
+ ttk::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
pack $cframe.c_$id -in $cframe -side left \
-padx [list $lxpad 0] -expand $cexpand -anchor w
} elseif {[regexp {^r(\d+)$} $type type sz]} {
regexp {^(.*_)} $id uselessvar button_id
- ${NS}::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
+ ttk::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
pack $cframe.c_$id -in $cframe -side left \
-padx [list $lxpad 0] -expand $cexpand -anchor w
} elseif {[regexp {^t(\d+)$} $type type sz]} {
- ${NS}::label $cframe.l_$id -text $title
- ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \
+ ttk::label $cframe.l_$id -text $title
+ ttk::entry $cframe.e_$id -width $sz -background $bgcolor \
-textvariable newviewopts($n,$id)
pack $cframe.l_$id -in $cframe -side left -padx [list $lxpad 0]
pack $cframe.e_$id -in $cframe -side left -expand 1 -fill x
} elseif {[regexp {^t(\d+)=$} $type type sz]} {
- ${NS}::label $cframe.l_$id -text $title
- ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \
+ ttk::label $cframe.l_$id -text $title
+ ttk::entry $cframe.e_$id -width $sz -background $bgcolor \
-textvariable newviewopts($n,$id)
pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w
pack $cframe.e_$id -in $cframe -side top -fill x
} elseif {$type eq "path"} {
- ${NS}::label $top.l -text $title
+ ttk::label $top.l -text $title
pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
text $top.t -width 40 -height 5 -background $bgcolor
if {[info exists viewfiles($n)]} {
@@ -4491,10 +4520,10 @@
}
}
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
- ${NS}::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
+ ttk::frame $top.buts
+ ttk::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
+ ttk::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
+ ttk::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
bind $top <Control-Return> [list newviewok $top $n]
bind $top <F5> [list newviewok $top $n 1]
bind $top <Escape> [list destroy $top]
@@ -4962,8 +4991,8 @@
# must be "containing:", i.e. we're searching commit info
return
}
- set cmd [concat | git diff-tree -r -s --stdin $gdtargs]
- set filehighlight [open $cmd r+]
+ set cmd [concat git diff-tree -r -s --stdin $gdtargs]
+ set filehighlight [safe_open_command_rw $cmd]
fconfigure $filehighlight -blocking 0
filerun $filehighlight readfhighlight
set fhl_list {}
@@ -5226,11 +5255,13 @@
# Graph layout functions
proc shortids {ids} {
+ global hashlength
+
set res {}
foreach id $ids {
if {[llength $id] > 1} {
lappend res [shortids $id]
- } elseif {[regexp {^[0-9a-f]{40}$} $id]} {
+ } elseif {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $id]} {
lappend res [string range $id 0 7]
} else {
lappend res $id
@@ -5392,8 +5423,8 @@
global viewmainheadid vfilelimit viewinstances mainheadid
catch {
- set rfd [open [concat | git rev-list -1 $mainheadid \
- -- $vfilelimit($view)] r]
+ set rfd [safe_open_command [concat git rev-list -1 $mainheadid \
+ -- $vfilelimit($view)]]
set j [reg_instance $rfd]
lappend viewinstances($view) $j
fconfigure $rfd -blocking 0
@@ -5405,13 +5436,14 @@
# git rev-list should give us just 1 line to use as viewmainheadid($view)
proc getviewhead {fd inst view} {
global viewmainheadid commfd curview viewinstances showlocalchanges
+ global hashlength
set id {}
if {[gets $fd line] < 0} {
if {![eof $fd]} {
return 1
}
- } elseif {[string length $line] == 40 && [string is xdigit $line]} {
+ } elseif {[string length $line] == $hashlength && [string is xdigit $line]} {
set id $line
}
set viewmainheadid($view) $id
@@ -5453,19 +5485,15 @@
# spawn off a process to do git diff-index --cached HEAD
proc dodiffindex {} {
global lserial showlocalchanges vfilelimit curview
- global hasworktree git_version
+ global hasworktree
if {!$showlocalchanges || !$hasworktree} return
incr lserial
- if {[package vcompare $git_version "1.7.2"] >= 0} {
- set cmd "|git diff-index --cached --ignore-submodules=dirty HEAD"
- } else {
- set cmd "|git diff-index --cached HEAD"
- }
+ set cmd "git diff-index --cached --ignore-submodules=dirty HEAD"
if {$vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
- set fd [open $cmd r]
+ set fd [safe_open_command $cmd]
fconfigure $fd -blocking 0
set i [reg_instance $fd]
filerun $fd [list readdiffindex $fd $lserial $i]
@@ -5490,11 +5518,11 @@
}
# now see if there are any local changes not checked in to the index
- set cmd "|git diff-files"
+ set cmd "git diff-files"
if {$vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
- set fd [open $cmd r]
+ set fd [safe_open_command $cmd]
fconfigure $fd -blocking 0
set i [reg_instance $fd]
filerun $fd [list readdifffiles $fd $serial $i]
@@ -6689,13 +6717,7 @@
}
proc graph_pane_width {} {
- global use_ttk
-
- if {$use_ttk} {
- set g [.tf.histframe.pwclist sashpos 0]
- } else {
- set g [.tf.histframe.pwclist sash coord 0]
- }
+ set g [.tf.histframe.pwclist sashpos 0]
return [lindex $g 0]
}
@@ -7175,10 +7197,11 @@
# Also look for URLs of the form "http[s]://..." and make them web links.
proc appendwithlinks {text tags} {
global ctext linknum curview
+ global hashlength
set start [$ctext index "end - 1c"]
$ctext insert end $text $tags
- set links [regexp -indices -all -inline {(?:\m|-g)[0-9a-f]{6,40}\M} $text]
+ set links [regexp -indices -all -inline [string map "@@ $hashlength" {(?:\m|-g)[0-9a-f]{6,@@}\M}] $text]
foreach l $links {
set s [lindex $l 0]
set e [lindex $l 1]
@@ -7206,13 +7229,14 @@
proc setlink {id lk} {
global curview ctext pendinglinks
global linkfgcolor
+ global hashlength
if {[string range $id 0 1] eq "-g"} {
set id [string range $id 2 end]
}
set known 0
- if {[string length $id] < 40} {
+ if {[string length $id] < $hashlength} {
set matches [longid $id]
if {[llength $matches] > 0} {
if {[llength $matches] > 1} return
@@ -7283,8 +7307,8 @@
global web_browser
if {$web_browser eq {}} return
- # Use eval here in case $web_browser is a command plus some arguments
- if {[catch {eval exec $web_browser [list $url] &} err]} {
+ # Use concat here in case $web_browser is a command plus some arguments
+ if {[catch {safe_exec_redirect [concat $web_browser [list $url]] [list &]} err]} {
error_popup "[mc "Error starting web browser:"] $err"
}
}
@@ -7790,19 +7814,19 @@
if {![info exists treefilelist($id)]} {
if {![info exists treepending]} {
if {$id eq $nullid} {
- set cmd [list | git ls-files]
+ set cmd [list git ls-files]
} elseif {$id eq $nullid2} {
- set cmd [list | git ls-files --stage -t]
+ set cmd [list git ls-files --stage -t]
} else {
- set cmd [list | git ls-tree -r $id]
+ set cmd [list git ls-tree -r $id]
}
- if {[catch {set gtf [open $cmd r]}]} {
+ if {[catch {set gtf [safe_open_command $cmd]}]} {
return
}
set treepending $id
set treefilelist($id) {}
set treeidlist($id) {}
- fconfigure $gtf -blocking 0 -encoding binary
+ fconfigure $gtf -blocking 0 -translation binary
filerun $gtf [list gettreeline $gtf $id]
}
} else {
@@ -7829,7 +7853,7 @@
if {[string index $fname 0] eq "\""} {
set fname [lindex $fname 0]
}
- set fname [encoding convertfrom utf-8 $fname]
+ set fname [convertfrom utf-8 $fname]
lappend treefilelist($id) $fname
}
if {![eof $gtf]} {
@@ -7860,13 +7884,13 @@
return
}
if {$diffids eq $nullid} {
- if {[catch {set bf [open $f r]} err]} {
+ if {[catch {set bf [safe_open_file $f r]} err]} {
puts "oops, can't read $f: $err"
return
}
} else {
set blob [lindex $treeidlist($diffids) $i]
- if {[catch {set bf [open [concat | git cat-file blob $blob] r]} err]} {
+ if {[catch {set bf [safe_open_command [concat git cat-file blob $blob]]} err]} {
puts "oops, error reading blob $blob: $err"
return
}
@@ -8009,14 +8033,14 @@
}
proc diffcmd {ids flags} {
- global log_showroot nullid nullid2 git_version
+ global log_showroot nullid nullid2
set i [lsearch -exact $ids $nullid]
set j [lsearch -exact $ids $nullid2]
if {$i >= 0} {
if {[llength $ids] > 1 && $j < 0} {
# comparing working directory with some specific revision
- set cmd [concat | git diff-index $flags]
+ set cmd [concat git diff-index $flags]
if {$i == 0} {
lappend cmd -R [lindex $ids 1]
} else {
@@ -8024,16 +8048,14 @@
}
} else {
# comparing working directory with index
- set cmd [concat | git diff-files $flags]
+ set cmd [concat git diff-files $flags]
if {$j == 1} {
lappend cmd -R
}
}
} elseif {$j >= 0} {
- if {[package vcompare $git_version "1.7.2"] >= 0} {
- set flags "$flags --ignore-submodules=dirty"
- }
- set cmd [concat | git diff-index --cached $flags]
+ set flags "$flags --ignore-submodules=dirty"
+ set cmd [concat git diff-index --cached $flags]
if {[llength $ids] > 1} {
# comparing index with specific revision
if {$j == 0} {
@@ -8049,7 +8071,7 @@
if {$log_showroot} {
lappend flags --root
}
- set cmd [concat | git diff-tree -r $flags $ids]
+ set cmd [concat git diff-tree -r $flags $ids]
}
return $cmd
}
@@ -8061,11 +8083,11 @@
if {$limitdiffs && $vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
- if {[catch {set gdtf [open $cmd r]}]} return
+ if {[catch {set gdtf [safe_open_command $cmd]}]} return
set treepending $ids
set treediff {}
- fconfigure $gdtf -blocking 0 -encoding binary
+ fconfigure $gdtf -blocking 0 -translation binary
filerun $gdtf [list gettreediffline $gdtf $ids]
}
@@ -8091,7 +8113,7 @@
if {[string index $file 0] eq "\""} {
set file [lindex $file 0]
}
- set file [encoding convertfrom utf-8 $file]
+ set file [convertfrom utf-8 $file]
if {$file ne [lindex $treediff end]} {
lappend treediff $file
lappend sublist $file
@@ -8161,17 +8183,8 @@
global ignorespace
global worddiff
global limitdiffs vfilelimit curview
- global git_version
- set textconv {}
- if {[package vcompare $git_version "1.6.1"] >= 0} {
- set textconv "--textconv"
- }
- set submodule {}
- if {[package vcompare $git_version "1.6.6"] >= 0} {
- set submodule "--submodule"
- }
- set cmd [diffcmd $ids "-p $textconv $submodule -C --cc --no-commit-id -U$diffcontext"]
+ set cmd [diffcmd $ids "-p --textconv --submodule -C --cc --no-commit-id -U$diffcontext"]
if {$ignorespace} {
append cmd " -w"
}
@@ -8181,11 +8194,11 @@
if {$limitdiffs && $vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
- if {[catch {set bdf [open $cmd r]} err]} {
+ if {[catch {set bdf [safe_open_command $cmd]} err]} {
error_popup [mc "Error getting diffs: %s" $err]
return
}
- fconfigure $bdf -blocking 0 -encoding binary -eofchar {}
+ fconfigure $bdf -blocking 0 -translation binary
set blobdifffd($ids) $bdf
initblobdiffvars
filerun $bdf [list getblobdiffline $bdf $diffids]
@@ -8236,7 +8249,7 @@
global ctext curdiffstart treediffs diffencoding
global ctext_file_names jump_to_here targetline diffline
- set fname [encoding convertfrom utf-8 $fname]
+ set fname [convertfrom utf-8 $fname]
set diffencoding [get_path_encoding $fname]
set i [lsearch -exact $treediffs($ids) $fname]
if {$i >= 0} {
@@ -8298,7 +8311,7 @@
if {![string compare -length 5 "diff " $line]} {
if {![regexp {^diff (--cc|--git) } $line m type]} {
- set line [encoding convertfrom utf-8 $line]
+ set line [convertfrom utf-8 $line]
$ctext insert end "$line\n" hunksep
continue
}
@@ -8347,7 +8360,7 @@
makediffhdr $fname $ids
} elseif {![string compare -length 16 "* Unmerged path " $line]} {
- set fname [encoding convertfrom utf-8 [string range $line 16 end]]
+ set fname [convertfrom utf-8 [string range $line 16 end]]
$ctext insert end "\n"
set curdiffstart [$ctext index "end - 1c"]
lappend ctext_file_names $fname
@@ -8360,7 +8373,7 @@
} elseif {![string compare -length 2 "@@" $line]} {
regexp {^@@+} $line ats
- set line [encoding convertfrom $diffencoding $line]
+ set line [convertfrom $diffencoding $line]
$ctext insert end "$line\n" hunksep
if {[regexp { \+(\d+),\d+ @@} $line m nl]} {
set diffline $nl
@@ -8389,10 +8402,10 @@
$ctext insert end "$line\n" filesep
}
} elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} {
- set line [encoding convertfrom $diffencoding $line]
+ set line [convertfrom $diffencoding $line]
$ctext insert end "$line\n" dresult
} elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} {
- set line [encoding convertfrom $diffencoding $line]
+ set line [convertfrom $diffencoding $line]
$ctext insert end "$line\n" d0
} elseif {$diffinhdr} {
if {![string compare -length 12 "rename from " $line]} {
@@ -8400,7 +8413,7 @@
if {[string index $fname 0] eq "\""} {
set fname [lindex $fname 0]
}
- set fname [encoding convertfrom utf-8 $fname]
+ set fname [convertfrom utf-8 $fname]
set i [lsearch -exact $treediffs($ids) $fname]
if {$i >= 0} {
setinlist difffilestart $i $curdiffstart
@@ -8419,12 +8432,12 @@
set diffinhdr 0
return
}
- set line [encoding convertfrom utf-8 $line]
+ set line [convertfrom utf-8 $line]
$ctext insert end "$line\n" filesep
} else {
set line [string map {\x1A ^Z} \
- [encoding convertfrom $diffencoding $line]]
+ [convertfrom $diffencoding $line]]
# parse the prefix - one ' ', '-' or '+' for each parent
set prefix [string range $line 0 [expr {$diffnparents - 1}]]
set tag [expr {$diffnparents > 1? "m": "d"}]
@@ -8576,19 +8589,17 @@
}
proc settabs {{firstab {}}} {
- global firsttabstop tabstop ctext have_tk85
+ global firsttabstop tabstop ctext
- if {$firstab ne {} && $have_tk85} {
+ if {$firstab ne {}} {
set firsttabstop $firstab
}
set w [font measure textfont "0"]
if {$firsttabstop != 0} {
$ctext conf -tabs [list [expr {($firsttabstop + $tabstop) * $w}] \
[expr {($firsttabstop + 2 * $tabstop) * $w}]]
- } elseif {$have_tk85 || $tabstop != 8} {
- $ctext conf -tabs [expr {$tabstop * $w}]
} else {
- $ctext conf -tabs {}
+ $ctext conf -tabs [expr {$tabstop * $w}]
}
}
@@ -8857,13 +8868,16 @@
proc clearsha1 {} {
global sha1entry sha1string
- if {[string length $sha1string] == 40} {
+ global hashlength
+
+ if {[string length $sha1string] == $hashlength} {
$sha1entry delete 0 end
}
}
proc sha1change {n1 n2 op} {
global sha1string currentid sha1but
+
if {$sha1string == {}
|| ([info exists currentid] && $sha1string == $currentid)} {
set state disabled
@@ -8880,6 +8894,7 @@
proc gotocommit {} {
global sha1string tagids headids curview varcid
+ global hashlength
if {$sha1string == {}
|| ([info exists currentid] && $sha1string == $currentid)} return
@@ -8889,7 +8904,7 @@
set id $headids($sha1string)
} else {
set id [string tolower $sha1string]
- if {[regexp {^[0-9a-f]{4,39}$} $id]} {
+ if {[regexp {^[0-9a-f]{4,63}$} $id]} {
set matches [longid $id]
if {$matches ne {}} {
if {[llength $matches] > 1} {
@@ -8899,7 +8914,7 @@
set id [lindex $matches 0]
}
} else {
- if {[catch {set id [exec git rev-parse --verify $sha1string]}]} {
+ if {[catch {set id [safe_exec [list git rev-parse --verify $sha1string]]}]} {
error_popup [mc "Revision %s is not known" $sha1string]
return
}
@@ -9205,10 +9220,8 @@
if {![info exists patchids($id)]} {
set cmd [diffcmd [list $id] {-p --root}]
- # trim off the initial "|"
- set cmd [lrange $cmd 1 end]
if {[catch {
- set x [eval exec $cmd | git patch-id]
+ set x [safe_exec_redirect $cmd [list | git patch-id]]
set patchids($id) [lindex $x 0]
}]} {
set patchids($id) "error"
@@ -9304,14 +9317,14 @@
set fna [file join $tmpdir "commit-[string range $a 0 7]"]
set fnb [file join $tmpdir "commit-[string range $b 0 7]"]
if {[catch {
- exec git diff-tree -p --pretty $a >$fna
- exec git diff-tree -p --pretty $b >$fnb
+ safe_exec_redirect [list git diff-tree -p --pretty $a] [list >$fna]
+ safe_exec_redirect [list git diff-tree -p --pretty $b] [list >$fnb]
} err]} {
error_popup [mc "Error writing commit to file: %s" $err]
return
}
if {[catch {
- set fd [open "| diff -U$diffcontext $fna $fnb" r]
+ set fd [safe_open_command "diff -U$diffcontext $fna $fnb"]
} err]} {
error_popup [mc "Error diffing commits: %s" $err]
return
@@ -9377,7 +9390,8 @@
}
proc mkpatch {} {
- global rowmenuid currentid commitinfo patchtop patchnum NS
+ global rowmenuid currentid commitinfo patchtop patchnum
+ global hashlength
if {![info exists currentid]} return
set oldid $currentid
@@ -9389,36 +9403,36 @@
catch {destroy $top}
ttk_toplevel $top
make_transient $top .
- ${NS}::label $top.title -text [mc "Generate patch"]
+ ttk::label $top.title -text [mc "Generate patch"]
grid $top.title - -pady 10
- ${NS}::label $top.from -text [mc "From:"]
- ${NS}::entry $top.fromsha1 -width 40
+ ttk::label $top.from -text [mc "From:"]
+ ttk::entry $top.fromsha1 -width $hashlength
$top.fromsha1 insert 0 $oldid
$top.fromsha1 conf -state readonly
grid $top.from $top.fromsha1 -sticky w
- ${NS}::entry $top.fromhead -width 60
+ ttk::entry $top.fromhead -width 60
$top.fromhead insert 0 $oldhead
$top.fromhead conf -state readonly
grid x $top.fromhead -sticky w
- ${NS}::label $top.to -text [mc "To:"]
- ${NS}::entry $top.tosha1 -width 40
+ ttk::label $top.to -text [mc "To:"]
+ ttk::entry $top.tosha1 -width $hashlength
$top.tosha1 insert 0 $newid
$top.tosha1 conf -state readonly
grid $top.to $top.tosha1 -sticky w
- ${NS}::entry $top.tohead -width 60
+ ttk::entry $top.tohead -width 60
$top.tohead insert 0 $newhead
$top.tohead conf -state readonly
grid x $top.tohead -sticky w
- ${NS}::button $top.rev -text [mc "Reverse"] -command mkpatchrev
+ ttk::button $top.rev -text [mc "Reverse"] -command mkpatchrev
grid $top.rev x -pady 10 -padx 5
- ${NS}::label $top.flab -text [mc "Output file:"]
- ${NS}::entry $top.fname -width 60
+ ttk::label $top.flab -text [mc "Output file:"]
+ ttk::entry $top.fname -width 60
$top.fname insert 0 [file normalize "patch$patchnum.patch"]
incr patchnum
grid $top.flab $top.fname -sticky w
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
+ ttk::frame $top.buts
+ ttk::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
+ ttk::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
bind $top <Key-Return> mkpatchgo
bind $top <Key-Escape> mkpatchcan
grid $top.buts.gen $top.buts.can
@@ -9451,10 +9465,7 @@
set newid [$patchtop.tosha1 get]
set fname [$patchtop.fname get]
set cmd [diffcmd [list $oldid $newid] -p]
- # trim off the initial "|"
- set cmd [lrange $cmd 1 end]
- lappend cmd >$fname &
- if {[catch {eval exec $cmd} err]} {
+ if {[catch {safe_exec_redirect $cmd [list >$fname &]} err]} {
error_popup "[mc "Error creating patch:"] $err" $patchtop
}
catch {destroy $patchtop}
@@ -9469,35 +9480,36 @@
}
proc mktag {} {
- global rowmenuid mktagtop commitinfo NS
+ global rowmenuid mktagtop commitinfo
+ global hashlength
set top .maketag
set mktagtop $top
catch {destroy $top}
ttk_toplevel $top
make_transient $top .
- ${NS}::label $top.title -text [mc "Create tag"]
+ ttk::label $top.title -text [mc "Create tag"]
grid $top.title - -pady 10
- ${NS}::label $top.id -text [mc "ID:"]
- ${NS}::entry $top.sha1 -width 40
+ ttk::label $top.id -text [mc "ID:"]
+ ttk::entry $top.sha1 -width $hashlength
$top.sha1 insert 0 $rowmenuid
$top.sha1 conf -state readonly
grid $top.id $top.sha1 -sticky w
- ${NS}::entry $top.head -width 60
+ ttk::entry $top.head -width 60
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
$top.head conf -state readonly
grid x $top.head -sticky w
- ${NS}::label $top.tlab -text [mc "Tag name:"]
- ${NS}::entry $top.tag -width 60
+ ttk::label $top.tlab -text [mc "Tag name:"]
+ ttk::entry $top.tag -width 60
grid $top.tlab $top.tag -sticky w
- ${NS}::label $top.op -text [mc "Tag message is optional"]
+ ttk::label $top.op -text [mc "Tag message is optional"]
grid $top.op -columnspan 2 -sticky we
- ${NS}::label $top.mlab -text [mc "Tag message:"]
- ${NS}::entry $top.msg -width 60
+ ttk::label $top.mlab -text [mc "Tag message:"]
+ ttk::entry $top.msg -width 60
grid $top.mlab $top.msg -sticky w
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan
+ ttk::frame $top.buts
+ ttk::button $top.buts.gen -text [mc "Create"] -command mktaggo
+ ttk::button $top.buts.can -text [mc "Cancel"] -command mktagcan
bind $top <Key-Return> mktaggo
bind $top <Key-Escape> mktagcan
grid $top.buts.gen $top.buts.can
@@ -9523,9 +9535,9 @@
}
if {[catch {
if {$msg != {}} {
- exec git tag -a -m $msg $tag $id
+ safe_exec [list git tag -a -m $msg $tag $id]
} else {
- exec git tag $tag $id
+ safe_exec [list git tag $tag $id]
}
} err]} {
error_popup "[mc "Error creating tag:"] $err" $mktagtop
@@ -9587,47 +9599,49 @@
proc copyreference {} {
global rowmenuid autosellen
+ global hashlength
set format "%h (\"%s\", %ad)"
set cmd [list git show -s --pretty=format:$format --date=short]
- if {$autosellen < 40} {
+ if {$autosellen < $hashlength} {
lappend cmd --abbrev=$autosellen
}
- set reference [eval exec $cmd $rowmenuid]
+ set reference [safe_exec [concat $cmd $rowmenuid]]
clipboard clear
clipboard append $reference
}
proc writecommit {} {
- global rowmenuid wrcomtop commitinfo wrcomcmd NS
+ global rowmenuid wrcomtop commitinfo wrcomcmd
+ global hashlength
set top .writecommit
set wrcomtop $top
catch {destroy $top}
ttk_toplevel $top
make_transient $top .
- ${NS}::label $top.title -text [mc "Write commit to file"]
+ ttk::label $top.title -text [mc "Write commit to file"]
grid $top.title - -pady 10
- ${NS}::label $top.id -text [mc "ID:"]
- ${NS}::entry $top.sha1 -width 40
+ ttk::label $top.id -text [mc "ID:"]
+ ttk::entry $top.sha1 -width $hashlength
$top.sha1 insert 0 $rowmenuid
$top.sha1 conf -state readonly
grid $top.id $top.sha1 -sticky w
- ${NS}::entry $top.head -width 60
+ ttk::entry $top.head -width 60
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
$top.head conf -state readonly
grid x $top.head -sticky w
- ${NS}::label $top.clab -text [mc "Command:"]
- ${NS}::entry $top.cmd -width 60 -textvariable wrcomcmd
+ ttk::label $top.clab -text [mc "Command:"]
+ ttk::entry $top.cmd -width 60 -textvariable wrcomcmd
grid $top.clab $top.cmd -sticky w -pady 10
- ${NS}::label $top.flab -text [mc "Output file:"]
- ${NS}::entry $top.fname -width 60
+ ttk::label $top.flab -text [mc "Output file:"]
+ ttk::entry $top.fname -width 60
$top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"]
grid $top.flab $top.fname -sticky w
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.gen -text [mc "Write"] -command wrcomgo
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command wrcomcan
+ ttk::frame $top.buts
+ ttk::button $top.buts.gen -text [mc "Write"] -command wrcomgo
+ ttk::button $top.buts.can -text [mc "Cancel"] -command wrcomcan
bind $top <Key-Return> wrcomgo
bind $top <Key-Escape> wrcomcan
grid $top.buts.gen $top.buts.can
@@ -9643,7 +9657,7 @@
set id [$wrcomtop.sha1 get]
set cmd "echo $id | [$wrcomtop.cmd get]"
set fname [$wrcomtop.fname get]
- if {[catch {exec sh -c $cmd >$fname &} err]} {
+ if {[catch {safe_exec_redirect [list sh -c $cmd] [list >$fname &]} err]} {
error_popup "[mc "Error writing commit:"] $err" $wrcomtop
}
catch {destroy $wrcomtop}
@@ -9658,7 +9672,7 @@
}
proc mkbranch {} {
- global NS rowmenuid
+ global rowmenuid
set top .branchdialog
@@ -9673,7 +9687,6 @@
}
proc mvbranch {} {
- global NS
global headmenuid headmenuhead
set top .branchdialog
@@ -9689,31 +9702,32 @@
}
proc branchdia {top valvar uivar} {
- global NS commitinfo
+ global commitinfo
+ global hashlength
upvar $valvar val $uivar ui
catch {destroy $top}
ttk_toplevel $top
make_transient $top .
- ${NS}::label $top.title -text $ui(title)
+ ttk::label $top.title -text $ui(title)
grid $top.title - -pady 10
- ${NS}::label $top.id -text [mc "ID:"]
- ${NS}::entry $top.sha1 -width 40
+ ttk::label $top.id -text [mc "ID:"]
+ ttk::entry $top.sha1 -width $hashlength
$top.sha1 insert 0 $val(id)
$top.sha1 conf -state readonly
grid $top.id $top.sha1 -sticky w
- ${NS}::entry $top.head -width 60
+ ttk::entry $top.head -width 60
$top.head insert 0 [lindex $commitinfo($val(id)) 0]
$top.head conf -state readonly
grid x $top.head -sticky ew
grid columnconfigure $top 1 -weight 1
- ${NS}::label $top.nlab -text [mc "Name:"]
- ${NS}::entry $top.name -width 40
+ ttk::label $top.nlab -text [mc "Name:"]
+ ttk::entry $top.name -width $hashlength
$top.name insert 0 $val(name)
grid $top.nlab $top.name -sticky w
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.go -text $ui(accept) -command $val(command)
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
+ ttk::frame $top.buts
+ ttk::button $top.buts.go -text $ui(accept) -command $val(command)
+ ttk::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
bind $top <Key-Return> $val(command)
bind $top <Key-Escape> "catch {destroy $top}"
grid $top.buts.go $top.buts.can
@@ -9747,7 +9761,7 @@
nowbusy newbranch
update
if {[catch {
- eval exec git branch $cmdargs
+ safe_exec [concat git branch $cmdargs]
} err]} {
notbusy newbranch
error_popup $err
@@ -9788,7 +9802,7 @@
nowbusy renamebranch
update
if {[catch {
- eval exec git branch $cmdargs
+ safe_exec [concat git branch $cmdargs]
} err]} {
notbusy renamebranch
error_popup $err
@@ -9829,7 +9843,7 @@
}
}
- eval exec git citool $tool_args &
+ safe_exec_redirect [concat git citool $tool_args] [list &]
array unset env GIT_AUTHOR_*
array set env $save_env
@@ -9852,7 +9866,7 @@
update
# Unfortunately git-cherry-pick writes stuff to stderr even when
# no error occurs, and exec takes that as an indication of error...
- if {[catch {exec sh -c "git cherry-pick -r $rowmenuid 2>&1"} err]} {
+ if {[catch {safe_exec [list sh -c "git cherry-pick -r $rowmenuid 2>&1"]} err]} {
notbusy cherrypick
if {[regexp -line \
{Entry '(.*)' (would be overwritten by merge|not uptodate)} \
@@ -9914,7 +9928,7 @@
nowbusy revert [mc "Reverting"]
update
- if [catch {exec git revert --no-edit $rowmenuid} err] {
+ if [catch {safe_exec [list git revert --no-edit $rowmenuid]} err] {
notbusy revert
if [regexp {files would be overwritten by merge:(\n(( |\t)+[^\n]+\n)+)}\
$err match files] {
@@ -9960,38 +9974,38 @@
}
proc resethead {} {
- global mainhead rowmenuid confirm_ok resettype NS
+ global mainhead rowmenuid confirm_ok resettype
set confirm_ok 0
set w ".confirmreset"
ttk_toplevel $w
make_transient $w .
wm title $w [mc "Confirm reset"]
- ${NS}::label $w.m -text \
+ ttk::label $w.m -text \
[mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]]
pack $w.m -side top -fill x -padx 20 -pady 20
- ${NS}::labelframe $w.f -text [mc "Reset type:"]
+ ttk::labelframe $w.f -text [mc "Reset type:"]
set resettype mixed
- ${NS}::radiobutton $w.f.soft -value soft -variable resettype \
+ ttk::radiobutton $w.f.soft -value soft -variable resettype \
-text [mc "Soft: Leave working tree and index untouched"]
grid $w.f.soft -sticky w
- ${NS}::radiobutton $w.f.mixed -value mixed -variable resettype \
+ ttk::radiobutton $w.f.mixed -value mixed -variable resettype \
-text [mc "Mixed: Leave working tree untouched, reset index"]
grid $w.f.mixed -sticky w
- ${NS}::radiobutton $w.f.hard -value hard -variable resettype \
+ ttk::radiobutton $w.f.hard -value hard -variable resettype \
-text [mc "Hard: Reset working tree and index\n(discard ALL local changes)"]
grid $w.f.hard -sticky w
pack $w.f -side top -fill x -padx 4
- ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
+ ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
pack $w.ok -side left -fill x -padx 20 -pady 20
- ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w"
+ ttk::button $w.cancel -text [mc Cancel] -command "destroy $w"
bind $w <Key-Escape> [list destroy $w]
pack $w.cancel -side right -fill x -padx 20 -pady 20
bind $w <Visibility> "grab $w; focus $w"
tkwait window $w
if {!$confirm_ok} return
- if {[catch {set fd [open \
- [list | git reset --$resettype $rowmenuid 2>@1] r]} err]} {
+ if {[catch {set fd [safe_open_command_redirect \
+ [list git reset --$resettype $rowmenuid] [list 2>@1]]} err]} {
error_popup $err
} else {
dohidelocalchanges
@@ -10062,7 +10076,7 @@
# check the tree is clean first??
set newhead $headmenuhead
- set command [list | git checkout]
+ set command [list git checkout]
if {[string match "remotes/*" $newhead]} {
set remote $newhead
set newhead [string range $newhead [expr [string last / $newhead] + 1] end]
@@ -10076,12 +10090,11 @@
} else {
lappend command $newhead
}
- lappend command 2>@1
nowbusy checkout [mc "Checking out"]
update
dohidelocalchanges
if {[catch {
- set fd [open $command r]
+ set fd [safe_open_command_redirect $command [list 2>@1]]
} err]} {
notbusy checkout
error_popup $err
@@ -10147,7 +10160,7 @@
}
nowbusy rmbranch
update
- if {[catch {exec git branch -D $head} err]} {
+ if {[catch {safe_exec [list git branch -D $head]} err]} {
notbusy rmbranch
error_popup $err
return
@@ -10162,7 +10175,7 @@
# Display a list of tags and heads
proc showrefs {} {
- global showrefstop bgcolor fgcolor selectbgcolor NS
+ global showrefstop bgcolor fgcolor selectbgcolor
global bglist fglist reflistfilter reflist maincursor
set top .showrefs
@@ -10185,19 +10198,22 @@
lappend bglist $top.list
lappend fglist $top.list
}
- ${NS}::scrollbar $top.ysb -command "$top.list yview" -orient vertical
- ${NS}::scrollbar $top.xsb -command "$top.list xview" -orient horizontal
+ ttk::scrollbar $top.ysb -command "$top.list yview" -orient vertical
+ ttk::scrollbar $top.xsb -command "$top.list xview" -orient horizontal
grid $top.list $top.ysb -sticky nsew
grid $top.xsb x -sticky ew
- ${NS}::frame $top.f
- ${NS}::label $top.f.l -text "[mc "Filter"]: "
- ${NS}::entry $top.f.e -width 20 -textvariable reflistfilter
+ ttk::frame $top.f
+ ttk::label $top.f.l -text "[mc "Filter"]: "
+ ttk::entry $top.f.e -width 20 -textvariable reflistfilter
set reflistfilter "*"
trace add variable reflistfilter write reflistfilter_change
pack $top.f.e -side right -fill x -expand 1
pack $top.f.l -side left
grid $top.f - -sticky ew -pady 2
- ${NS}::button $top.close -command [list destroy $top] -text [mc "Close"]
+ ttk::checkbutton $top.sort -text [mc "Sort refs by type"] \
+ -variable sortrefsbytype -command {refill_reflist}
+ grid $top.sort - -sticky w -pady 2
+ ttk::button $top.close -command [list destroy $top] -text [mc "Close"]
bind $top <Key-Escape> [list destroy $top]
grid $top.close -
grid columnconfigure $top 0 -weight 1
@@ -10240,43 +10256,71 @@
}
proc refill_reflist {} {
- global reflist reflistfilter showrefstop headids tagids otherrefids
- global curview
+ global reflist reflistfilter showrefstop headids tagids otherrefids sortrefsbytype
+ global curview upstreamofref
if {![info exists showrefstop] || ![winfo exists $showrefstop]} return
- set refs {}
+ set localrefs {}
+ set remoterefs {}
+ set trackedremoterefs {}
+ set tagrefs {}
+ set otherrefs {}
+
foreach n [array names headids] {
- if {[string match $reflistfilter $n]} {
+ if {![string match "remotes/*" $n] && [string match $reflistfilter $n]} {
if {[commitinview $headids($n) $curview]} {
- if {[string match "remotes/*" $n]} {
- lappend refs [list $n R]
- } else {
- lappend refs [list $n H]
+ lappend localrefs [list $n H]
+ if {[info exists upstreamofref($n)] && [commitinview $headids($upstreamofref($n)) $curview]} {
+ lappend trackedremoterefs [list $upstreamofref($n) R]
}
} else {
interestedin $headids($n) {run refill_reflist}
}
}
}
+ set trackedremoterefs [lsort -index 0 -unique $trackedremoterefs]
+ set localrefs [lsort -index 0 $localrefs]
+
+ foreach n [array names headids] {
+ if {[string match "remotes/*" $n] && [string match $reflistfilter $n]} {
+ if {[commitinview $headids($n) $curview]} {
+ if {[lsearch -exact $trackedremoterefs [list $n R]] < 0} {
+ lappend remoterefs [list $n R]
+ }
+ } else {
+ interestedin $headids($n) {run refill_reflist}
+ }
+ }
+ }
+ set remoterefs [lsort -index 0 $remoterefs]
+
foreach n [array names tagids] {
if {[string match $reflistfilter $n]} {
if {[commitinview $tagids($n) $curview]} {
- lappend refs [list $n T]
+ lappend tagrefs [list $n T]
} else {
interestedin $tagids($n) {run refill_reflist}
}
}
}
+ set tagrefs [lsort -index 0 $tagrefs]
+
foreach n [array names otherrefids] {
if {[string match $reflistfilter $n]} {
if {[commitinview $otherrefids($n) $curview]} {
- lappend refs [list $n o]
+ lappend otherrefs [list "$n" o]
} else {
interestedin $otherrefids($n) {run refill_reflist}
}
}
}
- set refs [lsort -index 0 $refs]
+ set otherrefs [lsort -index 0 $otherrefs]
+
+ set refs [concat $localrefs $trackedremoterefs $remoterefs $tagrefs $otherrefs]
+ if {!$sortrefsbytype} {
+ set refs [lsort -index 0 $refs]
+ }
+
if {$refs eq $reflist} return
# Update the contents of $showrefstop.list according to the
@@ -10338,7 +10382,7 @@
set cachedarcs 0
set allccache [file join $gitdir "gitk.cache"]
if {![catch {
- set f [open $allccache r]
+ set f [safe_open_file $allccache r]
set allcwait 1
getcache $f
}]} return
@@ -10347,7 +10391,7 @@
if {$allcwait} {
return
}
- set cmd [list | git rev-list --parents]
+ set cmd [list git rev-list --parents]
set allcupdate [expr {$seeds ne {}}]
if {!$allcupdate} {
set ids "--all"
@@ -10375,10 +10419,11 @@
if {$ids ne {}} {
if {$ids eq "--all"} {
set cmd [concat $cmd "--all"]
+ set fd [safe_open_command $cmd]
} else {
- set cmd [concat $cmd --stdin "<<[join $ids "\\n"]"]
+ set cmd [concat $cmd --stdin]
+ set fd [safe_open_command_redirect $cmd [list "<<[join $ids "\n"]"]]
}
- set fd [open $cmd r]
fconfigure $fd -blocking 0
incr allcommits
nowbusy allcommits
@@ -10768,7 +10813,7 @@
set cachearc 0
set cachedarcs $nextarc
catch {
- set f [open $allccache w]
+ set f [safe_open_file $allccache w]
puts $f [list 1 $cachedarcs]
run writecache $f
}
@@ -11471,7 +11516,7 @@
if {![info exists cached_tagcontent($tag)]} {
catch {
- set cached_tagcontent($tag) [exec git cat-file -p $tag]
+ set cached_tagcontent($tag) [safe_exec [list git cat-file -p $tag]]
}
}
$ctext insert end "[mc "Tag"]: $tag\n" bold
@@ -11534,84 +11579,16 @@
}
proc mkfontdisp {font top which} {
- global fontattr fontpref $font NS use_ttk
+ global fontattr fontpref $font
set fontpref($font) [set $font]
- ${NS}::button $top.${font}but -text $which \
+ ttk::button $top.${font}but -text $which \
-command [list choosefont $font $which]
- ${NS}::label $top.$font -relief flat -font $font \
+ ttk::label $top.$font -relief flat -font $font \
-text $fontattr($font,family) -justify left
grid x $top.${font}but $top.$font -sticky w
}
-proc choosefont {font which} {
- global fontparam fontlist fonttop fontattr
- global prefstop NS
-
- set fontparam(which) $which
- set fontparam(font) $font
- set fontparam(family) [font actual $font -family]
- set fontparam(size) $fontattr($font,size)
- set fontparam(weight) $fontattr($font,weight)
- set fontparam(slant) $fontattr($font,slant)
- set top .gitkfont
- set fonttop $top
- if {![winfo exists $top]} {
- font create sample
- eval font config sample [font actual $font]
- ttk_toplevel $top
- make_transient $top $prefstop
- wm title $top [mc "Gitk font chooser"]
- ${NS}::label $top.l -textvariable fontparam(which)
- pack $top.l -side top
- set fontlist [lsort [font families]]
- ${NS}::frame $top.f
- listbox $top.f.fam -listvariable fontlist \
- -yscrollcommand [list $top.f.sb set]
- bind $top.f.fam <<ListboxSelect>> selfontfam
- ${NS}::scrollbar $top.f.sb -command [list $top.f.fam yview]
- pack $top.f.sb -side right -fill y
- pack $top.f.fam -side left -fill both -expand 1
- pack $top.f -side top -fill both -expand 1
- ${NS}::frame $top.g
- spinbox $top.g.size -from 4 -to 40 -width 4 \
- -textvariable fontparam(size) \
- -validatecommand {string is integer -strict %s}
- checkbutton $top.g.bold -padx 5 \
- -font {{Times New Roman} 12 bold} -text [mc "B"] -indicatoron 0 \
- -variable fontparam(weight) -onvalue bold -offvalue normal
- checkbutton $top.g.ital -padx 5 \
- -font {{Times New Roman} 12 italic} -text [mc "I"] -indicatoron 0 \
- -variable fontparam(slant) -onvalue italic -offvalue roman
- pack $top.g.size $top.g.bold $top.g.ital -side left
- pack $top.g -side top
- canvas $top.c -width 150 -height 50 -border 2 -relief sunk \
- -background white
- $top.c create text 100 25 -anchor center -text $which -font sample \
- -fill black -tags text
- bind $top.c <Configure> [list centertext $top.c]
- pack $top.c -side top -fill x
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.ok -text [mc "OK"] -command fontok -default active
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal
- bind $top <Key-Return> fontok
- bind $top <Key-Escape> fontcan
- grid $top.buts.ok $top.buts.can
- grid columnconfigure $top.buts 0 -weight 1 -uniform a
- grid columnconfigure $top.buts 1 -weight 1 -uniform a
- pack $top.buts -side bottom -fill x
- trace add variable fontparam write chg_fontparam
- } else {
- raise $top
- $top.c itemconf text -text $which
- }
- set i [lsearch -exact $fontlist $fontparam(family)]
- if {$i >= 0} {
- $top.f.fam selection set $i
- $top.f.fam see $i
- }
-}
-
proc centertext {w} {
$w coords text [expr {[winfo width $w] / 2}] [expr {[winfo height $w] / 2}]
}
@@ -11644,26 +11621,21 @@
}
}
-if {[package vsatisfies [package provide Tk] 8.6]} {
- # In Tk 8.6 we have a native font chooser dialog. Overwrite the above
- # function to make use of it.
- proc choosefont {font which} {
- tk fontchooser configure -title $which -font $font \
- -command [list on_choosefont $font $which]
- tk fontchooser show
- }
- proc on_choosefont {font which newfont} {
- global fontparam
- puts stderr "$font $newfont"
- array set f [font actual $newfont]
- set fontparam(which) $which
- set fontparam(font) $font
- set fontparam(family) $f(-family)
- set fontparam(size) $f(-size)
- set fontparam(weight) $f(-weight)
- set fontparam(slant) $f(-slant)
- fontok
- }
+proc choosefont {font which} {
+ tk fontchooser configure -title $which -font $font \
+ -command [list on_choosefont $font $which]
+ tk fontchooser show
+}
+proc on_choosefont {font which newfont} {
+ global fontparam
+ array set f [font actual $newfont]
+ set fontparam(which) $which
+ set fontparam(font) $font
+ set fontparam(family) $f(-family)
+ set fontparam(size) $f(-size)
+ set fontparam(weight) $f(-weight)
+ set fontparam(slant) $f(-slant)
+ fontok
}
proc selfontfam {} {
@@ -11683,172 +11655,170 @@
# Create a property sheet tab page
proc create_prefs_page {w} {
- global NS
- set parent [join [lrange [split $w .] 0 end-1] .]
- if {[winfo class $parent] eq "TNotebook"} {
- ${NS}::frame $w
- } else {
- ${NS}::labelframe $w
- }
+ ttk::frame $w
}
proc prefspage_general {notebook} {
- global NS maxwidth maxgraphpct showneartags showlocalchanges
- global tabstop wrapcomment wrapdefault limitdiffs
- global autocopy autoselect autosellen extdifftool perfile_attrs
- global hideremotes want_ttk have_ttk maxrefs web_browser
+ global {*}$::config_variables
+ global hashlength
set page [create_prefs_page $notebook.general]
- ${NS}::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold
+ ttk::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold
grid $page.ldisp - -sticky w -pady 10
- ${NS}::label $page.spacer -text " "
- ${NS}::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
+ ttk::label $page.spacer -text " "
+ ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
grid $page.spacer $page.maxwidthl $page.maxwidth -sticky w
#xgettext:no-tcl-format
- ${NS}::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
+ ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
grid x $page.maxpctl $page.maxpct -sticky w
- ${NS}::checkbutton $page.showlocal -text [mc "Show local changes"] \
+ ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \
-variable showlocalchanges
grid x $page.showlocal -sticky w
- ${NS}::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
+ ttk::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
-variable hideremotes
grid x $page.hideremotes -sticky w
- ${NS}::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \
+ ttk::entry $page.refstohide -textvariable refstohide
+ ttk::frame $page.refstohidef
+ ttk::label $page.refstohidef.l -text [mc "Refs to hide (space-separated globs)" ]
+ pack $page.refstohidef.l -side left
+ pack configure $page.refstohidef.l -padx 10
+ grid x $page.refstohidef $page.refstohide -sticky ew
+
+ ttk::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \
-variable autocopy
grid x $page.autocopy -sticky w
if {[haveselectionclipboard]} {
- ${NS}::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \
+ ttk::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \
-variable autoselect
grid x $page.autoselect -sticky w
}
- spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen
- ${NS}::label $page.autosellenl -text [mc "Length of commit ID to copy"]
- grid x $page.autosellenl $page.autosellen -sticky w
- ${NS}::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
+ spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen
+ ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"]
+ grid x $page.autosellenl $page.autosellen -sticky w
+ ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"]
+ spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll
+ grid x $page.kscroll1 $page.kscroll -sticky w
+
+ ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
grid $page.ddisp - -sticky w -pady 10
- ${NS}::label $page.tabstopl -text [mc "Tab spacing"]
+ ttk::label $page.tabstopl -text [mc "Tab spacing"]
spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
grid x $page.tabstopl $page.tabstop -sticky w
- ${NS}::label $page.wrapcommentl -text [mc "Wrap comment text"]
+ ttk::label $page.wrapcommentl -text [mc "Wrap comment text"]
makedroplist $page.wrapcomment wrapcomment none char word
grid x $page.wrapcommentl $page.wrapcomment -sticky w
- ${NS}::label $page.wrapdefaultl -text [mc "Wrap other text"]
+ ttk::label $page.wrapdefaultl -text [mc "Wrap other text"]
makedroplist $page.wrapdefault wrapdefault none char word
grid x $page.wrapdefaultl $page.wrapdefault -sticky w
- ${NS}::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
+ ttk::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
-variable showneartags
grid x $page.ntag -sticky w
- ${NS}::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
+ ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs
grid x $page.maxrefsl $page.maxrefs -sticky w
- ${NS}::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
+ ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
-variable limitdiffs
grid x $page.ldiff -sticky w
- ${NS}::checkbutton $page.lattr -text [mc "Support per-file encodings"] \
+ ttk::checkbutton $page.lattr -text [mc "Support per-file encodings"] \
-variable perfile_attrs
grid x $page.lattr -sticky w
- ${NS}::entry $page.extdifft -textvariable extdifftool
- ${NS}::frame $page.extdifff
- ${NS}::label $page.extdifff.l -text [mc "External diff tool" ]
- ${NS}::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff
+ ttk::entry $page.extdifft -textvariable extdifftool
+ ttk::frame $page.extdifff
+ ttk::label $page.extdifff.l -text [mc "External diff tool" ]
+ ttk::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff
pack $page.extdifff.l $page.extdifff.b -side left
pack configure $page.extdifff.l -padx 10
grid x $page.extdifff $page.extdifft -sticky ew
- ${NS}::entry $page.webbrowser -textvariable web_browser
- ${NS}::frame $page.webbrowserf
- ${NS}::label $page.webbrowserf.l -text [mc "Web browser" ]
+ ttk::entry $page.webbrowser -textvariable web_browser
+ ttk::frame $page.webbrowserf
+ ttk::label $page.webbrowserf.l -text [mc "Web browser" ]
pack $page.webbrowserf.l -side left
pack configure $page.webbrowserf.l -padx 10
grid x $page.webbrowserf $page.webbrowser -sticky ew
- ${NS}::label $page.lgen -text [mc "General options"] -font mainfontbold
- grid $page.lgen - -sticky w -pady 10
- ${NS}::checkbutton $page.want_ttk -variable want_ttk \
- -text [mc "Use themed widgets"]
- if {$have_ttk} {
- ${NS}::label $page.ttk_note -text [mc "(change requires restart)"]
- } else {
- ${NS}::label $page.ttk_note -text [mc "(currently unavailable)"]
- }
- grid x $page.want_ttk $page.ttk_note -sticky w
return $page
}
proc prefspage_colors {notebook} {
- global NS uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
+ global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
global diffbgcolors
set page [create_prefs_page $notebook.colors]
- ${NS}::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold
+ ttk::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold
grid $page.cdisp - -sticky w -pady 10
label $page.ui -padx 40 -relief sunk -background $uicolor
- ${NS}::button $page.uibut -text [mc "Interface"] \
- -command [list choosecolor uicolor {} $page.ui [mc "interface"] setui]
+ ttk::button $page.uibut -text [mc "Interface"] \
+ -command [list choosecolor uicolor {} $page [mc "interface"]]
grid x $page.uibut $page.ui -sticky w
label $page.bg -padx 40 -relief sunk -background $bgcolor
- ${NS}::button $page.bgbut -text [mc "Background"] \
- -command [list choosecolor bgcolor {} $page.bg [mc "background"] setbg]
+ ttk::button $page.bgbut -text [mc "Background"] \
+ -command [list choosecolor bgcolor {} $page [mc "background"]]
grid x $page.bgbut $page.bg -sticky w
label $page.fg -padx 40 -relief sunk -background $fgcolor
- ${NS}::button $page.fgbut -text [mc "Foreground"] \
- -command [list choosecolor fgcolor {} $page.fg [mc "foreground"] setfg]
+ ttk::button $page.fgbut -text [mc "Foreground"] \
+ -command [list choosecolor fgcolor {} $page [mc "foreground"]]
grid x $page.fgbut $page.fg -sticky w
label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]
- ${NS}::button $page.diffoldbut -text [mc "Diff: old lines"] \
- -command [list choosecolor diffcolors 0 $page.diffold [mc "diff old lines"] \
- [list $ctext tag conf d0 -foreground]]
+ ttk::button $page.diffoldbut -text [mc "Diff: old lines"] \
+ -command [list choosecolor diffcolors 0 $page [mc "diff old lines"]]
grid x $page.diffoldbut $page.diffold -sticky w
label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0]
- ${NS}::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \
- -command [list choosecolor diffbgcolors 0 $page.diffoldbg \
- [mc "diff old lines bg"] \
- [list $ctext tag conf d0 -background]]
+ ttk::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \
+ -command [list choosecolor diffbgcolors 0 $page [mc "diff old lines bg"]]
grid x $page.diffoldbgbut $page.diffoldbg -sticky w
label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]
- ${NS}::button $page.diffnewbut -text [mc "Diff: new lines"] \
- -command [list choosecolor diffcolors 1 $page.diffnew [mc "diff new lines"] \
- [list $ctext tag conf dresult -foreground]]
+ ttk::button $page.diffnewbut -text [mc "Diff: new lines"] \
+ -command [list choosecolor diffcolors 1 $page [mc "diff new lines"]]
grid x $page.diffnewbut $page.diffnew -sticky w
label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1]
- ${NS}::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \
- -command [list choosecolor diffbgcolors 1 $page.diffnewbg \
- [mc "diff new lines bg"] \
- [list $ctext tag conf dresult -background]]
+ ttk::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \
+ -command [list choosecolor diffbgcolors 1 $page [mc "diff new lines bg"]]
grid x $page.diffnewbgbut $page.diffnewbg -sticky w
label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]
- ${NS}::button $page.hunksepbut -text [mc "Diff: hunk header"] \
- -command [list choosecolor diffcolors 2 $page.hunksep \
- [mc "diff hunk header"] \
- [list $ctext tag conf hunksep -foreground]]
+ ttk::button $page.hunksepbut -text [mc "Diff: hunk header"] \
+ -command [list choosecolor diffcolors 2 $page [mc "diff hunk header"]]
grid x $page.hunksepbut $page.hunksep -sticky w
label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor
- ${NS}::button $page.markbgbut -text [mc "Marked line bg"] \
- -command [list choosecolor markbgcolor {} $page.markbgsep \
- [mc "marked line background"] \
- [list $ctext tag conf omark -background]]
+ ttk::button $page.markbgbut -text [mc "Marked line bg"] \
+ -command [list choosecolor markbgcolor {} $page [mc "marked line background"]]
grid x $page.markbgbut $page.markbgsep -sticky w
label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor
- ${NS}::button $page.selbgbut -text [mc "Select bg"] \
- -command [list choosecolor selectbgcolor {} $page.selbgsep [mc "background"] setselbg]
+ ttk::button $page.selbgbut -text [mc "Select bg"] \
+ -command [list choosecolor selectbgcolor {} $page [mc "background"]]
grid x $page.selbgbut $page.selbgsep -sticky w
return $page
}
+proc prefspage_set_colorswatches {page} {
+ global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
+ global diffbgcolors
+
+ $page.ui configure -background $uicolor
+ $page.bg configure -background $bgcolor
+ $page.fg configure -background $fgcolor
+ $page.diffold configure -background [lindex $diffcolors 0]
+ $page.diffoldbg configure -background [lindex $diffbgcolors 0]
+ $page.diffnew configure -background [lindex $diffcolors 1]
+ $page.diffnewbg configure -background [lindex $diffbgcolors 1]
+ $page.hunksep configure -background [lindex $diffcolors 2]
+ $page.markbgsep configure -background $markbgcolor
+ $page.selbgsep configure -background $selectbgcolor
+}
+
proc prefspage_fonts {notebook} {
- global NS
set page [create_prefs_page $notebook.fonts]
- ${NS}::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold
+ ttk::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold
grid $page.cfont - -sticky w -pady 10
mkfontdisp mainfont $page [mc "Main font"]
mkfontdisp textfont $page [mc "Diff display font"]
@@ -11857,11 +11827,8 @@
}
proc doprefs {} {
- global maxwidth maxgraphpct use_ttk NS
- global oldprefs prefstop showneartags showlocalchanges
- global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
- global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs
- global hideremotes want_ttk have_ttk wrapcomment wrapdefault
+ global oldprefs prefstop
+ global {*}$::config_variables
set top .gitkprefs
set prefstop $top
@@ -11869,49 +11836,34 @@
raise $top
return
}
- foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
- limitdiffs tabstop perfile_attrs hideremotes want_ttk wrapcomment wrapdefault} {
+ foreach v $::config_variables {
set oldprefs($v) [set $v]
}
ttk_toplevel $top
wm title $top [mc "Gitk preferences"]
make_transient $top .
- if {[set use_notebook [expr {$use_ttk && [info command ::ttk::notebook] ne ""}]]} {
- set notebook [ttk::notebook $top.notebook]
- } else {
- set notebook [${NS}::frame $top.notebook -borderwidth 0 -relief flat]
- }
+ set notebook [ttk::notebook $top.notebook]
lappend pages [prefspage_general $notebook] [mc "General"]
lappend pages [prefspage_colors $notebook] [mc "Colors"]
lappend pages [prefspage_fonts $notebook] [mc "Fonts"]
set col 0
foreach {page title} $pages {
- if {$use_notebook} {
- $notebook add $page -text $title
- } else {
- set btn [${NS}::button $notebook.b_[string map {. X} $page] \
- -text $title -command [list raise $page]]
- $page configure -text $title
- grid $btn -row 0 -column [incr col] -sticky w
- grid $page -row 1 -column 0 -sticky news -columnspan 100
- }
+ $notebook add $page -text $title
}
- if {!$use_notebook} {
- grid columnconfigure $notebook 0 -weight 1
- grid rowconfigure $notebook 1 -weight 1
- raise [lindex $pages 0]
- }
+ grid columnconfigure $notebook 0 -weight 1
+ grid rowconfigure $notebook 1 -weight 1
+ raise [lindex $pages 0]
grid $notebook -sticky news -padx 2 -pady 2
grid rowconfigure $top 0 -weight 1
grid columnconfigure $top 0 -weight 1
- ${NS}::frame $top.buts
- ${NS}::button $top.buts.ok -text [mc "OK"] -command prefsok -default active
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
+ ttk::frame $top.buts
+ ttk::button $top.buts.ok -text [mc "OK"] -command prefsok -default active
+ ttk::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
bind $top <Key-Return> prefsok
bind $top <Key-Escape> prefscan
grid $top.buts.ok $top.buts.can
@@ -11931,15 +11883,15 @@
}
}
-proc choosecolor {v vi w x cmd} {
+proc choosecolor {v vi prefspage x} {
global $v
set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \
-title [mc "Gitk: choose color for %s" $x]]
if {$c eq {}} return
- $w conf -background $c
lset $v $vi $c
- eval $cmd $c
+ set_gui_colors
+ prefspage_set_colorswatches $prefspage
}
proc setselbg {c} {
@@ -11992,25 +11944,38 @@
$canv itemconf markid -outline $c
}
+proc set_gui_colors {} {
+ global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
+ global diffbgcolors
+
+ setui $uicolor
+ setbg $bgcolor
+ setfg $fgcolor
+ $ctext tag conf d0 -foreground [lindex $diffcolors 0]
+ $ctext tag conf d0 -background [lindex $diffbgcolors 0]
+ $ctext tag conf dresult -foreground [lindex $diffcolors 1]
+ $ctext tag conf dresult -background [lindex $diffbgcolors 1]
+ $ctext tag conf hunksep -foreground [lindex $diffcolors 2]
+ $ctext tag conf omark -background $markbgcolor
+ setselbg $selectbgcolor
+}
+
proc prefscan {} {
global oldprefs prefstop
+ global {*}$::config_variables
- foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
- limitdiffs tabstop perfile_attrs hideremotes want_ttk wrapcomment wrapdefault} {
- global $v
+ foreach v $::config_variables {
set $v $oldprefs($v)
}
catch {destroy $prefstop}
unset prefstop
fontcan
+ set_gui_colors
}
proc prefsok {} {
- global maxwidth maxgraphpct
- global oldprefs prefstop showneartags showlocalchanges
- global fontpref mainfont textfont uifont
- global limitdiffs treediffs perfile_attrs
- global hideremotes wrapcomment wrapdefault
+ global oldprefs prefstop fontpref treediffs
+ global {*}$::config_variables
global ctext
catch {destroy $prefstop}
@@ -12057,7 +12022,7 @@
$limitdiffs != $oldprefs(limitdiffs)} {
reselectline
}
- if {$hideremotes != $oldprefs(hideremotes)} {
+ if {$hideremotes != $oldprefs(hideremotes) || $refstohide != $oldprefs(refstohide)} {
rereadrefs
}
if {$wrapcomment != $oldprefs(wrapcomment)} {
@@ -12382,7 +12347,7 @@
set r $path_attr_cache($attr,$path)
} else {
set r "unspecified"
- if {![catch {set line [exec git check-attr $attr -- $path]}]} {
+ if {![catch {set line [safe_exec [list git check-attr $attr -- $path]]}]} {
regexp "(.*): $attr: (.*)" $line m f r
}
set path_attr_cache($attr,$path) $r
@@ -12409,11 +12374,11 @@
while {$newlist ne {}} {
set head [lrange $newlist 0 [expr {$lim - 1}]]
set newlist [lrange $newlist $lim end]
- if {![catch {set rlist [eval exec git check-attr $attr -- $head]}]} {
+ if {![catch {set rlist [safe_exec [concat git check-attr $attr -- $head]]}]} {
foreach row [split $rlist "\n"] {
if {[regexp "(.*): $attr: (.*)" $row m path value]} {
if {[string index $path 0] eq "\""} {
- set path [encoding convertfrom utf-8 [lindex $path 0]]
+ set path [convertfrom utf-8 [lindex $path 0]]
}
set path_attr_cache($attr,$path) $value
}
@@ -12434,6 +12399,23 @@
return $tcl_enc
}
+proc is_other_ref_visible {ref} {
+ global refstohide
+
+ if {$refstohide eq {}} {
+ return 1
+ }
+
+ foreach pat [split $refstohide " "] {
+ if {$pat eq {}} continue
+ if {[string match $pat $ref]} {
+ return 0
+ }
+ }
+
+ return 1
+}
+
## For msgcat loading, first locate the installation location.
if { [info exists ::env(GITK_MSGSDIR)] } {
## Msgsdir was manually set in the environment.
@@ -12452,20 +12434,13 @@
## And eventually load the actual message catalog
::msgcat::mcload $gitk_msgsdir
-# First check that Tcl/Tk is recent enough
-if {[catch {package require Tk 8.4} err]} {
- show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
- Gitk requires at least Tcl/Tk 8.4."]
- exit 1
-}
-
# on OSX bring the current Wish process window to front
if {[tk windowingsystem] eq "aqua"} {
- exec osascript -e [format {
+ safe_exec [list osascript -e [format {
tell application "System Events"
set frontmost of processes whose unix id is %d to true
end tell
- } [pid] ]
+ } [pid] ]]
}
# Unset GIT_TRACE var if set
@@ -12504,6 +12479,17 @@
}
}
+# Use object format as hash algorightm (either "sha1" or "sha256")
+set hashalgorithm [exec git rev-parse --show-object-format]
+if {$hashalgorithm eq "sha1"} {
+ set hashlength 40
+} elseif {$hashalgorithm eq "sha256"} {
+ set hashlength 64
+} else {
+ puts stderr "Unknown hash algorithm: $hashalgorithm"
+ exit 1
+}
+
set log_showroot true
catch {
set log_showroot [exec git config --bool --get log.showroot]
@@ -12537,17 +12523,19 @@
set wrapdefault "none"
set showneartags 1
set hideremotes 0
+set refstohide ""
+set sortrefsbytype 1
set maxrefs 20
set visiblerefs {"master"}
set maxlinelen 200
set showlocalchanges 1
set limitdiffs 1
+set kscroll 3
set datetimeformat "%Y-%m-%d %H:%M:%S"
set autocopy 0
set autoselect 1
-set autosellen 40
+set autosellen $hashlength
set perfile_attrs 0
-set want_ttk 1
if {[tk windowingsystem] eq "aqua"} {
set extdifftool "opendiff"
@@ -12623,14 +12611,14 @@
set config_file_tmp [file join $env(XDG_CONFIG_HOME) git gitk-tmp]
} else {
# default XDG_CONFIG_HOME
- set config_file "~/.config/git/gitk"
- set config_file_tmp "~/.config/git/gitk-tmp"
+ set config_file "$env(HOME)/.config/git/gitk"
+ set config_file_tmp "$env(HOME)/.config/git/gitk-tmp"
}
if {![file exists $config_file]} {
# for backward compatibility use the old config file if it exists
- if {[file exists "~/.gitk"]} {
- set config_file "~/.gitk"
- set config_file_tmp "~/.gitk-tmp"
+ if {[file exists "$env(HOME)/.gitk"]} {
+ set config_file "$env(HOME)/.gitk"
+ set config_file_tmp "$env(HOME)/.gitk-tmp"
} elseif {![file exists [file dirname $config_file]]} {
file mkdir [file dirname $config_file]
}
@@ -12640,19 +12628,67 @@
config_check_tmp_exists 50
set config_variables {
- mainfont textfont uifont tabstop findmergefiles maxgraphpct maxwidth
- cmitmode wrapcomment wrapdefault autocopy autoselect autosellen
- showneartags maxrefs visiblerefs
- hideremotes showlocalchanges datetimeformat limitdiffs uicolor want_ttk
- bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors
- markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor
- extdifftool perfile_attrs headbgcolor headfgcolor headoutlinecolor
- remotebgcolor tagbgcolor tagfgcolor tagoutlinecolor reflinecolor
- filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor
- linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor
- indexcirclecolor circlecolors linkfgcolor circleoutlinecolor diffbgcolors
+ autocopy
+ autoselect
+ autosellen
+ bgcolor
+ circlecolors
+ circleoutlinecolor
+ cmitmode
+ colors
+ currentsearchhitbgcolor
+ datetimeformat
+ diffbgcolors
+ diffcolors
+ diffcontext
+ extdifftool
+ fgcolor
+ filesepbgcolor
+ filesepfgcolor
+ findmergefiles
+ foundbgcolor
+ headbgcolor
+ headfgcolor
+ headoutlinecolor
+ hideremotes
+ indexcirclecolor
+ kscroll
+ limitdiffs
+ linehoverbgcolor
+ linehoverfgcolor
+ linehoveroutlinecolor
+ linkfgcolor
+ mainfont
+ mainheadcirclecolor
+ markbgcolor
+ maxgraphpct
+ maxrefs
+ maxwidth
+ mergecolors
+ perfile_attrs
+ reflinecolor
+ refstohide
+ remotebgcolor
+ selectbgcolor
+ showlocalchanges
+ showneartags
+ sortrefsbytype
+ tabstop
+ tagbgcolor
+ tagfgcolor
+ tagoutlinecolor
+ textfont
+ uicolor
+ uifgcolor
+ uifgdisabledcolor
+ uifont
+ visiblerefs
web_browser
+ workingfilescirclecolor
+ wrapcomment
+ wrapdefault
}
+
foreach var $config_variables {
config_init_trace $var
trace add variable $var write config_variable_change_cb
@@ -12669,8 +12705,6 @@
parsefont uifont $uifont
eval font create uifont [fontflags uifont]
-setui $uicolor
-
setoptions
# check that we can find a .git directory somewhere...
@@ -12713,7 +12747,7 @@
if {$i >= [llength $argv] && $revtreeargs ne {}} {
# no -- on command line, but some arguments (other than --argscmd)
if {[catch {
- set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs]
+ set f [safe_exec [concat git rev-parse --no-revs --no-flags $revtreeargs]]
set cmdline_files [split $f "\n"]
set n [llength $cmdline_files]
set revtreeargs [lrange $revtreeargs 0 end-$n]
@@ -12743,25 +12777,7 @@
set nullid2 "0000000000000000000000000000000000000001"
set nullfile "/dev/null"
-set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
-set have_tk86 [expr {[package vcompare $tk_version "8.6"] >= 0}]
-if {![info exists have_ttk]} {
- set have_ttk [llength [info commands ::ttk::style]]
-}
-set use_ttk [expr {$have_ttk && $want_ttk}]
-set NS [expr {$use_ttk ? "ttk" : ""}]
-
-if {$use_ttk} {
- setttkstyle
-}
-
-regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
-
-set show_notes {}
-if {[package vcompare $git_version "1.6.6.2"] >= 0} {
- set show_notes "--show-notes"
-}
-
+setttkstyle
set appname "gitk"
set runq {}
@@ -12877,6 +12893,8 @@
focus -force .
}
+set_gui_colors
+
getcommits {}
# Local variables:
diff --git a/gitk-git/po/bg.po b/gitk-git/po/bg.po
index 773a049..d1e7d92 100644
--- a/gitk-git/po/bg.po
+++ b/gitk-git/po/bg.po
@@ -1,15 +1,15 @@
# Bulgarian translation of gitk po-file.
-# Copyright (C) 2014, 2015, 2019, 2020, 2024 Alexander Shopov <ash@kambanaria.org>.
+# Copyright (C) 2014, 2015, 2019, 2020, 2024, 2025 Alexander Shopov <ash@kambanaria.org>.
# This file is distributed under the same license as the git package.
-# Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2019, 2020, 2024.
+# Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2019, 2020, 2024, 2025.
#
#
msgid ""
msgstr ""
"Project-Id-Version: gitk master\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-12-24 11:01+0100\n"
-"PO-Revision-Date: 2024-12-24 11:05+0100\n"
+"POT-Creation-Date: 2025-07-22 18:34+0200\n"
+"PO-Revision-Date: 2025-07-28 13:38+0200\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"Language: bg\n"
@@ -18,32 +18,25 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gitk:139
msgid "Couldn't get list of unmerged files:"
msgstr "Списъкът с неслети файлове не може да се получи:"
-#: gitk:211 gitk:2430
msgid "Color words"
msgstr "Оцветяване на думите"
-#: gitk:216 gitk:2430 gitk:8335 gitk:8368
msgid "Markup words"
msgstr "Отбелязване на думите"
-#: gitk:323
msgid "Error parsing revisions:"
msgstr "Грешка при анализ на версиите:"
-#: gitk:389
msgid "Error executing --argscmd command:"
msgstr "Грешка при изпълнение на командата с „--argscmd“."
-#: gitk:402
msgid "No files selected: --merge specified but no files are unmerged."
msgstr ""
"Не са избрани файлове — указана е опцията „--merge“, но няма неслети файлове."
-#: gitk:405
msgid ""
"No files selected: --merge specified but no unmerged files are within file "
"limit."
@@ -51,326 +44,246 @@
"Не са избрани файлове — указана е опцията „--merge“, но няма неслети файлове "
"в ограниченията."
-#: gitk:430 gitk:585
msgid "Error executing git log:"
msgstr "Грешка при изпълнение на „git log“:"
-#: gitk:448 gitk:601
msgid "Reading"
msgstr "Прочитане"
-#: gitk:508 gitk:4596
msgid "Reading commits..."
msgstr "Прочитане на подаванията…"
-#: gitk:511 gitk:1660 gitk:4599
msgid "No commits selected"
msgstr "Не са избрани подавания"
-#: gitk:1468 gitk:4116 gitk:12738
msgid "Command line"
msgstr "Команден ред"
-#: gitk:1534
msgid "Can't parse git log output:"
msgstr "Изходът от „git log“ не може да се анализира:"
-#: gitk:1763
msgid "No commit information available"
msgstr "Липсва информация за подавания"
-#: gitk:1930 gitk:1959 gitk:4386 gitk:9875 gitk:11485 gitk:11805
msgid "OK"
msgstr "Добре"
-#: gitk:1961 gitk:4388 gitk:9311 gitk:9390 gitk:9520 gitk:9606 gitk:9877
-#: gitk:11486 gitk:11806
msgid "Cancel"
msgstr "Отказ"
-#: gitk:2114
msgid "&Update"
msgstr "&Обновяване"
-#: gitk:2115
msgid "&Reload"
msgstr "&Презареждане"
-#: gitk:2116
msgid "Reread re&ferences"
msgstr "Прочитане &наново"
-#: gitk:2117
msgid "&List references"
msgstr "&Изброяване на указателите"
-#: gitk:2119
msgid "Start git &gui"
msgstr "&Стартиране на „git gui“"
-#: gitk:2121
msgid "&Quit"
msgstr "&Спиране на програмата"
-#: gitk:2113
msgid "&File"
msgstr "&Файл"
-#: gitk:2125
msgid "&Preferences"
msgstr "&Настройки"
-#: gitk:2124
msgid "&Edit"
msgstr "&Редактиране"
-#: gitk:2129
msgid "&New view..."
msgstr "&Нов изглед…"
-#: gitk:2130
msgid "&Edit view..."
msgstr "&Редактиране на изгледа…"
-#: gitk:2131
msgid "&Delete view"
msgstr "&Изтриване на изгледа"
-#: gitk:2133
msgid "&All files"
msgstr "&Всички файлове"
-#: gitk:2128
msgid "&View"
msgstr "&Изглед"
-#: gitk:2138 gitk:2148
msgid "&About gitk"
msgstr "&Относно gitk"
-#: gitk:2139 gitk:2153
msgid "&Key bindings"
msgstr "&Клавишни комбинации"
-#: gitk:2137 gitk:2152
msgid "&Help"
msgstr "Помо&щ"
-#: gitk:2230 gitk:8767
msgid "Commit ID:"
msgstr "Подаване:"
-#: gitk:2274
msgid "Row"
msgstr "Ред"
-#: gitk:2312
msgid "Find"
msgstr "Търсене"
-#: gitk:2340
msgid "commit"
msgstr "подаване"
-#: gitk:2344 gitk:2346 gitk:4758 gitk:4781 gitk:4805 gitk:6826 gitk:6898
-#: gitk:6983
msgid "containing:"
msgstr "съдържащо:"
-#: gitk:2347 gitk:3597 gitk:3602 gitk:4834
msgid "touching paths:"
msgstr "в пътищата:"
-#: gitk:2348 gitk:4848
msgid "adding/removing string:"
msgstr "добавящо/премахващо низ"
-#: gitk:2349 gitk:4850
msgid "changing lines matching:"
msgstr "променящо редове напасващи:"
-#: gitk:2358 gitk:2360 gitk:4837
msgid "Exact"
msgstr "Точно"
-#: gitk:2360 gitk:4925 gitk:6794
msgid "IgnCase"
msgstr "Без регистър"
-#: gitk:2360 gitk:4807 gitk:4923 gitk:6790
msgid "Regexp"
msgstr "Рег. израз"
-#: gitk:2362 gitk:2363 gitk:4945 gitk:4975 gitk:4982 gitk:6919 gitk:6987
msgid "All fields"
msgstr "Всички полета"
-#: gitk:2363 gitk:4942 gitk:4975 gitk:6857
msgid "Headline"
msgstr "Първи ред"
-#: gitk:2364 gitk:4942 gitk:6857 gitk:6987 gitk:7499
msgid "Comments"
msgstr "Коментари"
-#: gitk:2364 gitk:4942 gitk:4947 gitk:4982 gitk:6857 gitk:7434 gitk:8945
-#: gitk:8960
msgid "Author"
msgstr "Автор"
-#: gitk:2364 gitk:4942 gitk:6857 gitk:7436
msgid "Committer"
msgstr "Подаващ"
-#: gitk:2398
msgid "Search"
msgstr "Търсене"
-#: gitk:2406
msgid "Diff"
msgstr "Разлики"
-#: gitk:2408
msgid "Old version"
msgstr "Стара версия"
-#: gitk:2410
msgid "New version"
msgstr "Нова версия"
-#: gitk:2413
msgid "Lines of context"
msgstr "Контекст в редове"
-#: gitk:2423
msgid "Ignore space change"
msgstr "Празните знаци без значение"
-#: gitk:2427 gitk:2429 gitk:8069 gitk:8321
msgid "Line diff"
msgstr "Поредови разлики"
-#: gitk:2502
msgid "Patch"
msgstr "Кръпка"
-#: gitk:2504
msgid "Tree"
msgstr "Дърво"
-#: gitk:2674 gitk:2695
+msgid "Unknown windowing system, cannot bind mouse"
+msgstr "Непозната графична система, не може да се установи връзка с мишка"
+
msgid "Diff this -> selected"
msgstr "Разлики между това и избраното"
-#: gitk:2675 gitk:2696
msgid "Diff selected -> this"
msgstr "Разлики между избраното и това"
-#: gitk:2676 gitk:2697
msgid "Make patch"
msgstr "Създаване на кръпка"
-#: gitk:2677 gitk:9369
msgid "Create tag"
msgstr "Създаване на етикет"
-#: gitk:2678
msgid "Copy commit reference"
msgstr "Копиране на указателя на подаване"
-#: gitk:2679 gitk:9500
msgid "Write commit to file"
msgstr "Запазване на подаването във файл"
-#: gitk:2680
msgid "Create new branch"
msgstr "Създаване на нов клон"
-#: gitk:2681
msgid "Cherry-pick this commit"
msgstr "Отбиране на това подаване"
-#: gitk:2682
msgid "Reset HEAD branch to here"
msgstr "Привеждане на върха на клона към текущото подаване"
-#: gitk:2683
msgid "Mark this commit"
msgstr "Отбелязване на това подаване"
-#: gitk:2684
msgid "Return to mark"
msgstr "Връщане към отбелязаното подаване"
-#: gitk:2685
msgid "Find descendant of this and mark"
msgstr "Откриване и отбелязване на наследниците"
-#: gitk:2686
msgid "Compare with marked commit"
msgstr "Сравнение с отбелязаното подаване"
-#: gitk:2687 gitk:2698
msgid "Diff this -> marked commit"
msgstr "Разлики между това и отбелязаното"
-#: gitk:2688 gitk:2699
msgid "Diff marked commit -> this"
msgstr "Разлики между отбелязаното и това"
-#: gitk:2689
msgid "Revert this commit"
msgstr "Отмяна на това подаване"
-#: gitk:2705
msgid "Check out this branch"
msgstr "Изтегляне на този клон"
-#: gitk:2706
msgid "Rename this branch"
msgstr "Преименуване на този клон"
-#: gitk:2707
msgid "Remove this branch"
msgstr "Изтриване на този клон"
-#: gitk:2708
msgid "Copy branch name"
msgstr "Копиране на името на клона"
-#: gitk:2715
msgid "Highlight this too"
msgstr "Отбелязване и на това"
-#: gitk:2716
msgid "Highlight this only"
msgstr "Отбелязване само на това"
-#: gitk:2717
msgid "External diff"
msgstr "Външна програма за разлики"
-#: gitk:2718
msgid "Blame parent commit"
msgstr "Анотиране на родителското подаване"
-#: gitk:2719
msgid "Copy path"
msgstr "Копиране на пътя"
-#: gitk:2726
msgid "Show origin of this line"
msgstr "Показване на произхода на този ред"
-#: gitk:2727
msgid "Run git gui blame on this line"
msgstr "Изпълнение на „git gui blame“ върху този ред"
-#: gitk:3081
msgid "About gitk"
msgstr "Относно gitk"
-#: gitk:3083
msgid ""
"\n"
"Gitk - a commit viewer for git\n"
@@ -386,324 +299,250 @@
"\n"
"Използвайте и разпространявайте при условията на ОПЛ на ГНУ"
-#: gitk:3091 gitk:3158 gitk:10090
msgid "Close"
msgstr "Затваряне"
-#: gitk:3112
msgid "Gitk key bindings"
msgstr "Клавишни комбинации"
-#: gitk:3115
msgid "Gitk key bindings:"
msgstr "Клавишни комбинации:"
-#: gitk:3117
#, tcl-format
msgid "<%s-Q>\t\tQuit"
msgstr "<%s-Q>\t\tСпиране на програмата"
-#: gitk:3118
#, tcl-format
msgid "<%s-W>\t\tClose window"
msgstr "<%s-W>\t\tЗатваряне на прозореца"
-#: gitk:3119
msgid "<Home>\t\tMove to first commit"
msgstr "<Home>\t\tКъм първото подаване"
-#: gitk:3120
msgid "<End>\t\tMove to last commit"
msgstr "<End>\t\tКъм последното подаване"
-#: gitk:3121
msgid "<Up>, p, k\tMove up one commit"
msgstr "<Up>, p, k\tЕдно подаване нагоре"
-#: gitk:3122
msgid "<Down>, n, j\tMove down one commit"
msgstr "<Down>, n, j\tЕдно подаване надолу"
-#: gitk:3123
msgid "<Left>, z, h\tGo back in history list"
msgstr "<Left>, z, h\tНазад в историята"
-#: gitk:3124
msgid "<Right>, x, l\tGo forward in history list"
msgstr "<Right>, x, l\tНапред в историята"
-#: gitk:3125
#, tcl-format
msgid "<%s-n>\tGo to n-th parent of current commit in history list"
msgstr "<%s-n>\tКъм n-тия родител на текущото подаване в историята"
-#: gitk:3126
msgid "<PageUp>\tMove up one page in commit list"
msgstr "<PageUp>\tСтраница нагоре в списъка с подаванията"
-#: gitk:3127
msgid "<PageDown>\tMove down one page in commit list"
msgstr "<PageDown>\tСтраница надолу в списъка с подаванията"
-#: gitk:3128
#, tcl-format
msgid "<%s-Home>\tScroll to top of commit list"
msgstr "<%s-Home>\tКъм началото на списъка с подаванията"
-#: gitk:3129
#, tcl-format
msgid "<%s-End>\tScroll to bottom of commit list"
msgstr "<%s-End>\tКъм края на списъка с подаванията"
-#: gitk:3130
#, tcl-format
msgid "<%s-Up>\tScroll commit list up one line"
msgstr "<%s-Up>\tРед нагоре в списъка с подавания"
-#: gitk:3131
#, tcl-format
msgid "<%s-Down>\tScroll commit list down one line"
msgstr "<%s-Down>\tРед надолу в списъка с подавания"
-#: gitk:3132
#, tcl-format
msgid "<%s-PageUp>\tScroll commit list up one page"
msgstr "<%s-PageUp>\tСтраница нагоре в списъка с подавания"
-#: gitk:3133
#, tcl-format
msgid "<%s-PageDown>\tScroll commit list down one page"
msgstr "<%s-PageDown>\tСтраница надолу в списъка с подавания"
-#: gitk:3134
msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
msgstr "<Shift-Up>\tТърсене назад (визуално нагоре, исторически — последващи)"
-#: gitk:3135
msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
msgstr ""
"<Shift-Down>\tТърсене напред (визуално надолу, исторически — предхождащи)"
-#: gitk:3136
msgid "<Delete>, b\tScroll diff view up one page"
msgstr "<Delete>, b\tСтраница нагоре в изгледа за разлики"
-#: gitk:3137
msgid "<Backspace>\tScroll diff view up one page"
msgstr "<Backspace>\tСтраница надолу в изгледа за разлики"
-#: gitk:3138
msgid "<Space>\t\tScroll diff view down one page"
msgstr "<Space>\t\tСтраница надолу в изгледа за разлики"
-#: gitk:3139
msgid "u\t\tScroll diff view up 18 lines"
msgstr "u\t\t18 реда нагоре в изгледа за разлики"
-#: gitk:3140
msgid "d\t\tScroll diff view down 18 lines"
msgstr "d\t\t18 реда надолу в изгледа за разлики"
-#: gitk:3141
#, tcl-format
msgid "<%s-F>\t\tFind"
msgstr "<%s-F>\t\tТърсене"
-#: gitk:3142
#, tcl-format
msgid "<%s-G>\t\tMove to next find hit"
msgstr "<%s-G>\t\tКъм следващата поява"
-#: gitk:3143
msgid "<Return>\tMove to next find hit"
msgstr "<Return>\tКъм следващата поява"
-#: gitk:3144
msgid "g\t\tGo to commit"
msgstr "g\t\tКъм последното подаване"
-#: gitk:3145
msgid "/\t\tFocus the search box"
msgstr "/\t\tФокус върху полето за търсене"
-#: gitk:3146
msgid "?\t\tMove to previous find hit"
msgstr "?\t\tКъм предишната поява"
-#: gitk:3147
msgid "f\t\tScroll diff view to next file"
msgstr "f\t\tСледващ файл в изгледа за разлики"
-#: gitk:3148
#, tcl-format
msgid "<%s-S>\t\tSearch for next hit in diff view"
msgstr "<%s-S>\t\tТърсене на следващата поява в изгледа за разлики"
-#: gitk:3149
#, tcl-format
msgid "<%s-R>\t\tSearch for previous hit in diff view"
msgstr "<%s-R>\t\tТърсене на предишната поява в изгледа за разлики"
-#: gitk:3150
#, tcl-format
msgid "<%s-KP+>\tIncrease font size"
msgstr "<%s-KP+>\tПо-голям размер на шрифта"
-#: gitk:3151
#, tcl-format
msgid "<%s-plus>\tIncrease font size"
msgstr "<%s-plus>\tПо-голям размер на шрифта"
-#: gitk:3152
#, tcl-format
msgid "<%s-KP->\tDecrease font size"
msgstr "<%s-KP->\tПо-малък размер на шрифта"
-#: gitk:3153
#, tcl-format
msgid "<%s-minus>\tDecrease font size"
msgstr "<%s-minus>\tПо-малък размер на шрифта"
-#: gitk:3154
msgid "<F5>\t\tUpdate"
msgstr "<F5>\t\tОбновяване"
-#: gitk:3621 gitk:3630
#, tcl-format
msgid "Error creating temporary directory %s:"
msgstr "Грешка при създаването на временната директория „%s“:"
-#: gitk:3643
#, tcl-format
msgid "Error getting \"%s\" from %s:"
msgstr "Грешка при получаването на „%s“ от %s:"
-#: gitk:3706
msgid "command failed:"
msgstr "неуспешно изпълнение на команда:"
-#: gitk:3855
msgid "No such commit"
msgstr "Такова подаване няма"
-#: gitk:3869
msgid "git gui blame: command failed:"
msgstr "„git gui blame“: неуспешно изпълнение на команда:"
-#: gitk:3900
#, tcl-format
msgid "Couldn't read merge head: %s"
msgstr "Върхът за сливане не може да се прочете: %s"
-#: gitk:3908
#, tcl-format
msgid "Error reading index: %s"
msgstr "Грешка при прочитане на индекса: %s"
-#: gitk:3933
#, tcl-format
msgid "Couldn't start git blame: %s"
msgstr "Командата „git blame“ не може да се стартира: %s"
-#: gitk:3936 gitk:6825
msgid "Searching"
msgstr "Търсене"
-#: gitk:3968
#, tcl-format
msgid "Error running git blame: %s"
msgstr "Грешка при изпълнението на „git blame“: %s"
-#: gitk:3996
#, tcl-format
msgid "That line comes from commit %s, which is not in this view"
msgstr "Този ред идва от подаването %s, което не е в изгледа"
-#: gitk:4010
msgid "External diff viewer failed:"
msgstr "Неуспешно изпълнение на външната програма за разлики:"
-#: gitk:4114
msgid "All files"
msgstr "Всички файлове"
-#: gitk:4138
msgid "View"
msgstr "Изглед"
-#: gitk:4141
msgid "Gitk view definition"
msgstr "Дефиниция на изглед в Gitk"
-#: gitk:4145
msgid "Remember this view"
msgstr "Запазване на този изглед"
-#: gitk:4146
msgid "References (space separated list):"
msgstr "Указатели (списък с разделител интервал):"
-#: gitk:4147
msgid "Branches & tags:"
msgstr "Клони и етикети:"
-#: gitk:4148
msgid "All refs"
msgstr "Всички указатели"
-#: gitk:4149
msgid "All (local) branches"
msgstr "Всички (локални) клони"
-#: gitk:4150
msgid "All tags"
msgstr "Всички етикети"
-#: gitk:4151
msgid "All remote-tracking branches"
msgstr "Всички следящи клони"
-#: gitk:4152
msgid "Commit Info (regular expressions):"
msgstr "Информация за подаване (рег. изр.):"
-#: gitk:4153
msgid "Author:"
msgstr "Автор:"
-#: gitk:4154
msgid "Committer:"
msgstr "Подал:"
-#: gitk:4155
msgid "Commit Message:"
msgstr "Съобщение при подаване:"
-#: gitk:4156
msgid "Matches all Commit Info criteria"
msgstr "Съвпадение по всички характеристики на подаването"
-#: gitk:4157
msgid "Matches no Commit Info criteria"
msgstr "Не съвпада по никоя от характеристиките на подаването"
-#: gitk:4158
msgid "Changes to Files:"
msgstr "Промени по файловете:"
-#: gitk:4159
msgid "Fixed String"
msgstr "Дословен низ"
-#: gitk:4160
msgid "Regular Expression"
msgstr "Регулярен израз"
-#: gitk:4161
msgid "Search string:"
msgstr "Низ за търсене:"
-#: gitk:4162
msgid ""
"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
"15:27:38\"):"
@@ -711,208 +550,159 @@
"Дата на подаване („2 weeks ago“ (преди 2 седмици), „2009-03-17 15:27:38“, "
"„March 17, 2009 15:27:38“):"
-#: gitk:4163
msgid "Since:"
msgstr "От:"
-#: gitk:4164
msgid "Until:"
msgstr "До:"
-#: gitk:4165
msgid "Limit and/or skip a number of revisions (positive integer):"
msgstr ""
"Ограничаване и/или прескачане на определен брой версии (неотрицателно цяло "
"число):"
-#: gitk:4166
msgid "Number to show:"
msgstr "Брой показани:"
-#: gitk:4167
msgid "Number to skip:"
msgstr "Брой прескочени:"
-#: gitk:4168
msgid "Miscellaneous options:"
msgstr "Разни:"
-#: gitk:4169
msgid "Strictly sort by date"
msgstr "Подреждане по дата"
-#: gitk:4170
msgid "Mark branch sides"
msgstr "Отбелязване на страните по клона"
-#: gitk:4171
msgid "Limit to first parent"
msgstr "Само първия родител"
-#: gitk:4172
msgid "Simple history"
msgstr "Опростена история"
-#: gitk:4173
msgid "Additional arguments to git log:"
msgstr "Допълнителни аргументи към „git log“:"
-#: gitk:4174
msgid "Enter files and directories to include, one per line:"
msgstr "Въведете файловете и директориите за включване, по елемент на ред"
-#: gitk:4175
msgid "Command to generate more commits to include:"
msgstr ""
"Команда за генерирането на допълнителни подавания, които да се включат:"
-#: gitk:4299
msgid "Gitk: edit view"
msgstr "Gitk: редактиране на изглед"
-#: gitk:4307
msgid "-- criteria for selecting revisions"
msgstr "— критерии за избор на версии"
-#: gitk:4312
msgid "View Name"
msgstr "Име на изглед"
-#: gitk:4387
msgid "Apply (F5)"
msgstr "Прилагане (F5)"
-#: gitk:4425
msgid "Error in commit selection arguments:"
msgstr "Грешка в аргументите за избор на подавания:"
-#: gitk:4480 gitk:4533 gitk:4995 gitk:5009 gitk:6279 gitk:12679 gitk:12680
msgid "None"
msgstr "Няма"
-#: gitk:5092 gitk:5097
msgid "Descendant"
msgstr "Наследник"
-#: gitk:5093
msgid "Not descendant"
msgstr "Не е наследник"
-#: gitk:5100 gitk:5105
msgid "Ancestor"
msgstr "Предшественик"
-#: gitk:5101
msgid "Not ancestor"
msgstr "Не е предшественик"
-#: gitk:5395
msgid "Local changes checked in to index but not committed"
msgstr "Локални промени добавени към индекса, но неподадени"
-#: gitk:5431
msgid "Local uncommitted changes, not checked in to index"
msgstr "Локални промени извън индекса"
-#: gitk:7179
msgid "Error starting web browser:"
msgstr "Грешка при стартирането на уеб браузър:"
-#: gitk:7240
msgid "and many more"
msgstr "и още много"
-#: gitk:7243
msgid "many"
msgstr "много"
-#: gitk:7438
msgid "Tags:"
msgstr "Етикети:"
-#: gitk:7455 gitk:7461 gitk:8940
msgid "Parent"
msgstr "Родител"
-#: gitk:7466
msgid "Child"
msgstr "Дете"
-#: gitk:7475
msgid "Branch"
msgstr "Клон"
-#: gitk:7478
msgid "Follows"
msgstr "Следва"
-#: gitk:7481
msgid "Precedes"
msgstr "Предшества"
-#: gitk:8076
#, tcl-format
msgid "Error getting diffs: %s"
msgstr "Грешка при получаването на разликите: %s"
-#: gitk:8765
msgid "Goto:"
msgstr "Към ред:"
-#: gitk:8786
#, tcl-format
msgid "Short commit ID %s is ambiguous"
msgstr "Съкратената контролна сума %s не е еднозначна"
-#: gitk:8793
#, tcl-format
msgid "Revision %s is not known"
msgstr "Непозната версия %s"
-#: gitk:8803
#, tcl-format
msgid "Commit ID %s is not known"
msgstr "Непозната контролна сума %s"
-#: gitk:8805
#, tcl-format
msgid "Revision %s is not in the current view"
msgstr "Версия %s не е в текущия изглед"
-#: gitk:8947 gitk:8962
msgid "Date"
msgstr "Дата"
-#: gitk:8950
msgid "Children"
msgstr "Деца"
-#: gitk:9013
#, tcl-format
msgid "Reset %s branch to here"
msgstr "Зануляване на клона „%s“ към текущото подаване"
-#: gitk:9015
msgid "Detached head: can't reset"
msgstr "Несвързан връх: невъзможно зануляване"
-#: gitk:9120 gitk:9126
msgid "Skipping merge commit "
msgstr "Пропускане на подаването на сливането"
-#: gitk:9135 gitk:9140
msgid "Error getting patch ID for "
msgstr "Грешка при получаването на идентификатора на "
-#: gitk:9136 gitk:9141
msgid " - stopping\n"
msgstr " — спиране\n"
-#: gitk:9146 gitk:9149 gitk:9157 gitk:9171 gitk:9180
msgid "Commit "
msgstr "Подаване"
-#: gitk:9150
msgid ""
" is the same patch as\n"
" "
@@ -920,7 +710,6 @@
" е същата кръпка като\n"
" "
-#: gitk:9158
msgid ""
" differs from\n"
" "
@@ -928,7 +717,6 @@
" се различава от\n"
" "
-#: gitk:9160
msgid ""
"Diff of commits:\n"
"\n"
@@ -936,147 +724,113 @@
"Разлика между подаванията:\n"
"\n"
-#: gitk:9172 gitk:9181
#, tcl-format
msgid " has %s children - stopping\n"
msgstr " има %s деца — спиране\n"
-#: gitk:9200
#, tcl-format
msgid "Error writing commit to file: %s"
msgstr "Грешка при запазването на подаването във файл: %s"
-#: gitk:9206
#, tcl-format
msgid "Error diffing commits: %s"
msgstr "Грешка при изчисляването на разликите между подаванията: %s"
-#: gitk:9252
msgid "Top"
msgstr "Най-горе"
-#: gitk:9253
msgid "From"
msgstr "От"
-#: gitk:9258
msgid "To"
msgstr "До"
-#: gitk:9282
msgid "Generate patch"
msgstr "Генериране на кръпка"
-#: gitk:9284
msgid "From:"
msgstr "От:"
-#: gitk:9293
msgid "To:"
msgstr "До:"
-#: gitk:9302
msgid "Reverse"
msgstr "Обръщане"
-#: gitk:9304 gitk:9514
msgid "Output file:"
msgstr "Запазване във файла:"
-#: gitk:9310
msgid "Generate"
msgstr "Генериране"
-#: gitk:9348
msgid "Error creating patch:"
msgstr "Грешка при създаването на кръпка:"
-#: gitk:9371 gitk:9502 gitk:9590
msgid "ID:"
msgstr "Идентификатор:"
-#: gitk:9380
msgid "Tag name:"
msgstr "Име на етикет:"
-#: gitk:9383
msgid "Tag message is optional"
msgstr "Съобщението за етикет е незадължително"
-#: gitk:9385
msgid "Tag message:"
msgstr "Съобщение за етикет:"
-#: gitk:9389 gitk:9560
msgid "Create"
msgstr "Създаване"
-#: gitk:9407
msgid "No tag name specified"
msgstr "Липсва име на етикет"
-#: gitk:9411
#, tcl-format
msgid "Tag \"%s\" already exists"
msgstr "Етикетът „%s“ вече съществува"
-#: gitk:9421
msgid "Error creating tag:"
msgstr "Грешка при създаването на етикет:"
-#: gitk:9511
msgid "Command:"
msgstr "Команда:"
-#: gitk:9519
msgid "Write"
msgstr "Запазване"
-#: gitk:9537
msgid "Error writing commit:"
msgstr "Грешка при запазването на подаването:"
-#: gitk:9559
msgid "Create branch"
msgstr "Създаване на клон"
-#: gitk:9575
#, tcl-format
msgid "Rename branch %s"
msgstr "Преименуване на клона „%s“"
-#: gitk:9576
msgid "Rename"
msgstr "Преименуване"
-#: gitk:9600
msgid "Name:"
msgstr "Име:"
-#: gitk:9624
msgid "Please specify a name for the new branch"
msgstr "Укажете име за новия клон"
-#: gitk:9629
#, tcl-format
msgid "Branch '%s' already exists. Overwrite?"
msgstr "Клонът „%s“ вече съществува. Да се презапише ли?"
-#: gitk:9673
msgid "Please specify a new name for the branch"
msgstr "Укажете ново име за клона"
-#: gitk:9736
#, tcl-format
msgid "Commit %s is already included in branch %s -- really re-apply it?"
msgstr ""
"Подаването „%s“ вече е включено в клона „%s“ — да се приложи ли отново?"
-#: gitk:9741
msgid "Cherry-picking"
msgstr "Отбиране"
-#: gitk:9750
#, tcl-format
msgid ""
"Cherry-pick failed because of local changes to file '%s'.\n"
@@ -1085,7 +839,6 @@
"Неуспешно отбиране, защото във файла „%s“ има локални промени.\n"
"Подайте, занулете или ги скатайте и пробвайте отново."
-#: gitk:9756
msgid ""
"Cherry-pick failed because of merge conflict.\n"
"Do you wish to run git citool to resolve it?"
@@ -1093,20 +846,16 @@
"Неуспешно отбиране поради конфликти при сливане.\n"
"Искате ли да ги коригирате чрез „git citool“?"
-#: gitk:9772 gitk:9830
msgid "No changes committed"
msgstr "Не са подадени промени"
-#: gitk:9799
#, tcl-format
msgid "Commit %s is not included in branch %s -- really revert it?"
msgstr "Подаването „%s“ не е включено в клона „%s“. Да се отменени ли?"
-#: gitk:9804
msgid "Reverting"
msgstr "Отмяна"
-#: gitk:9812
#, tcl-format
msgid ""
"Revert failed because of local changes to the following files:%s Please "
@@ -1115,7 +864,6 @@
"Неуспешна отмяна, защото във файла „%s“ има локални промени.\n"
"Подайте, занулете или ги скатайте и пробвайте отново."
-#: gitk:9816
msgid ""
"Revert failed because of merge conflict.\n"
" Do you wish to run git citool to resolve it?"
@@ -1123,28 +871,22 @@
"Неуспешно отмяна поради конфликти при сливане.\n"
"Искате ли да ги коригирате чрез „git citool“?"
-#: gitk:9859
msgid "Confirm reset"
msgstr "Потвърждаване на зануляването"
-#: gitk:9861
#, tcl-format
msgid "Reset branch %s to %s?"
msgstr "Да се занули ли клонът „%s“ към „%s“?"
-#: gitk:9863
msgid "Reset type:"
msgstr "Вид зануляване:"
-#: gitk:9866
msgid "Soft: Leave working tree and index untouched"
msgstr "Слабо: работното дърво и индекса остават същите"
-#: gitk:9869
msgid "Mixed: Leave working tree untouched, reset index"
msgstr "Смесено: работното дърво остава същото, индексът се занулява"
-#: gitk:9872
msgid ""
"Hard: Reset working tree and index\n"
"(discard ALL local changes)"
@@ -1152,24 +894,19 @@
"Силно: зануляване и на работното дърво, и на индекса\n"
"(ВСИЧКИ локални промени ще се загубят безвъзвратно)"
-#: gitk:9889
msgid "Resetting"
msgstr "Зануляване"
-#: gitk:9962
#, tcl-format
msgid "A local branch named %s exists already"
msgstr "Вече съществува локален клон „%s“."
-#: gitk:9970
msgid "Checking out"
msgstr "Изтегляне"
-#: gitk:10029
msgid "Cannot delete the currently checked-out branch"
msgstr "Текущо изтегленият клон не може да се изтрие"
-#: gitk:10035
#, tcl-format
msgid ""
"The commits on branch %s aren't on any other branch.\n"
@@ -1178,16 +915,16 @@
"Подаванията на клона „%s“ не са на никой друг клон.\n"
"Наистина ли искате да изтриете клона „%s“?"
-#: gitk:10066
#, tcl-format
msgid "Tags and heads: %s"
msgstr "Етикети и върхове: %s"
-#: gitk:10083
msgid "Filter"
msgstr "Филтриране"
-#: gitk:10390
+msgid "Sort refs by type"
+msgstr "Подредба на указателите по вид"
+
msgid ""
"Error reading commit topology information; branch and preceding/following "
"tag information will be incomplete."
@@ -1195,253 +932,167 @@
"Грешка при прочитането на топологията на подаванията. Информацията за клона "
"и предшестващите/следващите етикети ще е непълна."
-#: gitk:11367
msgid "Tag"
msgstr "Етикет"
-#: gitk:11371
msgid "Id"
msgstr "Идентификатор"
-#: gitk:11454
-msgid "Gitk font chooser"
-msgstr "Избор на шрифт за Gitk"
-
-#: gitk:11471
-msgid "B"
-msgstr "Ч"
-
-#: gitk:11474
-msgid "I"
-msgstr "К"
-
-#: gitk:11593
msgid "Commit list display options"
msgstr "Настройки на списъка с подавания"
-#: gitk:11596
msgid "Maximum graph width (lines)"
msgstr "Максимална широчина на графа (в редове)"
-#: gitk:11600
#, no-tcl-format
msgid "Maximum graph width (% of pane)"
msgstr "Максимална широчина на графа (% от панела)"
-#: gitk:11603
msgid "Show local changes"
msgstr "Показване на локалните промени"
-#: gitk:11606
msgid "Hide remote refs"
msgstr "Скриване на отдалечените указатели"
-#: gitk:11610
msgid "Copy commit ID to clipboard"
msgstr "Копиране на контролната сума към буфера за обмен"
-#: gitk:11614
msgid "Copy commit ID to X11 selection"
msgstr "Копиране на контролната сума в селекцията на X11"
-#: gitk:11619
msgid "Length of commit ID to copy"
msgstr "Дължина на контролната сума, която се копира"
-#: gitk:11622
+msgid "Wheel scrolling multiplier"
+msgstr "Множител за колелцето на мишката"
+
msgid "Diff display options"
msgstr "Настройки на показването на разликите"
-#: gitk:11624
msgid "Tab spacing"
msgstr "Широчина на табулатора"
-#: gitk:11628
msgid "Wrap comment text"
msgstr "Пренасяне на думите в коментарите"
-#: gitk:11633
msgid "Wrap other text"
msgstr "Пренасяне на другия текст"
-#: gitk:11638
msgid "Display nearby tags/heads"
msgstr "Извеждане на близките етикети и върхове"
-#: gitk:11641
msgid "Maximum # tags/heads to show"
msgstr "Максимален брой етикети/върхове за показване"
-#: gitk:11644
msgid "Limit diffs to listed paths"
msgstr "Разлика само в избраните пътища"
-#: gitk:11647
msgid "Support per-file encodings"
msgstr "Поддръжка на различни кодирания за всеки файл"
-#: gitk:11653 gitk:11820
msgid "External diff tool"
msgstr "Външен инструмент за разлики"
-#: gitk:11654
msgid "Choose..."
msgstr "Избор…"
-#: gitk:11661
msgid "Web browser"
msgstr "Уеб браузър"
-#: gitk:11666
-msgid "General options"
-msgstr "Общи настройки"
-
-#: gitk:11669
-msgid "Use themed widgets"
-msgstr "Използване на тема за графичните обекти"
-
-#: gitk:11671
-msgid "(change requires restart)"
-msgstr "(промяната изисква рестартиране на Gitk)"
-
-#: gitk:11673
-msgid "(currently unavailable)"
-msgstr "(в момента недостъпно)"
-
-#: gitk:11685
msgid "Colors: press to choose"
msgstr "Цветове: избира се с натискане"
-#: gitk:11688
msgid "Interface"
msgstr "Интерфейс"
-#: gitk:11689
msgid "interface"
msgstr "интерфейс"
-#: gitk:11692
msgid "Background"
msgstr "Фон"
-#: gitk:11693 gitk:11735
msgid "background"
msgstr "фон"
-#: gitk:11696
msgid "Foreground"
msgstr "Знаци"
-#: gitk:11697
msgid "foreground"
msgstr "знаци"
-#: gitk:11700
msgid "Diff: old lines"
msgstr "Разлика: стари редове"
-#: gitk:11701
msgid "diff old lines"
msgstr "разлика, стари редове"
-#: gitk:11705
msgid "Diff: old lines bg"
msgstr "Разлика: фон на стари редове"
-#: gitk:11707
msgid "diff old lines bg"
msgstr "разлика, фон на стари редове"
-#: gitk:11711
msgid "Diff: new lines"
msgstr "Разлика: нови редове"
-#: gitk:11712
msgid "diff new lines"
msgstr "разлика, нови редове"
-#: gitk:11716
msgid "Diff: new lines bg"
msgstr "Разлика: фон на нови редове"
-#: gitk:11718
msgid "diff new lines bg"
msgstr "разлика, фон на нови редове"
-#: gitk:11722
msgid "Diff: hunk header"
msgstr "Разлика: начало на парче"
-#: gitk:11724
msgid "diff hunk header"
msgstr "разлика, начало на парче"
-#: gitk:11728
msgid "Marked line bg"
msgstr "Фон на отбелязан ред"
-#: gitk:11730
msgid "marked line background"
msgstr "фон на отбелязан ред"
-#: gitk:11734
msgid "Select bg"
msgstr "Избор на фон"
-#: gitk:11743
msgid "Fonts: press to choose"
msgstr "Шрифтове: избира се с натискане"
-#: gitk:11745
msgid "Main font"
msgstr "Основен шрифт"
-#: gitk:11746
msgid "Diff display font"
msgstr "Шрифт за разликите"
-#: gitk:11747
msgid "User interface font"
msgstr "Шрифт на интерфейса"
-#: gitk:11769
msgid "Gitk preferences"
msgstr "Настройки на Gitk"
-#: gitk:11778
msgid "General"
msgstr "Общи"
-#: gitk:11779
msgid "Colors"
msgstr "Цветове"
-#: gitk:11780
msgid "Fonts"
msgstr "Шрифтове"
-#: gitk:11830
#, tcl-format
msgid "Gitk: choose color for %s"
msgstr "Gitk: избор на цвят на „%s“"
-#: gitk:12350
-msgid ""
-"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
-" Gitk requires at least Tcl/Tk 8.4."
-msgstr ""
-"Тази версия на Tcl/Tk не се поддържа от Gitk.\n"
-" Необходима ви е поне Tcl/Tk 8.4."
-
-#: gitk:12571
msgid "Cannot find a git repository here."
msgstr "Тук липсва хранилище на Git."
-#: gitk:12618
#, tcl-format
msgid "Ambiguous argument '%s': both revision and filename"
msgstr "Нееднозначен аргумент „%s“: има и такава версия, и такъв файл"
-#: gitk:12630
msgid "Bad arguments to gitk:"
msgstr "Неправилни аргументи на gitk:"
diff --git a/gpg-interface.c b/gpg-interface.c
index 0896458..06e7fb5 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -25,7 +25,7 @@ static void gpg_interface_lazy_init(void)
if (done)
return;
done = 1;
- git_config(git_gpg_config, NULL);
+ repo_config(the_repository, git_gpg_config, NULL);
}
static char *configured_signing_key;
@@ -144,6 +144,18 @@ static struct gpg_format *get_format_by_sig(const char *sig)
return NULL;
}
+const char *get_signature_format(const char *buf)
+{
+ struct gpg_format *format = get_format_by_sig(buf);
+ return format ? format->name : "unknown";
+}
+
+int valid_signature_format(const char *format)
+{
+ return (!!get_format_by_name(format) ||
+ !strcmp(format, "unknown"));
+}
+
void signature_check_clear(struct signature_check *sigc)
{
FREE_AND_NULL(sigc->payload);
@@ -783,7 +795,7 @@ static int git_gpg_config(const char *var, const char *value,
if (fmtname) {
fmt = get_format_by_name(fmtname);
- return git_config_string((char **) &fmt->program, var, value);
+ return git_config_pathname((char **) &fmt->program, var, value);
}
return 0;
@@ -1048,7 +1060,7 @@ static int sign_buffer_ssh(struct strbuf *buffer, struct strbuf *signature,
key_file->filename.buf);
goto out;
}
- ssh_signing_key_file = strbuf_detach(&key_file->filename, NULL);
+ ssh_signing_key_file = xstrdup(key_file->filename.buf);
} else {
/* We assume a file */
ssh_signing_key_file = interpolate_path(signing_key, 1);
diff --git a/gpg-interface.h b/gpg-interface.h
index e09f12e..60ddf8b 100644
--- a/gpg-interface.h
+++ b/gpg-interface.h
@@ -48,6 +48,18 @@ struct signature_check {
void signature_check_clear(struct signature_check *sigc);
/*
+ * Return the format of the signature (like "openpgp", "x509", "ssh"
+ * or "unknown").
+ */
+const char *get_signature_format(const char *buf);
+
+/*
+ * Is the signature format valid (like "openpgp", "x509", "ssh" or
+ * "unknown")
+ */
+int valid_signature_format(const char *format);
+
+/*
* Look at a GPG signed tag object. If such a signature exists, store it in
* signature and the signed content in payload. Return 1 if a signature was
* found, and 0 otherwise.
diff --git a/grep.c b/grep.c
index f8d5351..932647e 100644
--- a/grep.c
+++ b/grep.c
@@ -5,7 +5,7 @@
#include "gettext.h"
#include "grep.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "pretty.h"
#include "userdiff.h"
#include "xdiff-interface.h"
@@ -1931,8 +1931,8 @@ static int grep_source_load_oid(struct grep_source *gs)
{
enum object_type type;
- gs->buf = repo_read_object_file(gs->repo, gs->identifier, &type,
- &gs->size);
+ gs->buf = odb_read_object(gs->repo->objects, gs->identifier,
+ &type, &gs->size);
if (!gs->buf)
return error(_("'%s': unable to read %s"),
gs->name,
diff --git a/hash.h b/hash.h
index d6422dd..fae966b 100644
--- a/hash.h
+++ b/hash.h
@@ -175,6 +175,16 @@ static inline void git_SHA256_Clone(git_SHA256_CTX *dst, const git_SHA256_CTX *s
/* Number of algorithms supported (including unknown). */
#define GIT_HASH_NALGOS (GIT_HASH_SHA256 + 1)
+/* Default hash algorithm if unspecified. */
+#ifdef WITH_BREAKING_CHANGES
+# define GIT_HASH_DEFAULT GIT_HASH_SHA256
+#else
+# define GIT_HASH_DEFAULT GIT_HASH_SHA1
+#endif
+
+/* Legacy hash algorithm. Implied for older data formats which don't specify. */
+#define GIT_HASH_SHA1_LEGACY GIT_HASH_SHA1
+
/* "sha1", big-endian */
#define GIT_SHA1_FORMAT_ID 0x73686131
@@ -216,6 +226,7 @@ struct object_id {
#define GET_OID_REQUIRE_PATH 010000
#define GET_OID_HASH_ANY 020000
#define GET_OID_SKIP_AMBIGUITY_CHECK 040000
+#define GET_OID_GENTLY 0100000
#define GET_OID_DISAMBIGUATORS \
(GET_OID_COMMIT | GET_OID_COMMITTISH | \
diff --git a/help.c b/help.c
index 21b7787..bb20498 100644
--- a/help.c
+++ b/help.c
@@ -332,7 +332,7 @@ static int get_colopts(const char *var, const char *value,
void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
{
unsigned int colopts = 0;
- git_config(get_colopts, &colopts);
+ repo_config(the_repository, get_colopts, &colopts);
if (main_cmds->cnt) {
const char *exec_path = git_exec_path();
@@ -417,7 +417,7 @@ void list_cmds_by_config(struct string_list *list)
{
const char *cmd_list;
- if (git_config_get_string_tmp("completion.commands", &cmd_list))
+ if (repo_config_get_string_tmp(the_repository, "completion.commands", &cmd_list))
return;
string_list_sort(list);
@@ -502,7 +502,7 @@ static void list_all_cmds_help_aliases(int longest)
struct cmdname_help *aliases;
int i;
- git_config(get_alias, &alias_list);
+ repo_config(the_repository, get_alias, &alias_list);
string_list_sort(&alias_list);
for (i = 0; i < alias_list.nr; i++) {
@@ -810,6 +810,9 @@ void get_version_info(struct strbuf *buf, int show_build_options)
SHA1_UNSAFE_BACKEND);
#endif
strbuf_addf(buf, "SHA-256: %s\n", SHA256_BACKEND);
+ strbuf_addf(buf, "default-ref-format: %s\n",
+ ref_storage_format_to_name(REF_STORAGE_FORMAT_DEFAULT));
+ strbuf_addf(buf, "default-hash: %s\n", hash_algos[GIT_HASH_DEFAULT].name);
}
}
diff --git a/http-backend.c b/http-backend.c
index 0c575aa..d5dfe76 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -18,7 +18,7 @@
#include "url.h"
#include "strvec.h"
#include "packfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "protocol.h"
#include "date.h"
#include "write-or-die.h"
@@ -246,13 +246,13 @@ static void http_config(void)
int i, value = 0;
struct strbuf var = STRBUF_INIT;
- git_config_get_bool("http.getanyfile", &getanyfile);
- git_config_get_ulong("http.maxrequestbuffer", &max_request_buffer);
+ repo_config_get_bool(the_repository, "http.getanyfile", &getanyfile);
+ repo_config_get_ulong(the_repository, "http.maxrequestbuffer", &max_request_buffer);
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))
+ if (!repo_config_get_bool(the_repository, var.buf, &value))
svc->enabled = value;
strbuf_reset(&var);
}
diff --git a/http-fetch.c b/http-fetch.c
index 02ab805..1922e23 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -2,6 +2,7 @@
#include "git-compat-util.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "http.h"
@@ -150,7 +151,7 @@ int cmd_main(int argc, const char **argv)
trace2_cmd_name("http-fetch");
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (packfile) {
if (!index_pack_args.nr)
diff --git a/http-push.c b/http-push.c
index f9e67ca..91a5465 100644
--- a/http-push.c
+++ b/http-push.c
@@ -20,7 +20,7 @@
#include "url.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit-reach.h"
#ifdef EXPAT_NEEDS_XMLPARSE_H
@@ -195,7 +195,7 @@ static char *xml_entities(const char *s)
static void curl_setup_http_get(CURL *curl, const char *url,
const char *custom_req)
{
- curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
+ curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite_null);
@@ -205,7 +205,7 @@ static void curl_setup_http(CURL *curl, const char *url,
const char *custom_req, struct buffer *buffer,
curl_write_callback write_fn)
{
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
@@ -213,9 +213,9 @@ static void curl_setup_http(CURL *curl, const char *url,
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seek_buffer);
curl_easy_setopt(curl, CURLOPT_SEEKDATA, buffer);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn);
- curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req);
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
}
static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum dav_header_flag options)
@@ -369,8 +369,8 @@ static void start_put(struct transfer_request *request)
ssize_t size;
git_zstream stream;
- unpacked = repo_read_object_file(the_repository, &request->obj->oid,
- &type, &len);
+ unpacked = odb_read_object(the_repository->objects, &request->obj->oid,
+ &type, &len);
hdrlen = format_object_header(hdr, sizeof(hdr), type, len);
/* Set it up */
@@ -1447,8 +1447,8 @@ static void one_remote_ref(const char *refname)
* may be required for updating server info later.
*/
if (repo->can_update_info_refs &&
- !has_object(the_repository, &ref->old_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ !odb_has_object(the_repository->objects, &ref->old_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
obj = lookup_unknown_object(the_repository, &ref->old_oid);
fprintf(stderr, " fetch %s for %s\n",
oid_to_hex(&ref->old_oid), refname);
@@ -1653,14 +1653,16 @@ static int delete_remote_branch(const char *pattern, int force)
return error("Remote HEAD symrefs too deep");
if (is_null_oid(&head_oid))
return error("Unable to resolve remote HEAD");
- if (!has_object(the_repository, &head_oid, HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (!odb_has_object(the_repository->objects, &head_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return error("Remote HEAD resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", oid_to_hex(&head_oid));
/* Remote branch must resolve to a known object */
if (is_null_oid(&remote_ref->old_oid))
return error("Unable to resolve remote branch %s",
remote_ref->name);
- if (!has_object(the_repository, &remote_ref->old_oid, HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (!odb_has_object(the_repository->objects, &remote_ref->old_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return error("Remote branch %s resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", remote_ref->name, oid_to_hex(&remote_ref->old_oid));
/* Remote branch must be an ancestor of remote HEAD */
@@ -1881,8 +1883,8 @@ int cmd_main(int argc, const char **argv)
if (!force_all &&
!is_null_oid(&ref->old_oid) &&
!ref->force) {
- if (!has_object(the_repository, &ref->old_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) ||
+ if (!odb_has_object(the_repository->objects, &ref->old_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) ||
!ref_newer(&ref->peer_ref->new_oid,
&ref->old_oid)) {
/*
diff --git a/http-walker.c b/http-walker.c
index 463f7b1..0f7ae46 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -10,7 +10,7 @@
#include "transport.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
struct alt_base {
char *base;
@@ -138,8 +138,8 @@ static int fill_active_slot(void *data UNUSED)
list_for_each_safe(pos, tmp, head) {
obj_req = list_entry(pos, struct object_request, node);
if (obj_req->state == WAITING) {
- if (has_object(the_repository, &obj_req->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, &obj_req->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
obj_req->state = COMPLETE;
else {
start_object_request(obj_req);
@@ -497,8 +497,8 @@ static int fetch_object(struct walker *walker, const struct object_id *oid)
if (!obj_req)
return error("Couldn't find request for %s in the queue", hex);
- if (has_object(the_repository, &obj_req->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ if (odb_has_object(the_repository->objects, &obj_req->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
if (obj_req->req)
abort_http_object_request(&obj_req->req);
abort_object_request(obj_req);
@@ -543,7 +543,7 @@ static int fetch_object(struct walker *walker, const struct object_id *oid)
ret = error("File %s has bad hash", hex);
} else if (req->rename < 0) {
struct strbuf buf = STRBUF_INIT;
- odb_loose_path(the_repository->objects->odb, &buf, &req->oid);
+ odb_loose_path(the_repository->objects->sources, &buf, &req->oid);
ret = error("unable to write sha1 filename %s", buf.buf);
strbuf_release(&buf);
}
diff --git a/http.c b/http.c
index 3c029cf..98853d6 100644
--- a/http.c
+++ b/http.c
@@ -3,6 +3,7 @@
#include "git-compat-util.h"
#include "git-curl-compat.h"
+#include "environment.h"
#include "hex.h"
#include "http.h"
#include "config.h"
@@ -19,7 +20,7 @@
#include "packfile.h"
#include "string-list.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "tempfile.h"
static struct trace_key trace_curl = TRACE_KEY_INIT(CURL);
@@ -1019,13 +1020,13 @@ static CURL *get_curl_handle(void)
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);
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0L);
} else {
/* Verify authenticity of the peer's certificate */
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1);
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1L);
/* The name in the cert must match whom we tried to connect */
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2L);
}
if (curl_http_version) {
@@ -1057,7 +1058,7 @@ static CURL *get_curl_handle(void)
if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) &&
!http_schannel_check_revoke) {
- curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE);
+ curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_NO_REVOKE);
}
if (http_proactive_auth != PROACTIVE_AUTH_NONE)
@@ -1117,8 +1118,8 @@ static CURL *get_curl_handle(void)
curl_low_speed_time);
}
- curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20);
- curl_easy_setopt(result, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
+ curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20L);
+ curl_easy_setopt(result, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL);
#ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR
{
@@ -1151,7 +1152,7 @@ static CURL *get_curl_handle(void)
user_agent ? user_agent : git_user_agent());
if (curl_ftp_no_epsv)
- curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
+ curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0L);
if (curl_ssl_try)
curl_easy_setopt(result, CURLOPT_USE_SSL, CURLUSESSL_TRY);
@@ -1193,18 +1194,18 @@ static CURL *get_curl_handle(void)
if (starts_with(curl_http_proxy, "socks5h"))
curl_easy_setopt(result,
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5_HOSTNAME);
else if (starts_with(curl_http_proxy, "socks5"))
curl_easy_setopt(result,
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5);
else if (starts_with(curl_http_proxy, "socks4a"))
curl_easy_setopt(result,
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4A);
else if (starts_with(curl_http_proxy, "socks"))
curl_easy_setopt(result,
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4);
else if (starts_with(curl_http_proxy, "https")) {
- curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
+ curl_easy_setopt(result, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTPS);
if (http_proxy_ssl_cert)
curl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);
@@ -1254,7 +1255,7 @@ static CURL *get_curl_handle(void)
}
init_curl_proxy_auth(result);
- curl_easy_setopt(result, CURLOPT_TCP_KEEPALIVE, 1);
+ curl_easy_setopt(result, CURLOPT_TCP_KEEPALIVE, 1L);
if (curl_tcp_keepidle > -1)
curl_easy_setopt(result, CURLOPT_TCP_KEEPIDLE,
@@ -1315,7 +1316,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
http_is_verbose = 0;
normalized_url = url_normalize(url, &config.url);
- git_config(urlmatch_config_entry, &config);
+ repo_config(the_repository, urlmatch_config_entry, &config);
free(normalized_url);
string_list_clear(&config.vars, 1);
@@ -1540,9 +1541,9 @@ struct active_request_slot *get_active_slot(void)
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, NULL);
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, NULL);
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, -1L);
- curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0L);
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(slot->curl, CURLOPT_RANGE, NULL);
/*
@@ -1551,9 +1552,9 @@ struct active_request_slot *get_active_slot(void)
* HTTP_FOLLOW_* cases themselves.
*/
if (http_follow_config == HTTP_FOLLOW_ALWAYS)
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
else
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0L);
curl_easy_setopt(slot->curl, CURLOPT_IPRESOLVE, git_curl_ipresolve);
curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods);
@@ -2120,12 +2121,12 @@ static int http_request(const char *url,
int ret;
slot = get_active_slot();
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
if (!result) {
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1L);
} else {
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, result);
if (target == HTTP_REQUEST_FILE) {
@@ -2151,7 +2152,7 @@ static int http_request(const char *url,
strbuf_addstr(&buf, " no-cache");
if (options && options->initial_request &&
http_follow_config == HTTP_FOLLOW_INITIAL)
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
headers = curl_slist_append(headers, buf.buf);
@@ -2170,7 +2171,7 @@ static int http_request(const char *url,
curl_easy_setopt(slot->curl, CURLOPT_URL, url);
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L);
ret = run_one_slot(slot, &results);
@@ -2331,7 +2332,7 @@ int http_get_file(const char *url, const char *filename,
ret = http_request_reauth(url, result, HTTP_REQUEST_FILE, options);
fclose(result);
- if (ret == HTTP_OK && finalize_object_file(tmpfile.buf, filename))
+ if (ret == HTTP_OK && finalize_object_file(the_repository, tmpfile.buf, filename))
ret = HTTP_ERROR;
cleanup:
strbuf_release(&tmpfile);
@@ -2662,7 +2663,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
oidcpy(&freq->oid, oid);
freq->localfile = -1;
- odb_loose_path(the_repository->objects->odb, &filename, oid);
+ odb_loose_path(the_repository->objects->sources, &filename, oid);
strbuf_addf(&freq->tmpfile, "%s.temp", filename.buf);
strbuf_addf(&prevfile, "%s.prev", filename.buf);
@@ -2750,7 +2751,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
freq->headers = object_request_headers();
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEDATA, freq);
- curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0L);
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEFUNCTION, fwrite_sha1_file);
curl_easy_setopt(freq->slot->curl, CURLOPT_ERRORBUFFER, freq->errorstr);
curl_easy_setopt(freq->slot->curl, CURLOPT_URL, freq->url);
@@ -2814,8 +2815,8 @@ int finish_http_object_request(struct http_object_request *freq)
unlink_or_warn(freq->tmpfile.buf);
return -1;
}
- odb_loose_path(the_repository->objects->odb, &filename, &freq->oid);
- freq->rename = finalize_object_file(freq->tmpfile.buf, filename.buf);
+ odb_loose_path(the_repository->objects->sources, &filename, &freq->oid);
+ freq->rename = finalize_object_file(the_repository, freq->tmpfile.buf, filename.buf);
strbuf_release(&filename);
return freq->rename;
diff --git a/ident.c b/ident.c
index 967895d..281e830 100644
--- a/ident.c
+++ b/ident.c
@@ -412,6 +412,10 @@ void apply_mailmap_to_header(struct strbuf *buf, const char **header,
found_header = 1;
buf_offset += endp - line;
buf_offset += rewrite_ident_line(person, endp - person, buf, mailmap);
+ /* Recompute endp after potential buffer reallocation */
+ endp = buf->buf + buf_offset;
+ if (*endp == '\n')
+ buf_offset++;
break;
}
diff --git a/imap-send.c b/imap-send.c
index 27dc033..254ec83 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -25,8 +25,10 @@
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
+#include "advice.h"
#include "config.h"
#include "credential.h"
+#include "environment.h"
#include "gettext.h"
#include "run-command.h"
#include "parse-options.h"
@@ -45,13 +47,21 @@
#endif
static int verbosity;
+static int list_folders;
static int use_curl = USE_CURL_DEFAULT;
+static char *opt_folder;
-static const char * const imap_send_usage[] = { "git imap-send [-v] [-q] [--[no-]curl] < <mbox>", NULL };
+static char const * const imap_send_usage[] = {
+ N_("git imap-send [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>] < <mbox>"),
+ "git imap-send --list",
+ NULL
+};
static struct option imap_send_options[] = {
OPT__VERBOSITY(&verbosity),
OPT_BOOL(0, "curl", &use_curl, "use libcurl to communicate with the IMAP server"),
+ OPT_STRING('f', "folder", &opt_folder, "folder", "specify the IMAP folder"),
+ OPT_BOOL(0, "list", &list_folders, "list all folders on the IMAP server"),
OPT_END()
};
@@ -139,7 +149,10 @@ enum CAPABILITY {
LITERALPLUS,
NAMESPACE,
STARTTLS,
- AUTH_CRAM_MD5
+ AUTH_PLAIN,
+ AUTH_CRAM_MD5,
+ AUTH_OAUTHBEARER,
+ AUTH_XOAUTH2,
};
static const char *cap_list[] = {
@@ -148,7 +161,10 @@ static const char *cap_list[] = {
"LITERAL+",
"NAMESPACE",
"STARTTLS",
+ "AUTH=PLAIN",
"AUTH=CRAM-MD5",
+ "AUTH=OAUTHBEARER",
+ "AUTH=XOAUTH2",
};
#define RESP_OK 0
@@ -197,7 +213,7 @@ static int ssl_socket_connect(struct imap_socket *sock UNUSED,
const struct imap_server_conf *cfg UNUSED,
int use_tls_only UNUSED)
{
- fprintf(stderr, "SSL requested but SSL support not compiled in\n");
+ fprintf(stderr, "SSL requested, but SSL support is not compiled in\n");
return -1;
}
@@ -421,7 +437,7 @@ static int buffer_gets(struct imap_buffer *b, char **s)
if (b->buf[b->offset + 1] == '\n') {
b->buf[b->offset] = 0; /* terminate the string */
b->offset += 2; /* next line */
- if (0 < verbosity)
+ if ((0 < verbosity) || (list_folders && strstr(*s, "* LIST")))
puts(*s);
return 0;
}
@@ -847,6 +863,38 @@ static char hexchar(unsigned int b)
}
#define ENCODED_SIZE(n) (4 * DIV_ROUND_UP((n), 3))
+static char *plain_base64(const char *user, const char *pass)
+{
+ struct strbuf raw = STRBUF_INIT;
+ int b64_len;
+ char *b64;
+
+ /*
+ * Compose the PLAIN string
+ *
+ * The username and password are combined to one string and base64 encoded.
+ * "\0user\0pass"
+ *
+ * The method has been described in RFC4616.
+ *
+ * https://datatracker.ietf.org/doc/html/rfc4616
+ */
+ strbuf_addch(&raw, '\0');
+ strbuf_addstr(&raw, user);
+ strbuf_addch(&raw, '\0');
+ strbuf_addstr(&raw, pass);
+
+ b64 = xmallocz(ENCODED_SIZE(raw.len));
+ b64_len = EVP_EncodeBlock((unsigned char *)b64, (unsigned char *)raw.buf, raw.len);
+ strbuf_release(&raw);
+
+ if (b64_len < 0) {
+ free(b64);
+ return NULL;
+ }
+ return b64;
+}
+
static char *cram(const char *challenge_64, const char *user, const char *pass)
{
int i, resp_len, encoded_len, decoded_len;
@@ -885,17 +933,83 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
return (char *)response_64;
}
-#else
-
-static char *cram(const char *challenge_64 UNUSED,
- const char *user UNUSED,
- const char *pass UNUSED)
+static char *oauthbearer_base64(const char *user, const char *access_token)
{
- die("If you want to use CRAM-MD5 authenticate method, "
- "you have to build git-imap-send with OpenSSL library.");
+ int b64_len;
+ char *raw, *b64;
+
+ /*
+ * Compose the OAUTHBEARER string
+ *
+ * "n,a=" {User} ",^Ahost=" {Host} "^Aport=" {Port} "^Aauth=Bearer " {Access Token} "^A^A
+ *
+ * The first part `n,a=" {User} ",` is the gs2 header described in RFC5801.
+ * * gs2-cb-flag `n` -> client does not support CB
+ * * gs2-authzid `a=" {User} "`
+ *
+ * The second part are key value pairs containing host, port and auth as
+ * described in RFC7628.
+ *
+ * https://datatracker.ietf.org/doc/html/rfc5801
+ * https://datatracker.ietf.org/doc/html/rfc7628
+ */
+ raw = xstrfmt("n,a=%s,\001auth=Bearer %s\001\001", user, access_token);
+
+ /* Base64 encode */
+ b64 = xmallocz(ENCODED_SIZE(strlen(raw)));
+ b64_len = EVP_EncodeBlock((unsigned char *)b64, (unsigned char *)raw, strlen(raw));
+ free(raw);
+
+ if (b64_len < 0) {
+ free(b64);
+ return NULL;
+ }
+ return b64;
}
-#endif
+static char *xoauth2_base64(const char *user, const char *access_token)
+{
+ int b64_len;
+ char *raw, *b64;
+
+ /*
+ * Compose the XOAUTH2 string
+ * "user=" {User} "^Aauth=Bearer " {Access Token} "^A^A"
+ * https://developers.google.com/workspace/gmail/imap/xoauth2-protocol#initial_client_response
+ */
+ raw = xstrfmt("user=%s\001auth=Bearer %s\001\001", user, access_token);
+
+ /* Base64 encode */
+ b64 = xmallocz(ENCODED_SIZE(strlen(raw)));
+ b64_len = EVP_EncodeBlock((unsigned char *)b64, (unsigned char *)raw, strlen(raw));
+ free(raw);
+
+ if (b64_len < 0) {
+ free(b64);
+ return NULL;
+ }
+ return b64;
+}
+
+static int auth_plain(struct imap_store *ctx, const char *prompt UNUSED)
+{
+ int ret;
+ char *b64;
+
+ b64 = plain_base64(ctx->cfg->user, ctx->cfg->pass);
+ if (!b64)
+ return error("PLAIN: base64 encoding failed");
+
+ /* Send the base64-encoded response */
+ ret = socket_write(&ctx->imap->buf.sock, b64, strlen(b64));
+ if (ret != (int)strlen(b64)) {
+ free(b64);
+ return error("IMAP error: sending PLAIN response failed");
+ }
+
+ free(b64);
+ return 0;
+}
static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
{
@@ -905,21 +1019,72 @@ static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
response = cram(prompt, ctx->cfg->user, ctx->cfg->pass);
ret = socket_write(&ctx->imap->buf.sock, response, strlen(response));
- if (ret != strlen(response))
- return error("IMAP error: sending response failed");
+ if (ret != strlen(response)) {
+ free(response);
+ return error("IMAP error: sending CRAM-MD5 response failed");
+ }
free(response);
return 0;
}
+static int auth_oauthbearer(struct imap_store *ctx, const char *prompt UNUSED)
+{
+ int ret;
+ char *b64;
+
+ b64 = oauthbearer_base64(ctx->cfg->user, ctx->cfg->pass);
+ if (!b64)
+ return error("OAUTHBEARER: base64 encoding failed");
+
+ /* Send the base64-encoded response */
+ ret = socket_write(&ctx->imap->buf.sock, b64, strlen(b64));
+ if (ret != (int)strlen(b64)) {
+ free(b64);
+ return error("IMAP error: sending OAUTHBEARER response failed");
+ }
+
+ free(b64);
+ return 0;
+}
+
+static int auth_xoauth2(struct imap_store *ctx, const char *prompt UNUSED)
+{
+ int ret;
+ char *b64;
+
+ b64 = xoauth2_base64(ctx->cfg->user, ctx->cfg->pass);
+ if (!b64)
+ return error("XOAUTH2: base64 encoding failed");
+
+ /* Send the base64-encoded response */
+ ret = socket_write(&ctx->imap->buf.sock, b64, strlen(b64));
+ if (ret != (int)strlen(b64)) {
+ free(b64);
+ return error("IMAP error: sending XOAUTH2 response failed");
+ }
+
+ free(b64);
+ return 0;
+}
+
+#else
+
+#define auth_plain NULL
+#define auth_cram_md5 NULL
+#define auth_oauthbearer NULL
+#define auth_xoauth2 NULL
+
+#endif
+
static void server_fill_credential(struct imap_server_conf *srvc, struct credential *cred)
{
if (srvc->user && srvc->pass)
return;
cred->protocol = xstrdup(srvc->use_ssl ? "imaps" : "imap");
- cred->host = xstrdup(srvc->host);
+ cred->host = xstrfmt("%s:%d", srvc->host, srvc->port);
cred->username = xstrdup_or_null(srvc->user);
cred->password = xstrdup_or_null(srvc->pass);
@@ -932,6 +1097,38 @@ static void server_fill_credential(struct imap_server_conf *srvc, struct credent
srvc->pass = xstrdup(cred->password);
}
+static int try_auth_method(struct imap_server_conf *srvc,
+ struct imap_store *ctx,
+ struct imap *imap,
+ const char *auth_method,
+ enum CAPABILITY cap,
+ int (*fn)(struct imap_store *, const char *))
+{
+ struct imap_cmd_cb cb = {0};
+
+ if (!CAP(cap)) {
+ fprintf(stderr, "You specified "
+ "%s as authentication method, "
+ "but %s doesn't support it.\n",
+ auth_method, srvc->host);
+ return -1;
+ }
+ cb.cont = fn;
+
+ if (NOT_CONSTANT(!cb.cont)) {
+ fprintf(stderr, "If you want to use %s authentication mechanism, "
+ "you have to build git-imap-send with OpenSSL library.",
+ auth_method);
+ return -1;
+ }
+ if (imap_exec(ctx, &cb, "AUTHENTICATE %s", auth_method) != RESP_OK) {
+ fprintf(stderr, "IMAP error: AUTHENTICATE %s failed\n",
+ auth_method);
+ return -1;
+ }
+ return 0;
+}
+
static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const char *folder)
{
struct credential cred = CREDENTIAL_INIT;
@@ -964,7 +1161,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
imap->buf.sock.fd[0] = tunnel.out;
imap->buf.sock.fd[1] = tunnel.in;
- imap_info("ok\n");
+ imap_info("OK\n");
} else {
#ifndef NO_IPV6
struct addrinfo hints, *ai0, *ai;
@@ -983,7 +1180,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai));
goto bail;
}
- imap_info("ok\n");
+ imap_info("OK\n");
for (ai0 = ai; ai; ai = ai->ai_next) {
char addr[NI_MAXHOST];
@@ -1021,7 +1218,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
perror("gethostbyname");
goto bail;
}
- imap_info("ok\n");
+ imap_info("OK\n");
addr.sin_addr.s_addr = *((int *) he->h_addr_list[0]);
@@ -1035,7 +1232,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
}
#endif
if (s < 0) {
- fputs("Error: unable to connect to server.\n", stderr);
+ fputs("error: unable to connect to server\n", stderr);
goto bail;
}
@@ -1047,7 +1244,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
close(s);
goto bail;
}
- imap_info("ok\n");
+ imap_info("OK\n");
}
/* read the greeting string */
@@ -1087,30 +1284,25 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
server_fill_credential(srvc, &cred);
if (srvc->auth_method) {
- struct imap_cmd_cb cb;
-
- if (!strcmp(srvc->auth_method, "CRAM-MD5")) {
- if (!CAP(AUTH_CRAM_MD5)) {
- fprintf(stderr, "You specified "
- "CRAM-MD5 as authentication method, "
- "but %s doesn't support it.\n", srvc->host);
+ if (!strcmp(srvc->auth_method, "PLAIN")) {
+ if (try_auth_method(srvc, ctx, imap, "PLAIN", AUTH_PLAIN, auth_plain))
goto bail;
- }
- /* CRAM-MD5 */
-
- memset(&cb, 0, sizeof(cb));
- cb.cont = auth_cram_md5;
- if (imap_exec(ctx, &cb, "AUTHENTICATE CRAM-MD5") != RESP_OK) {
- fprintf(stderr, "IMAP error: AUTHENTICATE CRAM-MD5 failed\n");
+ } else if (!strcmp(srvc->auth_method, "CRAM-MD5")) {
+ if (try_auth_method(srvc, ctx, imap, "CRAM-MD5", AUTH_CRAM_MD5, auth_cram_md5))
goto bail;
- }
+ } else if (!strcmp(srvc->auth_method, "OAUTHBEARER")) {
+ if (try_auth_method(srvc, ctx, imap, "OAUTHBEARER", AUTH_OAUTHBEARER, auth_oauthbearer))
+ goto bail;
+ } else if (!strcmp(srvc->auth_method, "XOAUTH2")) {
+ if (try_auth_method(srvc, ctx, imap, "XOAUTH2", AUTH_XOAUTH2, auth_xoauth2))
+ goto bail;
} else {
- fprintf(stderr, "Unknown authentication method:%s\n", srvc->host);
+ fprintf(stderr, "unknown authentication mechanism: %s\n", srvc->auth_method);
goto bail;
}
} else {
if (CAP(NOLOGIN)) {
- fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n",
+ fprintf(stderr, "skipping account %s@%s, server forbids LOGIN\n",
srvc->user, srvc->host);
goto bail;
}
@@ -1316,16 +1508,16 @@ static int git_imap_config(const char *var, const char *val,
FREE_AND_NULL(cfg->folder);
return git_config_string(&cfg->folder, var, val);
} else if (!strcmp("imap.user", var)) {
- FREE_AND_NULL(cfg->folder);
+ FREE_AND_NULL(cfg->user);
return git_config_string(&cfg->user, var, val);
} else if (!strcmp("imap.pass", var)) {
- FREE_AND_NULL(cfg->folder);
+ FREE_AND_NULL(cfg->pass);
return git_config_string(&cfg->pass, var, val);
} else if (!strcmp("imap.tunnel", var)) {
- FREE_AND_NULL(cfg->folder);
+ FREE_AND_NULL(cfg->tunnel);
return git_config_string(&cfg->tunnel, var, val);
} else if (!strcmp("imap.authmethod", var)) {
- FREE_AND_NULL(cfg->folder);
+ FREE_AND_NULL(cfg->auth_method);
return git_config_string(&cfg->auth_method, var, val);
} else if (!strcmp("imap.port", var)) {
cfg->port = git_config_int(var, val, ctx->kvi);
@@ -1366,7 +1558,8 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
}
ctx->name = server->folder;
- fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+ fprintf(stderr, "Sending %d message%s to %s folder...\n",
+ total, (total != 1) ? "s" : "", server->folder);
while (1) {
unsigned percent = n * 100 / total;
@@ -1388,6 +1581,26 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
return 0;
}
+static int list_imap_folders(struct imap_server_conf *server)
+{
+ struct imap_store *ctx = imap_open_store(server, "INBOX");
+ if (!ctx) {
+ fprintf(stderr, "failed to connect to IMAP server\n");
+ return 1;
+ }
+
+ fprintf(stderr, "Fetching the list of available folders...\n");
+ /* Issue the LIST command and print the results */
+ if (imap_exec(ctx, NULL, "LIST \"\" \"*\"") != RESP_OK) {
+ fprintf(stderr, "failed to list folders\n");
+ imap_close_store(ctx);
+ return 1;
+ }
+
+ imap_close_store(ctx);
+ return 0;
+}
+
#ifdef USE_CURL_FOR_IMAP_SEND
static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
{
@@ -1405,40 +1618,58 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
server_fill_credential(srvc, cred);
curl_easy_setopt(curl, CURLOPT_USERNAME, srvc->user);
- curl_easy_setopt(curl, CURLOPT_PASSWORD, srvc->pass);
+
+ /*
+ * Use CURLOPT_PASSWORD irrespective of whether there is
+ * an auth method specified or not, unless it's OAuth2.0,
+ * where we use CURLOPT_XOAUTH2_BEARER.
+ */
+ if (!srvc->auth_method ||
+ (strcmp(srvc->auth_method, "XOAUTH2") &&
+ strcmp(srvc->auth_method, "OAUTHBEARER")))
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, srvc->pass);
strbuf_addstr(&path, srvc->use_ssl ? "imaps://" : "imap://");
strbuf_addstr(&path, srvc->host);
if (!path.len || path.buf[path.len - 1] != '/')
strbuf_addch(&path, '/');
- uri_encoded_folder = curl_easy_escape(curl, srvc->folder, 0);
- if (!uri_encoded_folder)
- die("failed to encode server folder");
- strbuf_addstr(&path, uri_encoded_folder);
- curl_free(uri_encoded_folder);
+ if (!list_folders) {
+ uri_encoded_folder = curl_easy_escape(curl, srvc->folder, 0);
+ if (!uri_encoded_folder)
+ die("failed to encode server folder");
+ strbuf_addstr(&path, uri_encoded_folder);
+ curl_free(uri_encoded_folder);
+ }
curl_easy_setopt(curl, CURLOPT_URL, path.buf);
strbuf_release(&path);
- curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
+ curl_easy_setopt(curl, CURLOPT_PORT, (long)srvc->port);
if (srvc->auth_method) {
- struct strbuf auth = STRBUF_INIT;
- strbuf_addstr(&auth, "AUTH=");
- strbuf_addstr(&auth, srvc->auth_method);
- curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
- strbuf_release(&auth);
+ if (!strcmp(srvc->auth_method, "XOAUTH2") ||
+ !strcmp(srvc->auth_method, "OAUTHBEARER")) {
+
+ /*
+ * While CURLOPT_XOAUTH2_BEARER looks as if it only supports XOAUTH2,
+ * upon debugging, it has been found that it is capable of detecting
+ * the best option out of OAUTHBEARER and XOAUTH2.
+ */
+ curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, srvc->pass);
+ } else {
+ struct strbuf auth = STRBUF_INIT;
+ strbuf_addstr(&auth, "AUTH=");
+ strbuf_addstr(&auth, srvc->auth_method);
+ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
+ strbuf_release(&auth);
+ }
}
if (!srvc->use_ssl)
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, srvc->ssl_verify);
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, srvc->ssl_verify);
-
- curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
-
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, (long)srvc->ssl_verify);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, (long)srvc->ssl_verify);
if (0 < verbosity || getenv("GIT_CURL_VERBOSE"))
http_trace_curl_no_data();
@@ -1458,9 +1689,14 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
struct credential cred = CREDENTIAL_INIT;
curl = setup_curl(server, &cred);
+
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
- fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+ fprintf(stderr, "Sending %d message%s to %s folder...\n",
+ total, (total != 1) ? "s" : "", server->folder);
while (1) {
unsigned percent = n * 100 / total;
int prev_len;
@@ -1503,6 +1739,31 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
return res != CURLE_OK;
}
+
+static int curl_list_imap_folders(struct imap_server_conf *server)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct credential cred = CREDENTIAL_INIT;
+
+ fprintf(stderr, "Fetching the list of available folders...\n");
+ curl = setup_curl(server, &cred);
+ res = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ if (cred.username) {
+ if (res == CURLE_OK)
+ credential_approve(the_repository, &cred);
+ else if (res == CURLE_LOGIN_DENIED)
+ credential_reject(the_repository, &cred);
+ }
+
+ credential_clear(&cred);
+
+ return res != CURLE_OK;
+}
#endif
int cmd_main(int argc, const char **argv)
@@ -1516,10 +1777,15 @@ int cmd_main(int argc, const char **argv)
int ret;
setup_git_directory_gently(&nongit_ok);
- git_config(git_imap_config, &server);
+ repo_config(the_repository, git_imap_config, &server);
argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0);
+ if (opt_folder) {
+ free(server.folder);
+ server.folder = xstrdup(opt_folder);
+ }
+
if (argc)
usage_with_options(imap_send_usage, imap_send_options);
@@ -1538,20 +1804,37 @@ int cmd_main(int argc, const char **argv)
if (!server.port)
server.port = server.use_ssl ? 993 : 143;
- if (!server.folder) {
- fprintf(stderr, "no imap store specified\n");
- ret = 1;
- goto out;
- }
if (!server.host) {
if (!server.tunnel) {
- fprintf(stderr, "no imap host specified\n");
+ error(_("no IMAP host specified"));
+ advise(_("set the IMAP host with 'git config imap.host <host>'.\n"
+ "(e.g., 'git config imap.host imaps://imap.example.com')"));
ret = 1;
goto out;
}
server.host = xstrdup("tunnel");
}
+ if (list_folders) {
+ if (server.tunnel)
+ ret = list_imap_folders(&server);
+#ifdef USE_CURL_FOR_IMAP_SEND
+ else if (use_curl)
+ ret = curl_list_imap_folders(&server);
+#endif
+ else
+ ret = list_imap_folders(&server);
+ goto out;
+ }
+
+ if (!server.folder) {
+ error(_("no IMAP folder specified"));
+ advise(_("set the target folder with 'git config imap.folder <folder>'.\n"
+ "(e.g., 'git config imap.folder Drafts')"));
+ ret = 1;
+ goto out;
+ }
+
/* read the messages */
if (strbuf_read(&all_msgs, 0, 0) < 0) {
error_errno(_("could not read from stdin"));
@@ -1567,7 +1850,7 @@ int cmd_main(int argc, const char **argv)
total = count_messages(&all_msgs);
if (!total) {
- fprintf(stderr, "no messages to send\n");
+ fprintf(stderr, "no messages found to send\n");
ret = 1;
goto out;
}
diff --git a/line-log.c b/line-log.c
index 628e3fe..07f2154 100644
--- a/line-log.c
+++ b/line-log.c
@@ -1172,12 +1172,13 @@ static int bloom_filter_check(struct rev_info *rev,
return 0;
while (!result && range) {
- fill_bloom_key(range->path, strlen(range->path), &key, rev->bloom_filter_settings);
+ bloom_key_fill(&key, range->path, strlen(range->path),
+ rev->bloom_filter_settings);
if (bloom_filter_contains(filter, &key, rev->bloom_filter_settings))
result = 1;
- clear_bloom_key(&key);
+ bloom_key_clear(&key);
range = range->next;
}
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 948376d..7420bf8 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -350,7 +350,7 @@ void partial_clone_register(
/* Add promisor config for the remote */
cfg_name = xstrfmt("remote.%s.promisor", remote);
- git_config_set(cfg_name, "true");
+ repo_config_set(the_repository, cfg_name, "true");
free(cfg_name);
}
@@ -360,8 +360,8 @@ void partial_clone_register(
*/
filter_name = xstrfmt("remote.%s.partialclonefilter", remote);
/* NEEDSWORK: 'expand' result leaking??? */
- git_config_set(filter_name,
- expand_list_objects_filter_spec(filter_options));
+ repo_config_set(the_repository, filter_name,
+ expand_list_objects_filter_spec(filter_options));
free(filter_name);
/* Make sure the config info are reset */
diff --git a/list-objects-filter.c b/list-objects-filter.c
index 78b397b..7ecd4d9 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -12,7 +12,7 @@
#include "oidmap.h"
#include "oidset.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
/* Remember to update object flag allocation in object.h */
/*
@@ -310,7 +310,7 @@ static enum list_objects_filter_result filter_blobs_limit(
assert(obj->type == OBJ_BLOB);
assert((obj->flags & SEEN) == 0);
- t = oid_object_info(r, &obj->oid, &object_length);
+ t = odb_read_object_info(r->objects, &obj->oid, &object_length);
if (t != OBJ_BLOB) { /* probably OBJ_NONE */
/*
* We DO NOT have the blob locally, so we cannot
diff --git a/list-objects.c b/list-objects.c
index 5971142..42c17d9 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -14,7 +14,7 @@
#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "packfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "trace.h"
#include "environment.h"
@@ -74,8 +74,8 @@ static void process_blob(struct traversal_context *ctx,
* of missing objects.
*/
if (ctx->revs->exclude_promisor_objects &&
- !has_object(the_repository, &obj->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) &&
+ !odb_has_object(the_repository->objects, &obj->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) &&
is_promisor_object(ctx->revs->repo, &obj->oid))
return;
diff --git a/log-tree.c b/log-tree.c
index 1d05dc1..233bf9f 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -176,7 +176,7 @@ static int add_ref_decoration(const char *refname, const char *referent UNUSED,
return 0;
}
- objtype = oid_object_info(the_repository, oid, NULL);
+ objtype = odb_read_object_info(the_repository->objects, oid, NULL);
if (objtype < 0)
return 0;
obj = lookup_object_by_type(the_repository, oid, objtype);
diff --git a/loose.c b/loose.c
index bb602aa..e8ea6e7 100644
--- a/loose.c
+++ b/loose.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "hash.h"
#include "path.h"
-#include "object-store.h"
+#include "odb.h"
#include "hex.h"
#include "repository.h"
#include "wrapper.h"
@@ -44,36 +44,36 @@ static int insert_oid_pair(kh_oid_map_t *map, const struct object_id *key, const
return 1;
}
-static int insert_loose_map(struct object_directory *odb,
+static int insert_loose_map(struct odb_source *source,
const struct object_id *oid,
const struct object_id *compat_oid)
{
- struct loose_object_map *map = odb->loose_map;
+ struct loose_object_map *map = source->loose_map;
int inserted = 0;
inserted |= insert_oid_pair(map->to_compat, oid, compat_oid);
inserted |= insert_oid_pair(map->to_storage, compat_oid, oid);
if (inserted)
- oidtree_insert(odb->loose_objects_cache, compat_oid);
+ oidtree_insert(source->loose_objects_cache, compat_oid);
return inserted;
}
-static int load_one_loose_object_map(struct repository *repo, struct object_directory *dir)
+static int load_one_loose_object_map(struct repository *repo, struct odb_source *source)
{
struct strbuf buf = STRBUF_INIT, path = STRBUF_INIT;
FILE *fp;
- if (!dir->loose_map)
- loose_object_map_init(&dir->loose_map);
- if (!dir->loose_objects_cache) {
- ALLOC_ARRAY(dir->loose_objects_cache, 1);
- oidtree_init(dir->loose_objects_cache);
+ if (!source->loose_map)
+ loose_object_map_init(&source->loose_map);
+ if (!source->loose_objects_cache) {
+ ALLOC_ARRAY(source->loose_objects_cache, 1);
+ oidtree_init(source->loose_objects_cache);
}
- insert_loose_map(dir, repo->hash_algo->empty_tree, repo->compat_hash_algo->empty_tree);
- insert_loose_map(dir, repo->hash_algo->empty_blob, repo->compat_hash_algo->empty_blob);
- insert_loose_map(dir, repo->hash_algo->null_oid, repo->compat_hash_algo->null_oid);
+ insert_loose_map(source, repo->hash_algo->empty_tree, repo->compat_hash_algo->empty_tree);
+ insert_loose_map(source, repo->hash_algo->empty_blob, repo->compat_hash_algo->empty_blob);
+ insert_loose_map(source, repo->hash_algo->null_oid, repo->compat_hash_algo->null_oid);
repo_common_path_replace(repo, &path, "objects/loose-object-idx");
fp = fopen(path.buf, "rb");
@@ -93,7 +93,7 @@ static int load_one_loose_object_map(struct repository *repo, struct object_dire
parse_oid_hex_algop(p, &compat_oid, &p, repo->compat_hash_algo) ||
p != buf.buf + buf.len)
goto err;
- insert_loose_map(dir, &oid, &compat_oid);
+ insert_loose_map(source, &oid, &compat_oid);
}
strbuf_release(&buf);
@@ -107,15 +107,15 @@ static int load_one_loose_object_map(struct repository *repo, struct object_dire
int repo_read_loose_object_map(struct repository *repo)
{
- struct object_directory *dir;
+ struct odb_source *source;
if (!should_use_loose_object_map(repo))
return 0;
- prepare_alt_odb(repo);
+ odb_prepare_alternates(repo->objects);
- for (dir = repo->objects->odb; dir; dir = dir->next) {
- if (load_one_loose_object_map(repo, dir) < 0) {
+ for (source = repo->objects->sources; source; source = source->next) {
+ if (load_one_loose_object_map(repo, source) < 0) {
return -1;
}
}
@@ -124,7 +124,7 @@ int repo_read_loose_object_map(struct repository *repo)
int repo_write_loose_object_map(struct repository *repo)
{
- kh_oid_map_t *map = repo->objects->odb->loose_map->to_compat;
+ kh_oid_map_t *map = repo->objects->sources->loose_map->to_compat;
struct lock_file lock;
int fd;
khiter_t iter;
@@ -166,7 +166,8 @@ int repo_write_loose_object_map(struct repository *repo)
return -1;
}
-static int write_one_object(struct repository *repo, const struct object_id *oid,
+static int write_one_object(struct odb_source *source,
+ const struct object_id *oid,
const struct object_id *compat_oid)
{
struct lock_file lock;
@@ -174,7 +175,7 @@ static int write_one_object(struct repository *repo, const struct object_id *oid
struct stat st;
struct strbuf buf = STRBUF_INIT, path = STRBUF_INIT;
- repo_common_path_replace(repo, &path, "objects/loose-object-idx");
+ strbuf_addf(&path, "%s/loose-object-idx", source->path);
hold_lock_file_for_update_timeout(&lock, path.buf, LOCK_DIE_ON_ERROR, -1);
fd = open(path.buf, O_WRONLY | O_CREAT | O_APPEND, 0666);
@@ -190,7 +191,7 @@ static int write_one_object(struct repository *repo, const struct object_id *oid
goto errout;
if (close(fd))
goto errout;
- adjust_shared_perm(repo, path.buf);
+ adjust_shared_perm(source->odb->repo, path.buf);
rollback_lock_file(&lock);
strbuf_release(&buf);
strbuf_release(&path);
@@ -204,17 +205,18 @@ static int write_one_object(struct repository *repo, const struct object_id *oid
return -1;
}
-int repo_add_loose_object_map(struct repository *repo, const struct object_id *oid,
+int repo_add_loose_object_map(struct odb_source *source,
+ const struct object_id *oid,
const struct object_id *compat_oid)
{
int inserted = 0;
- if (!should_use_loose_object_map(repo))
+ if (!should_use_loose_object_map(source->odb->repo))
return 0;
- inserted = insert_loose_map(repo->objects->odb, oid, compat_oid);
+ inserted = insert_loose_map(source, oid, compat_oid);
if (inserted)
- return write_one_object(repo, oid, compat_oid);
+ return write_one_object(source, oid, compat_oid);
return 0;
}
@@ -223,12 +225,12 @@ int repo_loose_object_map_oid(struct repository *repo,
const struct git_hash_algo *to,
struct object_id *dest)
{
- struct object_directory *dir;
+ struct odb_source *source;
kh_oid_map_t *map;
khiter_t pos;
- for (dir = repo->objects->odb; dir; dir = dir->next) {
- struct loose_object_map *loose_map = dir->loose_map;
+ for (source = repo->objects->sources; source; source = source->next) {
+ struct loose_object_map *loose_map = source->loose_map;
if (!loose_map)
continue;
map = (to == repo->compat_hash_algo) ?
diff --git a/loose.h b/loose.h
index 2851230..6af1702 100644
--- a/loose.h
+++ b/loose.h
@@ -4,6 +4,7 @@
#include "khash.h"
struct repository;
+struct odb_source;
struct loose_object_map {
kh_oid_map_t *to_compat;
@@ -16,7 +17,8 @@ int repo_loose_object_map_oid(struct repository *repo,
const struct object_id *src,
const struct git_hash_algo *dest_algo,
struct object_id *dest);
-int repo_add_loose_object_map(struct repository *repo, const struct object_id *oid,
+int repo_add_loose_object_map(struct odb_source *source,
+ const struct object_id *oid,
const struct object_id *compat_oid);
int repo_read_loose_object_map(struct repository *repo);
int repo_write_loose_object_map(struct repository *repo);
diff --git a/ls-refs.c b/ls-refs.c
index e28c841..c47acde 100644
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -159,7 +159,7 @@ int ls_refs(struct repository *r, struct packet_reader *request)
strbuf_init(&data.buf, 0);
strvec_init(&data.hidden_refs);
- git_config(ls_refs_config, &data);
+ repo_config(the_repository, ls_refs_config, &data);
while (packet_reader_read(request) == PACKET_READ_NORMAL) {
const char *arg = request->line;
diff --git a/mailinfo.c b/mailinfo.c
index ee4597d..99ac596 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -2,6 +2,7 @@
#include "git-compat-util.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex-ll.h"
#include "utf8.h"
@@ -266,6 +267,8 @@ static void handle_content_type(struct mailinfo *mi, struct strbuf *line)
error("Too many boundaries to handle");
mi->input_error = -1;
mi->content_top = &mi->content[MAX_BOUNDARIES] - 1;
+ strbuf_release(boundary);
+ free(boundary);
return;
}
*(mi->content_top) = boundary;
diff --git a/mailmap.c b/mailmap.c
index 9e2642a..56c7210 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -6,7 +6,7 @@
#include "string-list.h"
#include "mailmap.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "setup.h"
char *git_mailmap_file;
@@ -196,7 +196,7 @@ int read_mailmap_blob(struct string_list *map, const char *name)
if (repo_get_oid(the_repository, name, &oid) < 0)
return 0;
- buf = repo_read_object_file(the_repository, &oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, &oid, &type, &size);
if (!buf)
return error("unable to read mailmap object at %s", name);
if (type != OBJ_BLOB) {
diff --git a/match-trees.c b/match-trees.c
index 72922d5..4216933 100644
--- a/match-trees.c
+++ b/match-trees.c
@@ -7,7 +7,7 @@
#include "tree.h"
#include "tree-walk.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "repository.h"
static int score_missing(unsigned mode)
@@ -63,7 +63,7 @@ static void *fill_tree_desc_strict(struct repository *r,
enum object_type type;
unsigned long size;
- buffer = repo_read_object_file(r, hash, &type, &size);
+ buffer = odb_read_object(r->objects, hash, &type, &size);
if (!buffer)
die("unable to read tree (%s)", oid_to_hex(hash));
if (type != OBJ_TREE)
@@ -199,7 +199,7 @@ static int splice_tree(struct repository *r,
if (*subpath)
subpath++;
- buf = repo_read_object_file(r, oid1, &type, &sz);
+ buf = odb_read_object(r->objects, oid1, &type, &sz);
if (!buf)
die("cannot read tree %s", oid_to_hex(oid1));
init_tree_desc(&desc, oid1, buf, sz);
@@ -246,7 +246,7 @@ static int splice_tree(struct repository *r,
rewrite_with = oid2;
}
hashcpy(rewrite_here, rewrite_with->hash, r->hash_algo);
- status = write_object_file(buf, sz, OBJ_TREE, result);
+ status = odb_write_object(r->objects, buf, sz, OBJ_TREE, result);
free(buf);
return status;
}
diff --git a/merge-blobs.c b/merge-blobs.c
index 53f36db..6fc2799 100644
--- a/merge-blobs.c
+++ b/merge-blobs.c
@@ -4,7 +4,7 @@
#include "merge-ll.h"
#include "blob.h"
#include "merge-blobs.h"
-#include "object-store.h"
+#include "odb.h"
static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
{
@@ -12,8 +12,8 @@ static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
unsigned long size;
enum object_type type;
- buf = repo_read_object_file(the_repository, &obj->object.oid, &type,
- &size);
+ buf = odb_read_object(the_repository->objects, &obj->object.oid,
+ &type, &size);
if (!buf)
return -1;
if (type != OBJ_BLOB) {
@@ -79,8 +79,8 @@ void *merge_blobs(struct index_state *istate, const char *path,
return NULL;
if (!our)
our = their;
- return repo_read_object_file(the_repository, &our->object.oid,
- &type, size);
+ return odb_read_object(the_repository->objects, &our->object.oid,
+ &type, size);
}
if (fill_mmfile_blob(&f1, our) < 0)
diff --git a/merge-ll.c b/merge-ll.c
index b2dc26d..fafe2c9 100644
--- a/merge-ll.c
+++ b/merge-ll.c
@@ -357,7 +357,7 @@ static void initialize_ll_merge(void)
if (ll_user_merge_tail)
return;
ll_user_merge_tail = &ll_user_merge;
- git_config(read_merge_config, NULL);
+ repo_config(the_repository, read_merge_config, NULL);
}
static const struct ll_merge_driver *find_ll_merge_driver(const char *merge_attr)
diff --git a/merge-ort.c b/merge-ort.c
index 47b3d17..cd0cb4d 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -39,7 +39,7 @@
#include "mem-pool.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "path.h"
#include "promisor-remote.h"
@@ -2216,8 +2216,8 @@ static int handle_content_merge(struct merge_options *opt,
}
if (!ret && record_object &&
- write_object_file(result_buf.ptr, result_buf.size,
- OBJ_BLOB, &result->oid)) {
+ odb_write_object(the_repository->objects, result_buf.ptr, result_buf.size,
+ OBJ_BLOB, &result->oid)) {
path_msg(opt, ERROR_OBJECT_WRITE_FAILED, 0,
pathnames[0], pathnames[1], pathnames[2], NULL,
_("error: unable to add %s to database"), path);
@@ -3629,7 +3629,7 @@ static int read_oid_strbuf(struct merge_options *opt,
void *buf;
enum object_type type;
unsigned long size;
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {
path_msg(opt, ERROR_OBJECT_READ_FAILED, 0,
path, NULL, NULL, NULL,
@@ -3772,7 +3772,8 @@ static int write_tree(struct object_id *result_oid,
}
/* Write this object file out, and record in result_oid */
- if (write_object_file(buf.buf, buf.len, OBJ_TREE, result_oid))
+ if (odb_write_object(the_repository->objects, buf.buf,
+ buf.len, OBJ_TREE, result_oid))
ret = -1;
strbuf_release(&buf);
return ret;
@@ -4385,8 +4386,8 @@ static void prefetch_for_content_merges(struct merge_options *opt,
if ((ci->filemask & side_mask) &&
S_ISREG(vi->mode) &&
- oid_object_info_extended(opt->repo, &vi->oid, NULL,
- OBJECT_INFO_FOR_PREFETCH))
+ odb_read_object_info_extended(opt->repo->objects, &vi->oid, NULL,
+ OBJECT_INFO_FOR_PREFETCH))
oid_array_append(&to_fetch, &vi->oid);
}
}
@@ -5353,20 +5354,20 @@ static void merge_recursive_config(struct merge_options *opt, int ui)
{
char *value = NULL;
int renormalize = 0;
- git_config_get_int("merge.verbosity", &opt->verbosity);
- git_config_get_int("diff.renamelimit", &opt->rename_limit);
- git_config_get_int("merge.renamelimit", &opt->rename_limit);
- git_config_get_bool("merge.renormalize", &renormalize);
+ repo_config_get_int(the_repository, "merge.verbosity", &opt->verbosity);
+ repo_config_get_int(the_repository, "diff.renamelimit", &opt->rename_limit);
+ repo_config_get_int(the_repository, "merge.renamelimit", &opt->rename_limit);
+ repo_config_get_bool(the_repository, "merge.renormalize", &renormalize);
opt->renormalize = renormalize;
- if (!git_config_get_string("diff.renames", &value)) {
+ if (!repo_config_get_string(the_repository, "diff.renames", &value)) {
opt->detect_renames = git_config_rename("diff.renames", value);
free(value);
}
- if (!git_config_get_string("merge.renames", &value)) {
+ if (!repo_config_get_string(the_repository, "merge.renames", &value)) {
opt->detect_renames = git_config_rename("merge.renames", value);
free(value);
}
- if (!git_config_get_string("merge.directoryrenames", &value)) {
+ if (!repo_config_get_string(the_repository, "merge.directoryrenames", &value)) {
int boolval = git_parse_maybe_bool(value);
if (0 <= boolval) {
opt->detect_directory_renames = boolval ?
@@ -5379,7 +5380,7 @@ static void merge_recursive_config(struct merge_options *opt, int ui)
free(value);
}
if (ui) {
- if (!git_config_get_string("diff.algorithm", &value)) {
+ if (!repo_config_get_string(the_repository, "diff.algorithm", &value)) {
long diff_algorithm = parse_algorithm_value(value);
if (diff_algorithm < 0)
die(_("unknown value for config '%s': %s"), "diff.algorithm", value);
@@ -5387,7 +5388,7 @@ static void merge_recursive_config(struct merge_options *opt, int ui)
free(value);
}
}
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
}
static void init_merge_options(struct merge_options *opt,
diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index 7871085..fca1044 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -274,8 +274,8 @@
# definition.
#
# The syntax of the "layout definitions" is explained in "Documentation/
- # mergetools/vimdiff.txt" but you can already intuitively understand how
- # it works by knowing that...
+ # mergetools/vimdiff.adoc" but you can already intuitively understand
+ # how it works by knowing that...
#
# * "+" means "a new vim tab"
# * "/" means "a new vim horizontal split"
diff --git a/meson.build b/meson.build
index 596f5ac..5dd299b 100644
--- a/meson.build
+++ b/meson.build
@@ -245,7 +245,7 @@
# "/bin/sh" over a PATH-based lookup, which provides a working shell on most
# supported systems. This path is also the default shell path used by our
# Makefile. This lookup can be overridden via `program_path`.
-target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)
+target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)
# Sanity-check that programs required for the build exist.
foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']
@@ -396,8 +396,8 @@
'object-file-convert.c',
'object-file.c',
'object-name.c',
- 'object-store.c',
'object.c',
+ 'odb.c',
'oid-array.c',
'oidmap.c',
'oidset.c',
@@ -694,9 +694,14 @@
headers_to_check = []
if git.found() and fs.exists(meson.project_source_root() / '.git')
- foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: true).stdout().split()
- headers_to_check += header
- endforeach
+ ls_headers = run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: false)
+ if ls_headers.returncode() == 0
+ foreach header : ls_headers.stdout().split()
+ headers_to_check += header
+ endforeach
+ else
+ warning('could not list headers, disabling static analysis targets')
+ endif
endif
if not get_option('breaking_changes')
@@ -866,9 +871,11 @@
endif
build_options_config.set_quoted('X', executable_suffix)
-python = import('python').find_installation('python3', required: get_option('python'))
-target_python = find_program('python3', native: false, required: python.found())
-if python.found()
+# Python is not used for our build system, but exclusively for git-p4.
+# Consequently we only need to determine whether Python is available for the
+# build target.
+target_python = find_program('python3', native: false, required: get_option('python'))
+if target_python.found()
build_options_config.set('NO_PYTHON', '')
else
libgit_c_args += '-DNO_PYTHON'
@@ -1055,7 +1062,33 @@
build_options_config.set('NO_ICONV', '1')
endif
-pcre2 = dependency('libpcre2-8', required: get_option('pcre2'), default_options: ['default_library=static', 'test=false'])
+# can't use enable_auto_if() because it is only available in meson 1.1
+if host_machine.system() == 'windows' and get_option('pcre2').allowed()
+ pcre2_feature = true
+else
+ pcre2_feature = get_option('pcre2')
+endif
+pcre2 = dependency('libpcre2-8', required: pcre2_feature, default_options: ['default_library=static', 'test=false'])
+if pcre2.found() and pcre2.type_name() != 'internal' and host_machine.system() == 'darwin'
+ # macOS installs a broken system package, double check
+ if not compiler.has_header('pcre2.h', dependencies: pcre2)
+ if pcre2_feature.enabled()
+ pcre2_fallback = ['pcre2', 'libpcre2_8']
+ else
+ pcre2_fallback = []
+ endif
+ # Attempt to fallback or replace with not-found-dependency
+ pcre2 = dependency('', required: false, fallback: pcre2_fallback, default_options: ['default_library=static', 'test=false'])
+ if not pcre2.found()
+ if pcre2_feature.enabled()
+ error('only a broken pcre2 install found and pcre2 is required')
+ else
+ warning('broken pcre2 install found, disabling pcre2 feature')
+ endif
+ endif
+ endif
+endif
+
if pcre2.found()
libgit_dependencies += pcre2
libgit_c_args += '-DUSE_LIBPCRE2'
@@ -1331,10 +1364,6 @@
endif
endif
-if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>')
- libgit_c_args += '-DHAVE_SYSINFO'
-endif
-
if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>')
libgit_c_args += '-DUSE_ST_TIMESPEC'
elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>')
@@ -1420,17 +1449,6 @@
libgit_c_args += '-DHAVE_CLOCK_MONOTONIC'
endif
-if not compiler.compiles('''
- #include <inttypes.h>
-
- void func(void)
- {
- uintmax_t x = 0;
- }
-''', name: 'uintmax_t')
- libgit_c_args += '-DNO_UINTMAX_T'
-endif
-
has_bsd_sysctl = false
if compiler.has_header('sys/sysctl.h')
if compiler.compiles('''
@@ -1449,6 +1467,12 @@
endif
endif
+if not has_bsd_sysctl
+ if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>')
+ libgit_c_args += '-DHAVE_SYSINFO'
+ endif
+endif
+
if not meson.is_cross_build() and compiler.run('''
#include <stdio.h>
@@ -1744,7 +1768,7 @@
sources: builtin_sources + 'git.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
bin_wrappers += git_builtin
@@ -1752,35 +1776,35 @@
sources: 'daemon.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
test_dependencies += executable('git-sh-i18n--envsubst',
sources: 'sh-i18n--envsubst.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
bin_wrappers += executable('git-shell',
sources: 'shell.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
test_dependencies += executable('git-http-backend',
sources: 'http-backend.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
bin_wrappers += executable('scalar',
sources: 'scalar.c',
dependencies: [libgit_commonmain],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
if curl.found()
@@ -1796,14 +1820,14 @@
sources: 'remote-curl.c',
dependencies: [libgit_curl],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
test_dependencies += executable('git-http-fetch',
sources: 'http-fetch.c',
dependencies: [libgit_curl],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
if expat.found()
@@ -1811,7 +1835,7 @@
sources: 'http-push.c',
dependencies: [libgit_curl],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
endif
@@ -1822,7 +1846,7 @@
)
install_symlink(alias + executable_suffix,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
pointing_to: 'git-remote-http',
)
endforeach
@@ -1832,7 +1856,7 @@
sources: 'imap-send.c',
dependencies: [ use_curl_for_imap_send ? libgit_curl : libgit_commonmain ],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ]
@@ -1842,7 +1866,7 @@
)
install_symlink(alias + executable_suffix,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
pointing_to: 'git',
)
endforeach
@@ -1856,9 +1880,9 @@
'scalar',
]
if meson.version().version_compare('>=1.3.0')
- pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / symlink, get_option('bindir'))
+ pointing_to = fs.relative_to(git_exec_path / symlink, get_option('bindir'))
else
- pointing_to = '../libexec/git-core' / symlink
+ pointing_to = '..' / git_exec_path / symlink
endif
install_symlink(symlink,
@@ -1898,7 +1922,7 @@
meson.project_build_root() / 'GIT-BUILD-OPTIONS',
],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
endforeach
@@ -1931,7 +1955,7 @@
input: perl_header_template,
output: 'GIT-PERL-HEADER',
configuration: {
- 'GITEXECDIR_REL': get_option('libexecdir') / 'git-core',
+ 'GITEXECDIR_REL': git_exec_path,
'PERLLIBDIR_REL': perllibdir,
'LOCALEDIR_REL': get_option('datadir') / 'locale',
'INSTLIBDIR': perllibdir,
@@ -1955,7 +1979,7 @@
output: fs.stem(script),
command: generate_perl_command,
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
depends: [git_version_file],
)
test_dependencies += generated_script
@@ -1964,9 +1988,9 @@
bin_wrappers += generated_script
if meson.version().version_compare('>=1.3.0')
- pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / fs.stem(script), get_option('bindir'))
+ pointing_to = fs.relative_to(git_exec_path / fs.stem(script), get_option('bindir'))
else
- pointing_to = '../libexec/git-core' / fs.stem(script)
+ pointing_to = '..' / git_exec_path / fs.stem(script)
endif
install_symlink(fs.stem(script),
@@ -1979,7 +2003,7 @@
subdir('perl')
endif
-if python.found()
+if target_python.found()
scripts_python = [
'git-p4.py'
]
@@ -1996,7 +2020,7 @@
'@OUTPUT@',
],
install: true,
- install_dir: get_option('libexecdir') / 'git-core',
+ install_dir: git_exec_path,
)
test_dependencies += generated_python
endforeach
@@ -2030,7 +2054,7 @@
]
foreach mergetool : mergetools
- install_data(mergetool, install_dir: get_option('libexecdir') / 'git-core' / 'mergetools')
+ install_data(mergetool, install_dir: git_exec_path / 'mergetools')
endforeach
if intl.found()
@@ -2054,6 +2078,18 @@
# can properly set up test dependencies. The bin-wrappers themselves are set up
# at configuration time, so these are fine.
if get_option('tests')
+ test_kwargs = {
+ 'timeout': 0,
+ }
+
+ # The TAP protocol was already understood by previous versions of Meson, but
+ # it was incompatible with the `meson test --interactive` flag.
+ if meson.version().version_compare('>=1.8.0')
+ test_kwargs += {
+ 'protocol': 'tap',
+ }
+ endif
+
subdir('t')
endif
@@ -2132,6 +2168,18 @@
alias_target('check-headers', hdr_check)
endif
+git_clang_format = find_program('git-clang-format', required: false, native: true)
+if git_clang_format.found()
+ run_target('style',
+ command: [
+ git_clang_format,
+ '--style', 'file',
+ '--diff',
+ '--extensions', 'c,h'
+ ]
+ )
+endif
+
foreach key, value : {
'DIFF': diff.full_path(),
'GIT_SOURCE_DIR': meson.project_source_root(),
@@ -2182,16 +2230,15 @@
summary({
'benchmarks': get_option('tests') and perl.found() and time.found(),
- 'curl': curl.found(),
- 'expat': expat.found(),
- 'gettext': intl.found(),
+ 'curl': curl,
+ 'expat': expat,
+ 'gettext': intl,
'gitweb': gitweb_option.allowed(),
- 'https': https_backend,
- 'iconv': iconv.found(),
- 'pcre2': pcre2.found(),
+ 'iconv': iconv,
+ 'pcre2': pcre2,
'perl': perl_features_enabled,
- 'python': python.found(),
-}, section: 'Auto-detected features')
+ 'python': target_python.found(),
+}, section: 'Auto-detected features', bool_yn: true)
summary({
'csprng': csprng_backend,
diff --git a/meson_options.txt b/meson_options.txt
index e7f768d..1668f26 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -45,7 +45,7 @@
description: 'Build Git web interface. Requires Perl.')
option('iconv', type: 'feature', value: 'auto',
description: 'Support reencoding strings with different encodings.')
-option('pcre2', type: 'feature', value: 'enabled',
+option('pcre2', type: 'feature', value: 'auto',
description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).')
option('perl', type: 'feature', value: 'auto',
description: 'Build tools written in Perl.')
diff --git a/midx-write.c b/midx-write.c
index ba4a949..a0aceab 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -667,7 +667,7 @@ static void write_midx_reverse_index(struct write_midx_context *ctx,
tmp_file = write_rev_file_order(ctx->repo, NULL, ctx->pack_order,
ctx->entries_nr, midx_hash, WRITE_REV);
- if (finalize_object_file(tmp_file, buf.buf))
+ if (finalize_object_file(ctx->repo, tmp_file, buf.buf))
die(_("cannot store reverse index file"));
strbuf_release(&buf);
@@ -916,26 +916,8 @@ static int write_midx_bitmap(struct write_midx_context *ctx,
static struct multi_pack_index *lookup_multi_pack_index(struct repository *r,
const char *object_dir)
{
- struct multi_pack_index *result = NULL;
- struct multi_pack_index *cur;
- char *obj_dir_real = real_pathdup(object_dir, 1);
- struct strbuf cur_path_real = STRBUF_INIT;
-
- /* Ensure the given object_dir is local, or a known alternate. */
- find_odb(r, obj_dir_real);
-
- for (cur = get_multi_pack_index(r); cur; cur = cur->next) {
- strbuf_realpath(&cur_path_real, cur->object_dir, 1);
- if (!strcmp(obj_dir_real, cur_path_real.buf)) {
- result = cur;
- goto cleanup;
- }
- }
-
-cleanup:
- free(obj_dir_real);
- strbuf_release(&cur_path_real);
- return result;
+ struct odb_source *source = odb_find_source(r->objects, object_dir);
+ return get_multi_pack_index(source);
}
static int fill_packs_from_midx(struct write_midx_context *ctx,
diff --git a/midx.c b/midx.c
index cd6e766..7d40768 100644
--- a/midx.c
+++ b/midx.c
@@ -401,7 +401,6 @@ void close_midx(struct multi_pack_index *m)
if (!m)
return;
- close_midx(m->next);
close_midx(m->base_midx);
munmap((unsigned char *)m->data, m->data_len);
@@ -724,32 +723,20 @@ int midx_preferred_pack(struct multi_pack_index *m, uint32_t *pack_int_id)
return 0;
}
-int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local)
+int prepare_multi_pack_index_one(struct odb_source *source, int local)
{
- struct multi_pack_index *m;
- struct multi_pack_index *m_search;
+ struct repository *r = source->odb->repo;
prepare_repo_settings(r);
if (!r->settings.core_multi_pack_index)
return 0;
- for (m_search = r->objects->multi_pack_index; m_search; m_search = m_search->next)
- if (!strcmp(object_dir, m_search->object_dir))
- return 1;
-
- m = load_multi_pack_index(r, object_dir, local);
-
- if (m) {
- struct multi_pack_index *mp = r->objects->multi_pack_index;
- if (mp) {
- m->next = mp->next;
- mp->next = m;
- } else
- r->objects->multi_pack_index = m;
+ if (source->midx)
return 1;
- }
- return 0;
+ source->midx = load_multi_pack_index(r, source->path, local);
+
+ return !!source->midx;
}
int midx_checksum_valid(struct multi_pack_index *m)
@@ -832,18 +819,23 @@ void clear_midx_file(struct repository *r)
{
struct strbuf midx = STRBUF_INIT;
- get_midx_filename(r->hash_algo, &midx, r->objects->odb->path);
+ get_midx_filename(r->hash_algo, &midx, r->objects->sources->path);
- if (r->objects && r->objects->multi_pack_index) {
- close_midx(r->objects->multi_pack_index);
- r->objects->multi_pack_index = NULL;
+ if (r->objects) {
+ struct odb_source *source;
+
+ for (source = r->objects->sources; source; source = source->next) {
+ if (source->midx)
+ close_midx(source->midx);
+ source->midx = NULL;
+ }
}
if (remove_path(midx.buf))
die(_("failed to clear multi-pack-index at %s"), midx.buf);
- clear_midx_files_ext(r->objects->odb->path, MIDX_EXT_BITMAP, NULL);
- clear_midx_files_ext(r->objects->odb->path, MIDX_EXT_REV, NULL);
+ clear_midx_files_ext(r->objects->sources->path, MIDX_EXT_BITMAP, NULL);
+ clear_midx_files_ext(r->objects->sources->path, MIDX_EXT_REV, NULL);
strbuf_release(&midx);
}
diff --git a/midx.h b/midx.h
index 9d1374c..076382d 100644
--- a/midx.h
+++ b/midx.h
@@ -8,6 +8,7 @@ struct pack_entry;
struct repository;
struct bitmapped_pack;
struct git_hash_algo;
+struct odb_source;
#define MIDX_SIGNATURE 0x4d494458 /* "MIDX" */
#define MIDX_VERSION 1
@@ -34,8 +35,6 @@ struct git_hash_algo;
"GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL"
struct multi_pack_index {
- struct multi_pack_index *next;
-
const unsigned char *data;
size_t data_len;
@@ -123,7 +122,7 @@ int fill_midx_entry(struct repository *r, const struct object_id *oid, struct pa
int midx_contains_pack(struct multi_pack_index *m,
const char *idx_or_pack_name);
int midx_preferred_pack(struct multi_pack_index *m, uint32_t *pack_int_id);
-int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local);
+int prepare_multi_pack_index_one(struct odb_source *source, int local);
/*
* Variant of write_midx_file which writes a MIDX containing only the packs
diff --git a/notes-cache.c b/notes-cache.c
index 150241b..bf5bb1f 100644
--- a/notes-cache.c
+++ b/notes-cache.c
@@ -3,7 +3,7 @@
#include "git-compat-util.h"
#include "notes-cache.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "pretty.h"
#include "repository.h"
#include "commit.h"
@@ -87,7 +87,7 @@ char *notes_cache_get(struct notes_cache *c, struct object_id *key_oid,
value_oid = get_note(&c->tree, key_oid);
if (!value_oid)
return NULL;
- value = repo_read_object_file(the_repository, value_oid, &type, &size);
+ value = odb_read_object(the_repository->objects, value_oid, &type, &size);
*outsize = size;
return value;
@@ -98,7 +98,8 @@ int notes_cache_put(struct notes_cache *c, struct object_id *key_oid,
{
struct object_id value_oid;
- if (write_object_file(data, size, OBJ_BLOB, &value_oid) < 0)
+ if (odb_write_object(the_repository->objects, data,
+ size, OBJ_BLOB, &value_oid) < 0)
return -1;
return add_note(&c->tree, key_oid, &value_oid, NULL);
}
diff --git a/notes-merge.c b/notes-merge.c
index dae8e6a..5869399 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -8,7 +8,7 @@
#include "refs.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "repository.h"
#include "diff.h"
@@ -340,7 +340,7 @@ static void write_note_to_worktree(const struct object_id *obj,
{
enum object_type type;
unsigned long size;
- void *buf = repo_read_object_file(the_repository, note, &type, &size);
+ void *buf = odb_read_object(the_repository->objects, note, &type, &size);
if (!buf)
die("cannot read note %s for object %s",
diff --git a/notes-utils.c b/notes-utils.c
index ac66b82..6a50c6d 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -162,7 +162,7 @@ struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd)
c->refs_from_env = 1;
string_list_add_refs_from_colon_sep(c->refs, rewrite_refs_env);
}
- git_config(notes_rewrite_config, c);
+ repo_config(the_repository, notes_rewrite_config, c);
if (!c->enabled || !c->refs->nr) {
string_list_clear(c->refs, 0);
free(c->refs);
diff --git a/notes.c b/notes.c
index 0a128f1..9736276 100644
--- a/notes.c
+++ b/notes.c
@@ -8,7 +8,7 @@
#include "notes.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "utf8.h"
#include "strbuf.h"
#include "tree-walk.h"
@@ -682,7 +682,8 @@ static int tree_write_stack_finish_subtree(struct tree_write_stack *tws)
ret = tree_write_stack_finish_subtree(n);
if (ret)
return ret;
- ret = write_object_file(n->buf.buf, n->buf.len, OBJ_TREE, &s);
+ ret = odb_write_object(the_repository->objects, n->buf.buf,
+ n->buf.len, OBJ_TREE, &s);
if (ret)
return ret;
strbuf_release(&n->buf);
@@ -794,8 +795,8 @@ static int prune_notes_helper(const struct object_id *object_oid,
struct note_delete_list **l = (struct note_delete_list **) cb_data;
struct note_delete_list *n;
- if (has_object(the_repository, object_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, object_oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return 0; /* nothing to do for this note */
/* failed to find object => prune this note */
@@ -816,15 +817,15 @@ int combine_notes_concatenate(struct object_id *cur_oid,
/* read in both note blob objects */
if (!is_null_oid(new_oid))
- new_msg = repo_read_object_file(the_repository, new_oid,
- &new_type, &new_len);
+ new_msg = odb_read_object(the_repository->objects, new_oid,
+ &new_type, &new_len);
if (!new_msg || !new_len || new_type != OBJ_BLOB) {
free(new_msg);
return 0;
}
if (!is_null_oid(cur_oid))
- cur_msg = repo_read_object_file(the_repository, cur_oid,
- &cur_type, &cur_len);
+ cur_msg = odb_read_object(the_repository->objects, cur_oid,
+ &cur_type, &cur_len);
if (!cur_msg || !cur_len || cur_type != OBJ_BLOB) {
free(cur_msg);
free(new_msg);
@@ -847,7 +848,8 @@ int combine_notes_concatenate(struct object_id *cur_oid,
free(new_msg);
/* create a new blob object from buf */
- ret = write_object_file(buf, buf_len, OBJ_BLOB, cur_oid);
+ ret = odb_write_object(the_repository->objects, buf,
+ buf_len, OBJ_BLOB, cur_oid);
free(buf);
return ret;
}
@@ -880,7 +882,7 @@ static int string_list_add_note_lines(struct string_list *list,
return 0;
/* read_sha1_file NUL-terminates */
- data = repo_read_object_file(the_repository, oid, &t, &len);
+ data = odb_read_object(the_repository->objects, oid, &t, &len);
if (t != OBJ_BLOB || !data || !len) {
free(data);
return t != OBJ_BLOB || !data;
@@ -927,7 +929,8 @@ int combine_notes_cat_sort_uniq(struct object_id *cur_oid,
string_list_join_lines_helper, &buf))
goto out;
- ret = write_object_file(buf.buf, buf.len, OBJ_BLOB, cur_oid);
+ ret = odb_write_object(the_repository->objects, buf.buf,
+ buf.len, OBJ_BLOB, cur_oid);
out:
strbuf_release(&buf);
@@ -1123,7 +1126,7 @@ void load_display_notes(struct display_notes_opt *opt)
load_config_refs = 1;
}
- git_config(notes_display_config, &load_config_refs);
+ repo_config(the_repository, notes_display_config, &load_config_refs);
if (opt) {
struct string_list_item *item;
@@ -1215,7 +1218,8 @@ int write_notes_tree(struct notes_tree *t, struct object_id *result)
ret = for_each_note(t, flags, write_each_note, &cb_data) ||
write_each_non_note_until(NULL, &cb_data) ||
tree_write_stack_finish_subtree(&root) ||
- write_object_file(root.buf.buf, root.buf.len, OBJ_TREE, result);
+ odb_write_object(the_repository->objects, root.buf.buf,
+ root.buf.len, OBJ_TREE, result);
strbuf_release(&root.buf);
return ret;
}
@@ -1290,7 +1294,8 @@ static void format_note(struct notes_tree *t, const struct object_id *object_oid
if (!oid)
return;
- if (!(msg = repo_read_object_file(the_repository, oid, &type, &msglen)) || type != OBJ_BLOB) {
+ if (!(msg = odb_read_object(the_repository->objects, oid, &type, &msglen)) ||
+ type != OBJ_BLOB) {
free(msg);
return;
}
diff --git a/object-file.c b/object-file.c
index 1ac04c2..2bc36ab 100644
--- a/object-file.c
+++ b/object-file.c
@@ -8,7 +8,6 @@
*/
#define USE_THE_REPOSITORY_VARIABLE
-#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
#include "bulk-checkin.h"
@@ -21,11 +20,12 @@
#include "loose.h"
#include "object-file-convert.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "oidtree.h"
#include "pack.h"
#include "packfile.h"
#include "path.h"
+#include "read-cache-ll.h"
#include "setup.h"
#include "streaming.h"
@@ -42,10 +42,11 @@ static int get_conv_flags(unsigned flags)
return 0;
}
-static void fill_loose_path(struct strbuf *buf, const struct object_id *oid)
+static void fill_loose_path(struct strbuf *buf,
+ const struct object_id *oid,
+ const struct git_hash_algo *algop)
{
- int i;
- for (i = 0; i < the_hash_algo->rawsz; i++) {
+ for (size_t i = 0; i < algop->rawsz; i++) {
static char hex[] = "0123456789abcdef";
unsigned int val = oid->hash[i];
strbuf_addch(buf, hex[val >> 4]);
@@ -55,14 +56,14 @@ static void fill_loose_path(struct strbuf *buf, const struct object_id *oid)
}
}
-const char *odb_loose_path(struct object_directory *odb,
+const char *odb_loose_path(struct odb_source *source,
struct strbuf *buf,
const struct object_id *oid)
{
strbuf_reset(buf);
- strbuf_addstr(buf, odb->path);
+ strbuf_addstr(buf, source->path);
strbuf_addch(buf, '/');
- fill_loose_path(buf, oid);
+ fill_loose_path(buf, oid, source->odb->repo->hash_algo);
return buf->buf;
}
@@ -88,46 +89,19 @@ int check_and_freshen_file(const char *fn, int freshen)
return 1;
}
-static int check_and_freshen_odb(struct object_directory *odb,
- const struct object_id *oid,
- int freshen)
+static int check_and_freshen_source(struct odb_source *source,
+ const struct object_id *oid,
+ int freshen)
{
static struct strbuf path = STRBUF_INIT;
- odb_loose_path(odb, &path, oid);
+ odb_loose_path(source, &path, oid);
return check_and_freshen_file(path.buf, freshen);
}
-static int check_and_freshen_local(const struct object_id *oid, int freshen)
+int has_loose_object(struct odb_source *source,
+ const struct object_id *oid)
{
- return check_and_freshen_odb(the_repository->objects->odb, oid, freshen);
-}
-
-static int check_and_freshen_nonlocal(const struct object_id *oid, int freshen)
-{
- struct object_directory *odb;
-
- prepare_alt_odb(the_repository);
- for (odb = the_repository->objects->odb->next; odb; odb = odb->next) {
- if (check_and_freshen_odb(odb, oid, freshen))
- return 1;
- }
- return 0;
-}
-
-static int check_and_freshen(const struct object_id *oid, int freshen)
-{
- return check_and_freshen_local(oid, freshen) ||
- check_and_freshen_nonlocal(oid, freshen);
-}
-
-int has_loose_object_nonlocal(const struct object_id *oid)
-{
- return check_and_freshen_nonlocal(oid, 0);
-}
-
-int has_loose_object(const struct object_id *oid)
-{
- return check_and_freshen(oid, 0);
+ return check_and_freshen_source(source, oid, 0);
}
int format_object_header(char *str, size_t size, enum object_type type,
@@ -202,12 +176,12 @@ int stream_object_signature(struct repository *r, const struct object_id *oid)
static int stat_loose_object(struct repository *r, const struct object_id *oid,
struct stat *st, const char **path)
{
- struct object_directory *odb;
+ struct odb_source *source;
static struct strbuf buf = STRBUF_INIT;
- prepare_alt_odb(r);
- for (odb = r->objects->odb; odb; odb = odb->next) {
- *path = odb_loose_path(odb, &buf, oid);
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ *path = odb_loose_path(source, &buf, oid);
if (!lstat(*path, st))
return 0;
}
@@ -223,13 +197,13 @@ static int open_loose_object(struct repository *r,
const struct object_id *oid, const char **path)
{
int fd;
- struct object_directory *odb;
+ struct odb_source *source;
int most_interesting_errno = ENOENT;
static struct strbuf buf = STRBUF_INIT;
- prepare_alt_odb(r);
- for (odb = r->objects->odb; odb; odb = odb->next) {
- *path = odb_loose_path(odb, &buf, oid);
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ *path = odb_loose_path(source, &buf, oid);
fd = git_open(*path);
if (fd >= 0)
return fd;
@@ -244,11 +218,11 @@ static int open_loose_object(struct repository *r,
static int quick_has_loose(struct repository *r,
const struct object_id *oid)
{
- struct object_directory *odb;
+ struct odb_source *source;
- prepare_alt_odb(r);
- for (odb = r->objects->odb; odb; odb = odb->next) {
- if (oidtree_contains(odb_loose_cache(odb, oid), oid))
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ if (oidtree_contains(odb_loose_cache(source, oid), oid))
return 1;
}
return 0;
@@ -327,9 +301,8 @@ static void *unpack_loose_rest(git_zstream *stream,
void *buffer, unsigned long size,
const struct object_id *oid)
{
- int bytes = strlen(buffer) + 1;
+ size_t bytes = strlen(buffer) + 1, n;
unsigned char *buf = xmallocz(size);
- unsigned long n;
int status = Z_OK;
n = stream->total_out - bytes;
@@ -448,7 +421,7 @@ int loose_object_info(struct repository *r,
enum object_type type_scratch;
if (oi->delta_base_oid)
- oidclr(oi->delta_base_oid, the_repository->hash_algo);
+ oidclr(oi->delta_base_oid, r->hash_algo);
/*
* If we don't care about type or size, then we don't
@@ -596,7 +569,7 @@ static int check_collision(const char *source, const char *dest)
goto out;
}
- if (sz_a < sizeof(buf_source))
+ if ((size_t) sz_a < sizeof(buf_source))
break;
}
@@ -611,12 +584,14 @@ static int check_collision(const char *source, const char *dest)
/*
* Move the just written object into its final resting place.
*/
-int finalize_object_file(const char *tmpfile, const char *filename)
+int finalize_object_file(struct repository *repo,
+ const char *tmpfile, const char *filename)
{
- return finalize_object_file_flags(tmpfile, filename, 0);
+ return finalize_object_file_flags(repo, tmpfile, filename, 0);
}
-int finalize_object_file_flags(const char *tmpfile, const char *filename,
+int finalize_object_file_flags(struct repository *repo,
+ const char *tmpfile, const char *filename,
enum finalize_object_file_flags flags)
{
unsigned retries = 0;
@@ -676,7 +651,7 @@ int finalize_object_file_flags(const char *tmpfile, const char *filename,
}
out:
- if (adjust_shared_perm(the_repository, filename))
+ if (adjust_shared_perm(repo, filename))
return error(_("unable to set permission to '%s'"), filename);
return 0;
}
@@ -692,9 +667,10 @@ void hash_object_file(const struct git_hash_algo *algo, const void *buf,
}
/* Finalize a file on disk, and close it. */
-static void close_loose_object(int fd, const char *filename)
+static void close_loose_object(struct odb_source *source,
+ int fd, const char *filename)
{
- if (the_repository->objects->odb->will_destroy)
+ if (source->will_destroy)
goto out;
if (batch_fsync_enabled(FSYNC_COMPONENT_LOOSE_OBJECT))
@@ -726,7 +702,8 @@ static inline int directory_size(const char *filename)
* We want to avoid cross-directory filename renames, because those
* can have problems on various filesystems (FAT, NFS, Coda).
*/
-static int create_tmpfile(struct strbuf *tmp, const char *filename)
+static int create_tmpfile(struct repository *repo,
+ struct strbuf *tmp, const char *filename)
{
int fd, dirlen = directory_size(filename);
@@ -745,7 +722,7 @@ static int create_tmpfile(struct strbuf *tmp, const char *filename)
strbuf_add(tmp, filename, dirlen - 1);
if (mkdir(tmp->buf, 0777) && errno != EEXIST)
return -1;
- if (adjust_shared_perm(the_repository, tmp->buf))
+ if (adjust_shared_perm(repo, tmp->buf))
return -1;
/* Try again */
@@ -766,26 +743,26 @@ static int create_tmpfile(struct strbuf *tmp, const char *filename)
* Returns a "fd", which should later be provided to
* end_loose_object_common().
*/
-static int start_loose_object_common(struct strbuf *tmp_file,
+static int start_loose_object_common(struct odb_source *source,
+ struct strbuf *tmp_file,
const char *filename, unsigned flags,
git_zstream *stream,
unsigned char *buf, size_t buflen,
struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
char *hdr, int hdrlen)
{
- struct repository *repo = the_repository;
- const struct git_hash_algo *algo = repo->hash_algo;
- const struct git_hash_algo *compat = repo->compat_hash_algo;
+ const struct git_hash_algo *algo = source->odb->repo->hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
int fd;
- fd = create_tmpfile(tmp_file, filename);
+ fd = create_tmpfile(source->odb->repo, tmp_file, filename);
if (fd < 0) {
- if (flags & WRITE_OBJECT_FILE_SILENT)
+ if (flags & WRITE_OBJECT_SILENT)
return -1;
else if (errno == EACCES)
return error(_("insufficient permission for adding "
"an object to repository database %s"),
- repo_get_object_directory(the_repository));
+ source->path);
else
return error_errno(
_("unable to create temporary file"));
@@ -815,14 +792,14 @@ static int start_loose_object_common(struct strbuf *tmp_file,
* Common steps for the inner git_deflate() loop for writing loose
* objects. Returns what git_deflate() returns.
*/
-static int write_loose_object_common(struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
+static int write_loose_object_common(struct odb_source *source,
+ struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
git_zstream *stream, const int flush,
unsigned char *in0, const int fd,
unsigned char *compressed,
const size_t compressed_len)
{
- struct repository *repo = the_repository;
- const struct git_hash_algo *compat = repo->compat_hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
int ret;
ret = git_deflate(stream, flush ? Z_FINISH : 0);
@@ -843,12 +820,12 @@ static int write_loose_object_common(struct git_hash_ctx *c, struct git_hash_ctx
* - End the compression of zlib stream.
* - Get the calculated oid to "oid".
*/
-static int end_loose_object_common(struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
+static int end_loose_object_common(struct odb_source *source,
+ struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
git_zstream *stream, struct object_id *oid,
struct object_id *compat_oid)
{
- struct repository *repo = the_repository;
- const struct git_hash_algo *compat = repo->compat_hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
int ret;
ret = git_deflate_end_gently(stream);
@@ -861,7 +838,8 @@ static int end_loose_object_common(struct git_hash_ctx *c, struct git_hash_ctx *
return Z_OK;
}
-static int write_loose_object(const struct object_id *oid, char *hdr,
+static int write_loose_object(struct odb_source *source,
+ const struct object_id *oid, char *hdr,
int hdrlen, const void *buf, unsigned long len,
time_t mtime, unsigned flags)
{
@@ -876,9 +854,9 @@ static int write_loose_object(const struct object_id *oid, char *hdr,
if (batch_fsync_enabled(FSYNC_COMPONENT_LOOSE_OBJECT))
prepare_loose_object_bulk_checkin();
- odb_loose_path(the_repository->objects->odb, &filename, oid);
+ odb_loose_path(source, &filename, oid);
- fd = start_loose_object_common(&tmp_file, filename.buf, flags,
+ fd = start_loose_object_common(source, &tmp_file, filename.buf, flags,
&stream, compressed, sizeof(compressed),
&c, NULL, hdr, hdrlen);
if (fd < 0)
@@ -890,14 +868,14 @@ static int write_loose_object(const struct object_id *oid, char *hdr,
do {
unsigned char *in0 = stream.next_in;
- ret = write_loose_object_common(&c, NULL, &stream, 1, in0, fd,
+ ret = write_loose_object_common(source, &c, NULL, &stream, 1, in0, fd,
compressed, sizeof(compressed));
} while (ret == Z_OK);
if (ret != Z_STREAM_END)
die(_("unable to deflate new object %s (%d)"), oid_to_hex(oid),
ret);
- ret = end_loose_object_common(&c, NULL, &stream, ¶no_oid, NULL);
+ ret = end_loose_object_common(source, &c, NULL, &stream, ¶no_oid, NULL);
if (ret != Z_OK)
die(_("deflateEnd on object %s failed (%d)"), oid_to_hex(oid),
ret);
@@ -905,30 +883,36 @@ static int write_loose_object(const struct object_id *oid, char *hdr,
die(_("confused by unstable object source data for %s"),
oid_to_hex(oid));
- close_loose_object(fd, tmp_file.buf);
+ close_loose_object(source, fd, tmp_file.buf);
if (mtime) {
struct utimbuf utb;
utb.actime = mtime;
utb.modtime = mtime;
if (utime(tmp_file.buf, &utb) < 0 &&
- !(flags & WRITE_OBJECT_FILE_SILENT))
+ !(flags & WRITE_OBJECT_SILENT))
warning_errno(_("failed utime() on %s"), tmp_file.buf);
}
- return finalize_object_file_flags(tmp_file.buf, filename.buf,
+ return finalize_object_file_flags(source->odb->repo, tmp_file.buf, filename.buf,
FOF_SKIP_COLLISION_CHECK);
}
-static int freshen_loose_object(const struct object_id *oid)
+static int freshen_loose_object(struct object_database *odb,
+ const struct object_id *oid)
{
- return check_and_freshen(oid, 1);
+ odb_prepare_alternates(odb);
+ for (struct odb_source *source = odb->sources; source; source = source->next)
+ if (check_and_freshen_source(source, oid, 1))
+ return 1;
+ return 0;
}
-static int freshen_packed_object(const struct object_id *oid)
+static int freshen_packed_object(struct object_database *odb,
+ const struct object_id *oid)
{
struct pack_entry e;
- if (!find_pack_entry(the_repository, oid, &e))
+ if (!find_pack_entry(odb->repo, oid, &e))
return 0;
if (e.p->is_cruft)
return 0;
@@ -940,10 +924,11 @@ static int freshen_packed_object(const struct object_id *oid)
return 1;
}
-int stream_loose_object(struct input_stream *in_stream, size_t len,
+int stream_loose_object(struct odb_source *source,
+ struct input_stream *in_stream, size_t len,
struct object_id *oid)
{
- const struct git_hash_algo *compat = the_repository->compat_hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
struct object_id compat_oid;
int fd, ret, err = 0, flush = 0;
unsigned char compressed[4096];
@@ -959,7 +944,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
prepare_loose_object_bulk_checkin();
/* Since oid is not determined, save tmp file to odb path. */
- strbuf_addf(&filename, "%s/", repo_get_object_directory(the_repository));
+ strbuf_addf(&filename, "%s/", source->path);
hdrlen = format_object_header(hdr, sizeof(hdr), OBJ_BLOB, len);
/*
@@ -970,7 +955,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
* - Setup zlib stream for compression.
* - Start to feed header to zlib stream.
*/
- fd = start_loose_object_common(&tmp_file, filename.buf, 0,
+ fd = start_loose_object_common(source, &tmp_file, filename.buf, 0,
&stream, compressed, sizeof(compressed),
&c, &compat_c, hdr, hdrlen);
if (fd < 0) {
@@ -990,7 +975,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
if (in_stream->is_finished)
flush = 1;
}
- ret = write_loose_object_common(&c, &compat_c, &stream, flush, in0, fd,
+ ret = write_loose_object_common(source, &c, &compat_c, &stream, flush, in0, fd,
compressed, sizeof(compressed));
/*
* Unlike write_loose_object(), we do not have the entire
@@ -1013,17 +998,18 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
*/
if (ret != Z_STREAM_END)
die(_("unable to stream deflate new object (%d)"), ret);
- ret = end_loose_object_common(&c, &compat_c, &stream, oid, &compat_oid);
+ ret = end_loose_object_common(source, &c, &compat_c, &stream, oid, &compat_oid);
if (ret != Z_OK)
die(_("deflateEnd on stream object failed (%d)"), ret);
- close_loose_object(fd, tmp_file.buf);
+ close_loose_object(source, fd, tmp_file.buf);
- if (freshen_packed_object(oid) || freshen_loose_object(oid)) {
+ if (freshen_packed_object(source->odb, oid) ||
+ freshen_loose_object(source->odb, oid)) {
unlink_or_warn(tmp_file.buf);
goto cleanup;
}
- odb_loose_path(the_repository->objects->odb, &filename, oid);
+ odb_loose_path(source, &filename, oid);
/* We finally know the object path, and create the missing dir. */
dirlen = directory_size(filename.buf);
@@ -1031,7 +1017,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
struct strbuf dir = STRBUF_INIT;
strbuf_add(&dir, filename.buf, dirlen);
- if (safe_create_dir_in_gitdir(the_repository, dir.buf) &&
+ if (safe_create_dir_in_gitdir(source->odb->repo, dir.buf) &&
errno != EEXIST) {
err = error_errno(_("unable to create directory %s"), dir.buf);
strbuf_release(&dir);
@@ -1040,23 +1026,23 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
strbuf_release(&dir);
}
- err = finalize_object_file_flags(tmp_file.buf, filename.buf,
+ err = finalize_object_file_flags(source->odb->repo, tmp_file.buf, filename.buf,
FOF_SKIP_COLLISION_CHECK);
if (!err && compat)
- err = repo_add_loose_object_map(the_repository, oid, &compat_oid);
+ err = repo_add_loose_object_map(source, oid, &compat_oid);
cleanup:
strbuf_release(&tmp_file);
strbuf_release(&filename);
return err;
}
-int write_object_file_flags(const void *buf, unsigned long len,
- enum object_type type, struct object_id *oid,
- struct object_id *compat_oid_in, unsigned flags)
+int write_object_file(struct odb_source *source,
+ const void *buf, unsigned long len,
+ enum object_type type, struct object_id *oid,
+ struct object_id *compat_oid_in, unsigned flags)
{
- struct repository *repo = the_repository;
- const struct git_hash_algo *algo = repo->hash_algo;
- const struct git_hash_algo *compat = repo->compat_hash_algo;
+ const struct git_hash_algo *algo = source->odb->repo->hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
struct object_id compat_oid;
char hdr[MAX_HEADER_LEN];
int hdrlen = sizeof(hdr);
@@ -1069,7 +1055,7 @@ int write_object_file_flags(const void *buf, unsigned long len,
hash_object_file(compat, buf, len, type, &compat_oid);
else {
struct strbuf converted = STRBUF_INIT;
- convert_object_file(the_repository, &converted, algo, compat,
+ convert_object_file(source->odb->repo, &converted, algo, compat,
buf, len, type, 0);
hash_object_file(compat, converted.buf, converted.len,
type, &compat_oid);
@@ -1081,19 +1067,20 @@ int write_object_file_flags(const void *buf, unsigned long len,
* it out into .git/objects/??/?{38} file.
*/
write_object_file_prepare(algo, buf, len, type, oid, hdr, &hdrlen);
- if (freshen_packed_object(oid) || freshen_loose_object(oid))
+ if (freshen_packed_object(source->odb, oid) ||
+ freshen_loose_object(source->odb, oid))
return 0;
- if (write_loose_object(oid, hdr, hdrlen, buf, len, 0, flags))
+ if (write_loose_object(source, oid, hdr, hdrlen, buf, len, 0, flags))
return -1;
if (compat)
- return repo_add_loose_object_map(repo, oid, &compat_oid);
+ return repo_add_loose_object_map(source, oid, &compat_oid);
return 0;
}
-int force_object_loose(const struct object_id *oid, time_t mtime)
+int force_object_loose(struct odb_source *source,
+ const struct object_id *oid, time_t mtime)
{
- struct repository *repo = the_repository;
- const struct git_hash_algo *compat = repo->compat_hash_algo;
+ const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
void *buf;
unsigned long len;
struct object_info oi = OBJECT_INFO_INIT;
@@ -1103,22 +1090,24 @@ int force_object_loose(const struct object_id *oid, time_t mtime)
int hdrlen;
int ret;
- if (has_loose_object(oid))
- return 0;
+ for (struct odb_source *s = source->odb->sources; s; s = s->next)
+ if (has_loose_object(s, oid))
+ return 0;
+
oi.typep = &type;
oi.sizep = &len;
oi.contentp = &buf;
- if (oid_object_info_extended(the_repository, oid, &oi, 0))
+ if (odb_read_object_info_extended(source->odb, oid, &oi, 0))
return error(_("cannot read object for %s"), oid_to_hex(oid));
if (compat) {
- if (repo_oid_to_algop(repo, oid, compat, &compat_oid))
+ if (repo_oid_to_algop(source->odb->repo, oid, compat, &compat_oid))
return error(_("cannot map object %s to %s"),
oid_to_hex(oid), compat->name);
}
hdrlen = format_object_header(hdr, sizeof(hdr), type, len);
- ret = write_loose_object(oid, hdr, hdrlen, buf, len, mtime, 0);
+ ret = write_loose_object(source, oid, hdr, hdrlen, buf, len, mtime, 0);
if (!ret && compat)
- ret = repo_add_loose_object_map(the_repository, oid, &compat_oid);
+ ret = repo_add_loose_object_map(source, oid, &compat_oid);
free(buf);
return ret;
@@ -1168,15 +1157,15 @@ static int index_mem(struct index_state *istate,
opts.strict = 1;
opts.error_func = hash_format_check_report;
- if (fsck_buffer(null_oid(the_hash_algo), type, buf, size, &opts))
+ if (fsck_buffer(null_oid(istate->repo->hash_algo), type, buf, size, &opts))
die(_("refusing to create malformed object"));
fsck_finish(&opts);
}
if (write_object)
- ret = write_object_file(buf, size, type, oid);
+ ret = odb_write_object(istate->repo->objects, buf, size, type, oid);
else
- hash_object_file(the_hash_algo, buf, size, type, oid);
+ hash_object_file(istate->repo->hash_algo, buf, size, type, oid);
strbuf_release(&nbuf);
return ret;
@@ -1199,10 +1188,10 @@ static int index_stream_convert_blob(struct index_state *istate,
get_conv_flags(flags));
if (write_object)
- ret = write_object_file(sbuf.buf, sbuf.len, OBJ_BLOB,
- oid);
+ ret = odb_write_object(istate->repo->objects, sbuf.buf, sbuf.len, OBJ_BLOB,
+ oid);
else
- hash_object_file(the_hash_algo, sbuf.buf, sbuf.len, OBJ_BLOB,
+ hash_object_file(istate->repo->hash_algo, sbuf.buf, sbuf.len, OBJ_BLOB,
oid);
strbuf_release(&sbuf);
return ret;
@@ -1240,7 +1229,7 @@ static int index_core(struct index_state *istate,
if (read_result < 0)
ret = error_errno(_("read error while indexing %s"),
path ? path : "<unknown>");
- else if (read_result != size)
+ else if ((size_t) read_result != size)
ret = error(_("short read while indexing %s"),
path ? path : "<unknown>");
else
@@ -1268,7 +1257,7 @@ int index_fd(struct index_state *istate, struct object_id *oid,
ret = index_stream_convert_blob(istate, oid, fd, path, flags);
else if (!S_ISREG(st->st_mode))
ret = index_pipe(istate, oid, fd, type, path, flags);
- else if (st->st_size <= repo_settings_get_big_file_threshold(the_repository) ||
+ else if ((st->st_size >= 0 && (size_t) st->st_size <= repo_settings_get_big_file_threshold(istate->repo)) ||
type != OBJ_BLOB ||
(path && would_convert_to_git(istate, path)))
ret = index_core(istate, oid, fd, xsize_t(st->st_size),
@@ -1300,14 +1289,14 @@ int index_path(struct index_state *istate, struct object_id *oid,
if (strbuf_readlink(&sb, path, st->st_size))
return error_errno("readlink(\"%s\")", path);
if (!(flags & INDEX_WRITE_OBJECT))
- hash_object_file(the_hash_algo, sb.buf, sb.len,
+ hash_object_file(istate->repo->hash_algo, sb.buf, sb.len,
OBJ_BLOB, oid);
- else if (write_object_file(sb.buf, sb.len, OBJ_BLOB, oid))
+ else if (odb_write_object(istate->repo->objects, sb.buf, sb.len, OBJ_BLOB, oid))
rc = error(_("%s: failed to insert into database"), path);
strbuf_release(&sb);
break;
case S_IFDIR:
- return repo_resolve_gitlink_ref(the_repository, path, "HEAD", oid);
+ return repo_resolve_gitlink_ref(istate->repo, path, "HEAD", oid);
default:
return error(_("%s: unsupported file type"), path);
}
@@ -1329,12 +1318,13 @@ int read_pack_header(int fd, struct pack_header *header)
return 0;
}
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
- struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data)
+static int for_each_file_in_obj_subdir(unsigned int subdir_nr,
+ struct strbuf *path,
+ const struct git_hash_algo *algop,
+ each_loose_object_fn obj_cb,
+ each_loose_cruft_fn cruft_cb,
+ each_loose_subdir_fn subdir_cb,
+ void *data)
{
size_t origlen, baselen;
DIR *dir;
@@ -1367,12 +1357,12 @@ int for_each_file_in_obj_subdir(unsigned int subdir_nr,
namelen = strlen(de->d_name);
strbuf_setlen(path, baselen);
strbuf_add(path, de->d_name, namelen);
- if (namelen == the_hash_algo->hexsz - 2 &&
+ if (namelen == algop->hexsz - 2 &&
!hex_to_bytes(oid.hash + 1, de->d_name,
- the_hash_algo->rawsz - 1)) {
- oid_set_algo(&oid, the_hash_algo);
- memset(oid.hash + the_hash_algo->rawsz, 0,
- GIT_MAX_RAWSZ - the_hash_algo->rawsz);
+ algop->rawsz - 1)) {
+ oid_set_algo(&oid, algop);
+ memset(oid.hash + algop->rawsz, 0,
+ GIT_MAX_RAWSZ - algop->rawsz);
if (obj_cb) {
r = obj_cb(&oid, path->buf, data);
if (r)
@@ -1398,26 +1388,7 @@ int for_each_file_in_obj_subdir(unsigned int subdir_nr,
return r;
}
-int for_each_loose_file_in_objdir_buf(struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data)
-{
- int r = 0;
- int i;
-
- for (i = 0; i < 256; i++) {
- r = for_each_file_in_obj_subdir(i, path, obj_cb, cruft_cb,
- subdir_cb, data);
- if (r)
- break;
- }
-
- return r;
-}
-
-int for_each_loose_file_in_objdir(const char *path,
+int for_each_loose_file_in_source(struct odb_source *source,
each_loose_object_fn obj_cb,
each_loose_cruft_fn cruft_cb,
each_loose_subdir_fn subdir_cb,
@@ -1426,22 +1397,27 @@ int for_each_loose_file_in_objdir(const char *path,
struct strbuf buf = STRBUF_INIT;
int r;
- strbuf_addstr(&buf, path);
- r = for_each_loose_file_in_objdir_buf(&buf, obj_cb, cruft_cb,
- subdir_cb, data);
- strbuf_release(&buf);
+ strbuf_addstr(&buf, source->path);
+ for (int i = 0; i < 256; i++) {
+ r = for_each_file_in_obj_subdir(i, &buf, source->odb->repo->hash_algo,
+ obj_cb, cruft_cb, subdir_cb, data);
+ if (r)
+ break;
+ }
+ strbuf_release(&buf);
return r;
}
-int for_each_loose_object(each_loose_object_fn cb, void *data,
+int for_each_loose_object(struct object_database *odb,
+ each_loose_object_fn cb, void *data,
enum for_each_object_flags flags)
{
- struct object_directory *odb;
+ struct odb_source *source;
- prepare_alt_odb(the_repository);
- for (odb = the_repository->objects->odb; odb; odb = odb->next) {
- int r = for_each_loose_file_in_objdir(odb->path, cb, NULL,
+ odb_prepare_alternates(odb);
+ for (source = odb->sources; source; source = source->next) {
+ int r = for_each_loose_file_in_source(source, cb, NULL,
NULL, data);
if (r)
return r;
@@ -1461,50 +1437,52 @@ static int append_loose_object(const struct object_id *oid,
return 0;
}
-struct oidtree *odb_loose_cache(struct object_directory *odb,
- const struct object_id *oid)
+struct oidtree *odb_loose_cache(struct odb_source *source,
+ const struct object_id *oid)
{
int subdir_nr = oid->hash[0];
struct strbuf buf = STRBUF_INIT;
- size_t word_bits = bitsizeof(odb->loose_objects_subdir_seen[0]);
+ size_t word_bits = bitsizeof(source->loose_objects_subdir_seen[0]);
size_t word_index = subdir_nr / word_bits;
size_t mask = (size_t)1u << (subdir_nr % word_bits);
uint32_t *bitmap;
if (subdir_nr < 0 ||
- subdir_nr >= bitsizeof(odb->loose_objects_subdir_seen))
+ (size_t) subdir_nr >= bitsizeof(source->loose_objects_subdir_seen))
BUG("subdir_nr out of range");
- bitmap = &odb->loose_objects_subdir_seen[word_index];
+ bitmap = &source->loose_objects_subdir_seen[word_index];
if (*bitmap & mask)
- return odb->loose_objects_cache;
- if (!odb->loose_objects_cache) {
- ALLOC_ARRAY(odb->loose_objects_cache, 1);
- oidtree_init(odb->loose_objects_cache);
+ return source->loose_objects_cache;
+ if (!source->loose_objects_cache) {
+ ALLOC_ARRAY(source->loose_objects_cache, 1);
+ oidtree_init(source->loose_objects_cache);
}
- strbuf_addstr(&buf, odb->path);
+ strbuf_addstr(&buf, source->path);
for_each_file_in_obj_subdir(subdir_nr, &buf,
+ source->odb->repo->hash_algo,
append_loose_object,
NULL, NULL,
- odb->loose_objects_cache);
+ source->loose_objects_cache);
*bitmap |= mask;
strbuf_release(&buf);
- return odb->loose_objects_cache;
+ return source->loose_objects_cache;
}
-void odb_clear_loose_cache(struct object_directory *odb)
+void odb_clear_loose_cache(struct odb_source *source)
{
- oidtree_clear(odb->loose_objects_cache);
- FREE_AND_NULL(odb->loose_objects_cache);
- memset(&odb->loose_objects_subdir_seen, 0,
- sizeof(odb->loose_objects_subdir_seen));
+ oidtree_clear(source->loose_objects_cache);
+ FREE_AND_NULL(source->loose_objects_cache);
+ memset(&source->loose_objects_subdir_seen, 0,
+ sizeof(source->loose_objects_subdir_seen));
}
static int check_stream_oid(git_zstream *stream,
const char *hdr,
unsigned long size,
const char *path,
- const struct object_id *expected_oid)
+ const struct object_id *expected_oid,
+ const struct git_hash_algo *algop)
{
struct git_hash_ctx c;
struct object_id real_oid;
@@ -1512,7 +1490,7 @@ static int check_stream_oid(git_zstream *stream,
unsigned long total_read;
int status = Z_OK;
- the_hash_algo->init_fn(&c);
+ algop->init_fn(&c);
git_hash_update(&c, hdr, stream->total_out);
/*
@@ -1557,7 +1535,8 @@ static int check_stream_oid(git_zstream *stream,
return 0;
}
-int read_loose_object(const char *path,
+int read_loose_object(struct repository *repo,
+ const char *path,
const struct object_id *expected_oid,
struct object_id *real_oid,
void **contents,
@@ -1596,8 +1575,9 @@ int read_loose_object(const char *path,
}
if (*oi->typep == OBJ_BLOB &&
- *size > repo_settings_get_big_file_threshold(the_repository)) {
- if (check_stream_oid(&stream, hdr, *size, path, expected_oid) < 0)
+ *size > repo_settings_get_big_file_threshold(repo)) {
+ if (check_stream_oid(&stream, hdr, *size, path, expected_oid,
+ repo->hash_algo) < 0)
goto out_inflate;
} else {
*contents = unpack_loose_rest(&stream, hdr, *size, expected_oid);
@@ -1605,7 +1585,7 @@ int read_loose_object(const char *path,
error(_("unable to unpack contents of %s"), path);
goto out_inflate;
}
- hash_object_file(the_repository->hash_algo,
+ hash_object_file(repo->hash_algo,
*contents, *size,
*oi->typep, real_oid);
if (!oideq(expected_oid, real_oid))
diff --git a/object-file.h b/object-file.h
index 6f41142..15d9763 100644
--- a/object-file.h
+++ b/object-file.h
@@ -3,12 +3,12 @@
#include "git-zlib.h"
#include "object.h"
-#include "object-store.h"
+#include "odb.h"
struct index_state;
/*
- * Set this to 0 to prevent oid_object_info_extended() from fetching missing
+ * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing
* blobs. This has a difference only if extensions.partialClone is set.
*
* Its default value is 1.
@@ -24,34 +24,33 @@ enum {
int index_fd(struct index_state *istate, struct object_id *oid, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags);
int index_path(struct index_state *istate, struct object_id *oid, const char *path, struct stat *st, unsigned flags);
-struct object_directory;
+struct odb_source;
/*
* Populate and return the loose object cache array corresponding to the
* given object ID.
*/
-struct oidtree *odb_loose_cache(struct object_directory *odb,
+struct oidtree *odb_loose_cache(struct odb_source *source,
const struct object_id *oid);
/* Empty the loose object cache for the specified object directory. */
-void odb_clear_loose_cache(struct object_directory *odb);
+void odb_clear_loose_cache(struct odb_source *source);
/*
* Put in `buf` the name of the file in the local object database that
* would be used to store a loose object with the specified oid.
*/
-const char *odb_loose_path(struct object_directory *odb,
+const char *odb_loose_path(struct odb_source *source,
struct strbuf *buf,
const struct object_id *oid);
/*
- * Return true iff an alternate object database has a loose object
+ * Return true iff an object database source has a loose object
* with the specified name. This function does not respect replace
* references.
*/
-int has_loose_object_nonlocal(const struct object_id *);
-
-int has_loose_object(const struct object_id *);
+int has_loose_object(struct odb_source *source,
+ const struct object_id *oid);
void *map_loose_object(struct repository *r, const struct object_id *oid,
unsigned long *size);
@@ -87,22 +86,11 @@ typedef int each_loose_cruft_fn(const char *basename,
typedef int each_loose_subdir_fn(unsigned int nr,
const char *path,
void *data);
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
- struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
-int for_each_loose_file_in_objdir(const char *path,
+int for_each_loose_file_in_source(struct odb_source *source,
each_loose_object_fn obj_cb,
each_loose_cruft_fn cruft_cb,
each_loose_subdir_fn subdir_cb,
void *data);
-int for_each_loose_file_in_objdir_buf(struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
/*
* Iterate over all accessible loose objects without respect to
@@ -111,7 +99,8 @@ int for_each_loose_file_in_objdir_buf(struct strbuf *path,
*
* Any flags specific to packs are ignored.
*/
-int for_each_loose_object(each_loose_object_fn, void *,
+int for_each_loose_object(struct object_database *odb,
+ each_loose_object_fn, void *,
enum for_each_object_flags flags);
@@ -157,29 +146,10 @@ enum unpack_loose_header_result unpack_loose_header(git_zstream *stream,
struct object_info;
int parse_loose_header(const char *hdr, struct object_info *oi);
-enum {
- /*
- * By default, `write_object_file()` does not actually write
- * anything into the object store, but only computes the object ID.
- * This flag changes that so that the object will be written as a loose
- * object and persisted.
- */
- WRITE_OBJECT_FILE_PERSIST = (1 << 0),
-
- /*
- * Do not print an error in case something gose wrong.
- */
- WRITE_OBJECT_FILE_SILENT = (1 << 1),
-};
-
-int write_object_file_flags(const void *buf, unsigned long len,
- enum object_type type, struct object_id *oid,
- struct object_id *compat_oid_in, unsigned flags);
-static inline int write_object_file(const void *buf, unsigned long len,
- enum object_type type, struct object_id *oid)
-{
- return write_object_file_flags(buf, len, type, oid, NULL, 0);
-}
+int write_object_file(struct odb_source *source,
+ const void *buf, unsigned long len,
+ enum object_type type, struct object_id *oid,
+ struct object_id *compat_oid_in, unsigned flags);
struct input_stream {
const void *(*read)(struct input_stream *, unsigned long *len);
@@ -187,10 +157,12 @@ struct input_stream {
int is_finished;
};
-int stream_loose_object(struct input_stream *in_stream, size_t len,
+int stream_loose_object(struct odb_source *source,
+ struct input_stream *in_stream, size_t len,
struct object_id *oid);
-int force_object_loose(const struct object_id *oid, time_t mtime);
+int force_object_loose(struct odb_source *source,
+ const struct object_id *oid, time_t mtime);
/**
* With in-core object data in "buf", rehash it to make sure the
@@ -218,8 +190,10 @@ enum finalize_object_file_flags {
FOF_SKIP_COLLISION_CHECK = 1,
};
-int finalize_object_file(const char *tmpfile, const char *filename);
-int finalize_object_file_flags(const char *tmpfile, const char *filename,
+int finalize_object_file(struct repository *repo,
+ const char *tmpfile, const char *filename);
+int finalize_object_file_flags(struct repository *repo,
+ const char *tmpfile, const char *filename,
enum finalize_object_file_flags flags);
void hash_object_file(const struct git_hash_algo *algo, const void *buf,
@@ -237,7 +211,8 @@ int check_and_freshen_file(const char *fn, int freshen);
*
* Returns 0 on success, negative on error (details may be written to stderr).
*/
-int read_loose_object(const char *path,
+int read_loose_object(struct repository *repo,
+ const char *path,
const struct object_id *expected_oid,
struct object_id *real_oid,
void **contents,
diff --git a/object-name.c b/object-name.c
index 9288b2d..11aa0e6 100644
--- a/object-name.c
+++ b/object-name.c
@@ -28,6 +28,7 @@
#include "commit-reach.h"
#include "date.h"
#include "object-file-convert.h"
+#include "prio-queue.h"
static int get_oid_oneline(struct repository *r, const char *, struct object_id *,
const struct commit_list *);
@@ -112,10 +113,10 @@ static enum cb_next match_prefix(const struct object_id *oid, void *arg)
static void find_short_object_filename(struct disambiguate_state *ds)
{
- struct object_directory *odb;
+ struct odb_source *source;
- for (odb = ds->repo->objects->odb; odb && !ds->ambiguous; odb = odb->next)
- oidtree_each(odb_loose_cache(odb, &ds->bin_pfx),
+ for (source = ds->repo->objects->sources; source && !ds->ambiguous; source = source->next)
+ oidtree_each(odb_loose_cache(source, &ds->bin_pfx),
&ds->bin_pfx, ds->len, match_prefix, ds);
}
@@ -198,16 +199,20 @@ static void unique_in_pack(struct packed_git *p,
static void find_short_packed_object(struct disambiguate_state *ds)
{
- struct multi_pack_index *m;
+ struct odb_source *source;
struct packed_git *p;
/* Skip, unless oids from the storage hash algorithm are wanted */
if (ds->bin_pfx.algo && (&hash_algos[ds->bin_pfx.algo] != ds->repo->hash_algo))
return;
- for (m = get_multi_pack_index(ds->repo); m && !ds->ambiguous;
- m = m->next)
- unique_in_midx(m, ds);
+ odb_prepare_alternates(ds->repo->objects);
+ for (source = ds->repo->objects->sources; source && !ds->ambiguous; source = source->next) {
+ struct multi_pack_index *m = get_multi_pack_index(source);
+ if (m)
+ unique_in_midx(m, ds);
+ }
+
for (p = get_packed_git(ds->repo); p && !ds->ambiguous;
p = p->next)
unique_in_pack(p, ds);
@@ -251,7 +256,7 @@ static int disambiguate_commit_only(struct repository *r,
const struct object_id *oid,
void *cb_data UNUSED)
{
- int kind = oid_object_info(r, oid, NULL);
+ int kind = odb_read_object_info(r->objects, oid, NULL);
return kind == OBJ_COMMIT;
}
@@ -262,7 +267,7 @@ static int disambiguate_committish_only(struct repository *r,
struct object *obj;
int kind;
- kind = oid_object_info(r, oid, NULL);
+ kind = odb_read_object_info(r->objects, oid, NULL);
if (kind == OBJ_COMMIT)
return 1;
if (kind != OBJ_TAG)
@@ -279,7 +284,7 @@ static int disambiguate_tree_only(struct repository *r,
const struct object_id *oid,
void *cb_data UNUSED)
{
- int kind = oid_object_info(r, oid, NULL);
+ int kind = odb_read_object_info(r->objects, oid, NULL);
return kind == OBJ_TREE;
}
@@ -290,7 +295,7 @@ static int disambiguate_treeish_only(struct repository *r,
struct object *obj;
int kind;
- kind = oid_object_info(r, oid, NULL);
+ kind = odb_read_object_info(r->objects, oid, NULL);
if (kind == OBJ_TREE || kind == OBJ_COMMIT)
return 1;
if (kind != OBJ_TAG)
@@ -307,7 +312,7 @@ static int disambiguate_blob_only(struct repository *r,
const struct object_id *oid,
void *cb_data UNUSED)
{
- int kind = oid_object_info(r, oid, NULL);
+ int kind = odb_read_object_info(r->objects, oid, NULL);
return kind == OBJ_BLOB;
}
@@ -376,7 +381,7 @@ static int init_object_disambiguation(struct repository *r,
ds->hex_pfx[len] = '\0';
ds->repo = r;
ds->bin_pfx.algo = algo ? hash_algo_by_ptr(algo) : GIT_HASH_UNKNOWN;
- prepare_alt_odb(r);
+ odb_prepare_alternates(r->objects);
return 0;
}
@@ -399,7 +404,7 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
return 0;
hash = repo_find_unique_abbrev(ds->repo, oid, DEFAULT_ABBREV);
- type = oid_object_info(ds->repo, oid, NULL);
+ type = odb_read_object_info(ds->repo->objects, oid, NULL);
if (type < 0) {
/*
@@ -514,8 +519,8 @@ static int sort_ambiguous(const void *va, const void *vb, void *ctx)
{
struct repository *sort_ambiguous_repo = ctx;
const struct object_id *a = va, *b = vb;
- int a_type = oid_object_info(sort_ambiguous_repo, a, NULL);
- int b_type = oid_object_info(sort_ambiguous_repo, b, NULL);
+ int a_type = odb_read_object_info(sort_ambiguous_repo->objects, a, NULL);
+ int b_type = odb_read_object_info(sort_ambiguous_repo->objects, b, NULL);
int a_type_sort;
int b_type_sort;
@@ -792,11 +797,15 @@ static void find_abbrev_len_for_pack(struct packed_git *p,
static void find_abbrev_len_packed(struct min_abbrev_data *mad)
{
- struct multi_pack_index *m;
struct packed_git *p;
- for (m = get_multi_pack_index(mad->repo); m; m = m->next)
- find_abbrev_len_for_midx(m, mad);
+ odb_prepare_alternates(mad->repo->objects);
+ for (struct odb_source *source = mad->repo->objects->sources; source; source = source->next) {
+ struct multi_pack_index *m = get_multi_pack_index(source);
+ if (m)
+ find_abbrev_len_for_midx(m, mad);
+ }
+
for (p = get_packed_git(mad->repo); p; p = p->next)
find_abbrev_len_for_pack(p, mad);
}
@@ -1081,13 +1090,17 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
* still fill in the oid with the "old" value,
* which we can use.
*/
- } else {
+ } else if (!(flags & GET_OID_GENTLY)) {
if (flags & GET_OID_QUIETLY) {
exit(128);
}
die(_("log for '%.*s' only has %d entries"),
len, str, co_cnt);
}
+ if (flags & GET_OID_GENTLY) {
+ free(real_ref);
+ return -1;
+ }
}
}
@@ -1457,7 +1470,7 @@ static int get_oid_oneline(struct repository *r,
const char *prefix, struct object_id *oid,
const struct commit_list *list)
{
- struct commit_list *copy = NULL, **copy_tail = ©
+ struct prio_queue copy = { compare_commits_by_commit_date };
const struct commit_list *l;
int found = 0;
int negative = 0;
@@ -1479,9 +1492,9 @@ static int get_oid_oneline(struct repository *r,
for (l = list; l; l = l->next) {
l->item->object.flags |= ONELINE_SEEN;
- copy_tail = &commit_list_insert(l->item, copy_tail)->next;
+ prio_queue_put(©, l->item);
}
- while (copy) {
+ while (copy.nr) {
const char *p, *buf;
struct commit *commit;
int matches;
@@ -1503,7 +1516,7 @@ static int get_oid_oneline(struct repository *r,
regfree(®ex);
for (l = list; l; l = l->next)
clear_commit_marks(l->item, ONELINE_SEEN);
- free_commit_list(copy);
+ clear_prio_queue(©);
return found ? 0 : -1;
}
@@ -2057,7 +2070,6 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
cb.list = &list;
refs_for_each_ref(get_main_ref_store(repo), handle_one_ref, &cb);
refs_head_ref(get_main_ref_store(repo), handle_one_ref, &cb);
- commit_list_sort_by_date(&list);
ret = get_oid_oneline(repo, name + 2, oid, list);
free_commit_list(list);
diff --git a/object-store.h b/object-store.h
deleted file mode 100644
index c589008..0000000
--- a/object-store.h
+++ /dev/null
@@ -1,338 +0,0 @@
-#ifndef OBJECT_STORE_H
-#define OBJECT_STORE_H
-
-#include "hashmap.h"
-#include "object.h"
-#include "list.h"
-#include "oidset.h"
-#include "oidmap.h"
-#include "thread-utils.h"
-
-struct oidmap;
-struct oidtree;
-struct strbuf;
-struct repository;
-
-struct object_directory {
- struct object_directory *next;
-
- /*
- * Used to store the results of readdir(3) calls when we are OK
- * sacrificing accuracy due to races for speed. That includes
- * object existence with OBJECT_INFO_QUICK, as well as
- * our search for unique abbreviated hashes. Don't use it for tasks
- * requiring greater accuracy!
- *
- * Be sure to call odb_load_loose_cache() before using.
- */
- uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
- struct oidtree *loose_objects_cache;
-
- /* Map between object IDs for loose objects. */
- struct loose_object_map *loose_map;
-
- /*
- * This is a temporary object store created by the tmp_objdir
- * facility. Disable ref updates since the objects in the store
- * might be discarded on rollback.
- */
- int disable_ref_updates;
-
- /*
- * This object store is ephemeral, so there is no need to fsync.
- */
- int will_destroy;
-
- /*
- * Path to the alternative object store. If this is a relative path,
- * it is relative to the current working directory.
- */
- char *path;
-};
-
-void prepare_alt_odb(struct repository *r);
-int has_alt_odb(struct repository *r);
-char *compute_alternate_path(const char *path, struct strbuf *err);
-struct object_directory *find_odb(struct repository *r, const char *obj_dir);
-typedef int alt_odb_fn(struct object_directory *, void *);
-int foreach_alt_odb(alt_odb_fn, void*);
-typedef void alternate_ref_fn(const struct object_id *oid, void *);
-void for_each_alternate_ref(alternate_ref_fn, void *);
-
-/*
- * Add the directory to the on-disk alternates file; the new entry will also
- * take effect in the current process.
- */
-void add_to_alternates_file(const char *dir);
-
-/*
- * Add the directory to the in-memory list of alternates (along with any
- * recursive alternates it points to), but do not modify the on-disk alternates
- * file.
- */
-void add_to_alternates_memory(const char *dir);
-
-/*
- * Replace the current writable object directory with the specified temporary
- * object directory; returns the former primary object directory.
- */
-struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy);
-
-/*
- * Restore a previous ODB replaced by set_temporary_main_odb.
- */
-void restore_primary_odb(struct object_directory *restore_odb, const char *old_path);
-
-struct packed_git;
-struct multi_pack_index;
-struct cached_object_entry;
-
-struct raw_object_store {
- /*
- * Set of all object directories; the main directory is first (and
- * cannot be NULL after initialization). Subsequent directories are
- * alternates.
- */
- struct object_directory *odb;
- struct object_directory **odb_tail;
- struct kh_odb_path_map *odb_by_path;
-
- int loaded_alternates;
-
- /*
- * A list of alternate object directories loaded from the environment;
- * this should not generally need to be accessed directly, but will
- * populate the "odb" list when prepare_alt_odb() is run.
- */
- char *alternate_db;
-
- /*
- * Objects that should be substituted by other objects
- * (see git-replace(1)).
- */
- struct oidmap replace_map;
- unsigned replace_map_initialized : 1;
- pthread_mutex_t replace_mutex; /* protect object replace functions */
-
- struct commit_graph *commit_graph;
- unsigned commit_graph_attempted : 1; /* if loading has been attempted */
-
- /*
- * private data
- *
- * should only be accessed directly by packfile.c and midx.c
- */
- struct multi_pack_index *multi_pack_index;
-
- /*
- * private data
- *
- * should only be accessed directly by packfile.c
- */
-
- struct packed_git *packed_git;
- /* A most-recently-used ordered version of the packed_git list. */
- struct list_head packed_git_mru;
-
- struct {
- struct packed_git **packs;
- unsigned flags;
- } kept_pack_cache;
-
- /*
- * This is meant to hold a *small* number of objects that you would
- * want repo_read_object_file() to be able to return, but yet you do not want
- * to write them into the object store (e.g. a browse-only
- * application).
- */
- struct cached_object_entry *cached_objects;
- size_t cached_object_nr, cached_object_alloc;
-
- /*
- * A map of packfiles to packed_git structs for tracking which
- * packs have been loaded already.
- */
- struct hashmap pack_map;
-
- /*
- * A fast, rough count of the number of objects in the repository.
- * These two fields are not meant for direct access. Use
- * repo_approximate_object_count() instead.
- */
- unsigned long approximate_object_count;
- unsigned approximate_object_count_valid : 1;
-
- /*
- * Whether packed_git has already been populated with this repository's
- * packs.
- */
- unsigned packed_git_initialized : 1;
-};
-
-struct raw_object_store *raw_object_store_new(void);
-void raw_object_store_clear(struct raw_object_store *o);
-
-/*
- * Create a temporary file rooted in the object database directory, or
- * die on failure. The filename is taken from "pattern", which should have the
- * usual "XXXXXX" trailer, and the resulting filename is written into the
- * "template" buffer. Returns the open descriptor.
- */
-int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
-
-void *repo_read_object_file(struct repository *r,
- const struct object_id *oid,
- enum object_type *type,
- unsigned long *size);
-
-/* Read and unpack an object file into memory, write memory to an object file */
-int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
-
-/*
- * Add an object file to the in-memory object store, without writing it
- * to disk.
- *
- * Callers are responsible for calling write_object_file to record the
- * object in persistent storage before writing any other new objects
- * that reference it.
- */
-int pretend_object_file(struct repository *repo,
- void *buf, unsigned long len, enum object_type type,
- struct object_id *oid);
-
-struct object_info {
- /* Request */
- enum object_type *typep;
- unsigned long *sizep;
- off_t *disk_sizep;
- struct object_id *delta_base_oid;
- void **contentp;
-
- /* Response */
- enum {
- OI_CACHED,
- OI_LOOSE,
- OI_PACKED,
- OI_DBCACHED
- } whence;
- union {
- /*
- * struct {
- * ... Nothing to expose in this case
- * } cached;
- * struct {
- * ... Nothing to expose in this case
- * } loose;
- */
- struct {
- struct packed_git *pack;
- off_t offset;
- unsigned int is_delta;
- } packed;
- } u;
-};
-
-/*
- * Initializer for a "struct object_info" that wants no items. You may
- * also memset() the memory to all-zeroes.
- */
-#define OBJECT_INFO_INIT { 0 }
-
-/* Invoke lookup_replace_object() on the given hash */
-#define OBJECT_INFO_LOOKUP_REPLACE 1
-/* Do not retry packed storage after checking packed and loose storage */
-#define OBJECT_INFO_QUICK 8
-/*
- * Do not attempt to fetch the object if missing (even if fetch_is_missing is
- * nonzero).
- */
-#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
-/*
- * This is meant for bulk prefetching of missing blobs in a partial
- * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
- */
-#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
-
-/* Die if object corruption (not just an object being missing) was detected. */
-#define OBJECT_INFO_DIE_IF_CORRUPT 32
-
-int oid_object_info_extended(struct repository *r,
- const struct object_id *,
- struct object_info *, unsigned flags);
-
-enum {
- /* Retry packed storage after checking packed and loose storage */
- HAS_OBJECT_RECHECK_PACKED = (1 << 0),
- /* Allow fetching the object in case the repository has a promisor remote. */
- HAS_OBJECT_FETCH_PROMISOR = (1 << 1),
-};
-
-/*
- * Returns 1 if the object exists. This function will not lazily fetch objects
- * in a partial clone by default.
- */
-int has_object(struct repository *r, const struct object_id *oid,
- unsigned flags);
-
-void assert_oid_type(const struct object_id *oid, enum object_type expect);
-
-/*
- * Enabling the object read lock allows multiple threads to safely call the
- * following functions in parallel: repo_read_object_file(),
- * read_object_with_reference(), oid_object_info() and oid_object_info_extended().
- *
- * obj_read_lock() and obj_read_unlock() may also be used to protect other
- * section which cannot execute in parallel with object reading. Since the used
- * lock is a recursive mutex, these sections can even contain calls to object
- * reading functions. However, beware that in these cases zlib inflation won't
- * be performed in parallel, losing performance.
- *
- * TODO: oid_object_info_extended()'s call stack has a recursive behavior. If
- * any of its callees end up calling it, this recursive call won't benefit from
- * parallel inflation.
- */
-void enable_obj_read_lock(void);
-void disable_obj_read_lock(void);
-
-extern int obj_read_use_lock;
-extern pthread_mutex_t obj_read_mutex;
-
-static inline void obj_read_lock(void)
-{
- if(obj_read_use_lock)
- pthread_mutex_lock(&obj_read_mutex);
-}
-
-static inline void obj_read_unlock(void)
-{
- if(obj_read_use_lock)
- pthread_mutex_unlock(&obj_read_mutex);
-}
-/* Flags for for_each_*_object(). */
-enum for_each_object_flags {
- /* Iterate only over local objects, not alternates. */
- FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
-
- /* Only iterate over packs obtained from the promisor remote. */
- FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
-
- /*
- * Visit objects within a pack in packfile order rather than .idx order
- */
- FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
-
- /* Only iterate over packs that are not marked as kept in-core. */
- FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
-
- /* Only iterate over packs that do not have .keep files. */
- FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
-};
-
-
-void *read_object_with_reference(struct repository *r,
- const struct object_id *oid,
- enum object_type required_type,
- unsigned long *size,
- struct object_id *oid_ret);
-
-#endif /* OBJECT_STORE_H */
diff --git a/object.c b/object.c
index 3b15469..c1553ee 100644
--- a/object.c
+++ b/object.c
@@ -214,7 +214,7 @@ enum peel_status peel_object(struct repository *r,
struct object *o = lookup_unknown_object(r, name);
if (o->type == OBJ_NONE) {
- int type = oid_object_info(r, name, NULL);
+ int type = odb_read_object_info(r->objects, name, NULL);
if (type < 0 || !object_as_type(o, type, 0))
return PEEL_INVALID;
}
@@ -315,7 +315,7 @@ struct object *parse_object_with_flags(struct repository *r,
}
if ((!obj || obj->type == OBJ_BLOB) &&
- oid_object_info(r, oid, NULL) == OBJ_BLOB) {
+ odb_read_object_info(r->objects, oid, NULL) == OBJ_BLOB) {
if (!skip_hash && stream_object_signature(r, repl) < 0) {
error(_("hash mismatch %s"), oid_to_hex(oid));
return NULL;
@@ -331,11 +331,11 @@ struct object *parse_object_with_flags(struct repository *r,
*/
if (skip_hash && discard_tree &&
(!obj || obj->type == OBJ_TREE) &&
- oid_object_info(r, oid, NULL) == OBJ_TREE) {
+ odb_read_object_info(r->objects, oid, NULL) == OBJ_TREE) {
return &lookup_tree(r, oid)->object;
}
- buffer = repo_read_object_file(r, oid, &type, &size);
+ buffer = odb_read_object(r->objects, oid, &type, &size);
if (buffer) {
if (!skip_hash &&
check_object_signature(r, repl, buffer, size, type) < 0) {
diff --git a/object-store.c b/odb.c
similarity index 62%
rename from object-store.c
rename to odb.c
index 58cde03..2a92a01 100644
--- a/object-store.c
+++ b/odb.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "git-compat-util.h"
#include "abspath.h"
#include "commit-graph.h"
@@ -13,7 +11,7 @@
#include "loose.h"
#include "object-file-convert.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "path.h"
#include "promisor-remote.h"
@@ -24,14 +22,15 @@
#include "strbuf.h"
#include "strvec.h"
#include "submodule.h"
+#include "trace2.h"
#include "write-or-die.h"
KHASH_INIT(odb_path_map, const char * /* key: odb_path */,
- struct object_directory *, 1, fspathhash, fspatheq)
+ struct odb_source *, 1, fspathhash, fspatheq)
/*
* This is meant to hold a *small* number of objects that you would
- * want repo_read_object_file() to be able to return, but yet you do not want
+ * want odb_read_object() to be able to return, but yet you do not want
* to write them into the object store (e.g. a browse-only
* application).
*/
@@ -44,7 +43,7 @@ struct cached_object_entry {
} value;
};
-static const struct cached_object *find_cached_object(struct raw_object_store *object_store,
+static const struct cached_object *find_cached_object(struct object_database *object_store,
const struct object_id *oid)
{
static const struct cached_object empty_tree = {
@@ -63,7 +62,8 @@ static const struct cached_object *find_cached_object(struct raw_object_store *o
return NULL;
}
-int odb_mkstemp(struct strbuf *temp_filename, const char *pattern)
+int odb_mkstemp(struct object_database *odb,
+ struct strbuf *temp_filename, const char *pattern)
{
int fd;
/*
@@ -71,22 +71,22 @@ int odb_mkstemp(struct strbuf *temp_filename, const char *pattern)
* restrictive except to remove write permission.
*/
int mode = 0444;
- repo_git_path_replace(the_repository, temp_filename, "objects/%s", pattern);
+ repo_git_path_replace(odb->repo, temp_filename, "objects/%s", pattern);
fd = git_mkstemp_mode(temp_filename->buf, mode);
if (0 <= fd)
return fd;
/* slow path */
/* some mkstemp implementations erase temp_filename on failure */
- repo_git_path_replace(the_repository, temp_filename, "objects/%s", pattern);
- safe_create_leading_directories(the_repository, temp_filename->buf);
+ repo_git_path_replace(odb->repo, temp_filename, "objects/%s", pattern);
+ safe_create_leading_directories(odb->repo, temp_filename->buf);
return xmkstemp_mode(temp_filename->buf, mode);
}
/*
* Return non-zero iff the path is usable as an alternate object database.
*/
-static int alt_odb_usable(struct raw_object_store *o,
+static int alt_odb_usable(struct object_database *o,
struct strbuf *path,
const char *normalized_objdir, khiter_t *pos)
{
@@ -104,18 +104,18 @@ static int alt_odb_usable(struct raw_object_store *o,
* Prevent the common mistake of listing the same
* thing twice, or object directory itself.
*/
- if (!o->odb_by_path) {
+ if (!o->source_by_path) {
khiter_t p;
- o->odb_by_path = kh_init_odb_path_map();
- assert(!o->odb->next);
- p = kh_put_odb_path_map(o->odb_by_path, o->odb->path, &r);
+ o->source_by_path = kh_init_odb_path_map();
+ assert(!o->sources->next);
+ p = kh_put_odb_path_map(o->source_by_path, o->sources->path, &r);
assert(r == 1); /* never used */
- kh_value(o->odb_by_path, p) = o->odb;
+ kh_value(o->source_by_path, p) = o->sources;
}
if (fspatheq(path->buf, normalized_objdir))
return 0;
- *pos = kh_put_odb_path_map(o->odb_by_path, path->buf, &r);
+ *pos = kh_put_odb_path_map(o->source_by_path, path->buf, &r);
/* r: 0 = exists, 1 = never used, 2 = deleted */
return r == 0 ? 0 : 1;
}
@@ -124,7 +124,7 @@ static int alt_odb_usable(struct raw_object_store *o,
* Prepare alternate object database registry.
*
* The variable alt_odb_list points at the list of struct
- * object_directory. The elements on this list come from
+ * odb_source. The elements on this list come from
* non-empty elements from colon separated ALTERNATE_DB_ENVIRONMENT
* environment variable, and $GIT_OBJECT_DIRECTORY/info/alternates,
* whose contents is similar to that environment variable but can be
@@ -135,13 +135,17 @@ static int alt_odb_usable(struct raw_object_store *o,
* of the object ID, an extra slash for the first level indirection, and
* the terminating NUL.
*/
-static void read_info_alternates(struct repository *r,
+static void read_info_alternates(struct object_database *odb,
const char *relative_base,
int depth);
-static int link_alt_odb_entry(struct repository *r, const struct strbuf *entry,
- const char *relative_base, int depth, const char *normalized_objdir)
+
+static int link_alt_odb_entry(struct object_database *odb,
+ const struct strbuf *entry,
+ const char *relative_base,
+ int depth,
+ const char *normalized_objdir)
{
- struct object_directory *ent;
+ struct odb_source *alternate;
struct strbuf pathbuf = STRBUF_INIT;
struct strbuf tmp = STRBUF_INIT;
khiter_t pos;
@@ -167,22 +171,23 @@ static int link_alt_odb_entry(struct repository *r, const struct strbuf *entry,
while (pathbuf.len && pathbuf.buf[pathbuf.len - 1] == '/')
strbuf_setlen(&pathbuf, pathbuf.len - 1);
- if (!alt_odb_usable(r->objects, &pathbuf, normalized_objdir, &pos))
+ if (!alt_odb_usable(odb, &pathbuf, normalized_objdir, &pos))
goto error;
- CALLOC_ARRAY(ent, 1);
- /* pathbuf.buf is already in r->objects->odb_by_path */
- ent->path = strbuf_detach(&pathbuf, NULL);
+ CALLOC_ARRAY(alternate, 1);
+ alternate->odb = odb;
+ /* pathbuf.buf is already in r->objects->source_by_path */
+ alternate->path = strbuf_detach(&pathbuf, NULL);
/* add the alternate entry */
- *r->objects->odb_tail = ent;
- r->objects->odb_tail = &(ent->next);
- ent->next = NULL;
- assert(r->objects->odb_by_path);
- kh_value(r->objects->odb_by_path, pos) = ent;
+ *odb->sources_tail = alternate;
+ odb->sources_tail = &(alternate->next);
+ alternate->next = NULL;
+ assert(odb->source_by_path);
+ kh_value(odb->source_by_path, pos) = alternate;
/* recursively add alternates */
- read_info_alternates(r, ent->path, depth + 1);
+ read_info_alternates(odb, alternate->path, depth + 1);
ret = 0;
error:
strbuf_release(&tmp);
@@ -219,7 +224,7 @@ static const char *parse_alt_odb_entry(const char *string,
return end;
}
-static void link_alt_odb_entries(struct repository *r, const char *alt,
+static void link_alt_odb_entries(struct object_database *odb, const char *alt,
int sep, const char *relative_base, int depth)
{
struct strbuf objdirbuf = STRBUF_INIT;
@@ -234,20 +239,20 @@ static void link_alt_odb_entries(struct repository *r, const char *alt,
return;
}
- strbuf_realpath(&objdirbuf, r->objects->odb->path, 1);
+ strbuf_realpath(&objdirbuf, odb->sources->path, 1);
while (*alt) {
alt = parse_alt_odb_entry(alt, sep, &entry);
if (!entry.len)
continue;
- link_alt_odb_entry(r, &entry,
+ link_alt_odb_entry(odb, &entry,
relative_base, depth, objdirbuf.buf);
}
strbuf_release(&entry);
strbuf_release(&objdirbuf);
}
-static void read_info_alternates(struct repository *r,
+static void read_info_alternates(struct object_database *odb,
const char *relative_base,
int depth)
{
@@ -261,15 +266,16 @@ static void read_info_alternates(struct repository *r,
return;
}
- link_alt_odb_entries(r, buf.buf, '\n', relative_base, depth);
+ link_alt_odb_entries(odb, buf.buf, '\n', relative_base, depth);
strbuf_release(&buf);
free(path);
}
-void add_to_alternates_file(const char *reference)
+void odb_add_to_alternates_file(struct object_database *odb,
+ const char *reference)
{
struct lock_file lock = LOCK_INIT;
- char *alts = repo_git_path(the_repository, "objects/info/alternates");
+ char *alts = repo_git_path(odb->repo, "objects/info/alternates");
FILE *in, *out;
int found = 0;
@@ -302,82 +308,81 @@ void add_to_alternates_file(const char *reference)
fprintf_or_die(out, "%s\n", reference);
if (commit_lock_file(&lock))
die_errno(_("unable to move new alternates file into place"));
- if (the_repository->objects->loaded_alternates)
- link_alt_odb_entries(the_repository, reference,
+ if (odb->loaded_alternates)
+ link_alt_odb_entries(odb, reference,
'\n', NULL, 0);
}
free(alts);
}
-void add_to_alternates_memory(const char *reference)
+void odb_add_to_alternates_memory(struct object_database *odb,
+ const char *reference)
{
/*
* Make sure alternates are initialized, or else our entry may be
* overwritten when they are.
*/
- prepare_alt_odb(the_repository);
+ odb_prepare_alternates(odb);
- link_alt_odb_entries(the_repository, reference,
+ link_alt_odb_entries(odb, reference,
'\n', NULL, 0);
}
-struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy)
+struct odb_source *odb_set_temporary_primary_source(struct object_database *odb,
+ const char *dir, int will_destroy)
{
- struct object_directory *new_odb;
+ struct odb_source *source;
/*
* Make sure alternates are initialized, or else our entry may be
* overwritten when they are.
*/
- prepare_alt_odb(the_repository);
+ odb_prepare_alternates(odb);
/*
* Make a new primary odb and link the old primary ODB in as an
* alternate
*/
- new_odb = xcalloc(1, sizeof(*new_odb));
- new_odb->path = xstrdup(dir);
+ source = xcalloc(1, sizeof(*source));
+ source->odb = odb;
+ source->path = xstrdup(dir);
/*
* Disable ref updates while a temporary odb is active, since
* the objects in the database may roll back.
*/
- new_odb->disable_ref_updates = 1;
- new_odb->will_destroy = will_destroy;
- new_odb->next = the_repository->objects->odb;
- the_repository->objects->odb = new_odb;
- return new_odb->next;
+ source->disable_ref_updates = 1;
+ source->will_destroy = will_destroy;
+ source->next = odb->sources;
+ odb->sources = source;
+ return source->next;
}
-static void free_object_directory(struct object_directory *odb)
+static void free_object_directory(struct odb_source *source)
{
- free(odb->path);
- odb_clear_loose_cache(odb);
- loose_object_map_clear(&odb->loose_map);
- free(odb);
+ free(source->path);
+ odb_clear_loose_cache(source);
+ loose_object_map_clear(&source->loose_map);
+ free(source);
}
-void restore_primary_odb(struct object_directory *restore_odb, const char *old_path)
+void odb_restore_primary_source(struct object_database *odb,
+ struct odb_source *restore_source,
+ const char *old_path)
{
- struct object_directory *cur_odb = the_repository->objects->odb;
+ struct odb_source *cur_source = odb->sources;
- if (strcmp(old_path, cur_odb->path))
+ if (strcmp(old_path, cur_source->path))
BUG("expected %s as primary object store; found %s",
- old_path, cur_odb->path);
+ old_path, cur_source->path);
- if (cur_odb->next != restore_odb)
+ if (cur_source->next != restore_source)
BUG("we expect the old primary object store to be the first alternate");
- the_repository->objects->odb = restore_odb;
- free_object_directory(cur_odb);
+ odb->sources = restore_source;
+ free_object_directory(cur_source);
}
-/*
- * Compute the exact path an alternate is at and returns it. In case of
- * error NULL is returned and the human readable error is added to `err`
- * `path` may be relative and should point to $GIT_DIR.
- * `err` must not be null.
- */
char *compute_alternate_path(const char *path, struct strbuf *err)
{
char *ref_git = NULL;
@@ -442,15 +447,15 @@ char *compute_alternate_path(const char *path, struct strbuf *err)
return ref_git;
}
-struct object_directory *find_odb(struct repository *r, const char *obj_dir)
+struct odb_source *odb_find_source(struct object_database *odb, const char *obj_dir)
{
- struct object_directory *odb;
+ struct odb_source *source;
char *obj_dir_real = real_pathdup(obj_dir, 1);
struct strbuf odb_path_real = STRBUF_INIT;
- prepare_alt_odb(r);
- for (odb = r->objects->odb; odb; odb = odb->next) {
- strbuf_realpath(&odb_path_real, odb->path, 1);
+ odb_prepare_alternates(odb);
+ for (source = odb->sources; source; source = source->next) {
+ strbuf_realpath(&odb_path_real, source->path, 1);
if (!strcmp(obj_dir_real, odb_path_real.buf))
break;
}
@@ -458,17 +463,24 @@ struct object_directory *find_odb(struct repository *r, const char *obj_dir)
free(obj_dir_real);
strbuf_release(&odb_path_real);
- if (!odb)
+ if (!source)
die(_("could not find object directory matching %s"), obj_dir);
- return odb;
+ return source;
}
-static void fill_alternate_refs_command(struct child_process *cmd,
+void odb_add_submodule_source_by_path(struct object_database *odb,
+ const char *path)
+{
+ string_list_insert(&odb->submodule_source_paths, path);
+}
+
+static void fill_alternate_refs_command(struct repository *repo,
+ struct child_process *cmd,
const char *repo_path)
{
const char *value;
- if (!git_config_get_value("core.alternateRefsCommand", &value)) {
+ if (!repo_config_get_value(repo, "core.alternateRefsCommand", &value)) {
cmd->use_shell = 1;
strvec_push(&cmd->args, value);
@@ -480,7 +492,7 @@ static void fill_alternate_refs_command(struct child_process *cmd,
strvec_push(&cmd->args, "for-each-ref");
strvec_push(&cmd->args, "--format=%(objectname)");
- if (!git_config_get_value("core.alternateRefsPrefixes", &value)) {
+ if (!repo_config_get_value(repo, "core.alternateRefsPrefixes", &value)) {
strvec_push(&cmd->args, "--");
strvec_split(&cmd->args, value);
}
@@ -490,15 +502,16 @@ static void fill_alternate_refs_command(struct child_process *cmd,
cmd->out = -1;
}
-static void read_alternate_refs(const char *path,
- alternate_ref_fn *cb,
- void *data)
+static void read_alternate_refs(struct repository *repo,
+ const char *path,
+ odb_for_each_alternate_ref_fn *cb,
+ void *payload)
{
struct child_process cmd = CHILD_PROCESS_INIT;
struct strbuf line = STRBUF_INIT;
FILE *fh;
- fill_alternate_refs_command(&cmd, path);
+ fill_alternate_refs_command(repo, &cmd, path);
if (start_command(&cmd))
return;
@@ -508,13 +521,13 @@ static void read_alternate_refs(const char *path,
struct object_id oid;
const char *p;
- if (parse_oid_hex(line.buf, &oid, &p) || *p) {
+ if (parse_oid_hex_algop(line.buf, &oid, &p, repo->hash_algo) || *p) {
warning(_("invalid line while parsing alternate refs: %s"),
line.buf);
break;
}
- cb(&oid, data);
+ cb(&oid, payload);
}
fclose(fh);
@@ -523,18 +536,18 @@ static void read_alternate_refs(const char *path,
}
struct alternate_refs_data {
- alternate_ref_fn *fn;
- void *data;
+ odb_for_each_alternate_ref_fn *fn;
+ void *payload;
};
-static int refs_from_alternate_cb(struct object_directory *e,
- void *data)
+static int refs_from_alternate_cb(struct odb_source *alternate,
+ void *payload)
{
struct strbuf path = STRBUF_INIT;
size_t base_len;
- struct alternate_refs_data *cb = data;
+ struct alternate_refs_data *cb = payload;
- if (!strbuf_realpath(&path, e->path, 0))
+ if (!strbuf_realpath(&path, alternate->path, 0))
goto out;
if (!strbuf_strip_suffix(&path, "/objects"))
goto out;
@@ -546,50 +559,52 @@ static int refs_from_alternate_cb(struct object_directory *e,
goto out;
strbuf_setlen(&path, base_len);
- read_alternate_refs(path.buf, cb->fn, cb->data);
+ read_alternate_refs(alternate->odb->repo, path.buf, cb->fn, cb->payload);
out:
strbuf_release(&path);
return 0;
}
-void for_each_alternate_ref(alternate_ref_fn fn, void *data)
+void odb_for_each_alternate_ref(struct object_database *odb,
+ odb_for_each_alternate_ref_fn cb, void *payload)
{
- struct alternate_refs_data cb;
- cb.fn = fn;
- cb.data = data;
- foreach_alt_odb(refs_from_alternate_cb, &cb);
+ struct alternate_refs_data data;
+ data.fn = cb;
+ data.payload = payload;
+ odb_for_each_alternate(odb, refs_from_alternate_cb, &data);
}
-int foreach_alt_odb(alt_odb_fn fn, void *cb)
+int odb_for_each_alternate(struct object_database *odb,
+ odb_for_each_alternate_fn cb, void *payload)
{
- struct object_directory *ent;
+ struct odb_source *alternate;
int r = 0;
- prepare_alt_odb(the_repository);
- for (ent = the_repository->objects->odb->next; ent; ent = ent->next) {
- r = fn(ent, cb);
+ odb_prepare_alternates(odb);
+ for (alternate = odb->sources->next; alternate; alternate = alternate->next) {
+ r = cb(alternate, payload);
if (r)
break;
}
return r;
}
-void prepare_alt_odb(struct repository *r)
+void odb_prepare_alternates(struct object_database *odb)
{
- if (r->objects->loaded_alternates)
+ if (odb->loaded_alternates)
return;
- link_alt_odb_entries(r, r->objects->alternate_db, PATH_SEP, NULL, 0);
+ link_alt_odb_entries(odb, odb->alternate_db, PATH_SEP, NULL, 0);
- read_info_alternates(r, r->objects->odb->path, 0);
- r->objects->loaded_alternates = 1;
+ read_info_alternates(odb, odb->sources->path, 0);
+ odb->loaded_alternates = 1;
}
-int has_alt_odb(struct repository *r)
+int odb_has_alternates(struct object_database *odb)
{
- prepare_alt_odb(r);
- return !!r->objects->odb->next;
+ odb_prepare_alternates(odb);
+ return !!odb->sources->next;
}
int obj_read_use_lock = 0;
@@ -615,7 +630,24 @@ void disable_obj_read_lock(void)
int fetch_if_missing = 1;
-static int do_oid_object_info_extended(struct repository *r,
+static int register_all_submodule_sources(struct object_database *odb)
+{
+ int ret = odb->submodule_source_paths.nr;
+
+ for (size_t i = 0; i < odb->submodule_source_paths.nr; i++)
+ odb_add_to_alternates_memory(odb,
+ odb->submodule_source_paths.items[i].string);
+ if (ret) {
+ string_list_clear(&odb->submodule_source_paths, 0);
+ trace2_data_intmax("submodule", odb->repo,
+ "register_all_submodule_sources/registered", ret);
+ if (git_env_bool("GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB", 0))
+ BUG("register_all_submodule_sources() called");
+ }
+ return ret;
+}
+
+static int do_oid_object_info_extended(struct object_database *odb,
const struct object_id *oid,
struct object_info *oi, unsigned flags)
{
@@ -628,7 +660,7 @@ static int do_oid_object_info_extended(struct repository *r,
if (flags & OBJECT_INFO_LOOKUP_REPLACE)
- real = lookup_replace_object(r, oid);
+ real = lookup_replace_object(odb->repo, oid);
if (is_null_oid(real))
return -1;
@@ -636,7 +668,7 @@ static int do_oid_object_info_extended(struct repository *r,
if (!oi)
oi = &blank_oi;
- co = find_cached_object(r->objects, real);
+ co = find_cached_object(odb, real);
if (co) {
if (oi->typep)
*(oi->typep) = co->type;
@@ -645,7 +677,7 @@ static int do_oid_object_info_extended(struct repository *r,
if (oi->disk_sizep)
*(oi->disk_sizep) = 0;
if (oi->delta_base_oid)
- oidclr(oi->delta_base_oid, the_repository->hash_algo);
+ oidclr(oi->delta_base_oid, odb->repo->hash_algo);
if (oi->contentp)
*oi->contentp = xmemdupz(co->buf, co->size);
oi->whence = OI_CACHED;
@@ -653,36 +685,35 @@ static int do_oid_object_info_extended(struct repository *r,
}
while (1) {
- if (find_pack_entry(r, real, &e))
+ if (find_pack_entry(odb->repo, real, &e))
break;
/* Most likely it's a loose object. */
- if (!loose_object_info(r, real, oi, flags))
+ if (!loose_object_info(odb->repo, real, oi, flags))
return 0;
/* Not a loose object; someone else may have just packed it. */
if (!(flags & OBJECT_INFO_QUICK)) {
- reprepare_packed_git(r);
- if (find_pack_entry(r, real, &e))
+ reprepare_packed_git(odb->repo);
+ if (find_pack_entry(odb->repo, real, &e))
break;
}
/*
- * If r is the_repository, this might be an attempt at
- * accessing a submodule object as if it were in the_repository
- * (having called add_submodule_odb() on that submodule's ODB).
- * If any such ODBs exist, register them and try again.
+ * This might be an attempt at accessing a submodule object as
+ * if it were in main object store (having called
+ * `odb_add_submodule_source_by_path()` on that submodule's
+ * ODB). If any such ODBs exist, register them and try again.
*/
- if (r == the_repository &&
- register_all_submodule_odb_as_alternates())
+ if (register_all_submodule_sources(odb))
/* We added some alternates; retry */
continue;
/* Check if it is a missing object */
- if (fetch_if_missing && repo_has_promisor_remote(r) &&
+ if (fetch_if_missing && repo_has_promisor_remote(odb->repo) &&
!already_retried &&
!(flags & OBJECT_INFO_SKIP_FETCH_OBJECT)) {
- promisor_remote_get_direct(r, real, 1);
+ promisor_remote_get_direct(odb->repo, real, 1);
already_retried = 1;
continue;
}
@@ -692,7 +723,7 @@ static int do_oid_object_info_extended(struct repository *r,
if ((flags & OBJECT_INFO_LOOKUP_REPLACE) && !oideq(real, oid))
die(_("replacement %s not found for %s"),
oid_to_hex(real), oid_to_hex(oid));
- if ((p = has_packed_and_bad(r, real)))
+ if ((p = has_packed_and_bad(odb->repo, real)))
die(_("packed object %s (stored in %s) is corrupt"),
oid_to_hex(real), p->pack_name);
}
@@ -705,10 +736,10 @@ static int do_oid_object_info_extended(struct repository *r,
* information below, so return early.
*/
return 0;
- rtype = packed_object_info(r, e.p, e.offset, oi);
+ rtype = packed_object_info(odb->repo, e.p, e.offset, oi);
if (rtype < 0) {
mark_bad_packed_object(e.p, real);
- return do_oid_object_info_extended(r, real, oi, 0);
+ return do_oid_object_info_extended(odb, real, oi, 0);
} else if (oi->whence == OI_PACKED) {
oi->u.packed.offset = e.offset;
oi->u.packed.pack = e.p;
@@ -732,10 +763,10 @@ static int oid_object_info_convert(struct repository *r,
void *content;
int ret;
- if (repo_oid_to_algop(r, input_oid, the_hash_algo, &oid)) {
+ if (repo_oid_to_algop(r, input_oid, r->hash_algo, &oid)) {
if (do_die)
die(_("missing mapping of %s to %s"),
- oid_to_hex(input_oid), the_hash_algo->name);
+ oid_to_hex(input_oid), r->hash_algo->name);
return -1;
}
@@ -756,7 +787,7 @@ static int oid_object_info_convert(struct repository *r,
oi = &new_oi;
}
- ret = oid_object_info_extended(r, &oid, oi, flags);
+ ret = odb_read_object_info_extended(r->objects, &oid, oi, flags);
if (ret)
return -1;
if (oi == input_oi)
@@ -766,8 +797,8 @@ static int oid_object_info_convert(struct repository *r,
struct strbuf outbuf = STRBUF_INIT;
if (type != OBJ_BLOB) {
- ret = convert_object_file(the_repository, &outbuf,
- the_hash_algo, input_algo,
+ ret = convert_object_file(r, &outbuf,
+ r->hash_algo, input_algo,
content, size, type, !do_die);
free(content);
if (ret == -1)
@@ -799,52 +830,54 @@ static int oid_object_info_convert(struct repository *r,
return ret;
}
-int oid_object_info_extended(struct repository *r, const struct object_id *oid,
- struct object_info *oi, unsigned flags)
+int odb_read_object_info_extended(struct object_database *odb,
+ const struct object_id *oid,
+ struct object_info *oi,
+ unsigned flags)
{
int ret;
- if (oid->algo && (hash_algo_by_ptr(r->hash_algo) != oid->algo))
- return oid_object_info_convert(r, oid, oi, flags);
+ if (oid->algo && (hash_algo_by_ptr(odb->repo->hash_algo) != oid->algo))
+ return oid_object_info_convert(odb->repo, oid, oi, flags);
obj_read_lock();
- ret = do_oid_object_info_extended(r, oid, oi, flags);
+ ret = do_oid_object_info_extended(odb, oid, oi, flags);
obj_read_unlock();
return ret;
}
/* returns enum object_type or negative */
-int oid_object_info(struct repository *r,
- const struct object_id *oid,
- unsigned long *sizep)
+int odb_read_object_info(struct object_database *odb,
+ const struct object_id *oid,
+ unsigned long *sizep)
{
enum object_type type;
struct object_info oi = OBJECT_INFO_INIT;
oi.typep = &type;
oi.sizep = sizep;
- if (oid_object_info_extended(r, oid, &oi,
- OBJECT_INFO_LOOKUP_REPLACE) < 0)
+ if (odb_read_object_info_extended(odb, oid, &oi,
+ OBJECT_INFO_LOOKUP_REPLACE) < 0)
return -1;
return type;
}
-int pretend_object_file(struct repository *repo,
- void *buf, unsigned long len, enum object_type type,
- struct object_id *oid)
+int odb_pretend_object(struct object_database *odb,
+ void *buf, unsigned long len, enum object_type type,
+ struct object_id *oid)
{
struct cached_object_entry *co;
char *co_buf;
- hash_object_file(repo->hash_algo, buf, len, type, oid);
- if (has_object(repo, oid, 0) ||
- find_cached_object(repo->objects, oid))
+ hash_object_file(odb->repo->hash_algo, buf, len, type, oid);
+ if (odb_has_object(odb, oid, 0) ||
+ find_cached_object(odb, oid))
return 0;
- ALLOC_GROW(repo->objects->cached_objects,
- repo->objects->cached_object_nr + 1, repo->objects->cached_object_alloc);
- co = &repo->objects->cached_objects[repo->objects->cached_object_nr++];
+ ALLOC_GROW(odb->cached_objects,
+ odb->cached_object_nr + 1, odb->cached_object_alloc);
+ co = &odb->cached_objects[odb->cached_object_nr++];
co->value.size = len;
co->value.type = type;
co_buf = xmalloc(len);
@@ -854,15 +887,10 @@ int pretend_object_file(struct repository *repo,
return 0;
}
-/*
- * This function dies on corrupt objects; the callers who want to
- * deal with them should arrange to call oid_object_info_extended() and give
- * error messages themselves.
- */
-void *repo_read_object_file(struct repository *r,
- const struct object_id *oid,
- enum object_type *type,
- unsigned long *size)
+void *odb_read_object(struct object_database *odb,
+ const struct object_id *oid,
+ enum object_type *type,
+ unsigned long *size)
{
struct object_info oi = OBJECT_INFO_INIT;
unsigned flags = OBJECT_INFO_DIE_IF_CORRUPT | OBJECT_INFO_LOOKUP_REPLACE;
@@ -871,17 +899,17 @@ void *repo_read_object_file(struct repository *r,
oi.typep = type;
oi.sizep = size;
oi.contentp = &data;
- if (oid_object_info_extended(r, oid, &oi, flags))
+ if (odb_read_object_info_extended(odb, oid, &oi, flags))
return NULL;
return data;
}
-void *read_object_with_reference(struct repository *r,
- const struct object_id *oid,
- enum object_type required_type,
- unsigned long *size,
- struct object_id *actual_oid_return)
+void *odb_read_object_peeled(struct object_database *odb,
+ const struct object_id *oid,
+ enum object_type required_type,
+ unsigned long *size,
+ struct object_id *actual_oid_return)
{
enum object_type type;
void *buffer;
@@ -893,7 +921,7 @@ void *read_object_with_reference(struct repository *r,
int ref_length = -1;
const char *ref_type = NULL;
- buffer = repo_read_object_file(r, &actual_oid, &type, &isize);
+ buffer = odb_read_object(odb, &actual_oid, &type, &isize);
if (!buffer)
return NULL;
if (type == required_type) {
@@ -913,9 +941,10 @@ void *read_object_with_reference(struct repository *r,
}
ref_length = strlen(ref_type);
- if (ref_length + the_hash_algo->hexsz > isize ||
+ if (ref_length + odb->repo->hash_algo->hexsz > isize ||
memcmp(buffer, ref_type, ref_length) ||
- get_oid_hex((char *) buffer + ref_length, &actual_oid)) {
+ get_oid_hex_algop((char *) buffer + ref_length, &actual_oid,
+ odb->repo->hash_algo)) {
free(buffer);
return NULL;
}
@@ -925,7 +954,7 @@ void *read_object_with_reference(struct repository *r,
}
}
-int has_object(struct repository *r, const struct object_id *oid,
+int odb_has_object(struct object_database *odb, const struct object_id *oid,
unsigned flags)
{
unsigned object_info_flags = 0;
@@ -937,12 +966,13 @@ int has_object(struct repository *r, const struct object_id *oid,
if (!(flags & HAS_OBJECT_FETCH_PROMISOR))
object_info_flags |= OBJECT_INFO_SKIP_FETCH_OBJECT;
- return oid_object_info_extended(r, oid, NULL, object_info_flags) >= 0;
+ return odb_read_object_info_extended(odb, oid, NULL, object_info_flags) >= 0;
}
-void assert_oid_type(const struct object_id *oid, enum object_type expect)
+void odb_assert_oid_type(struct object_database *odb,
+ const struct object_id *oid, enum object_type expect)
{
- enum object_type type = oid_object_info(the_repository, oid, NULL);
+ enum object_type type = odb_read_object_info(odb, oid, NULL);
if (type < 0)
die(_("%s is not a valid object"), oid_to_hex(oid));
if (type != expect)
@@ -950,31 +980,43 @@ void assert_oid_type(const struct object_id *oid, enum object_type expect)
type_name(expect));
}
-struct raw_object_store *raw_object_store_new(void)
+int odb_write_object_ext(struct object_database *odb,
+ const void *buf, unsigned long len,
+ enum object_type type,
+ struct object_id *oid,
+ struct object_id *compat_oid,
+ unsigned flags)
{
- struct raw_object_store *o = xmalloc(sizeof(*o));
+ return write_object_file(odb->sources, buf, len, type, oid, compat_oid, flags);
+}
+
+struct object_database *odb_new(struct repository *repo)
+{
+ struct object_database *o = xmalloc(sizeof(*o));
memset(o, 0, sizeof(*o));
+ o->repo = repo;
INIT_LIST_HEAD(&o->packed_git_mru);
hashmap_init(&o->pack_map, pack_map_entry_cmp, NULL, 0);
pthread_mutex_init(&o->replace_mutex, NULL);
+ string_list_init_dup(&o->submodule_source_paths);
return o;
}
-static void free_object_directories(struct raw_object_store *o)
+static void free_object_directories(struct object_database *o)
{
- while (o->odb) {
- struct object_directory *next;
+ while (o->sources) {
+ struct odb_source *next;
- next = o->odb->next;
- free_object_directory(o->odb);
- o->odb = next;
+ next = o->sources->next;
+ free_object_directory(o->sources);
+ o->sources = next;
}
- kh_destroy_odb_path_map(o->odb_by_path);
- o->odb_by_path = NULL;
+ kh_destroy_odb_path_map(o->source_by_path);
+ o->source_by_path = NULL;
}
-void raw_object_store_clear(struct raw_object_store *o)
+void odb_clear(struct object_database *o)
{
FREE_AND_NULL(o->alternate_db);
@@ -986,7 +1028,7 @@ void raw_object_store_clear(struct raw_object_store *o)
o->commit_graph_attempted = 0;
free_object_directories(o);
- o->odb_tail = NULL;
+ o->sources_tail = NULL;
o->loaded_alternates = 0;
for (size_t i = 0; i < o->cached_object_nr; i++)
@@ -1007,4 +1049,5 @@ void raw_object_store_clear(struct raw_object_store *o)
o->packed_git = NULL;
hashmap_clear(&o->pack_map);
+ string_list_clear(&o->submodule_source_paths, 0);
}
diff --git a/odb.h b/odb.h
new file mode 100644
index 0000000..3dfc66d
--- /dev/null
+++ b/odb.h
@@ -0,0 +1,511 @@
+#ifndef ODB_H
+#define ODB_H
+
+#include "hashmap.h"
+#include "object.h"
+#include "list.h"
+#include "oidset.h"
+#include "oidmap.h"
+#include "string-list.h"
+#include "thread-utils.h"
+
+struct oidmap;
+struct oidtree;
+struct strbuf;
+struct repository;
+struct multi_pack_index;
+
+/*
+ * Compute the exact path an alternate is at and returns it. In case of
+ * error NULL is returned and the human readable error is added to `err`
+ * `path` may be relative and should point to $GIT_DIR.
+ * `err` must not be null.
+ */
+char *compute_alternate_path(const char *path, struct strbuf *err);
+
+/*
+ * The source is the part of the object database that stores the actual
+ * objects. It thus encapsulates the logic to read and write the specific
+ * on-disk format. An object database can have multiple sources:
+ *
+ * - The primary source, which is typically located in "$GIT_DIR/objects".
+ * This is where new objects are usually written to.
+ *
+ * - Alternate sources, which are configured via "objects/info/alternates" or
+ * via the GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable. These
+ * alternate sources are only used to read objects.
+ */
+struct odb_source {
+ struct odb_source *next;
+
+ /* Object database that owns this object source. */
+ struct object_database *odb;
+
+ /*
+ * Used to store the results of readdir(3) calls when we are OK
+ * sacrificing accuracy due to races for speed. That includes
+ * object existence with OBJECT_INFO_QUICK, as well as
+ * our search for unique abbreviated hashes. Don't use it for tasks
+ * requiring greater accuracy!
+ *
+ * Be sure to call odb_load_loose_cache() before using.
+ */
+ uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
+ struct oidtree *loose_objects_cache;
+
+ /* Map between object IDs for loose objects. */
+ struct loose_object_map *loose_map;
+
+ /*
+ * private data
+ *
+ * should only be accessed directly by packfile.c and midx.c
+ */
+ struct multi_pack_index *midx;
+
+ /*
+ * This is a temporary object store created by the tmp_objdir
+ * facility. Disable ref updates since the objects in the store
+ * might be discarded on rollback.
+ */
+ int disable_ref_updates;
+
+ /*
+ * This object store is ephemeral, so there is no need to fsync.
+ */
+ int will_destroy;
+
+ /*
+ * Path to the source. If this is a relative path, it is relative to
+ * the current working directory.
+ */
+ char *path;
+};
+
+struct packed_git;
+struct cached_object_entry;
+
+/*
+ * The object database encapsulates access to objects in a repository. It
+ * manages one or more sources that store the actual objects which are
+ * configured via alternates.
+ */
+struct object_database {
+ /* Repository that owns this database. */
+ struct repository *repo;
+
+ /*
+ * Set of all object directories; the main directory is first (and
+ * cannot be NULL after initialization). Subsequent directories are
+ * alternates.
+ */
+ struct odb_source *sources;
+ struct odb_source **sources_tail;
+ struct kh_odb_path_map *source_by_path;
+
+ int loaded_alternates;
+
+ /*
+ * A list of alternate object directories loaded from the environment;
+ * this should not generally need to be accessed directly, but will
+ * populate the "sources" list when odb_prepare_alternates() is run.
+ */
+ char *alternate_db;
+
+ /*
+ * Objects that should be substituted by other objects
+ * (see git-replace(1)).
+ */
+ struct oidmap replace_map;
+ unsigned replace_map_initialized : 1;
+ pthread_mutex_t replace_mutex; /* protect object replace functions */
+
+ struct commit_graph *commit_graph;
+ unsigned commit_graph_attempted : 1; /* if loading has been attempted */
+
+ /*
+ * private data
+ *
+ * should only be accessed directly by packfile.c
+ */
+
+ struct packed_git *packed_git;
+ /* A most-recently-used ordered version of the packed_git list. */
+ struct list_head packed_git_mru;
+
+ struct {
+ struct packed_git **packs;
+ unsigned flags;
+ } kept_pack_cache;
+
+ /*
+ * This is meant to hold a *small* number of objects that you would
+ * want odb_read_object() to be able to return, but yet you do not want
+ * to write them into the object store (e.g. a browse-only
+ * application).
+ */
+ struct cached_object_entry *cached_objects;
+ size_t cached_object_nr, cached_object_alloc;
+
+ /*
+ * A map of packfiles to packed_git structs for tracking which
+ * packs have been loaded already.
+ */
+ struct hashmap pack_map;
+
+ /*
+ * A fast, rough count of the number of objects in the repository.
+ * These two fields are not meant for direct access. Use
+ * repo_approximate_object_count() instead.
+ */
+ unsigned long approximate_object_count;
+ unsigned approximate_object_count_valid : 1;
+
+ /*
+ * Whether packed_git has already been populated with this repository's
+ * packs.
+ */
+ unsigned packed_git_initialized : 1;
+
+ /*
+ * Submodule source paths that will be added as additional sources to
+ * allow lookup of submodule objects via the main object database.
+ */
+ struct string_list submodule_source_paths;
+};
+
+struct object_database *odb_new(struct repository *repo);
+void odb_clear(struct object_database *o);
+
+/*
+ * Find source by its object directory path. Dies in case the source couldn't
+ * be found.
+ */
+struct odb_source *odb_find_source(struct object_database *odb, const char *obj_dir);
+
+/*
+ * Replace the current writable object directory with the specified temporary
+ * object directory; returns the former primary source.
+ */
+struct odb_source *odb_set_temporary_primary_source(struct object_database *odb,
+ const char *dir, int will_destroy);
+
+/*
+ * Restore the primary source that was previously replaced by
+ * `odb_set_temporary_primary_source()`.
+ */
+void odb_restore_primary_source(struct object_database *odb,
+ struct odb_source *restore_source,
+ const char *old_path);
+
+/*
+ * Call odb_add_submodule_source_by_path() to add the submodule at the given
+ * path to a list. The object stores of all submodules in that list will be
+ * added as additional sources in the object store when looking up objects.
+ */
+void odb_add_submodule_source_by_path(struct object_database *odb,
+ const char *path);
+
+/*
+ * Iterate through all alternates of the database and execute the provided
+ * callback function for each of them. Stop iterating once the callback
+ * function returns a non-zero value, in which case the value is bubbled up
+ * from the callback.
+ */
+typedef int odb_for_each_alternate_fn(struct odb_source *, void *);
+int odb_for_each_alternate(struct object_database *odb,
+ odb_for_each_alternate_fn cb, void *payload);
+
+/*
+ * Iterate through all alternates of the database and yield their respective
+ * references.
+ */
+typedef void odb_for_each_alternate_ref_fn(const struct object_id *oid, void *);
+void odb_for_each_alternate_ref(struct object_database *odb,
+ odb_for_each_alternate_ref_fn cb, void *payload);
+
+/*
+ * Create a temporary file rooted in the primary alternate's directory, or die
+ * on failure. The filename is taken from "pattern", which should have the
+ * usual "XXXXXX" trailer, and the resulting filename is written into the
+ * "template" buffer. Returns the open descriptor.
+ */
+int odb_mkstemp(struct object_database *odb,
+ struct strbuf *temp_filename, const char *pattern);
+
+/*
+ * Prepare alternate object sources for the given database by reading
+ * "objects/info/alternates" and opening the respective sources.
+ */
+void odb_prepare_alternates(struct object_database *odb);
+
+/*
+ * Check whether the object database has any alternates. The primary object
+ * source does not count as alternate.
+ */
+int odb_has_alternates(struct object_database *odb);
+
+/*
+ * Add the directory to the on-disk alternates file; the new entry will also
+ * take effect in the current process.
+ */
+void odb_add_to_alternates_file(struct object_database *odb,
+ const char *dir);
+
+/*
+ * Add the directory to the in-memory list of alternate sources (along with any
+ * recursive alternates it points to), but do not modify the on-disk alternates
+ * file.
+ */
+void odb_add_to_alternates_memory(struct object_database *odb,
+ const char *dir);
+
+/*
+ * Read an object from the database. Returns the object data and assigns object
+ * type and size to the `type` and `size` pointers, if these pointers are
+ * non-NULL. Returns a `NULL` pointer in case the object does not exist.
+ *
+ * This function dies on corrupt objects; the callers who want to deal with
+ * them should arrange to call odb_read_object_info_extended() and give error
+ * messages themselves.
+ */
+void *odb_read_object(struct object_database *odb,
+ const struct object_id *oid,
+ enum object_type *type,
+ unsigned long *size);
+
+void *odb_read_object_peeled(struct object_database *odb,
+ const struct object_id *oid,
+ enum object_type required_type,
+ unsigned long *size,
+ struct object_id *oid_ret);
+
+/*
+ * Add an object file to the in-memory object store, without writing it
+ * to disk.
+ *
+ * Callers are responsible for calling write_object_file to record the
+ * object in persistent storage before writing any other new objects
+ * that reference it.
+ */
+int odb_pretend_object(struct object_database *odb,
+ void *buf, unsigned long len, enum object_type type,
+ struct object_id *oid);
+
+struct object_info {
+ /* Request */
+ enum object_type *typep;
+ unsigned long *sizep;
+ off_t *disk_sizep;
+ struct object_id *delta_base_oid;
+ void **contentp;
+
+ /* Response */
+ enum {
+ OI_CACHED,
+ OI_LOOSE,
+ OI_PACKED,
+ OI_DBCACHED
+ } whence;
+ union {
+ /*
+ * struct {
+ * ... Nothing to expose in this case
+ * } cached;
+ * struct {
+ * ... Nothing to expose in this case
+ * } loose;
+ */
+ struct {
+ struct packed_git *pack;
+ off_t offset;
+ unsigned int is_delta;
+ } packed;
+ } u;
+};
+
+/*
+ * Initializer for a "struct object_info" that wants no items. You may
+ * also memset() the memory to all-zeroes.
+ */
+#define OBJECT_INFO_INIT { 0 }
+
+/* Invoke lookup_replace_object() on the given hash */
+#define OBJECT_INFO_LOOKUP_REPLACE 1
+/* Do not retry packed storage after checking packed and loose storage */
+#define OBJECT_INFO_QUICK 8
+/*
+ * Do not attempt to fetch the object if missing (even if fetch_is_missing is
+ * nonzero).
+ */
+#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
+/*
+ * This is meant for bulk prefetching of missing blobs in a partial
+ * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
+ */
+#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
+
+/* Die if object corruption (not just an object being missing) was detected. */
+#define OBJECT_INFO_DIE_IF_CORRUPT 32
+
+/*
+ * Read object info from the object database and populate the `object_info`
+ * structure. Returns 0 on success, a negative error code otherwise.
+ */
+int odb_read_object_info_extended(struct object_database *odb,
+ const struct object_id *oid,
+ struct object_info *oi,
+ unsigned flags);
+
+/*
+ * Read a subset of object info for the given object ID. Returns an `enum
+ * object_type` on success, a negative error code otherwise. If successful and
+ * `sizep` is non-NULL, then the size of the object will be written to the
+ * pointer.
+ */
+int odb_read_object_info(struct object_database *odb,
+ const struct object_id *oid,
+ unsigned long *sizep);
+
+enum {
+ /* Retry packed storage after checking packed and loose storage */
+ HAS_OBJECT_RECHECK_PACKED = (1 << 0),
+ /* Allow fetching the object in case the repository has a promisor remote. */
+ HAS_OBJECT_FETCH_PROMISOR = (1 << 1),
+};
+
+/*
+ * Returns 1 if the object exists. This function will not lazily fetch objects
+ * in a partial clone by default.
+ */
+int odb_has_object(struct object_database *odb,
+ const struct object_id *oid,
+ unsigned flags);
+
+void odb_assert_oid_type(struct object_database *odb,
+ const struct object_id *oid, enum object_type expect);
+
+/*
+ * Enabling the object read lock allows multiple threads to safely call the
+ * following functions in parallel: odb_read_object(),
+ * odb_read_object_peeled(), odb_read_object_info() and odb().
+ *
+ * obj_read_lock() and obj_read_unlock() may also be used to protect other
+ * section which cannot execute in parallel with object reading. Since the used
+ * lock is a recursive mutex, these sections can even contain calls to object
+ * reading functions. However, beware that in these cases zlib inflation won't
+ * be performed in parallel, losing performance.
+ *
+ * TODO: odb_read_object_info_extended()'s call stack has a recursive behavior. If
+ * any of its callees end up calling it, this recursive call won't benefit from
+ * parallel inflation.
+ */
+void enable_obj_read_lock(void);
+void disable_obj_read_lock(void);
+
+extern int obj_read_use_lock;
+extern pthread_mutex_t obj_read_mutex;
+
+static inline void obj_read_lock(void)
+{
+ if(obj_read_use_lock)
+ pthread_mutex_lock(&obj_read_mutex);
+}
+
+static inline void obj_read_unlock(void)
+{
+ if(obj_read_use_lock)
+ pthread_mutex_unlock(&obj_read_mutex);
+}
+/* Flags for for_each_*_object(). */
+enum for_each_object_flags {
+ /* Iterate only over local objects, not alternates. */
+ FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
+
+ /* Only iterate over packs obtained from the promisor remote. */
+ FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
+
+ /*
+ * Visit objects within a pack in packfile order rather than .idx order
+ */
+ FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
+
+ /* Only iterate over packs that are not marked as kept in-core. */
+ FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
+
+ /* Only iterate over packs that do not have .keep files. */
+ FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
+};
+
+enum {
+ /*
+ * By default, `odb_write_object()` does not actually write anything
+ * into the object store, but only computes the object ID. This flag
+ * changes that so that the object will be written as a loose object
+ * and persisted.
+ */
+ WRITE_OBJECT_PERSIST = (1 << 0),
+
+ /*
+ * Do not print an error in case something goes wrong.
+ */
+ WRITE_OBJECT_SILENT = (1 << 1),
+};
+
+/*
+ * Write an object into the object database. The object is being written into
+ * the local alternate of the repository. If provided, the converted object ID
+ * as well as the compatibility object ID are written to the respective
+ * pointers.
+ *
+ * Returns 0 on success, a negative error code otherwise.
+ */
+int odb_write_object_ext(struct object_database *odb,
+ const void *buf, unsigned long len,
+ enum object_type type,
+ struct object_id *oid,
+ struct object_id *compat_oid,
+ unsigned flags);
+
+static inline int odb_write_object(struct object_database *odb,
+ const void *buf, unsigned long len,
+ enum object_type type,
+ struct object_id *oid)
+{
+ return odb_write_object_ext(odb, buf, len, type, oid, NULL, 0);
+}
+
+/* Compatibility wrappers, to be removed once Git 2.51 has been released. */
+#include "repository.h"
+
+static inline int oid_object_info_extended(struct repository *r,
+ const struct object_id *oid,
+ struct object_info *oi,
+ unsigned flags)
+{
+ return odb_read_object_info_extended(r->objects, oid, oi, flags);
+}
+
+static inline int oid_object_info(struct repository *r,
+ const struct object_id *oid,
+ unsigned long *sizep)
+{
+ return odb_read_object_info(r->objects, oid, sizep);
+}
+
+static inline void *repo_read_object_file(struct repository *r,
+ const struct object_id *oid,
+ enum object_type *type,
+ unsigned long *size)
+{
+ return odb_read_object(r->objects, oid, type, size);
+}
+
+static inline int has_object(struct repository *r,
+ const struct object_id *oid,
+ unsigned flags)
+{
+ return odb_has_object(r->objects, oid, flags);
+}
+
+#endif /* ODB_H */
diff --git a/oss-fuzz/fuzz-pack-idx.c b/oss-fuzz/fuzz-pack-idx.c
index 609a343..d2a92f3 100644
--- a/oss-fuzz/fuzz-pack-idx.c
+++ b/oss-fuzz/fuzz-pack-idx.c
@@ -1,5 +1,5 @@
#include "git-compat-util.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 7f400ee..4404921 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -4,7 +4,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
@@ -144,8 +144,8 @@ void bitmap_writer_build_type_index(struct bitmap_writer *writer,
break;
default:
- real_type = oid_object_info(writer->to_pack->repo,
- &entry->idx.oid, NULL);
+ real_type = odb_read_object_info(writer->to_pack->repo->objects,
+ &entry->idx.oid, NULL);
break;
}
@@ -1052,7 +1052,8 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
struct bitmap_disk_header header;
- int fd = odb_mkstemp(&tmp_file, "pack/tmp_bitmap_XXXXXX");
+ int fd = odb_mkstemp(writer->repo->objects, &tmp_file,
+ "pack/tmp_bitmap_XXXXXX");
if (writer->pseudo_merges_nr)
options |= BITMAP_OPT_PSEUDO_MERGES;
@@ -1087,7 +1088,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
oid_access);
if (commit_pos < 0)
- BUG(_("trying to write commit not in index"));
+ BUG("trying to write commit not in index");
stored->commit_pos = commit_pos + base_objects;
}
diff --git a/pack-bitmap.c b/pack-bitmap.c
index ac6d62b..d14421e 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -17,7 +17,7 @@
#include "packfile.h"
#include "repository.h"
#include "trace2.h"
-#include "object-store.h"
+#include "odb.h"
#include "list-objects-filter-options.h"
#include "midx.h"
#include "config.h"
@@ -31,6 +31,7 @@ struct stored_bitmap {
struct object_id oid;
struct ewah_bitmap *root;
struct stored_bitmap *xor;
+ size_t map_pos;
int flags;
};
@@ -314,13 +315,14 @@ static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
struct ewah_bitmap *root,
const struct object_id *oid,
struct stored_bitmap *xor_with,
- int flags)
+ int flags, size_t map_pos)
{
struct stored_bitmap *stored;
khiter_t hash_pos;
int ret;
stored = xmalloc(sizeof(struct stored_bitmap));
+ stored->map_pos = map_pos;
stored->root = root;
stored->xor = xor_with;
stored->flags = flags;
@@ -376,10 +378,12 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
struct stored_bitmap *xor_bitmap = NULL;
uint32_t commit_idx_pos;
struct object_id oid;
+ size_t entry_map_pos;
if (index->map_size - index->map_pos < 6)
return error(_("corrupt ewah bitmap: truncated header for entry %d"), i);
+ entry_map_pos = index->map_pos;
commit_idx_pos = read_be32(index->map, &index->map_pos);
xor_offset = read_u8(index->map, &index->map_pos);
flags = read_u8(index->map, &index->map_pos);
@@ -402,8 +406,9 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
if (!bitmap)
return -1;
- recent_bitmaps[i % MAX_XOR_OFFSET] = store_bitmap(
- index, bitmap, &oid, xor_bitmap, flags);
+ recent_bitmaps[i % MAX_XOR_OFFSET] =
+ store_bitmap(index, bitmap, &oid, xor_bitmap, flags,
+ entry_map_pos);
}
return 0;
@@ -630,41 +635,28 @@ static int load_bitmap(struct repository *r, struct bitmap_index *bitmap_git,
bitmap_git->ext_index.positions = kh_init_oid_pos();
if (load_reverse_index(r, bitmap_git))
- goto failed;
+ return -1;
if (!(bitmap_git->commits = read_bitmap_1(bitmap_git)) ||
!(bitmap_git->trees = read_bitmap_1(bitmap_git)) ||
!(bitmap_git->blobs = read_bitmap_1(bitmap_git)) ||
!(bitmap_git->tags = read_bitmap_1(bitmap_git)))
- goto failed;
+ return -1;
if (!bitmap_git->table_lookup && load_bitmap_entries_v1(bitmap_git) < 0)
- goto failed;
+ return -1;
if (bitmap_git->base) {
if (!bitmap_is_midx(bitmap_git))
BUG("non-MIDX bitmap has non-NULL base bitmap index");
if (load_bitmap(r, bitmap_git->base, 1) < 0)
- goto failed;
+ return -1;
}
if (!recursing)
load_all_type_bitmaps(bitmap_git);
return 0;
-
-failed:
- munmap(bitmap_git->map, bitmap_git->map_size);
- bitmap_git->map = NULL;
- bitmap_git->map_size = 0;
-
- kh_destroy_oid_map(bitmap_git->bitmaps);
- bitmap_git->bitmaps = NULL;
-
- kh_destroy_oid_pos(bitmap_git->ext_index.positions);
- bitmap_git->ext_index.positions = NULL;
-
- return -1;
}
static int open_pack_bitmap(struct repository *r,
@@ -691,13 +683,15 @@ static int open_pack_bitmap(struct repository *r,
static int open_midx_bitmap(struct repository *r,
struct bitmap_index *bitmap_git)
{
+ struct odb_source *source;
int ret = -1;
- struct multi_pack_index *midx;
assert(!bitmap_git->map);
- for (midx = get_multi_pack_index(r); midx; midx = midx->next) {
- if (!open_midx_bitmap_1(bitmap_git, midx))
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ struct multi_pack_index *midx = get_multi_pack_index(source);
+ if (midx && !open_midx_bitmap_1(bitmap_git, midx))
ret = 0;
}
return ret;
@@ -882,6 +876,7 @@ static struct stored_bitmap *lazy_bitmap_for_commit(struct bitmap_index *bitmap_
int xor_flags;
khiter_t hash_pos;
struct bitmap_lookup_table_xor_item *xor_item;
+ size_t entry_map_pos;
if (is_corrupt)
return NULL;
@@ -941,6 +936,7 @@ static struct stored_bitmap *lazy_bitmap_for_commit(struct bitmap_index *bitmap_
goto corrupt;
}
+ entry_map_pos = bitmap_git->map_pos;
bitmap_git->map_pos += sizeof(uint32_t) + sizeof(uint8_t);
xor_flags = read_u8(bitmap_git->map, &bitmap_git->map_pos);
bitmap = read_bitmap_1(bitmap_git);
@@ -948,7 +944,8 @@ static struct stored_bitmap *lazy_bitmap_for_commit(struct bitmap_index *bitmap_
if (!bitmap)
goto corrupt;
- xor_bitmap = store_bitmap(bitmap_git, bitmap, &xor_item->oid, xor_bitmap, xor_flags);
+ xor_bitmap = store_bitmap(bitmap_git, bitmap, &xor_item->oid,
+ xor_bitmap, xor_flags, entry_map_pos);
xor_items_nr--;
}
@@ -982,6 +979,7 @@ static struct stored_bitmap *lazy_bitmap_for_commit(struct bitmap_index *bitmap_
* Instead, we can skip ahead and immediately read the flags and
* ewah bitmap.
*/
+ entry_map_pos = bitmap_git->map_pos;
bitmap_git->map_pos += sizeof(uint32_t) + sizeof(uint8_t);
flags = read_u8(bitmap_git->map, &bitmap_git->map_pos);
bitmap = read_bitmap_1(bitmap_git);
@@ -989,7 +987,8 @@ static struct stored_bitmap *lazy_bitmap_for_commit(struct bitmap_index *bitmap_
if (!bitmap)
goto corrupt;
- return store_bitmap(bitmap_git, bitmap, oid, xor_bitmap, flags);
+ return store_bitmap(bitmap_git, bitmap, oid, xor_bitmap, flags,
+ entry_map_pos);
corrupt:
free(xor_items);
@@ -1363,8 +1362,8 @@ static struct bitmap *find_boundary_objects(struct bitmap_index *bitmap_git,
bitmap_set(roots_bitmap, pos);
}
- if (!cascade_pseudo_merges_1(bitmap_git, cb.base, roots_bitmap))
- bitmap_free(roots_bitmap);
+ cascade_pseudo_merges_1(bitmap_git, cb.base, roots_bitmap);
+ bitmap_free(roots_bitmap);
}
/*
@@ -1868,8 +1867,8 @@ static unsigned long get_size_by_pos(struct bitmap_index *bitmap_git,
size_t eindex_pos = pos - bitmap_num_objects_total(bitmap_git);
struct eindex *eindex = &bitmap_git->ext_index;
struct object *obj = eindex->objects[eindex_pos];
- if (oid_object_info_extended(bitmap_repo(bitmap_git), &obj->oid,
- &oi, 0) < 0)
+ if (odb_read_object_info_extended(bitmap_repo(bitmap_git)->objects, &obj->oid,
+ &oi, 0) < 0)
die(_("unable to get size of %s"), oid_to_hex(&obj->oid));
}
@@ -2852,8 +2851,9 @@ int test_bitmap_commits(struct repository *r)
die(_("failed to load bitmap indexes"));
/*
- * As this function is only used to print bitmap selected
- * commits, we don't have to read the commit table.
+ * Since this function needs to print the bitmapped
+ * commits, bypass the commit lookup table (if one exists)
+ * by forcing the bitmap to eagerly load its entries.
*/
if (bitmap_git->table_lookup) {
if (load_bitmap_entries_v1(bitmap_git) < 0)
@@ -2869,6 +2869,48 @@ int test_bitmap_commits(struct repository *r)
return 0;
}
+int test_bitmap_commits_with_offset(struct repository *r)
+{
+ struct object_id oid;
+ struct stored_bitmap *stored;
+ struct bitmap_index *bitmap_git;
+ size_t commit_idx_pos_map_pos, xor_offset_map_pos, flag_map_pos,
+ ewah_bitmap_map_pos;
+
+ bitmap_git = prepare_bitmap_git(r);
+ if (!bitmap_git)
+ die(_("failed to load bitmap indexes"));
+
+ /*
+ * Since this function needs to know the position of each individual
+ * bitmap, bypass the commit lookup table (if one exists) by forcing
+ * the bitmap to eagerly load its entries.
+ */
+ if (bitmap_git->table_lookup) {
+ if (load_bitmap_entries_v1(bitmap_git) < 0)
+ die(_("failed to load bitmap indexes"));
+ }
+
+ kh_foreach (bitmap_git->bitmaps, oid, stored, {
+ commit_idx_pos_map_pos = stored->map_pos;
+ xor_offset_map_pos = stored->map_pos + sizeof(uint32_t);
+ flag_map_pos = xor_offset_map_pos + sizeof(uint8_t);
+ ewah_bitmap_map_pos = flag_map_pos + sizeof(uint8_t);
+
+ printf_ln("%s %"PRIuMAX" %"PRIuMAX" %"PRIuMAX" %"PRIuMAX,
+ oid_to_hex(&oid),
+ (uintmax_t)commit_idx_pos_map_pos,
+ (uintmax_t)xor_offset_map_pos,
+ (uintmax_t)flag_map_pos,
+ (uintmax_t)ewah_bitmap_map_pos);
+ })
+ ;
+
+ free_bitmap_index(bitmap_git);
+
+ return 0;
+}
+
int test_bitmap_hashes(struct repository *r)
{
struct bitmap_index *bitmap_git = prepare_bitmap_git(r);
@@ -3220,8 +3262,8 @@ static off_t get_disk_usage_for_extended(struct bitmap_index *bitmap_git)
i)))
continue;
- if (oid_object_info_extended(bitmap_repo(bitmap_git), &obj->oid,
- &oi, 0) < 0)
+ if (odb_read_object_info_extended(bitmap_repo(bitmap_git)->objects,
+ &obj->oid, &oi, 0) < 0)
die(_("unable to get disk usage of '%s'"),
oid_to_hex(&obj->oid));
@@ -3305,11 +3347,18 @@ static int verify_bitmap_file(const struct git_hash_algo *algop,
int verify_bitmap_files(struct repository *r)
{
+ struct odb_source *source;
int res = 0;
- for (struct multi_pack_index *m = get_multi_pack_index(r);
- m; m = m->next) {
- char *midx_bitmap_name = midx_bitmap_filename(m);
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ struct multi_pack_index *m = get_multi_pack_index(source);
+ char *midx_bitmap_name;
+
+ if (!m)
+ continue;
+
+ midx_bitmap_name = midx_bitmap_filename(m);
res |= verify_bitmap_file(r->hash_algo, midx_bitmap_name);
free(midx_bitmap_name);
}
diff --git a/pack-bitmap.h b/pack-bitmap.h
index 382d394..1bd7a79 100644
--- a/pack-bitmap.h
+++ b/pack-bitmap.h
@@ -81,6 +81,7 @@ void traverse_bitmap_commit_list(struct bitmap_index *,
show_reachable_fn show_reachable);
void test_bitmap_walk(struct rev_info *revs);
int test_bitmap_commits(struct repository *r);
+int test_bitmap_commits_with_offset(struct repository *r);
int test_bitmap_hashes(struct repository *r);
int test_bitmap_pseudo_merges(struct repository *r);
int test_bitmap_pseudo_merge_commits(struct repository *r, uint32_t n);
diff --git a/pack-check.c b/pack-check.c
index 874897d..67cb2cf 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -8,7 +8,7 @@
#include "progress.h"
#include "packfile.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
struct idx_entry {
off_t offset;
diff --git a/pack-mtimes.c b/pack-mtimes.c
index 20900ca..8e1f2de 100644
--- a/pack-mtimes.c
+++ b/pack-mtimes.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "pack-mtimes.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "strbuf.h"
diff --git a/pack-objects.h b/pack-objects.h
index 475a2d6..83299d4 100644
--- a/pack-objects.h
+++ b/pack-objects.h
@@ -1,7 +1,7 @@
#ifndef PACK_OBJECTS_H
#define PACK_OBJECTS_H
-#include "object-store.h"
+#include "odb.h"
#include "thread-utils.h"
#include "pack.h"
#include "packfile.h"
@@ -120,11 +120,23 @@ struct object_entry {
unsigned ext_base:1; /* delta_idx points outside packlist */
};
+/**
+ * A packing region is a section of the packing_data.objects array
+ * as given by a starting index and a number of elements.
+ */
+struct packing_region {
+ size_t start;
+ size_t nr;
+};
+
struct packing_data {
struct repository *repo;
struct object_entry *objects;
uint32_t nr_objects, nr_alloc;
+ struct packing_region *regions;
+ size_t nr_regions, nr_regions_alloc;
+
int32_t *index;
uint32_t index_size;
diff --git a/pack-revindex.c b/pack-revindex.c
index ffcde48..0cc422a 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "pack-revindex.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "strbuf.h"
#include "trace2.h"
diff --git a/pack-write.c b/pack-write.c
index 6b06315..83eaf88 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -84,7 +84,8 @@ const char *write_idx_file(struct repository *repo,
} else {
if (!index_name) {
struct strbuf tmp_file = STRBUF_INIT;
- fd = odb_mkstemp(&tmp_file, "pack/tmp_idx_XXXXXX");
+ fd = odb_mkstemp(repo->objects, &tmp_file,
+ "pack/tmp_idx_XXXXXX");
index_name = strbuf_detach(&tmp_file, NULL);
} else {
unlink(index_name);
@@ -259,7 +260,8 @@ char *write_rev_file_order(struct repository *repo,
if (flags & WRITE_REV) {
if (!rev_name) {
struct strbuf tmp_file = STRBUF_INIT;
- fd = odb_mkstemp(&tmp_file, "pack/tmp_rev_XXXXXX");
+ fd = odb_mkstemp(repo->objects, &tmp_file,
+ "pack/tmp_rev_XXXXXX");
path = strbuf_detach(&tmp_file, NULL);
} else {
unlink(rev_name);
@@ -342,7 +344,7 @@ static char *write_mtimes_file(struct repository *repo,
if (!to_pack)
BUG("cannot call write_mtimes_file with NULL packing_data");
- fd = odb_mkstemp(&tmp_file, "pack/tmp_mtimes_XXXXXX");
+ fd = odb_mkstemp(repo->objects, &tmp_file, "pack/tmp_mtimes_XXXXXX");
mtimes_name = strbuf_detach(&tmp_file, NULL);
f = hashfd(repo->hash_algo, fd, mtimes_name);
@@ -531,27 +533,29 @@ struct hashfile *create_tmp_packfile(struct repository *repo,
struct strbuf tmpname = STRBUF_INIT;
int fd;
- fd = odb_mkstemp(&tmpname, "pack/tmp_pack_XXXXXX");
+ fd = odb_mkstemp(repo->objects, &tmpname, "pack/tmp_pack_XXXXXX");
*pack_tmp_name = strbuf_detach(&tmpname, NULL);
return hashfd(repo->hash_algo, fd, *pack_tmp_name);
}
-static void rename_tmp_packfile(struct strbuf *name_prefix, const char *source,
+static void rename_tmp_packfile(struct repository *repo,
+ struct strbuf *name_prefix, const char *source,
const char *ext)
{
size_t name_prefix_len = name_prefix->len;
strbuf_addstr(name_prefix, ext);
- if (finalize_object_file(source, name_prefix->buf))
+ if (finalize_object_file(repo, source, name_prefix->buf))
die("unable to rename temporary file to '%s'",
name_prefix->buf);
strbuf_setlen(name_prefix, name_prefix_len);
}
-void rename_tmp_packfile_idx(struct strbuf *name_buffer,
+void rename_tmp_packfile_idx(struct repository *repo,
+ struct strbuf *name_buffer,
char **idx_tmp_name)
{
- rename_tmp_packfile(name_buffer, *idx_tmp_name, "idx");
+ rename_tmp_packfile(repo, name_buffer, *idx_tmp_name, "idx");
}
void stage_tmp_packfiles(struct repository *repo,
@@ -584,11 +588,11 @@ void stage_tmp_packfiles(struct repository *repo,
hash);
}
- rename_tmp_packfile(name_buffer, pack_tmp_name, "pack");
+ rename_tmp_packfile(repo, name_buffer, pack_tmp_name, "pack");
if (rev_tmp_name)
- rename_tmp_packfile(name_buffer, rev_tmp_name, "rev");
+ rename_tmp_packfile(repo, name_buffer, rev_tmp_name, "rev");
if (mtimes_tmp_name)
- rename_tmp_packfile(name_buffer, mtimes_tmp_name, "mtimes");
+ rename_tmp_packfile(repo, name_buffer, mtimes_tmp_name, "mtimes");
free(rev_tmp_name);
free(mtimes_tmp_name);
diff --git a/pack.h b/pack.h
index 5d4393e..ec76472 100644
--- a/pack.h
+++ b/pack.h
@@ -145,7 +145,8 @@ void stage_tmp_packfiles(struct repository *repo,
struct pack_idx_option *pack_idx_opts,
unsigned char hash[],
char **idx_tmp_name);
-void rename_tmp_packfile_idx(struct strbuf *basename,
+void rename_tmp_packfile_idx(struct repository *repo,
+ struct strbuf *basename,
char **idx_tmp_name);
#endif
diff --git a/packfile.c b/packfile.c
index 70c7208..5d73932 100644
--- a/packfile.c
+++ b/packfile.c
@@ -19,7 +19,7 @@
#include "tree-walk.h"
#include "tree.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "midx.h"
#include "commit-graph.h"
#include "pack-revindex.h"
@@ -359,8 +359,9 @@ void close_pack(struct packed_git *p)
oidset_clear(&p->bad_objects);
}
-void close_object_store(struct raw_object_store *o)
+void close_object_store(struct object_database *o)
{
+ struct odb_source *source;
struct packed_git *p;
for (p = o->packed_git; p; p = p->next)
@@ -369,9 +370,10 @@ void close_object_store(struct raw_object_store *o)
else
close_pack(p);
- if (o->multi_pack_index) {
- close_midx(o->multi_pack_index);
- o->multi_pack_index = NULL;
+ for (source = o->sources; source; source = source->next) {
+ if (source->midx)
+ close_midx(source->midx);
+ source->midx = NULL;
}
close_commit_graph(o);
@@ -933,22 +935,17 @@ static void prepare_pack(const char *full_name, size_t full_name_len,
report_garbage(PACKDIR_FILE_GARBAGE, full_name);
}
-static void prepare_packed_git_one(struct repository *r, char *objdir, int local)
+static void prepare_packed_git_one(struct odb_source *source, int local)
{
- struct prepare_pack_data data;
struct string_list garbage = STRING_LIST_INIT_DUP;
+ struct prepare_pack_data data = {
+ .m = source->midx,
+ .r = source->odb->repo,
+ .garbage = &garbage,
+ .local = local,
+ };
- data.m = r->objects->multi_pack_index;
-
- /* look for the multi-pack-index for this object directory */
- while (data.m && strcmp(data.m->object_dir, objdir))
- data.m = data.m->next;
-
- data.r = r;
- data.garbage = &garbage;
- data.local = local;
-
- for_each_file_in_pack_dir(objdir, prepare_pack, &data);
+ for_each_file_in_pack_dir(source->path, prepare_pack, &data);
report_pack_garbage(data.garbage);
string_list_clear(data.garbage, 0);
@@ -965,14 +962,18 @@ static void prepare_packed_git(struct repository *r);
unsigned long repo_approximate_object_count(struct repository *r)
{
if (!r->objects->approximate_object_count_valid) {
- unsigned long count;
- struct multi_pack_index *m;
+ struct odb_source *source;
+ unsigned long count = 0;
struct packed_git *p;
prepare_packed_git(r);
- count = 0;
- for (m = get_multi_pack_index(r); m; m = m->next)
- count += m->num_objects;
+
+ for (source = r->objects->sources; source; source = source->next) {
+ struct multi_pack_index *m = get_multi_pack_index(source);
+ if (m)
+ count += m->num_objects;
+ }
+
for (p = r->objects->packed_git; p; p = p->next) {
if (open_pack_index(p))
continue;
@@ -1029,16 +1030,16 @@ static void prepare_packed_git_mru(struct repository *r)
static void prepare_packed_git(struct repository *r)
{
- struct object_directory *odb;
+ struct odb_source *source;
if (r->objects->packed_git_initialized)
return;
- prepare_alt_odb(r);
- for (odb = r->objects->odb; odb; odb = odb->next) {
- int local = (odb == r->objects->odb);
- prepare_multi_pack_index_one(r, odb->path, local);
- prepare_packed_git_one(r, odb->path, local);
+ odb_prepare_alternates(r->objects);
+ for (source = r->objects->sources; source; source = source->next) {
+ int local = (source == r->objects->sources);
+ prepare_multi_pack_index_one(source, local);
+ prepare_packed_git_one(source, local);
}
rearrange_packed_git(r);
@@ -1048,7 +1049,7 @@ static void prepare_packed_git(struct repository *r)
void reprepare_packed_git(struct repository *r)
{
- struct object_directory *odb;
+ struct odb_source *source;
obj_read_lock();
@@ -1059,10 +1060,10 @@ void reprepare_packed_git(struct repository *r)
* the lifetime of the process.
*/
r->objects->loaded_alternates = 0;
- prepare_alt_odb(r);
+ odb_prepare_alternates(r->objects);
- for (odb = r->objects->odb; odb; odb = odb->next)
- odb_clear_loose_cache(odb);
+ for (source = r->objects->sources; source; source = source->next)
+ odb_clear_loose_cache(source);
r->objects->approximate_object_count_valid = 0;
r->objects->packed_git_initialized = 0;
@@ -1076,31 +1077,21 @@ struct packed_git *get_packed_git(struct repository *r)
return r->objects->packed_git;
}
-struct multi_pack_index *get_multi_pack_index(struct repository *r)
+struct multi_pack_index *get_multi_pack_index(struct odb_source *source)
{
- prepare_packed_git(r);
- return r->objects->multi_pack_index;
-}
-
-struct multi_pack_index *get_local_multi_pack_index(struct repository *r)
-{
- struct multi_pack_index *m = get_multi_pack_index(r);
-
- /* no need to iterate; we always put the local one first (if any) */
- if (m && m->local)
- return m;
-
- return NULL;
+ prepare_packed_git(source->odb->repo);
+ return source->midx;
}
struct packed_git *get_all_packs(struct repository *r)
{
- struct multi_pack_index *m;
-
prepare_packed_git(r);
- for (m = r->objects->multi_pack_index; m; m = m->next) {
- uint32_t i;
- for (i = 0; i < m->num_packs + m->num_packs_in_base; i++)
+
+ for (struct odb_source *source = r->objects->sources; source; source = source->next) {
+ struct multi_pack_index *m = source->midx;
+ if (!m)
+ continue;
+ for (uint32_t i = 0; i < m->num_packs + m->num_packs_in_base; i++)
prepare_midx_pack(r, m, i);
}
@@ -1321,7 +1312,7 @@ static int retry_bad_packed_offset(struct repository *r,
return OBJ_BAD;
nth_packed_object_id(&oid, p, pack_pos_to_index(p, pos));
mark_bad_packed_object(p, &oid);
- type = oid_object_info(r, &oid, NULL);
+ type = odb_read_object_info(r->objects, &oid, NULL);
if (type <= OBJ_NONE)
return OBJ_BAD;
return type;
@@ -1849,7 +1840,8 @@ void *unpack_entry(struct repository *r, struct packed_git *p, off_t obj_offset,
oi.typep = &type;
oi.sizep = &base_size;
oi.contentp = &base;
- if (oid_object_info_extended(r, &base_oid, &oi, 0) < 0)
+ if (odb_read_object_info_extended(r->objects, &base_oid,
+ &oi, 0) < 0)
base = NULL;
external_base = base;
@@ -2082,16 +2074,15 @@ static int fill_pack_entry(const struct object_id *oid,
int find_pack_entry(struct repository *r, const struct object_id *oid, struct pack_entry *e)
{
struct list_head *pos;
- struct multi_pack_index *m;
prepare_packed_git(r);
- if (!r->objects->packed_git && !r->objects->multi_pack_index)
- return 0;
- for (m = r->objects->multi_pack_index; m; m = m->next) {
- if (fill_midx_entry(r, oid, e, m))
+ for (struct odb_source *source = r->objects->sources; source; source = source->next)
+ if (source->midx && fill_midx_entry(r, oid, e, source->midx))
return 1;
- }
+
+ if (!r->objects->packed_git)
+ return 0;
list_for_each(pos, &r->objects->packed_git_mru) {
struct packed_git *p = list_entry(pos, struct packed_git, mru);
diff --git a/packfile.h b/packfile.h
index 3a3c77c..f16753f 100644
--- a/packfile.h
+++ b/packfile.h
@@ -3,10 +3,10 @@
#include "list.h"
#include "object.h"
-#include "object-store.h"
+#include "odb.h"
#include "oidset.h"
-/* in object-store.h */
+/* in odb.h */
struct object_info;
struct packed_git {
@@ -147,8 +147,7 @@ void install_packed_git(struct repository *r, struct packed_git *pack);
struct packed_git *get_packed_git(struct repository *r);
struct list_head *get_packed_git_mru(struct repository *r);
-struct multi_pack_index *get_multi_pack_index(struct repository *r);
-struct multi_pack_index *get_local_multi_pack_index(struct repository *r);
+struct multi_pack_index *get_multi_pack_index(struct odb_source *source);
struct packed_git *get_all_packs(struct repository *r);
/*
@@ -183,12 +182,12 @@ int close_pack_fd(struct packed_git *p);
uint32_t get_pack_fanout(struct packed_git *p, uint32_t value);
-struct raw_object_store;
+struct object_database;
unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *);
void close_pack_windows(struct packed_git *);
void close_pack(struct packed_git *);
-void close_object_store(struct raw_object_store *o);
+void close_object_store(struct object_database *o);
void unuse_pack(struct pack_window **);
void clear_delta_base_cache(void);
struct packed_git *add_packed_git(struct repository *r, const char *path,
diff --git a/parallel-checkout.c b/parallel-checkout.c
index 57c2dca..fba6aa6 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -57,12 +57,12 @@ void get_parallel_checkout_configs(int *num_workers, int *threshold)
return;
}
- if (git_config_get_int("checkout.workers", num_workers))
+ if (repo_config_get_int(the_repository, "checkout.workers", num_workers))
*num_workers = DEFAULT_NUM_WORKERS;
else if (*num_workers < 1)
*num_workers = online_cpus();
- if (git_config_get_int("checkout.thresholdForParallelism", threshold))
+ if (repo_config_get_int(the_repository, "checkout.thresholdForParallelism", threshold))
*threshold = DEFAULT_THRESHOLD_FOR_PARALLELISM;
}
diff --git a/parse-options.c b/parse-options.c
index a9a39ec..5224203 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -68,6 +68,64 @@ static char *fix_filename(const char *prefix, const char *file)
return prefix_filename_except_for_dash(prefix, file);
}
+static int do_get_int_value(const void *value, size_t precision, intmax_t *ret)
+{
+ switch (precision) {
+ case sizeof(int8_t):
+ *ret = *(int8_t *)value;
+ return 0;
+ case sizeof(int16_t):
+ *ret = *(int16_t *)value;
+ return 0;
+ case sizeof(int32_t):
+ *ret = *(int32_t *)value;
+ return 0;
+ case sizeof(int64_t):
+ *ret = *(int64_t *)value;
+ return 0;
+ default:
+ return -1;
+ }
+}
+
+static intmax_t get_int_value(const struct option *opt, enum opt_parsed flags)
+{
+ intmax_t ret;
+ if (do_get_int_value(opt->value, opt->precision, &ret))
+ BUG("invalid precision for option %s", optname(opt, flags));
+ return ret;
+}
+
+static enum parse_opt_result set_int_value(const struct option *opt,
+ enum opt_parsed flags,
+ intmax_t value)
+{
+ switch (opt->precision) {
+ case sizeof(int8_t):
+ *(int8_t *)opt->value = value;
+ return 0;
+ case sizeof(int16_t):
+ *(int16_t *)opt->value = value;
+ return 0;
+ case sizeof(int32_t):
+ *(int32_t *)opt->value = value;
+ return 0;
+ case sizeof(int64_t):
+ *(int64_t *)opt->value = value;
+ return 0;
+ default:
+ BUG("invalid precision for option %s", optname(opt, flags));
+ }
+}
+
+static int signed_int_fits(intmax_t value, size_t precision)
+{
+ size_t bits = precision * CHAR_BIT;
+ intmax_t upper_bound = INTMAX_MAX >> (bitsizeof(intmax_t) - bits);
+ intmax_t lower_bound = -upper_bound - 1;
+ return lower_bound <= value && value <= upper_bound;
+}
+
static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
const struct option *opt,
enum opt_parsed flags,
@@ -89,35 +147,55 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
return opt->ll_callback(p, opt, NULL, unset);
case OPTION_BIT:
+ {
+ intmax_t value = get_int_value(opt, flags);
if (unset)
- *(int *)opt->value &= ~opt->defval;
+ value &= ~opt->defval;
else
- *(int *)opt->value |= opt->defval;
- return 0;
+ value |= opt->defval;
+ return set_int_value(opt, flags, value);
+ }
case OPTION_NEGBIT:
+ {
+ intmax_t value = get_int_value(opt, flags);
if (unset)
- *(int *)opt->value |= opt->defval;
+ value |= opt->defval;
else
- *(int *)opt->value &= ~opt->defval;
- return 0;
+ value &= ~opt->defval;
+ return set_int_value(opt, flags, value);
+ }
case OPTION_BITOP:
+ {
+ intmax_t value = get_int_value(opt, flags);
if (unset)
BUG("BITOP can't have unset form");
- *(int *)opt->value &= ~opt->extra;
- *(int *)opt->value |= opt->defval;
- return 0;
+ value &= ~opt->extra;
+ value |= opt->defval;
+ return set_int_value(opt, flags, value);
+ }
case OPTION_COUNTUP:
- if (*(int *)opt->value < 0)
- *(int *)opt->value = 0;
- *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1;
- return 0;
+ {
+ size_t bits = CHAR_BIT * opt->precision;
+ intmax_t upper_bound = INTMAX_MAX >> (bitsizeof(intmax_t) - bits);
+ intmax_t value = get_int_value(opt, flags);
+
+ if (value < 0)
+ value = 0;
+ if (unset)
+ value = 0;
+ else if (value < upper_bound)
+ value++;
+ else
+ return error(_("value for %s exceeds %"PRIdMAX),
+ optname(opt, flags), upper_bound);
+ return set_int_value(opt, flags, value);
+ }
case OPTION_SET_INT:
- *(int *)opt->value = unset ? 0 : opt->defval;
- return 0;
+ return set_int_value(opt, flags, unset ? 0 : opt->defval);
case OPTION_STRING:
if (unset)
@@ -199,23 +277,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
return error(_("value %s for %s not in range [%"PRIdMAX",%"PRIdMAX"]"),
arg, optname(opt, flags), (intmax_t)lower_bound, (intmax_t)upper_bound);
- switch (opt->precision) {
- case 1:
- *(int8_t *)opt->value = value;
- return 0;
- case 2:
- *(int16_t *)opt->value = value;
- return 0;
- case 4:
- *(int32_t *)opt->value = value;
- return 0;
- case 8:
- *(int64_t *)opt->value = value;
- return 0;
- default:
- BUG("invalid precision for option %s",
- optname(opt, flags));
- }
+ return set_int_value(opt, flags, value);
}
case OPTION_UNSIGNED:
{
@@ -266,7 +328,9 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
}
struct parse_opt_cmdmode_list {
- int value, *value_ptr;
+ intmax_t value;
+ void *value_ptr;
+ size_t precision;
const struct option *opt;
const char *arg;
enum opt_parsed flags;
@@ -280,7 +344,7 @@ static void build_cmdmode_list(struct parse_opt_ctx_t *ctx,
for (; opts->type != OPTION_END; opts++) {
struct parse_opt_cmdmode_list *elem = ctx->cmdmode_list;
- int *value_ptr = opts->value;
+ void *value_ptr = opts->value;
if (!(opts->flags & PARSE_OPT_CMDMODE) || !value_ptr)
continue;
@@ -292,10 +356,13 @@ static void build_cmdmode_list(struct parse_opt_ctx_t *ctx,
CALLOC_ARRAY(elem, 1);
elem->value_ptr = value_ptr;
- elem->value = *value_ptr;
+ elem->precision = opts->precision;
+ if (do_get_int_value(value_ptr, opts->precision, &elem->value))
+ optbug(opts, "has invalid precision");
elem->next = ctx->cmdmode_list;
ctx->cmdmode_list = elem;
}
+ BUG_if_bug("invalid 'struct option'");
}
static char *optnamearg(const struct option *opt, const char *arg,
@@ -317,7 +384,13 @@ static enum parse_opt_result get_value(struct parse_opt_ctx_t *p,
char *opt_name, *other_opt_name;
for (; elem; elem = elem->next) {
- if (*elem->value_ptr == elem->value)
+ intmax_t new_value;
+
+ if (do_get_int_value(elem->value_ptr, elem->precision,
+ &new_value))
+ BUG("impossible: invalid precision");
+
+ if (new_value == elem->value)
continue;
if (elem->opt &&
@@ -327,7 +400,7 @@ static enum parse_opt_result get_value(struct parse_opt_ctx_t *p,
elem->opt = opt;
elem->arg = arg;
elem->flags = flags;
- elem->value = *elem->value_ptr;
+ elem->value = new_value;
}
if (result || !elem)
@@ -586,10 +659,14 @@ static void parse_options_check(const struct option *opts)
opts->long_name && !(opts->flags & PARSE_OPT_NONEG))
optbug(opts, "OPTION_SET_INT 0 should not be negatable");
switch (opts->type) {
- case OPTION_COUNTUP:
+ case OPTION_SET_INT:
case OPTION_BIT:
case OPTION_NEGBIT:
- case OPTION_SET_INT:
+ case OPTION_BITOP:
+ case OPTION_COUNTUP:
+ if (!signed_int_fits(opts->defval, opts->precision))
+ optbug(opts, "has invalid defval");
+ /* fallthru */
case OPTION_NUMBER:
if ((opts->flags & PARSE_OPT_OPTARG) ||
!(opts->flags & PARSE_OPT_NOARG))
diff --git a/parse-options.h b/parse-options.h
index 91c3e3c..706de97 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -172,6 +172,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG|(f), \
.callback = NULL, \
@@ -182,6 +183,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG|(f), \
}
@@ -190,6 +192,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG | (f), \
.defval = (i), \
@@ -238,6 +241,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG|PARSE_OPT_NONEG, \
.defval = (set), \
@@ -248,6 +252,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG, \
.defval = (b), \
@@ -260,6 +265,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, \
.defval = 1, \
@@ -269,6 +275,7 @@ struct option {
.short_name = (s), \
.long_name = (l), \
.value = (v), \
+ .precision = sizeof(*v), \
.help = (h), \
.flags = PARSE_OPT_CMDMODE|PARSE_OPT_NOARG|PARSE_OPT_NONEG | (f), \
.defval = (i), \
@@ -616,6 +623,8 @@ int parse_opt_tracking_mode(const struct option *, const char *, int);
#define OPT_PATHSPEC_FROM_FILE(v) OPT_FILENAME(0, "pathspec-from-file", v, N_("read pathspec from file"))
#define OPT_PATHSPEC_FILE_NUL(v) OPT_BOOL(0, "pathspec-file-nul", v, N_("with --pathspec-from-file, pathspec elements are separated with NUL character"))
#define OPT_AUTOSTASH(v) OPT_BOOL(0, "autostash", v, N_("automatically stash/stash pop before and after"))
+#define OPT_DIFF_UNIFIED(v) OPT_INTEGER_F('U', "unified", v, N_("generate diffs with <n> lines context"), PARSE_OPT_NONEG)
+#define OPT_DIFF_INTERHUNK_CONTEXT(v) OPT_INTEGER_F(0, "inter-hunk-context", v, N_("show context between diff hunks up to the specified number of lines"), PARSE_OPT_NONEG)
#define OPT_IPVERSION(v) \
OPT_SET_INT_F('4', "ipv4", (v), N_("use IPv4 addresses only"), \
diff --git a/path-walk.c b/path-walk.c
index 341bdd2..2d4ddba 100644
--- a/path-walk.c
+++ b/path-walk.c
@@ -503,7 +503,11 @@ int walk_objects_by_path(struct path_walk_info *info)
if (prepare_revision_walk(info->revs))
die(_("failed to setup revision walk"));
- /* Walk trees to mark them as UNINTERESTING. */
+ /*
+ * Walk trees to mark them as UNINTERESTING.
+ * This is particularly important when 'edge_aggressive' is set.
+ */
+ info->revs->edge_hint_aggressive = info->edge_aggressive;
edge_repo = info->revs->repo;
edge_tree_list = root_tree_list;
mark_edges_uninteresting(info->revs, show_edge,
diff --git a/path-walk.h b/path-walk.h
index 473ee9d..5ef5a84 100644
--- a/path-walk.h
+++ b/path-walk.h
@@ -51,6 +51,13 @@ struct path_walk_info {
int prune_all_uninteresting;
/**
+ * When 'edge_aggressive' is set, then the revision walk will use
+ * the '--object-edge-aggressive' option to mark even more objects
+ * as uninteresting.
+ */
+ int edge_aggressive;
+
+ /**
* Specify a sparse-checkout definition to match our paths to. Do not
* walk outside of this sparse definition. If the patterns are in
* cone mode, then the search may prune directories that are outside
diff --git a/path.c b/path.c
index 3b598b2..7f56eaf 100644
--- a/path.c
+++ b/path.c
@@ -15,7 +15,7 @@
#include "submodule-config.h"
#include "path.h"
#include "packfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "lockfile.h"
#include "exec-cmd.h"
@@ -397,7 +397,7 @@ static void adjust_git_path(struct repository *repo,
strbuf_splice(buf, 0, buf->len,
repo->index_file, strlen(repo->index_file));
else if (dir_prefix(base, "objects"))
- replace_dir(buf, git_dir_len + 7, repo->objects->odb->path);
+ replace_dir(buf, git_dir_len + 7, repo->objects->sources->path);
else if (repo_settings_get_hooks_path(repo) && dir_prefix(base, "hooks"))
replace_dir(buf, git_dir_len + 5, repo_settings_get_hooks_path(repo));
else if (repo->different_commondir)
diff --git a/pathspec.c b/pathspec.c
index 2b4e434..a3ddd70 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -492,7 +492,7 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
if (!match) {
const char *hint_path;
- if (!have_git_dir())
+ if ((flags & PATHSPEC_NO_REPOSITORY) || !have_git_dir())
die(_("'%s' is outside the directory tree"),
copyfrom);
hint_path = repo_get_work_tree(the_repository);
@@ -614,6 +614,10 @@ void parse_pathspec(struct pathspec *pathspec,
(flags & PATHSPEC_PREFER_FULL))
BUG("PATHSPEC_PREFER_CWD and PATHSPEC_PREFER_FULL are incompatible");
+ if ((flags & PATHSPEC_NO_REPOSITORY) &&
+ (~magic_mask & (PATHSPEC_ATTR | PATHSPEC_FROMTOP)))
+ BUG("PATHSPEC_NO_REPOSITORY is incompatible with PATHSPEC_ATTR and PATHSPEC_FROMTOP");
+
/* No arguments with prefix -> prefix pathspec */
if (!entry) {
if (flags & PATHSPEC_PREFER_FULL)
diff --git a/pathspec.h b/pathspec.h
index de537cf..5e3a6f1 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -76,6 +76,11 @@ struct pathspec {
* allowed, then it will automatically set for every pathspec.
*/
#define PATHSPEC_LITERAL_PATH (1<<6)
+/*
+ * For git diff --no-index, indicate that we are operating without
+ * a repository or index.
+ */
+#define PATHSPEC_NO_REPOSITORY (1<<7)
/**
* Given command line arguments and a prefix, convert the input to
@@ -184,6 +189,12 @@ int match_pathspec(struct index_state *istate,
const char *name, int namelen,
int prefix, char *seen, int is_dir);
+/* Set both DO_MATCH_DIRECTORY and DO_MATCH_LEADING_PATHSPEC if is_dir true */
+int match_leading_pathspec(struct index_state *istate,
+ const struct pathspec *ps,
+ const char *name, int namelen,
+ int prefix, char *seen, int is_dir);
+
/*
* Determine whether a pathspec will match only entire index entries (non-sparse
* files and/or entire sparse directories). If the pathspec has the potential to
diff --git a/perl/Git.pm b/perl/Git.pm
index 6f47d65..090cf77 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1061,6 +1061,19 @@
delete @$self{@vars};
}
+# Given PORT, a port number or service name, return its numerical
+# value else undef.
+sub port_num {
+ my ($port) = @_;
+
+ # Port can be either a positive integer within the 16-bit range...
+ if ($port =~ /^\d+$/ && $port > 0 && $port <= (2**16 - 1)) {
+ return $port;
+ }
+
+ # ... or a symbolic port (service name).
+ return scalar getservbyname($port, '');
+}
=item credential_read( FILEHANDLE )
diff --git a/pkt-line.c b/pkt-line.c
index a5bcbc9..fc583fe 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -617,7 +617,7 @@ void packet_reader_init(struct packet_reader *reader, int fd,
reader->buffer_size = sizeof(packet_buffer);
reader->options = options;
reader->me = "git";
- reader->hash_algo = &hash_algos[GIT_HASH_SHA1];
+ reader->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
strbuf_init(&reader->scratch, 0);
}
diff --git a/po/TEAMS b/po/TEAMS
index 9a6a15c..647a107 100644
--- a/po/TEAMS
+++ b/po/TEAMS
@@ -29,6 +29,10 @@
Leader: Jean-Noël Avila <jn.avila@free.fr>
Members: Sébastien Helleu <flashcode@flashtux.org>
+Language: ga (Irish)
+Repository: https://github.com/aindriu80/git-po
+Members: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
+
Language: id (Indonesian)
Repository: https://github.com/bagasme/git-po
Leader: Bagas Sanjaya <bagasdotme@gmail.com>
diff --git a/po/bg.po b/po/bg.po
index 37d127f..a641066 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -234,6 +234,10 @@
# acquire lock придобивам ключалка
# detached отделѐн, несвързан
# revision walk обхождане на версиите
+# exit code изходен код
+# score оценка за съвпадение
+# raw необработен
+#
#
# ------------------------
# „$var“ - може да не сработва за shell има gettext и eval_gettext - проверка - намират се лесно по „$
@@ -262,8 +266,8 @@
msgstr ""
"Project-Id-Version: git 2.48\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-05 22:57+0000\n"
-"PO-Revision-Date: 2025-03-06 09:15+0100\n"
+"POT-Creation-Date: 2025-05-29 13:50+0200\n"
+"PO-Revision-Date: 2025-05-29 20:25+0200\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"Language: bg\n"
@@ -1807,7 +1811,7 @@
#, c-format
msgid "unable to read %s"
-msgstr "обектът „%s“ не може да бъде прочетен"
+msgstr "обектът „%s“ не може да се прочете"
#, c-format
msgid "Badly quoted content in file '%s': %s"
@@ -2163,7 +2167,7 @@
msgstr "обновяване на следените файлове"
msgid "renormalize EOL of tracked files (implies -u)"
-msgstr "уеднаквяване на знаците за край на файл (включва опцията „-u“)"
+msgstr "уеднаквяване на знаците за край на ред (включва опцията „-u“)"
msgid "record only the fact that the path will be added later"
msgstr "отбелязване само на факта, че пътят ще се добави по-късно"
@@ -2739,11 +2743,11 @@
#, c-format
msgid "couldn't get the oid of the rev '%s'"
-msgstr "идентификаторът на обект на версия „%s“ не може да бъде получен"
+msgstr "идентификаторът на обект на версия „%s“ не може да се получи"
#, c-format
msgid "couldn't open the file '%s'"
-msgstr "файлът „%s“ не може да бъде отворен"
+msgstr "файлът „%s“ не може да се отвори"
#, c-format
msgid "Invalid command: you're currently in a %s/%s bisect"
@@ -2879,8 +2883,7 @@
#, c-format
msgid "cannot read file '%s' for replaying"
msgstr ""
-"файлът „%s“ не може да бъде прочетен, за да се изпълнят командите от него "
-"наново"
+"файлът „%s“ не може да се прочете, за да се изпълнят командите от него наново"
#, c-format
msgid "running %s\n"
@@ -2905,7 +2908,7 @@
#, c-format
msgid "cannot open file '%s' for writing"
-msgstr "файлът „%s“ не може да бъде отворен за запис"
+msgstr "файлът „%s“ не може да се отвори за запис"
msgid "bisect run cannot continue any more"
msgstr "двоичното търсене не може да продължи"
@@ -2964,7 +2967,7 @@
#, c-format
msgid "cannot find revision %s to ignore"
-msgstr "версията за прескачане „%s“ не може да бъде открита"
+msgstr "версията за прескачане „%s“ липсва"
msgid "show blame entries as we find them, incrementally"
msgstr "извеждане на авторството с намирането му, последователно"
@@ -2986,7 +2989,7 @@
msgstr "извеждане на напредъка"
msgid "show output score for blame entries"
-msgstr "извеждане на допълнителна информация за определянето на авторството"
+msgstr "извеждане на оценка за съвпадение при определяне на авторството"
msgid "show original filename (Default: auto)"
msgstr ""
@@ -3054,7 +3057,7 @@
msgstr "използване на съдържанието на ФАЙЛа като крайно положение"
msgid "score"
-msgstr "напасване на редовете"
+msgstr "оценка за съвпадение"
msgid "find line copies within and across files"
msgstr ""
@@ -3175,7 +3178,7 @@
"branch '%s' not found.\n"
"Did you forget --remote?"
msgstr ""
-"клонът „%s“ не може да бъде открит.\n"
+"клонът „%s“ липсва.\n"
"Пробвахте ли опцията „--remote“?"
#, c-format
@@ -3191,7 +3194,7 @@
msgstr "Изтрит клон „%s“ (той сочеше към „%s“).\n"
msgid "unable to parse format string"
-msgstr "форматиращият низ не може да бъде анализиран: %s"
+msgstr "форматиращият низ не може да се анализира: %s"
msgid "could not resolve HEAD"
msgstr "подаването, сочено от указателя „HEAD“, не може да се установи"
@@ -3596,7 +3599,7 @@
#, c-format
msgid "cannot read object %s '%s'"
-msgstr "обектът „%s“ (%s) не може да бъде прочетен"
+msgstr "обектът „%s“ (%s) не може да се прочете"
msgid "flush is only for --buffer mode"
msgstr "изчистването на буферите (flush) се ползва само за „--buffer“"
@@ -3622,11 +3625,8 @@
msgid "git cat-file <type> <object>"
msgstr "git cat-file ВИД ОБЕКТ"
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e|-p) ОБЕКТ"
-
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t|-s) [--allow-unknown-type] ОБЕКТ"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e|-p|-t|-s) ОБЕКТ"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3665,9 +3665,6 @@
msgid "show object size"
msgstr "извеждане на размера на обект"
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "позволяване на опциите „-s“ и „-t“ да работят с повредени обекти"
-
msgid "use mail map file"
msgstr ""
"използване на файл за съответствията на имената и адресите на е-поща "
@@ -3730,6 +3727,13 @@
msgstr ""
"опциите „--textconv“/„--filters“ изискват ПЪТ, а пакетният режим (batch) не"
+msgid "objects filter only supported in batch mode"
+msgstr "филтрирането на обекти е възможно само в пакетен режим"
+
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "филтрирането на обекти не се поддържа: „%s“"
+
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "„%s=<%s>“ изисква „%s“ или „%s“"
@@ -3911,11 +3915,11 @@
#, c-format
msgid "path '%s': cannot merge"
-msgstr "пътят „%s“ не може да бъде слян"
+msgstr "пътят „%s“ не може да се слее"
#, c-format
msgid "Unable to add merge result for '%s'"
-msgstr "Резултатът за „%s“ не може да бъде слян"
+msgstr "Резултатът за „%s“ не може да се слее"
#, c-format
msgid "Recreated %d merge conflict"
@@ -3966,7 +3970,7 @@
#, c-format
msgid "unable to read tree (%s)"
-msgstr "дървото не може да бъде прочетено (%s)"
+msgstr "дървото не може да се прочете (%s)"
msgid "you need to resolve your current index first"
msgstr "първо трябва да коригирате индекса си"
@@ -3988,7 +3992,7 @@
msgstr "Указателят „HEAD“ в момента сочи към"
msgid "unable to update HEAD"
-msgstr "Указателят „HEAD“ не може да бъде обновен"
+msgstr "Указателят „HEAD“ не може да се обнови"
#, c-format
msgid "Reset branch '%s'\n"
@@ -4262,7 +4266,7 @@
#, c-format
msgid "could not resolve %s"
-msgstr "„%s“ не може да бъде проследен"
+msgstr "„%s“ не може да се проследи"
msgid "invalid path specification"
msgstr "указан е неправилен път"
@@ -4345,7 +4349,7 @@
#, c-format
msgid "Would remove %s\n"
-msgstr "Файлът „%s“ ще бъде изтрит\n"
+msgstr "Файлът „%s“ ще се изтрие\n"
#, c-format
msgid "Skipping repository %s\n"
@@ -4353,21 +4357,21 @@
#, c-format
msgid "Would skip repository %s\n"
-msgstr "Хранилището „%s“ ще бъде прескочено\n"
+msgstr "Хранилището „%s“ ще се прескочи\n"
#, c-format
msgid "failed to remove %s"
-msgstr "файлът „%s“ не може да бъде изтрит"
+msgstr "файлът „%s“ не може да се изтрие"
#, c-format
msgid "could not lstat %s\n"
msgstr "не може да се получи информация чрез „lstat“ за „%s“\n"
msgid "Refusing to remove current working directory\n"
-msgstr "Текущата работна директория няма да бъде изтрита\n"
+msgstr "Текущата работна директория няма да се изтрие\n"
msgid "Would refuse to remove current working directory\n"
-msgstr "Текущата работна директория няма да бъде изтрита\n"
+msgstr "Текущата работна директория няма да се изтрие\n"
#, c-format
msgid ""
@@ -4440,8 +4444,8 @@
msgid "Would remove the following item:"
msgid_plural "Would remove the following items:"
-msgstr[0] "Следният обект ще бъде изтрит:"
-msgstr[1] "Следните обекти ще бъдат изтрити:"
+msgstr[0] "Следният обект ще се изтрие:"
+msgstr[1] "Следните обекти ще се изтрият:"
msgid "No more files to clean, exiting."
msgstr "Файловете за изчистване свършиха. Изход от програмата."
@@ -4482,7 +4486,7 @@
#, c-format
msgid "failed to stat '%s'"
-msgstr "не може да бъде получена информация чрез „stat“ за „%s“"
+msgstr "не може да се получи информация чрез „stat“ за „%s“"
#, c-format
msgid "%s exists and is not a directory"
@@ -4515,11 +4519,11 @@
#, c-format
msgid "failed to create link '%s'"
-msgstr "връзката „%s“ не може да бъде създадена"
+msgstr "връзката „%s“ не може да се създаде"
#, c-format
msgid "failed to copy file to '%s'"
-msgstr "файлът не може да бъде копиран като „%s“"
+msgstr "файлът не може да се копира като „%s“"
#, c-format
msgid "failed to iterate over '%s'"
@@ -4546,7 +4550,7 @@
#, c-format
msgid "unable to update %s"
-msgstr "обектът „%s“ не може да бъде обновен"
+msgstr "обектът „%s“ не може да се обнови"
msgid "failed to initialize sparse-checkout"
msgstr "частичното изтегляне не може да се инициализира"
@@ -4557,7 +4561,7 @@
"съществува. Изтегляне не може да се извърши"
msgid "unable to checkout working tree"
-msgstr "работното дърво не може да бъде подготвено"
+msgstr "работното дърво не може да се подготви"
msgid "unable to write parameters to config file"
msgstr "настройките не може да бъдат записани в конфигурационния файл"
@@ -4566,7 +4570,7 @@
msgstr "не може да се извърши пакетиране за изчистване на файловете"
msgid "cannot unlink temporary alternates file"
-msgstr "временният файл за алтернативни обекти не може да бъде изтрит"
+msgstr "временният файл за алтернативни обекти не може да се изтрие"
msgid "don't clone shallow repository"
msgstr "без клониране на плитко хранилище"
@@ -4730,7 +4734,7 @@
#, c-format
msgid "could not create work tree dir '%s'"
-msgstr "работното дърво в „%s“ не може да бъде създадено."
+msgstr "работното дърво в „%s“ не може да се създаде."
#, c-format
msgid "Cloning into bare repository '%s'...\n"
@@ -5070,22 +5074,22 @@
msgstr "неуспешно обновяване на файловете"
msgid "failed to unpack HEAD tree object"
-msgstr "върховото дърво (HEAD tree object) не може да бъде извадено от пакет"
+msgstr "върховото дърво (HEAD tree object) не може да се извади от пакет"
msgid "No paths with --include/--only does not make sense."
msgstr "опциите „--include“ и „--only“ изискват аргументи."
msgid "unable to create temporary index"
-msgstr "временният индекс не може да бъде създаден"
+msgstr "временният индекс не може да се създаде"
msgid "interactive add failed"
msgstr "неуспешно интерактивно добавяне"
msgid "unable to update temporary index"
-msgstr "временният индекс не може да бъде обновен"
+msgstr "временният индекс не може да се обнови"
msgid "Failed to update main cache tree"
-msgstr "Кешът за обектите-дървета не може да бъде обновен"
+msgstr "Кешът за обектите-дървета не може да се обнови"
msgid "cannot do a partial commit during a merge."
msgstr "по време на сливане не може да се извърши частично подаване."
@@ -5097,10 +5101,10 @@
msgstr "по време на пребазиране не може да се извърши частично подаване."
msgid "cannot read the index"
-msgstr "индексът не може да бъде прочетен"
+msgstr "индексът не може да се прочете"
msgid "unable to write temporary index file"
-msgstr "временният индекс не може да бъде записан"
+msgstr "временният индекс не може да се запише"
#, c-format
msgid "commit '%s' lacks author header"
@@ -5126,7 +5130,7 @@
#, c-format
msgid "could not lookup commit '%s'"
-msgstr "следното подаване не може да бъде открито: %s"
+msgstr "следното подаване липсва: %s"
#, c-format
msgid "(reading log message from standard input)\n"
@@ -5137,24 +5141,24 @@
#, c-format
msgid "could not read log file '%s'"
-msgstr "файлът със съобщението за подаване „%s“ не може да бъде прочетен"
+msgstr "файлът със съобщението за подаване „%s“ не може да се прочете"
#, c-format
msgid "options '%s' and '%s:%s' cannot be used together"
msgstr "опциите „--%s“ и „--%s:%s“ са несъвместими"
msgid "could not read SQUASH_MSG"
-msgstr "съобщението за вкарване SQUASH_MSG не може да бъде прочетено"
+msgstr "съобщението за вкарване SQUASH_MSG не може да се прочете"
msgid "could not read MERGE_MSG"
-msgstr "съобщението за сливане MERGE_MSG не може да бъде прочетено"
+msgstr "съобщението за сливане MERGE_MSG не може да се прочете"
#, c-format
msgid "could not open '%s'"
msgstr "„%s“ не може да се отвори"
msgid "could not write commit template"
-msgstr "шаблонът за подаване не може да бъде запазен"
+msgstr "шаблонът за подаване не може да се запази"
#, c-format
msgid ""
@@ -5231,7 +5235,7 @@
msgstr "%sПодаващ: %.*s <%.*s>"
msgid "Cannot read index"
-msgstr "Индексът не може да бъде прочетен"
+msgstr "Индексът не може да се прочете"
msgid "unable to pass trailers to --trailers"
msgstr "епилогът не може да се подаде на „--trailers“"
@@ -5275,7 +5279,7 @@
msgstr "опциите „%s“ и „%s“ са несъвместими"
msgid "You have nothing to amend."
-msgstr "Няма какво да бъде поправено."
+msgstr "Няма какво да се поправи."
msgid "You are in the middle of a merge -- cannot amend."
msgstr "В момента се извършва сливане, не може да поправяте."
@@ -5471,18 +5475,18 @@
msgstr "позволяване на подавания с празни съобщения"
msgid "could not parse HEAD commit"
-msgstr "върховото подаване „HEAD“ не може да бъде прочетено"
+msgstr "върховото подаване „HEAD“ не може да се прочете"
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Повреден файл за върха за сливането „MERGE_HEAD“ (%s)"
msgid "could not read MERGE_MODE"
-msgstr "режимът на сливане „MERGE_MODE“ не може да бъде прочетен"
+msgstr "режимът на сливане „MERGE_MODE“ не може да се прочете"
#, c-format
msgid "could not read commit message: %s"
-msgstr "съобщението за подаване не може да бъде прочетено: %s"
+msgstr "съобщението за подаване не може да се прочете: %s"
#, c-format
msgid "Aborting commit due to empty commit message.\n"
@@ -5723,7 +5727,7 @@
#, c-format
msgid "unable to read config file '%s'"
-msgstr "конфигурационният файл „%s“ не може да бъде прочетен"
+msgstr "конфигурационният файл „%s“ не може да се прочете"
msgid "error processing config file(s)"
msgstr "грешка при обработката на конфигурационен файл"
@@ -5804,7 +5808,7 @@
#, c-format
msgid "cannot create configuration file %s"
-msgstr "конфигурационният файл „%s“ не може да бъде създаден"
+msgstr "конфигурационният файл „%s“ не може да се създаде"
msgid "Action"
msgstr "Действие"
@@ -6042,7 +6046,7 @@
"добавяне на такъв МАРКЕР на счупеното работно дърво (стандартно е „-broken“)"
msgid "No names found, cannot describe anything."
-msgstr "Не са открити имена — нищо не може да бъде описано."
+msgstr "Не са открити имена — нищо не може да се опише."
#, c-format
msgid "option '%s' and commit-ishes cannot be used together"
@@ -6064,6 +6068,51 @@
msgid "specify the content of the diagnostic archive"
msgstr "указване на съдържанието на диагностичния архив"
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "режимът не може да се анализира: %s"
+
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "идентификаторът на обекта не може да се анализира: %s"
+
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [ОПЦИЯ_ЗА_РАЗЛИКИ…]"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "непознат аргумент: %s"
+
+msgid "working without -z is not supported"
+msgstr "опцията „-z“ е задължителна"
+
+msgid "pathspec arguments not supported"
+msgstr "не се поддържат опции за пътища"
+
+msgid "revision arguments not allowed"
+msgstr "не се поддържат опции за версии"
+
+msgid "invalid raw diff input"
+msgstr "неправилен необработен вход за разлики"
+
+msgid "tree objects not supported"
+msgstr "не се поддържат обекти-дървета"
+
+msgid "got EOF while reading path"
+msgstr "край на файл (EOF) при изчитане на път"
+
+msgid "got EOF while reading destination path"
+msgstr "край на файл (EOF) при изчитане на целевия път"
+
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr ""
+"оценката за съвпадение при преименуване/копиране не може да се анализира: %s"
+
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "непознато състояние на разлика: %c"
+
msgid "--merge-base only works with two commits"
msgstr "опцията „--merge-base“ изисква точно две подавания"
@@ -6106,15 +6155,15 @@
#, c-format
msgid "could not read symlink %s"
-msgstr "символната връзка „%s“ не може да бъде прочетена"
+msgstr "символната връзка „%s“ не може да се прочете"
#, c-format
msgid "could not read symlink file %s"
-msgstr "файлът, сочен от символната връзка „%s“, не може да бъде прочетен"
+msgstr "файлът, сочен от символната връзка „%s“, не може да се прочете"
#, c-format
msgid "could not read object %s for symlink %s"
-msgstr "обектът „%s“ за символната връзка „%s“ не може да бъде прочетен"
+msgstr "обектът „%s“ за символната връзка „%s“ не може да се прочете"
msgid ""
"combined diff formats ('-c' and '--cc') are not supported in\n"
@@ -6206,8 +6255,11 @@
msgid "select handling of signed tags"
msgstr "Как да се обработват подписаните етикети"
+msgid "select handling of signed commits"
+msgstr "как да се обработват подписаните подавания"
+
msgid "select handling of tags that tag filtered objects"
-msgstr "Как да се обработват етикетите на филтрираните обекти"
+msgstr "как да се обработват етикетите на филтрираните обекти"
msgid "select handling of commit messages in an alternate encoding"
msgstr ""
@@ -6304,7 +6356,7 @@
msgstr "опцията „fetch.parallel“ трябва да е неотрицателна"
msgid "couldn't find remote ref HEAD"
-msgstr "указателят „HEAD“ в отдалеченото хранилище не може да бъде открит"
+msgstr "указателят „HEAD“ в отдалеченото хранилище липсва"
#, c-format
msgid "From %.*s\n"
@@ -6327,10 +6379,10 @@
msgstr "[обновяване на етикетите]"
msgid "unable to update local ref"
-msgstr "локален указател не може да бъде обновен"
+msgstr "локален указател не може да се обнови"
msgid "would clobber existing tag"
-msgstr "съществуващ етикет ще бъде презаписан"
+msgstr "ще се презапише съществуващ етикет"
msgid "[new tag]"
msgstr "[нов етикет]"
@@ -6349,7 +6401,7 @@
#, c-format
msgid "cannot open '%s'"
-msgstr "„%s“ не може да бъде отворен"
+msgstr "„%s“ не може да се отвори"
msgid ""
"fetch normally indicates which branches had a forced update,\n"
@@ -6531,7 +6583,7 @@
msgid "modify the refspec to place all refs within refs/prefetch/"
msgstr ""
-"промяна на указателя, така че и той, както останалите, да бъде в „refs/"
+"промяна на указателя, така че и той, както останалите, да е в „refs/"
"prefetch/“"
msgid "prune remote-tracking branches no longer on remote"
@@ -6866,10 +6918,6 @@
msgstr "%s: развален или липсващ обект: %s"
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s: обектът е непознат вид „%s“: %s"
-
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "„%s“: не може да се анализира: „%s“"
@@ -6920,22 +6968,25 @@
#, c-format
msgid "unable to load rev-index for pack '%s'"
-msgstr "обратният индекс на пакета „%s“ не може да бъде зареден"
+msgstr "обратният индекс на пакета „%s“ не може да се зареди"
#, c-format
msgid "invalid rev-index for pack '%s'"
msgstr "неправилен обратен индекс за пакета „%s“"
+msgid "Checking ref database"
+msgstr "Проверка на базата от данни с указателите"
+
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [ОБЕКТ…]"
+" [--[no-]name-objects] [--[no-]references] [ОБЕКТ…]"
msgid "show unreachable objects"
msgstr "показване на недостижимите обекти"
@@ -6973,6 +7024,9 @@
msgid "show verbose names for reachable objects"
msgstr "показване на подробни имена на достижимите обекти"
+msgid "check reference database consistency"
+msgstr "проверка на валидността на базата от данни с указатели"
+
msgid "Checking objects"
msgstr "Проверка на обектите"
@@ -7008,7 +7062,7 @@
#, c-format
msgid "could not create fsmonitor cookie '%s'"
-msgstr "бисквитката за fsmonitor „%s“ не може да бъде създадена"
+msgstr "бисквитката за fsmonitor „%s“ не може да се създаде"
#, c-format
msgid "fsmonitor: cookie_result '%d' != SEEN"
@@ -7187,19 +7241,19 @@
msgstr "непознат аргумент към „--schedule“: %s"
msgid "failed to write commit-graph"
-msgstr "графът с подаванията не може да бъде записан"
+msgstr "графът с подаванията не може да се запише"
msgid "failed to prefetch remotes"
msgstr "неуспешно предварително доставяне на отдалечените клони"
msgid "failed to start 'git pack-objects' process"
-msgstr "процесът за командата „git pack-objects“ не може да бъде стартиран"
+msgstr "процесът за командата „git pack-objects“ не може да се стартира"
msgid "failed to finish 'git pack-objects' process"
msgstr "процесът за командата „git pack-objects“ не може да завърши"
msgid "failed to write multi-pack-index"
-msgstr "индексът за множество пакети не може да бъде записан"
+msgstr "индексът за множество пакети не може да се запише"
msgid "'git multi-pack-index expire' failed"
msgstr "неуспешно изпълнение на „git multi-pack-index expire“"
@@ -7258,7 +7312,7 @@
msgstr "неуспешно добавяне на стойност на „%s“ за „%s“"
msgid "return success even if repository was not registered"
-msgstr "успешно завършване, дори ако хранилището не бъде регистрирано"
+msgstr "успешно завършване, дори ако хранилището не се регистрира"
#, c-format
msgid "unable to unset '%s' value of '%s'"
@@ -7341,7 +7395,7 @@
"then try again. If it still fails, a git-maintenance(1) process may have\n"
"crashed in this repository earlier: remove the file manually to continue."
msgstr ""
-"Файлът-ключалка „%s.lock“ не може да бъде създаден: %s\n"
+"Файлът-ключалка „%s.lock“ не може да се създаде: %s\n"
"\n"
"Изглежда, че и друг процес на git-maintenance(1) е пуснат в това\n"
"хранилище. Уверете се, че всички подобни процеси са спрени и опитайте\n"
@@ -7392,7 +7446,7 @@
#, c-format
msgid "unable to read tree %s"
-msgstr "дървото не може да бъде прочетено: %s"
+msgstr "дървото не може да се прочете: %s"
#, c-format
msgid "unable to grep from object of type %s"
@@ -7562,7 +7616,7 @@
#, c-format
msgid "unable to resolve revision: %s"
-msgstr "версията „%s“ не може бъде открита"
+msgstr "версията „%s“ не може се открие"
msgid "--untracked not supported with --recurse-submodules"
msgstr "опциите „--untracked“ и „--recurse-submodules“ са несъвместими"
@@ -7758,7 +7812,7 @@
msgstr[1] "не може да се запълнят %d байта"
msgid "early EOF"
-msgstr "неочакван край на файл"
+msgstr "неочакван край на файл (EOF)"
msgid "read error on input"
msgstr "грешка при четене на входните данни"
@@ -7799,7 +7853,7 @@
msgstr "непознат вид обект %d"
msgid "cannot pread pack file"
-msgstr "пакетният файл не може да бъде прочетен"
+msgstr "пакетният файл не може да се прочете"
#, c-format
msgid "premature end of pack file, %<PRIuMAX> byte missing"
@@ -7817,11 +7871,11 @@
#, c-format
msgid "cannot read existing object info %s"
-msgstr "съществуващият обект в „%s“ не може да бъде прочетен"
+msgstr "съществуващият обект в „%s“ не може да се прочете"
#, c-format
msgid "cannot read existing object %s"
-msgstr "съществуващият обект „%s“ не може да бъде прочетен"
+msgstr "съществуващият обект „%s“ не може да се прочете"
#, c-format
msgid "invalid blob object %s"
@@ -7835,7 +7889,7 @@
msgstr "Някои обекти, наследници на „%s“, не може да бъдат достигнати"
msgid "failed to apply delta"
-msgstr "разликата не може да бъде приложена"
+msgstr "разликата не може да се приложи"
msgid "Receiving objects"
msgstr "Получаване на обекти"
@@ -7916,11 +7970,11 @@
#, c-format
msgid "Cannot open existing pack file '%s'"
-msgstr "Съществуващият пакетен файл „%s“ не може да бъде отворен"
+msgstr "Съществуващият пакетен файл „%s“ не може да се отвори"
#, c-format
msgid "Cannot open existing pack idx file for '%s'"
-msgstr "Съществуващият индекс за пакетния файл „%s“ не може да бъде отворен"
+msgstr "Съществуващият индекс за пакетния файл „%s“ не може да се отвори"
#, c-format
msgid "non delta: %d object"
@@ -7996,8 +8050,7 @@
msgid "specify that the git repository is to be shared amongst several users"
msgstr ""
-"указване, че хранилището на Git ще бъде споделено от повече от един "
-"потребител"
+"указване, че хранилището на Git ще се споделя от повече от един потребител"
msgid "override the name of the initial branch"
msgstr "задаване на името на първоначалния клон"
@@ -8010,7 +8063,7 @@
#, c-format
msgid "cannot mkdir %s"
-msgstr "директорията „%s“ не може да бъде създадена"
+msgstr "директорията „%s“ не може да се създаде"
#, c-format
msgid "cannot chdir to %s"
@@ -8057,7 +8110,7 @@
#, c-format
msgid "could not read input file '%s'"
-msgstr "входният файл „%s“ не може да бъде прочетен"
+msgstr "входният файл „%s“ не може да се прочете"
msgid "could not read from stdin"
msgstr "от стандартния вход не може да се чете"
@@ -8145,10 +8198,6 @@
"проследяване на еволюцията на диапазона от редове НАЧАЛО,КРАЙ или :ФУНКЦИЯта "
"във ФАЙЛа"
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "непознат аргумент: %s"
-
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "опцията „-LДИАПАЗОН:ФАЙЛ“ не може да се ползва с път"
@@ -8162,7 +8211,7 @@
#, c-format
msgid "could not read object %s"
-msgstr "обектът не може да бъде прочетен: %s"
+msgstr "обектът не може да се прочете: %s"
#, c-format
msgid "unknown type: %d"
@@ -8177,7 +8226,7 @@
#, c-format
msgid "cannot open patch file %s"
-msgstr "файлът-кръпка „%s“ не може да бъде отворен"
+msgstr "файлът-кръпка „%s“ не може да се отвори"
msgid "need exactly one range"
msgstr "трябва да зададете точно един диапазон"
@@ -8187,7 +8236,7 @@
#, c-format
msgid "unable to read branch description file '%s'"
-msgstr "файлът с описанието на клона „%s“ не може да бъде прочетен"
+msgstr "файлът с описанието на клона „%s“ не може да се прочете"
msgid "cover letter needs email format"
msgstr "придружаващото писмо трябва да е форматирано като е-писмо"
@@ -8214,20 +8263,20 @@
msgstr "„%s“ не е указател или не сочи към нищо"
msgid "could not find exact merge base"
-msgstr "точната база за сливане не може да бъде открита"
+msgstr "точната база за сливане не може да се открие"
msgid ""
"failed to get upstream, if you want to record base commit automatically,\n"
"please use git branch --set-upstream-to to track a remote branch.\n"
"Or you could specify base commit by --base=<base-commit-id> manually"
msgstr ""
-"следеният клон не може да бъде установен. Ако искате ръчно да го\n"
+"следеният клон не може да се установи. Ако искате ръчно да го\n"
"зададете, използвайте „git branch --set-upstream-to“.\n"
"Може ръчно да зададете базово подаване чрез „--"
"base=<ИДЕНТИФИКАТОР_НА_БАЗОВО_ПОДАВАНЕ>“."
msgid "failed to find exact merge base"
-msgstr "точната база при сливане не може да бъде открита"
+msgstr "точната база при сливане не може да се определи"
msgid "base commit should be the ancestor of revision list"
msgstr "базовото подаване трябва да е предшественикът на списъка с версиите"
@@ -8236,7 +8285,7 @@
msgstr "базовото подаване не може да е в списъка с версиите"
msgid "cannot get patch id"
-msgstr "идентификаторът на кръпката не може да бъде получен"
+msgstr "идентификаторът на кръпката не може да се получи"
msgid "failed to infer range-diff origin of current series"
msgstr ""
@@ -8424,7 +8473,7 @@
#, c-format
msgid "could not create directory '%s'"
-msgstr "Директорията „%s“ не може да бъде създадена"
+msgstr "Директорията „%s“ не може да се създаде"
msgid "--interdiff requires --cover-letter or single patch"
msgstr ""
@@ -8450,7 +8499,7 @@
#, c-format
msgid "unable to read signature file '%s'"
-msgstr "файлът „%s“ с подпис не може да бъде прочетен"
+msgstr "файлът „%s“ с подпис не може да се прочете"
msgid "Generating patches"
msgstr "Създаване на кръпки"
@@ -8787,7 +8836,7 @@
#, c-format
msgid "could not resolve ref '%s'"
-msgstr "указателят „%s“ не може да бъде проследен"
+msgstr "указателят „%s“ не може да се проследи"
#, c-format
msgid "Merging %s with %s\n"
@@ -8821,6 +8870,9 @@
msgid "also show informational/conflict messages"
msgstr "показване и информационните съобщения, и тези при конфликт"
+msgid "suppress all output; only exit status wanted"
+msgstr "без извеждане на информация, получаване само на изходен код"
+
msgid "list filenames without modes/oids/stages"
msgstr ""
"извеждане на имената на файлове без режими/идентификатори на обекти/етапи"
@@ -8952,12 +9004,11 @@
#, c-format
msgid "Squash commit -- not updating HEAD\n"
-msgstr "Вкарано подаване — указателят „HEAD“ няма да бъде обновен\n"
+msgstr "Вкарано подаване — указателят „HEAD“ няма да се обнови\n"
#, c-format
msgid "No merge message -- not updating HEAD\n"
-msgstr ""
-"Липсва съобщение при подаване — указателят „HEAD“ няма да бъде обновен\n"
+msgstr "Липсва съобщение при подаване — указателят „HEAD“ няма да се обнови\n"
#, c-format
msgid "'%s' does not point to a commit"
@@ -8968,14 +9019,14 @@
msgstr "Неправилен низ за настройката „branch.%s.mergeoptions“: „%s“"
msgid "Unable to write index."
-msgstr "Индексът не може да бъде прочетен"
+msgstr "Индексът не може да се прочете"
msgid "Not handling anything other than two heads merge."
msgstr "Поддържа се само сливане на точно две истории."
#, c-format
msgid "unable to write %s"
-msgstr "„%s“ не може да бъде записан"
+msgstr "„%s“ не може да се запише"
#, c-format
msgid "Could not read from '%s'"
@@ -8984,8 +9035,8 @@
#, c-format
msgid "Not committing merge; use 'git commit' to complete the merge.\n"
msgstr ""
-"Сливането няма да бъде подадено. За завършването му и подаването му "
-"използвайте командата „git commit“.\n"
+"Сливането няма да се подаде. За завършването му и подаването му използвайте "
+"командата „git commit“.\n"
msgid ""
"Please enter a commit message to explain why this merge is necessary,\n"
@@ -9163,7 +9214,7 @@
#, c-format
msgid "could not read tagged object '%s'"
-msgstr "обектът с етикет не може да бъде прочетен: %s"
+msgstr "обектът с етикет не може да се прочете: %s"
#, c-format
msgid "object '%s' tagged as '%s', but is a '%s' type"
@@ -9176,7 +9227,7 @@
msgstr "етикетът на стандартния вход не сочи към правилен обект"
msgid "unable to write tag file"
-msgstr "файлът за етикета не може да бъде запазен"
+msgstr "файлът за етикета не може да се запази"
msgid "input is NUL terminated"
msgstr "входните записи са разделени с нулевия знак „NUL“"
@@ -9239,8 +9290,11 @@
"при препакетиране пакетните файлове, които са с по-малък от този размер, да "
"се обединяват в пакети с по-голям от този размер"
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [ОПЦИЯ…] ОБЕКТ… ЦЕЛ"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] ОБЕКТ… ЦЕЛ"
+
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] ОБЕКТ… ЦЕЛЕВА_ДИРЕКТОРИЯ"
#, c-format
msgid "Directory %s is in index and no submodule?"
@@ -9311,6 +9365,12 @@
msgstr "%s, обект: „%s“, цел: „%s“"
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr ""
+"невъзможно е да се преместят едновременно и „%s“, и родителската директория "
+"„%s“"
+
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "Преименуване на „%s“ на „%s“\n"
@@ -9455,7 +9515,7 @@
msgstr "задайте съдържанието на бележката с някоя от опциите „-m“ или „-F“"
msgid "unable to write note object"
-msgstr "обектът-бележка не може да бъде записан"
+msgstr "обектът-бележка не може да се запише"
#, c-format
msgid "the note contents have been left in %s"
@@ -9463,7 +9523,7 @@
#, c-format
msgid "could not open or read '%s'"
-msgstr "файлът „%s“ не може да бъде отворен или прочетен"
+msgstr "файлът „%s“ не може да се отвори или прочете"
#, c-format
msgid "failed to resolve '%s' as a valid ref."
@@ -9471,7 +9531,7 @@
#, c-format
msgid "failed to read object '%s'."
-msgstr "обектът „%s“ не може да бъде прочетен."
+msgstr "обектът „%s“ не може да се прочете."
#, c-format
msgid "cannot read note data from non-blob object '%s'."
@@ -9575,16 +9635,16 @@
"C“.\n"
msgid "failed to delete ref NOTES_MERGE_PARTIAL"
-msgstr "указателят „NOTES_MERGE_PARTIAL“ не може да бъде изтрит"
+msgstr "указателят „NOTES_MERGE_PARTIAL“ не може да се изтрие"
msgid "failed to delete ref NOTES_MERGE_REF"
-msgstr "указателят „NOTES_MERGE_REF“ не може да бъде изтрит"
+msgstr "указателят „NOTES_MERGE_REF“ не може да се изтрие"
msgid "failed to remove 'git notes merge' worktree"
-msgstr "работната директория на „git notes merge“ не може да бъде изтрита"
+msgstr "работната директория на „git notes merge“ не може да се изтрие"
msgid "failed to read ref NOTES_MERGE_PARTIAL"
-msgstr "указателят „NOTES_MERGE_PARTIAL“ не може да бъде прочетен"
+msgstr "указателят „NOTES_MERGE_PARTIAL“ не може да се прочете"
msgid "could not find commit from NOTES_MERGE_PARTIAL."
msgstr "подаването от „NOTES_MERGE_PARTIAL“ не може да се открие."
@@ -9741,7 +9801,7 @@
#, c-format
msgid "failed to stat %s"
-msgstr "не може да бъде получена информация чрез „stat“ за „%s“"
+msgstr "не може да се получи информация чрез „stat“ за „%s“"
#, c-format
msgid "failed utime() on %s"
@@ -9772,11 +9832,11 @@
#, c-format
msgid "unable to get size of %s"
-msgstr "размерът на „%s“ не може да бъде получен"
+msgstr "размерът на „%s“ не може да се получи"
#, c-format
msgid "unable to parse object header of %s"
-msgstr "заглавната част на „%s“ не може да бъде анализирана"
+msgstr "заглавната част на „%s“ не може да се анализира"
#, c-format
msgid "object %s cannot be read"
@@ -9801,7 +9861,7 @@
#, c-format
msgid "unable to get type of object %s"
-msgstr "видът на обекта „%s“ не може да бъде определен"
+msgstr "видът на обекта „%s“ не може да се определи"
msgid "Compressing objects"
msgstr "Компресиране на обектите"
@@ -9831,7 +9891,7 @@
#, c-format
msgid "could not get type of object %s in pack %s"
-msgstr "видът на обекта „%s“ в пакет „%s“ не може да бъде определен"
+msgstr "видът на обекта „%s“ в пакет „%s“ не може да се определи"
#, c-format
msgid "could not find pack '%s'"
@@ -9839,7 +9899,7 @@
#, c-format
msgid "packfile %s cannot be accessed"
-msgstr "пакетният файл „%s“ не може да бъде достъпен"
+msgstr "пакетният файл „%s“ не може да се достъпи"
msgid "Enumerating cruft objects"
msgstr "Изброяване на ненужните обекти"
@@ -9872,14 +9932,14 @@
"заредят"
msgid "cannot open pack index"
-msgstr "индексът на пакетния файл не може да бъде отворен"
+msgstr "индексът на пакетния файл не може да се отвори"
#, c-format
msgid "loose object at %s could not be examined"
-msgstr "непакетираният обект в „%s“ не може да бъде анализиран"
+msgstr "непакетираният обект в „%s“ не може да се анализира"
msgid "unable to force loose object"
-msgstr "оставането на обекта непакетиран не може да бъде наложено"
+msgstr "оставането на обекта непакетиран не може да се наложи"
#, c-format
msgid "not a rev '%s'"
@@ -10272,6 +10332,10 @@
msgid "unable to access commit %s"
msgstr "недостъпно подаване: %s"
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "неправилен указател: „%s“"
+
msgid "ignoring --verify-signatures for rebase"
msgstr "без „--verify-signatures“ при пребазиране"
@@ -10330,7 +10394,7 @@
"$ git reset --hard\n"
"to recover."
msgstr ""
-"Работното ви копие не може да бъде превъртяно.\n"
+"Работното ви копие не може да се превърти.\n"
"След като запазите всичко необходимо посочено от командата:\n"
" git diff %s\n"
"изпълнете:\n"
@@ -10806,7 +10870,7 @@
#, c-format
msgid "could not remove '%s'"
-msgstr "„%s“ не може да бъде изтрит"
+msgstr "„%s“ не може да се изтрие"
#, c-format
msgid ""
@@ -11047,7 +11111,7 @@
"Опцията „--edit-todo“ е достъпна само по време на интерактивно пребазиране."
msgid "Cannot read HEAD"
-msgstr "Указателят „HEAD“ не може да бъде прочетен"
+msgstr "Указателят „HEAD“ не може да се прочете"
msgid ""
"You must edit all merge conflicts and then\n"
@@ -11125,7 +11189,7 @@
msgstr "Такъв указател няма: %s"
msgid "Could not resolve HEAD to a commit"
-msgstr "Подаването, сочено от указателя „HEAD“, не може да бъде открито"
+msgstr "Липсва подаването, сочено от указателя „HEAD“"
#, c-format
msgid "'%s': need exactly one merge base with branch"
@@ -11265,6 +11329,9 @@
msgid "git reflog exists <ref>"
msgstr "git reflog exists УКАЗАТЕЛ"
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree]|УКАЗАТЕЛ…]"
+
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "неправилно времево клеймо „%s“ подадено към „--%s“"
@@ -11318,8 +11385,8 @@
msgstr "Отбелязване на достижимите обекти…"
#, c-format
-msgid "%s points nowhere!"
-msgstr "„%s“ не сочи наникъде!"
+msgid "reflog could not be found: '%s'"
+msgstr "журналът с указатели липсва: „%s“"
msgid "no reflog specified to delete"
msgstr "не е указан журнал с подавания за изтриване"
@@ -11328,6 +11395,15 @@
msgid "invalid ref format: %s"
msgstr "неправилен формат на указател: %s"
+msgid "drop the reflogs of all references"
+msgstr "изтриване на всички журнали с указатели"
+
+msgid "drop reflogs from the current worktree only"
+msgstr "изтриване на журнала с указатели само в текущото работно дърво"
+
+msgid "references specified along with --all"
+msgstr "указателите се задават с опцията „--all“"
+
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=ФОРМАТ [--no-reflog] [--dry-run]"
@@ -11470,7 +11546,7 @@
#, c-format
msgid "Could not setup master '%s'"
-msgstr "Основният клон „%s“ не може да бъде настроен"
+msgstr "Основният клон „%s“ не може да се настрои"
#, c-format
msgid "more than one %s"
@@ -11514,7 +11590,7 @@
#, c-format
msgid "Could not rename config section '%s' to '%s'"
-msgstr "Разделът „%s“ в настройките не може да бъде преименуван на „%s“"
+msgstr "Разделът „%s“ в настройките не може да се преименува на „%s“"
#, c-format
msgid ""
@@ -11552,7 +11628,7 @@
#, c-format
msgid "Could not remove config section '%s'"
-msgstr "Разделът „%s“ в настройките не може да бъде изтрит"
+msgstr "Разделът „%s“ в настройките не може да се изтрие"
#, c-format
msgid " new (next fetch will store in remotes/%s)"
@@ -11734,7 +11810,7 @@
#, c-format
msgid "Could not delete %s"
-msgstr "„%s“ не може да бъде изтрит"
+msgstr "„%s“ не може да се изтрие"
#, c-format
msgid "Not a valid ref: %s"
@@ -11762,7 +11838,7 @@
#, c-format
msgid " * [would prune] %s"
-msgstr " ● [ще бъде окастрено] %s"
+msgstr " ● [ще се окастри] %s"
#, c-format
msgid " * [pruned] %s"
@@ -11863,7 +11939,7 @@
#, c-format
msgid "could not open tempfile %s for writing"
-msgstr "временният файл „%s“ не може да бъде отворен за запис"
+msgstr "временният файл „%s“ не може да се отвори за запис"
msgid "could not close refs snapshot tempfile"
msgstr "временният файл със снимка на указателите не може да се затвори"
@@ -11896,6 +11972,11 @@
msgstr ""
"с опцията „--cruft“: обявяване на обектите по-стари от това ВРЕМЕ за остарели"
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr ""
+"с опцията „--cruft“: препакетиране само на пакетите за ненужни обекти, които "
+"са с размер под този"
+
msgid "remove redundant packs, and run git-prune-packed"
msgstr ""
"премахване на ненужните пакетирани файлове и изпълнение на командата „git-"
@@ -12015,7 +12096,7 @@
#, c-format
msgid "replace ref '%s' not found"
-msgstr "указателят за замяна „%s“ не може да бъде открит"
+msgstr "указателят за замяна „%s“ липсва"
#, c-format
msgid "Deleted replace ref '%s'"
@@ -12041,14 +12122,14 @@
#, c-format
msgid "unable to open %s for writing"
-msgstr "„%s“ не може да бъде отворен за запис"
+msgstr "„%s“ не може да се отвори за запис"
msgid "cat-file reported failure"
msgstr "изпълнението на „cat-file“ завърши с грешка"
#, c-format
msgid "unable to open %s for reading"
-msgstr "„%s“ не може да бъде отворен за четене"
+msgstr "„%s“ не може да се отвори за четене"
msgid "unable to spawn mktree"
msgstr "не може да се създаде процес за „mktree“"
@@ -12067,7 +12148,7 @@
msgstr "„fstat“ не може да се изпълни върху „%s“"
msgid "unable to write object to database"
-msgstr "обектът не може да бъде записан в базата от данни"
+msgstr "обектът не може да се запише в базата от данни"
#, c-format
msgid "unable to get object type for %s"
@@ -12105,11 +12186,11 @@
msgstr "първоначалното подаване „%s“ е с подпис на GPG"
msgid "the signature will be removed in the replacement commit!"
-msgstr "Подписът ще бъде премахнат в заменящото подаване!"
+msgstr "Подписът ще се премахне в заменящото подаване!"
#, c-format
msgid "could not write replacement commit for: '%s'"
-msgstr "заменящото подаване за „%s“ не може да бъде записано"
+msgstr "заменящото подаване за „%s“ не може да се запише"
#, c-format
msgid "graft for '%s' unnecessary"
@@ -12294,11 +12375,11 @@
msgstr "Указателят „HEAD“ е повреден."
msgid "Failed to find tree of HEAD."
-msgstr "Дървото, сочено от указателя „HEAD“, не може да бъде открито."
+msgstr "Дървото, сочено от указателя „HEAD“, не може да се открие."
#, c-format
msgid "Failed to find tree of %s."
-msgstr "Дървото, сочено от „%s“, не може да бъде открито."
+msgstr "Дървото, сочено от „%s“, не може да се открие."
#, c-format
msgid "HEAD is now at %s"
@@ -12364,19 +12445,22 @@
#, c-format
msgid "Could not reset index file to revision '%s'."
-msgstr "Индексът не може да бъде занулен към версия „%s“."
+msgstr "Индексът не може да се занули към версия „%s“."
msgid "Could not write new index file."
-msgstr "Новият индекс не може да бъде записан."
+msgstr "Новият индекс не може да се запише."
#, c-format
msgid "unable to get disk usage of %s"
-msgstr "използваното място за „%s“ не може да бъде получено"
+msgstr "използваното място за „%s“ не може да се получи"
#, c-format
msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
msgstr "неправилна стойност за „%s“: „%s“, единственият позволен формат е „%s“"
+msgid "-z option used with unsupported option"
+msgstr "неподдържана комбинация с опцията „-z“"
+
msgid "rev-list does not support display of notes"
msgstr "командата „rev-list“ не поддържа извеждането на бележки"
@@ -12463,7 +12547,7 @@
msgstr "тази команда трябва да се изпълни в работно дърво"
msgid "Could not read the index"
-msgstr "Индексът не може да бъде прочетен"
+msgstr "Индексът не може да се прочете"
#, c-format
msgid "unknown mode for --show-object-format: %s"
@@ -12787,8 +12871,8 @@
#, c-format
msgid "only %d entry can be shown at one time."
msgid_plural "only %d entries can be shown at one time."
-msgstr[0] "само %d запис може да бъде показан наведнъж."
-msgstr[1] "само %d записа може да бъде показани наведнъж."
+msgstr[0] "само %d запис може да се покаже наведнъж."
+msgstr[1] "само %d записа може да се покажат наведнъж."
#, c-format
msgid "no such ref %s"
@@ -12898,14 +12982,14 @@
#, c-format
msgid "failed to remove directory '%s'"
-msgstr "директорията „%s“ не може да бъде изтрита"
+msgstr "директорията „%s“ не може да се изтрие"
msgid "failed to create directory for sparse-checkout file"
-msgstr "директорията за частично изтегляне „%s“ не може да бъде създадена"
+msgstr "директорията за частично изтегляне „%s“ не може да се създаде"
#, c-format
msgid "unable to fdopen %s"
-msgstr "обектът „%s“ не може да бъде отворен с „fdopen“"
+msgstr "обектът „%s“ не може да се отвори с „fdopen“"
msgid "failed to initialize worktree config"
msgstr "настройките на работното дърво не може да се инициализират"
@@ -12933,7 +13017,7 @@
#, c-format
msgid "unable to unquote C-style string '%s'"
-msgstr "цитирането на низ, форматиран за C — „%s“ не може да бъде изчистено"
+msgstr "цитирането на низ, форматиран за C — „%s“ не може да се изчисти"
msgid "unable to load existing sparse-checkout patterns"
msgstr "шаблоните за частично изтегляне не може да се заредят"
@@ -13119,7 +13203,7 @@
"index“."
msgid "could not save index tree"
-msgstr "дървото сочено от индекса не може да бъде запазено"
+msgstr "дървото сочено от индекса не може да се запази"
#, c-format
msgid "Merging %s with %s"
@@ -13140,7 +13224,7 @@
#, c-format
msgid "%s: Could not drop stash entry"
-msgstr "Скатаното „%s“ не може да бъде изтрито"
+msgstr "Скатаното „%s“ не може да се изтрие"
#, c-format
msgid "'%s' is not a stash reference"
@@ -13153,10 +13237,10 @@
msgstr "Не е указано име на клон"
msgid "failed to parse tree"
-msgstr "дървото не може да бъде анализирано"
+msgstr "дървото не може да се анализира"
msgid "failed to unpack trees"
-msgstr "дървото не може да бъде разпакетирано"
+msgstr "дървото не може да се разпакетира"
msgid "include untracked files in the stash"
msgstr "скатаване и на неследените файлове"
@@ -13166,7 +13250,7 @@
#, c-format
msgid "Cannot update %s with %s"
-msgstr "Указателят „%s“ не може да бъде обновен да сочи към „%s“"
+msgstr "Указателят „%s“ не може да се обнови да сочи към „%s“"
msgid "stash message"
msgstr "съобщение при скатаване"
@@ -13184,19 +13268,19 @@
msgstr "Все още липсва първоначално подаване"
msgid "Cannot save the current index state"
-msgstr "Състоянието на текущия индекс не може да бъде запазено"
+msgstr "Състоянието на текущия индекс не може да се запази"
msgid "Cannot save the untracked files"
msgstr "Неследените файлове не може да се запазят"
msgid "Cannot save the current worktree state"
-msgstr "Състоянието на работното дърво не може да бъде запазено"
+msgstr "Състоянието на работното дърво не може да се запази"
msgid "Cannot save the current staged state"
-msgstr "Състоянието на текущия индекс не може да бъде запазено"
+msgstr "Състоянието на текущия индекс не може да се запази"
msgid "Cannot record working tree state"
-msgstr "Състоянието на работното дърво не може да бъде запазено"
+msgstr "Състоянието на работното дърво не може да се запази"
msgid "Can't use --patch and --include-untracked or --all at the same time"
msgstr "опцията „--patch“ е несъвместима с „--include-untracked“ и „--all“"
@@ -13216,7 +13300,7 @@
msgstr "Скатаването не може да стартира"
msgid "Cannot save the current status"
-msgstr "Текущото състояние не може да бъде запазено"
+msgstr "Текущото състояние не може да се запази"
#, c-format
msgid "Saved working directory and index state %s"
@@ -13329,7 +13413,7 @@
#, c-format
msgid "could not resolve HEAD ref inside the submodule '%s'"
-msgstr "указателят сочен от „HEAD“ в подмодула „%s“ не може да бъде открит"
+msgstr "указателят сочен от „HEAD“ в подмодула „%s“ липсва"
#, c-format
msgid "failed to recurse into submodule '%s'"
@@ -13400,7 +13484,7 @@
#, c-format
msgid "failed to update remote for submodule '%s'"
-msgstr "отдалеченият адрес на подмодула „%s“ не може да бъде променен"
+msgstr "отдалеченият адрес на подмодула „%s“ не може да се промени"
msgid "suppress output of synchronizing submodule url"
msgstr "без извеждане на информация при синхронизирането на подмодул"
@@ -13432,11 +13516,11 @@
#, c-format
msgid "Could not remove submodule work tree '%s'\n"
msgstr ""
-"Директорията към работното дърво на подмодула „%s“ не може да бъде изтрита\n"
+"Директорията към работното дърво на подмодула „%s“ не може да се изтрие\n"
#, c-format
msgid "could not create empty submodule directory %s"
-msgstr "празната директория за подмодула „%s“ не може да бъде създадена"
+msgstr "празната директория за подмодула „%s“ не може да се създаде"
#, c-format
msgid "Submodule '%s' (%s) unregistered for path '%s'\n"
@@ -13501,7 +13585,7 @@
#, c-format
msgid "could not get submodule directory for '%s'"
-msgstr "директорията на подмодула „%s“ не може да бъде получена"
+msgstr "директорията на подмодула „%s“ не може да се получи"
msgid "alternative anchor for relative paths"
msgstr "директория за определянето на относителните пътища"
@@ -13726,7 +13810,7 @@
msgstr "принудително създаване"
msgid "show whether the branch would be created"
-msgstr "извеждане дали клонът ще бъде създаден"
+msgstr "извеждане дали клонът ще се създаде"
msgid ""
"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--"
@@ -13775,7 +13859,7 @@
#, c-format
msgid "unable to checkout submodule '%s'"
-msgstr "Подмодулът „%s“ не може да бъде изтеглен"
+msgstr "Подмодулът „%s“ не може да се изтегли"
msgid "please make sure that the .gitmodules file is in the working tree"
msgstr "файлът „.gitmodules“ трябва да е в работното дърво"
@@ -13924,7 +14008,7 @@
"изтриете вие.\n"
msgid "unable to sign the tag"
-msgstr "етикетът не може да бъде подписан"
+msgstr "етикетът не може да се подпише"
#, c-format
msgid ""
@@ -14047,15 +14131,15 @@
#, c-format
msgid "failed to create directory %s"
-msgstr "директорията „%s“ не може да бъде създадена"
+msgstr "директорията „%s“ не може да се създаде"
#, c-format
msgid "failed to delete file %s"
-msgstr "файлът „%s“ не може да бъде изтрит"
+msgstr "файлът „%s“ не може да се изтрие"
#, c-format
msgid "failed to delete directory %s"
-msgstr "директорията „%s“ не може да бъде изтрита"
+msgstr "директорията „%s“ не може да се изтрие"
#, c-format
msgid "Testing mtime in '%s' "
@@ -14098,8 +14182,7 @@
msgstr "git update-index [ОПЦИЯ…] [--] [ФАЙЛ…]"
msgid "continue refresh even when index needs update"
-msgstr ""
-"продължаване с обновяването, дори когато индексът трябва да бъде обновен"
+msgstr "продължаване с обновяването, дори когато индексът трябва да се обнови"
msgid "refresh: ignore submodules"
msgstr "подмодулите да се игнорират при обновяването"
@@ -14283,8 +14366,8 @@
"git update-ref [ОПЦИЯ…] ИМЕ_НА_УКАЗАТЕЛ НОВ_ИДЕНТИФИКАТОР_НА_ОБЕКТ "
"[СТАР_ИДЕНТИФИКАТОР_НА_ОБЕКТ]"
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [ОПЦИЯ…] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [ОПЦИЯ…] --stdin [-z] [--batch-updates]"
msgid "delete the reference"
msgstr "изтриване на указателя"
@@ -14300,6 +14383,9 @@
msgid "read updates from stdin"
msgstr "изчитане на указателите от стандартния вход"
+msgid "batch reference updates"
+msgstr "пакетно обновяване на указатели"
+
msgid "update the info files from scratch"
msgstr "обновяване на информационните файлове от нулата"
@@ -14458,7 +14544,7 @@
#, c-format
msgid "could not create directory of '%s'"
-msgstr "директорията „%s“ не може да бъде създадена"
+msgstr "директорията „%s“ не може да се създаде"
msgid "initializing"
msgstr "инициализация"
@@ -14616,8 +14702,7 @@
#, c-format
msgid "validation failed, cannot move working tree: %s"
-msgstr ""
-"проверките са неуспешни, работното дърво не може да бъде преместено: %s"
+msgstr "проверките са неуспешни, работното дърво не може да се премести: %s"
#, c-format
msgid "failed to move '%s' to '%s'"
@@ -14659,7 +14744,7 @@
#, c-format
msgid "validation failed, cannot remove working tree: %s"
-msgstr "проверките са неуспешни, работното дърво не може да бъде изтрито: %s"
+msgstr "проверките са неуспешни, работното дърво не може да се изтрие: %s"
#, c-format
msgid "repair: %s: %s"
@@ -14792,7 +14877,7 @@
msgstr "неуспешно дублиране на дескриптора на пратката с „dup“"
msgid "Could not spawn pack-objects"
-msgstr "Командата „git pack-objects“ не може да бъде стартирана"
+msgstr "Командата „git pack-objects“ не може да се стартира"
msgid "pack-objects died"
msgstr "Командата „git pack-objects“ не завърши успешно"
@@ -14815,7 +14900,7 @@
#, c-format
msgid "cannot create '%s'"
-msgstr "файлът „%s“ не може да бъде създаден"
+msgstr "файлът „%s“ не може да се създаде"
msgid "index-pack died"
msgstr "командата „git index-pack“ не завърши успешно"
@@ -15001,6 +15086,9 @@
msgid "Compare a tree to the working tree or index"
msgstr "Сравняване на обекти-дърво с работното дърво и индекса"
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Сравняване на съдържанието и режимите на двойките обекти-BLOB"
+
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr ""
"Сравняване на съдържанието и права̀та за достъп на обектите-BLOB чрез два "
@@ -15543,7 +15631,7 @@
#, c-format
msgid "could not find commit %s"
-msgstr "подаването „%s“ не може да бъде открито"
+msgstr "подаването „%s“ липсва"
msgid "commit-graph requires overflow generation data but has none"
msgstr ""
@@ -15603,7 +15691,7 @@
"правилният брой на идентификаторите в основния граф не може да се запише"
msgid "unable to create temporary graph layer"
-msgstr "не може да бъде създаден временен слой за гра̀фа с подаванията"
+msgstr "не може да се създаде временен слой за гра̀фа с подаванията"
#, c-format
msgid "unable to adjust shared permissions for '%s'"
@@ -15619,10 +15707,10 @@
msgstr "файлът с веригата на гра̀фа с подаванията не може да се отвори"
msgid "failed to rename base commit-graph file"
-msgstr "основният файл на гра̀фа с подаванията не може да бъде преименуван"
+msgstr "основният файл на гра̀фа с подаванията не може да се преименува"
msgid "failed to rename temporary commit-graph file"
-msgstr "временният файл на гра̀фа с подаванията не може да бъде преименуван"
+msgstr "временният файл на гра̀фа с подаванията не може да се преименува"
#, c-format
msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
@@ -15723,7 +15811,7 @@
#, c-format
msgid "could not parse commit %s"
-msgstr "подаването „%s“ не може да бъде анализирано"
+msgstr "подаването „%s“ не може да се анализира"
#, c-format
msgid "%s %s is not a commit!"
@@ -15892,7 +15980,7 @@
#, c-format
msgid "[GLE %ld] unable to open for read '%ls'"
msgstr ""
-"файлът „%2$ls“ не може да бъде отворен за четене [последна грешка в нишката: "
+"файлът „%2$ls“ не може да се отвори за четене [последна грешка в нишката: "
"GLE=%1$ld]"
#, c-format
@@ -15903,11 +15991,11 @@
#, c-format
msgid "failed to copy SID (%ld)"
-msgstr "идентификаторът за сигурност (SID=%ld) не може да бъде копиран"
+msgstr "идентификаторът за сигурност (SID=%ld) не може да се копира"
#, c-format
msgid "failed to get owner for '%s' (%ld)"
-msgstr "притежателят на „%s“ (%ld) не може да бъде получен"
+msgstr "притежателят на „%s“ (%ld) не може да се получи"
msgid "memory exhausted"
msgstr "паметта е изчерпана"
@@ -15967,10 +16055,10 @@
msgstr "Няма предхождащ регулярен израз"
msgid "could not send IPC command"
-msgstr "командата за комуникация между процеси не може да бъде пратена"
+msgstr "командата за комуникация между процеси не може да се прати"
msgid "could not read IPC response"
-msgstr "отговорът за комуникацията между процеси не може да бъде прочетен"
+msgstr "отговорът за комуникацията между процеси не може да се прочете"
#, c-format
msgid "could not start accept_thread '%s'"
@@ -16021,7 +16109,7 @@
#, c-format
msgid "could not expand include path '%s'"
-msgstr "пътят за вмъкване „%s“не може да бъде разширен"
+msgstr "пътят за вмъкване „%s“ не може да се разшири"
msgid "relative config includes must come from files"
msgstr "относителните вмъквания на конфигурации трябва да идват от файлове"
@@ -16163,7 +16251,7 @@
#, c-format
msgid "failed to expand user dir in: '%s'"
-msgstr "домашната папка на потребителя не може да бъде открита: „%s“"
+msgstr "домашната папка на потребителя липсва: „%s“"
#, c-format
msgid "'%s' for '%s' is not a valid timestamp"
@@ -16222,7 +16310,7 @@
#, c-format
msgid "unable to resolve config blob '%s'"
-msgstr "обектът-BLOB „%s“ с конфигурации не може да бъде открит"
+msgstr "обектът-BLOB „%s“ с конфигурации липсва"
msgid "unable to parse command-line config"
msgstr "неправилни настройки от командния ред"
@@ -16258,7 +16346,7 @@
#, c-format
msgid "failed to write new configuration file %s"
-msgstr "новият конфигурационен файл „%s“ не може да бъде запазен"
+msgstr "новият конфигурационен файл „%s“ не може да се запази"
#, c-format
msgid "no multi-line comment allowed: '%s'"
@@ -16266,7 +16354,7 @@
#, c-format
msgid "could not lock config file %s"
-msgstr "конфигурационният файл „%s“ не може да бъде заключен"
+msgstr "конфигурационният файл „%s“ не може да се заключи"
#, c-format
msgid "opening %s"
@@ -16290,7 +16378,7 @@
#, c-format
msgid "could not write config file %s"
-msgstr "конфигурационният файл „%s“ не може да бъде записан"
+msgstr "конфигурационният файл „%s“ не може да се запише"
#, c-format
msgid "could not set '%s' to '%s'"
@@ -16462,13 +16550,13 @@
msgstr "неуспешно създаване на процес"
msgid "Could not run 'git rev-list'"
-msgstr "Командата „git rev-list“ не може да бъде изпълнена."
+msgstr "Командата „git rev-list“ не може да се изпълни."
msgid "failed write to rev-list"
msgstr "неуспешен запис на списъка с версиите"
msgid "failed to close rev-list's stdin"
-msgstr "стандартният вход на списъка с версиите не може да бъде затворен"
+msgstr "стандартният вход на списъка с версиите не може да се затвори"
#, c-format
msgid "illegal crlf_action %d"
@@ -16542,7 +16630,7 @@
#, c-format
msgid "cannot feed the input to external filter '%s'"
-msgstr "входът не може да бъде подаден на външния филтър „%s“"
+msgstr "входът не може да се подаде на външния филтър „%s“"
#, c-format
msgid "external filter '%s' failed %d"
@@ -16689,7 +16777,7 @@
#, c-format
msgid "failed to load island regex for '%s': %s"
-msgstr "регулярният израз на групата за „%s“, не може да бъде зареден: „%s“"
+msgstr "регулярният израз на групата за „%s“, не може да се зареди: „%s“"
#, c-format
msgid "island regex from config has too many capture groups (max=%d)"
@@ -16711,7 +16799,7 @@
#, c-format
msgid "could not open directory '%s'"
-msgstr "директорията „%s“ не може да бъде отворена"
+msgstr "директорията „%s“ не може да се отвори"
#, c-format
msgid "skipping '%s', which is neither file nor directory"
@@ -16722,7 +16810,7 @@
#, c-format
msgid "could not add directory '%s' to archiver"
-msgstr "директорията „%s“ не може да бъде добавена към архива"
+msgstr "директорията „%s“ не може да се добави към архива"
msgid "failed to write archive"
msgstr "неуспешен запис на архива"
@@ -16731,7 +16819,7 @@
msgstr "опцията „--merge-base“ не работи с диапазони"
msgid "unable to get HEAD"
-msgstr "Указателят „HEAD“ не може да бъде получен"
+msgstr "Указателят „HEAD“ не може да се получи"
msgid "no merge base found"
msgstr "липсва база за сливане"
@@ -16914,7 +17002,7 @@
msgstr "файловете с разлики да са с контекст с такъв БРОЙ редове"
msgid "generate the diff in raw format"
-msgstr "файловете с разлики да са в суров формат"
+msgstr "файловете с разлики да са в необработен формат"
msgid "synonym for '-p --raw'"
msgstr "псевдоним на „-p --raw“"
@@ -17266,7 +17354,7 @@
#, c-format
msgid "failed to read orderfile '%s'"
-msgstr "файлът с подредбата на съответствията „%s“ не може да бъде прочетен"
+msgstr "файлът с подредбата на съответствията „%s“ не може да се прочете"
msgid "Performing inexact rename detection"
msgstr "Търсене на преименувания на обекти съчетани с промѐни"
@@ -17311,7 +17399,7 @@
"No directory name could be guessed.\n"
"Please specify a directory on the command line"
msgstr ""
-"Името на директорията не може да бъде отгатнато.\n"
+"Името на директорията не може да се отгатне.\n"
"Задайте директорията изрично на командния ред"
#, c-format
@@ -17523,7 +17611,7 @@
#.
#, c-format
msgid "expected packfile to be sent after '%s'"
-msgstr "очаква се пакетният файл да бъде изпратен след „%s“"
+msgstr "очаква се пакетният файл да се изпрати след „%s“"
#. TRANSLATORS: The parameter will be 'ready', a protocol
#. keyword.
@@ -17552,7 +17640,7 @@
msgstr "git fetch-pack: очаква се пакет за край на отговора"
msgid "no matching remote head"
-msgstr "не може да бъде открит подходящ връх от отдалеченото хранилище"
+msgstr "липсва подходящ връх от отдалеченото хранилище"
msgid "unexpected 'ready' from remote"
msgstr "неочаквано състояние за готовност от отдалечено хранилище"
@@ -17754,7 +17842,7 @@
#, c-format
msgid "failed to get the ssh fingerprint for key '%s'"
-msgstr "отпечатъкът по ssh на ключа „%s“ не може да бъде получен"
+msgstr "отпечатъкът по ssh на ключа „%s“ не може да се получи"
msgid ""
"either user.signingkey or gpg.ssh.defaultKeyCommand needs to be configured"
@@ -17818,7 +17906,7 @@
#, c-format
msgid "'%s': unable to read %s"
-msgstr "„%s“: файлът сочен от „%s“ не може да бъде прочетен"
+msgstr "„%s“: файлът сочен от „%s“ не може да се прочете"
#, c-format
msgid "'%s': short read"
@@ -17903,7 +17991,7 @@
"able to execute it. Maybe git-%s is broken?"
msgstr ""
"Изглежда, че „%s“ е команда на git, но тя не може да\n"
-"бъде изпълнена. Вероятно пакетът „git-%s“ е повреден."
+"се изпълни. Вероятно пакетът „git-%s“ е повреден."
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
@@ -17995,6 +18083,10 @@
msgstr "Непозната стойност за „http.proactiveauth“"
#, c-format
+msgid "failed to parse %s"
+msgstr "„%s“ не може да се анализира"
+
+#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
msgstr "Неподдържана реализация на SSL „%s“. Поддържат се:"
@@ -18064,15 +18156,14 @@
#, c-format
msgid "unable to auto-detect email address (got '%s')"
msgstr ""
-"адресът за е-поща не може да бъде отгатнат (най-доброто предположение бе "
-"„%s“)"
+"адресът за е-поща не може да се отгатне (най-доброто предположение бе „%s“)"
msgid "no name was given and auto-detection is disabled"
msgstr "липсва име, а автоматичното отгатване е изключено"
#, c-format
msgid "unable to auto-detect name (got '%s')"
-msgstr "името не може да бъде отгатнато (най-доброто предположение бе „%s“)"
+msgstr "името не може да се отгатне (най-доброто предположение бе „%s“)"
#, c-format
msgid "empty ident name (for <%s>) not allowed"
@@ -18148,7 +18239,7 @@
"may have crashed in this repository earlier:\n"
"remove the file manually to continue."
msgstr ""
-"Файлът-ключалка „%s.lock“ не може да бъде създаден: %s\n"
+"Файлът-ключалка „%s.lock“ не може да се създаде: %s\n"
"\n"
"Изглежда, че и друг процес на git е пуснат в това хранилище, напр.\n"
"редактор, стартиран с „git commit“. Уверете се, че всички подобни\n"
@@ -18158,10 +18249,10 @@
#, c-format
msgid "Unable to create '%s.lock': %s"
-msgstr "Файлът-ключалка „%s.lock“ не може да бъде създаден: %s"
+msgstr "Файлът-ключалка „%s.lock“ не може да се създаде: %s"
msgid "unable to create temporary object directory"
-msgstr "не може да бъде създадена директория за временни обекти"
+msgstr "не може да се създаде директория за временни обекти"
#, c-format
msgid "could not write loose object index %s"
@@ -18190,6 +18281,10 @@
msgstr "неправилен размер на маркер: „%s“, изисква се цяло число"
#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Неуспешен анализ на обекта „%s“"
+
+#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Неуспешно сливане на подмодула „%s“ (не е изтеглен)"
@@ -18208,7 +18303,7 @@
#, c-format
msgid "Failed to merge submodule %s (commits don't follow merge-base)"
msgstr ""
-"Подмодулът „%s“ не може да бъде слят (базата за сливане не предшества "
+"Подмодулът „%s“ не може да се слее (базата за сливане не предшества "
"подаванията)"
#, c-format
@@ -18433,292 +18528,23 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "неуспешно събиране на информацията за сливането на „%s“, „%s“ и „%s“"
-msgid "(bad commit)\n"
-msgstr "(лошо подаване)\n"
-
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr ""
-"неуспешно изпълнение на „add_cacheinfo“ за пътя „%s“. Сливането е "
-"преустановено."
-
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr ""
-"неуспешно изпълнение на „add_cacheinfo“ за обновяването на пътя „%s“. "
-"Сливането е преустановено."
-
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "грешка при създаването на пътя „%s“%s"
-
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Изтриване на „%s“, за да се освободи място за поддиректория\n"
-
-msgid ": perhaps a D/F conflict?"
-msgstr ": възможно е да има конфликт директория/файл."
-
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr ""
-"преустановяване на действието, за да не се изтрие неследеният файл „%s“"
-
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "обектът „%s“ (%s) се очакваше да е BLOB, а не е"
-
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "„%s“ не може да се отвори: %s"
-
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "неуспешно създаване на символната връзка „%s“: %s"
-
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr ""
-"не е ясно какво да се прави с обекта „%2$s“ (%3$s) с права̀ за достъп „%1$06o“"
-
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "Неуспешно сливане на подмодула „%s“ (хранилището е с грешки)"
-
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "Превъртане на подмодула „%s“ до следното подаване:"
-
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "Превъртане на подмодула „%s“"
-
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
-"Неуспешно сливане на подмодула „%s“ (липсва сливането, което се предшества "
-"от подаванията)"
-
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "Неуспешно сливане на подмодула „%s“ (не е превъртане)"
-
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr ""
-"Открито е сливане, което може да решава проблема със сливането на "
-"подмодула:\n"
-
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Ако това е така, добавете го към индекса с команда като следната:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"Това приема предложеното.\n"
-
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "Неуспешно сливане на подмодула „%s“ (открити са множество сливания)"
-
-msgid "failed to execute internal merge"
-msgstr "неуспешно вътрешно сливане"
-
-#, c-format
-msgid "unable to add %s to database"
-msgstr "„%s“ не може да се добави в базата от данни"
-
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr "Грешка: за да не се изтрие неследеният файл „%s“, се записва в „%s“."
-
-#, 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“ "
-"е оставена в дървото."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"КОНФЛИКТ (%s/изтриване): „%s“ е изтрит в %s, а „%s“ е преименуван на „%s“ в "
-"%s. Версия %s на „%s“ е оставена в дървото."
-
-#, 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."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"КОНФЛИКТ (%s/изтриване): „%s“ е изтрит в %s, а „%s“ е преименуван на „%s“ в "
-"%s. Версия %s на „%s“ е оставена в дървото: %s."
-
-msgid "rename"
-msgstr "преименуване"
-
-msgid "renamed"
-msgstr "преименуван"
-
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "Преустановяване на действието, за да не се изгуби промененият „%s“"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr ""
-"Отказ да се загуби неследеният файл „%s“, защото е на място, където пречи."
-
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"КОНФЛИКТ (преименуване/добавяне): „%s“ е преименуван на „%s“ в клон „%s“, а "
-"„%s“ е добавен в „%s“"
-
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "„%s“ е директория в „%s“, затова се добавя като „%s“"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr ""
-"Преустановяване на действието, за да не се изгуби неследеният файл „%s“. "
-"Вместо него се добавя „%s“"
-
-#, 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."
-
-msgid " (left unresolved)"
-msgstr " (некоригиран конфликт)"
-
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"КОНФЛИКТ (преименуване/преименуване): „%s“ е преименуван на „%s“ в клон "
-"„%s“, а „%s“ е преименуван на „%s“ в „%s“"
-
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"КОНФЛИКТ (раздвояване при преименуване на директория): Не е ясно къде да се "
-"постави „%s“, защото няколко нови директории поделят съдържанието на "
-"директория „%s“, като никоя не съдържа мнозинство от файловете ѝ."
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"КОНФЛИКТ (преименуване/преименуване): „%s“ е преименуван на „%s“ в клон "
-"„%s“, а „%s“ е преименуван на „%s“ в „%s“"
-
-#, c-format
-msgid "cannot read object %s"
-msgstr "обектът „%s“ не може да се прочете"
-
-#, c-format
-msgid "object %s is not a blob"
-msgstr "обектът „%s“ не е BLOB"
-
-msgid "modify"
-msgstr "промяна"
-
-msgid "modified"
-msgstr "променен"
-
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "Прескачане на „%s“ (слетият резултат е идентичен със сегашния)"
-
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Добавяне като „%s“"
-
-#, c-format
-msgid "Removing %s"
-msgstr "Изтриване на „%s“"
-
-msgid "file/directory"
-msgstr "файл/директория"
-
-msgid "directory/file"
-msgstr "директория/файл"
-
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
-"КОНФЛИКТ (%s): Съществува директория на име „%s“ в „%s“. Добавяне на „%s“ "
-"като „%s“"
-
-#, c-format
-msgid "Adding %s"
-msgstr "Добавяне на „%s“"
-
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "КОНФЛИКТ (добавяне/добавяне): Конфликт при сливане на „%s“"
-
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "неуспешно сливане на дърветата „%s“ и „%s“"
-
-msgid "Merging:"
-msgstr "Сливане:"
-
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "открит е %u общ предшественик:"
-msgstr[1] "открити са %u общи предшественици:"
-
-msgid "merge returned no commit"
-msgstr "сливането не върна подаване"
-
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "Неуспешен анализ на обекта „%s“"
-
msgid "failed to read the cache"
-msgstr "кешът не може да бъде прочетен"
+msgstr "кешът не може да се прочете"
#, c-format
msgid "failed to add packfile '%s'"
-msgstr "пакетният файл „%s“ не може да бъде добавен"
+msgstr "пакетният файл „%s“ не може да се добави"
#, c-format
msgid "failed to open pack-index '%s'"
-msgstr "индексът за пакети „%s“ не може да бъде отворен"
+msgstr "индексът за пакети „%s“ не може да се отвори"
#, c-format
msgid "failed to locate object %d in packfile"
msgstr "обект %d в пакетния файл липсва"
msgid "cannot store reverse index file"
-msgstr "файлът за индекса не може да бъде съхранен"
+msgstr "файлът за индекса не може да се съхрани"
#, c-format
msgid "could not parse line: %s"
@@ -18741,17 +18567,17 @@
#, c-format
msgid "failed to clear multi-pack-index at %s"
-msgstr "индексът за множество пакети не може да бъде изчистен при „%s“"
-
-msgid "cannot write incremental MIDX with bitmap"
-msgstr ""
-"нарастващият индекс за множество пакети с битова маска не може да се запише"
+msgstr "индексът за множество пакети не може да се изчисти при „%s“"
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr ""
"индексът за множество пакети се прескача, защото сумата за проверка не "
"съвпада"
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "файлът с обратния индекс за множество пакети „%s“ не може да се зареди"
+
msgid "Adding packfiles to multi-pack-index"
msgstr "Добавяне на пакетни файлове към индекс за множество пакети"
@@ -18776,14 +18602,13 @@
msgstr "няма пакетни файлове за индексиране"
msgid "refusing to write multi-pack .bitmap without any objects"
-msgstr ""
-"многопакетната битова маска без никакви обекти не може да бъде запазена"
+msgstr "многопакетната битова маска без никакви обекти не може да се запази"
msgid "unable to create temporary MIDX layer"
msgstr "не може да се създаде временен слой за индекса за множество пакети"
msgid "could not write multi-pack bitmap"
-msgstr "многопакетната битова маска не може да бъде запазена"
+msgstr "многопакетната битова маска не може да се запази"
msgid "unable to open multi-pack-index chain file"
msgstr "файлът с веригата на гра̀фа с подаванията не може да се отвори"
@@ -18809,10 +18634,10 @@
msgstr "нарастващият индекс за множество пакети не може да се препакетира"
msgid "could not start pack-objects"
-msgstr "командата „pack-objects“ не може да бъде стартирана"
+msgstr "командата „pack-objects“ не може да се стартира"
msgid "could not finish pack-objects"
-msgstr "командата „pack-objects“ не може да бъде завършена"
+msgstr "командата „pack-objects“ не може да завърши"
msgid "multi-pack-index OID fanout is of the wrong size"
msgstr ""
@@ -18929,8 +18754,7 @@
msgid "multi-pack-index file exists, but failed to parse"
msgstr ""
-"файлът с индекса за множество пакети съществува, но не може да бъде "
-"анализиран"
+"файлът с индекса за множество пакети съществува, но не може да се анализира"
msgid "incorrect checksum"
msgstr "неправилна сума за проверка"
@@ -18959,11 +18783,11 @@
#, c-format
msgid "failed to load pack entry for oid[%d] = %s"
-msgstr "записът в пакета за обекта oid[%d] = %s не може да бъде зареден"
+msgstr "записът в пакета за обекта oid[%d] = %s не може да се зареди"
#, c-format
msgid "failed to load pack-index for packfile %s"
-msgstr "индексът на пакета „%s“ не може да бъде зареден"
+msgstr "индексът на пакета „%s“ не може да се зареди"
#, c-format
msgid "incorrect object offset for oid[%d] = %s: %<PRIx64> != %<PRIx64>"
@@ -19004,7 +18828,7 @@
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr ""
-"Неинициализирано или нереферирано дърво за бележки не може да бъде подадено"
+"Неинициализирано или нереферирано дърво за бележки не може да се подаде"
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
@@ -19043,68 +18867,6 @@
msgstr "Неуспешно преобразуване на „%s“ към „%s“"
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr ""
-"директорията за обекти „%s“ не съществува, проверете „.git/objects/info/"
-"alternates“"
-
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "алтернативният път към обекти не може да бъде нормализиран: „%s“"
-
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr ""
-"%s: алтернативните хранилища за обекти се пренебрегват поради прекалено "
-"дълбоко влагане"
-
-msgid "unable to fdopen alternates lockfile"
-msgstr "заключващият файл за алтернативите не може да се отвори с „fdopen“"
-
-msgid "unable to read alternates file"
-msgstr "файлът с алтернативите не може да бъде прочетен"
-
-msgid "unable to move new alternates file into place"
-msgstr "новият файл с алтернативите не може да бъде преместен на мястото му"
-
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "пътят „%s“ не съществува."
-
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr "все още не се поддържа еталонно хранилище „%s“ като свързано."
-
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "еталонното хранилище „%s“ не е локално"
-
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "еталонното хранилище „%s“ е плитко"
-
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "еталонното хранилище „%s“ е с присаждане"
-
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "директорията с обекти, която отговаря на „%s“, не може да бъде открита"
-
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "неправилен ред при анализа на алтернативните указатели: „%s“"
-
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr ""
-"неуспешен опит за „mmap“ %<PRIuMAX>, което е над позволеното %<PRIuMAX>"
-
-#, c-format
-msgid "mmap failed%s"
-msgstr "неуспешно изпълнение на „mmap“%s"
-
-#, c-format
msgid "object file %s is empty"
msgstr "файлът с обектите „%s“ е празен"
@@ -19122,14 +18884,14 @@
#, c-format
msgid "unable to parse %s header"
-msgstr "заглавната част на „%s“ не може да бъде анализирана"
+msgstr "заглавната част на „%s“ не може да се анализира"
msgid "invalid object type"
msgstr "неправилен вид обект"
#, c-format
msgid "unable to unpack %s header"
-msgstr "заглавната част на „%s“ не може да бъде разпакетирана"
+msgstr "заглавната част на „%s“ не може да се разпакетира"
#, c-format
msgid "header for %s too long, exceeds %d bytes"
@@ -19140,20 +18902,8 @@
msgstr "непакетираният обект „%s“ (в „%s“) е повреден"
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "заместителят „%s“ на „%s“ не може да бъде открит"
-
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "пакетираният обект „%s“ (в „%s“) е повреден"
-
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "липсва съответствие на „%s“ към „%s“"
-
-#, c-format
msgid "unable to open %s"
-msgstr "обектът „%s“ не може да бъде отворен"
+msgstr "обектът „%s“ не може да се отвори"
#, c-format
msgid "files '%s' and '%s' differ in contents"
@@ -19161,11 +18911,11 @@
#, c-format
msgid "unable to write file %s"
-msgstr "файлът „%s“ не може да бъде записан"
+msgstr "файлът „%s“ не може да се запише"
#, c-format
msgid "unable to write repeatedly vanishing file %s"
-msgstr "смаляващият се файл „%s“ не може да бъде записван"
+msgstr "смаляващият се файл „%s“ не може да се запише"
#, c-format
msgid "unable to set permission to '%s'"
@@ -19180,7 +18930,7 @@
"няма права̀ за добавяне на обект към базата от данни на хранилището „%s“"
msgid "unable to create temporary file"
-msgstr "не може да бъде създаден временен файл"
+msgstr "не може да се създаде временен файл"
msgid "unable to write loose object file"
msgstr "грешка при записа на файла с непакетиран обект"
@@ -19211,7 +18961,7 @@
#, c-format
msgid "unable to create directory %s"
-msgstr "директорията „%s“ не може да бъде създадена"
+msgstr "директорията „%s“ не може да се създаде"
#, c-format
msgid "cannot read object for %s"
@@ -19245,10 +18995,6 @@
msgstr "неподдържан вид файл: „%s“"
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "„%s“ е неправилен обект от вид „%s“"
-
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "неправилна контролна сума за „%s“ (трябва да е %s)"
@@ -19258,15 +19004,20 @@
#, c-format
msgid "unable to unpack header of %s"
-msgstr "заглавната част на „%s“ не може да бъде разпакетирана"
+msgstr "заглавната част на „%s“ не може да се разпакетира"
#, c-format
msgid "unable to parse header of %s"
-msgstr "заглавната част на „%s“ не може да бъде анализирана"
+msgstr "заглавната част на „%s“ не може да се анализира"
+
+#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr ""
+"заглавната част „%s“ на %s не може да се анализира, за да се определи видът"
#, c-format
msgid "unable to unpack contents of %s"
-msgstr "съдържанието на „%s“ не може да бъде разпакетирано"
+msgstr "съдържанието не може да се разпакетира: „%s“"
#. TRANSLATORS: This is a line of ambiguous object
#. output shown when we cannot look up or parse the
@@ -19423,6 +19174,75 @@
msgstr "неправилно име на обект: „%.*s“"
#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr ""
+"директорията за обекти „%s“ не съществува, проверете „.git/objects/info/"
+"alternates“"
+
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "алтернативният път към обекти не може да се нормализира: „%s“"
+
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr ""
+"%s: алтернативните хранилища за обекти се пренебрегват поради прекалено "
+"дълбоко влагане"
+
+msgid "unable to fdopen alternates lockfile"
+msgstr "заключващият файл за алтернативите не може да се отвори с „fdopen“"
+
+msgid "unable to read alternates file"
+msgstr "файлът с алтернативите не може да се прочете"
+
+msgid "unable to move new alternates file into place"
+msgstr "новият файл с алтернативите не може да се премести на мястото си"
+
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "пътят „%s“ не съществува."
+
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr "все още не се поддържа еталонно хранилище „%s“ като свързано."
+
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "еталонното хранилище „%s“ не е локално"
+
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "еталонното хранилище „%s“ е плитко"
+
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "еталонното хранилище „%s“ е с присаждане"
+
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "директорията с обекти, която отговаря на „%s“, не може да се открие"
+
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "неправилен ред при анализа на алтернативните указатели: „%s“"
+
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "заместителят „%s“ на „%s“ липсва"
+
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "пакетираният обект „%s“ (в „%s“) е повреден"
+
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "липсва съответствие на „%s“ към „%s“"
+
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "„%s“ е неправилен обект от вид „%s“"
+
+#, c-format
msgid "invalid object type \"%s\""
msgstr "неправилен вид обект: „%s“"
@@ -19436,7 +19256,7 @@
#, c-format
msgid "unable to parse object: %s"
-msgstr "обектът „%s“ не може да бъде анализиран"
+msgstr "обектът „%s“ не може да се анализира"
#, c-format
msgid "hash mismatch %s"
@@ -19603,7 +19423,7 @@
#, c-format
msgid "unable to get disk usage of '%s'"
-msgstr "използваното място за съхранение на „%s“ не може да бъде получено"
+msgstr "използваното място за съхранение на „%s“ не може да се получи"
#, c-format
msgid "bitmap file '%s' has invalid checksum"
@@ -19736,6 +19556,14 @@
msgstr "опцията „%s“ не е налична"
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "стойността %s за „%s“ е извън диапазона [%<PRIdMAX>,%<PRIdMAX>]"
+
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "„%s“ очаква цяло число, евентуално със суфикс „k“/„m“/„g“"
+
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr ""
"„%s“ очаква неотрицателно цяло число, евентуално със суфикс „k“/„m“/„g“"
@@ -19896,10 +19724,6 @@
msgstr "неправилна булева стойност „%s“ за „%s“"
#, c-format
-msgid "failed to parse %s"
-msgstr "„%s“ не може да бъде анализиран"
-
-#, c-format
msgid "failed to walk children of tree %s: not found"
msgstr "неуспешно обхождане на дъщерните елементи на дървото „%s“: то липсва"
@@ -20064,8 +19888,12 @@
msgstr "„%s“ не може да се достави от гарантиращото хранилище"
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "има хранилище с име „%s“, но адресът му сочи към „%s“, а не към „%s“"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "липсващ или празен адрес за отдалечено хранилище „%s“"
+
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "има хранилище с име „%s“, но адресът му е „%s“, а не „%s“"
#, c-format
msgid "unknown '%s' value for '%s' config option"
@@ -20088,7 +19916,7 @@
#, c-format
msgid "failed to load pseudo-merge regex for %s: '%s'"
msgstr ""
-"регулярният израз за псевдо сливания за „%s“, не може да бъде зареден: „%s“"
+"регулярният израз за псевдо сливания за „%s“, не може да се зареди: „%s“"
#, c-format
msgid "%s must be non-negative, using default"
@@ -20154,7 +19982,7 @@
#, c-format
msgid "could not parse commit '%s'"
-msgstr "подаването „%s“ не може да бъде анализирано"
+msgstr "подаването „%s“ не може да се анализира"
#, c-format
msgid ""
@@ -20173,7 +20001,7 @@
#, c-format
msgid "could not parse log for '%s'"
-msgstr "журналът с подаванията на „%s“ не може да бъде анализиран"
+msgstr "журналът с подаванията на „%s“ не може да се анализира"
#, c-format
msgid "invalid extra cruft tip: '%s'"
@@ -20185,7 +20013,7 @@
#, c-format
msgid "will not add file alias '%s' ('%s' already exists in index)"
msgstr ""
-"няма да бъде добавен псевдоним за файл „%s“ („%s“ вече съществува в индекса)"
+"няма да се добави псевдоним за файл „%s“ („%s“ вече съществува в индекса)"
msgid "cannot create an empty blob in the object database"
msgstr "в базата от данни за обектите не може да се създаде празен обект-BLOB"
@@ -20198,7 +20026,7 @@
#, c-format
msgid "unable to index file '%s'"
-msgstr "файлът „%s“ не може да бъде индексиран"
+msgstr "файлът „%s“ не може да се индексира"
#, c-format
msgid "unable to add '%s' to index"
@@ -20319,7 +20147,7 @@
msgstr "не може да се запише разделѐн, частичен индекс"
msgid "failed to convert to a sparse-index"
-msgstr "индексът не може да бъде превърнат в частичен"
+msgstr "индексът не може да се превърне в частичен"
#, c-format
msgid "unable to open git dir: %s"
@@ -20438,7 +20266,7 @@
"If you remove a line here THAT COMMIT WILL BE LOST.\n"
msgstr ""
"\n"
-"Ако изтриете ред, съответстващото му подаване ще бъде ИЗТРИТО.\n"
+"Ако изтриете ред, съответстващото му подаване ще се ИЗТРИЕ.\n"
msgid ""
"\n"
@@ -20460,7 +20288,7 @@
"\n"
msgstr ""
"\n"
-"Ако изтриете всичко, пребазирането ще бъде преустановено.\n"
+"Ако изтриете всичко, пребазирането ще се преустанови.\n"
"\n"
#, c-format
@@ -20745,7 +20573,7 @@
#, c-format
msgid "could not retrieve `%s`"
-msgstr "„%s“ не може да бъде получен"
+msgstr "„%s“ не може да се получи"
#, c-format
msgid "invalid branch name: %s = %s"
@@ -20812,7 +20640,7 @@
#, c-format
msgid "could not delete reference %s: %s"
-msgstr "Указателят „%s“ не може да бъде изтрит: %s"
+msgstr "Указателят „%s“ не може да се изтрие: %s"
#, c-format
msgid "could not delete references: %s"
@@ -20843,12 +20671,16 @@
#, c-format
msgid "cannot open directory %s"
-msgstr "директорията „%s“ не може да бъде отворена"
+msgstr "директорията „%s“ не може да се отвори"
msgid "Checking references consistency"
msgstr "Проверка на валидността на указателите"
#, c-format
+msgid "unable to open '%s'"
+msgstr "„%s“ не може да се отвори"
+
+#, c-format
msgid "refname is dangerous: %s"
msgstr "опасно име на указател: %s"
@@ -20914,17 +20746,13 @@
#, c-format
msgid "refname %s not found"
-msgstr "името на указателя „%s“ не може да бъде открито"
+msgstr "името на указателя „%s“ не може да се открие"
#, c-format
msgid "refname %s is a symbolic ref, copying it is not supported"
msgstr "името на указател „%s“ е символен указател, не може да се копира"
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "неправилен указател: „%s“"
-
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "шаблонът „%s“ не съдържа „*“"
@@ -21003,13 +20831,12 @@
#, c-format
msgid "cannot deflate request; zlib deflate error %d"
msgstr ""
-"заявката не може да бъде декомпресирана, грешка от „zlib“ при "
-"декомпресиране: %d"
+"заявката не може да се декомпресира, грешка от „zlib“ при декомпресиране: %d"
#, c-format
msgid "cannot deflate request; zlib end error %d"
msgstr ""
-"заявката не може да бъде декомпресирана; грешка от „zlib“ при завършване: %d<"
+"заявката не може да се декомпресира; грешка от „zlib“ при завършване: %d"
#, c-format
msgid "%d bytes of length header were received"
@@ -21071,8 +20898,7 @@
"If you cannot, please let us know why you still need to use it by\n"
"sending an e-mail to <git@vger.kernel.org>."
msgstr ""
-"изчитането на отдалеченото хранилище от „%s/%s“ предстои да бъде "
-"премахнато.\n"
+"изчитането на отдалеченото хранилище от „%s/%s“ предстои да се премахне.\n"
"Ако все още ползвате директорията „remotes/“, препоръчваме да я мигрирате\n"
"към следящи директории на база настройки чрез командата:\n"
"\n"
@@ -21244,7 +21070,7 @@
#, c-format
msgid "couldn't find remote ref %s"
-msgstr "отдалеченият указател „%s“ не може да бъде открит"
+msgstr "отдалеченият указател „%s“ липсва"
#, c-format
msgid "* Ignoring funny ref '%s' locally"
@@ -21282,8 +21108,8 @@
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
"Your branch is behind '%s' by %d commits, and can be fast-forwarded.\n"
-msgstr[0] "Клонът ви е с %2$d подаване зад „%1$s“ и може да бъде превъртян.\n"
-msgstr[1] "Клонът ви е с %2$d подавания зад „%1$s“ и може да бъде превъртян.\n"
+msgstr[0] "Клонът ви е с %2$d подаване зад „%1$s“ и може да се превърти.\n"
+msgstr[1] "Клонът ви е с %2$d подавания зад „%1$s“ и може да се превърти.\n"
msgid " (use \"git pull\" to update your local branch)\n"
msgstr " (обновете локалния си клон чрез „git pull“)\n"
@@ -21308,7 +21134,7 @@
#, c-format
msgid "cannot parse expected object name '%s'"
-msgstr "очакваното име на обект „%s“ не може да бъде анализирано"
+msgstr "очакваното име на обект „%s“ не може да се анализира"
#, c-format
msgid "cannot strip one component off url '%s'"
@@ -21330,7 +21156,7 @@
msgstr "повреден „MERGE_RR“ (запис за коригиране на конфликт)"
msgid "unable to write rerere record"
-msgstr "приложеното коригиране на конфликт не може да бъде записано"
+msgstr "приложеното коригиране на конфликт не може да се запише"
#, c-format
msgid "there were errors while writing '%s' (%s)"
@@ -21400,7 +21226,7 @@
#, c-format
msgid "failed to find tree of %s"
-msgstr "дървото, сочено от „%s“, не може да бъде открито"
+msgstr "дървото, сочено от „%s“, не може да се открие"
#, c-format
msgid "unsupported section for hidden refs: %s"
@@ -21428,7 +21254,7 @@
#, c-format
msgid "could not get commit for --ancestry-path argument %s"
-msgstr "подаването „%s“ към опцията „--ancestry-path“ не може да бъде получено"
+msgstr "подаването „%s“ към опцията „--ancestry-path“ не може да се получи"
msgid "--unpacked=<packfile> no longer supported"
msgstr "опцията „--unpacked=ПАКЕТЕН_ФАЙЛ“ вече не се поддържа"
@@ -21483,11 +21309,11 @@
msgid "could not set recommended config"
msgstr "препоръчаните настройки не може да се зададат"
-msgid "could not turn on maintenance"
-msgstr "задачите по поддръжка не може да се включат"
+msgid "could not toggle maintenance"
+msgstr "режимът на задачите по поддръжка не може да се превключи"
msgid "could not start the FSMonitor daemon"
-msgstr "фоновият процес на FSMonitor не може да бъде спрян"
+msgstr "фоновият процес на FSMonitor не може да се спре"
msgid "could not turn off maintenance"
msgstr "задачите по поддръжка не може да се изключат"
@@ -21508,13 +21334,13 @@
msgstr "неуспешно получаване на името на стандартния клон"
msgid "failed to unregister repository"
-msgstr "хранилището не може да бъде отчислено"
+msgstr "хранилището не може да се отчисли"
msgid "failed to stop the FSMonitor daemon"
-msgstr "фоновият процес FSMonitor не може да бъде спрян"
+msgstr "фоновият процес FSMonitor не може да се спре"
msgid "failed to delete enlistment directory"
-msgstr "зачислената директория не може да бъде изтрита"
+msgstr "зачислената директория не може да се изтрие"
msgid "branch to checkout after clone"
msgstr "към кой клон да се премине след клониране"
@@ -21531,12 +21357,16 @@
msgid "specify if tags should be fetched during clone"
msgstr "указва дали етикетите да се доставят при клониране"
+msgid "specify if background maintenance should be enabled"
+msgstr "дали на заден фон да се изпълняват задачи за поддръжката"
+
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch ОСНОВЕН_КЛОН] [--full-clone]\n"
-" [--[no-]src] [--[no-]tags] АДРЕС [ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
+" [--[no-]src] [--[no-]tags] [--[no-]maintenance] АДРЕС "
+"[ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
#, c-format
msgid "cannot deduce worktree name from '%s'"
@@ -21548,7 +21378,7 @@
#, c-format
msgid "failed to get default branch for '%s'"
-msgstr "основният клон на „%s“ не може да бъде получен"
+msgstr "основният клон на „%s“ не може да се получи"
#, c-format
msgid "could not configure remote in '%s'"
@@ -21574,19 +21404,33 @@
msgid "`scalar list` does not take arguments"
msgstr "„scalar list“ не приема аргументи"
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
msgid "reconfigure all registered enlistments"
msgstr "пренастройване на всички зачислени директории"
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all|ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
+msgid "(enable|disable|keep)"
+msgstr "(enable=включване|disable=изключване|keep=запазване)"
+
+msgid "signal how to adjust background maintenance"
+msgstr "как да се промени поддръжката на заден фон"
+
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all|"
+"ЗАЧИСЛЕНА_ДИРЕКТОРИЯ]"
msgid "--all or <enlistment>, but not both"
msgstr "опцията „--all“ и указването на зачислена директория не са съвместими"
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "непознат режим за „--maintenance“: „%s“"
+
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "остарялото скаларно хранилище (scalar.repo) „%s“ не може да се изтрие"
@@ -21633,7 +21477,7 @@
msgstr "scalar delete ЗАЧИСЛЕНА_ДИРЕКТОРИЯ"
msgid "refusing to delete current working directory"
-msgstr "текущата работна директория няма да бъде изтрита"
+msgstr "текущата работна директория няма да се изтрие"
msgid "include Git version"
msgstr "включване и на версията на git"
@@ -21670,15 +21514,14 @@
#, c-format
msgid "unable to parse remote unpack status: %s"
-msgstr ""
-"състоянието от отдалеченото разпакетиране не може да бъде анализирано: %s"
+msgstr "състоянието от отдалеченото разпакетиране не може да се анализира: %s"
#, c-format
msgid "remote unpack failed: %s"
msgstr "неуспешно отдалечено разпакетиране: %s"
msgid "failed to sign the push certificate"
-msgstr "сертификатът за изтласкване не може да бъде подписан"
+msgstr "сертификатът за изтласкване не може да се подпише"
msgid "send-pack: unable to fork off fetch subprocess"
msgstr "send-pack: неуспешно създаване на процес"
@@ -21712,7 +21555,7 @@
#, c-format
msgid "could not delete '%s'"
-msgstr "„%s“ не може да бъде изтрит"
+msgstr "„%s“ не може да се изтрие"
msgid "revert"
msgstr "отмяна"
@@ -21826,13 +21669,13 @@
#.
#, c-format
msgid "%s: Unable to write new index file"
-msgstr "%s: новият индекс не може да бъде запазен"
+msgstr "%s: новият индекс не може да се запази"
msgid "unable to update cache tree"
-msgstr "кешът на обектите-дървета не може да бъде обновен"
+msgstr "кешът на обектите-дървета не може да се обнови"
msgid "could not resolve HEAD commit"
-msgstr "подаването, сочено от указателя „HEAD“, не може да бъде открито"
+msgstr "подаването, сочено от указателя „HEAD“, липсва"
#, c-format
msgid "no key present in '%.*s'"
@@ -21840,7 +21683,7 @@
#, c-format
msgid "unable to dequote value of '%s'"
-msgstr "цитирането на стойността на „%s“ не може да бъде изчистено"
+msgstr "цитирането на стойността на „%s“ не може да се изчисти"
msgid "'GIT_AUTHOR_NAME' already given"
msgstr "настройката за автор „GIT_AUTHOR_NAME“ вече е зададена"
@@ -21949,15 +21792,13 @@
" git commit --amend --reset-author\n"
msgid "couldn't look up newly created commit"
-msgstr "току що създаденото подаване не може да бъде открито"
+msgstr "току що създаденото подаване липсва"
msgid "could not parse newly created commit"
-msgstr "току що създаденото подаване не може да бъде анализирано"
+msgstr "току що създаденото подаване не може да се анализира"
msgid "unable to resolve HEAD after creating commit"
-msgstr ""
-"състоянието сочено от указателя „HEAD“ не може да бъде открито след "
-"подаването"
+msgstr "състоянието сочено от указателя „HEAD“ липсва след подаването"
msgid "detached HEAD"
msgstr "несвързан връх „HEAD“"
@@ -21966,18 +21807,18 @@
msgstr " (начално подаване)"
msgid "could not parse HEAD"
-msgstr "указателят „HEAD“ не може да бъде анализиран"
+msgstr "указателят „HEAD“ не може да се анализира"
#, c-format
msgid "HEAD %s is not a commit!"
msgstr "указателят „HEAD“ „%s“ сочи към нещо, което не е подаване!"
msgid "unable to parse commit author"
-msgstr "авторът на подаването не може да бъде анализиран"
+msgstr "авторът на подаването не може да се анализира"
#, c-format
msgid "unable to read commit message from '%s'"
-msgstr "съобщението за подаване не може да бъде прочетено от „%s“"
+msgstr "съобщението за подаване не може да се прочете от „%s“"
#, c-format
msgid "invalid author identity '%s'"
@@ -21992,7 +21833,7 @@
#, c-format
msgid "could not parse parent commit %s"
-msgstr "родителското подаване „%s“ не може да бъде анализирано"
+msgstr "родителското подаване „%s“ не може да се анализира"
#, c-format
msgid "unknown command: %d"
@@ -22006,11 +21847,11 @@
msgstr "Това е съобщение при подаване №%d:"
msgid "The 1st commit message will be skipped:"
-msgstr "Съобщението при подаване №1 ще бъде прескочено:"
+msgstr "Съобщението при подаване №1 ще се прескочи:"
#, c-format
msgid "The commit message #%d will be skipped:"
-msgstr "Съобщението при подаване №%d ще бъде прескочено:"
+msgstr "Съобщението при подаване №%d ще се прескочи:"
#, c-format
msgid "This is a combination of %d commits."
@@ -22027,12 +21868,11 @@
msgstr "указателят „HEAD“ не може да се прочете"
msgid "could not read HEAD's commit message"
-msgstr ""
-"съобщението за подаване към указателя „HEAD“ не може да бъде прочетено: %s"
+msgstr "съобщението за подаване към указателя „HEAD“ не може да се прочете: %s"
#, c-format
msgid "could not read commit message of %s"
-msgstr "съобщението за подаване към „%s“ не може да бъде прочетено"
+msgstr "съобщението за подаване към „%s“ не може да се прочете"
msgid "your index file is unmerged."
msgstr "индексът не е слят."
@@ -22060,11 +21900,11 @@
#, c-format
msgid "could not revert %s... %s"
-msgstr "подаването „%s“… не може да бъде отменено: „%s“"
+msgstr "подаването „%s“… не може да се отменени: „%s“"
#, c-format
msgid "could not apply %s... %s"
-msgstr "подаването „%s“… не може да бъде приложено: „%s“"
+msgstr "подаването „%s“… не може да се приложи: „%s“"
#, c-format
msgid "dropping %s %s -- patch contents already upstream\n"
@@ -22211,24 +22051,23 @@
#, c-format
msgid "could not create sequencer directory '%s'"
msgstr ""
-"директорията за определянето на последователността „%s“ не може да бъде "
-"създадена"
+"директорията за определянето на последователността „%s“ не може да се създаде"
msgid "no cherry-pick or revert in progress"
msgstr ""
"в момента не се извършва отбиране на подавания или пребазиране на клона"
msgid "cannot resolve HEAD"
-msgstr "Подаването сочено от указателя „HEAD“ не може да бъде открито"
+msgstr "Подаването сочено от указателя „HEAD“ липсва"
msgid "cannot abort from a branch yet to be born"
msgstr ""
-"действието не може да бъде преустановено, когато сте на клон, който тепърва "
-"предстои да бъде създаден"
+"действието не може да се преустанови, когато сте на клон, който тепърва "
+"предстои да се създаде"
#, c-format
msgid "cannot read '%s': %s"
-msgstr "„%s“ не може да бъде прочетен: %s"
+msgstr "„%s“ не може да се прочете: %s"
msgid "unexpected end of file"
msgstr "неочакван край на файл"
@@ -22266,10 +22105,10 @@
" git %s --continue"
msgid "cannot read HEAD"
-msgstr "указателят „HEAD“ не може да бъде прочетен"
+msgstr "указателят „HEAD“ не може да се прочете"
msgid "could not write commit message file"
-msgstr "файлът със съобщението за подаване не може да бъде записан"
+msgstr "файлът със съобщението за подаване не може да се запише"
#, c-format
msgid ""
@@ -22291,7 +22130,7 @@
#, c-format
msgid "Could not apply %s... %.*s"
-msgstr "Подаването „%s“… не може да бъде приложено: „%.*s“"
+msgstr "Подаването „%s“… не може да се приложи: „%.*s“"
#, c-format
msgid "Could not merge %.*s"
@@ -22340,7 +22179,7 @@
#, c-format
msgid "could not resolve '%s'"
-msgstr "„%s“ не може да бъде открит"
+msgstr "„%s“ липсва"
msgid "writing fake root commit"
msgstr "запазване на фалшиво начално подаване"
@@ -22364,14 +22203,14 @@
#, c-format
msgid "could not get commit message of '%s'"
-msgstr "съобщението за подаване към „%s“ не може да бъде получено"
+msgstr "съобщението за подаване към „%s“ не може да се получи"
#, c-format
msgid "could not even attempt to merge '%.*s'"
msgstr "сливането на „%.*s“ не може даже да започне"
msgid "merge: Unable to write new index file"
-msgstr "сливане: новият индекс не може да бъде запазен"
+msgstr "сливане: новият индекс не може да се запази"
#, c-format
msgid ""
@@ -22405,7 +22244,7 @@
#, c-format
msgid "Could not create directory for '%s'"
-msgstr "Директорията за „%s“ не може да бъде създадена"
+msgstr "Директорията за „%s“ не може да се създаде"
#, c-format
msgid "Created autostash: %s\n"
@@ -22420,7 +22259,7 @@
#, c-format
msgid "cannot store %s"
-msgstr "„%s“ не може да бъде запазен"
+msgstr "„%s“ не може да се запази"
#, c-format
msgid ""
@@ -22464,7 +22303,7 @@
" git rebase --edit-todo\n"
" git rebase --continue\n"
msgstr ""
-"Следната запланувана команда не може да бъде изпълнена:\n"
+"Следната запланувана команда не може да се изпълни:\n"
"\n"
" %.*s\n"
"\n"
@@ -22495,7 +22334,7 @@
#, c-format
msgid "could not update HEAD to %s"
-msgstr "„HEAD“ не може да бъде обновен до „%s“"
+msgstr "„HEAD“ не може да се обнови до „%s“"
#, c-format
msgid "Successfully rebased and updated %s.\n"
@@ -22526,10 +22365,10 @@
#, c-format
msgid "could not write file: '%s'"
-msgstr "файлът „%s“ не може да бъде записан"
+msgstr "файлът „%s“ не може да се запише"
msgid "could not remove CHERRY_PICK_HEAD"
-msgstr "указателят „CHERRY_PICK_HEAD“ не може да бъде изтрит"
+msgstr "указателят „CHERRY_PICK_HEAD“ не може да се изтрие"
msgid "could not commit staged changes."
msgstr "промѐните в индекса не може да бъдат подадени."
@@ -22543,7 +22382,7 @@
msgstr "%s: неправилна версия"
msgid "can't revert as initial commit"
-msgstr "първоначалното подаване не може да бъде отменено"
+msgstr "първоначалното подаване не може да се отмени"
#, c-format
msgid "skipped previously applied commit %s"
@@ -22676,7 +22515,7 @@
#, c-format
msgid "failed to stat '%*s%s%s'"
-msgstr "не може да бъде получена информация чрез „stat“ за „%*s%s%s“"
+msgstr "не може да се получи информация чрез „stat“ за „%*s%s%s“"
#, c-format
msgid "safe.directory '%s' not absolute"
@@ -22695,7 +22534,7 @@
" git config --global --add safe.directory %s"
msgid "Unable to read current working directory"
-msgstr "Текущата работна директория не може да бъде прочетена"
+msgstr "Текущата работна директория не може да се прочете"
#, c-format
msgid "cannot change to '%s'"
@@ -22743,11 +22582,11 @@
#, c-format
msgid "cannot opendir '%s'"
-msgstr "директорията „%s“ не може да бъде отворена"
+msgstr "директорията „%s“ не може да се отвори"
#, c-format
msgid "cannot readlink '%s'"
-msgstr "връзката „%s“ не може да бъде прочетена"
+msgstr "връзката „%s“ не може да се прочете"
#, c-format
msgid "cannot symlink '%s' '%s'"
@@ -22897,7 +22736,7 @@
#, c-format
msgid "Could not update .gitmodules entry %s"
-msgstr "Записът „%s“ във файла „.gitmodules“ не може да бъде променен"
+msgstr "Записът „%s“ във файла „.gitmodules“ не може да се промени"
msgid "Cannot change unmerged .gitmodules, resolve merge conflicts first"
msgstr ""
@@ -22910,7 +22749,7 @@
#, c-format
msgid "Could not remove .gitmodules entry for %s"
-msgstr "Записът „%s“ във файла „.gitmodules“ не може да бъде изтрит"
+msgstr "Записът „%s“ във файла „.gitmodules“ не може да се изтрие"
msgid "staging updated .gitmodules failed"
msgstr "неуспешно добавяне на променения файл „.gitmodules“ в индекса"
@@ -22957,7 +22796,7 @@
#, c-format
msgid "Unable to push submodule '%s'\n"
-msgstr "Подмодулът „%s“ не може да бъде изтласкан\n"
+msgstr "Подмодулът „%s“ не може да се изтласка\n"
#, c-format
msgid "Fetching submodule %s%s\n"
@@ -22965,11 +22804,11 @@
#, c-format
msgid "Could not access submodule '%s'\n"
-msgstr "Подмодулът „%s“ не може да бъде достъпен\n"
+msgstr "Подмодулът „%s“ не може да се достъпи\n"
#, c-format
msgid "Could not access submodule '%s' at commit %s\n"
-msgstr "Подмодулът „%s“ не може да бъде достъпен при подаване %s\n"
+msgstr "Подмодулът „%s“ не може да се достъпи при подаване %s\n"
#, c-format
msgid "Fetching submodule %s%s at commit %s\n"
@@ -23045,7 +22884,7 @@
#, c-format
msgid "could not lookup name for submodule '%s'"
-msgstr "името на подмодула „%s“ не може да бъде намерено"
+msgstr "името на подмодула „%s“ не може да се намери"
#, c-format
msgid "refusing to move '%s' into an existing git dir"
@@ -23070,7 +22909,7 @@
#, c-format
msgid "failed to lstat '%s'"
-msgstr "не може да бъде получена информация чрез „lstat“ за „%s“"
+msgstr "не може да се получи информация чрез „lstat“ за „%s“"
msgid "no remote configured to get bundle URIs from"
msgstr "не е настроено отдалечено хранилище за списъците с адреси на пратки"
@@ -23089,6 +22928,9 @@
"какъв брой записи в кеша на обектите-дървета да се отбележат като невалидни "
"(стандартно е 0)"
+msgid "the number of objects to write"
+msgstr "брой записани обекти"
+
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk ОПЦИЯ… -- ОПЦИЯ_ЗА_ВЕРСИИ…"
@@ -23219,7 +23061,7 @@
#, c-format
msgid "unable to find remote helper for '%s'"
-msgstr "насрещната помощна програма за „%s“ не може да бъде открита"
+msgstr "насрещната помощна програма за „%s“ липсва"
msgid "can't dup helper output fd"
msgstr ""
@@ -23332,7 +23174,7 @@
"Perhaps you should specify a branch.\n"
msgstr ""
"Няма общи указатели, не са указани никакви указатели —\n"
-"нищо няма да бъде направено. Пробвайте да укажете клон.\n"
+"нищо няма да се направи. Пробвайте да укажете клон.\n"
#, c-format
msgid "unsupported object format '%s'"
@@ -23379,7 +23221,7 @@
#, c-format
msgid "could not read bundle '%s'"
-msgstr "пратката на git „%s“ не може да бъде прочетена"
+msgstr "пратката на git „%s“ не може да се прочете"
#, c-format
msgid "transport: invalid depth option '%s'"
@@ -23530,7 +23372,7 @@
"Refusing to remove the current working directory:\n"
"%s"
msgstr ""
-"Текущата работна директория няма да бъде изтрита:\n"
+"Текущата работна директория няма да се изтрие:\n"
"%s"
#, c-format
@@ -23640,7 +23482,7 @@
"Cannot update submodule:\n"
"%s"
msgstr ""
-"Подмодулът не може да бъде обновен:\n"
+"Подмодулът не може да се обнови:\n"
"„%s“"
#, c-format
@@ -23815,7 +23657,7 @@
#, c-format
msgid "unable to read gitdir file (%s)"
-msgstr "файлът „gitdir“ не може да бъде прочетен (%s)"
+msgstr "файлът „gitdir“ не може да се прочете (%s)"
#, c-format
msgid "short read (expected %<PRIuMAX> bytes, read %<PRIuMAX>)"
@@ -23854,11 +23696,11 @@
#, c-format
msgid "unable to create '%s'"
-msgstr "пакетният файл „%s“ не може да бъде създаден"
+msgstr "пакетният файл „%s“ не може да се създаде"
#, c-format
msgid "could not open '%s' for reading and writing"
-msgstr "„%s“ не може да бъде отворен и за четене, и за запис"
+msgstr "„%s“ не може да се отвори и за четене, и за запис"
#, c-format
msgid "unable to access '%s'"
@@ -23870,6 +23712,15 @@
msgid "unable to get random bytes"
msgstr "не може да се получат случайни байтове"
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr ""
+"неуспешен опит за „mmap“ %<PRIuMAX>, което е над позволеното %<PRIuMAX>"
+
+#, c-format
+msgid "mmap failed%s"
+msgstr "неуспешно изпълнение на „mmap“%s"
+
msgid "Unmerged paths:"
msgstr "Неслети пътища:"
@@ -24001,7 +23852,7 @@
"Everything below it will be ignored."
msgstr ""
"Не променяйте и не изтривайте горния ред.\n"
-"Всичко отдолу ще бъде изтрито."
+"Всичко отдолу ще се изтрие."
#, c-format
msgid ""
@@ -24639,8 +24490,15 @@
"използвайте опцията: „--smtp-debug“."
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook промени „Message-ID“ да е: %s\n"
+
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: в отговора на сървъра липсва „Message-ID“.\n"
+
+#, perl-format
msgid "Failed to send %s\n"
-msgstr "„%s“ не може да бъде изпратен\n"
+msgstr "„%s“ не може да се изпрати\n"
#, perl-format
msgid "Dry-Sent %s"
@@ -24664,7 +24522,7 @@
#, perl-format
msgid "can't open file %s"
-msgstr "файлът „%s“ не може да бъде отворен"
+msgstr "файлът „%s“ не може да се отвори"
#, perl-format
msgid "(mbox) Adding cc: %s from line '%s'\n"
@@ -24684,7 +24542,7 @@
#, perl-format
msgid "(%s) Could not execute '%s'"
-msgstr "(%s) Не може да бъде се изпълни „%s“"
+msgstr "(%s) Не може да се изпълни „%s“"
#, perl-format
msgid "(%s) Malformed output from '%s'"
diff --git a/po/de.po b/po/de.po
index 4d9c46f..6b65bb6 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,8 +8,8 @@
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-06 18:29+0100\n"
-"PO-Revision-Date: 2025-03-07 17:28+0100\n"
+"POT-Creation-Date: 2025-05-27 22:57+0000\n"
+"PO-Revision-Date: 2025-05-31 18:38+0200\n"
"Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n"
"Language-Team: German\n"
"Language: de\n"
@@ -17,7 +17,7 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-"X-Generator: Poedit 3.4.4\n"
+"X-Generator: Poedit 3.6\n"
#, c-format
msgid "Huh (%s)?"
@@ -379,8 +379,8 @@
#, c-format
msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
msgstr ""
-"Diesen Patch-Block im Index und Arbeitsverzeichnis verwerfen [y,n,q,a,"
-"d%s,?]? "
+"Diesen Patch-Block im Index und Arbeitsverzeichnis verwerfen "
+"[y,n,q,a,d%s,?]? "
msgid ""
"y - discard this hunk from index and worktree\n"
@@ -411,8 +411,8 @@
#, c-format
msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
msgstr ""
-"Diesen Patch-Block auf Index und Arbeitsverzeichnis anwenden [y,n,q,a,"
-"d%s,?]? "
+"Diesen Patch-Block auf Index und Arbeitsverzeichnis anwenden "
+"[y,n,q,a,d%s,?]? "
msgid ""
"y - apply this hunk to index and worktree\n"
@@ -1746,10 +1746,12 @@
msgid "not tracking: ambiguous information for ref '%s'"
msgstr "kein Tracking: mehrdeutige Informationen für Referenz '%s'"
+#. #-#-#-#-# branch.c.po #-#-#-#-#
#. TRANSLATORS: This is a line listing a remote with duplicate
#. refspecs in the advice message below. For RTL languages you'll
#. probably want to swap the "%s" and leading " " space around.
#.
+#. #-#-#-#-# object-name.c.po #-#-#-#-#
#. TRANSLATORS: This is line item of ambiguous object output
#. from describe_ambiguous_object() above. For RTL languages
#. you'll probably want to swap the "%s" and leading " " space
@@ -3096,11 +3098,11 @@
msgstr "HEAD wurde nicht unter \"refs/heads\" gefunden!"
msgid ""
-"branch with --recurse-submodules can only be used if submodule."
-"propagateBranches is enabled"
+"branch with --recurse-submodules can only be used if "
+"submodule.propagateBranches is enabled"
msgstr ""
-"Branch mit --recurse-submodules kann nur genutzt werden, wenn submodule."
-"propagateBranches aktiviert ist"
+"Branch mit --recurse-submodules kann nur genutzt werden, wenn "
+"submodule.propagateBranches aktiviert ist"
msgid "--recurse-submodules can only be used to create branches"
msgstr "--recurse-submodules kann nur genutzt werden, um Branches zu erstellen"
@@ -3355,11 +3357,8 @@
msgid "git cat-file <type> <object>"
msgstr "git cat-file <Typ> <Objekt>"
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <Objekt>"
-
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <Objekt>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <Objekt>"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3398,9 +3397,6 @@
msgid "show object size"
msgstr "Objektgröße anzeigen"
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "-s und -t mit beschädigten Objekten erlauben"
-
msgid "use mail map file"
msgstr "\"mailmap\"-Datei verwenden"
@@ -3460,6 +3456,13 @@
msgstr ""
"nutzen Sie einen <Pfad> für (--textconv | --filters); Nicht mit 'batch'"
+msgid "objects filter only supported in batch mode"
+msgstr "Objektfilter werden nur im Batch-Modus unterstützt"
+
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "Objektfilter nicht unterstützt: '%s'"
+
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "'%s=<%s>' benötigt '%s' oder '%s'"
@@ -5785,6 +5788,50 @@
msgid "specify the content of the diagnostic archive"
msgstr "den Inhalt des Diagnosearchivs angeben"
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "Konnte Modus '%s' nicht parsen."
+
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "Konnte Objekt-ID '%s' nicht parsen."
+
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<Diff-Optionen>]"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "nicht erkanntes Argument: %s"
+
+msgid "working without -z is not supported"
+msgstr "Arbeiten ohne -z wird nicht unterstützt"
+
+msgid "pathspec arguments not supported"
+msgstr "Pfadspezifikationen als Argumente werden nicht unterstützt"
+
+msgid "revision arguments not allowed"
+msgstr "Commits als Argumente werden nicht unterstützt"
+
+msgid "invalid raw diff input"
+msgstr "ungültige Raw-Diff-Eingabe"
+
+msgid "tree objects not supported"
+msgstr "Tree-Objekte werden nicht unterstützt"
+
+msgid "got EOF while reading path"
+msgstr "EOF beim Lesen des Pfads"
+
+msgid "got EOF while reading destination path"
+msgstr "EOF beim Lesen des Zielpfads"
+
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "Konnte Umbenennen/Kopieren-Punktzahl nicht parsen: %s"
+
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "unbekannter Diff-Status: %c"
+
msgid "--merge-base only works with two commits"
msgstr "--merge-base funktioniert nur mit zwei Commits"
@@ -5927,6 +5974,9 @@
msgid "select handling of signed tags"
msgstr "Behandlung von signierten Tags wählen"
+msgid "select handling of signed commits"
+msgstr "Behandlung von signierten Commits wählen"
+
msgid "select handling of tags that tag filtered objects"
msgstr "Behandlung von Tags wählen, die gefilterte Objekte markieren"
@@ -6367,8 +6417,8 @@
msgstr "Protokoll unterstützt --negotiate-only nicht, beende"
msgid ""
-"--filter can only be used with the remote configured in extensions."
-"partialclone"
+"--filter can only be used with the remote configured in "
+"extensions.partialclone"
msgstr ""
"--filter kann nur mit den Remote-Repositories verwendet werden,\n"
"die in extensions.partialclone konfiguriert sind"
@@ -6589,10 +6639,6 @@
msgstr "%s: Objekt fehlerhaft oder nicht vorhanden: %s"
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s: Objekt hat einen unbekannten Typ '%s': %s"
-
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s: Objekt konnte nicht geparst werden: %s"
@@ -6649,16 +6695,19 @@
msgid "invalid rev-index for pack '%s'"
msgstr "ungültiger Rev-Index für Pack-Datei '%s'"
+msgid "Checking ref database"
+msgstr "Referenzdatenbank überprüfen"
+
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<Objekt>...]"
+" [--[no-]name-objects] [--[no-]references] [<Objekt>...]"
msgid "show unreachable objects"
msgstr "unerreichbare Objekte anzeigen"
@@ -6696,6 +6745,9 @@
msgid "show verbose names for reachable objects"
msgstr "ausführliche Namen für erreichbare Objekte anzeigen"
+msgid "check reference database consistency"
+msgstr "Konsistenz der Referenzdatenbank überprüfen"
+
msgid "Checking objects"
msgstr "Prüfe Objekte"
@@ -7104,6 +7156,7 @@
msgid "invalid number of threads specified (%d) for %s"
msgstr "ungültige Anzahl von Threads (%d) für %s angegeben"
+#. #-#-#-#-# grep.c.po #-#-#-#-#
#. TRANSLATORS: %s is the configuration
#. variable for tweaking threads, currently
#. grep.threads
@@ -7861,10 +7914,6 @@
"Entwicklung der Zeilen vom Bereich <Start>,<Ende> oder Funktion :"
"<Funktionsname> in <Datei> verfolgen"
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "nicht erkanntes Argument: %s"
-
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<Bereich>:<Datei> kann nicht mit Pfadspezifikation verwendet werden"
@@ -8527,6 +8576,9 @@
msgid "also show informational/conflict messages"
msgstr "auch Informations-/Konfliktmeldungen anzeigen"
+msgid "suppress all output; only exit status wanted"
+msgstr "alle Ausgaben unterdrücken; nur Exit-Status verwenden"
+
msgid "list filenames without modes/oids/stages"
msgstr "Dateinamen ohne Modi/Oids/Stufen auflisten"
@@ -8941,8 +8993,11 @@
"während des Umpackens, sammle Paket-Dateien von geringerer Größe in einen "
"Stapel, welcher größer ist als diese Größe"
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<Optionen>] <Quelle>... <Ziel>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <Quelle> <Ziel>"
+
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <Quelle>... <Zielverzeichnis>"
#, c-format
msgid "Directory %s is in index and no submodule?"
@@ -9014,6 +9069,12 @@
msgstr "%s, Quelle=%s, Ziel=%s"
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr ""
+"kann nicht sowohl '%s' als auch das übergeordnete Verzeichnis '%s' "
+"verschieben"
+
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "Benenne %s nach %s um\n"
@@ -9971,6 +10032,10 @@
msgid "unable to access commit %s"
msgstr "Konnte nicht auf Commit '%s' zugreifen."
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "ungültige Refspec '%s'"
+
msgid "ignoring --verify-signatures for rebase"
msgstr "Ignoriere --verify-signatures für Rebase"
@@ -10971,6 +11036,9 @@
msgid "git reflog exists <ref>"
msgstr "git reflog exists <Referenz>"
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <Referenzen>...]"
+
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "ungültiger Zeitstempel '%s' für '--%s'"
@@ -11022,8 +11090,8 @@
msgstr "Markiere nicht erreichbare Objekte..."
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s zeigt auf nichts!"
+msgid "reflog could not be found: '%s'"
+msgstr "Reflog konnte nicht gefunden werden: '%s'"
msgid "no reflog specified to delete"
msgstr "Kein Reflog zum Löschen angegeben."
@@ -11032,6 +11100,15 @@
msgid "invalid ref format: %s"
msgstr "Ungültiges Format für Referenzen: %s"
+msgid "drop the reflogs of all references"
+msgstr "die Reflogs aller Referenzen löschen"
+
+msgid "drop reflogs from the current worktree only"
+msgstr "nur Reflogs aus dem aktuellen Arbeitsverzeichnis löschen"
+
+msgid "references specified along with --all"
+msgstr "Referenzen, die zusammen mit --all angegeben werden"
+
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<Format> [--no-reflog] [--dry-run]"
@@ -11594,6 +11671,10 @@
msgid "with --cruft, expire objects older than this"
msgstr "mit --cruft, Objekte verfallen lassen, die älter sind als das"
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr ""
+"mit --cruft, nur Cruft-Pakete umpacken, die kleiner als dieser Wert sind"
+
msgid "remove redundant packs, and run git-prune-packed"
msgstr "redundante Pakete entfernen und \"git-prune-packed\" ausführen"
@@ -12077,6 +12158,9 @@
msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
msgstr "ungültiger Wert für '%s': '%s', das einzig zulässige Format ist '%s'"
+msgid "-z option used with unsupported option"
+msgstr "Die Option -z wird mit nicht unterstützter Option verwendet."
+
msgid "rev-list does not support display of notes"
msgstr "rev-list unterstützt keine Anzeige von Notizen"
@@ -13995,8 +14079,8 @@
msgid "git update-ref [<options>] <refname> <new-oid> [<old-oid>]"
msgstr "git update-ref [<Optionen>] <Referenzname> <neue-oid> [<alte-oid>]"
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<Optionen>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<Optionen>] --stdin [-z] [--batch-updates]"
msgid "delete the reference"
msgstr "diese Referenz löschen"
@@ -14010,6 +14094,9 @@
msgid "read updates from stdin"
msgstr "Aktualisierungen von der Standard-Eingabe lesen"
+msgid "batch reference updates"
+msgstr "Batch-Referenz-Updates"
+
msgid "update the info files from scratch"
msgstr "die Informationsdateien von Grund auf aktualisieren"
@@ -14724,6 +14811,9 @@
msgid "Compare a tree to the working tree or index"
msgstr "ein Verzeichnis von dem Arbeitsverzeichnis und dem Index vergleichen"
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Inhalt und Modus der bereitgestellten Blobpaare vergleichen"
+
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr ""
"den Inhalt und Modus von Blobs aus zwei Verzeichnisobjekten vergleichen"
@@ -15380,8 +15470,8 @@
"attempting to write a commit-graph, but 'commitGraph.changedPathsVersion' "
"(%d) is not supported"
msgstr ""
-"versuche, einen Commit-Graphen zu schreiben, aber 'commitGraph."
-"changedPathsVersion' (%d) wird nicht unterstützt"
+"versuche, einen Commit-Graphen zu schreiben, aber "
+"'commitGraph.changedPathsVersion' (%d) wird nicht unterstützt"
msgid "too many commits to write graph"
msgstr "zu viele Commits zum Schreiben des Graphen"
@@ -17682,6 +17772,10 @@
msgstr "Unbekannter Wert für http.proactiveauth"
#, c-format
+msgid "failed to parse %s"
+msgstr "Fehler beim Parsen von %s."
+
+#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
msgstr "Nicht unterstütztes SSL-Backend '%s'. Unterstützte SSL-Backends:"
@@ -17872,6 +17966,10 @@
msgstr "ungültige marker-size '%s', ganze Zahl erwartet"
#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Konnte Objekt '%s' nicht parsen."
+
+#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Fehler beim Merge von Submodul %s (nicht ausgecheckt)."
@@ -18124,276 +18222,6 @@
msgstr ""
"Sammeln von Merge-Informationen für die Referenzen %s, %s, %s fehlgeschlagen"
-msgid "(bad commit)\n"
-msgstr "(ungültiger Commit)\n"
-
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "add_cacheinfo für Pfad '%s' fehlgeschlagen; Merge wird abgebrochen."
-
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr ""
-"add_cacheinfo zur Aktualisierung für Pfad '%s' fehlgeschlagen;\n"
-"Merge wird abgebrochen."
-
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "Fehler beim Erstellen des Pfades '%s'%s"
-
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Entferne %s, um Platz für Unterverzeichnis zu schaffen\n"
-
-msgid ": perhaps a D/F conflict?"
-msgstr ": vielleicht ein Verzeichnis/Datei-Konflikt?"
-
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "verweigere, da unversionierte Dateien in '%s' verloren gehen würden"
-
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "Blob erwartet für %s '%s'"
-
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "Fehler beim Öffnen von '%s': %s"
-
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "Fehler beim Erstellen einer symbolischen Verknüpfung für '%s': %s"
-
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "weiß nicht was mit %06o %s '%s' zu machen ist"
-
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr ""
-"Submodul %s konnte nicht zusammengeführt werden (Repository beschädigt)"
-
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "Spule Submodul %s zu dem folgenden Commit vor:"
-
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "Spule Submodul %s vor"
-
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
-"Fehler beim Merge von Submodule %s (dem Merge nachfolgende Commits nicht "
-"gefunden)"
-
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "Fehler beim Merge von Submodul %s (kein Vorspulen)"
-
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "Mögliche Auflösung des Merges für Submodul gefunden:\n"
-
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Falls das korrekt ist, fügen Sie es einfach der Staging-Area, zum Beispiel "
-"mit:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"hinzu, um diesen Vorschlag zu akzeptieren.\n"
-
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "Fehler beim Merge von Submodul %s (mehrere Merges gefunden)"
-
-msgid "failed to execute internal merge"
-msgstr "Fehler bei Ausführung des internen Merges"
-
-#, c-format
-msgid "unable to add %s to database"
-msgstr "konnte %s nicht zur Datenbank hinzufügen"
-
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr ""
-"Fehler: Verweigere unversionierte Datei bei %s zu verlieren;\n"
-"schreibe stattdessen nach %s."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"KONFLIKT (%s/löschen): %s gelöscht in %s und %s in %s. Stand %s von %s wurde "
-"im Arbeitsbereich gelassen."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"KONFLIKT (%s/löschen): %s gelöscht in %s und %s nach %s in %s. Stand %s von "
-"%s wurde im Arbeitsbereich gelassen."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"KONFLIKT (%s/löschen): %s gelöscht in %s und %s in %s. Stand %s von %s wurde "
-"im Arbeitsbereich bei %s gelassen."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"KONFLIKT (%s/löschen): %s gelöscht in %s und %s nach %s in %s. Stand %s von "
-"%s wurde im Arbeitsbereich bei %s gelassen."
-
-msgid "rename"
-msgstr "umbenennen"
-
-msgid "renamed"
-msgstr "umbenannt"
-
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "Verweigere geänderte Datei bei %s zu verlieren."
-
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr ""
-"Verweigere unversionierte Datei bei %s zu verlieren, auch wenn diese im Weg "
-"ist."
-
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"KONFLIKT (umbenennen/hinzufügen): Benenne um %s->%s in %s. %s hinzugefügt in "
-"%s"
-
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s ist ein Verzeichnis in %s, füge es stattdessen als %s hinzu"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr ""
-"Verweigere unversionierte Datei bei %s zu verlieren; füge stattdessen %s "
-"hinzu"
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"KONFLIKT (umbenennen/umbenennen): Benenne um \"%s\"->\"%s\" in Branch \"%s\" "
-"und \"%s\"->\"%s\" in Branch \"%s\"%s"
-
-msgid " (left unresolved)"
-msgstr " (bleibt unaufgelöst)"
-
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"KONFLIKT (umbenennen/umbenennen): Benenne um %s->%s in %s. Benenne um %s->%s "
-"in %s"
-
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"KONFLIKT (Aufteilung Verzeichnisumbenennung): Unklar, wo %s zu platzieren "
-"ist,\n"
-"weil Verzeichnis %s zu mehreren anderen Verzeichnissen umbenannt wurde, "
-"wobei\n"
-"keines dieser Ziele die Mehrheit der Dateien erhielt."
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"KONFLIKT (umbenennen/umbenennen): Benenne Verzeichnis um %s->%s in %s.\n"
-"Benenne Verzeichnis um %s->%s in %s"
-
-#, c-format
-msgid "cannot read object %s"
-msgstr "kann Objekt %s nicht lesen"
-
-#, c-format
-msgid "object %s is not a blob"
-msgstr "Objekt %s ist kein Blob"
-
-msgid "modify"
-msgstr "ändern"
-
-msgid "modified"
-msgstr "geändert"
-
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "%s ausgelassen (Ergebnis des Merges existiert bereits)"
-
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Füge stattdessen als %s hinzu"
-
-#, c-format
-msgid "Removing %s"
-msgstr "Entferne %s"
-
-msgid "file/directory"
-msgstr "Datei/Verzeichnis"
-
-msgid "directory/file"
-msgstr "Verzeichnis/Datei"
-
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
-"KONFLIKT (%s): Es existiert bereits ein Verzeichnis %s in %s. Füge %s als %s "
-"hinzu."
-
-#, c-format
-msgid "Adding %s"
-msgstr "Füge %s hinzu"
-
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "KONFLIKT (hinzufügen/hinzufügen): Merge-Konflikt in %s"
-
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "Zusammenführen der \"Tree\"-Objekte %s und %s fehlgeschlagen"
-
-msgid "Merging:"
-msgstr "Merge:"
-
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "%u gemeinsamen Vorgänger-Commit gefunden"
-msgstr[1] "%u gemeinsame Vorgänger-Commits gefunden"
-
-msgid "merge returned no commit"
-msgstr "Merge hat keinen Commit zurückgegeben"
-
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "Konnte Objekt '%s' nicht parsen."
-
msgid "failed to read the cache"
msgstr "Lesen des Zwischenspeichers fehlgeschlagen"
@@ -18435,13 +18263,14 @@
msgid "failed to clear multi-pack-index at %s"
msgstr "Fehler beim Löschen des Multi-Pack-Index bei %s"
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "kann kein inkrementelles MIDX mit Bitmap schreiben"
-
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr ""
"ignoriere existierenden Multi-Pack-Index; Prüfsumme stimmt nicht überein"
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "konnte den umgekehrten Index für MIDX %s nicht laden"
+
msgid "Adding packfiles to multi-pack-index"
msgstr "Packdateien zum Multi-Pack-Index hinzufügen"
@@ -18704,69 +18533,6 @@
msgstr "Objekt konnte nicht von %s nach %s konvertiert werden"
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr ""
-"Objektverzeichnis %s existiert nicht; prüfe .git/objects/info/alternates"
-
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "Konnte alternativen Objektpfad '%s' nicht normalisieren."
-
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s: ignoriere alternative Objektspeicher - Verschachtelung zu tief"
-
-msgid "unable to fdopen alternates lockfile"
-msgstr "Konnte fdopen nicht auf Lock-Datei für \"alternates\" aufrufen."
-
-msgid "unable to read alternates file"
-msgstr "Konnte \"alternates\"-Datei nicht lesen."
-
-msgid "unable to move new alternates file into place"
-msgstr "Konnte neue \"alternates\"-Datei nicht übernehmen."
-
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "Pfad '%s' existiert nicht"
-
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr ""
-"Referenziertes Repository '%s' wird noch nicht als verknüpftes\n"
-"Arbeitsverzeichnis unterstützt."
-
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "Referenziertes Repository '%s' ist kein lokales Repository."
-
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr ""
-"Referenziertes Repository '%s' hat eine unvollständige Historie (shallow)."
-
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr ""
-"Referenziertes Repository '%s' ist mit künstlichen Vorgängern (\"grafts\") "
-"eingehängt."
-
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "konnte Objekt-Verzeichnis nicht finden, dass '%s' entsprechen soll"
-
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "Ungültige Zeile beim Parsen alternativer Referenzen: %s"
-
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "Versuche mmap %<PRIuMAX> über Limit %<PRIuMAX>."
-
-#, c-format
-msgid "mmap failed%s"
-msgstr "mmap fehlgeschlagen%s"
-
-#, c-format
msgid "object file %s is empty"
msgstr "Objektdatei %s ist leer."
@@ -18802,18 +18568,6 @@
msgstr "Loses Objekt %s (gespeichert in %s) ist beschädigt."
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "Ersetzung %s für %s nicht gefunden."
-
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "Gepacktes Objekt %s (gespeichert in %s) ist beschädigt."
-
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "fehlende Abbildung von %s auf %s"
-
-#, c-format
msgid "unable to open %s"
msgstr "kann %s nicht öffnen"
@@ -18908,10 +18662,6 @@
msgstr "%s: nicht unterstützte Dateiart"
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s ist kein gültiges '%s' Objekt"
-
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "Hash für %s stimmt nicht überein (%s erwartet)."
@@ -18928,6 +18678,10 @@
msgstr "Konnte Kopfbereich von %s nicht parsen."
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "Konnte den Typ aus der Kopfzeile '%s' von %s nicht parsen."
+
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "Konnte Inhalt von %s nicht entpacken."
@@ -19088,6 +18842,77 @@
msgstr "ungültiger Objektname '%.*s'."
#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr ""
+"Objektverzeichnis %s existiert nicht; prüfe .git/objects/info/alternates"
+
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "Konnte alternativen Objektpfad '%s' nicht normalisieren."
+
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s: ignoriere alternative Objektspeicher - Verschachtelung zu tief"
+
+msgid "unable to fdopen alternates lockfile"
+msgstr "Konnte fdopen nicht auf Lock-Datei für \"alternates\" aufrufen."
+
+msgid "unable to read alternates file"
+msgstr "Konnte \"alternates\"-Datei nicht lesen."
+
+msgid "unable to move new alternates file into place"
+msgstr "Konnte neue \"alternates\"-Datei nicht übernehmen."
+
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "Pfad '%s' existiert nicht"
+
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr ""
+"Referenziertes Repository '%s' wird noch nicht als verknüpftes\n"
+"Arbeitsverzeichnis unterstützt."
+
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "Referenziertes Repository '%s' ist kein lokales Repository."
+
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr ""
+"Referenziertes Repository '%s' hat eine unvollständige Historie (shallow)."
+
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr ""
+"Referenziertes Repository '%s' ist mit künstlichen Vorgängern (\"grafts\") "
+"eingehängt."
+
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "konnte Objekt-Verzeichnis nicht finden, dass '%s' entsprechen soll"
+
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "Ungültige Zeile beim Parsen alternativer Referenzen: %s"
+
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "Ersetzung %s für %s nicht gefunden."
+
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "Gepacktes Objekt %s (gespeichert in %s) ist beschädigt."
+
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "fehlende Abbildung von %s auf %s"
+
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s ist kein gültiges '%s' Objekt"
+
+#, c-format
msgid "invalid object type \"%s\""
msgstr "Ungültiger Objekttyp \"%s\""
@@ -19371,6 +19196,14 @@
msgstr "%s ist nicht verfügbar."
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "Wert %s für %s nicht im Bereich [%<PRIdMAX>,%<PRIdMAX>]"
+
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s erwartet einen ganzzahligen Wert mit einem optionalen k/m/g-Suffix"
+
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr ""
"%s erwartet einen nicht-negativen Integer-Wert mit einem optionalen k/m/g "
@@ -19532,10 +19365,6 @@
msgstr "falscher boolescher Wert von Umgebungsvariable '%s' für '%s'"
#, c-format
-msgid "failed to parse %s"
-msgstr "Fehler beim Parsen von %s."
-
-#, c-format
msgid "failed to walk children of tree %s: not found"
msgstr "Fehlen beim Durchlaufen der Kinder von Baum %s: nicht gefunden"
@@ -19701,7 +19530,11 @@
msgstr "konnte %s nicht von Promisor-Remote abrufen"
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "keine oder leere URL für Remote-Repository '%s' angegeben"
+
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
msgstr ""
"bekanntes Remote-Repository mit dem Namen '%s', aber mit der URL '%s' statt "
"'%s'"
@@ -20482,6 +20315,10 @@
msgstr "Überprüfung der Konsistenz der Referenzen"
#, c-format
+msgid "unable to open '%s'"
+msgstr "konnte '%s' nicht öffnen"
+
+#, c-format
msgid "refname is dangerous: %s"
msgstr "Referenzname ist gefährlich: %s"
@@ -20552,10 +20389,6 @@
"unterstützt"
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "ungültige Refspec '%s'"
-
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "Muster '%s' hat keinen '*'"
@@ -21108,8 +20941,8 @@
msgid "could not set recommended config"
msgstr "konnte die empfohlene Konfiguration nicht setzen"
-msgid "could not turn on maintenance"
-msgstr "konnte die Wartung nicht einschalten"
+msgid "could not toggle maintenance"
+msgstr "konnte die Wartung nicht umschalten"
msgid "could not start the FSMonitor daemon"
msgstr "konnte den FSMonitor-Daemon nicht starten"
@@ -21156,12 +20989,15 @@
msgid "specify if tags should be fetched during clone"
msgstr "Angabe, ob Tags während des Klonens abgerufen werden sollen"
+msgid "specify if background maintenance should be enabled"
+msgstr "angeben, ob die Hintergrundwartung aktiviert werden soll"
+
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <Haupt-Branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <URL> [<Eintragung>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <URL> [<Eintragung>]"
#, c-format
msgid "cannot deduce worktree name from '%s'"
@@ -21199,19 +21035,33 @@
msgid "`scalar list` does not take arguments"
msgstr "`scalar list` akzeptiert keine Argumente"
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<Eintragung>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<Eintragung>]"
msgid "reconfigure all registered enlistments"
msgstr "alle registrierten Eintragungen neu konfigurieren"
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <Eintragung>]"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+msgid "signal how to adjust background maintenance"
+msgstr "Angabe, wie die Hintergrundwartung einzustellen ist"
+
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<Eintragung>]"
msgid "--all or <enlistment>, but not both"
msgstr "--all oder <Eintragung>, aber nicht beides"
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "unbekannter Modus für die Option --maintenance: %s"
+
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "konnte veraltetes scalar.repo '%s' nicht entfernen"
@@ -22669,6 +22519,9 @@
"Anzahl der Einträge im Cache-Verzeichnis, die ungültig gemacht werden sollen "
"(Standardwert 0)"
+msgid "the number of objects to write"
+msgstr "die Anzahl der zu schreibenden Objekte"
+
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <Optionen> -- <Commit-Optionen>"
@@ -23460,6 +23313,14 @@
msgid "unable to get random bytes"
msgstr "konnte keine Zufallsbytes abrufen"
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "Versuche mmap %<PRIuMAX> über Limit %<PRIuMAX>."
+
+#, c-format
+msgid "mmap failed%s"
+msgstr "mmap fehlgeschlagen%s"
+
msgid "Unmerged paths:"
msgstr "Nicht zusammengeführte Pfade:"
@@ -24270,6 +24131,14 @@
"und benutzen Sie --smtp-debug."
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook hat die Message-ID neu zugewiesen: %s\n"
+
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr ""
+"Warnung: Message-ID konnte nicht aus der Serverantwort abgerufen werden.\n"
+
+#, perl-format
msgid "Failed to send %s\n"
msgstr "Fehler beim Senden %s\n"
diff --git a/po/fr.po b/po/fr.po
index 8e33390..7b5cc9b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -87,8 +87,8 @@
msgstr ""
"Project-Id-Version: git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-05 22:57+0000\n"
-"PO-Revision-Date: 2025-03-06 16:46+0100\n"
+"POT-Creation-Date: 2025-05-27 22:57+0000\n"
+"PO-Revision-Date: 2025-05-29 12:54+0200\n"
"Last-Translator: Cédric Malard <c.malard-git@valdun.net>\n"
"Language-Team: Jean-Noël Avila <jn.avila@free.fr>\n"
"Language: fr\n"
@@ -3405,11 +3405,8 @@
msgid "git cat-file <type> <object>"
msgstr "git cat-file <type> <objet>"
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <objet>"
-
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <objet>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <objet>"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3447,9 +3444,6 @@
msgid "show object size"
msgstr "afficher la taille de l'objet"
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "autoriser -s et -t à travailler sur des objets cassés/corrompus"
-
msgid "use mail map file"
msgstr "utiliser le fichier de correspondance de mail"
@@ -3508,6 +3502,13 @@
"utiliser un <chemin> spécifique pour (--textconv | --filters); pas pour les "
"lots"
+msgid "objects filter only supported in batch mode"
+msgstr "le filtre d'objets n'est pris en charge qu'en mode par lots"
+
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "filtre d'objets non pris en charge : '%s'"
+
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "'%s=<%s>' a besoin de '%s' ou '%s'"
@@ -5811,6 +5812,50 @@
msgid "specify the content of the diagnostic archive"
msgstr "spécifier le contenu de l'archive de diagnostique"
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "impossible d'analyser le mode : %s"
+
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "impossible d'analyser l'id de l'objet : %s"
+
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<options-de-diff>]"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "argument non reconnu : %s"
+
+msgid "working without -z is not supported"
+msgstr "l'invocation sans -z n'est pas supportée"
+
+msgid "pathspec arguments not supported"
+msgstr "les arguments de spécificateurs de chemin ne sont pas pris en charge"
+
+msgid "revision arguments not allowed"
+msgstr "les arguments de type révision ne sont pas pris en charge"
+
+msgid "invalid raw diff input"
+msgstr "entrée de diff brut invalide"
+
+msgid "tree objects not supported"
+msgstr "les objets arbres ne sont pas supportés"
+
+msgid "got EOF while reading path"
+msgstr "EOF rencontré lors de la lecture du chemin"
+
+msgid "got EOF while reading destination path"
+msgstr "EOF rencontré lors de la lecture du chemin destination"
+
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "impossible d'analyser le score de renommage/copie : %s"
+
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "statut de diff inconnu : %c"
+
msgid "--merge-base only works with two commits"
msgstr "--merge-base ne fonctionne qu'avec deux commits"
@@ -5952,6 +5997,9 @@
msgid "select handling of signed tags"
msgstr "sélectionner la gestion des étiquettes signées"
+msgid "select handling of signed commits"
+msgstr "sélectionner la gestion des commits signés"
+
msgid "select handling of tags that tag filtered objects"
msgstr ""
"sélectionner la gestion des étiquettes qui pointent sur des objets filtrés"
@@ -6605,10 +6653,6 @@
msgstr "%s : objet corrompu ou manquant : %s"
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s : l'objet a un type '%s' inconnu : %s"
-
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s : impossible d'analyser : %s"
@@ -6665,16 +6709,19 @@
msgid "invalid rev-index for pack '%s'"
msgstr "rev-index invalide pour le paquet '%s'"
+msgid "Checking ref database"
+msgstr "Vérification de la base de données des réferences"
+
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<objec>...]"
+" [--[no-]name-objects] [--[no-]references] [<objet>...]"
msgid "show unreachable objects"
msgstr "afficher les objets inaccessibles"
@@ -6713,6 +6760,9 @@
msgid "show verbose names for reachable objects"
msgstr "afficher les noms étendus pour les objets inaccessibles"
+msgid "check reference database consistency"
+msgstr "vérifier la cohérence de la base de données des références"
+
msgid "Checking objects"
msgstr "Vérification des objets"
@@ -7877,10 +7927,6 @@
"tracer l'évolution d'une plage <début>,<fin> ou d'une fonction <nom-de-"
"fonction> dans <fichier>"
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "argument non reconnu : %s"
-
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr ""
"-L<plage>:<fichier> ne peut pas être utilisé avec une spécificateur de chemin"
@@ -8550,6 +8596,9 @@
msgid "also show informational/conflict messages"
msgstr "afficher aussi les messages d'information/de conflit"
+msgid "suppress all output; only exit status wanted"
+msgstr "supprimer toutes les sorties ; seul le statut de sortie est rendu"
+
msgid "list filenames without modes/oids/stages"
msgstr "lister les noms de fichier sans modes/oids/indexation"
@@ -8961,8 +9010,11 @@
"pendant le repaquetage, collecter les fichiers paquet de plus petite taille "
"dans un lot plus grand que cette taille"
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<options>] <source>... <destination>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <source>... <répertoire-de-destination>"
#, c-format
msgid "Directory %s is in index and no submodule?"
@@ -9033,6 +9085,10 @@
msgstr "%s, source=%s, destination=%s"
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "Impossible de déplacer à la fois '%s' et son répertoire parent '%s'"
+
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "Renommage de %s en %s\n"
@@ -9975,6 +10031,10 @@
msgid "unable to access commit %s"
msgstr "impossible d'accéder le commit %s"
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "spécificateur de réference invalide : '%s'"
+
msgid "ignoring --verify-signatures for rebase"
msgstr "--verify-signatures est ignoré pour un rebasage"
@@ -10957,6 +11017,9 @@
msgid "git reflog exists <ref>"
msgstr "git reflog exists <référence>"
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <réf>...]"
+
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "horodatage invalide '%s' fourni à '--%s'"
@@ -11008,8 +11071,8 @@
msgstr "Marquage des objets inaccessibles..."
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s ne pointe nulle part !"
+msgid "reflog could not be found: '%s'"
+msgstr "impossible de trouver le journal de références : '%s'"
msgid "no reflog specified to delete"
msgstr "pas de journal de références à supprimer spécifié"
@@ -11018,6 +11081,15 @@
msgid "invalid ref format: %s"
msgstr "format de référence invalide : %s"
+msgid "drop the reflogs of all references"
+msgstr "abandonner les reflogs de toutes les références"
+
+msgid "drop reflogs from the current worktree only"
+msgstr "abandonner les reflogs de l'arbre-de-travail actuel uniquement"
+
+msgid "references specified along with --all"
+msgstr "références spécifiées en même temps que --all"
+
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
@@ -11581,7 +11653,10 @@
msgstr "date approximative"
msgid "with --cruft, expire objects older than this"
-msgstr "avec --cruft, faire expirer les objets plus vieux que celui-ci"
+msgstr "avec --cruft, faire expirer les objets plus vieux que ceci"
+
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "avec --cruft, ne réempaqueter que les objets plus petits que ceci"
msgid "remove redundant packs, and run git-prune-packed"
msgstr "supprimer les paquets redondants et lancer git-prune-packed"
@@ -12064,6 +12139,9 @@
msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
msgstr "valeur invalide pour '%s' : '%s', le seul format permis est '%s'"
+msgid "-z option used with unsupported option"
+msgstr "option -z utilisée avec une option non supportée"
+
msgid "rev-list does not support display of notes"
msgstr "rev-list ne supporte l'affichage des notes"
@@ -13970,8 +14048,8 @@
msgstr ""
"git update-ref [<options>] <nom-référence> <nouvel-oid> [<ancien-oid>]"
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<options>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<options>] --stdin [-z] [--batch-updates]"
msgid "delete the reference"
msgstr "supprimer la référence"
@@ -13985,6 +14063,9 @@
msgid "read updates from stdin"
msgstr "lire les mises à jour depuis l'entrée standard"
+msgid "batch reference updates"
+msgstr "traiter les mises à jour par lot"
+
msgid "update the info files from scratch"
msgstr "mettre à jour les fichiers d'information à partir de zéro"
@@ -14690,6 +14771,9 @@
msgid "Compare a tree to the working tree or index"
msgstr "Comparer un arbre avec l'arbre de travail ou l'index"
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Compare le contenu et le mode des paires de blobs fournies"
+
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr "Compare le contenu et le mode des blobs trouvés via deux objets arbre"
@@ -17679,6 +17763,10 @@
msgstr "valeur inconnue pour http.proactiveauth"
#, c-format
+msgid "failed to parse %s"
+msgstr "échec de l'analyse de %s"
+
+#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
msgstr "Dorsale SSL '%s' non supportée. Dorsales SSL supportées :"
@@ -17871,6 +17959,10 @@
msgstr "taille de marqueur invalide '%s', entier attendu"
#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Impossible d'analyser l'objet '%s'"
+
+#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Échec de la fusion du sous-module %s (non extrait)"
@@ -18119,264 +18211,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "échec de collecte l'information de fusion pour les arbres %s, %s, %s"
-msgid "(bad commit)\n"
-msgstr "(mauvais commit)\n"
-
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "échec de add_cacheinfo pour le chemin '%s' ; abandon de la fusion."
-
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr "échec de add_cacheinfo pour le chemin '%s' ; abandon de la fusion."
-
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "impossible de créer le chemin '%s' %s"
-
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Suppression de %s pour faire de la place pour le sous-répertoire\n"
-
-msgid ": perhaps a D/F conflict?"
-msgstr ": peut-être un conflit D/F ?"
-
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "refus de perdre le fichier non suivi '%s'"
-
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "blob attendu pour %s '%s'"
-
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "échec à l'ouverture de '%s' : %s"
-
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "échec à la création du lien symbolique '%s' : %s"
-
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "ne sait pas traiter %06o %s '%s'"
-
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "Échec de la fusion du sous-module %s (dépôt corrompu)"
-
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "Avance rapide du sous-module %s au commit suivant :"
-
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "Avance rapide du sous-module %s"
-
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
-"Échec de fusion du sous-module %s (fusion suivant les commits non trouvée)"
-
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "Échec de fusion du sous-module %s (pas en avance rapide)"
-
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "Résolution possible de fusion trouvée pour le sous-module :\n"
-
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Si c'est correct, ajoutez le simplement à l'index\n"
-"en utilisant par exemple :\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"qui acceptera cette suggestion.\n"
-
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "Échec de fusion du sous-module %s (plusieurs fusions trouvées)"
-
-msgid "failed to execute internal merge"
-msgstr "échec à l'exécution de la fusion interne"
-
-#, c-format
-msgid "unable to add %s to database"
-msgstr "impossible d'ajouter %s à la base de données"
-
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr ""
-"Erreur : refus de perdre le fichier non suivi %s ; écriture dans %s à la "
-"place."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version %s de "
-"%s laissée dans l'arbre."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"CONFLIT (%s/suppression) : %s supprimé dans %s et %s à %s dans %s. Version "
-"%s de %s laissée dans l'arbre."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version %s de "
-"%s laissée dans l'arbre dans le fichier %s."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"CONFLIT (%s/suppression) : %s supprimé dans %s et %s à %s dans %s. Version "
-"%s de %s laissée dans l'arbre dans le fichier %s."
-
-msgid "rename"
-msgstr "renommage"
-
-msgid "renamed"
-msgstr "renommé"
-
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "Refus de perdre le fichier modifié %s"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr "Refus de perdre le fichier non suivi %s, même s'il gêne."
-
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"CONFLIT (renommage/ajout) : Renommage de %s->%s dans %s. %s ajouté dans %s"
-
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s est un répertoire dans %s ajouté plutôt comme %s"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr "Refus de perdre le fichier non suivi %s ; ajout comme %s à la place"
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"CONFLIT (renommage/renommage) : Renommage de \"%s\"->\"%s\" dans la branche "
-"\"%s\" et renommage \"%s\"->\"%s\" dans \"%s\"%s"
-
-msgid " (left unresolved)"
-msgstr " (laissé non résolu)"
-
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"CONFLIT (renommage/renommage) : renommage '%s'->'%s' dans %s. Renommage '%s'-"
-">'%s' dans %s"
-
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"CONFLIT (renommage de répertoire coupé) : la place de %s n'est pas claire "
-"parce que le répertoire %s a été renommé en plusieurs autres répertoires, "
-"sans aucune destination récupérant la majorité des fichiers."
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"CONFLIT (renommage/renommage) : renommage du répertoire %s->%s dans %s. "
-"Renommage de répertoire %s->%s dans %s"
-
-#, c-format
-msgid "cannot read object %s"
-msgstr "impossible de lire l'objet %s"
-
-#, c-format
-msgid "object %s is not a blob"
-msgstr "l'objet %s n'est pas un blob"
-
-msgid "modify"
-msgstr "modification"
-
-msgid "modified"
-msgstr "modifié"
-
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "%s sauté (fusion identique à l'existant)"
-
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Ajout plutôt comme %s"
-
-#, c-format
-msgid "Removing %s"
-msgstr "Suppression de %s"
-
-msgid "file/directory"
-msgstr "fichier/répertoire"
-
-msgid "directory/file"
-msgstr "répertoire/fichier"
-
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
-"CONFLIT (%s) : Il y a un répertoire nommé %s dans %s. Ajout de %s comme %s"
-
-#, c-format
-msgid "Adding %s"
-msgstr "Ajout de %s"
-
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "CONFLIT (ajout/ajout) : Conflit de fusion dans %s"
-
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "échec de fusion des arbres %s et %s"
-
-msgid "Merging:"
-msgstr "Fusion :"
-
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "%u ancêtre commun trouvé :"
-msgstr[1] "%u ancêtres communs trouvés :"
-
-msgid "merge returned no commit"
-msgstr "la fusion n'a pas retourné de commit"
-
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "Impossible d'analyser l'objet '%s'"
-
msgid "failed to read the cache"
msgstr "impossible de lire le cache"
@@ -18418,13 +18252,14 @@
msgid "failed to clear multi-pack-index at %s"
msgstr "échec du nettoyage de l'index de multi-paquet à %s"
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "impossible d'écrire un MIDX incrémental avec des bitmap"
-
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr ""
"index multi-paquet existant ignoré ; non-concordance de la somme de contrôle"
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "impossible de charger l'index inversé pour le MIDX %s"
+
msgid "Adding packfiles to multi-pack-index"
msgstr "Ajout de fichiers paquet à un index multi-paquet"
@@ -18692,66 +18527,6 @@
msgstr "Échec de conversion de l'objet de %s vers %s"
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr ""
-"le répertoire objet %s n'existe pas ; vérifiez .git/objects/info/alternates"
-
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "impossible de normaliser le chemin d'objet alternatif : %s"
-
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s : magasins d'objets alternatifs ignorés, récursion trop profonde"
-
-msgid "unable to fdopen alternates lockfile"
-msgstr "impossible d'ouvrir (fdopen) le fichier verrou des alternatives"
-
-msgid "unable to read alternates file"
-msgstr "lecture du fichier d'alternatives impossible"
-
-msgid "unable to move new alternates file into place"
-msgstr "impossible de déplacer le nouveau fichier d'alternative"
-
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "le chemin '%s' n'existe pas"
-
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr ""
-"extraire le dépôt de référence '%s' comme une extraction liée n'est pas "
-"encore supporté."
-
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "le dépôt de référence '%s' n'est pas un dépôt local."
-
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "le dépôt de référence '%s' est superficiel"
-
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "le dépôt de référence '%s' est greffé"
-
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "impossible de trouver le répertoire objet correspondant à %s"
-
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "ligne invalide pendant l'analyse des refs alternatives : %s"
-
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "essai de mmap %<PRIuMAX> au delà de la limite %<PRIuMAX>"
-
-#, c-format
-msgid "mmap failed%s"
-msgstr "échec de mmap%s"
-
-#, c-format
msgid "object file %s is empty"
msgstr "le fichier objet %s est vide"
@@ -18787,18 +18562,6 @@
msgstr "l'objet libre %s (stocké dans %s) est corrompu"
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "remplacement %s non trouvé pour %s"
-
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "l'objet empaqueté %s (stocké dans %s) est corrompu"
-
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "correspondance manquante entre %s et %s"
-
-#, c-format
msgid "unable to open %s"
msgstr "impossible d'ouvrir %s"
@@ -18892,10 +18655,6 @@
msgstr "%s : type de fichier non supporté"
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s n'est pas un objet '%s' valide"
-
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "incohérence de hachage pour %s (%s attendu)"
@@ -18912,6 +18671,10 @@
msgstr "impossible d'analyser l'entête de %s"
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "impossible d'analyser le type depuis l'entête '%s' de '%s'"
+
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "impossible de dépaqueter le contenu de %s"
@@ -19072,6 +18835,74 @@
msgstr "nom d'objet invalide : '%.*s'."
#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr ""
+"le répertoire objet %s n'existe pas ; vérifiez .git/objects/info/alternates"
+
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "impossible de normaliser le chemin d'objet alternatif : %s"
+
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s : magasins d'objets alternatifs ignorés, récursion trop profonde"
+
+msgid "unable to fdopen alternates lockfile"
+msgstr "impossible d'ouvrir (fdopen) le fichier verrou des alternatives"
+
+msgid "unable to read alternates file"
+msgstr "lecture du fichier d'alternatives impossible"
+
+msgid "unable to move new alternates file into place"
+msgstr "impossible de déplacer le nouveau fichier d'alternative"
+
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "le chemin '%s' n'existe pas"
+
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr ""
+"extraire le dépôt de référence '%s' comme une extraction liée n'est pas "
+"encore supporté."
+
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "le dépôt de référence '%s' n'est pas un dépôt local."
+
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "le dépôt de référence '%s' est superficiel"
+
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "le dépôt de référence '%s' est greffé"
+
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "impossible de trouver le répertoire objet correspondant à %s"
+
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "ligne invalide pendant l'analyse des refs alternatives : %s"
+
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "remplacement %s non trouvé pour %s"
+
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "l'objet empaqueté %s (stocké dans %s) est corrompu"
+
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "correspondance manquante entre %s et %s"
+
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s n'est pas un objet '%s' valide"
+
+#, c-format
msgid "invalid object type \"%s\""
msgstr "type d'objet invalide \"%s\""
@@ -19356,8 +19187,17 @@
msgstr "%s n'est pas disponible"
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "valeur %s pour %s pas dans la plage [%<PRIdMAX>,%<PRIdMAX>]"
+
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s attend une valeur entière avec un suffixe k/m/g optionnel"
+
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
-msgstr "%s attend une valeur entière non négative avec une suffixe k/m/g"
+msgstr ""
+"%s attend une valeur entière non négative avec un suffixe k/m/g optionnel"
#, c-format
msgid "ambiguous option: %s (could be --%s%s or --%s%s)"
@@ -19515,10 +19355,6 @@
msgstr "valeur booléenne d'environnement invalide '%s' pour '%s'"
#, c-format
-msgid "failed to parse %s"
-msgstr "échec de l'analyse de %s"
-
-#, c-format
msgid "failed to walk children of tree %s: not found"
msgstr "échec de parcours des enfants de l'arbre %s : non trouvé"
@@ -19691,8 +19527,12 @@
msgstr "impossible de récupérer %s depuis le distant de prometteur"
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "distant connu nommé '%s' mais avec l'url '%s' au lieu de '%s'"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "URL manquante ou vide annoncée pour le distant '%s'"
+
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "distant connu nommé '%s' mais avec l'URL '%s' au lieu de '%s'"
#, c-format
msgid "unknown '%s' value for '%s' config option"
@@ -20466,6 +20306,10 @@
msgstr "Vérification de la cohérence des références"
#, c-format
+msgid "unable to open '%s'"
+msgstr "impossible d'ouvrir '%s'"
+
+#, c-format
msgid "refname is dangerous: %s"
msgstr "le nom de réference est dangereux : %s"
@@ -20539,10 +20383,6 @@
"le nom de réf %s est une réf symbolique, la copie n'est pas prise en charge"
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "spécificateur de réference invalide : '%s'"
-
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "la valeur '%s' du motif n'a pas de '*'"
@@ -21097,7 +20937,7 @@
msgid "could not set recommended config"
msgstr "impossible de réglér la configuration recommandée"
-msgid "could not turn on maintenance"
+msgid "could not toggle maintenance"
msgstr "impossible d'activer la maintenance"
msgid "could not start the FSMonitor daemon"
@@ -21146,13 +20986,16 @@
msgstr ""
"spécifier si les étiquettes devraient être récupérées pendant le clonage"
+msgid "specify if background maintenance should be enabled"
+msgstr "spécifier si la maintenance en tâche de fond doit être activée"
+
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <branche-principale>] [--full-"
"clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enrôlement>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enrôlement>]"
#, c-format
msgid "cannot deduce worktree name from '%s'"
@@ -21190,19 +21033,33 @@
msgid "`scalar list` does not take arguments"
msgstr "`scalar list` n'accepte pas d'argument"
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<enrôlement>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<enrôlement>]"
msgid "reconfigure all registered enlistments"
msgstr "reconfigurer tous les enrôlements enregistrés"
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scala reconfigure [--all|<enrôlement>]"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+msgid "signal how to adjust background maintenance"
+msgstr "signaler comment ajuster la maintenance en tâche de fond"
+
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enrôlement>]"
msgid "--all or <enlistment>, but not both"
msgstr "--all ou <enrôlement>, mais pas les deux"
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "mode inconnu pour l'option --maintenance : %s"
+
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "impossible de supprimé le scalar.repo obsolète '%s'"
@@ -22652,6 +22509,9 @@
msgid "number of entries in the cache tree to invalidate (default 0)"
msgstr "nombre d'entrées dans l'arbre de cache à invalider (par défaut, 0)"
+msgid "the number of objects to write"
+msgstr "le nombre d'objets à écrire"
+
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <options> -- <options-de-révision>"
@@ -23445,6 +23305,14 @@
msgid "unable to get random bytes"
msgstr "impossible d'acquérir des octets aléatoires"
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "essai de mmap %<PRIuMAX> au delà de la limite %<PRIuMAX>"
+
+#, c-format
+msgid "mmap failed%s"
+msgstr "échec de mmap%s"
+
msgid "Unmerged paths:"
msgstr "Chemins non fusionnés :"
@@ -24203,6 +24071,15 @@
"debug."
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook a réassigné le Message-ID à : %s\n"
+
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr ""
+"Avertissement : Impossible de récupérer le Message-ID dans la réponse du "
+"serveur.\n"
+
+#, perl-format
msgid "Failed to send %s\n"
msgstr "Échec de l'envoi de %s\n"
@@ -24299,6 +24176,278 @@
msgid "Do you really want to send %s? [y|N]: "
msgstr "Souhaitez-vous réellement envoyer %s ?[y|N] : "
+#~ msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
+#~ msgstr "git cat-file (-t | -s) [--allow-unknown-type] <objet>"
+
+#~ msgid "allow -s and -t to work with broken/corrupt objects"
+#~ msgstr "autoriser -s et -t à travailler sur des objets cassés/corrompus"
+
+#, c-format
+#~ msgid "%s: object is of unknown type '%s': %s"
+#~ msgstr "%s : l'objet a un type '%s' inconnu : %s"
+
+#, c-format
+#~ msgid "%s points nowhere!"
+#~ msgstr "%s ne pointe nulle part !"
+
+#~ msgid "(bad commit)\n"
+#~ msgstr "(mauvais commit)\n"
+
+#, c-format
+#~ msgid "add_cacheinfo failed for path '%s'; merge aborting."
+#~ msgstr "échec de add_cacheinfo pour le chemin '%s' ; abandon de la fusion."
+
+#, c-format
+#~ msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
+#~ msgstr "échec de add_cacheinfo pour le chemin '%s' ; abandon de la fusion."
+
+#, c-format
+#~ msgid "failed to create path '%s'%s"
+#~ msgstr "impossible de créer le chemin '%s' %s"
+
+#, c-format
+#~ msgid "Removing %s to make room for subdirectory\n"
+#~ msgstr "Suppression de %s pour faire de la place pour le sous-répertoire\n"
+
+#~ msgid ": perhaps a D/F conflict?"
+#~ msgstr ": peut-être un conflit D/F ?"
+
+#, c-format
+#~ msgid "refusing to lose untracked file at '%s'"
+#~ msgstr "refus de perdre le fichier non suivi '%s'"
+
+#, c-format
+#~ msgid "blob expected for %s '%s'"
+#~ msgstr "blob attendu pour %s '%s'"
+
+#, c-format
+#~ msgid "failed to open '%s': %s"
+#~ msgstr "échec à l'ouverture de '%s' : %s"
+
+#, c-format
+#~ msgid "failed to symlink '%s': %s"
+#~ msgstr "échec à la création du lien symbolique '%s' : %s"
+
+#, c-format
+#~ msgid "do not know what to do with %06o %s '%s'"
+#~ msgstr "ne sait pas traiter %06o %s '%s'"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (repository corrupt)"
+#~ msgstr "Échec de la fusion du sous-module %s (dépôt corrompu)"
+
+#, c-format
+#~ msgid "Fast-forwarding submodule %s to the following commit:"
+#~ msgstr "Avance rapide du sous-module %s au commit suivant :"
+
+#, c-format
+#~ msgid "Fast-forwarding submodule %s"
+#~ msgstr "Avance rapide du sous-module %s"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (merge following commits not found)"
+#~ msgstr ""
+#~ "Échec de fusion du sous-module %s (fusion suivant les commits non trouvée)"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (not fast-forward)"
+#~ msgstr "Échec de fusion du sous-module %s (pas en avance rapide)"
+
+#~ msgid "Found a possible merge resolution for the submodule:\n"
+#~ msgstr "Résolution possible de fusion trouvée pour le sous-module :\n"
+
+#, c-format
+#~ msgid ""
+#~ "If this is correct simply add it to the index for example\n"
+#~ "by using:\n"
+#~ "\n"
+#~ " git update-index --cacheinfo 160000 %s \"%s\"\n"
+#~ "\n"
+#~ "which will accept this suggestion.\n"
+#~ msgstr ""
+#~ "Si c'est correct, ajoutez le simplement à l'index\n"
+#~ "en utilisant par exemple :\n"
+#~ "\n"
+#~ " git update-index --cacheinfo 160000 %s \"%s\"\n"
+#~ "\n"
+#~ "qui acceptera cette suggestion.\n"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (multiple merges found)"
+#~ msgstr "Échec de fusion du sous-module %s (plusieurs fusions trouvées)"
+
+#~ msgid "failed to execute internal merge"
+#~ msgstr "échec à l'exécution de la fusion interne"
+
+#, c-format
+#~ msgid "unable to add %s to database"
+#~ msgstr "impossible d'ajouter %s à la base de données"
+
+#, c-format
+#~ msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
+#~ msgstr ""
+#~ "Erreur : refus de perdre le fichier non suivi %s ; écriture dans %s à la "
+#~ "place."
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s "
+#~ "left in tree."
+#~ msgstr ""
+#~ "CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version %s "
+#~ "de %s laissée dans l'arbre."
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of "
+#~ "%s left in tree."
+#~ msgstr ""
+#~ "CONFLIT (%s/suppression) : %s supprimé dans %s et %s à %s dans %s. "
+#~ "Version %s de %s laissée dans l'arbre."
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s "
+#~ "left in tree at %s."
+#~ msgstr ""
+#~ "CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version %s "
+#~ "de %s laissée dans l'arbre dans le fichier %s."
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of "
+#~ "%s left in tree at %s."
+#~ msgstr ""
+#~ "CONFLIT (%s/suppression) : %s supprimé dans %s et %s à %s dans %s. "
+#~ "Version %s de %s laissée dans l'arbre dans le fichier %s."
+
+#~ msgid "rename"
+#~ msgstr "renommage"
+
+#~ msgid "renamed"
+#~ msgstr "renommé"
+
+#, c-format
+#~ msgid "Refusing to lose dirty file at %s"
+#~ msgstr "Refus de perdre le fichier modifié %s"
+
+#, c-format
+#~ msgid "Refusing to lose untracked file at %s, even though it's in the way."
+#~ msgstr "Refus de perdre le fichier non suivi %s, même s'il gêne."
+
+#, c-format
+#~ msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
+#~ msgstr ""
+#~ "CONFLIT (renommage/ajout) : Renommage de %s->%s dans %s. %s ajouté dans %s"
+
+#, c-format
+#~ msgid "%s is a directory in %s adding as %s instead"
+#~ msgstr "%s est un répertoire dans %s ajouté plutôt comme %s"
+
+#, c-format
+#~ msgid "Refusing to lose untracked file at %s; adding as %s instead"
+#~ msgstr "Refus de perdre le fichier non suivi %s ; ajout comme %s à la place"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
+#~ "\"%s\"->\"%s\" in \"%s\"%s"
+#~ msgstr ""
+#~ "CONFLIT (renommage/renommage) : Renommage de \"%s\"->\"%s\" dans la "
+#~ "branche \"%s\" et renommage \"%s\"->\"%s\" dans \"%s\"%s"
+
+#~ msgid " (left unresolved)"
+#~ msgstr " (laissé non résolu)"
+
+#, c-format
+#~ msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
+#~ msgstr ""
+#~ "CONFLIT (renommage/renommage) : renommage '%s'->'%s' dans %s. Renommage "
+#~ "'%s'->'%s' dans %s"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (directory rename split): Unclear where to place %s because "
+#~ "directory %s was renamed to multiple other directories, with no "
+#~ "destination getting a majority of the files."
+#~ msgstr ""
+#~ "CONFLIT (renommage de répertoire coupé) : la place de %s n'est pas claire "
+#~ "parce que le répertoire %s a été renommé en plusieurs autres répertoires, "
+#~ "sans aucune destination récupérant la majorité des fichiers."
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory "
+#~ "%s->%s in %s"
+#~ msgstr ""
+#~ "CONFLIT (renommage/renommage) : renommage du répertoire %s->%s dans %s. "
+#~ "Renommage de répertoire %s->%s dans %s"
+
+#, c-format
+#~ msgid "cannot read object %s"
+#~ msgstr "impossible de lire l'objet %s"
+
+#, c-format
+#~ msgid "object %s is not a blob"
+#~ msgstr "l'objet %s n'est pas un blob"
+
+#~ msgid "modify"
+#~ msgstr "modification"
+
+#~ msgid "modified"
+#~ msgstr "modifié"
+
+#, c-format
+#~ msgid "Skipped %s (merged same as existing)"
+#~ msgstr "%s sauté (fusion identique à l'existant)"
+
+#, c-format
+#~ msgid "Adding as %s instead"
+#~ msgstr "Ajout plutôt comme %s"
+
+#, c-format
+#~ msgid "Removing %s"
+#~ msgstr "Suppression de %s"
+
+#~ msgid "file/directory"
+#~ msgstr "fichier/répertoire"
+
+#~ msgid "directory/file"
+#~ msgstr "répertoire/fichier"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
+#~ msgstr ""
+#~ "CONFLIT (%s) : Il y a un répertoire nommé %s dans %s. Ajout de %s comme %s"
+
+#, c-format
+#~ msgid "Adding %s"
+#~ msgstr "Ajout de %s"
+
+#, c-format
+#~ msgid "CONFLICT (add/add): Merge conflict in %s"
+#~ msgstr "CONFLIT (ajout/ajout) : Conflit de fusion dans %s"
+
+#, c-format
+#~ msgid "merging of trees %s and %s failed"
+#~ msgstr "échec de fusion des arbres %s et %s"
+
+#~ msgid "Merging:"
+#~ msgstr "Fusion :"
+
+#, c-format
+#~ msgid "found %u common ancestor:"
+#~ msgid_plural "found %u common ancestors:"
+#~ msgstr[0] "%u ancêtre commun trouvé :"
+#~ msgstr[1] "%u ancêtres communs trouvés :"
+
+#~ msgid "merge returned no commit"
+#~ msgstr "la fusion n'a pas retourné de commit"
+
+#~ msgid "cannot write incremental MIDX with bitmap"
+#~ msgstr "impossible d'écrire un MIDX incrémental avec des bitmap"
+
#, c-format
#~ msgid "Could not find remote branch %s to clone."
#~ msgstr "Impossible de trouver la branche distante '%s' à cloner."
@@ -24307,9 +24456,6 @@
#~ msgid "merging cannot continue; got unclean result of %d"
#~ msgstr "la fusion ne peut pas continuer ; résultat non propre retourné %d"
-#~ msgid "git repack [<options>]"
-#~ msgstr "git repack [<options>]"
-
#~ msgid "--onto and --advance are incompatible"
#~ msgstr "--onto et --advance sont incompatibles"
diff --git a/po/ga.po b/po/ga.po
new file mode 100644
index 0000000..c03f637
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,29758 @@
+# Irish translations for Git package.
+# Copyright (C) 2025 THE Git'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the Git package.
+# Automatically generated, 2025.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2025-05-29 09:16+0100\n"
+"PO-Revision-Date: 2025-05-29 10:10+0100\n"
+"Last-Translator: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>\n"
+"Language-Team: none\n"
+"Language: ga\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
+"X-Generator: Poedit 3.4.4\n"
+
+#: add-interactive.c
+#, c-format
+msgid "Huh (%s)?"
+msgstr "Huh (%s)?"
+
+#: add-interactive.c builtin/merge.c builtin/rebase.c reset.c sequencer.c
+msgid "could not read index"
+msgstr "ní raibh in ann innéacs a léamh"
+
+#: add-interactive.c
+msgid "binary"
+msgstr "dénártha"
+
+#: add-interactive.c
+msgid "nothing"
+msgstr "rud ar bith"
+
+#: add-interactive.c
+msgid "unchanged"
+msgstr "gan athrú"
+
+#: add-interactive.c
+msgid "Update"
+msgstr "Nuashonraigh"
+
+#: add-interactive.c
+#, c-format
+msgid "could not stage '%s'"
+msgstr "ní fhéadfaí '%s' a chéim"
+
+#: add-interactive.c builtin/stash.c reset.c sequencer.c
+msgid "could not write index"
+msgstr "ní fhéadfadh innéacs a scríobh"
+
+#: add-interactive.c
+#, c-format
+msgid "updated %d path\n"
+msgid_plural "updated %d paths\n"
+msgstr[0] "nuashonraithe %d cosán\n"
+msgstr[1] "nuashonraíodh %d cosán\n"
+msgstr[2] "nuashonraíodh %d cosán\n"
+
+#: add-interactive.c
+#, c-format
+msgid "note: %s is untracked now.\n"
+msgstr "nótaí: Tá %s dírianaithe anois.\n"
+
+#: add-interactive.c apply.c builtin/checkout.c builtin/reset.c
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr "theip ar make_cache_entry le haghaidh cosán '%s'"
+
+#: add-interactive.c
+msgid "Revert"
+msgstr "Aisghabháil"
+
+#: add-interactive.c
+msgid "Could not parse HEAD^{tree}"
+msgstr "Ní raibh sé in ann HEAD ^ {tree} a pharsáil"
+
+#: add-interactive.c
+#, c-format
+msgid "reverted %d path\n"
+msgid_plural "reverted %d paths\n"
+msgstr[0] "cosán %d aisiompaithe\n"
+msgstr[1] "%d cosán aisiompaithe\n"
+msgstr[2] "%d cosán aisiompaithe\n"
+
+#: add-interactive.c
+#, c-format
+msgid "No untracked files.\n"
+msgstr "Gan aon chomhaid neamhrianaithe.\n"
+
+#: add-interactive.c
+msgid "Add untracked"
+msgstr "Cuir neamh-rianaithe leis"
+
+#: add-interactive.c
+#, c-format
+msgid "added %d path\n"
+msgid_plural "added %d paths\n"
+msgstr[0] "cuireadh %d cosán leis\n"
+msgstr[1] "%d cosán curtha leis\n"
+msgstr[2] "%d cosán curtha leis\n"
+
+#: add-interactive.c
+#, c-format
+msgid "ignoring unmerged: %s"
+msgstr "ag neamhaird a dhéanamh de neamhchumasctha: %s"
+
+#: add-interactive.c
+#, c-format
+msgid "Only binary files changed.\n"
+msgstr "Níor athraigh ach comhaid dénártha.\n"
+
+#: add-interactive.c
+#, c-format
+msgid "No changes.\n"
+msgstr "Gan aon athruithe.\n"
+
+#: add-interactive.c
+msgid "Patch update"
+msgstr "Nuashonrú paiste"
+
+#: add-interactive.c
+msgid "Review diff"
+msgstr "Athbhreithniú diff"
+
+#: add-interactive.c
+msgid "show paths with changes"
+msgstr "taispeáin cosáin le hathruithe"
+
+#: add-interactive.c
+msgid "add working tree state to the staged set of changes"
+msgstr "cuir stát crann oibre leis an tsraith athruithe céimeádta"
+
+#: add-interactive.c
+msgid "revert staged set of changes back to the HEAD version"
+msgstr "tacar athruithe céime a chur ar ais chuig an leagan HEAD"
+
+#: add-interactive.c
+msgid "pick hunks and update selectively"
+msgstr "roghnaigh hunks agus nuashonraigh go roghnach"
+
+#: add-interactive.c
+msgid "view diff between HEAD and index"
+msgstr "féach ar an difríocht idir HEAD agus innéacs"
+
+#: add-interactive.c
+msgid "add contents of untracked files to the staged set of changes"
+msgstr "cuir ábhar comhaid neamhrianaithe leis an tacar athruithe céimeádta"
+
+#: add-interactive.c
+msgid "Prompt help:"
+msgstr "Cabhair pras:"
+
+#: add-interactive.c
+msgid "select a single item"
+msgstr "roghnaigh mír amháin"
+
+#: add-interactive.c
+msgid "select a range of items"
+msgstr "roghnaigh raon earraí"
+
+#: add-interactive.c
+msgid "select multiple ranges"
+msgstr "roghnaigh raonta iomadúla"
+
+#: add-interactive.c
+msgid "select item based on unique prefix"
+msgstr "roghnaigh mír bunaithe ar réimír uathúil"
+
+#: add-interactive.c
+msgid "unselect specified items"
+msgstr "míreanna sonraithe díroghnaigh"
+
+#: add-interactive.c
+msgid "choose all items"
+msgstr "roghnaigh gach earra"
+
+#: add-interactive.c
+msgid "(empty) finish selecting"
+msgstr "(folamh) críochnaigh a roghnú"
+
+#: add-interactive.c
+msgid "select a numbered item"
+msgstr "roghnaigh mír uimhrithe"
+
+#: add-interactive.c
+msgid "(empty) select nothing"
+msgstr "(folamh) roghnaigh aon rud"
+
+#: add-interactive.c builtin/clean.c
+msgid "*** Commands ***"
+msgstr "*** Orduithe ***"
+
+#: add-interactive.c builtin/clean.c
+msgid "What now"
+msgstr "Cad anois"
+
+#: add-interactive.c
+msgid "staged"
+msgstr "stáitse"
+
+#: add-interactive.c
+msgid "unstaged"
+msgstr "gan stáitse"
+
+#: add-interactive.c apply.c builtin/am.c builtin/bugreport.c builtin/clone.c
+#: builtin/diagnose.c builtin/fetch.c builtin/hook.c builtin/merge.c
+#: builtin/pull.c builtin/submodule--helper.c
+msgid "path"
+msgstr "cosán"
+
+#: add-interactive.c
+msgid "could not refresh index"
+msgstr "ní fhéadfadh innéacs a athnuachan"
+
+#: add-interactive.c builtin/clean.c
+#, c-format
+msgid "Bye.\n"
+msgstr "Slán..\n"
+
+#: add-patch.c
+#, c-format
+msgid "Stage mode change [y,n,q,a,d%s,?]? "
+msgstr "Athrú modh stáitse [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stage deletion [y,n,q,a,d%s,?]? "
+msgstr "Scriosadh céime [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stage addition [y,n,q,a,d%s,?]? "
+msgstr "Breiseán céime [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stage this hunk [y,n,q,a,d%s,?]? "
+msgstr "Cuir an píosa seo ar stáitse [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"If the patch applies cleanly, the edited hunk will immediately be marked for "
+"staging."
+msgstr ""
+"Má chuireann an paiste i bhfeidhm go glan, déanfar an hunk eagarthóireachta "
+"a mharcáil láithreach le haghaidh stáitsithe."
+
+#: add-patch.c
+msgid ""
+"y - stage this hunk\n"
+"n - do not stage this hunk\n"
+"q - quit; do not stage this hunk or any of the remaining ones\n"
+"a - stage this hunk and all later hunks in the file\n"
+"d - do not stage this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - céim an hunk seo\n"
+"n - ná déan an hunk seo a chéile\n"
+"q - scor; ná déan an hunk seo ná aon cheann de na cinn atá fágtha a chéile\n"
+"a - céim an hunk seo agus gach hunc ina dhiaidh sin sa chomhad\n"
+"d - ná déan an hunk seo ná aon cheann de na hunks níos déanaí sa chomhad a "
+"chéile\n"
+
+#: add-patch.c
+#, c-format
+msgid "Stash mode change [y,n,q,a,d%s,?]? "
+msgstr "Athrú modh stash [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stash deletion [y,n,q,a,d%s,?]? "
+msgstr "Scriosadh staise [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stash addition [y,n,q,a,d%s,?]? "
+msgstr "Breiseán stash [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Stash this hunk [y,n,q,a,d%s,?]? "
+msgstr "An bhfuil an carachtar seo [y,n,q,a,d%s,?] i bhfolach? "
+
+#: add-patch.c
+msgid ""
+"If the patch applies cleanly, the edited hunk will immediately be marked for "
+"stashing."
+msgstr ""
+"Má chuireann an paiste i bhfeidhm go glan, déanfar an hunk eagarthóireachta "
+"a mharcáil láithreach le haghaidh stórála."
+
+#: add-patch.c
+msgid ""
+"y - stash this hunk\n"
+"n - do not stash this hunk\n"
+"q - quit; do not stash this hunk or any of the remaining ones\n"
+"a - stash this hunk and all later hunks in the file\n"
+"d - do not stash this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - stash an hunk seo\n"
+"n - ná déan an hunk seo a stóráil\n"
+"q - scor; ná déan an hunk seo ná aon cheann de na cinn atá fágtha a stóráil\n"
+"a - stóráil an hunk seo agus gach hunk ina dhiaidh sin sa chomhad\n"
+"d - ná déan an hunk seo ná aon cheann de na hunks níos déanaí sa chomhad a "
+"stóráil\n"
+
+#: add-patch.c
+#, c-format
+msgid "Unstage mode change [y,n,q,a,d%s,?]? "
+msgstr "Athrú ar mhodh gan stáitse [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Unstage deletion [y,n,q,a,d%s,?]? "
+msgstr "Scriosadh gan stáitse [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Unstage addition [y,n,q,a,d%s,?]? "
+msgstr "Breiseán gan stáitse [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Unstage this hunk [y,n,q,a,d%s,?]? "
+msgstr "Dí-stáitseáil an píosa beag seo den stáitse [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"If the patch applies cleanly, the edited hunk will immediately be marked for "
+"unstaging."
+msgstr ""
+"Má chuireann an paiste i bhfeidhm go glan, déanfar an hunk eagarthóireachta "
+"a mharcáil láithreach le haghaidh dístáisithe."
+
+#: add-patch.c
+msgid ""
+"y - unstage this hunk\n"
+"n - do not unstage this hunk\n"
+"q - quit; do not unstage this hunk or any of the remaining ones\n"
+"a - unstage this hunk and all later hunks in the file\n"
+"d - do not unstage this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - déan an hunk seo a dhíchur\n"
+"n - ná déan an hunk seo a dhíchur\n"
+"q - scor; ná déan an hunk seo nó aon cheann de na cinn atá fágtha a dhíchur\n"
+"a - déan an hunk seo a dhíchur agus gach hunk ina dhiaidh sin sa chomhad\n"
+"d - ná déan an hunk seo nó aon cheann de na huncanna níos déanaí sa chomhad "
+"a dhíchur\n"
+
+#: add-patch.c
+#, c-format
+msgid "Apply mode change to index [y,n,q,a,d%s,?]? "
+msgstr "Cuir athrú mód i bhfeidhm ar innéacs [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply deletion to index [y,n,q,a,d%s,?]? "
+msgstr "Cuir scriosadh i bhfeidhm ar innéacs [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply addition to index [y,n,q,a,d%s,?]? "
+msgstr "Cuir an breiseán i bhfeidhm ar innéacs [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply this hunk to index [y,n,q,a,d%s,?]? "
+msgstr "Cuir an píosa seo i bhfeidhm ar innéacs [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"If the patch applies cleanly, the edited hunk will immediately be marked for "
+"applying."
+msgstr ""
+"Má chuireann an paiste i bhfeidhm go glan, déanfar an hunk eagarthóireachta "
+"a mharcáil láithreach le haghaidh iarratas a dhéanamh."
+
+#: add-patch.c
+msgid ""
+"y - apply this hunk to index\n"
+"n - do not apply this hunk to index\n"
+"q - quit; do not apply this hunk or any of the remaining ones\n"
+"a - apply this hunk and all later hunks in the file\n"
+"d - do not apply this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - cuir an hunk seo i bhfeidhm ar innéacs\n"
+"n - ná cuir an hunk seo i bhfeidhm ar innéacs\n"
+"q - scor; ná cuir an hunk seo ná aon cheann de na cinn atá fágtha i "
+"bhfeidhm\n"
+"a - cuir an hunk seo agus gach hunk níos déanaí i bhfeidhm sa chomhad\n"
+"d - ná cuir an hunk seo ná aon cheann de na hunks níos déanaí sa chomhad i "
+"bhfeidhm\n"
+
+#: add-patch.c
+#, c-format
+msgid "Discard mode change from worktree [y,n,q,a,d%s,?]? "
+msgstr "Athrú modh a dhiúscairt ó chrann oibre [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard deletion from worktree [y,n,q,a,d%s,?]? "
+msgstr "An scriosadh ón gcrann oibre [y,n,q,a,d%s,?] a sheachaint? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard addition from worktree [y,n,q,a,d%s,?]? "
+msgstr "Scrios an breiseán ón gcrann oibre [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard this hunk from worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"An bhfuil an píosa beag seo le fáil réidh ón gcrann oibre [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"If the patch applies cleanly, the edited hunk will immediately be marked for "
+"discarding."
+msgstr ""
+"Má chuireann an paiste i bhfeidhm go glan, déanfar an hunk eagarthóireachta "
+"a mharcáil láithreach lena dhiúscairt."
+
+#: add-patch.c
+msgid ""
+"y - discard this hunk from worktree\n"
+"n - do not discard this hunk from worktree\n"
+"q - quit; do not discard this hunk or any of the remaining ones\n"
+"a - discard this hunk and all later hunks in the file\n"
+"d - do not discard this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - caitheamh an bonc seo ón gcrann oibre\n"
+"n - ná caitheamh an hunk seo ón gcrann oibre\n"
+"q - scor; ná caith an hunk seo ná aon cheann de na cinn atá fágtha\n"
+"a - caith an hunk seo agus gach hunc ina dhiaidh sin sa chomhad\n"
+"d - ná caith an hunk seo ná aon cheann de na huncanna níos déanaí sa "
+"chomhad\n"
+
+#: add-patch.c
+#, c-format
+msgid "Discard mode change from index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"Athrú modh a dhiúscairt ó innéacs agus crann oibre [y, n, q, a, d %s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard deletion from index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"An scriosadh ón innéacs agus ón gcrann oibre [y,n,q,a,d%s,?] a dhíbirt? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard addition from index and worktree [y,n,q,a,d%s,?]? "
+msgstr "Caitheamh breisiú ó innéacs agus crann oibre [y, n, q, a, d %s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Discard this hunk from index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"An bhfuil an píosa beag seo le fáil réidh ón innéacs agus ón gcrann oibre "
+"[y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"y - discard this hunk from index and worktree\n"
+"n - do not discard this hunk from index and worktree\n"
+"q - quit; do not discard this hunk or any of the remaining ones\n"
+"a - discard this hunk and all later hunks in the file\n"
+"d - do not discard this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - caitheamh an hunk seo ón innéacs agus ón gcrann oibre\n"
+"n - ná caith an hunk seo ón innéacs agus ón gcrann oibre\n"
+"q - scor; ná caith an hunk seo ná aon cheann de na cinn atá fágtha\n"
+"a - caith an hunk seo agus gach hunc ina dhiaidh sin sa chomhad\n"
+"d - ná caith an hunk seo ná aon cheann de na huncanna níos déanaí sa "
+"chomhad\n"
+
+#: add-patch.c
+#, c-format
+msgid "Apply mode change to index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"Cuir athrú mód i bhfeidhm ar an innéacs agus ar an gcrann oibre "
+"[y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply deletion to index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"Cuir scriosadh i bhfeidhm ar innéacs agus crann oibre [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply addition to index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"Cuir an breiseán i bhfeidhm ar an innéacs agus ar an gcrann oibre "
+"[y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply this hunk to index and worktree [y,n,q,a,d%s,?]? "
+msgstr ""
+"Cuir an píosa seo i bhfeidhm ar an innéacs agus ar an gcrann oibre "
+"[y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"y - apply this hunk to index and worktree\n"
+"n - do not apply this hunk to index and worktree\n"
+"q - quit; do not apply this hunk or any of the remaining ones\n"
+"a - apply this hunk and all later hunks in the file\n"
+"d - do not apply this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - cuir an hunk seo i bhfeidhm ar innéacs agus ar chrann oibre\n"
+"n - ná cuir an hunk seo i bhfeidhm ar innéacs agus crann oibre\n"
+"q - scor; ná cuir an hunk seo ná aon cheann de na cinn atá fágtha i "
+"bhfeidhm\n"
+"a - cuir an hunk seo agus gach hunk níos déanaí i bhfeidhm sa chomhad\n"
+"d - ná cuir an hunk seo ná aon cheann de na hunks níos déanaí sa chomhad i "
+"bhfeidhm\n"
+
+#: add-patch.c
+#, c-format
+msgid "Apply mode change to worktree [y,n,q,a,d%s,?]? "
+msgstr "Cuir athrú mód i bhfeidhm ar an gcrann oibre [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply deletion to worktree [y,n,q,a,d%s,?]? "
+msgstr "Cuir scriosadh i bhfeidhm ar chrann oibre [y, n, q, a, d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply addition to worktree [y,n,q,a,d%s,?]? "
+msgstr "Cuir an breiseán i bhfeidhm ar an gcrann oibre [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+#, c-format
+msgid "Apply this hunk to worktree [y,n,q,a,d%s,?]? "
+msgstr "Cuir an píosa seo i bhfeidhm ar an gcrann oibre [y,n,q,a,d%s,?]? "
+
+#: add-patch.c
+msgid ""
+"y - apply this hunk to worktree\n"
+"n - do not apply this hunk to worktree\n"
+"q - quit; do not apply this hunk or any of the remaining ones\n"
+"a - apply this hunk and all later hunks in the file\n"
+"d - do not apply this hunk or any of the later hunks in the file\n"
+msgstr ""
+"y - cuir an hunk seo i bhfeidhm ar chrann oibre\n"
+"n - ná cuir an hunk seo i bhfeidhm ar chrann oibre\n"
+"q - scor; ná cuir an hunk seo ná aon cheann de na cinn atá fágtha i "
+"bhfeidhm\n"
+"a - cuir an hunk seo agus gach hunk níos déanaí i bhfeidhm sa chomhad\n"
+"d - ná cuir an hunk seo ná aon cheann de na hunks níos déanaí sa chomhad i "
+"bhfeidhm\n"
+
+#: add-patch.c
+#, c-format
+msgid "could not parse hunk header '%.*s'"
+msgstr "níorbh fhéidir ceanntásc an bhlúire '%.*s' a pharsáil"
+
+#: add-patch.c
+msgid "could not parse diff"
+msgstr "ní raibh sé in ann difríocht a pharsáil"
+
+#: add-patch.c
+msgid "could not parse colored diff"
+msgstr "ní raibh sé in ann difríocht daite a pháirseáil"
+
+#: add-patch.c
+#, c-format
+msgid "failed to run '%s'"
+msgstr "theip ar '%s' a reáchtáil"
+
+#: add-patch.c
+msgid "mismatched output from interactive.diffFilter"
+msgstr "aschur mí-mheaitseáilte ó interactive.diffFilter"
+
+#: add-patch.c
+msgid ""
+"Your filter must maintain a one-to-one correspondence\n"
+"between its input and output lines."
+msgstr ""
+"Caithfidh do scagaire comhfhreagras duine le duine a choinneáil\n"
+"idir a línte ionchuir agus aschuir."
+
+#: add-patch.c
+#, c-format
+msgid ""
+"expected context line #%d in\n"
+"%.*s"
+msgstr ""
+"líne comhthéacs a bhfuil súil leo #%d i\n"
+"%.*s"
+
+#: add-patch.c
+#, c-format
+msgid ""
+"hunks do not overlap:\n"
+"%.*s\n"
+"\tdoes not end with:\n"
+"%.*s"
+msgstr ""
+"ní fhorluíonn hunks:\n"
+"%.*s\n"
+" ní chríochnaíonn sé le:\n"
+"%.*s"
+
+#: add-patch.c
+msgid "Manual hunk edit mode -- see bottom for a quick guide.\n"
+msgstr ""
+"Modh eagarthóireachta hunk láimhe - féach an bun le haghaidh treoir thapa.\n"
+
+#: add-patch.c
+#, c-format
+msgid ""
+"---\n"
+"To remove '%c' lines, make them ' ' lines (context).\n"
+"To remove '%c' lines, delete them.\n"
+"Lines starting with %s will be removed.\n"
+msgstr ""
+"---\n"
+"Chun línte '%c' a bhaint, déan línte '' iad (comhthéacs).\n"
+"Chun línte '%c' a bhaint, scrios iad.\n"
+"Bainfear línte a thosaíonn le %s.\n"
+
+#: add-patch.c
+msgid ""
+"If it does not apply cleanly, you will be given an opportunity to\n"
+"edit again. If all lines of the hunk are removed, then the edit is\n"
+"aborted and the hunk is left unchanged.\n"
+msgstr ""
+"Mura bhfuil feidhm aige go glan, tabharfar deis duit\n"
+"cuir in eagar arís. Má bhaintear gach líne den hunk, ansin is é an t-"
+"eagarthóireacht\n"
+"cuireadh isteach agus fágtar an hunk gan athrú.\n"
+
+#: add-patch.c
+msgid "could not parse hunk header"
+msgstr "ní fhéadfaí ceanntásc hunk a pháirseáil"
+
+#: add-patch.c
+msgid "'git apply --cached' failed"
+msgstr "Theip ar 'git apply --cached'"
+
+#. TRANSLATORS: do not translate [y/n]
+#. The program will only accept that input at this point.
+#. Consider translating (saying "no" discards!) as
+#. (saying "n" for "no" discards!) if the translation
+#. of the word "no" does not start with n.
+#.
+#: add-patch.c
+msgid ""
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+msgstr ""
+"Ní bhaineann do chuid eagraithe. Cuir in eagar arís (ag rá \"níl\" cuirtear "
+"i leataobh é!) [y/n]? "
+
+#: add-patch.c
+msgid "The selected hunks do not apply to the index!"
+msgstr "Ní bhaineann na hunks roghnaithe leis an innéacs!"
+
+#: add-patch.c
+msgid "Apply them to the worktree anyway? "
+msgstr "An gcuirfidh tú i bhfeidhm iad ar an gcrann oibre ar aon nós? "
+
+#: add-patch.c
+msgid "Nothing was applied.\n"
+msgstr "Ní chuirtear aon rud i bhfeidhm.\n"
+
+#: add-patch.c
+msgid ""
+"j - leave this hunk undecided, see next undecided hunk\n"
+"J - leave this hunk undecided, see next hunk\n"
+"k - leave this hunk undecided, see previous undecided hunk\n"
+"K - leave this hunk undecided, see previous hunk\n"
+"g - select a hunk to go to\n"
+"/ - search for a hunk matching the given regex\n"
+"s - split the current hunk into smaller hunks\n"
+"e - manually edit the current hunk\n"
+"p - print the current hunk, 'P' to use the pager\n"
+"? - print help\n"
+msgstr ""
+"j - fág an hunk seo gan chinneadh, féach an chéad hunk neamhchinnte eile\n"
+"J - fág an hunk seo gan chinneadh, féach an chéad hunk eile\n"
+"k - fág an hunk seo gan chinneadh, féach an hunk neamhchinnte roimhe seo\n"
+"K - fág an hunk seo gan chinneadh, féach an hunk roimhe seo\n"
+"g - roghnaigh hunk le dul chuig\n"
+"/- cuardaigh hunk a mheaitseann leis an regex a thugtar\n"
+"s - roinn an hunk reatha ina huncanna níos lú\n"
+"e - cuir an hunk reatha in eagar de láimh\n"
+"p - priontáil an hunk reatha, 'P' chun an pager a úsáid\n"
+"? - cabhair priontála\n"
+
+#: add-patch.c
+#, c-format
+msgid "Only one letter is expected, got '%s'"
+msgstr "Níl súil leis ach litir amháin, fuair '%s'"
+
+#: add-patch.c
+msgid "No previous hunk"
+msgstr "Níl aon hunk roimhe seo"
+
+#: add-patch.c
+msgid "No next hunk"
+msgstr "Níl aon chéad hunk eile"
+
+#: add-patch.c
+msgid "No other hunks to goto"
+msgstr "Níl aon ghuncanna eile le dul"
+
+#: add-patch.c
+msgid "go to which hunk (<ret> to see more)? "
+msgstr "téigh chuig cén hunk (<ret> le tuilleadh a fheiceáil)? "
+
+#: add-patch.c
+msgid "go to which hunk? "
+msgstr "téigh chuig cén hunk? "
+
+#: add-patch.c
+#, c-format
+msgid "Invalid number: '%s'"
+msgstr "Uimhir neamhbhailí: '%s'"
+
+#: add-patch.c
+#, c-format
+msgid "Sorry, only %d hunk available."
+msgid_plural "Sorry, only %d hunks available."
+msgstr[0] "Tá brón orm, níl ach %d píosa ar fáil."
+msgstr[1] "Tá brón orm, níl ach %d hunks ar fáil."
+msgstr[2] "Tá brón orm, níl ach %d hunks ar fáil."
+
+#: add-patch.c
+msgid "No other hunks to search"
+msgstr "Níl aon ghuncanna eile le cuardach"
+
+#: add-patch.c
+msgid "search for regex? "
+msgstr "cuardach a dhéanamh ar regex? "
+
+#: add-patch.c
+#, c-format
+msgid "Malformed search regexp %s: %s"
+msgstr "Regexp cuardaigh mífheidhmithe %s: %s"
+
+#: add-patch.c
+msgid "No hunk matches the given pattern"
+msgstr "Níl aon hunk ag teacht leis an bpatrún tugtha"
+
+#: add-patch.c
+msgid "Sorry, cannot split this hunk"
+msgstr "Tá brón orainn, ní féidir an hunk seo a roinnt"
+
+#: add-patch.c
+#, c-format
+msgid "Split into %d hunks."
+msgstr "Roinn ina %d hunks."
+
+#: add-patch.c
+msgid "Sorry, cannot edit this hunk"
+msgstr "Tá brón orainn, ní féidir an hunk seo a chur in eagar"
+
+#: add-patch.c
+#, c-format
+msgid "Unknown command '%s' (use '?' for help)"
+msgstr "Ordú anaithnid '%s' (bain úsáid as '?' le haghaidh cabhair)"
+
+#: add-patch.c
+msgid "'git apply' failed"
+msgstr "Theip ar 'git apply'"
+
+#: add-patch.c
+msgid "No changes."
+msgstr "Gan aon athruithe."
+
+#: add-patch.c
+msgid "Only binary files changed."
+msgstr "Níor athraigh ach comhaid dénártha."
+
+#: advice.c
+#, c-format
+msgid ""
+"\n"
+"Disable this message with \"git config set advice.%s false\""
+msgstr ""
+"\n"
+"Díchumasaigh an teachtaireacht seo le \"git config set advice.%s false\""
+
+#: advice.c
+#, c-format
+msgid "%shint:%s%.*s%s\n"
+msgstr "%sleid:%s%.*s%s\n"
+
+#: advice.c
+msgid "Cherry-picking is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir piocadh silíní toisc go bhfuil comhaid neamh-chumasaithe agat."
+
+#: advice.c
+msgid "Committing is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir tiomantas a dhéanamh toisc go bhfuil comhaid neamh-"
+"chomhcheangailte agat."
+
+#: advice.c
+msgid "Merging is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir cumasc a dhéanamh toisc go bhfuil comhaid neamh-chumasaithe agat."
+
+#: advice.c
+msgid "Pulling is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir tarraingt a tharraingt toisc go bhfuil comhaid neamh-chumasaithe "
+"agat."
+
+#: advice.c
+msgid "Reverting is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir aisiompú toisc go bhfuil comhaid neamh-chomhcheangailte agat."
+
+#: advice.c
+msgid "Rebasing is not possible because you have unmerged files."
+msgstr ""
+"Ní féidir athbhunú a dhéanamh toisc go bhfuil comhaid neamh-chumasaithe agat."
+
+#: advice.c
+msgid ""
+"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
+"as appropriate to mark resolution and make a commit."
+msgstr ""
+"<file>Socraigh iad sa chrann oibre, agus ansin bain úsáid as 'git add/rm '\n"
+"de réir mar is cuí chun réiteach a mharcáil agus tiomantas a dhéanamh."
+
+#: advice.c
+msgid "Exiting because of an unresolved conflict."
+msgstr "Ag imeacht mar gheall ar choimhlint neamhréitithe."
+
+#: advice.c builtin/merge.c
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr "Níor thug tú do chumasc i gcrích (MERGE_HEAD ann)."
+
+#: advice.c
+msgid "Please, commit your changes before merging."
+msgstr "Déan d'athruithe a dhéanamh le do thoil sula ndéanann tú cumasc."
+
+#: advice.c
+msgid "Exiting because of unfinished merge."
+msgstr "Ag imeacht mar gheall ar chumasc críochnaithe."
+
+#: advice.c
+msgid ""
+"Diverging branches can't be fast-forwarded, you need to either:\n"
+"\n"
+"\tgit merge --no-ff\n"
+"\n"
+"or:\n"
+"\n"
+"\tgit rebase\n"
+msgstr ""
+"Ní féidir brainsí éagsúla a chur ar aghaidh go tapa, ní mór duit:\n"
+"\n"
+" git merge --no-ff\n"
+"\n"
+"nó:\n"
+"\n"
+" git rebase\n"
+
+#: advice.c
+msgid "Not possible to fast-forward, aborting."
+msgstr "Ní féidir dul ar aghaidh go tapa, ag cur isteach."
+
+#: advice.c
+#, c-format
+msgid ""
+"The following paths and/or pathspecs matched paths that exist\n"
+"outside of your sparse-checkout definition, so will not be\n"
+"updated in the index:\n"
+msgstr ""
+"Meaitseáil na cosáin agus/nó na cosáin seo a leanas cosáin ann\n"
+"lasmuigh de do shainmhíniú seiceála neamhchoitianta, mar sin ní bheidh\n"
+"nuashonraithe san innéacs:\n"
+
+#: advice.c
+msgid ""
+"If you intend to update such entries, try one of the following:\n"
+"* Use the --sparse option.\n"
+"* Disable or modify the sparsity rules."
+msgstr ""
+"Má tá sé ar intinn agat iontrálacha den sórt sin a nuashonrú, bain triail as "
+"ceann amháin de\n"
+"* Úsáid an rogha --sparse.\n"
+"* Díchumasaigh nó modhnaigh na rialacha neamhghnách."
+
+#: advice.c
+#, c-format
+msgid ""
+"Note: switching to '%s'.\n"
+"\n"
+"You are in 'detached HEAD' state. You can look around, make experimental\n"
+"changes and commit them, and you can discard any commits you make in this\n"
+"state without impacting any branches by switching back to a branch.\n"
+"\n"
+"If you want to create a new branch to retain commits you create, you may\n"
+"do so (now or later) by using -c with the switch command. Example:\n"
+"\n"
+" git switch -c <new-branch-name>\n"
+"\n"
+"Or undo this operation with:\n"
+"\n"
+" git switch -\n"
+"\n"
+"Turn off this advice by setting config variable advice.detachedHead to "
+"false\n"
+"\n"
+msgstr ""
+"Nóta: ag aistriú go '%s'.\n"
+"\n"
+"Tá tú i stát 'CEANN scoite'. Is féidir leat breathnú timpeall, turgnamhach a "
+"dhéanamh\n"
+"athruithe agus iad a dhéanamh, agus féadfaidh tú aon gealltanais a dhéanann "
+"tú san áireamh a dhiúscairt\n"
+"stáit gan dul i bhfeidhm ar aon bhrainsí trí aistriú ar ais chuig brainse.\n"
+"\n"
+"Más mian leat brainse nua a chruthú chun gealltanais a chruthaíonn tú a "
+"choinneáil, féadfaidh tú\n"
+"déan amhlaidh (anois nó níos déanaí) trí úsáid a bhaint as -c leis an ordú "
+"lasc. Sampla:\n"
+"\n"
+" git switch -c <new-branch-name>\n"
+"\n"
+"Nó cealaigh an oibríocht seo le:\n"
+"\n"
+" git switch -c <new-branch-name>\n"
+"\n"
+"Múch an chomhairle seo trí chomhairle athróg advice.detachedHead a shocrú go "
+"false\n"
+"\n"
+
+#: advice.c
+#, c-format
+msgid ""
+"The following paths have been moved outside the\n"
+"sparse-checkout definition but are not sparse due to local\n"
+"modifications.\n"
+msgstr ""
+"Tá na cosáin seo a leanas bogadh taobh amuigh den\n"
+"sainmhíniú seiceála neamhchoitianta ach níl siad neamhchoitiúil mar gheall "
+"ar an\n"
+"modhnuithe.\n"
+
+#: advice.c
+msgid ""
+"To correct the sparsity of these paths, do the following:\n"
+"* Use \"git add --sparse <paths>\" to update the index\n"
+"* Use \"git sparse-checkout reapply\" to apply the sparsity rules"
+msgstr ""
+"Chun neamhghnáth na gcosáin seo a cheartú, déan an méid seo a leanas:\n"
+"* Úsáid “git add --sparse<paths>\" chun an t-innéacs a nuashonrú\n"
+"* Úsáid “git sparse-checkout reapply” chun na rialacha neamhchoitianta a "
+"chur i bhfeidhm"
+
+#: alias.c
+msgid "cmdline ends with \\"
+msgstr "críochnaíonn cmdline le \\"
+
+#: alias.c
+msgid "unclosed quote"
+msgstr "luachan neamhdhúnadh"
+
+#: alias.c builtin/cat-file.c builtin/notes.c builtin/prune-packed.c
+#: builtin/receive-pack.c builtin/refs.c builtin/tag.c t/helper/test-pkt-line.c
+msgid "too many arguments"
+msgstr "an iomarca argóintí"
+
+#: apply.c
+#, c-format
+msgid "unrecognized whitespace option '%s'"
+msgstr "rogha spás bán gan aithint '%s'"
+
+#: apply.c
+#, c-format
+msgid "unrecognized whitespace ignore option '%s'"
+msgstr "neamhaird ar spás bán gan aithint neamhaird ar rogha '%s'"
+
+#: apply.c archive.c builtin/add.c builtin/branch.c builtin/checkout-index.c
+#: builtin/checkout.c builtin/clean.c builtin/clone.c builtin/commit.c
+#: builtin/describe.c builtin/diff-tree.c builtin/difftool.c
+#: builtin/fast-export.c builtin/fetch.c builtin/help.c builtin/index-pack.c
+#: builtin/init-db.c builtin/log.c builtin/ls-files.c builtin/merge-base.c
+#: builtin/merge-tree.c builtin/merge.c builtin/pack-objects.c builtin/rebase.c
+#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-parse.c
+#: builtin/show-branch.c builtin/stash.c builtin/submodule--helper.c
+#: builtin/tag.c builtin/worktree.c parse-options.c range-diff.c revision.c
+#, c-format
+msgid "options '%s' and '%s' cannot be used together"
+msgstr "ní féidir roghanna '%s' agus '%s' a úsáid le chéile"
+
+#: apply.c
+#, c-format
+msgid "'%s' outside a repository"
+msgstr "'%s' lasmuigh de stór"
+
+#: apply.c
+msgid "failed to read patch"
+msgstr "theip ar phaiste a léamh"
+
+#: apply.c
+msgid "patch too large"
+msgstr "paiste ró-mhór"
+
+#: apply.c
+#, c-format
+msgid "Cannot prepare timestamp regexp %s"
+msgstr "Ní féidir regexp %s aimstampa a ullmhú"
+
+#: apply.c
+#, c-format
+msgid "regexec returned %d for input: %s"
+msgstr "d'fhill regexec %d le haghaidh ionchur: %s"
+
+#: apply.c
+#, c-format
+msgid "unable to find filename in patch at line %d"
+msgstr "ní féidir ainm comhaid a aimsiú i bpaiste ag an líne %d"
+
+#: apply.c
+#, c-format
+msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d"
+msgstr "git apply: bad git-diff - ag súil le /dev/null, fuair %s ar líne %d"
+
+#: apply.c
+#, c-format
+msgid "git apply: bad git-diff - inconsistent new filename on line %d"
+msgstr ""
+"git apply: bad git-diff - ainm comhaid nua neamhchomhsheasmhach ar líne %d"
+
+#: apply.c
+#, c-format
+msgid "git apply: bad git-diff - inconsistent old filename on line %d"
+msgstr "git apply: bad git-diff - sean-ainm comhaid neamhréireach ar líne %d"
+
+#: apply.c
+#, c-format
+msgid "git apply: bad git-diff - expected /dev/null on line %d"
+msgstr "git apply: bad git-diff - súil leis /dev/null ar líne %d"
+
+#: apply.c
+#, c-format
+msgid "invalid mode on line %d: %s"
+msgstr "modh neamhbhailí ar líne %d: %s"
+
+#: apply.c
+#, c-format
+msgid "inconsistent header lines %d and %d"
+msgstr "línte ceanntásc neamhchomhsheasmhach %d agus %d"
+
+#: apply.c
+#, c-format
+msgid ""
+"git diff header lacks filename information when removing %d leading pathname "
+"component (line %d)"
+msgid_plural ""
+"git diff header lacks filename information when removing %d leading pathname "
+"components (line %d)"
+msgstr[0] ""
+"tá easpa eolais ainm comhaid ar cheanntásc git diff nuair a bhaintear %d "
+"comhpháirt ainm cosáin tosaigh (líne %d)"
+msgstr[1] ""
+"tá easpa eolais ainm comhaid ar cheanntásc git diff agus %d comhpháirteanna "
+"ainm cosáin tosaigh á mbaint (líne %d)"
+msgstr[2] ""
+"tá easpa eolais ainm comhaid ar cheanntásc git diff agus %d comhpháirteanna "
+"ainm cosáin tosaigh á mbaint (líne %d)"
+
+#: apply.c
+#, c-format
+msgid "git diff header lacks filename information (line %d)"
+msgstr "tá easpa eolais ainm comhaid ar cheanntásc git diff (líne %d)"
+
+#: apply.c
+#, c-format
+msgid "recount: unexpected line: %.*s"
+msgstr "atháireamh: líne gan choinne: %.*s"
+
+#: apply.c
+#, c-format
+msgid "patch fragment without header at line %d: %.*s"
+msgstr "blúirt paiste gan ceanntásc ag an líne %d: %.*s"
+
+#: apply.c
+msgid "new file depends on old contents"
+msgstr "braitheann comhad nua ar shean-ábhar"
+
+#: apply.c
+msgid "deleted file still has contents"
+msgstr "tá ábhar fós ag comhad scriosta"
+
+#: apply.c
+#, c-format
+msgid "corrupt patch at line %d"
+msgstr "paiste truaillithe ag líne %d"
+
+#: apply.c
+#, c-format
+msgid "new file %s depends on old contents"
+msgstr "braitheann an comhad nua %s ar an seanábhar"
+
+#: apply.c
+#, c-format
+msgid "deleted file %s still has contents"
+msgstr "tá ábhar fós ag comhad scriosta %s"
+
+#: apply.c
+#, c-format
+msgid "** warning: file %s becomes empty but is not deleted"
+msgstr "** rabhadh: éiríonn comhad %s folamh ach ní scriostar é"
+
+#: apply.c
+#, c-format
+msgid "corrupt binary patch at line %d: %.*s"
+msgstr "paiste dénártha truaillithe ag líne %d: %.*s"
+
+#: apply.c
+#, c-format
+msgid "unrecognized binary patch at line %d"
+msgstr "paiste dénártha gan aithint ag an líne %d"
+
+#: apply.c
+#, c-format
+msgid "patch with only garbage at line %d"
+msgstr "paiste gan ach truflais ag an líne %d"
+
+#: apply.c
+#, c-format
+msgid "unable to read symlink %s"
+msgstr "nach féidir nasc simtéarach %s a léamh"
+
+#: apply.c
+#, c-format
+msgid "unable to open or read %s"
+msgstr "nach féidir %s a oscailt nó a léamh"
+
+#: apply.c
+#, c-format
+msgid "invalid start of line: '%c'"
+msgstr "tús neamhbhailí na líne: '%c'"
+
+#: apply.c
+#, c-format
+msgid "Hunk #%d succeeded at %d (offset %d line)."
+msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
+msgstr[0] "D'éirigh le hunk #%d ag %d (líne fhritháireamh %d)."
+msgstr[1] "D'éirigh le hunk #%d ag %d (%d líne curtha as feidhm)."
+msgstr[2] "D'éirigh le hunk #%d ag %d (%d líne curtha as feidhm)."
+
+#: apply.c
+#, c-format
+msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
+msgstr "Laghdaithe comhthéacs go (%ld/%ld) chun blúire a chur i bhfeidhm ag %d"
+
+#: apply.c
+#, c-format
+msgid ""
+"while searching for:\n"
+"%.*s"
+msgstr ""
+"agus tú ag cuardach:\n"
+"%.*s"
+
+#: apply.c
+#, c-format
+msgid "missing binary patch data for '%s'"
+msgstr "sonraí paiste dénártha in easnamh do '%s'"
+
+#: apply.c
+#, c-format
+msgid "cannot reverse-apply a binary patch without the reverse hunk to '%s'"
+msgstr ""
+"ní féidir paiste dénártha a chur i bhfeidhm ar ais gan an hunk droim ar ais "
+"chuig '%s'"
+
+#: apply.c
+#, c-format
+msgid "cannot apply binary patch to '%s' without full index line"
+msgstr ""
+"ní féidir paiste dénártha a chur i bhfeidhm ar '%s' gan líne innéacs iomlán"
+
+#: apply.c
+#, c-format
+msgid ""
+"the patch applies to '%s' (%s), which does not match the current contents."
+msgstr ""
+"baineann an paiste le '%s' (%s), nach bhfuil comhoiriúnach leis an ábhar "
+"reatha."
+
+#: apply.c
+#, c-format
+msgid "the patch applies to an empty '%s' but it is not empty"
+msgstr "baineann an paiste le '%s' folamh ach níl sé folamh"
+
+#: apply.c
+#, c-format
+msgid "the necessary postimage %s for '%s' cannot be read"
+msgstr "ní féidir an post riachtanach %s le haghaidh '%s' a léamh"
+
+#: apply.c
+#, c-format
+msgid "binary patch does not apply to '%s'"
+msgstr "ní bhaineann paiste dénártha le '%s'"
+
+#: apply.c
+#, c-format
+msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
+msgstr ""
+"cruthaíonn paiste dénártha chuig '%s' toradh mícheart (ag súil le %s, fuair "
+"%s)"
+
+#: apply.c
+#, c-format
+msgid "patch failed: %s:%ld"
+msgstr "theip ar phaiste: %s: %ld"
+
+#: apply.c builtin/mv.c
+#, c-format
+msgid "cannot checkout %s"
+msgstr "ní féidir %s a sheiceáil"
+
+#: apply.c midx.c pack-mtimes.c pack-revindex.c setup.c
+#, c-format
+msgid "failed to read %s"
+msgstr "theip ar %s a léamh"
+
+#: apply.c
+#, c-format
+msgid "reading from '%s' beyond a symbolic link"
+msgstr "léamh ó '%s' níos faide ná nasc siombalach"
+
+#: apply.c
+#, c-format
+msgid "path %s has been renamed/deleted"
+msgstr "tá conair %s athainmnithe/scriosta"
+
+#: apply.c
+#, c-format
+msgid "%s: does not exist in index"
+msgstr "%s: níl ann san innéacs"
+
+#: apply.c
+#, c-format
+msgid "%s: does not match index"
+msgstr "%s: ní mheaitseálann innéacs"
+
+#: apply.c
+msgid "repository lacks the necessary blob to perform 3-way merge."
+msgstr "níl an blob riachtanach ag stór chun cumasc trí bhealach a dhéanamh."
+
+#: apply.c
+#, c-format
+msgid "Performing three-way merge...\n"
+msgstr "Cumaisc trí bhealach a dhéanamh...\n"
+
+#: apply.c
+#, c-format
+msgid "cannot read the current contents of '%s'"
+msgstr "ní féidir ábhar reatha '%s' a léamh"
+
+#: apply.c
+#, c-format
+msgid "Failed to perform three-way merge...\n"
+msgstr "Theip ar chumasc trí bhealach a dhéanamh...\n"
+
+#: apply.c
+#, c-format
+msgid "Applied patch to '%s' with conflicts.\n"
+msgstr "Paiste cuireadh i bhfeidhm ar '%s' le coinbhleachtaí.\n"
+
+#: apply.c
+#, c-format
+msgid "Applied patch to '%s' cleanly.\n"
+msgstr "Cuireadh paiste i bhfeidhm go '%s' go glan.\n"
+
+#: apply.c
+#, c-format
+msgid "Falling back to direct application...\n"
+msgstr "Ag titim ar ais chuig feidhmchlár díreach...\n"
+
+#: apply.c
+msgid "removal patch leaves file contents"
+msgstr "fágann paiste bainte ábhar an chomhaid"
+
+#: apply.c
+#, c-format
+msgid "%s: wrong type"
+msgstr "%s: cineál mícheart"
+
+#: apply.c
+#, c-format
+msgid "%s has type %o, expected %o"
+msgstr "%s tá cineál %o air, ach bhíothas ag súil le %o"
+
+#: apply.c read-cache.c
+#, c-format
+msgid "invalid path '%s'"
+msgstr "cosán neamhbhailí '%s'"
+
+#: apply.c
+#, c-format
+msgid "%s: already exists in index"
+msgstr "%s: ann cheana féin san innéacs"
+
+#: apply.c
+#, c-format
+msgid "%s: already exists in working directory"
+msgstr "%s: ann cheana féin san eolaire oibre"
+
+#: apply.c
+#, c-format
+msgid "new mode (%o) of %s does not match old mode (%o)"
+msgstr "ní mheaitseálann modh nua (%o) de %s sean-mhodh (%o)"
+
+#: apply.c
+#, c-format
+msgid "new mode (%o) of %s does not match old mode (%o) of %s"
+msgstr "ní mheaitseálann modh nua (%o) de %s sean-mhodh (%o) de %s"
+
+#: apply.c
+#, c-format
+msgid "affected file '%s' is beyond a symbolic link"
+msgstr "tá an comhad tionchair '%s' níos faide ná nasc siombalach"
+
+#: apply.c
+#, c-format
+msgid "%s: patch does not apply"
+msgstr "%s: níl paiste i bhfeidhm"
+
+#: apply.c
+#, c-format
+msgid "Checking patch %s..."
+msgstr "Seiceáil paiste %s..."
+
+#: apply.c
+#, c-format
+msgid "sha1 information is lacking or useless for submodule %s"
+msgstr "tá faisnéis sha1 easpa nó gan úsáid le haghaidh fo-mhodúl %s"
+
+#: apply.c
+#, c-format
+msgid "mode change for %s, which is not in current HEAD"
+msgstr "athrú modh do %s, nach bhfuil i HEAD reatha"
+
+#: apply.c
+#, c-format
+msgid "sha1 information is lacking or useless (%s)."
+msgstr "tá faisnéis sha1 easpa nó gan úsáid (%s)."
+
+#: apply.c
+#, c-format
+msgid "could not add %s to temporary index"
+msgstr "ní fhéadfaí %s a chur le hinnéacs sealadach"
+
+#: apply.c
+#, c-format
+msgid "could not write temporary index to %s"
+msgstr "ní fhéadfaí innéacs sealadach a scríobh chuig %s"
+
+#: apply.c
+#, c-format
+msgid "unable to remove %s from index"
+msgstr "nach féidir %s a bhaint as innéacs"
+
+#: apply.c
+#, c-format
+msgid "corrupt patch for submodule %s"
+msgstr "paiste truaillithe do fho-mhodúl %s"
+
+#: apply.c
+#, c-format
+msgid "unable to stat newly created file '%s'"
+msgstr "nach féidir an comhad nua-chruthaithe '%s' a stáil"
+
+#: apply.c
+#, c-format
+msgid "unable to create backing store for newly created file %s"
+msgstr "nach féidir stór tacaíochta a chruthú do chomhad nua-chruthaithe %s"
+
+#: apply.c
+#, c-format
+msgid "unable to add cache entry for %s"
+msgstr "nach féidir iontráil taisce a chur le haghaidh %s"
+
+#: apply.c builtin/bisect.c builtin/gc.c
+#, c-format
+msgid "failed to write to '%s'"
+msgstr "theip ar scríobh chuig '%s'"
+
+#: apply.c
+#, c-format
+msgid "closing file '%s'"
+msgstr "comhad dúnadh '%s'"
+
+#: apply.c
+#, c-format
+msgid "unable to write file '%s' mode %o"
+msgstr "ní féidir an comhad '%s' modh %o a scríobh"
+
+#: apply.c
+#, c-format
+msgid "Applied patch %s cleanly."
+msgstr "Cuireadh paiste %s i bhfeidhm go glan."
+
+#: apply.c
+msgid "internal error"
+msgstr "earráid inmheánach"
+
+#: apply.c
+#, c-format
+msgid "Applying patch %%s with %d reject..."
+msgid_plural "Applying patch %%s with %d rejects..."
+msgstr[0] "Ag cur paiste %%s i bhfeidhm le %d diúltú..."
+msgstr[1] "Ag cur paiste %%s i bhfeidhm le %d diúltuithe..."
+msgstr[2] "Ag cur paiste %%s i bhfeidhm le %d diúltuithe..."
+
+#: apply.c
+#, c-format
+msgid "cannot open %s"
+msgstr "ní féidir %s a oscailt"
+
+#: apply.c rerere.c
+#, c-format
+msgid "cannot unlink '%s'"
+msgstr "ní féidir '%s' a dhínascadh"
+
+#: apply.c
+#, c-format
+msgid "Hunk #%d applied cleanly."
+msgstr "Cuireadh Hunk #%d i bhfeidhm go glan."
+
+#: apply.c
+#, c-format
+msgid "Rejected hunk #%d."
+msgstr "Hunk diúltaithe #%d."
+
+#: apply.c
+#, c-format
+msgid "Skipped patch '%s'."
+msgstr "Paiste scipeáilte '%s'."
+
+#: apply.c
+msgid "No valid patches in input (allow with \"--allow-empty\")"
+msgstr "Níl aon paistí bailí san ionchur (cead le “--allow-empty”)"
+
+#: apply.c t/helper/test-cache-tree.c
+msgid "unable to read index file"
+msgstr "in ann comhad innéacs a léamh"
+
+#: apply.c
+#, c-format
+msgid "can't open patch '%s': %s"
+msgstr "ní féidir paiste '%s' a oscailt: %s"
+
+#: apply.c
+#, c-format
+msgid "squelched %d whitespace error"
+msgid_plural "squelched %d whitespace errors"
+msgstr[0] "earráid spás bán %d múchta"
+msgstr[1] "%d earráid spás bán múchta"
+msgstr[2] "%d earráid spás bán múchta"
+
+#: apply.c
+#, c-format
+msgid "%d line adds whitespace errors."
+msgid_plural "%d lines add whitespace errors."
+msgstr[0] "Cuireann %d líne earráidí spás bán leis."
+msgstr[1] "Cuireann %d líne earráidí spás bán leis."
+msgstr[2] "Cuireann %d líne earráidí spás bán leis."
+
+#: apply.c
+#, c-format
+msgid "%d line applied after fixing whitespace errors."
+msgid_plural "%d lines applied after fixing whitespace errors."
+msgstr[0] "%d líne curtha i bhfeidhm tar éis earráidí spás bán a shocrú."
+msgstr[1] "%d líne curtha i bhfeidhm tar éis earráidí spás bán a shocrú."
+msgstr[2] "%d líne curtha i bhfeidhm tar éis earráidí spás bán a shocrú."
+
+#: apply.c builtin/mv.c builtin/rm.c
+msgid "Unable to write new index file"
+msgstr "Ní féidir comhad innéacs nua a scríobh"
+
+#: apply.c
+msgid "don't apply changes matching the given path"
+msgstr "ná cuir athruithe a mheaitseáil leis an gcosán tugtha"
+
+#: apply.c
+msgid "apply changes matching the given path"
+msgstr "athruithe a chur i bhfeidhm a mheaitseálann"
+
+#: apply.c builtin/am.c
+msgid "num"
+msgstr "uimhir"
+
+#: apply.c
+msgid "remove <num> leading slashes from traditional diff paths"
+msgstr "bain <num>slascanna ceannródaíocha ó chosáin difriúla traidisiúnta"
+
+#: apply.c
+msgid "ignore additions made by the patch"
+msgstr "neamhaird a dhéanamh ar bhreiseanna a dhéanann an"
+
+#: apply.c
+msgid "instead of applying the patch, output diffstat for the input"
+msgstr "in ionad an paiste a chur i bhfeidhm, diffstat aschuir don ionchur"
+
+#: apply.c
+msgid "show number of added and deleted lines in decimal notation"
+msgstr "líon na línte breise agus scriosta a thaispeáint i nótaí deachúil"
+
+#: apply.c
+msgid "instead of applying the patch, output a summary for the input"
+msgstr "in ionad an paiste a chur i bhfeidhm, aschur achoimre don ionchur"
+
+#: apply.c
+msgid "instead of applying the patch, see if the patch is applicable"
+msgstr ""
+"in ionad an paiste a chur i bhfeidhm, féach an bhfuil an paiste infheidhme"
+
+#: apply.c
+msgid "make sure the patch is applicable to the current index"
+msgstr ""
+"déan cinnte go bhfuil an paiste infheidhme maidir leis an innéacs reatha"
+
+#: apply.c
+msgid "mark new files with `git add --intent-to-add`"
+msgstr "comhad nua a mharcáil le `git add --intent-to-add`"
+
+#: apply.c
+msgid "apply a patch without touching the working tree"
+msgstr "cuir paiste i bhfeidhm gan teagmháil leis an gcrann oibre"
+
+#: apply.c
+msgid "accept a patch that touches outside the working area"
+msgstr "glacadh le paiste a théann lasmuigh den limistéar oibre"
+
+#: apply.c
+msgid "also apply the patch (use with --stat/--summary/--check)"
+msgstr ""
+"cuir an paiste i bhfeidhm freisin (bain úsáid le --stat/--summary/--check)"
+
+#: apply.c
+msgid "attempt three-way merge, fall back on normal patch if that fails"
+msgstr ""
+"iarracht a dhéanamh cumasc trí bhealach, titim ar ais ar ghnáthphaiste má "
+"theipeann"
+
+#: apply.c builtin/merge-file.c
+msgid "for conflicts, use our version"
+msgstr "le haghaidh coimhlintí, bain úsáid as ár leagan"
+
+#: apply.c builtin/merge-file.c
+msgid "for conflicts, use their version"
+msgstr "le haghaidh coimhlintí, bain úsáid as a leagan"
+
+#: apply.c builtin/merge-file.c
+msgid "for conflicts, use a union version"
+msgstr "le haghaidh coimhlintí, bain úsáid as leagan aontais"
+
+#: apply.c
+msgid "build a temporary index based on embedded index information"
+msgstr "innéacs sealadach a thógáil bunaithe ar eolas innéacs leabaithe"
+
+#: apply.c builtin/checkout-index.c
+msgid "paths are separated with NUL character"
+msgstr "tá cosáin scartha le carachtar NUL"
+
+#: apply.c
+msgid "ensure at least <n> lines of context match"
+msgstr "a chinntiú go mbe <n>adh línte comhthéacsa"
+
+#: apply.c builtin/am.c builtin/interpret-trailers.c builtin/pack-objects.c
+#: builtin/rebase.c
+msgid "action"
+msgstr "gníomh"
+
+#: apply.c
+msgid "detect new or modified lines that have whitespace errors"
+msgstr "línte nua nó modhnaithe a bhrath a bhfuil earráidí spás bán acu"
+
+#: apply.c
+msgid "ignore changes in whitespace when finding context"
+msgstr "neamhaird a dhéanamh ar athruithe ar spás bán agus comhthéacs á"
+
+#: apply.c
+msgid "apply the patch in reverse"
+msgstr "cuir an paiste i bhfeidhm ar ais"
+
+#: apply.c
+msgid "don't expect at least one line of context"
+msgstr "ná bí ag súil le líne comhthéacs amháin ar a laghad"
+
+#: apply.c
+msgid "leave the rejected hunks in corresponding *.rej files"
+msgstr "fág na hunks diúltaithe i gcomhaide*.rej comhfhreagracha"
+
+#: apply.c
+msgid "allow overlapping hunks"
+msgstr "cead a cheadú do na huncanna"
+
+#: apply.c
+msgid "tolerate incorrectly detected missing new-line at the end of file"
+msgstr ""
+"glacadh le líne nua atá in easnamh a bhraitear go mícheart ag deireadh an "
+"chomhaid"
+
+#: apply.c
+msgid "do not trust the line counts in the hunk headers"
+msgstr "ná bíodh muinín agat as na comhaireamh líne sna ceanntásca hunk"
+
+#: apply.c builtin/am.c
+msgid "root"
+msgstr "fréamh"
+
+#: apply.c
+msgid "prepend <root> to all filenames"
+msgstr "cuireadh <root>i bhfeidhm ar gach ainm comhaid"
+
+#: apply.c
+msgid "don't return error for empty patches"
+msgstr "ná tabhair earráid ar ais le haghaidh paistí folamh"
+
+#: apply.c
+msgid "--ours, --theirs, and --union require --3way"
+msgstr "Éilíonn --ours, --theirs, agus --union --3way"
+
+#: archive-tar.c archive-zip.c
+#, c-format
+msgid "cannot stream blob %s"
+msgstr "ní féidir le blob %s a shruthlú"
+
+#: archive-tar.c archive-zip.c
+#, c-format
+msgid "unsupported file mode: 0%o (SHA1: %s)"
+msgstr "modh comhad gan tacaíocht: 0%o (SHA1: %s)"
+
+#: archive-tar.c archive-zip.c builtin/pack-objects.c
+#, c-format
+msgid "deflate error (%d)"
+msgstr "earráid dífhabhtaithe (%d)"
+
+#: archive-tar.c
+#, c-format
+msgid "unable to start '%s' filter"
+msgstr "nach féidir scagaire '%s' a thosú"
+
+#: archive-tar.c
+msgid "unable to redirect descriptor"
+msgstr "nach féidir tuairiscí a atreorú"
+
+#: archive-tar.c
+#, c-format
+msgid "'%s' filter reported error"
+msgstr "Earráid a thuairiscigh scagaire '%s'"
+
+#: archive-zip.c
+#, c-format
+msgid "path is not valid UTF-8: %s"
+msgstr "níl cosán bailí UTF-8: %s"
+
+#: archive-zip.c
+#, c-format
+msgid "path too long (%d chars, SHA1: %s): %s"
+msgstr "cosán rófhada (%d chars, SHA1: %s): %s"
+
+#: archive-zip.c
+#, c-format
+msgid "timestamp too large for this system: %<PRIuMAX>"
+msgstr "stampa ama ró-mhór don chóras seo:%<PRIuMAX>"
+
+#: archive.c
+msgid "git archive [<options>] <tree-ish> [<path>...]"
+msgstr "git cartlan <options>n [] <tree-ish>[<path>...]"
+
+#: archive.c
+msgid ""
+"git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]"
+msgstr ""
+"<tree-ish><path>git archive --remote <repo>[--exec<cmd>] [] [...<options>]"
+
+#: archive.c
+msgid "git archive --remote <repo> [--exec <cmd>] --list"
+msgstr "<cmd>git archive --remote <repo>[--exec] --list"
+
+#: archive.c builtin/gc.c builtin/notes.c builtin/tag.c
+#, c-format
+msgid "cannot read '%s'"
+msgstr "ní féidir '%s' a léamh"
+
+#: archive.c
+#, c-format
+msgid "pathspec '%s' matches files outside the current directory"
+msgstr "meaitseálann pathspec '%s' comhaid lasmuigh den eolaire reatha"
+
+#: archive.c builtin/add.c builtin/rm.c
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr "níor mheaitseáil pathspec '%s' aon chomhaid"
+
+#: archive.c
+#, c-format
+msgid "no such ref: %.*s"
+msgstr "gan aon tagairt den sórt sin: %.*s"
+
+#: archive.c
+#, c-format
+msgid "not a valid object name: %s"
+msgstr "ní ainm réad bailí: %s"
+
+#: archive.c t/helper/test-cache-tree.c
+#, c-format
+msgid "not a tree object: %s"
+msgstr "ní réad crann: %s"
+
+#: archive.c
+#, c-format
+msgid "failed to unpack tree object %s"
+msgstr "theip ar réad crann %s a dhíphacáil"
+
+#: archive.c
+#, c-format
+msgid "File not found: %s"
+msgstr "Níor aimsíodh an comhad: %s"
+
+#: archive.c
+#, c-format
+msgid "Not a regular file: %s"
+msgstr "Ní comhad rialta: %s"
+
+#: archive.c
+#, c-format
+msgid "unclosed quote: '%s'"
+msgstr "luachan neamhdhúnadh: '%s'"
+
+#: archive.c
+#, c-format
+msgid "missing colon: '%s'"
+msgstr "colon in easnamh: '%s'"
+
+#: archive.c
+#, c-format
+msgid "empty file name: '%s'"
+msgstr "ainm comhaid folamh: '%s'"
+
+#: archive.c
+msgid "fmt"
+msgstr "fmt"
+
+#: archive.c
+msgid "archive format"
+msgstr "formáid cartlann"
+
+#: archive.c builtin/log.c parse-options.h
+msgid "prefix"
+msgstr "réimír"
+
+#: archive.c
+msgid "prepend prefix to each pathname in the archive"
+msgstr "réimír a pholadh chuig gach ainm cosán sa chartlann"
+
+#: archive.c builtin/blame.c builtin/commit-tree.c builtin/config.c
+#: builtin/fast-export.c builtin/gc.c builtin/grep.c builtin/hash-object.c
+#: builtin/ls-files.c builtin/notes.c builtin/read-tree.c parse-options.h
+msgid "file"
+msgstr "comhad"
+
+#: archive.c
+msgid "add untracked file to archive"
+msgstr "cuir comhad neamhrianaithe leis an gcartlann"
+
+#: archive.c
+msgid "path:content"
+msgstr "bealach:ábhar"
+
+#: archive.c builtin/archive.c
+msgid "write the archive to this file"
+msgstr "scríobh an cartlann chuig an gcomhad seo"
+
+#: archive.c
+msgid "read .gitattributes in working directory"
+msgstr "léite.gitattributs san eolaire oibre"
+
+#: archive.c
+msgid "report archived files on stderr"
+msgstr "tuairisciú comhaid cartlainne ar stderr"
+
+#: archive.c builtin/clone.c builtin/fetch.c builtin/pack-objects.c
+#: builtin/pull.c
+msgid "time"
+msgstr "am"
+
+#: archive.c
+msgid "set modification time of archive entries"
+msgstr "socraigh am modhnaithe iontrálacha cartlainne"
+
+#: archive.c
+msgid "set compression level"
+msgstr "leibhéal comhbhrú a shocrú"
+
+#: archive.c
+msgid "list supported archive formats"
+msgstr "liosta formáidí cartlainne tacaíochta"
+
+#: archive.c builtin/archive.c builtin/clone.c builtin/submodule--helper.c
+msgid "repo"
+msgstr "stóras"
+
+#: archive.c builtin/archive.c
+msgid "retrieve the archive from remote repository <repo>"
+msgstr "aisghabháil an cartlann ó stór iargúlta <repo>"
+
+#: archive.c builtin/archive.c builtin/difftool.c builtin/notes.c
+msgid "command"
+msgstr "ordú"
+
+#: archive.c builtin/archive.c
+msgid "path to the remote git-upload-archive command"
+msgstr "cosán chuig an ordú iargúlta git-upload-archive"
+
+#: archive.c
+msgid "Unexpected option --remote"
+msgstr "Rogha gan choinne --remote"
+
+#: archive.c builtin/add.c builtin/checkout.c builtin/clone.c builtin/commit.c
+#: builtin/fast-export.c builtin/index-pack.c builtin/log.c builtin/reset.c
+#: builtin/rm.c builtin/stash.c builtin/worktree.c fetch-pack.c http-fetch.c
+#: revision.c
+#, c-format
+msgid "the option '%s' requires '%s'"
+msgstr "tá %s ag teastáil don rogha '%s'"
+
+#: archive.c
+msgid "Unexpected option --output"
+msgstr "Rogha gan choinne --output"
+
+#: archive.c t/unit-tests/unit-test.c
+#, c-format
+msgid "extra command line parameter '%s'"
+msgstr "paraiméadar líne ordaithe breise '%s'"
+
+#: archive.c
+#, c-format
+msgid "Unknown archive format '%s'"
+msgstr "Formáid cartlainne anaithnid '%s'"
+
+#: archive.c
+#, c-format
+msgid "Argument not supported for format '%s': -%d"
+msgstr "Argóint nach dtacaítear le haghaidh formáid '%s': -%d"
+
+#: attr.c
+#, c-format
+msgid "%.*s is not a valid attribute name"
+msgstr "%.*s ní ainm tréith bailí é"
+
+#: attr.c
+msgid "unable to add additional attribute"
+msgstr "in ann tréith bhreise a chur leis"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly long attributes line %d"
+msgstr "neamhaird a dhéanamh ar líne tréithe ró-fhada %d"
+
+#: attr.c
+#, c-format
+msgid "%s not allowed: %s:%d"
+msgstr "%s ní cheadaítear %s:%d"
+
+#: attr.c
+msgid ""
+"Negative patterns are ignored in git attributes\n"
+"Use '\\!' for literal leading exclamation."
+msgstr ""
+"Déantar neamhaird ar phatrúin dhiúltacha i d\n"
+"Úsáid '\\!' le haghaidh brú ceannródaíoch litriúil."
+
+#: attr.c
+#, c-format
+msgid "cannot fstat gitattributes file '%s'"
+msgstr "ní féidir an comhad gitattributeanna '%s' fstat"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes file '%s'"
+msgstr "neamhaird a dhéanamh ar chomhad gitattributs ró-mhór '%s'"
+
+#: attr.c
+#, c-format
+msgid "ignoring overly large gitattributes blob '%s'"
+msgstr "neamhaird a dhéanamh ar ghitattributs ró-mhór blob '%s'"
+
+#: attr.c
+msgid "cannot use --attr-source or GIT_ATTR_SOURCE without repo"
+msgstr "ní féidir --attr-source nó GIT_ATTR_SOURCE a úsáid gan repo"
+
+#: attr.c
+msgid "bad --attr-source or GIT_ATTR_SOURCE"
+msgstr "olc --attr-source nó GIT_ATTR_SOURCE"
+
+#: attr.c read-cache.c refs/packed-backend.c
+#, c-format
+msgid "unable to stat '%s'"
+msgstr "ní féidir '%s' a shástáil"
+
+#: bisect.c builtin/cat-file.c builtin/index-pack.c builtin/notes.c
+#: builtin/pack-objects.c combine-diff.c object-file.c rerere.c
+#, c-format
+msgid "unable to read %s"
+msgstr "nach féidir %s a léamh"
+
+#: bisect.c
+#, c-format
+msgid "Badly quoted content in file '%s': %s"
+msgstr "Ábhar a luaitear go dona sa chomhad '%s': %s"
+
+#: bisect.c
+#, c-format
+msgid "We cannot bisect more!\n"
+msgstr "Ní féidir linn níos mó a dhícheangal!\n"
+
+#: bisect.c
+#, c-format
+msgid "Not a valid commit name %s"
+msgstr "Ní ainm tiomanta bailí %s"
+
+#: bisect.c
+#, c-format
+msgid ""
+"The merge base %s is bad.\n"
+"This means the bug has been fixed between %s and [%s].\n"
+msgstr ""
+"Tá an bonn cumaisc %s go dona.\n"
+"Ciallaíonn sé seo go bhfuil an fabht socraithe idir %s agus [%s].\n"
+
+#: bisect.c
+#, c-format
+msgid ""
+"The merge base %s is new.\n"
+"The property has changed between %s and [%s].\n"
+msgstr ""
+"Tá an bonn cumaisc %s nua.\n"
+"Tá athrú tagtha ar an maoin idir %s agus [%s].\n"
+
+#: bisect.c
+#, c-format
+msgid ""
+"The merge base %s is %s.\n"
+"This means the first '%s' commit is between %s and [%s].\n"
+msgstr ""
+"Is é an bonn cumaisc %s ná %s.\n"
+"Ciallaíonn sé seo go bhfuil an chéad thiomantas '%s' idir %s agus [%s].\n"
+
+#: bisect.c
+#, c-format
+msgid ""
+"Some %s revs are not ancestors of the %s rev.\n"
+"git bisect cannot work properly in this case.\n"
+"Maybe you mistook %s and %s revs?\n"
+msgstr ""
+"Ní sinsear an %s rev iad roinnt revs %s\n"
+"Ní féidir le git bisect oibriú i gceart sa chás seo.\n"
+"B'fhéidir gur mheas tú %s agus %s revs?\n"
+
+#: bisect.c
+#, c-format
+msgid ""
+"the merge base between %s and [%s] must be skipped.\n"
+"So we cannot be sure the first %s commit is between %s and %s.\n"
+"We continue anyway."
+msgstr ""
+"caithfear an bonn cumaisc idir %s agus [%s] a scipeáil.\n"
+"Mar sin ní féidir linn a bheith cinnte go bhfuil an chéad thiomantas %s idir "
+"%s agus %s.\n"
+"Leanaimid orainn ar aon nós."
+
+#: bisect.c
+#, c-format
+msgid "Bisecting: a merge base must be tested\n"
+msgstr "Déroinnt: ní mór bonn cumaisc a thástáil\n"
+
+#: bisect.c
+#, c-format
+msgid "a %s revision is needed"
+msgstr "tá athbhreithniú %s ag teastáil"
+
+#: bisect.c
+#, c-format
+msgid "could not create file '%s'"
+msgstr "ní fhéadfaí comhad '%s' a chruthú"
+
+#: bisect.c builtin/notes.c
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr "ní féidir 'show' a thosú le haghaidh réad '%s'"
+
+#: bisect.c builtin/merge.c
+#, c-format
+msgid "could not read file '%s'"
+msgstr "ní raibh in ann comhad '%s' a léamh"
+
+#: bisect.c
+msgid "reading bisect refs failed"
+msgstr "theip ar athbhreithnithe bisect a léamh"
+
+#: bisect.c
+#, c-format
+msgid "%s was both %s and %s\n"
+msgstr "Bhí %s %s agus %s araon\n"
+
+#: bisect.c
+#, c-format
+msgid ""
+"No testable commit found.\n"
+"Maybe you started with bad path arguments?\n"
+msgstr ""
+"Níor aimsíodh aon tiomantas intástála.\n"
+"B'fhéidir gur thosaigh tú le droch-argóintí cosáin?\n"
+
+#: bisect.c
+#, c-format
+msgid "(roughly %d step)"
+msgid_plural "(roughly %d steps)"
+msgstr[0] "(thart ar %d céim)"
+msgstr[1] "(thart ar %d céim)"
+msgstr[2] "(thart ar %d céim)"
+
+#. TRANSLATORS: the last %s will be replaced with "(roughly %d
+#. steps)" translation.
+#.
+#: bisect.c
+#, c-format
+msgid "Bisecting: %d revision left to test after this %s\n"
+msgid_plural "Bisecting: %d revisions left to test after this %s\n"
+msgstr[0] "Ag trasnú: %d athbhreithniú fágtha le tástáil tar éis an %s seo\n"
+msgstr[1] ""
+"Ag roinnt ina dhá leath: %d athbhreithniú fágtha le tástáil tar éis an %s "
+"seo\n"
+msgstr[2] ""
+"Ag roinnt ina dhá leath: %d athbhreithniú fágtha le tástáil tar éis an %s "
+"seo\n"
+
+#: blame.c
+msgid "--contents and --reverse do not blend well."
+msgstr "Ní chumasc --contents agus --reverse go maith."
+
+#: blame.c
+msgid "--reverse and --first-parent together require specified latest commit"
+msgstr ""
+"Éilíonn --reverse agus --first-parent le chéile an tiomantas sonraithe is "
+"déanaí"
+
+#: blame.c builtin/bisect.c builtin/commit.c builtin/log.c builtin/merge.c
+#: builtin/pack-objects.c builtin/shortlog.c midx-write.c pack-bitmap.c
+#: remote.c sequencer.c submodule.c
+msgid "revision walk setup failed"
+msgstr "theip ar socrú siúlóid ath"
+
+#: blame.c
+msgid ""
+"--reverse --first-parent together require range along first-parent chain"
+msgstr ""
+"--reverse --first-parent le chéile, teastaíonn raon feadh an tslabhra first-"
+"parent"
+
+#: blame.c
+#, c-format
+msgid "no such path %s in %s"
+msgstr "níl aon chosán den sórt sin %s i %s"
+
+#: blame.c
+#, c-format
+msgid "cannot read blob %s for path %s"
+msgstr "ní féidir le blob %s a léamh le haghaidh cosán %s"
+
+#: branch.c
+msgid ""
+"cannot inherit upstream tracking configuration of multiple refs when "
+"rebasing is requested"
+msgstr ""
+"ní féidir cumraíocht rianaithe suas srutha iolracha a oidhreacht nuair a "
+"iarrtar athbhunú"
+
+#: branch.c
+#, c-format
+msgid "not setting branch '%s' as its own upstream"
+msgstr "gan brainse '%s' a shocrú mar a thuas an sruth féin"
+
+#: branch.c
+#, c-format
+msgid "branch '%s' set up to track '%s' by rebasing."
+msgstr "bunaíodh brainse '%s' chun '%s' a rianú trí athbhunú."
+
+#: branch.c
+#, c-format
+msgid "branch '%s' set up to track '%s'."
+msgstr "bunaíodh brainse '%s' chun '%s' a rianú."
+
+#: branch.c
+#, c-format
+msgid "branch '%s' set up to track:"
+msgstr "bunaíodh brainse '%s' chun rianú:"
+
+#: branch.c
+msgid "unable to write upstream branch configuration"
+msgstr "in ann cumraíocht brainse suas srutha a scríobh"
+
+#: branch.c
+msgid ""
+"\n"
+"After fixing the error cause you may try to fix up\n"
+"the remote tracking information by invoking:"
+msgstr ""
+"\n"
+"Tar éis an chúis earráide a shocrú féadfaidh tú iarracht a dhéanamh socrú\n"
+"an fhaisnéis cianrianaithe trí ghairm a dhéanamh ar:"
+
+#: branch.c
+#, c-format
+msgid "asked to inherit tracking from '%s', but no remote is set"
+msgstr "iarradh ar rianú oidhreachta ó '%s', ach níl aon iargúlta socraithe"
+
+#: branch.c
+#, c-format
+msgid "asked to inherit tracking from '%s', but no merge configuration is set"
+msgstr ""
+"iarrtar ar rianú oidhreachta ó '%s', ach níl aon chumraíocht cumaisc "
+"socraithe"
+
+#: branch.c
+#, c-format
+msgid "not tracking: ambiguous information for ref '%s'"
+msgstr "gan rianú: faisnéis dhébhríoch le haghaidh tagairt '%s'"
+
+#. TRANSLATORS: This is a line listing a remote with duplicate
+#. refspecs in the advice message below. For RTL languages you'll
+#. probably want to swap the "%s" and leading " " space around.
+#.
+#. TRANSLATORS: This is line item of ambiguous object output
+#. from describe_ambiguous_object() above. For RTL languages
+#. you'll probably want to swap the "%s" and leading " " space
+#. around.
+#.
+#: branch.c object-name.c
+#, c-format
+msgid " %s\n"
+msgstr " %s\n"
+
+#. TRANSLATORS: The second argument is a \n-delimited list of
+#. duplicate refspecs, composed above.
+#.
+#: branch.c
+#, c-format
+msgid ""
+"There are multiple remotes whose fetch refspecs map to the remote\n"
+"tracking ref '%s':\n"
+"%s\n"
+"This is typically a configuration error.\n"
+"\n"
+"To support setting up tracking branches, ensure that\n"
+"different remotes' fetch refspecs map into different\n"
+"tracking namespaces."
+msgstr ""
+"Tá iomadúla iargúlta ann a bhfuil a léarscáil athfheidhmithe a fháil chuig "
+"an iargúlta\n"
+"tagairt rianaithe '%s':\n"
+"%s\n"
+"De ghnáth is earráid chumraíochta é seo.\n"
+"\n"
+"Chun tacú le brainsí rianaithe a bhunú, cinntigh go\n"
+"faigheann ciananna éagsúla léarscáil speisiúcháin go difriúil\n"
+"spaisí ainmneacha a rianú."
+
+#: branch.c
+#, c-format
+msgid "'%s' is not a valid branch name"
+msgstr "Ní ainm brainse bailí é '%s'"
+
+#: branch.c builtin/branch.c
+msgid "See `man git check-ref-format`"
+msgstr "Féach `man git check-ref-format`"
+
+#: branch.c
+#, c-format
+msgid "a branch named '%s' already exists"
+msgstr "tá brainse darb ainm '%s' ann cheana"
+
+#: branch.c
+#, c-format
+msgid "cannot force update the branch '%s' used by worktree at '%s'"
+msgstr ""
+"ní féidir an brainse '%s' a úsáideann crann oibre a nuashonrú a chur i "
+"bhfeidhm ag '%s'"
+
+#: branch.c
+#, c-format
+msgid "cannot set up tracking information; starting point '%s' is not a branch"
+msgstr ""
+"ní féidir faisnéis rianaithe a chur ar bun; ní brainse é pointe tosaigh '%s'"
+
+#: branch.c
+#, c-format
+msgid "the requested upstream branch '%s' does not exist"
+msgstr "níl an brainse suas srutha iarrtha '%s' ann"
+
+#: branch.c
+msgid ""
+"\n"
+"If you are planning on basing your work on an upstream\n"
+"branch that already exists at the remote, you may need to\n"
+"run \"git fetch\" to retrieve it.\n"
+"\n"
+"If you are planning to push out a new local branch that\n"
+"will track its remote counterpart, you may want to use\n"
+"\"git push -u\" to set the upstream config as you push."
+msgstr ""
+"\n"
+"Má tá tú ag pleanáil do chuid oibre a bhunú ar an suas sruth\n"
+"brainse atá ann cheana féin ag an iargúlta, b'fhéidir go mbeidh ort\n"
+"reáchtáil “git fetch” chun é a aisghabháil.\n"
+"\n"
+"Má tá tú ag pleanáil brainse áitiúil nua a bhrú amach\n"
+"rianóidh sé a mhacasamhail iargúlta, b'fhéidir gur mhaith leat a úsáid\n"
+"“git push -u” chun an cumraíocht suas sruth a shocrú agus tú ag brú."
+
+#: branch.c builtin/replace.c
+#, c-format
+msgid "not a valid object name: '%s'"
+msgstr "ní ainm réad bailí: '%s'"
+
+#: branch.c
+#, c-format
+msgid "ambiguous object name: '%s'"
+msgstr "ainm réad débhríoch: '%s'"
+
+#: branch.c
+#, c-format
+msgid "not a valid branch point: '%s'"
+msgstr "ní pointe brainse bailí: '%s'"
+
+#: branch.c
+#, c-format
+msgid "submodule '%s': unable to find submodule"
+msgstr "fo-mhodúl '%s': in ann fo-mhodúl a aimsiú"
+
+#: branch.c
+#, c-format
+msgid ""
+"You may try updating the submodules using 'git checkout --no-recurse-"
+"submodules %s && git submodule update --init'"
+msgstr ""
+"Is féidir leat triail a bhaint as na fo-mhodúil a nuashonrú ag baint úsáide "
+"as 'git checkout --no-recurse-submodules %s && git submodule update --init'"
+
+#: branch.c
+#, c-format
+msgid "submodule '%s': cannot create branch '%s'"
+msgstr "fo-mhodúl '%s': ní féidir brainse '%s' a chruthú"
+
+#: branch.c
+#, c-format
+msgid "'%s' is already used by worktree at '%s'"
+msgstr "Úsáidtear '%s' cheana féin ag an gcrann oibre ag '%s'"
+
+#: builtin/add.c
+msgid "git add [<options>] [--] <pathspec>..."
+msgstr "git add [<options>] [--]<pathspec>..."
+
+#: builtin/add.c
+#, c-format
+msgid "cannot chmod %cx '%s'"
+msgstr "ní féidir chmod %cx '%s'"
+
+#: builtin/add.c
+msgid "Unstaged changes after refreshing the index:"
+msgstr "Athruithe gan stáitse tar éis an t-innéacs a athnuachan:"
+
+#: builtin/add.c
+msgid "could not read the index"
+msgstr "ní raibh in ann an t-innéacs a léamh"
+
+#: builtin/add.c
+msgid "editing patch failed"
+msgstr "theip ar paiste eagarthóire"
+
+#: builtin/add.c read-cache.c
+#, c-format
+msgid "could not stat '%s'"
+msgstr "ní fhéadfaí '%s' a stát"
+
+#: builtin/add.c
+msgid "empty patch. aborted"
+msgstr "paiste folam. a ghabhrú"
+
+#: builtin/add.c
+#, c-format
+msgid "could not apply '%s'"
+msgstr "ní fhéadfaí '%s' a chur i bhfeidhm"
+
+#: builtin/add.c
+msgid "The following paths are ignored by one of your .gitignore files:\n"
+msgstr ""
+"Déanann ceann de do chomhaid .gitignore neamhaird ar na cosáin seo a "
+"leanas:\n"
+
+#: builtin/add.c builtin/clean.c builtin/fetch.c builtin/mv.c
+#: builtin/prune-packed.c builtin/pull.c builtin/push.c builtin/remote.c
+#: builtin/rm.c builtin/send-pack.c
+msgid "dry run"
+msgstr "rith tirim"
+
+#: builtin/add.c builtin/check-ignore.c builtin/commit.c
+#: builtin/count-objects.c builtin/fsck.c builtin/log.c builtin/mv.c
+#: builtin/read-tree.c builtin/refs.c
+msgid "be verbose"
+msgstr "a bheith inearálta"
+
+#: builtin/add.c
+msgid "interactive picking"
+msgstr "piocadh idirghní"
+
+#: builtin/add.c builtin/checkout.c builtin/reset.c
+msgid "select hunks interactively"
+msgstr "roghnaigh hunks idirghníomhach"
+
+#: builtin/add.c
+msgid "edit current diff and apply"
+msgstr "athraigh an dif reatha agus cuir i bhfeidhm"
+
+#: builtin/add.c
+msgid "allow adding otherwise ignored files"
+msgstr "ligean comhaid a neamhaird a chur leis"
+
+#: builtin/add.c
+msgid "update tracked files"
+msgstr "comhaid rianaithe a nuashonrú"
+
+#: builtin/add.c
+msgid "renormalize EOL of tracked files (implies -u)"
+msgstr ""
+"athormalú a dhéanamh ar EOL na gcomhaid rianaithe (tugann le tuiscint -u)"
+
+#: builtin/add.c
+msgid "record only the fact that the path will be added later"
+msgstr "ní thaifeadadh ach an fíric go gcuirfear an cosán leis níos déanaí"
+
+#: builtin/add.c
+msgid "add changes from all tracked and untracked files"
+msgstr "cuir athruithe ó gach comhad rianaithe agus neamhrianaithe"
+
+#: builtin/add.c
+msgid "ignore paths removed in the working tree (same as --no-all)"
+msgstr ""
+"neamhaird a dhéanamh ar chosáin a bhaintear sa chrann oibre (mar an gcéanna "
+"le --no-all)"
+
+#: builtin/add.c
+msgid "don't add, only refresh the index"
+msgstr "ná cuir leis, ach an t-innéacs a athnuachan"
+
+#: builtin/add.c
+msgid "just skip files which cannot be added because of errors"
+msgstr ""
+"ní gá ach comhaid a scipeáil nach féidir a chur leis mar gheall ar earráidí"
+
+#: builtin/add.c
+msgid "check if - even missing - files are ignored in dry run"
+msgstr ""
+"seiceáil an ndéantar neamhaird ar chomhaid - fiú ar iarraidh - ar iarraidh"
+
+#: builtin/add.c builtin/mv.c builtin/rm.c
+msgid "allow updating entries outside of the sparse-checkout cone"
+msgstr "ligean iontrálacha a nuashonrú lasmuigh den chón seiceála neamh"
+
+#: builtin/add.c builtin/update-index.c
+msgid "override the executable bit of the listed files"
+msgstr "an giotán infhorghníomhaithe de na comhaid liostaithe a sháraigh"
+
+#: builtin/add.c
+msgid "warn when adding an embedded repository"
+msgstr "rabhadh agus stór leabaithe á chur leis"
+
+#: builtin/add.c
+#, c-format
+msgid ""
+"You've added another git repository inside your current repository.\n"
+"Clones of the outer repository will not contain the contents of\n"
+"the embedded repository and will not know how to obtain it.\n"
+"If you meant to add a submodule, use:\n"
+"\n"
+"\tgit submodule add <url> %s\n"
+"\n"
+"If you added this path by mistake, you can remove it from the\n"
+"index with:\n"
+"\n"
+"\tgit rm --cached %s\n"
+"\n"
+"See \"git help submodule\" for more information."
+msgstr ""
+"Chuir tú stór git eile leis taobh istigh de do stór reatha.\n"
+"Ní bheidh ábhar i gclóin an stór seachtrach\n"
+"an stór leabaithe agus ní bheidh a fhios acu conas é a fháil.\n"
+"Má bhí sé i gceist agat fo-mhodúl a chur leis, bain úsáid as:\n"
+"\n"
+" <url>Cuir submodule git %s\n"
+"\n"
+"Má chuir tú an cosán seo le botún, is féidir leat é a bhaint as an\n"
+"innéacs le:\n"
+"\n"
+"\tgit rm --cached %s\n"
+"\n"
+"Féach “git help submodule” le haghaidh tuilleadh faisnéise."
+
+#: builtin/add.c
+#, c-format
+msgid "adding embedded git repository: %s"
+msgstr "stór git leabaithe a chur leis: %s"
+
+#: builtin/add.c
+msgid "Use -f if you really want to add them."
+msgstr "Úsáid -f más mian leat iad a chur leis i ndáiríre."
+
+#: builtin/add.c
+msgid "adding files failed"
+msgstr "theip ar chomhaid a chur leis"
+
+#: builtin/add.c
+#, c-format
+msgid "--chmod param '%s' must be either -x or +x"
+msgstr "Caithfidh --chmod param '%s' a bheith -x nó +x"
+
+#: builtin/add.c builtin/checkout.c builtin/commit.c builtin/reset.c
+#: builtin/rm.c builtin/stash.c
+#, c-format
+msgid "'%s' and pathspec arguments cannot be used together"
+msgstr "Ní féidir argóintí '%s' agus pathspec a úsáid le chéile"
+
+#: builtin/add.c
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr "Níl aon rud sonraithe, ní chuir aon rud leis.\n"
+
+#: builtin/add.c
+msgid "Maybe you wanted to say 'git add .'?"
+msgstr "B'fhéidir gur mhaith leat a rá 'git add. '?"
+
+#: builtin/add.c builtin/check-ignore.c builtin/checkout.c builtin/clean.c
+#: builtin/commit.c builtin/diff-tree.c builtin/grep.c builtin/mv.c
+#: builtin/reset.c builtin/rm.c builtin/submodule--helper.c read-cache.c
+#: rerere.c submodule.c
+msgid "index file corrupt"
+msgstr "comhad innéacs truaillithe"
+
+#: builtin/add.c builtin/am.c builtin/checkout.c builtin/clone.c
+#: builtin/commit.c builtin/stash.c merge.c rerere.c
+msgid "unable to write new index file"
+msgstr "in ann comhad innéacs nua a scríobh"
+
+#: builtin/am.c builtin/mailinfo.c mailinfo.c
+#, c-format
+msgid "bad action '%s' for '%s'"
+msgstr "droch-ghníomh '%s' le haghaidh '%s'"
+
+#: builtin/am.c builtin/blame.c builtin/fetch.c builtin/pack-objects.c
+#: builtin/pull.c builtin/revert.c config.c diff-merges.c gpg-interface.c
+#: ls-refs.c parallel-checkout.c sequencer.c setup.c
+#, c-format
+msgid "invalid value for '%s': '%s'"
+msgstr "luach neamhbhailí do '%s': '%s'"
+
+#: builtin/am.c builtin/commit.c builtin/merge.c sequencer.c
+#, c-format
+msgid "could not read '%s'"
+msgstr "ní raibh in ann '%s' a léamh"
+
+#: builtin/am.c
+msgid "could not parse author script"
+msgstr "ní raibh sé in ann script údair a pharsáil"
+
+#: builtin/am.c builtin/replace.c commit.c sequencer.c
+#, c-format
+msgid "could not parse %s"
+msgstr "ní fhéadfaí %s a pháirseáil"
+
+#: builtin/am.c
+#, c-format
+msgid "'%s' was deleted by the applypatch-msg hook"
+msgstr "Scriosadh '%s' ag an crúca applypatch-msg"
+
+#: builtin/am.c
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr "Líne ionchuir mífhoirmithe: '%s'."
+
+#: builtin/am.c
+#, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr "Theip ar nótaí a chóipeáil ó '%s' go '%s'"
+
+#: builtin/am.c
+msgid "fseek failed"
+msgstr "theip ar fseek"
+
+#: builtin/am.c builtin/rebase.c sequencer.c wrapper.c
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr "ní fhéadfaí '%s' a oscailt le haghaidh léamh"
+
+#: builtin/am.c builtin/rebase.c editor.c sequencer.c wrapper.c
+#, c-format
+msgid "could not open '%s' for writing"
+msgstr "ní féidir '%s' a oscailt le haghaidh scríbhneoireachta"
+
+#: builtin/am.c
+#, c-format
+msgid "could not parse patch '%s'"
+msgstr "ní raibh sé in ann paiste '%s' a pháirseáil"
+
+#: builtin/am.c
+msgid "Only one StGIT patch series can be applied at once"
+msgstr ""
+"Ní féidir ach sraith paiste STGit amháin a chur i bhfeidhm ag an am céanna"
+
+#: builtin/am.c
+msgid "invalid timestamp"
+msgstr "stampa ama neamhbhailí"
+
+#: builtin/am.c
+msgid "invalid Date line"
+msgstr "líne dáta neamhbhailí"
+
+#: builtin/am.c
+msgid "invalid timezone offset"
+msgstr "fhritháireamh crios ama neamh"
+
+#: builtin/am.c
+msgid "Patch format detection failed."
+msgstr "Theip ar bhrath formáid paiste."
+
+#: builtin/am.c builtin/clone.c
+#, c-format
+msgid "failed to create directory '%s'"
+msgstr "theip ar eolaire '%s' a chruthú"
+
+#: builtin/am.c
+msgid "Failed to split patches."
+msgstr "Theip ar phaistí a roinnt."
+
+#: builtin/am.c
+#, c-format
+msgid "When you have resolved this problem, run \"%s --continue\".\n"
+msgstr ""
+"Nuair a bheidh an fhadhb seo réitithe agat, reáchtáil “%s --continue”.\n"
+
+#: builtin/am.c
+#, c-format
+msgid "If you prefer to skip this patch, run \"%s --skip\" instead.\n"
+msgstr ""
+"Más fearr leat an paiste seo a scipeáil, reáchtáil “%s --skip” ina ionad.\n"
+
+#: builtin/am.c
+#, c-format
+msgid ""
+"To record the empty patch as an empty commit, run \"%s --allow-empty\".\n"
+msgstr ""
+"Chun an paiste folamh a thaifeadadh mar thiomantas folamh, reáchtáil “%s --"
+"allow-empty”.\n"
+
+#: builtin/am.c
+#, c-format
+msgid "To restore the original branch and stop patching, run \"%s --abort\"."
+msgstr ""
+"Chun an brainse bunaidh a chur ar ais agus stopadh le patáil, reáchtáil “%s "
+"--abort”."
+
+#: builtin/am.c
+msgid "Patch sent with format=flowed; space at the end of lines might be lost."
+msgstr ""
+"Seoladh paiste le formáid = sreabhadh; d'fhéadfaí spás ag deireadh na línte "
+"a chailleadh."
+
+#: builtin/am.c
+#, c-format
+msgid "missing author line in commit %s"
+msgstr "líne údair ar iarraidh i dtiomantas %s"
+
+#: builtin/am.c
+#, c-format
+msgid "invalid ident line: %.*s"
+msgstr "líne aitheantais neamhbhailí: %.*s"
+
+#: builtin/am.c builtin/checkout.c builtin/clone.c commit-graph.c
+#, c-format
+msgid "unable to parse commit %s"
+msgstr "nach féidir le tiomantas %s a pharsáil"
+
+#: builtin/am.c
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+"Níl na blobanna riachtanacha ag an stór chun titim siar ar chumasc trí "
+"bhealach."
+
+#: builtin/am.c
+msgid "Using index info to reconstruct a base tree..."
+msgstr "Eolas innéacs a úsáid chun bonn crann a athchóiriú..."
+
+#: builtin/am.c
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+"Ar chuir tú do phaiste in eagar de láimh?\n"
+"Ní bhaineann sé le blobs a taifeadtar ina innéacs."
+
+#: builtin/am.c
+msgid "Falling back to patching base and 3-way merge..."
+msgstr "Ag titim ar ais go bonn paiste agus cumasc trí bhealach..."
+
+#: builtin/am.c
+msgid "Failed to merge in the changes."
+msgstr "Theip ar na hathruithe a chumasc."
+
+#: builtin/am.c builtin/merge.c sequencer.c
+msgid "git write-tree failed to write a tree"
+msgstr "theip ar git write-tree crann a scríobh"
+
+#: builtin/am.c
+msgid "applying to an empty history"
+msgstr "iarratas a dhéanamh ar stair folamh"
+
+#: builtin/am.c builtin/commit.c builtin/merge.c builtin/replay.c sequencer.c
+msgid "failed to write commit object"
+msgstr "theip ar réad tiomanta a scríobh"
+
+#: builtin/am.c
+#, c-format
+msgid "cannot resume: %s does not exist."
+msgstr "ní féidir atosú: níl %s ann."
+
+#: builtin/am.c
+msgid "Commit Body is:"
+msgstr "Is é an Comhlacht Tiomanta:"
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#.
+#: builtin/am.c
+#, c-format
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: "
+msgstr ""
+"Cuir i bhfeidhm?[y]es/[n]o/[e]dit/[v]iew patch/[a]glacadh le gach rud: "
+
+#: builtin/am.c builtin/commit.c
+msgid "unable to write index file"
+msgstr "in ann comhad innéacs a scríobh"
+
+#: builtin/am.c
+#, c-format
+msgid "Dirty index: cannot apply patches (dirty: %s)"
+msgstr "Innéacs salach: ní féidir paistí a chur i bhfeidhm (salach: %s)"
+
+#: builtin/am.c
+#, c-format
+msgid "Skipping: %.*s"
+msgstr "Scipeáil: %.*s"
+
+#: builtin/am.c
+#, c-format
+msgid "Creating an empty commit: %.*s"
+msgstr "Tiomantas folamh a chruthú: %.*s"
+
+#: builtin/am.c
+msgid "Patch is empty."
+msgstr "Tá paiste folamh."
+
+#: builtin/am.c
+#, c-format
+msgid "Applying: %.*s"
+msgstr "Iarratas a dhéanamh: %.*s"
+
+#: builtin/am.c
+msgid "No changes -- Patch already applied."
+msgstr "Gan aon athruithe - paiste curtha i bhfeidhm cheana féin."
+
+#: builtin/am.c
+#, c-format
+msgid "Patch failed at %s %.*s"
+msgstr "Theip ar phaiste ag %s%.*s"
+
+#: builtin/am.c
+msgid "Use 'git am --show-current-patch=diff' to see the failed patch"
+msgstr ""
+"Úsáid 'git am --show-current-patch=diff' chun an paiste theip a fheiceáil"
+
+#: builtin/am.c
+msgid "No changes - recorded it as an empty commit."
+msgstr "Gan aon athruithe - taifeadadh é mar thiomantas folamh."
+
+#: builtin/am.c
+msgid ""
+"No changes - did you forget to use 'git add'?\n"
+"If there is nothing left to stage, chances are that something else\n"
+"already introduced the same changes; you might want to skip this patch."
+msgstr ""
+"Gan aon athruithe - ar ndearna tú dearmad 'git add' a úsáid?\n"
+"Mura bhfuil aon rud fágtha chun na céime, tá seans ann go bhfuil rud éigin "
+"eile\n"
+"tugadh na hathruithe céanna isteach cheana féin; b'fhéidir gur mhaith leat "
+"an paiste seo a scipeáil."
+
+#: builtin/am.c
+msgid ""
+"You still have unmerged paths in your index.\n"
+"You should 'git add' each file with resolved conflicts to mark them as "
+"such.\n"
+"You might run `git rm` on a file to accept \"deleted by them\" for it."
+msgstr ""
+"Tá cosáin neamh-chumasaithe agat fós i d'innéacs.\n"
+"Ba chóir duit gach comhad a 'chur leis 'git' le coinbhleachtaí réitithe chun "
+"iad a mharcáil mar sin.\n"
+"D'fhéadfá `git rm` a reáchtáil ar chomhad chun glacadh le “scriosta ag siad” "
+"dó."
+
+#: builtin/am.c builtin/reset.c
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr "Ní fhéadfaí réad '%s' a pháirseáil."
+
+#: builtin/am.c
+msgid "failed to clean index"
+msgstr "theip ar innéacs a ghlanadh"
+
+#: builtin/am.c
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+"Is cosúil gur bhogadh tú HEAD ón teip 'am' deireanach.\n"
+"Gan athfhillte chuig ORIG_HEAD"
+
+#: builtin/am.c builtin/bisect.c builtin/tag.c worktree.c
+#, c-format
+msgid "failed to read '%s'"
+msgstr "theip ar '%s' a léamh"
+
+#: builtin/am.c
+msgid "git am [<options>] [(<mbox> | <Maildir>)...]"
+msgstr "git am [<options>] [(<mbox> | <Maildir>)...]"
+
+#: builtin/am.c
+msgid "git am [<options>] (--continue | --skip | --abort)"
+msgstr "git am [<options>] (--continue | --skip | --abort)"
+
+#: builtin/am.c
+msgid "run interactively"
+msgstr "rith idirghníomhach"
+
+#: builtin/am.c
+msgid "bypass pre-applypatch and applypatch-msg hooks"
+msgstr "seachbhóthar crúcaí réamh-applypatch agus applypatch-msg"
+
+#: builtin/am.c builtin/cat-file.c
+msgid "historical option -- no-op"
+msgstr "rogha stairiúil -- no-op"
+
+#: builtin/am.c
+msgid "allow fall back on 3way merging if needed"
+msgstr "ligean titim siar ar chumasc 3bhealach más gá"
+
+#: builtin/am.c builtin/init-db.c builtin/prune-packed.c builtin/repack.c
+#: builtin/stash.c
+msgid "be quiet"
+msgstr "a bheith ciúin"
+
+#: builtin/am.c
+msgid "add a Signed-off-by trailer to the commit message"
+msgstr "cuir leantóir sínithe amach leis an teachtaireacht tiomanta"
+
+#: builtin/am.c
+msgid "recode into utf8 (default)"
+msgstr "athchóiriú isteach i utf8 (réamhshocraithe)"
+
+#: builtin/am.c
+msgid "pass -k flag to git-mailinfo"
+msgstr "pas bratach -k chuig git-mailinfo"
+
+#: builtin/am.c
+msgid "pass -b flag to git-mailinfo"
+msgstr "pas bratach -b chuig git-mailinfo"
+
+#: builtin/am.c
+msgid "pass -m flag to git-mailinfo"
+msgstr "pas bratach -m chuig git-mailinfo"
+
+#: builtin/am.c
+msgid "pass --keep-cr flag to git-mailsplit for mbox format"
+msgstr "pas bratach --keep-cr go git-mailsplit le haghaidh formáid mbox"
+
+#: builtin/am.c
+msgid "strip everything before a scissors line"
+msgstr "gach rud a tharraingt roimh líne siosúr"
+
+#: builtin/am.c
+msgid "pass it through git-mailinfo"
+msgstr "cuir ar aghaidh trí git-mailinfo"
+
+#: builtin/am.c
+msgid "pass it through git-apply"
+msgstr "cuir isteach é trí git-apply"
+
+#: builtin/am.c builtin/commit.c builtin/fmt-merge-msg.c builtin/grep.c
+#: builtin/merge.c builtin/pull.c builtin/rebase.c builtin/repack.c
+#: builtin/show-branch.c builtin/show-ref.c builtin/tag.c parse-options.h
+msgid "n"
+msgstr "n"
+
+#: builtin/am.c builtin/branch.c builtin/bugreport.c builtin/cat-file.c
+#: builtin/clone.c builtin/diagnose.c builtin/for-each-ref.c builtin/init-db.c
+#: builtin/ls-files.c builtin/ls-tree.c builtin/refs.c builtin/replace.c
+#: builtin/submodule--helper.c builtin/tag.c builtin/verify-tag.c
+msgid "format"
+msgstr "formáid"
+
+#: builtin/am.c
+msgid "format the patch(es) are in"
+msgstr "formáid atá na paistea/na paiste iontu"
+
+#: builtin/am.c
+msgid "override error message when patch failure occurs"
+msgstr "teachtaireacht earráide a shárú nuair a tharlaíonn teip"
+
+#: builtin/am.c
+msgid "continue applying patches after resolving a conflict"
+msgstr "leanúint ar aghaidh ag cur paistí a chur i bhfeidhm tar"
+
+#: builtin/am.c
+msgid "synonyms for --continue"
+msgstr "comhchiallaigh do --continue"
+
+#: builtin/am.c
+msgid "skip the current patch"
+msgstr "scipeáil an paiste reatha"
+
+#: builtin/am.c
+msgid "restore the original branch and abort the patching operation"
+msgstr ""
+"an bhrainse bunaidh a chur ar ais agus cuir deireadh leis an oibríocht paiste"
+
+#: builtin/am.c
+msgid "abort the patching operation but keep HEAD where it is"
+msgstr ""
+"déan deireadh leis an oibríocht paisteála ach coinnigh CEAD san áit a bhfuil "
+"sé"
+
+#: builtin/am.c
+msgid "show the patch being applied"
+msgstr "taispeáin an paiste atá á chur i bhfeidhm"
+
+#: builtin/am.c
+msgid "try to apply current patch again"
+msgstr "déan iarracht paiste reatha a chur i bhfeidhm"
+
+#: builtin/am.c
+msgid "record the empty patch as an empty commit"
+msgstr "taifeadadh an paiste folamh mar thiomantas folamh"
+
+#: builtin/am.c
+msgid "lie about committer date"
+msgstr "bréag faoi dháta an choimisiúnaithe"
+
+#: builtin/am.c
+msgid "use current timestamp for author date"
+msgstr "bain úsáid as stampa ama reatha le haghaidh dáta an údair"
+
+#: builtin/am.c builtin/commit-tree.c builtin/commit.c builtin/merge.c
+#: builtin/pull.c builtin/rebase.c builtin/revert.c builtin/tag.c
+msgid "key-id"
+msgstr "id eochair"
+
+#: builtin/am.c builtin/rebase.c
+msgid "GPG-sign commits"
+msgstr "Tiomanta comhartha GPG-Comhartha"
+
+#: builtin/am.c
+msgid "how to handle empty patches"
+msgstr "conas paistí folamh a láimhseáil"
+
+#: builtin/am.c
+msgid "(internal use for git-rebase)"
+msgstr "(úsáid inmheánach le haghaidh git-rebase)"
+
+#: builtin/am.c
+msgid ""
+"The -b/--binary option has been a no-op for long time, and\n"
+"it will be removed. Please do not use it anymore."
+msgstr ""
+"Tá an rogha -b/--binary neamh-op le fada an lá, agus\n"
+"bainfear é. Ná húsáid é níos mó le do thoil."
+
+#: builtin/am.c
+msgid "failed to read the index"
+msgstr "theip ar an t-innéacs a léamh"
+
+#: builtin/am.c
+#, c-format
+msgid "previous rebase directory %s still exists but mbox given."
+msgstr "eolaire rebase roimhe seo %s ann fós ach tugadh mbox."
+
+#: builtin/am.c
+#, c-format
+msgid ""
+"Stray %s directory found.\n"
+"Use \"git am --abort\" to remove it."
+msgstr ""
+"Fuarthas eolaire %s stray.\n"
+"Úsáid “git am --abort” chun é a bhaint."
+
+#: builtin/am.c
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr "Réiteach oibríocht nach bhfuil ar siúl, níl muid ag atosú."
+
+#: builtin/am.c
+msgid "interactive mode requires patches on the command line"
+msgstr "éilíonn modh idirghníomhach paistí ar an líne ordaithe"
+
+#: builtin/apply.c
+msgid "git apply [<options>] [<patch>...]"
+msgstr "git feidhm [<options>] [<patch>...]"
+
+#: builtin/archive.c diagnose.c
+msgid "could not redirect output"
+msgstr "ní fhéadfaí aschur a atreorú"
+
+#: builtin/archive.c
+msgid "git archive: expected ACK/NAK, got a flush packet"
+msgstr "cartlann git: ag súil le ACK/NAK, fuair sé paicéad sruthán"
+
+#: builtin/archive.c
+#, c-format
+msgid "git archive: NACK %s"
+msgstr "git archive: NACK %s"
+
+#: builtin/archive.c
+msgid "git archive: protocol error"
+msgstr "git cartlann: earráid prótacal"
+
+#: builtin/archive.c
+msgid "git archive: expected a flush"
+msgstr "git archive: bhíothas ag súil le sruthlú"
+
+#: builtin/backfill.c
+msgid "git backfill [--min-batch-size=<n>] [--[no-]sparse]"
+msgstr "git backfill [--min-batch-size=<n>] [-- [no-] neart]"
+
+#: builtin/backfill.c
+msgid "problem loading sparse-checkout"
+msgstr "fadhb ag luchtú seiceáil neamhchoiti"
+
+#: builtin/backfill.c
+msgid "Minimum number of objects to request at a time"
+msgstr "Líon íosta rudaí le iarraidh ag an am"
+
+#: builtin/backfill.c
+msgid "Restrict the missing objects to the current sparse-checkout"
+msgstr "Cuir srian ar na rudaí atá in easnamh don tseiceáil neamhchoitianta"
+
+#: builtin/bisect.c
+msgid ""
+"git bisect start [--term-(new|bad)=<term> --term-(old|good)=<term>] [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--] [<pathspec>...]"
+msgstr ""
+"git bisect start [--term-(new|bad)=<term> --term-(old|good)=<term>] [--no-"
+"checkout] [--first-parent] [<bad> [<good>...]] [--] [<pathspec>...]"
+
+#: builtin/bisect.c
+msgid "git bisect (good|bad) [<rev>...]"
+msgstr "<rev>git bisect (maith|olc) [...]"
+
+#: builtin/bisect.c
+msgid "git bisect skip [(<rev>|<range>)...]"
+msgstr "git bisect skip [(<rev>|<range>)...]"
+
+#: builtin/bisect.c
+msgid "git bisect reset [<commit>]"
+msgstr "<commit>athshocrú git bisect []"
+
+#: builtin/bisect.c
+msgid "git bisect replay <logfile>"
+msgstr "athsheinm git bisect <logfile>"
+
+#: builtin/bisect.c
+msgid "git bisect run <cmd> [<arg>...]"
+msgstr "git bisect a rith <cmd>[<arg>...]"
+
+#: builtin/bisect.c
+#, c-format
+msgid "cannot open file '%s' in mode '%s'"
+msgstr "ní féidir comhad '%s' a oscailt sa mhodh '%s'"
+
+#: builtin/bisect.c
+#, c-format
+msgid "could not write to file '%s'"
+msgstr "ní fhéadfaí scríobh chuig comhad '%s'"
+
+#: builtin/bisect.c
+#, c-format
+msgid "cannot open file '%s' for reading"
+msgstr "ní féidir comhad '%s' a oscailt le haghaidh léamh"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' is not a valid term"
+msgstr "Ní téarma bailí é '%s'"
+
+#: builtin/bisect.c
+#, c-format
+msgid "can't use the builtin command '%s' as a term"
+msgstr "ní féidir an t-ordú bunaithe '%s' a úsáid mar théarma"
+
+#: builtin/bisect.c
+#, c-format
+msgid "can't change the meaning of the term '%s'"
+msgstr "ní féidir le brí an téarma '%s' a athrú"
+
+#: builtin/bisect.c
+msgid "please use two different terms"
+msgstr "bain úsáid as dhá théarma éagsúla"
+
+#: builtin/bisect.c
+#, c-format
+msgid "We are not bisecting.\n"
+msgstr "Nílimid ag déileáil.\n"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' is not a valid commit"
+msgstr "Ní gealltanas bailí é '%s'"
+
+#: builtin/bisect.c
+#, c-format
+msgid ""
+"could not check out original HEAD '%s'. Try 'git bisect reset <commit>'."
+msgstr ""
+"ní fhéadfaí an HEAD bunaidh '%s' a sheiceáil. <commit>Bain triail as 'git "
+"bisect reset '."
+
+#: builtin/bisect.c
+#, c-format
+msgid "Bad bisect_write argument: %s"
+msgstr "Droch-argóint bisect_write: %s"
+
+#: builtin/bisect.c
+#, c-format
+msgid "couldn't get the oid of the rev '%s'"
+msgstr "ní raibh in ann oid an rev '%s' a fháil"
+
+#: builtin/bisect.c
+#, c-format
+msgid "couldn't open the file '%s'"
+msgstr "ní raibh in ann an comhad '%s' a oscailt"
+
+#: builtin/bisect.c
+#, c-format
+msgid "Invalid command: you're currently in a %s/%s bisect"
+msgstr "Ordú neamhbhailí: tá tú i mbeagán %s/%s faoi láthair"
+
+#: builtin/bisect.c
+#, c-format
+msgid ""
+"You need to give me at least one %s and %s revision.\n"
+"You can use \"git bisect %s\" and \"git bisect %s\" for that."
+msgstr ""
+"Ní mór duit athbhreithniú %s agus %s amháin ar a laghad a thabhairt dom.\n"
+"Is féidir leat “git bisect %s” agus “git bisect %s” a úsáid chuige sin."
+
+#: builtin/bisect.c
+#, c-format
+msgid ""
+"You need to start by \"git bisect start\".\n"
+"You then need to give me at least one %s and %s revision.\n"
+"You can use \"git bisect %s\" and \"git bisect %s\" for that."
+msgstr ""
+"Ní mór duit tosú ag “git bisect start”.\n"
+"Ansin ní mór duit athbhreithniú %s agus %s amháin ar a laghad a thabhairt "
+"dom.\n"
+"Is féidir leat “git bisect %s” agus “git bisect %s” a úsáid chuige sin."
+
+#: builtin/bisect.c
+#, c-format
+msgid "bisecting only with a %s commit"
+msgstr "ag déileáil ach amháin le tiomantas %s"
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#.
+#: builtin/bisect.c
+msgid "Are you sure [Y/n]? "
+msgstr "An bhfuil tú cinnte [Y/n]? "
+
+#: builtin/bisect.c
+msgid "status: waiting for both good and bad commits\n"
+msgstr "stádas: ag fanacht le tiomáintí mhaith agus tiomáintí dona\n"
+
+#: builtin/bisect.c
+#, c-format
+msgid "status: waiting for bad commit, %d good commit known\n"
+msgid_plural "status: waiting for bad commit, %d good commits known\n"
+msgstr[0] "stádas: ag fanacht le droch-thiomnadh, %d dea-thiomnadh ar eolas\n"
+msgstr[1] ""
+"stádas: ag fanacht le droch-thiomantas, %d dea-thiomantas ar eolas\n"
+msgstr[2] ""
+"stádas: ag fanacht le droch-thiomantas, %d dea-thiomantas ar eolas\n"
+
+#: builtin/bisect.c
+msgid "status: waiting for good commit(s), bad commit known\n"
+msgstr "stádas: ag fanacht le tiomáintí maith, droch-tiomantas ar eolas\n"
+
+#: builtin/bisect.c
+msgid "no terms defined"
+msgstr "aon téarmaí sainmhínithe"
+
+#: builtin/bisect.c
+#, c-format
+msgid ""
+"Your current terms are %s for the old state\n"
+"and %s for the new state.\n"
+msgstr ""
+"Is iad na téarmaí reatha %s don seanstát\n"
+"agus %s don stát nua.\n"
+
+#: builtin/bisect.c
+#, c-format
+msgid ""
+"invalid argument %s for 'git bisect terms'.\n"
+"Supported options are: --term-good|--term-old and --term-bad|--term-new."
+msgstr ""
+"argóint neamhbhailí %s le haghaidh 'git bisect terms'.\n"
+"Is iad na roghanna tacaithe ná: --term-good|--term-old agus --term-bad|--"
+"term-new."
+
+#: builtin/bisect.c
+#, c-format
+msgid "could not open '%s' for appending"
+msgstr "ní fhéadfaí '%s' a oscailt le haghaidh cur isteach"
+
+#: builtin/bisect.c
+msgid "'' is not a valid term"
+msgstr "'' ní téarma bailí é"
+
+#: builtin/bisect.c
+#, c-format
+msgid "unrecognized option: '%s'"
+msgstr "rogha gan aithint: '%s'"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' does not appear to be a valid revision"
+msgstr "Ní cosúil gur athbhreithniú bailí é '%s'"
+
+#: builtin/bisect.c
+msgid "bad HEAD - I need a HEAD"
+msgstr "droch HEAD - Teastaíonn HEAD uaim"
+
+#: builtin/bisect.c
+#, c-format
+msgid "checking out '%s' failed. Try 'git bisect start <valid-branch>'."
+msgstr ""
+"theip ar '%s' a sheiceáil. <valid-branch>Bain triail as 'git bisect start '."
+
+#: builtin/bisect.c
+msgid "bad HEAD - strange symbolic ref"
+msgstr "bad HEAD - tagairt siombalach aisteach"
+
+#: builtin/bisect.c
+#, c-format
+msgid "invalid ref: '%s'"
+msgstr "tagairt neamhbhailí: '%s'"
+
+#: builtin/bisect.c
+msgid "You need to start by \"git bisect start\"\n"
+msgstr "Ní mór duit tosú ag “git bisect start”\n"
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#.
+#: builtin/bisect.c
+msgid "Do you want me to do it for you [Y/n]? "
+msgstr "An dteastaíonn uait go ndéanfaidh mé é duit [Y/n]? "
+
+#: builtin/bisect.c
+msgid "Please call `--bisect-state` with at least one argument"
+msgstr "Glaoigh ar `--bisect-state` le do thoil le argóint amháin ar a laghad"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'git bisect %s' can take only one argument."
+msgstr "Ní féidir le 'git bisect %s' ach argóint amháin a ghlacadh."
+
+#: builtin/bisect.c
+#, c-format
+msgid "Bad rev input: %s"
+msgstr "Droch-ionchur rev: %s"
+
+#: builtin/bisect.c
+#, c-format
+msgid "Bad rev input (not a commit): %s"
+msgstr "Droch-ionchur rev (ní tiomantas): %s"
+
+#: builtin/bisect.c
+msgid "We are not bisecting."
+msgstr "Nílimid ag déileáil."
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s'?? what are you talking about?"
+msgstr "'%s'?? cad atá tú ag caint faoi?"
+
+#: builtin/bisect.c
+#, c-format
+msgid "cannot read file '%s' for replaying"
+msgstr "ní féidir comhad '%s' a léamh le haghaidh athsheinm"
+
+#: builtin/bisect.c
+#, c-format
+msgid "running %s\n"
+msgstr "ag rith %s\n"
+
+#: builtin/bisect.c
+msgid "bisect run failed: no command provided."
+msgstr "theip ar rith bioctha: níl aon ordú curtha ar fáil."
+
+#: builtin/bisect.c
+#, c-format
+msgid "unable to verify %s on good revision"
+msgstr "nach féidir %s a fhíorú ar athbhreithniú maith"
+
+#: builtin/bisect.c
+#, c-format
+msgid "bogus exit code %d for good revision"
+msgstr "cód imeachta bréagach %d le haghaidh athbhreithniú maith"
+
+#: builtin/bisect.c
+#, c-format
+msgid "bisect run failed: exit code %d from %s is < 0 or >= 128"
+msgstr "< 0 or >Theip ar rith bioctha: is é an cód imeachta %d ó %s = 128"
+
+#: builtin/bisect.c
+#, c-format
+msgid "cannot open file '%s' for writing"
+msgstr "ní féidir comhad '%s' a oscailt le haghaidh scríobh"
+
+#: builtin/bisect.c
+msgid "bisect run cannot continue any more"
+msgstr "ní féidir le rith bisect leanúint ar aghaidh níos mó"
+
+#: builtin/bisect.c
+msgid "bisect run success"
+msgstr "rath reatha dhéagsúil"
+
+#: builtin/bisect.c
+msgid "bisect found first bad commit"
+msgstr "fuarthas bisect an chéad droch-thiomantas"
+
+#: builtin/bisect.c
+#, c-format
+msgid "bisect run failed: 'git bisect %s' exited with error code %d"
+msgstr "theip ar rith bisect: D'éirigh 'git bisect %s' le cód earráide %d"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires either no argument or a commit"
+msgstr "Ní éilíonn '%s' aon argóint ná tiomantas"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 or 1 argument"
+msgstr "Éilíonn '%s' argóint 0 nó 1"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' requires 0 arguments"
+msgstr "Éilíonn '%s' 0 argóint"
+
+#: builtin/bisect.c
+msgid "no logfile given"
+msgstr "níl aon logfile tugtha"
+
+#: builtin/bisect.c
+#, c-format
+msgid "'%s' failed: no command provided."
+msgstr "Theip ar '%s': níl aon ordú curtha ar fáil."
+
+#: builtin/bisect.c
+msgid "need a command"
+msgstr "teastaíonn ordú"
+
+#: builtin/bisect.c builtin/cat-file.c
+#, c-format
+msgid "unknown command: '%s'"
+msgstr "ordú anaithnid: '%s'"
+
+#: builtin/blame.c
+msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
+msgstr "git an mille <options>án [<rev-opts>] [<rev>] [] [--] <file>"
+
+#: builtin/blame.c
+msgid "git annotate [<options>] [<rev-opts>] [<rev>] [--] <file>"
+msgstr "git annotate [<options>] [] [<rev-opts><rev>] [--] <file>"
+
+#: builtin/blame.c
+msgid "<rev-opts> are documented in git-rev-list(1)"
+msgstr "<rev-opts>iad doiciméadaithe i git-rev-list (1)"
+
+#: builtin/blame.c
+#, c-format
+msgid "expecting a color: %s"
+msgstr "ag súil le dath: %s"
+
+#: builtin/blame.c
+msgid "must end with a color"
+msgstr "caithfidh deireadh a chur le dath"
+
+#: builtin/blame.c
+#, c-format
+msgid "cannot find revision %s to ignore"
+msgstr "ní féidir athbhreithniú %s a fháil le neamhair"
+
+#: builtin/blame.c
+msgid "show blame entries as we find them, incrementally"
+msgstr "taispeáint iontrálacha milleán de réir mar a aimsímid iad, go chéile"
+
+#: builtin/blame.c
+msgid "do not show object names of boundary commits (Default: off)"
+msgstr ""
+"ná taispeáin ainmneacha réada na ngealltanais teorann (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "do not treat root commits as boundaries (Default: off)"
+msgstr ""
+"ná déileáil le gealltanais fréimhe mar theorainneacha (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "show work cost statistics"
+msgstr "taispeáin staitisticí costas oibre"
+
+#: builtin/blame.c builtin/checkout.c builtin/clone.c builtin/commit-graph.c
+#: builtin/fetch.c builtin/merge.c builtin/multi-pack-index.c builtin/pull.c
+#: builtin/push.c builtin/remote.c builtin/send-pack.c
+msgid "force progress reporting"
+msgstr "tuairisciú dul chun cinn"
+
+#: builtin/blame.c
+msgid "show output score for blame entries"
+msgstr "taispeáin scór aschuir d'iontrálacha mille"
+
+#: builtin/blame.c
+msgid "show original filename (Default: auto)"
+msgstr "taispeáin ainm comhaid bunaidh (Réamhshocraithe: auto)"
+
+#: builtin/blame.c
+msgid "show original linenumber (Default: off)"
+msgstr "taispeáin uimhir líne bunaidh (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "show in a format designed for machine consumption"
+msgstr "taispeáint i bhformáid atá deartha le haghaidh tomhaltas meaisín"
+
+#: builtin/blame.c
+msgid "show porcelain format with per-line commit information"
+msgstr "formáid poircealláin a thaispeáint le faisnéis tiomanta"
+
+#: builtin/blame.c
+msgid "use the same output mode as git-annotate (Default: off)"
+msgstr ""
+"bain úsáid as an modh aschuir céanna le git-annotate (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "show raw timestamp (Default: off)"
+msgstr "taispeáin ama amh (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "show long commit SHA1 (Default: off)"
+msgstr "taispeáin tiomantas fada SHA1 (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "suppress author name and timestamp (Default: off)"
+msgstr "ainm an údair agus stampa ama a chur faoi chois (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "show author email instead of name (Default: off)"
+msgstr "taispeáin ríomhphost an údair in ionad ainm (Réamhshocraithe: as)"
+
+#: builtin/blame.c
+msgid "ignore whitespace differences"
+msgstr "neamhaird a dhéanamh ar dhifríochtaí spás b"
+
+#: builtin/blame.c builtin/clone.c builtin/log.c
+msgid "rev"
+msgstr "rev"
+
+#: builtin/blame.c
+msgid "ignore <rev> when blaming"
+msgstr "neamhaird a <rev>dhéanamh agus an milleán"
+
+#: builtin/blame.c
+msgid "ignore revisions from <file>"
+msgstr "neamhaird ar athbhreithnithe <file>"
+
+#: builtin/blame.c
+msgid "color redundant metadata from previous line differently"
+msgstr "meiteashonraí iomarcach dath ó líne roimhe seo ar bheal"
+
+#: builtin/blame.c
+msgid "color lines by age"
+msgstr "línte datha de réir aois"
+
+#: builtin/blame.c
+msgid "spend extra cycles to find better match"
+msgstr "timthriallta breise a chaitheamh chun meaitseáil níos fearr"
+
+#: builtin/blame.c
+msgid "use revisions from <file> instead of calling git-rev-list"
+msgstr "athbhreithnithe a úsáid as in <file>ionad glaoch ar git-rev-list"
+
+#: builtin/blame.c
+msgid "use <file>'s contents as the final image"
+msgstr "úsáid <file>ábhar mar an íomhá deiridh"
+
+#: builtin/blame.c
+msgid "score"
+msgstr "scór"
+
+#: builtin/blame.c
+msgid "find line copies within and across files"
+msgstr "faigh cóipeanna líne laistigh de chomhaid agus trasna"
+
+#: builtin/blame.c
+msgid "find line movements within and across files"
+msgstr "faigh gluaiseachtaí líne laistigh de chomhaid agus trasna"
+
+#: builtin/blame.c
+msgid "range"
+msgstr "raon"
+
+#: builtin/blame.c
+msgid "process only line range <start>,<end> or function :<funcname>"
+msgstr "ach raon líne, nó feidh <start>m a <end>phróiseáil: <funcname>"
+
+#: builtin/blame.c
+msgid "--progress can't be used with --incremental or porcelain formats"
+msgstr "Ní féidir --progress a úsáid le formáidí --incremental nó poircealláin"
+
+#. 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
+msgid "4 years, 11 months ago"
+msgstr "4 bliana, 11 mhí ó shin"
+
+#: builtin/blame.c
+#, c-format
+msgid "file %s has only %lu line"
+msgid_plural "file %s has only %lu lines"
+msgstr[0] "comhad %s níl ach %lu líne"
+msgstr[1] "comhad %s níl ach %lu línte"
+msgstr[2] "comhad %s níl ach %lu línte"
+
+#: builtin/blame.c
+msgid "Blaming lines"
+msgstr "An milleán ar línte"
+
+#: builtin/branch.c
+msgid "git branch [<options>] [-r | -a] [--merged] [--no-merged]"
+msgstr "git branch [<options>] [-r | -a] [--merged] [--no-merged]"
+
+#: builtin/branch.c
+msgid ""
+"git branch [<options>] [-f] [--recurse-submodules] <branch-name> [<start-"
+"point>]"
+msgstr ""
+"git branch [<options>] [-f] [--recurse-submodules] <branch-name> [<start-"
+"point>]"
+
+#: builtin/branch.c
+msgid "git branch [<options>] [-l] [<pattern>...]"
+msgstr "git branch [<options>] [-l] [<pattern>...]"
+
+#: builtin/branch.c
+msgid "git branch [<options>] [-r] (-d | -D) <branch-name>..."
+msgstr "git branch [<options>] [-r] (-d | -D) <branch-name>..."
+
+#: builtin/branch.c
+msgid "git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"
+msgstr "git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"
+
+#: builtin/branch.c
+msgid "git branch [<options>] (-c | -C) [<old-branch>] <new-branch>"
+msgstr "git branch [<options>] (-c | -C) [<old-branch>] <new-branch>"
+
+#: builtin/branch.c
+msgid "git branch [<options>] [-r | -a] [--points-at]"
+msgstr "git branch [<options>] [-r | -a] [--points-at]"
+
+#: builtin/branch.c
+msgid "git branch [<options>] [-r | -a] [--format]"
+msgstr "git branch [<options>] [-r | -a] [--format]"
+
+#: builtin/branch.c
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but not yet merged to HEAD"
+msgstr ""
+"brainse '%s' a bhfuil cumasc orthu a scriosadh\n"
+" '%s', ach níor chumasc le HEAD go fóill"
+
+#: builtin/branch.c
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD"
+msgstr ""
+"gan brainse '%s' a scriosadh nach bhfuil cumasc fós leis\n"
+" '%s', cé go ndéantar é a chumasc le HEAD"
+
+#: builtin/branch.c
+#, c-format
+msgid "couldn't look up commit object for '%s'"
+msgstr "ní raibh in ann réad tiomanta a lorg suas le haghaidh '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid "the branch '%s' is not fully merged"
+msgstr "níl an brainse '%s' cumaisc go hiomlán"
+
+#: builtin/branch.c
+#, c-format
+msgid "If you are sure you want to delete it, run 'git branch -D %s'"
+msgstr ""
+"Má tá tú cinnte gur mhaith leat é a scriosadh, reáchtáil 'git branch -D %s'"
+
+#: builtin/branch.c
+msgid "update of config-file failed"
+msgstr "theip ar nuashonrú comhad config-file"
+
+#: builtin/branch.c
+msgid "cannot use -a with -d"
+msgstr "ní féidir -a a úsáid le -d"
+
+#: builtin/branch.c
+#, c-format
+msgid "cannot delete branch '%s' used by worktree at '%s'"
+msgstr "ní féidir brainse '%s' a úsáideann crann oibre ag '%s' a scriosadh"
+
+#: builtin/branch.c
+#, c-format
+msgid "remote-tracking branch '%s' not found"
+msgstr "níor aimsíodh brainse cianrianaithe '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid ""
+"branch '%s' not found.\n"
+"Did you forget --remote?"
+msgstr ""
+"níor aimsíodh brainse '%s'.\n"
+"Ar ndearna tú dearmad ar --remote?"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch '%s' not found"
+msgstr "níor aimsíodh brainse '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid "Deleted remote-tracking branch %s (was %s).\n"
+msgstr "Brainse cianrianaithe scriosta %s (bhí %s).\n"
+
+#: builtin/branch.c
+#, c-format
+msgid "Deleted branch %s (was %s).\n"
+msgstr "Brainse %s scriosta (%s ba é).\n"
+
+#: builtin/branch.c builtin/tag.c
+msgid "unable to parse format string"
+msgstr "in ann teaghrán formáide a pháirseáil"
+
+#: builtin/branch.c
+msgid "could not resolve HEAD"
+msgstr "ní fhéadfaí HEAD a réiteach"
+
+#: builtin/branch.c
+#, c-format
+msgid "HEAD (%s) points outside of refs/heads/"
+msgstr "Pointí HEAD (%s) lasmuigh de refs/heads/"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch %s is being rebased at %s"
+msgstr "tá brainse %s á athbhunú ag %s"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch %s is being bisected at %s"
+msgstr "tá brainse %s á dhíscaoileadh ag %s"
+
+#: builtin/branch.c
+#, c-format
+msgid "HEAD of working tree %s is not updated"
+msgstr "Níl CEANN an chrainn oibre %s nuashonraithe"
+
+#: builtin/branch.c
+#, c-format
+msgid "invalid branch name: '%s'"
+msgstr "ainm brainse neamhbhailí: '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid "no commit on branch '%s' yet"
+msgstr "níl aon gealltanas ar bhrainse '%s' go fóill"
+
+#: builtin/branch.c
+#, c-format
+msgid "no branch named '%s'"
+msgstr "níl aon bhrainse darb ainm '%s'"
+
+#: builtin/branch.c
+msgid "branch rename failed"
+msgstr "theip ar athainmniú brainse"
+
+#: builtin/branch.c
+msgid "branch copy failed"
+msgstr "theip ar chóip brainse"
+
+#: builtin/branch.c
+#, c-format
+msgid "created a copy of a misnamed branch '%s'"
+msgstr "chruthaigh cóip de bhrainse mí-ainmnithe '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid "renamed a misnamed branch '%s' away"
+msgstr "athainmnigh brainse mí-ainmnithe '%s' ar shiúl"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch renamed to %s, but HEAD is not updated"
+msgstr "athainmníodh brainse go %s, ach níl HEAD nuashonraithe"
+
+#: builtin/branch.c
+msgid "branch is renamed, but update of config-file failed"
+msgstr "athainmnítear brainse, ach theip ar nuashonrú ar chomhad config-file"
+
+#: builtin/branch.c
+msgid "branch is copied, but update of config-file failed"
+msgstr "cóipeáiltear brainse, ach theip ar nuashonrú comhad config-file"
+
+#: builtin/branch.c
+#, c-format
+msgid ""
+"Please edit the description for the branch\n"
+" %s\n"
+"Lines starting with '%s' will be stripped.\n"
+msgstr ""
+"Cuir an tuairisc don bhrainse in eagar\n"
+" %s\n"
+"Déanfar línte a thosaíonn le '%s' a scriosadh.\n"
+
+#: builtin/branch.c
+msgid "Generic options"
+msgstr "Roghanna cineálacha"
+
+#: builtin/branch.c
+msgid "show hash and subject, give twice for upstream branch"
+msgstr "taispeáin hash agus ábhar, tabhair faoi dhó don bhrainse suas srutha"
+
+#: builtin/branch.c
+msgid "suppress informational messages"
+msgstr "teachtaireachtaí faisnéise a chur"
+
+#: builtin/branch.c builtin/checkout.c builtin/submodule--helper.c
+msgid "set branch tracking configuration"
+msgstr "cumraíocht rianaithe brainse a shoc"
+
+#: builtin/branch.c
+msgid "do not use"
+msgstr "ná húsáid"
+
+#: builtin/branch.c
+msgid "upstream"
+msgstr "suas sruth"
+
+#: builtin/branch.c
+msgid "change the upstream info"
+msgstr "athraigh an fhaisnéis suas sruth"
+
+#: builtin/branch.c
+msgid "unset the upstream info"
+msgstr "díshocraigh an fhaisnéis suas sruth"
+
+#: builtin/branch.c
+msgid "use colored output"
+msgstr "úsáid aschur daite"
+
+#: builtin/branch.c
+msgid "act on remote-tracking branches"
+msgstr "gníomhú ar bhrainsí cianrianaithe"
+
+#: builtin/branch.c
+msgid "print only branches that contain the commit"
+msgstr "ach brainsí a phriontáil ina bhfuil an tiomantas"
+
+#: builtin/branch.c
+msgid "print only branches that don't contain the commit"
+msgstr "ach brainsí a phriontáil nach bhfuil an tiomantas"
+
+#: builtin/branch.c
+msgid "Specific git-branch actions:"
+msgstr "Gníomhartha sonracha git-branch:"
+
+#: builtin/branch.c
+msgid "list both remote-tracking and local branches"
+msgstr "liostáil brainsí cianrianaithe agus áitiúla araon"
+
+#: builtin/branch.c
+msgid "delete fully merged branch"
+msgstr "scrios brainse lánchumaisc"
+
+#: builtin/branch.c
+msgid "delete branch (even if not merged)"
+msgstr "brainse a scriosadh (fiú mura bhfuil sé cumasaithe)"
+
+#: builtin/branch.c
+msgid "move/rename a branch and its reflog"
+msgstr "brainse a bhogadh/athainmniú agus a athainmniú"
+
+#: builtin/branch.c
+msgid "move/rename a branch, even if target exists"
+msgstr "brainse a bhogadh/athainmniú, fiú má tá sprioc ann"
+
+#: builtin/branch.c builtin/for-each-ref.c builtin/tag.c
+msgid "do not output a newline after empty formatted refs"
+msgstr "ná aschur líne nua tar éis aifeanna formáidithe folamh"
+
+#: builtin/branch.c
+msgid "copy a branch and its reflog"
+msgstr "cóipeáil brainse agus a reflog"
+
+#: builtin/branch.c
+msgid "copy a branch, even if target exists"
+msgstr "cóipeáil brainse, fiú má tá sprioc ann"
+
+#: builtin/branch.c
+msgid "list branch names"
+msgstr "liosta ainmneacha brainse"
+
+#: builtin/branch.c
+msgid "show current branch name"
+msgstr "taispeáin ainm brainse reatha"
+
+#: builtin/branch.c builtin/submodule--helper.c
+msgid "create the branch's reflog"
+msgstr "athbhreithniú na brainse a chruthú"
+
+#: builtin/branch.c
+msgid "edit the description for the branch"
+msgstr "cuir an tuairisc don bhrainse a chur in eagar"
+
+#: builtin/branch.c
+msgid "force creation, move/rename, deletion"
+msgstr "cruthú fórsa, gluaise/athainmniú, scriosadh"
+
+#: builtin/branch.c
+msgid "print only branches that are merged"
+msgstr "ach brainsí a chumasc a phriontáil"
+
+#: builtin/branch.c
+msgid "print only branches that are not merged"
+msgstr "ach brainsí nach ndéantar cumasc a phriontáil"
+
+#: builtin/branch.c
+msgid "list branches in columns"
+msgstr "liostáil brainsí i gcolúin"
+
+#: builtin/branch.c builtin/for-each-ref.c builtin/notes.c builtin/tag.c
+msgid "object"
+msgstr "réad"
+
+#: builtin/branch.c
+msgid "print only branches of the object"
+msgstr "ach brainsí den réad a phriontáil"
+
+#: builtin/branch.c builtin/for-each-ref.c builtin/tag.c
+msgid "sorting and filtering are case insensitive"
+msgstr "tá sórtáil agus scagadh neamh-íogair ó thaobh cásanna de"
+
+#: builtin/branch.c builtin/ls-files.c
+msgid "recurse through submodules"
+msgstr "athshlánú trí fho-mhodúil"
+
+#: builtin/branch.c builtin/for-each-ref.c builtin/ls-files.c builtin/ls-tree.c
+#: builtin/tag.c builtin/verify-tag.c
+msgid "format to use for the output"
+msgstr "formáid le húsáid don aschur"
+
+#: builtin/branch.c
+msgid "failed to resolve HEAD as a valid ref"
+msgstr "theip ar HEAD a réiteach mar thagartha bailí"
+
+#: builtin/branch.c builtin/clone.c
+msgid "HEAD not found below refs/heads!"
+msgstr "Ní fhaightear CEAD thíos na refs/heads!"
+
+#: builtin/branch.c
+msgid ""
+"branch with --recurse-submodules can only be used if "
+"submodule.propagateBranches is enabled"
+msgstr ""
+"ní féidir brainse le --recurse-submodules a úsáid ach amháin má tá "
+"submodule.propagateBranches cumasaithe"
+
+#: builtin/branch.c
+msgid "--recurse-submodules can only be used to create branches"
+msgstr "Ní féidir --recurse-submodules a úsáid ach chun brainsí a chruthú"
+
+#: builtin/branch.c
+msgid "branch name required"
+msgstr "ainm brainse ag teastáil"
+
+#: builtin/branch.c
+msgid "cannot give description to detached HEAD"
+msgstr "ní féidir cur síos a thabhairt ar HEAD scoite"
+
+#: builtin/branch.c
+msgid "cannot edit description of more than one branch"
+msgstr "ní féidir cur síos ar níos mó ná brainse amháin a chur in eagar"
+
+#: builtin/branch.c
+msgid "cannot copy the current branch while not on any"
+msgstr "ní féidir leis an mbrainse reatha a chóipeáil cé nach bhfuil ar aon"
+
+#: builtin/branch.c
+msgid "cannot rename the current branch while not on any"
+msgstr "ní féidir leis an mbrainse reatha a athainmniú cé nach bhfuil ar aon"
+
+#: builtin/branch.c
+msgid "too many branches for a copy operation"
+msgstr "an iomarca brainsí le haghaidh oibríocht cóipeála"
+
+#: builtin/branch.c
+msgid "too many arguments for a rename operation"
+msgstr "an iomarca argóintí maidir le hoibríocht athainmnithe"
+
+#: builtin/branch.c
+msgid "too many arguments to set new upstream"
+msgstr "an iomarca argóintí chun suas an sruth nua a shocrú"
+
+#: builtin/branch.c
+#, c-format
+msgid ""
+"could not set upstream of HEAD to %s when it does not point to any branch"
+msgstr ""
+"ní fhéadfaí suas sruth de HEAD a shocrú go %s nuair nach dtugann sé in iúl "
+"go dtí aon bhrainse"
+
+#: builtin/branch.c
+#, c-format
+msgid "no such branch '%s'"
+msgstr "níl brainse den sórt sin '%s'"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch '%s' does not exist"
+msgstr "níl brainse '%s' ann"
+
+#: builtin/branch.c
+msgid "too many arguments to unset upstream"
+msgstr "an iomarca argóintí le díshocrú suas an sruth"
+
+#: builtin/branch.c
+msgid "could not unset upstream of HEAD when it does not point to any branch"
+msgstr ""
+"ní fhéadfaí a dhíshuiteáil suas an sruth den HEAD nuair nach dtugann sé in "
+"iúl d'aon bhrainse"
+
+#: builtin/branch.c
+#, c-format
+msgid "branch '%s' has no upstream information"
+msgstr "níl aon fhaisnéis suas sruth ag brainse '%s'"
+
+#: builtin/branch.c
+msgid ""
+"the -a, and -r, options to 'git branch' do not take a branch name.\n"
+"Did you mean to use: -a|-r --list <pattern>?"
+msgstr ""
+"ní ghlacann na roghanna -a, agus -r, le 'git branch' ainm brainse.\n"
+"<pattern>An raibh sé i gceist agat úsáid a bhaint as: -a|-r --list?"
+
+#: builtin/branch.c
+msgid ""
+"the '--set-upstream' option is no longer supported. Please use '--track' or "
+"'--set-upstream-to' instead"
+msgstr ""
+"ní thacaítear leis an rogha '--set-upstream' a thuilleadh. Úsáid '--track' "
+"nó '--set-upstream-to' ina ionad"
+
+#: builtin/bugreport.c
+msgid "git version:\n"
+msgstr "leagan git:\n"
+
+#: builtin/bugreport.c
+msgid "compiler info: "
+msgstr "eolas tiomsaitheora: "
+
+#: builtin/bugreport.c
+msgid "libc info: "
+msgstr "eolas libc: "
+
+#: builtin/bugreport.c
+msgid "not run from a git repository - no hooks to show\n"
+msgstr "gan rith ó stór git - gan aon chrúcaí le taispeáint\n"
+
+#: builtin/bugreport.c
+msgid ""
+"git bugreport [(-o | --output-directory) <path>]\n"
+" [(-s | --suffix) <format> | --no-suffix]\n"
+" [--diagnose[=<mode>]]"
+msgstr ""
+"<path>git bugreport [(-o | --output-directory)]\n"
+" <format>[(-s | --iarmhír) | --no-iarmhír]\n"
+" [--diagnóis [=<mode>]]"
+
+#: builtin/bugreport.c
+msgid ""
+"Thank you for filling out a Git bug report!\n"
+"Please answer the following questions to help us understand your issue.\n"
+"\n"
+"What did you do before the bug happened? (Steps to reproduce your issue)\n"
+"\n"
+"What did you expect to happen? (Expected behavior)\n"
+"\n"
+"What happened instead? (Actual behavior)\n"
+"\n"
+"What's different between what you expected and what actually happened?\n"
+"\n"
+"Anything else you want to add:\n"
+"\n"
+"Please review the rest of the bug report below.\n"
+"You can delete any lines you don't wish to share.\n"
+msgstr ""
+"Go raibh maith agat as tuarascáil fabht Git a líonadh!\n"
+"Freagair na ceisteanna seo a leanas le do thoil chun cabhrú linn do cheist a "
+"thuiscint\n"
+"\n"
+"Cad a rinne tú sular tharla an fabht? (Céimeanna chun d'eisiúint a "
+"atáirgeadh)\n"
+"\n"
+"Cad a bhí tú ag súil go dtarlódh? (Iompar ag súil leis)\n"
+"\n"
+"Cad a tharla ina ionad sin? (Iompar iarbhír)\n"
+"\n"
+"Cad atá difriúil idir an méid a bhí súil agat leis agus cad a tharla i "
+"ndáiríre\n"
+"\n"
+"Aon rud eile a theastaíonn uait a chur leis:\n"
+"\n"
+"Déan athbhreithniú ar an chuid eile den tuarascáil fabht thíos.\n"
+"Is féidir leat aon línte nach dteastaíonn uait a roinnt a scriosadh.\n"
+
+#: builtin/bugreport.c builtin/commit.c builtin/fast-export.c builtin/rebase.c
+#: parse-options.h
+msgid "mode"
+msgstr "mód"
+
+#: builtin/bugreport.c
+msgid ""
+"create an additional zip archive of detailed diagnostics (default 'stats')"
+msgstr ""
+"cruthú cartlann zip breise de dhiagnóiseach mionsonraithe ('stats' "
+"réamhshocraithe)"
+
+#: builtin/bugreport.c
+msgid "specify a destination for the bugreport file(s)"
+msgstr "sonraigh ceann scríbe don chomhad (í) bugreport"
+
+#: builtin/bugreport.c
+msgid "specify a strftime format suffix for the filename(s)"
+msgstr "sonraigh iarmhír formáid strftime don ainm (í) comhaid"
+
+#: builtin/bugreport.c
+#, c-format
+msgid "unknown argument `%s'"
+msgstr "argóint anaithnid `%s'"
+
+#: builtin/bugreport.c builtin/diagnose.c
+#, c-format
+msgid "could not create leading directories for '%s'"
+msgstr "ní fhéadfaí eolairí tosaigh a chruthú do '%s'"
+
+#: builtin/bugreport.c builtin/diagnose.c
+#, c-format
+msgid "unable to create diagnostics archive %s"
+msgstr "nach féidir cartlann diagnóiseach %s a chruthú"
+
+#: builtin/bugreport.c
+msgid "System Info"
+msgstr "Eolas Córais"
+
+#: builtin/bugreport.c
+msgid "Enabled Hooks"
+msgstr "Crúcaí Cumasaithe"
+
+#: builtin/bugreport.c
+#, c-format
+msgid "unable to write to %s"
+msgstr "nach féidir a scríobh chuig %s"
+
+#: builtin/bugreport.c
+#, c-format
+msgid "Created new report at '%s'.\n"
+msgstr "Cruthaíodh tuarascáil nua ag '%s'.\n"
+
+#: builtin/bundle.c
+msgid ""
+"git bundle create [-q | --quiet | --progress]\n"
+" [--version=<version>] <file> <git-rev-list-args>"
+msgstr ""
+"cruthaigh bonn git [-q | --quiet | --progress]\n"
+" <version>[--leagan =] <file><git-rev-list-args>"
+
+#: builtin/bundle.c
+msgid "git bundle verify [-q | --quiet] <file>"
+msgstr "fíorú beartán git [-q | --quiet] <file>"
+
+#: builtin/bundle.c
+msgid "git bundle list-heads <file> [<refname>...]"
+msgstr "<refname>ceannairí liosta bonn git <file>[...]"
+
+#: builtin/bundle.c
+msgid "git bundle unbundle [--progress] <file> [<refname>...]"
+msgstr "<refname>díbhuntáil bonn git [--progress] <file>[...]"
+
+#: builtin/bundle.c
+msgid "need a <file> argument"
+msgstr "teastaíonn ar <file>góint"
+
+#: builtin/bundle.c builtin/pack-objects.c
+msgid "do not show progress meter"
+msgstr "ná taispeáin méadar dul chun cinn"
+
+#: builtin/bundle.c builtin/pack-objects.c
+msgid "show progress meter"
+msgstr "taispeáin méadar dul chun cinn"
+
+#: builtin/bundle.c
+msgid "historical; same as --progress"
+msgstr "stairiúil; mar an gcéanna le --progress"
+
+#: builtin/bundle.c
+msgid "historical; does nothing"
+msgstr "stairiúil; ní dhéanann aon rud"
+
+#: builtin/bundle.c
+msgid "specify bundle format version"
+msgstr "leagan formáid beartán a shonrú"
+
+#: builtin/bundle.c
+msgid "Need a repository to create a bundle."
+msgstr "Teastaíonn stór chun beartán a chruthú."
+
+#: builtin/bundle.c
+msgid "do not show bundle details"
+msgstr "ná taispeáin sonraí beartán"
+
+#: builtin/bundle.c bundle.c
+msgid "need a repository to verify a bundle"
+msgstr "teastaíonn stór chun beartán a fhíorú"
+
+#: builtin/bundle.c
+#, c-format
+msgid "%s is okay\n"
+msgstr "%s ceart go leor\n"
+
+#: builtin/bundle.c
+msgid "Need a repository to unbundle."
+msgstr "Teastaíonn stór chun dícheangail a dhícheangal."
+
+#: builtin/bundle.c
+msgid "Unbundling objects"
+msgstr "Rudaí a dhícheangal"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "cannot read object %s '%s'"
+msgstr "ní féidir réad %s '%s' a léamh"
+
+#: builtin/cat-file.c
+msgid "flush is only for --buffer mode"
+msgstr "níl sruth ach le haghaidh mód --buffer"
+
+#: builtin/cat-file.c
+msgid "empty command in input"
+msgstr "ordú folamh san ionchur"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "whitespace before command: '%s'"
+msgstr "spás bán roimh an ordú: '%s'"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "%s requires arguments"
+msgstr "Teastaíonn argóintí %s"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "%s takes no arguments"
+msgstr "Ní ghlacann %s aon argóintí"
+
+#: builtin/cat-file.c
+msgid "only one batch option may be specified"
+msgstr "ní féidir ach rogha baisc amháin a shonrú"
+
+#: builtin/cat-file.c
+msgid "git cat-file <type> <object>"
+msgstr "git cat-file <type> <object>"
+
+#: builtin/cat-file.c
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <réad>"
+
+#: builtin/cat-file.c
+msgid ""
+"git cat-file (--textconv | --filters)\n"
+" [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]"
+msgstr ""
+"git cat-file (--textconv | --filters)\n"
+" [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]"
+
+#: builtin/cat-file.c
+msgid ""
+"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
+"objects]\n"
+" [--buffer] [--follow-symlinks] [--unordered]\n"
+" [--textconv | --filters] [-Z]"
+msgstr ""
+"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
+"objects]\n"
+" [--buffer] [--follow-symlinks] [--unordered]\n"
+" [--textconv | --filters] [-Z]"
+
+#: builtin/cat-file.c
+msgid "Check object existence or emit object contents"
+msgstr "Seiceáil go bhfuil réad ann nó astaigh ábhar réad"
+
+#: builtin/cat-file.c
+msgid "check if <object> exists"
+msgstr "seiceáil an bhfuil <object> ann"
+
+#: builtin/cat-file.c
+msgid "pretty-print <object> content"
+msgstr "<object> ábhar priontáil álainn"
+
+#: builtin/cat-file.c
+msgid "Emit [broken] object attributes"
+msgstr "Easaigh tréithe réada [briste]"
+
+#: builtin/cat-file.c
+msgid "show object type (one of 'blob', 'tree', 'commit', 'tag', ...)"
+msgstr ""
+"taispeáint cineál réad (ceann de 'blob', 'crann', 'tiomantas', 'tag',...)"
+
+#: builtin/cat-file.c
+msgid "show object size"
+msgstr "taispeáin méid an réad"
+
+#: builtin/cat-file.c builtin/log.c
+msgid "use mail map file"
+msgstr "úsáid comhad léarscáil ríomhphoist"
+
+#: builtin/cat-file.c
+msgid "Batch objects requested on stdin (or --batch-all-objects)"
+msgstr "Baisc rudaí a iarrtar ar stdin (nó --batch-all-objects)"
+
+#: builtin/cat-file.c
+msgid "show full <object> or <rev> contents"
+msgstr "taispeáin iomlán <object>nó á <rev>bhar"
+
+#: builtin/cat-file.c
+msgid "like --batch, but don't emit <contents>"
+msgstr "cosúil le --batch, ach ná astaíonn <contents>"
+
+#: builtin/cat-file.c
+msgid "stdin is NUL-terminated"
+msgstr "tá stdin foirceanta ag NUL"
+
+#: builtin/cat-file.c
+msgid "stdin and stdout is NUL-terminated"
+msgstr "tá stdin agus stdout foirceannta NUL"
+
+#: builtin/cat-file.c
+msgid "read commands from stdin"
+msgstr "léigh orduithe ó stdin"
+
+#: builtin/cat-file.c
+msgid "with --batch[-check]: ignores stdin, batches all known objects"
+msgstr ""
+"le --batch [-check]: déanann neamhaird ar stdin, déanann baisceanna gach rud "
+"aitheanta"
+
+#: builtin/cat-file.c
+msgid "Change or optimize batch output"
+msgstr "Athraigh nó barrfheabhsú aschur baisc"
+
+#: builtin/cat-file.c
+msgid "buffer --batch output"
+msgstr "maolán --batch baisc"
+
+#: builtin/cat-file.c
+msgid "follow in-tree symlinks"
+msgstr "lean naisc shiombailí in-chrann"
+
+#: builtin/cat-file.c
+msgid "do not order objects before emitting them"
+msgstr "ná ordaigh rudaí sula n-astaíonn tú iad"
+
+#: builtin/cat-file.c
+msgid ""
+"Emit object (blob or tree) with conversion or filter (stand-alone, or with "
+"batch)"
+msgstr ""
+"Rud a astaíonn (blob nó crann) le comhshó nó scagaire (neamhspleách, nó le "
+"baisc)"
+
+#: builtin/cat-file.c
+msgid "run textconv on object's content"
+msgstr "reáchtáil textconv ar ábhar an réad"
+
+#: builtin/cat-file.c
+msgid "run filters on object's content"
+msgstr "reáchtáil scagairí ar ábhar an rud"
+
+#: builtin/cat-file.c
+msgid "blob|tree"
+msgstr "blob | crann"
+
+#: builtin/cat-file.c
+msgid "use a <path> for (--textconv | --filters); Not with 'batch'"
+msgstr "úsáid a le <path>haghaidh (--textconv | --filters); Ní le 'baisc'"
+
+#: builtin/cat-file.c
+msgid "objects filter only supported in batch mode"
+msgstr "ní thacaítear scagaire rudaí ach i mód baisc"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "ní thacaítear le scagaire réadanna: '%s'"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "'%s=<%s>' needs '%s' or '%s'"
+msgstr "'%s=<%s>' teastaíonn '%s' nó '%s'"
+
+#: builtin/cat-file.c
+msgid "path|tree-ish"
+msgstr "cosán | crann-ish"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "'%s' requires a batch mode"
+msgstr "Éilíonn '%s' modh baisc"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "'-%c' is incompatible with batch mode"
+msgstr "Níl '-%c' comhoiriúnach le mód baisc"
+
+#: builtin/cat-file.c
+msgid "batch modes take no arguments"
+msgstr "ní ghlacann modhanna baisc aon argóintí"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "<rev> required with '%s'"
+msgstr "<rev>ag teastáil le '%s'"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "<object> required with '-%c'"
+msgstr "<object>ag teastáil le '-%c'"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "only two arguments allowed in <type> <object> mode, not %d"
+msgstr "ní cheadaítear ach dhá argóint <type><object>sa mhodh, ní %d"
+
+#: builtin/check-attr.c
+msgid ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+msgstr ""
+"git check-attr [--source <tree-ish>] [-a | --all | <attr>...] [--] "
+"<pathname>..."
+
+#: builtin/check-attr.c
+msgid ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+msgstr ""
+"git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>...]"
+
+#: builtin/check-attr.c
+msgid "report all attributes set on file"
+msgstr "tuairisc a thabhairt ar gach tréithe atá leagtha síos"
+
+#: builtin/check-attr.c
+msgid "use .gitattributes only from the index"
+msgstr "bain úsáid as .gitattributs ach ón innéacs"
+
+#: builtin/check-attr.c builtin/check-ignore.c builtin/hash-object.c
+msgid "read file names from stdin"
+msgstr "léigh ainmneacha comhaid ó stdin"
+
+#: builtin/check-attr.c builtin/check-ignore.c
+msgid "terminate input and output records by a NUL character"
+msgstr "taifid ionchuir agus aschuir a fhoirceannadh le carachtar NUL"
+
+#: builtin/check-attr.c
+msgid "<tree-ish>"
+msgstr "<tree-ish>"
+
+#: builtin/check-attr.c
+msgid "which tree-ish to check attributes at"
+msgstr "cén crainn le tréithe a sheiceáil ag"
+
+#: builtin/check-ignore.c builtin/checkout.c builtin/gc.c builtin/worktree.c
+msgid "suppress progress reporting"
+msgstr "cur chun cinn tuairiscithe"
+
+#: builtin/check-ignore.c
+msgid "show non-matching input paths"
+msgstr "cosáin ionchuir neamh-mheaitseála"
+
+#: builtin/check-ignore.c
+msgid "ignore index when checking"
+msgstr "neamhaird a dhéanamh ar innéacs agus"
+
+#: builtin/check-ignore.c
+msgid "cannot specify pathnames with --stdin"
+msgstr "ní féidir ainmneacha cosáin a shonrú le --stdin"
+
+#: builtin/check-ignore.c
+msgid "-z only makes sense with --stdin"
+msgstr "Ní dhéanann -z ciall ach le --stdin"
+
+#: builtin/check-ignore.c
+msgid "no path specified"
+msgstr "níl aon chosán sonraithe"
+
+#: builtin/check-ignore.c
+msgid "--quiet is only valid with a single pathname"
+msgstr "Níl --quiet bailí ach le ainm cosán amháin"
+
+#: builtin/check-ignore.c
+msgid "cannot have both --quiet and --verbose"
+msgstr "ní féidir --quiet agus --verbose araon a bheith agat"
+
+#: builtin/check-ignore.c
+msgid "--non-matching is only valid with --verbose"
+msgstr "Níl --non-matching bailí ach le --verbose"
+
+#: builtin/check-mailmap.c
+msgid "git check-mailmap [<options>] <contact>..."
+msgstr "git check-mailmap [<options>] <contact>..."
+
+#: builtin/check-mailmap.c
+msgid "also read contacts from stdin"
+msgstr "léigh teagmhálacha ó stdin freisin"
+
+#: builtin/check-mailmap.c
+msgid "read additional mailmap entries from file"
+msgstr "léigh iontrálacha ríomhphoist breise ón gcomhad"
+
+#: builtin/check-mailmap.c
+msgid "blob"
+msgstr "blob"
+
+#: builtin/check-mailmap.c
+msgid "read additional mailmap entries from blob"
+msgstr "léigh iontrálacha ríomhphoist breise ó blob"
+
+#: builtin/check-mailmap.c
+msgid "no contacts specified"
+msgstr "aon teagmhálacha sonraithe"
+
+#: builtin/checkout--worker.c
+msgid "git checkout--worker [<options>]"
+msgstr "git checkout--worker [<options>]"
+
+#: builtin/checkout--worker.c builtin/checkout-index.c builtin/column.c
+#: builtin/submodule--helper.c builtin/worktree.c
+msgid "string"
+msgstr "teaghrán"
+
+#: builtin/checkout--worker.c builtin/checkout-index.c
+msgid "when creating files, prepend <string>"
+msgstr "agus comhaid á gcruthú agat, déan iarracht <string>"
+
+#: builtin/checkout-index.c
+msgid "git checkout-index [<options>] [--] [<file>...]"
+msgstr "git checkout-index [<options>] [--] [<file>...]"
+
+#: builtin/checkout-index.c
+msgid "stage should be between 1 and 3 or all"
+msgstr "ba chóir go mbeadh an chéim idir 1 agus 3 nó gach ceann"
+
+#: builtin/checkout-index.c
+msgid "check out all files in the index"
+msgstr "seiceáil gach comhad san innéacs"
+
+#: builtin/checkout-index.c
+msgid "do not skip files with skip-worktree set"
+msgstr "ná scipeáil comhaid le tacar scip-work tree"
+
+#: builtin/checkout-index.c
+msgid "force overwrite of existing files"
+msgstr "athscríobh fórsa na gcomhaid atá ann cheana"
+
+#: builtin/checkout-index.c
+msgid "no warning for existing files and files not in index"
+msgstr ""
+"gan aon rabhadh maidir le comhaid agus comhaid atá ann cheana nach bhfuil "
+"san innéacs"
+
+#: builtin/checkout-index.c
+msgid "don't checkout new files"
+msgstr "ná seiceáil comhaid nua"
+
+#: builtin/checkout-index.c
+msgid "update stat information in the index file"
+msgstr "faisnéis stat a nuashonrú sa chomhad innéacs"
+
+#: builtin/checkout-index.c
+msgid "read list of paths from the standard input"
+msgstr "léigh liosta na gcosáin ón ionchur caighdeánach"
+
+#: builtin/checkout-index.c
+msgid "write the content to temporary files"
+msgstr "scríobh an t-ábhar chuig comhaid sealadacha"
+
+#: builtin/checkout-index.c
+msgid "copy out the files from named stage"
+msgstr "cóipeáil amach na comhaid ón gcéim ainmnithe"
+
+#: builtin/checkout.c
+msgid "git checkout [<options>] <branch>"
+msgstr "git checkout [<roghanna>] <brainse>"
+
+#: builtin/checkout.c
+msgid "git checkout [<options>] [<branch>] -- <file>..."
+msgstr "git checkout [<roghanna>] [<brainse>] --<comhad>..."
+
+#: builtin/checkout.c
+msgid "git switch [<options>] [<branch>]"
+msgstr "git switch [<roghanna>] [<brainse>]"
+
+#: builtin/checkout.c
+msgid "git restore [<options>] [--source=<branch>] <file>..."
+msgstr "git restore [<roghanna>] [--source=<brainse>] <comhad>..."
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr "níl ár leagan ag cosán '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr "níl a leagan ag cosán '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s' does not have all necessary versions"
+msgstr "níl gach leagan riachtanach ag cosán '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s' does not have necessary versions"
+msgstr "níl leaganacha riachtanacha ag cosán '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr "cosán '%s': ní féidir a chumasc"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr "Ní féidir toradh cumaisc a chur le haghaidh '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Recreated %d merge conflict"
+msgid_plural "Recreated %d merge conflicts"
+msgstr[0] "Athchruthaíodh %d coimhlint chumasc"
+msgstr[1] "Athchruthaíodh %d coinbhleachtaí chumaisc"
+msgstr[2] "Athchruthaíodh %d coinbhleachtaí chumaisc"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Updated %d path from %s"
+msgid_plural "Updated %d paths from %s"
+msgstr[0] "Nuashonraíodh %d cosán ó %s"
+msgstr[1] "Nuashonraíodh %d cosán ó %s"
+msgstr[2] "Nuashonraíodh %d cosán ó %s"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Updated %d path from the index"
+msgid_plural "Updated %d paths from the index"
+msgstr[0] "Nuashonraíodh %d cosán ón innéacs"
+msgstr[1] "Nuashonraíodh %d cosán ón innéacs"
+msgstr[2] "Nuashonraíodh %d cosán ón innéacs"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' cannot be used with updating paths"
+msgstr "Ní féidir '%s' a úsáid le cosáin a nuashonrú"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Cannot update paths and switch to branch '%s' at the same time."
+msgstr ""
+"Ní féidir cosáin a nuashonrú agus aistriú go brainse '%s' ag an am céanna."
+
+#: builtin/checkout.c
+#, c-format
+msgid "neither '%s' or '%s' is specified"
+msgstr "níl '%s' ná '%s' sonraithe"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' must be used when '%s' is not specified"
+msgstr "Ní mór '%s' a úsáid nuair nach sonraítear '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' or '%s' cannot be used with %s"
+msgstr "Ní féidir '%s' nó '%s' a úsáid le %s"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s', '%s', or '%s' cannot be used when checking out of a tree"
+msgstr ""
+"Ní féidir '%s', '%s', nó '%s' a úsáid agus tú ag seiceáil amach as crann"
+
+#: builtin/checkout.c
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr "tá cosán '%s' neamh-chomhcheangailte"
+
+#: builtin/checkout.c builtin/grep.c builtin/merge-tree.c builtin/reset.c
+#: merge-ort.c reset.c sequencer.c tree-walk.c
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr "nach féidir crann a léamh (%s)"
+
+#: builtin/checkout.c
+msgid "you need to resolve your current index first"
+msgstr "ní mór duit d'innéacs reatha a réiteach ar dtús"
+
+#: builtin/checkout.c
+#, c-format
+msgid ""
+"cannot continue with staged changes in the following files:\n"
+"%s"
+msgstr ""
+"ní féidir leanúint ar aghaidh le hathruithe céime sna comhaid seo a leanas:\n"
+"%s"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Can not do reflog for '%s': %s\n"
+msgstr "Ní féidir athbhreithniú a dhéanamh le haghaidh '%s': %s\n"
+
+#: builtin/checkout.c
+msgid "HEAD is now at"
+msgstr "Tá HEAD anois ag"
+
+#: builtin/checkout.c builtin/clone.c
+msgid "unable to update HEAD"
+msgstr "in ann HEAD a nuashonrú"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Reset branch '%s'\n"
+msgstr "Athshocraigh brainse '%s'\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Already on '%s'\n"
+msgstr "Ar '%s' cheana féin\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr "Aistrigh agus athshocraigh brainse '%s'\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr "Aistrithe go brainse nua '%s'\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr "Aistrithe go brainse '%s'\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid " ... and %d more.\n"
+msgstr " ... agus %d níos mó.\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid ""
+"Warning: you are leaving %d commit behind, not connected to\n"
+"any of your branches:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"Warning: you are leaving %d commits behind, not connected to\n"
+"any of your branches:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+"Rabhadh: tá %d tiomantas á fhágáil agat, gan cheangal le haon cheann de do "
+"bhrainsí:\n"
+"\n"
+"%s\n"
+msgstr[1] ""
+"Rabhadh: tá %d tiomantas á bhfágáil agat i do dhiaidh, gan aon cheangal le "
+"haon cheann de do bhrainsí:\n"
+"\n"
+"%s\n"
+msgstr[2] ""
+"Rabhadh: tá %d tiomantas á bhfágáil agat i do dhiaidh, gan aon cheangal le "
+"haon cheann de do bhrainsí:\n"
+"\n"
+"%s\n"
+
+#: builtin/checkout.c
+#, c-format
+msgid ""
+"If you want to keep it by creating a new branch, this may be a good time\n"
+"to do so with:\n"
+"\n"
+" git branch <new-branch-name> %s\n"
+"\n"
+msgid_plural ""
+"If you want to keep them by creating a new branch, this may be a good time\n"
+"to do so with:\n"
+"\n"
+" git branch <new-branch-name> %s\n"
+"\n"
+msgstr[0] ""
+"Más mian leat é a choinneáil trí bhrainse nua a chruthú, b'fhéidir gur dea-"
+"am é seo chun é sin a dhéanamh le:\n"
+"\n"
+"git branch <ainm-brainse-nua> %s\n"
+msgstr[1] ""
+"Más mian leat iad a choinneáil trí bhrainse nua a chruthú, b'fhéidir gur dea-"
+"am é seo chun é sin a dhéanamh le:\n"
+"\n"
+"git branch <ainm-brainse-nua> %s\n"
+msgstr[2] ""
+"Más mian leat iad a choinneáil trí bhrainse nua a chruthú, b'fhéidir gur dea-"
+"am é seo chun é sin a dhéanamh le:\n"
+"\n"
+"git branch <ainm-brainse-nua> %s\n"
+
+#: builtin/checkout.c
+msgid "internal error in revision walk"
+msgstr "earráid inmheánach i dsiúlóid"
+
+#: builtin/checkout.c
+msgid "Previous HEAD position was"
+msgstr "Bhí post CEAD roimhe seo"
+
+#: builtin/checkout.c
+msgid "You are on a branch yet to be born"
+msgstr "Tá tú ar bhrainse nach rugadh fós"
+
+#: builtin/checkout.c
+#, c-format
+msgid ""
+"'%s' could be both a local file and a tracking branch.\n"
+"Please use -- (and optionally --no-guess) to disambiguate"
+msgstr ""
+"D'fhéadfadh '%s' a bheith ina chomhad áitiúil agus ina bhrainse rianaithe "
+"araon.\n"
+"Úsáid le do thoil -- (agus go roghnach --no-guess) chun a dhíbhriú"
+
+#: builtin/checkout.c
+msgid ""
+"If you meant to check out a remote tracking branch on, e.g. 'origin',\n"
+"you can do so by fully qualifying the name with the --track option:\n"
+"\n"
+" git checkout --track origin/<name>\n"
+"\n"
+"If you'd like to always have checkouts of an ambiguous <name> prefer\n"
+"one remote, e.g. the 'origin' remote, consider setting\n"
+"checkout.defaultRemote=origin in your config."
+msgstr ""
+"Má bhí sé i gceist agat brainse cianrianaithe a sheiceáil ar, e.g. "
+"'origin',\n"
+"is féidir leat é sin a dhéanamh tríd an ainm a cháiliú go hiomlán leis an "
+"rogha --track:\n"
+"\n"
+" git checkout --track origin/<name>\n"
+"\n"
+"<name>Más mian leat seiceálacha débhríoch a bheith agat i gcónaí is fearr "
+"leat\n"
+"iargúlta amháin, e.g. an iargúlta 'origin', smaoinigh ar shocrú\n"
+"checkout.defaultRemote=origin i do chumraíocht."
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' matched multiple (%d) remote tracking branches"
+msgstr "Mheaitseáil '%s' roinnt (%d) brainsí rianaithe iargúlta"
+
+#: builtin/checkout.c
+msgid "only one reference expected"
+msgstr "níl ach tagairt amháin ag súil leis"
+
+#: builtin/checkout.c
+#, c-format
+msgid "only one reference expected, %d given."
+msgstr "níl ach tagairt amháin ag súil leis, %d tugtha."
+
+#: builtin/checkout.c builtin/worktree.c
+#, c-format
+msgid "invalid reference: %s"
+msgstr "tagairt neamhbhailí: %s"
+
+#: builtin/checkout.c
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr "ní crann é tagairt: %s"
+
+#: builtin/checkout.c
+#, c-format
+msgid "a branch is expected, got tag '%s'"
+msgstr "táthar ag súil le brainse, faightear tag '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "a branch is expected, got remote branch '%s'"
+msgstr "táthar ag súil le brainse, fuair brainse iargúlta '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "a branch is expected, got '%s'"
+msgstr "táthar ag súil le brainse, fuair '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "a branch is expected, got commit '%s'"
+msgstr "táthar ag súil le brainse, fuair sé tiomantas '%s'"
+
+#: builtin/checkout.c
+msgid ""
+"If you want to detach HEAD at the commit, try again with the --detach option."
+msgstr ""
+"Más mian leat HEAD a dhícheangal ag an tiomantas, déan iarracht arís leis an "
+"rogha --detach."
+
+#: builtin/checkout.c
+msgid ""
+"cannot switch branch while merging\n"
+"Consider \"git merge --quit\" or \"git worktree add\"."
+msgstr ""
+"ní féidir brainse a athrú agus cumasc á dhéanamh\n"
+"Smaoinigh ar \"git merge --quit\" nó \"git worktree add\"."
+
+#: builtin/checkout.c
+msgid ""
+"cannot switch branch in the middle of an am session\n"
+"Consider \"git am --quit\" or \"git worktree add\"."
+msgstr ""
+"ní féidir brainse a athrú i lár seisiún am\n"
+"Smaoinigh ar \"git am --quit\" nó \"git worktree add\"."
+
+#: builtin/checkout.c
+msgid ""
+"cannot switch branch while rebasing\n"
+"Consider \"git rebase --quit\" or \"git worktree add\"."
+msgstr ""
+"ní féidir brainse a athrú agus athbhunú á dhéanamh\n"
+"Smaoinigh ar \"git rebase --quit\" nó \"git worktree add\"."
+
+#: builtin/checkout.c
+msgid ""
+"cannot switch branch while cherry-picking\n"
+"Consider \"git cherry-pick --quit\" or \"git worktree add\"."
+msgstr ""
+"ní féidir brainse a athrú agus tú ag cherry-picking\n"
+"Smaoinigh ar \"git cherry-pick --quit\" nó \"git worktree add\"."
+
+#: builtin/checkout.c
+msgid ""
+"cannot switch branch while reverting\n"
+"Consider \"git revert --quit\" or \"git worktree add\"."
+msgstr ""
+"ní féidir brainse a athrú agus aisiompú á dhéanamh\n"
+"Smaoinigh ar \"git revert --quit\" nó \"git worktree add\"."
+
+#: builtin/checkout.c
+msgid "you are switching branch while bisecting"
+msgstr "tá tú ag athrú brainse agus tú ag déileáil"
+
+#: builtin/checkout.c
+msgid "paths cannot be used with switching branches"
+msgstr "ní féidir cosáin a úsáid le brainsí a athrú"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' cannot be used with switching branches"
+msgstr "Ní féidir '%s' a úsáid le brainsí a athrú"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' needs the paths to check out"
+msgstr "Teastaíonn '%s' na cosáin chun seiceáil"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' cannot be used with '%s'"
+msgstr "Ní féidir '%s' a úsáid le '%s'"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' cannot take <start-point>"
+msgstr "Ní féidir '%s' a ghlacadh <start-point>"
+
+#: builtin/checkout.c
+#, c-format
+msgid "Cannot switch branch to a non-commit '%s'"
+msgstr "Ní féidir brainse a aistriú go '%s' neamh-thiomanta"
+
+#: builtin/checkout.c
+msgid "missing branch or commit argument"
+msgstr "brainse ar iarraidh nó argóint a dhéanamh"
+
+#: builtin/checkout.c
+#, c-format
+msgid "unknown conflict style '%s'"
+msgstr "stíl choimhlinte anaithnid '%s'"
+
+#: builtin/checkout.c
+msgid "perform a 3-way merge with the new branch"
+msgstr "cumasc 3 bhealach a dhéanamh leis an mbrainse nua"
+
+#: builtin/checkout.c builtin/log.c builtin/range-diff.c parse-options.h
+msgid "style"
+msgstr "stíl"
+
+#: builtin/checkout.c
+msgid "conflict style (merge, diff3, or zdiff3)"
+msgstr "stíl choimhlinte (cumaisc, diff3, nó zdiff3)"
+
+#: builtin/checkout.c builtin/worktree.c
+msgid "detach HEAD at named commit"
+msgstr "dícheangail HEAD ag an tiomnú ainmnithe"
+
+#: builtin/checkout.c
+msgid "force checkout (throw away local modifications)"
+msgstr "seiceáil fórsa (caith modhnuithe áitiúla)"
+
+#: builtin/checkout.c
+msgid "new-branch"
+msgstr "brainse-nua"
+
+#: builtin/checkout.c
+msgid "new unborn branch"
+msgstr "brainse nua gan breith"
+
+#: builtin/checkout.c builtin/merge.c
+msgid "update ignored files (default)"
+msgstr "nuashonrú comhaid a dhéantar neamhaird orthu"
+
+#: builtin/checkout.c
+msgid "do not check if another worktree is using this branch"
+msgstr ""
+"ná seiceáil an bhfuil crann oibre eile á úsáid ag baint úsáide as an "
+"mbrainse seo"
+
+#: builtin/checkout.c
+msgid "checkout our version for unmerged files"
+msgstr "seiceáil ár leagan le haghaidh comhaid neamh-chumasaithe"
+
+#: builtin/checkout.c
+msgid "checkout their version for unmerged files"
+msgstr "seiceáil a leagan le haghaidh comhaid neamh-chumasaithe"
+
+#: builtin/checkout.c
+msgid "do not limit pathspecs to sparse entries only"
+msgstr "ná teorainn le speisiúintí cosáin le hiontrálacha neamhchoitianta"
+
+#: builtin/checkout.c
+#, c-format
+msgid "options '-%c', '-%c', and '%s' cannot be used together"
+msgstr "ní féidir na roghanna '-%c', '-%c', agus '%s' a úsáid le chéile"
+
+#: builtin/checkout.c
+msgid "--track needs a branch name"
+msgstr "--track tá ainm brainse ag teastáil"
+
+#: builtin/checkout.c
+#, c-format
+msgid "missing branch name; try -%c"
+msgstr "ainm brainse ar iarraidh; iarracht -%c"
+
+#: builtin/checkout.c
+#, c-format
+msgid "could not resolve %s"
+msgstr "ní fhéadfaí %s a réiteach"
+
+#: builtin/checkout.c
+msgid "invalid path specification"
+msgstr "sonraíocht cosáin nebhail"
+
+#: builtin/checkout.c
+#, c-format
+msgid "'%s' is not a commit and a branch '%s' cannot be created from it"
+msgstr "Ní tiomantas é '%s' agus ní féidir brainse '%s' a chruthú uaidh"
+
+#: builtin/checkout.c
+#, c-format
+msgid "git checkout: --detach does not take a path argument '%s'"
+msgstr "git checkout: --detach ní ghlacann argóint cosáin '%s'"
+
+#: builtin/checkout.c
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+"git checkout: --ours/--theirs, --force agus --merge neamhoiriúnach nuair\n"
+"seiceáil amach as an innéacs."
+
+#: builtin/checkout.c
+msgid "you must specify path(s) to restore"
+msgstr "ní mór duit cosáin(í) a shonrú chun athchóiriú"
+
+#: builtin/checkout.c builtin/clone.c builtin/remote.c builtin/replay.c
+#: builtin/submodule--helper.c builtin/worktree.c
+msgid "branch"
+msgstr "brainse"
+
+#: builtin/checkout.c
+msgid "create and checkout a new branch"
+msgstr "brainse nua a chruthú agus a sheiceáil"
+
+#: builtin/checkout.c
+msgid "create/reset and checkout a branch"
+msgstr "cruthaigh/athshocraigh agus seiceáil amach brainse"
+
+#: builtin/checkout.c
+msgid "create reflog for new branch"
+msgstr "cruthú reflog do bhrainse nua"
+
+#: builtin/checkout.c
+msgid "second guess 'git checkout <no-such-branch>' (default)"
+msgstr "an dara tuairim 'git check <no-such-branch>'(réamhshocraithe)"
+
+#: builtin/checkout.c
+msgid "use overlay mode (default)"
+msgstr "úsáid modh forleagtha (réamhshocraithe)"
+
+#: builtin/checkout.c
+msgid "create and switch to a new branch"
+msgstr "cruthú agus aistrigh go brainse nua"
+
+#: builtin/checkout.c
+msgid "create/reset and switch to a branch"
+msgstr "cruthú/athshocraigh agus aistrigh go brainse"
+
+#: builtin/checkout.c
+msgid "second guess 'git switch <no-such-branch>'"
+msgstr "buille faoi thuairim eile 'git switch <gan-bhrainse-den-sórt-sin>'"
+
+#: builtin/checkout.c
+msgid "throw away local modifications"
+msgstr "modhnuithe áitiúla a chaitheamh"
+
+#: builtin/checkout.c
+msgid "which tree-ish to checkout from"
+msgstr "cén crainn le seiceáil uaidh"
+
+#: builtin/checkout.c
+msgid "restore the index"
+msgstr "an t-innéacs a chur ar ais"
+
+#: builtin/checkout.c
+msgid "restore the working tree (default)"
+msgstr "an crann oibre a chur ar ais (réamhshocraithe)"
+
+#: builtin/checkout.c
+msgid "ignore unmerged entries"
+msgstr "neamhaird a dhéanamh ar iontrálacha"
+
+#: builtin/checkout.c
+msgid "use overlay mode"
+msgstr "úsáid modh forleagtha"
+
+#: builtin/clean.c
+msgid ""
+"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] "
+"[<pathspec>...]"
+msgstr ""
+"<pathspec>git glan [-d] [-f] [-i] [-n] [-q] [-e] [- <pattern>x | -X] [--] "
+"[...]"
+
+#: builtin/clean.c
+#, c-format
+msgid "Removing %s\n"
+msgstr "Ag baint %s\n"
+
+#: builtin/clean.c
+#, c-format
+msgid "Would remove %s\n"
+msgstr "Bainfeadh %s\n"
+
+#: builtin/clean.c
+#, c-format
+msgid "Skipping repository %s\n"
+msgstr "Ag scipeáil an stóras %s\n"
+
+#: builtin/clean.c
+#, c-format
+msgid "Would skip repository %s\n"
+msgstr "Scaipfeadh stóras %s\n"
+
+#: builtin/clean.c midx.c
+#, c-format
+msgid "failed to remove %s"
+msgstr "theip ar %s a bhaint"
+
+#: builtin/clean.c
+#, c-format
+msgid "could not lstat %s\n"
+msgstr "ní fhéadfaí lstat %s\n"
+
+#: builtin/clean.c
+msgid "Refusing to remove current working directory\n"
+msgstr "Ag diúltú an t-eolaire oibre reatha a bhaint\n"
+
+#: builtin/clean.c
+msgid "Would refuse to remove current working directory\n"
+msgstr "Dhiúltódh sé/sí an t-eolaire oibre reatha a bhaint\n"
+
+#: builtin/clean.c
+#, c-format
+msgid ""
+"Prompt help:\n"
+"1 - select a numbered item\n"
+"foo - select item based on unique prefix\n"
+" - (empty) select nothing\n"
+msgstr ""
+"Cabhair pras:\n"
+"1 - roghnaigh mír uimhrithe\n"
+"foo - roghnaigh mír bunaithe ar réimír uathúil\n"
+" - (folamh) roghnaigh aon rud\n"
+
+#: builtin/clean.c
+#, c-format
+msgid ""
+"Prompt help:\n"
+"1 - select a single item\n"
+"3-5 - select a range of items\n"
+"2-3,6-9 - select multiple ranges\n"
+"foo - select item based on unique prefix\n"
+"-... - unselect specified items\n"
+"* - choose all items\n"
+" - (empty) finish selecting\n"
+msgstr ""
+"Cabhair pras:\n"
+"1 - roghnaigh mír amháin\n"
+"3-5 - roghnaigh raon earraí\n"
+"2-3,6-9 - roghnaigh raonta iolracha\n"
+"foo - roghnaigh mír bunaithe ar réimír uathúil\n"
+"-... - míreanna sonraithe a dhíroghnú\n"
+"* - roghnaigh gach earra\n"
+" - (folamh) bailchríoch a roghnú\n"
+
+#: builtin/clean.c
+#, c-format
+msgid "Huh (%s)?\n"
+msgstr "Huh (%s)?\n"
+
+#: builtin/clean.c
+#, c-format
+msgid "Input ignore patterns>> "
+msgstr "Patrúin neamhaird ionchuir >> "
+
+#: builtin/clean.c
+#, c-format
+msgid "WARNING: Cannot find items matched by: %s"
+msgstr "RABHADH: Ní féidir míreanna a mheaitseáil le: %s a aimsiú"
+
+#: builtin/clean.c
+msgid "Select items to delete"
+msgstr "Roghnaigh míreanna le scriosadh"
+
+#. TRANSLATORS: Make sure to keep [y/N] as is
+#: builtin/clean.c
+#, c-format
+msgid "Remove %s [y/N]? "
+msgstr "Bain %s [y/N]? "
+
+#: builtin/clean.c
+msgid ""
+"clean - start cleaning\n"
+"filter by pattern - exclude items from deletion\n"
+"select by numbers - select items to be deleted by numbers\n"
+"ask each - confirm each deletion (like \"rm -i\")\n"
+"quit - stop cleaning\n"
+"help - this screen\n"
+"? - help for prompt selection"
+msgstr ""
+"glan - tosú ag glanadh\n"
+"scagadh de réir patrún - eisiamh míreanna ó scriosadh\n"
+"roghnaigh de réir uimhreacha - roghnaigh míreanna atá le scriosadh de réir\n"
+"fiafraigh gach ceann - deimhnigh gach scriosadh (cosúil le “rm -i”)\n"
+"scor - stop glanadh\n"
+"cabhair - an scáileán seo\n"
+"? - cabhair le haghaidh roghnú pras"
+
+#: builtin/clean.c
+msgid "Would remove the following item:"
+msgid_plural "Would remove the following items:"
+msgstr[0] "Bhainfeadh sé an mhír seo a leanas:"
+msgstr[1] "Bainfí na míreanna seo a leanas:"
+msgstr[2] "Bainfí na míreanna seo a leanas:"
+
+#: builtin/clean.c
+msgid "No more files to clean, exiting."
+msgstr "Níl aon níos mó comhaid le glanadh, ag imeacht amach."
+
+#: builtin/clean.c
+msgid "do not print names of files removed"
+msgstr "ná priontáil ainmneacha na gcomhaid a bhaintear"
+
+#: builtin/clean.c
+msgid "force"
+msgstr "fórsa"
+
+#: builtin/clean.c
+msgid "interactive cleaning"
+msgstr "glanadh idirghní"
+
+#: builtin/clean.c
+msgid "remove whole directories"
+msgstr "bain eolairí iomlána"
+
+#: builtin/clean.c builtin/config.c builtin/describe.c builtin/grep.c
+#: builtin/log.c builtin/ls-files.c builtin/name-rev.c builtin/pack-refs.c
+#: builtin/show-ref.c ref-filter.h
+msgid "pattern"
+msgstr "patrún"
+
+#: builtin/clean.c
+msgid "add <pattern> to ignore rules"
+msgstr "cuir leis <pattern>na rialacha a neamhaird"
+
+#: builtin/clean.c
+msgid "remove ignored files, too"
+msgstr "bain comhaid a neamhaird orthu, freisin"
+
+#: builtin/clean.c
+msgid "remove only ignored files"
+msgstr "bain ach comhaid a neamhaird orthu"
+
+#: builtin/clean.c
+msgid "clean.requireForce is true and -f not given: refusing to clean"
+msgstr "tá clean.requireForce fíor agus ní thugtar -f: diúltú glanadh"
+
+#: builtin/clone.c
+#, c-format
+msgid "info: Could not add alternate for '%s': %s\n"
+msgstr "eolas: Ní féidir malartach a chur le haghaidh '%s': %s\n"
+
+#: builtin/clone.c builtin/diff.c builtin/rm.c grep.c setup.c
+#, c-format
+msgid "failed to stat '%s'"
+msgstr "theip ar '%s' a stáil"
+
+#: builtin/clone.c
+#, c-format
+msgid "%s exists and is not a directory"
+msgstr "Tá %s ann agus ní eolaire é"
+
+#: builtin/clone.c
+#, c-format
+msgid "'%s' is a symlink, refusing to clone with --local"
+msgstr "Is nasc comhsheasmhach é '%s', ag diúltú clónú le --local"
+
+#: builtin/clone.c
+#, c-format
+msgid "failed to start iterator over '%s'"
+msgstr "theip ar an iterator a thosú thar '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "symlink '%s' exists, refusing to clone with --local"
+msgstr "tá nasc symlink '%s' ann, ag diúltú clónú le --local"
+
+#: builtin/clone.c compat/precompose_utf8.c
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "theip ar '%s' a dhínascadh"
+
+#: builtin/clone.c
+#, c-format
+msgid "hardlink cannot be checked at '%s'"
+msgstr "ní féidir crua-nasc a sheiceáil ag '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "hardlink different from source at '%s'"
+msgstr "crua-nasc difriúil ó fhoinse ag '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "failed to create link '%s'"
+msgstr "theip ar nasc '%s' a chruthú"
+
+#: builtin/clone.c
+#, c-format
+msgid "failed to copy file to '%s'"
+msgstr "theip ar chomhad a chóipeáil chuig '%s'"
+
+#: builtin/clone.c refs/files-backend.c
+#, c-format
+msgid "failed to iterate over '%s'"
+msgstr "theip ar athrá thar '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "done.\n"
+msgstr "déanta.\n"
+
+#: builtin/clone.c
+msgid ""
+"Clone succeeded, but checkout failed.\n"
+"You can inspect what was checked out with 'git status'\n"
+"and retry with 'git restore --source=HEAD :/'\n"
+msgstr ""
+"D'éirigh le clón, ach theip ar an tseiceáil.\n"
+"Is féidir leat iniúchadh a dhéanamh ar an méid a sheiceáladh le 'git "
+"status'\n"
+"agus déan iarracht arís le 'git restore --source=HEAD : /'\n"
+
+#: builtin/clone.c fetch-pack.c
+msgid "remote did not send all necessary objects"
+msgstr "níor sheol iargúlta gach rud riachtanach"
+
+#: builtin/clone.c
+#, c-format
+msgid "unable to update %s"
+msgstr "nach féidir %s a nuashonrú"
+
+#: builtin/clone.c
+msgid "failed to initialize sparse-checkout"
+msgstr "theip ar sheiceáil éagsúil a thosú"
+
+#: builtin/clone.c
+msgid "remote HEAD refers to nonexistent ref, unable to checkout"
+msgstr ""
+"tagraíonn iargúlta HEAD do thagartha nach bhfuil ann, nach féidir a sheiceáil"
+
+#: builtin/clone.c
+msgid "unable to checkout working tree"
+msgstr "in ann crann oibre a sheiceáil"
+
+#: builtin/clone.c
+msgid "unable to write parameters to config file"
+msgstr "in ann paraiméadair a scríobh chuig comhad cumraithe"
+
+#: builtin/clone.c
+msgid "cannot repack to clean up"
+msgstr "ní féidir athphacáil chun glanadh"
+
+#: builtin/clone.c
+msgid "cannot unlink temporary alternates file"
+msgstr "ní féidir le comhad malartacha sealadacha a dhínascadh"
+
+#: builtin/clone.c
+msgid "don't clone shallow repository"
+msgstr "ná clóin stór éadomhain"
+
+#: builtin/clone.c
+msgid "don't create a checkout"
+msgstr "ná cruthaigh seiceáil"
+
+#: builtin/clone.c builtin/init-db.c
+msgid "create a bare repository"
+msgstr "stóras lom a chruthú"
+
+#: builtin/clone.c
+msgid "create a mirror repository (implies --bare)"
+msgstr "stóras scátháin a chruthú (tugann le tuiscint --bare)"
+
+#: builtin/clone.c
+msgid "to clone from a local repository"
+msgstr "a chlónú ó stór áitiúil"
+
+#: builtin/clone.c
+msgid "don't use local hardlinks, always copy"
+msgstr "ná húsáid crua-naisc áitiúla, cóipeáil i gcónaí"
+
+#: builtin/clone.c
+msgid "setup as shared repository"
+msgstr "socrú mar stór roinnte"
+
+#: builtin/clone.c
+msgid "pathspec"
+msgstr "sonraíocht chosáin"
+
+#: builtin/clone.c
+msgid "initialize submodules in the clone"
+msgstr "fo-mhodúil a thionscnamh sa chlón"
+
+#: builtin/clone.c
+msgid "number of submodules cloned in parallel"
+msgstr "líon na bhfo-mhodúil atá clónaithe go comhthreomhar"
+
+#: builtin/clone.c builtin/init-db.c
+msgid "template-directory"
+msgstr "eolaire teimpléad"
+
+#: builtin/clone.c builtin/init-db.c
+msgid "directory from which templates will be used"
+msgstr "eolaire as a n-úsáidfear teimpléid"
+
+#: builtin/clone.c builtin/submodule--helper.c
+msgid "reference repository"
+msgstr "stór tagartha"
+
+#: builtin/clone.c builtin/submodule--helper.c
+msgid "use --reference only while cloning"
+msgstr "bain úsáid as --reference amháin agus tú ag clónú"
+
+#: builtin/clone.c builtin/column.c builtin/fmt-merge-msg.c builtin/init-db.c
+#: builtin/merge-file.c builtin/merge.c builtin/pack-objects.c builtin/repack.c
+#: builtin/submodule--helper.c t/helper/test-simple-ipc.c
+msgid "name"
+msgstr "ainm"
+
+#: builtin/clone.c
+msgid "use <name> instead of 'origin' to track upstream"
+msgstr "úsáid in <name> ionad 'origin' chun suas an sruth a rianú"
+
+#: builtin/clone.c
+msgid "checkout <branch> instead of the remote's HEAD"
+msgstr "seiceáil <brainse> in ionad CEAD an iargúlta"
+
+#: builtin/clone.c
+msgid "clone single revision <rev> and check out"
+msgstr "clónáil athbhreithniú aonair <rev> agus seiceáil amach"
+
+#: builtin/clone.c
+msgid "path to git-upload-pack on the remote"
+msgstr "cosán chuig git-upload-pack ar an gcianrialtán"
+
+#: builtin/clone.c builtin/fetch.c builtin/pull.c
+msgid "depth"
+msgstr "doimhneacht"
+
+#: builtin/clone.c
+msgid "create a shallow clone of that depth"
+msgstr "clón éadomhain den doimhneacht sin a chruthú"
+
+#: builtin/clone.c
+msgid "create a shallow clone since a specific time"
+msgstr "clón éadrom a chruthú ó am ar leith"
+
+#: builtin/clone.c builtin/fetch.c builtin/pull.c
+msgid "ref"
+msgstr "tagairt"
+
+#: builtin/clone.c builtin/fetch.c builtin/pull.c
+msgid "deepen history of shallow clone, excluding ref"
+msgstr "stair an chlóin éadomhain a dhoimhniú, gan tagairt"
+
+#: builtin/clone.c builtin/submodule--helper.c
+msgid "clone only one branch, HEAD or --branch"
+msgstr "clóin ach brainse amháin, HEAD nó --branch"
+
+#: builtin/clone.c
+msgid "clone tags, and make later fetches not to follow them"
+msgstr "clibeanna clóin, agus tógáil níos déanaí a dhéanamh gan iad a leanúint"
+
+#: builtin/clone.c
+msgid "any cloned submodules will be shallow"
+msgstr "beidh aon fho-mhodúil clónaithe éadrom"
+
+#: builtin/clone.c builtin/init-db.c
+msgid "gitdir"
+msgstr "gitdir"
+
+#: builtin/clone.c builtin/init-db.c
+msgid "separate git dir from working tree"
+msgstr "git dir ar leithligh ó chrann oibre"
+
+#: builtin/clone.c builtin/init-db.c builtin/submodule--helper.c
+msgid "specify the reference format to use"
+msgstr "sonraigh an fhormáid tagartha le húsáid"
+
+#: builtin/clone.c
+msgid "key=value"
+msgstr "eochair=luach"
+
+#: builtin/clone.c
+msgid "set config inside the new repository"
+msgstr "socraigh cumraíocht taobh istigh den stór nua"
+
+#: builtin/clone.c builtin/fetch.c builtin/ls-remote.c builtin/pull.c
+#: builtin/push.c builtin/send-pack.c
+msgid "server-specific"
+msgstr "freastalaí-shonrach"
+
+#: builtin/clone.c builtin/fetch.c builtin/ls-remote.c builtin/pull.c
+#: builtin/push.c builtin/send-pack.c
+msgid "option to transmit"
+msgstr "rogha a tharchur"
+
+#: builtin/clone.c
+msgid "apply partial clone filters to submodules"
+msgstr "cuir scagairí clóin páirteacha i bhfeidhm"
+
+#: builtin/clone.c
+msgid "any cloned submodules will use their remote-tracking branch"
+msgstr "úsáidfidh aon fho-mhodúil clónaithe a mbrainse cianrianaithe"
+
+#: builtin/clone.c
+msgid "initialize sparse-checkout file to include only files at root"
+msgstr ""
+"comhad seiceála neamhchoitianta a thosú chun comhaid amháin a áireamh ag "
+"fréamh"
+
+#: builtin/clone.c
+msgid "uri"
+msgstr "uri"
+
+#: builtin/clone.c
+msgid "a URI for downloading bundles before fetching from origin remote"
+msgstr ""
+"a URI chun cuachtaí a íoslódáil sula n-iarrtar iad ó chianchéim tionscnaimh"
+
+#: builtin/clone.c
+msgid "git clone [<options>] [--] <repo> [<dir>]"
+msgstr "git clone [<roghanna>] [--] <stóras>[<eolaire>]"
+
+#: builtin/clone.c
+msgid "Too many arguments."
+msgstr "An iomarca argóintí."
+
+#: builtin/clone.c scalar.c
+msgid "You must specify a repository to clone."
+msgstr "Ní mór duit stór a shonrú le clónú."
+
+#: builtin/clone.c builtin/init-db.c builtin/refs.c builtin/submodule--helper.c
+#: setup.c
+#, c-format
+msgid "unknown ref storage format '%s'"
+msgstr "formáid stórála tagartha anaithnid '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "repository '%s' does not exist"
+msgstr "níl an stóras '%s' ann"
+
+#: builtin/clone.c builtin/fetch.c
+#, c-format
+msgid "depth %s is not a positive number"
+msgstr "ní uimhir dhearfach é doimhneacht %s"
+
+#: builtin/clone.c
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr "tá cosán ceann scríbe '%s' ann cheana féin agus ní eolaire folamh é."
+
+#: builtin/clone.c
+#, c-format
+msgid "repository path '%s' already exists and is not an empty directory."
+msgstr "tá cosán stórais '%s' ann cheana féin agus ní eolaire folamh é."
+
+#: builtin/clone.c
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr "tá crann oibre '%s' ann cheana féin."
+
+#: builtin/clone.c builtin/difftool.c builtin/log.c builtin/worktree.c
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr "ní fhéadfaí eolairí tosaigh de '%s' a chruthú"
+
+#: builtin/clone.c
+#, c-format
+msgid "could not create work tree dir '%s'"
+msgstr "ní fhéadfaí crann oibre a chruthú dir '%s'"
+
+#: builtin/clone.c
+#, c-format
+msgid "Cloning into bare repository '%s'...\n"
+msgstr "Clónáil isteach i stóras lom '%s'...\n"
+
+#: builtin/clone.c
+#, c-format
+msgid "Cloning into '%s'...\n"
+msgstr "Clónáil isteach '%s'...\n"
+
+#: builtin/clone.c
+msgid ""
+"clone --recursive is not compatible with both --reference and --reference-if-"
+"able"
+msgstr ""
+"níl clón --recursive comhoiriúnach le --reference agus --reference-if-able"
+
+#: builtin/clone.c builtin/remote.c
+#, c-format
+msgid "'%s' is not a valid remote name"
+msgstr "Ní ainm iargúlta bailí é '%s'"
+
+#: builtin/clone.c
+msgid "--depth is ignored in local clones; use file:// instead."
+msgstr ""
+"--depth déantar neamhaird de i gclóin áitiúla; bain úsáid as comhad:// ina "
+"ionad."
+
+#: builtin/clone.c
+msgid "--shallow-since is ignored in local clones; use file:// instead."
+msgstr ""
+"--shallow-since déantar neamhaird de i gclóin áitiúla; bain úsáid as file:// "
+"ina ionad."
+
+#: builtin/clone.c
+msgid "--shallow-exclude is ignored in local clones; use file:// instead."
+msgstr ""
+"--shallow-exclude déantar neamhaird de i gclóin áitiúla; bain úsáid as "
+"file:// ina ionad."
+
+#: builtin/clone.c
+msgid "--filter is ignored in local clones; use file:// instead."
+msgstr ""
+"--filter déantar neamhaird de i gclóin áitiúla; bain úsáid as file:// ina "
+"ionad."
+
+#: builtin/clone.c fetch-pack.c
+msgid "source repository is shallow, reject to clone."
+msgstr "tá stóras foinse éadrom, diúltaigh clóin."
+
+#: builtin/clone.c
+msgid "source repository is shallow, ignoring --local"
+msgstr "tá stóras foinse éadrom, ag neamhaird a dhéanamh ar --local"
+
+#: builtin/clone.c
+msgid "--local is ignored"
+msgstr "--local déantar neamhaird de"
+
+#: builtin/clone.c
+msgid "cannot clone from filtered bundle"
+msgstr "ní féidir clónú ó bhearta scagtha"
+
+#: builtin/clone.c
+msgid "failed to initialize the repo, skipping bundle URI"
+msgstr "theip ar an repo a thionscnamh, ag scipeáil URI beartán"
+
+#: builtin/clone.c
+#, c-format
+msgid "failed to fetch objects from bundle URI '%s'"
+msgstr "theip ar rudaí a fháil ó URI '%s'"
+
+#: builtin/clone.c
+msgid "failed to fetch advertised bundles"
+msgstr "theip orthu beartáin fógraithe a fháil"
+
+#: builtin/clone.c
+msgid "remote transport reported error"
+msgstr "earráid tuairiscithe ar iompar"
+
+#: builtin/clone.c
+#, c-format
+msgid "Remote branch %s not found in upstream %s"
+msgstr "Níor aimsíodh brainse iargúlta %s i suas sruth %s"
+
+#: builtin/clone.c
+#, c-format
+msgid "Remote revision %s not found in upstream %s"
+msgstr "Ní aimsíodh athbhreithniú iargúlta %s i suas sruth %s"
+
+#: builtin/clone.c
+msgid "You appear to have cloned an empty repository."
+msgstr "Is cosúil gur chlónaigh tú stór folamh."
+
+#: builtin/column.c
+msgid "git column [<options>]"
+msgstr "colún git [<options>]"
+
+#: builtin/column.c
+msgid "lookup config vars"
+msgstr "earraí cumraíochta cuardaigh"
+
+#: builtin/column.c
+msgid "layout to use"
+msgstr "leagan amach le húsáid"
+
+#: builtin/column.c
+msgid "maximum width"
+msgstr "leithead uasta"
+
+#: builtin/column.c
+msgid "padding space on left border"
+msgstr "spás padding ar an teorainn chlé"
+
+#: builtin/column.c
+msgid "padding space on right border"
+msgstr "spás padding ar an teorainn dheis"
+
+#: builtin/column.c
+msgid "padding space between columns"
+msgstr "spás padding idir colúin"
+
+#: builtin/column.c
+#, c-format
+msgid "%s must be non-negative"
+msgstr "Caithfidh %s a bheith neamh-diúltach"
+
+#: builtin/column.c
+msgid "--command must be the first argument"
+msgstr "Ní mór gurb é --command an chéad argóint"
+
+#: builtin/commit-graph.c
+msgid ""
+"git commit-graph verify [--object-dir <dir>] [--shallow] [--[no-]progress]"
+msgstr ""
+"git commit-graph verify [--object-dir <dir>] [--shallow] [--[no-]progress]"
+
+#: builtin/commit-graph.c
+msgid ""
+"git commit-graph write [--object-dir <dir>] [--append]\n"
+" [--split[=<strategy>]] [--reachable | --stdin-packs | "
+"--stdin-commits]\n"
+" [--changed-paths] [--[no-]max-new-filters <n>] [--"
+"[no-]progress]\n"
+" <split-options>"
+msgstr ""
+"git commit-graph write [--object-dir <dir>] [--append]\n"
+" [--split[=<strategy>]] [--reachable | --stdin-packs | "
+"--stdin-commits]\n"
+" [--changed-paths] [--[no-]max-new-filters <n>] [--"
+"[no-]progress]\n"
+" <split-options>"
+
+#: builtin/commit-graph.c builtin/fetch.c builtin/gc.c builtin/log.c
+#: builtin/repack.c
+msgid "dir"
+msgstr "redir"
+
+#: builtin/commit-graph.c
+msgid "the object directory to store the graph"
+msgstr "an eolaire réada chun an graf a stóráil"
+
+#: builtin/commit-graph.c
+msgid "if the commit-graph is split, only verify the tip file"
+msgstr "má tá an graf coimite scoilte, ní fhíoraigh ach an comhad leid"
+
+#: builtin/commit-graph.c
+#, c-format
+msgid "Could not open commit-graph '%s'"
+msgstr "Níor féidir graf coimisiúnaithe '%s' a oscailt"
+
+#: builtin/commit-graph.c
+#, c-format
+msgid "could not open commit-graph chain '%s'"
+msgstr "ní fhéadfaí slabhra coimisi-graf '%s' a oscailt"
+
+#: builtin/commit-graph.c
+#, c-format
+msgid "unrecognized --split argument, %s"
+msgstr "argóint --split gan aithint, %s"
+
+#: builtin/commit-graph.c
+#, c-format
+msgid "unexpected non-hex object ID: %s"
+msgstr "id réada neamh-heicsidheachúlach gan choinne: %s"
+
+#: builtin/commit-graph.c
+#, c-format
+msgid "invalid object: %s"
+msgstr "réad neamhbhailí: %s"
+
+#: builtin/commit-graph.c parse-options-cb.c
+#, c-format
+msgid "option `%s' expects a numerical value"
+msgstr "tá rogha `%s' ag súil le luach uimhriúil"
+
+#: builtin/commit-graph.c
+msgid "start walk at all refs"
+msgstr "tosú ag siúl ag gach ceann"
+
+#: builtin/commit-graph.c
+msgid "scan pack-indexes listed by stdin for commits"
+msgstr ""
+"scanadh innéacsanna pacáiste atá liostaithe ag stdin le haghaidh gealltanais"
+
+#: builtin/commit-graph.c
+msgid "start walk at commits listed by stdin"
+msgstr "tosú ag siúl ag gealltanais atá liostaithe ag stdin"
+
+#: builtin/commit-graph.c
+msgid "include all commits already in the commit-graph file"
+msgstr ""
+"áireamh na gealltanais go léir cheana féin sa chomhad gráf coimisiúnaithe"
+
+#: builtin/commit-graph.c
+msgid "enable computation for changed paths"
+msgstr "ríomh a chumasú le haghaidh cosáin athraithe"
+
+#: builtin/commit-graph.c
+msgid "allow writing an incremental commit-graph file"
+msgstr "ligean comhad gráf choimisiúnaithe a scríobh"
+
+#: builtin/commit-graph.c
+msgid "maximum number of commits in a non-base split commit-graph"
+msgstr "uaslíon na ngealltanais i ngráf coiste scoilte neamh-bhonn"
+
+#: builtin/commit-graph.c
+msgid "maximum ratio between two levels of a split commit-graph"
+msgstr "cóimheas uasta idir dhá leibhéal de ghraf coimiste scoilte"
+
+#: builtin/commit-graph.c
+msgid "only expire files older than a given date-time"
+msgstr "ní rachaidh in éag ach comhaid níos sine ná dáta-am ar leith"
+
+#: builtin/commit-graph.c
+msgid "maximum number of changed-path Bloom filters to compute"
+msgstr "líon uasta scagairí Bloom cosáin athraithe le ríomh"
+
+#: builtin/commit-graph.c
+msgid "use at most one of --reachable, --stdin-commits, or --stdin-packs"
+msgstr ""
+"bain úsáid as ceann de --reachable, --stdin-commits, nó --stdin-packs ar a "
+"mhéad"
+
+#: builtin/commit-graph.c
+msgid "Collecting commits from input"
+msgstr "Gealltanais a bhailiú ó ionchur"
+
+#: builtin/commit-tree.c
+msgid "git commit-tree <tree> [(-p <parent>)...]"
+msgstr "<parent>git commit-tree <tree>[(-p)...]"
+
+#: builtin/commit-tree.c
+msgid ""
+"git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
+" [(-F <file>)...] <tree>"
+msgstr ""
+"<parent>git commit-tree [(-p)...] [-S [<keyid>]] [(-m<message>)...]\n"
+" [(-F<file>)...] <tree>"
+
+#: builtin/commit-tree.c
+#, c-format
+msgid "duplicate parent %s ignored"
+msgstr "neamhaird déanta ar thuismitheoir dúblach %s"
+
+#: builtin/commit-tree.c builtin/log.c
+#, c-format
+msgid "not a valid object name %s"
+msgstr "ní ainm réad bailí %s"
+
+#: builtin/commit-tree.c
+#, c-format
+msgid "git commit-tree: failed to read '%s'"
+msgstr "git commit-tree: theip ar '%s' a léamh"
+
+#: builtin/commit-tree.c
+#, c-format
+msgid "git commit-tree: failed to close '%s'"
+msgstr "git commit-tree: theip ar '%s' a dhúnadh"
+
+#: builtin/commit-tree.c
+msgid "parent"
+msgstr "tuismitheoir"
+
+#: builtin/commit-tree.c
+msgid "id of a parent commit object"
+msgstr "id réad tiomanta tuismitheora"
+
+#: builtin/commit-tree.c builtin/commit.c builtin/merge.c builtin/notes.c
+#: builtin/stash.c builtin/tag.c
+msgid "message"
+msgstr "teachtaireacht"
+
+#: builtin/commit-tree.c builtin/commit.c
+msgid "commit message"
+msgstr "teachtaireacht a thabhairt"
+
+#: builtin/commit-tree.c
+msgid "read commit log message from file"
+msgstr "léigh teachtaireacht logála tiomanta ón gcomhad"
+
+#: builtin/commit-tree.c builtin/commit.c builtin/merge.c builtin/pull.c
+#: builtin/revert.c
+msgid "GPG sign commit"
+msgstr "Tiomantas comhartha GPG"
+
+#: builtin/commit-tree.c
+msgid "must give exactly one tree"
+msgstr "caithfidh crann amháin a thabhairt go díreach"
+
+#: builtin/commit-tree.c
+msgid "git commit-tree: failed to read"
+msgstr "git commit-tree: theip ar léamh"
+
+#: builtin/commit.c
+msgid ""
+"git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]\n"
+" [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|"
+"reword):]<commit>]\n"
+" [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n"
+" [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n"
+" [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n"
+" [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]\n"
+" [--] [<pathspec>...]"
+msgstr ""
+"git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]\n"
+" [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|"
+"reword):]<commit>]\n"
+" [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n"
+" [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n"
+" [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n"
+" [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]\n"
+" [--] [<pathspec>...]"
+
+#: builtin/commit.c
+msgid "git status [<options>] [--] [<pathspec>...]"
+msgstr "stádas git [<options>] [--] [<pathspec>...]"
+
+#: builtin/commit.c
+msgid ""
+"You asked to amend the most recent commit, but doing so would make\n"
+"it empty. You can repeat your command with --allow-empty, or you can\n"
+"remove the commit entirely with \"git reset HEAD^\".\n"
+msgstr ""
+"D'iarr tú an gealltanas is déanaí a leasú, ach déanfaí amhlaidh a dhéanamh\n"
+"folamh é. Is féidir leat d'ordú a athdhéanamh le --allow-empty, nó is féidir "
+"leat\n"
+"bain an tiomantas go hiomlán le “git reset HEAD^”.\n"
+
+#: builtin/commit.c
+msgid ""
+"The previous cherry-pick is now empty, possibly due to conflict resolution.\n"
+"If you wish to commit it anyway, use:\n"
+"\n"
+" git commit --allow-empty\n"
+"\n"
+msgstr ""
+"Tá an pioc silíní roimhe seo folamh anois, b'fhéidir mar gheall ar réiteach "
+"coinbhleachta.\n"
+"Más mian leat é a dhéanamh ar aon nós, bain úsáid as:\n"
+"\n"
+" git commit --allow-empty\n"
+"\n"
+
+#: builtin/commit.c
+msgid "Otherwise, please use 'git rebase --skip'\n"
+msgstr "Seachas sin, bain úsáid as 'git rebase --skip'\n"
+
+#: builtin/commit.c
+msgid "Otherwise, please use 'git cherry-pick --skip'\n"
+msgstr "Seachas sin, bain úsáid as 'git cherry-pick --skip'\n"
+
+#: builtin/commit.c
+msgid ""
+"and then use:\n"
+"\n"
+" git cherry-pick --continue\n"
+"\n"
+"to resume cherry-picking the remaining commits.\n"
+"If you wish to skip this commit, use:\n"
+"\n"
+" git cherry-pick --skip\n"
+"\n"
+msgstr ""
+"agus ansin bain úsáid as:\n"
+"\n"
+" git cherry-pick --continue\n"
+"\n"
+"chun na gealltanais atá fágtha a atosú ag piocadh silíní.\n"
+"Más mian leat an tiomantas seo a scipeáil, bain úsáid as:\n"
+"\n"
+" git cherry-pick --skip\n"
+
+#: builtin/commit.c read-cache.c
+msgid "updating files failed"
+msgstr "theip ar nuashonrú comhaid"
+
+#: builtin/commit.c
+msgid "failed to unpack HEAD tree object"
+msgstr "theip orthu réad crann HEAD a dhíphacáil"
+
+#: builtin/commit.c
+msgid "No paths with --include/--only does not make sense."
+msgstr "Níl ciall ag aon chosáin le --include/--only."
+
+#: builtin/commit.c
+msgid "unable to create temporary index"
+msgstr "in ann innéacs sealadach a chruthú"
+
+#: builtin/commit.c
+msgid "interactive add failed"
+msgstr "theip ar chur idirghníomh"
+
+#: builtin/commit.c
+msgid "unable to update temporary index"
+msgstr "in ann innéacs sealadach a nuashonrú"
+
+#: builtin/commit.c
+msgid "Failed to update main cache tree"
+msgstr "Theip ar phríomhchrann taisce a nuashonrú"
+
+#: builtin/commit.c
+msgid "cannot do a partial commit during a merge."
+msgstr "ní féidir le tiomantas páirteach a dhéanamh le linn cumaisc."
+
+#: builtin/commit.c
+msgid "cannot do a partial commit during a cherry-pick."
+msgstr "ní féidir le tiomantas páirteach a dhéanamh le linn pioc silíní."
+
+#: builtin/commit.c
+msgid "cannot do a partial commit during a rebase."
+msgstr "ní féidir le tiomantas páirteach a dhéanamh le linn athbhunaithe."
+
+#: builtin/commit.c
+msgid "cannot read the index"
+msgstr "ní féidir leis an innéacs a léamh"
+
+#: builtin/commit.c
+msgid "unable to write temporary index file"
+msgstr "in ann comhad innéacs sealadach a scríobh"
+
+#: builtin/commit.c
+#, c-format
+msgid "commit '%s' lacks author header"
+msgstr "níl ceannteideal údair ag comhoiriú '%s'"
+
+#: builtin/commit.c
+#, c-format
+msgid "commit '%s' has malformed author line"
+msgstr "comtal tá líne údair mífhoirmithe ag '%s'"
+
+#: builtin/commit.c
+msgid "malformed --author parameter"
+msgstr "paraiméadar --author mífhoirmithe"
+
+#: builtin/commit.c ident.c
+#, c-format
+msgid "invalid date format: %s"
+msgstr "formáid dáta neamhbhailí: %s"
+
+#: builtin/commit.c
+msgid ""
+"unable to select a comment character that is not used\n"
+"in the current commit message"
+msgstr ""
+"nach féidir carachtar tráchta a roghnú nach n-úsáidtear\n"
+"sa teachtaireacht tiomanta reatha"
+
+#: builtin/commit.c
+#, c-format
+msgid "could not lookup commit '%s'"
+msgstr "ní fhéadfaí cuardach a dhéanamh ar '%s'"
+
+#: builtin/commit.c builtin/shortlog.c
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr "(teachtaireacht log a léamh ó ionchur caighdeánach)\n"
+
+#: builtin/commit.c
+msgid "could not read log from standard input"
+msgstr "ní raibh in ann log a léamh ó ionchur caighdeánach"
+
+#: builtin/commit.c
+#, c-format
+msgid "could not read log file '%s'"
+msgstr "ní raibh in ann comhad logála '%s' a léamh"
+
+#: builtin/commit.c
+#, c-format
+msgid "options '%s' and '%s:%s' cannot be used together"
+msgstr "ní féidir roghanna '%s' agus '%s: %s' a úsáid le chéile"
+
+#: builtin/commit.c
+msgid "could not read SQUASH_MSG"
+msgstr "ní raibh in ann SQUASH_MSG a léamh"
+
+#: builtin/commit.c
+msgid "could not read MERGE_MSG"
+msgstr "ní raibh in ann MERGE_MSG a léamh"
+
+#: builtin/commit.c bundle.c rerere.c sequencer.c
+#, c-format
+msgid "could not open '%s'"
+msgstr "ní fhéadfaí '%s' a oscailt"
+
+#: builtin/commit.c
+msgid "could not write commit template"
+msgstr "ní raibh sé in ann teimpléad tiomanta a"
+
+#: builtin/commit.c
+#, c-format
+msgid ""
+"Please enter the commit message for your changes. Lines starting\n"
+"with '%s' will be ignored.\n"
+msgstr ""
+"Cuir isteach an teachtaireacht tiomanta le haghaidh d'athruithe. Línte ag "
+"tosú\n"
+"déanfar neamhaird le '%s'.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid ""
+"Please enter the commit message for your changes. Lines starting\n"
+"with '%s' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+"Cuir isteach an teachtaireacht tiomanta le haghaidh d'athruithe. Línte ag "
+"tosú\n"
+"déanfar neamhaird le '%s', agus déanfar teachtaireacht folamh deireadh leis "
+"an tiomantas.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid ""
+"Please enter the commit message for your changes. Lines starting\n"
+"with '%s' will be kept; you may remove them yourself if you want to.\n"
+msgstr ""
+"Cuir isteach an teachtaireacht tiomanta le haghaidh d'athruithe. Línte ag "
+"tosú\n"
+"coimeádfar le '%s'; féadfaidh tú iad a bhaint féin más mian leat.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid ""
+"Please enter the commit message for your changes. Lines starting\n"
+"with '%s' will be kept; you may remove them yourself if you want to.\n"
+"An empty message aborts the commit.\n"
+msgstr ""
+"Cuir isteach an teachtaireacht tiomanta le haghaidh d'athruithe. Línte ag "
+"tosú\n"
+"coimeádfar le '%s'; féadfaidh tú iad a bhaint féin más mian leat.\n"
+"Déanann teachtaireacht folamh deireadh leis an tiomantas.\n"
+
+#: builtin/commit.c
+msgid ""
+"\n"
+"It looks like you may be committing a merge.\n"
+"If this is not correct, please run\n"
+"\tgit update-ref -d MERGE_HEAD\n"
+"and try again.\n"
+msgstr ""
+"\n"
+"Is cosúil go bhfuil tú ag déanamh cumasc.\n"
+"Mura bhfuil sé seo ceart, rith\n"
+"git update-ref -d MERGE_HEAD\n"
+"agus déan iarracht arís.\n"
+
+#: builtin/commit.c
+msgid ""
+"\n"
+"It looks like you may be committing a cherry-pick.\n"
+"If this is not correct, please run\n"
+"\tgit update-ref -d CHERRY_PICK_HEAD\n"
+"and try again.\n"
+msgstr ""
+"\n"
+"Is cosúil go bhfuil tú ag déanamh rogha neamhghnách.\n"
+"Mura bhfuil sé seo ceart, rith\n"
+"\tgit update-ref -d CHERRY_PICK_HEAD\n"
+"agus déan iarracht arís.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid "%sAuthor: %.*s <%.*s>"
+msgstr "%sÚdar: %.*s <%.*s>"
+
+#: builtin/commit.c
+#, c-format
+msgid "%sDate: %s"
+msgstr "%sDáta: %s"
+
+#: builtin/commit.c
+#, c-format
+msgid "%sCommitter: %.*s <%.*s>"
+msgstr "%sCeannasaí: %.*s <%.*s>"
+
+#: builtin/commit.c
+msgid "Cannot read index"
+msgstr "Ní féidir innéacs a léamh"
+
+#: builtin/commit.c builtin/tag.c
+msgid "unable to pass trailers to --trailers"
+msgstr "nach féidir leantóirí a chur chuig --trailers"
+
+#: builtin/commit.c
+msgid "Error building trees"
+msgstr "Earráid ag tógáil crainn"
+
+#: builtin/commit.c builtin/tag.c
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr ""
+"Soláthair an teachtaireacht le do thoil ag baint úsáide as rogha -m nó -F.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid "--author '%s' is not 'Name <email>' and matches no existing author"
+msgstr ""
+"Ní 'Ainm' é --author '%s' agus ní mheaitseálann <email>aon údar atá ann "
+"cheana"
+
+#: builtin/commit.c
+#, c-format
+msgid "Invalid ignored mode '%s'"
+msgstr "Modh neamhbhailí neamhaird '%s'"
+
+#: builtin/commit.c
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr "Modh comhaid neamhrianaithe neamhbhailí '%s'"
+
+#: builtin/commit.c
+msgid "You are in the middle of a merge -- cannot reword."
+msgstr "Tá tú i lár cumaisc - ní féidir athfhocal a athfhocal."
+
+#: builtin/commit.c
+msgid "You are in the middle of a cherry-pick -- cannot reword."
+msgstr "Tá tú i lár pioc silíní - ní féidir athfhocal a athfhocal."
+
+#: builtin/commit.c
+#, c-format
+msgid "reword option of '%s' and path '%s' cannot be used together"
+msgstr "ní féidir rogha athfhocal de '%s' agus cosán '%s' a úsáid le chéile"
+
+#: builtin/commit.c
+#, c-format
+msgid "reword option of '%s' and '%s' cannot be used together"
+msgstr "ní féidir rogha athfhocal de '%s' agus '%s' a úsáid le chéile"
+
+#: builtin/commit.c
+msgid "You have nothing to amend."
+msgstr "Níl aon rud le leasú agat."
+
+#: builtin/commit.c
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr "Tá tú i lár cumaisc - ní féidir leat leasú."
+
+#: builtin/commit.c
+msgid "You are in the middle of a cherry-pick -- cannot amend."
+msgstr "Tá tú i lár rogha silíní - ní féidir leat leasú."
+
+#: builtin/commit.c
+msgid "You are in the middle of a rebase -- cannot amend."
+msgstr "Tá tú i lár athbhunaithe - ní féidir leat leasú."
+
+#: builtin/commit.c
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr "Ní féidir --reset-author a úsáid ach le -C, -c nó --amend."
+
+#: builtin/commit.c
+#, c-format
+msgid "unknown option: --fixup=%s:%s"
+msgstr "rogha anaithnid: --fixup=%s:%s"
+
+#: builtin/commit.c
+#, c-format
+msgid "paths '%s ...' with -a does not make sense"
+msgstr "ní chiallaíonn cosáin '%s... 'le -a"
+
+#: builtin/commit.c
+msgid "show status concisely"
+msgstr "taispeáin stádas go hachomair"
+
+#: builtin/commit.c
+msgid "show branch information"
+msgstr "taispeáin faisnéis bhrainse"
+
+#: builtin/commit.c
+msgid "show stash information"
+msgstr "taispeáin faisnéis stash"
+
+#: builtin/commit.c
+msgid "compute full ahead/behind values"
+msgstr "luachanna iomlána/taobh thiar de na luachanna a ríomh"
+
+#: builtin/commit.c
+msgid "version"
+msgstr "leagan"
+
+#: builtin/commit.c builtin/fetch.c builtin/push.c builtin/worktree.c
+msgid "machine-readable output"
+msgstr "aschur inléite meaisín"
+
+#: builtin/commit.c
+msgid "show status in long format (default)"
+msgstr "stádas taispeáint i bhformáid fhada (réamhshocraithe)"
+
+#: builtin/commit.c
+msgid "terminate entries with NUL"
+msgstr "foirceannadh na hiontrálacha"
+
+#: builtin/commit.c
+msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
+msgstr ""
+"taispeáin comhaid neamhrianaithe, modhanna roghnacha: gach, gnáth, níl. "
+"(Réamhshocraithe: gach)"
+
+#: builtin/commit.c
+msgid ""
+"show ignored files, optional modes: traditional, matching, no. (Default: "
+"traditional)"
+msgstr ""
+"taispeáint comhaid neamhaird orthu, modhanna roghnacha: traidisiúnta, "
+"meaitseáil, (Réamhshocraithe: traidisiúnta)"
+
+#: builtin/commit.c parse-options.h
+msgid "when"
+msgstr "nuair a"
+
+#: builtin/commit.c
+msgid ""
+"ignore changes to submodules, optional when: all, dirty, untracked. "
+"(Default: all)"
+msgstr ""
+"neamhaird a dhéanamh ar athruithe ar fho-mhodúil, roghnach nuair a bhíonn: "
+"gach, salach, gan rianú. (Réamhshocraithe: gach)"
+
+#: builtin/commit.c
+msgid "list untracked files in columns"
+msgstr "liostáil comhaid neamhrianaithe i gcolúin"
+
+#: builtin/commit.c
+msgid "do not detect renames"
+msgstr "ná athainmneacha a bhrath"
+
+#: builtin/commit.c
+msgid "detect renames, optionally set similarity index"
+msgstr "athainmneacha a bhrath, innéacs cosúlachta a shocrú go ro"
+
+#: builtin/commit.c
+msgid "Unsupported combination of ignored and untracked-files arguments"
+msgstr "Teaglaim gan tacaíocht d'argóintí comhaid a neamhaird agus gan rianú"
+
+#: builtin/commit.c
+msgid "suppress summary after successful commit"
+msgstr "achoimre a chur faoi chois tar éis tiomantas"
+
+#: builtin/commit.c
+msgid "show diff in commit message template"
+msgstr "taispeáin diff i teimpléad teachtaireachta tiomanta"
+
+#: builtin/commit.c
+msgid "Commit message options"
+msgstr "Tiomanta roghanna teachtaire"
+
+#: builtin/commit.c builtin/merge.c builtin/tag.c
+msgid "read message from file"
+msgstr "léigh teachtaireacht ón gcomhad"
+
+#: builtin/commit.c
+msgid "author"
+msgstr "údar"
+
+#: builtin/commit.c
+msgid "override author for commit"
+msgstr "an t-údar a shárú le haghaidh tiomantas"
+
+#: builtin/commit.c builtin/gc.c
+msgid "date"
+msgstr "dáta"
+
+#: builtin/commit.c
+msgid "override date for commit"
+msgstr "dáta athsháraithe le haghaidh tiomanta"
+
+#: builtin/commit.c parse-options.h ref-filter.h
+msgid "commit"
+msgstr "tiomantas"
+
+#: builtin/commit.c
+msgid "reuse and edit message from specified commit"
+msgstr "teachtaireacht a athúsáid agus a chur in eagar ó thiomantas"
+
+#: builtin/commit.c
+msgid "reuse message from specified commit"
+msgstr "teachtaireacht athúsáid ó thiomantas sonraithe"
+
+#. TRANSLATORS: Leave "[(amend|reword):]" as-is,
+#. and only translate <commit>.
+#.
+#: builtin/commit.c
+msgid "[(amend|reword):]commit"
+msgstr "[(leaso|athfhocal):] comhartha"
+
+#: builtin/commit.c
+msgid ""
+"use autosquash formatted message to fixup or amend/reword specified commit"
+msgstr ""
+"úsáid teachtaireacht fhormáidithe autosquash chun gealltanas sonraithe a "
+"shocrú nó a leasú/athfhocal"
+
+#: builtin/commit.c
+msgid "use autosquash formatted message to squash specified commit"
+msgstr ""
+"úsáid teachtaireacht fhormáidithe autosquash chun tiomantas sonraithe squash"
+
+#: builtin/commit.c
+msgid "the commit is authored by me now (used with -C/-c/--amend)"
+msgstr "tá an gealltanas údar agam anois (úsáidtear le -C/-c/--amend)"
+
+#: builtin/commit.c builtin/interpret-trailers.c builtin/tag.c
+msgid "trailer"
+msgstr "leantóir"
+
+#: builtin/commit.c builtin/tag.c
+msgid "add custom trailer(s)"
+msgstr "cuir leantóir (í) saincheaptha"
+
+#: builtin/commit.c builtin/log.c builtin/merge.c builtin/pull.c
+#: builtin/revert.c
+msgid "add a Signed-off-by trailer"
+msgstr "cuir leantóir sínithe as"
+
+#: builtin/commit.c
+msgid "use specified template file"
+msgstr "úsáid comhad teimpléad sonraithe"
+
+#: builtin/commit.c
+msgid "force edit of commit"
+msgstr "eagarthóireacht fórsa ar thiomantas"
+
+#: builtin/commit.c
+msgid "include status in commit message template"
+msgstr "áireamh stádas i dteimpléad teachtaireachta"
+
+#: builtin/commit.c
+msgid "Commit contents options"
+msgstr "Tiomnaigh roghanna ábhair"
+
+#: builtin/commit.c
+msgid "commit all changed files"
+msgstr "gach comhad athraithe a thiomnú"
+
+#: builtin/commit.c
+msgid "add specified files to index for commit"
+msgstr "cuir comhaid sonraithe leis an innéacs le haghaidh tiomanta"
+
+#: builtin/commit.c
+msgid "interactively add files"
+msgstr "cuir comhaid idirghníomhach"
+
+#: builtin/commit.c
+msgid "interactively add changes"
+msgstr "cuir athruithe idirghníomhach"
+
+#: builtin/commit.c
+msgid "commit only specified files"
+msgstr "ach comhaid shonraithe a dhéanamh"
+
+#: builtin/commit.c
+msgid "bypass pre-commit and commit-msg hooks"
+msgstr "seachbhóthar crúcaí réamh-thiomanta agus comh-msg"
+
+#: builtin/commit.c
+msgid "show what would be committed"
+msgstr "taispeáint cad a bheadh tiomanta"
+
+#: builtin/commit.c
+msgid "amend previous commit"
+msgstr "leasú a leasú"
+
+#: builtin/commit.c
+msgid "bypass post-rewrite hook"
+msgstr "seachbhóthar crúca iar-athsc"
+
+#: builtin/commit.c
+msgid "ok to record an empty change"
+msgstr "ceart go leor chun athrú folamh a thaifeadadh"
+
+#: builtin/commit.c
+msgid "ok to record a change with an empty message"
+msgstr "ceart go leor chun athrú a thaifeadadh le teachtaireacht folamh"
+
+#: builtin/commit.c sequencer.c
+msgid "could not parse HEAD commit"
+msgstr "ní fhéadfadh sé gealltanas HEAD a pharsáil"
+
+#: builtin/commit.c
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr "Comhad truaillithe MERGE_HEAD (%s)"
+
+#: builtin/commit.c
+msgid "could not read MERGE_MODE"
+msgstr "ní raibh in ann MERGE_MODE a léamh"
+
+#: builtin/commit.c
+#, c-format
+msgid "could not read commit message: %s"
+msgstr "ní féidir teachtaireacht tiomanta a léamh: %s"
+
+#: builtin/commit.c
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr "Tiomantas a ghabháil mar gheall ar theachtaireacht tiomanta folamh\n"
+
+#: builtin/commit.c
+#, c-format
+msgid "Aborting commit; you did not edit the message.\n"
+msgstr "Tiomantas a ghearradh; níor chuir tú an teachtaireacht in eagar.\n"
+
+#: builtin/commit.c
+#, c-format
+msgid "Aborting commit due to empty commit message body.\n"
+msgstr ""
+"Tiomantas a ghabháil mar gheall ar chorp teachtaireachta tiomanta folamh.\n"
+
+#: builtin/commit.c
+msgid ""
+"repository has been updated, but unable to write\n"
+"new index file. Check that disk is not full and quota is\n"
+"not exceeded, and then \"git restore --staged :/\" to recover."
+msgstr ""
+"nuashonraíodh an stór, ach ní féidir scríobh\n"
+"comhad innéacs nua. Seiceáil nach bhfuil an diosca \n"
+"lán agus nach bhfuil an cuóta sáraithe, agus ansin \"git restore --staged :/"
+"\" chun é a aisghabháil."
+
+#: builtin/config.c
+msgid "git config list [<file-option>] [<display-option>] [--includes]"
+msgstr "liosta config git [<file-option>] [<display-option>] [--include]"
+
+#: builtin/config.c
+msgid ""
+"git config get [<file-option>] [<display-option>] [--includes] [--all] [--"
+"regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"
+msgstr ""
+"<value><default>git config a fháil [<file-option>] [] [--include<display-"
+"option>] [--all] [--regexp] [--value=] [--luach seasta] [--default=] <name>"
+
+#: builtin/config.c
+msgid ""
+"git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--"
+"fixed-value] <name> <value>"
+msgstr ""
+"<value>git config set [<file-option>] [--type =] [--all] [--value=<type>] [--"
+"luach seasta] <name><value>"
+
+#: builtin/config.c
+msgid ""
+"git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] "
+"<name>"
+msgstr ""
+"<value>git config gan socrú [] [--gach<file-option>] [--value=] [--luach "
+"seasta] <name>"
+
+#: builtin/config.c
+msgid "git config rename-section [<file-option>] <old-name> <new-name>"
+msgstr "<file-option>roinn athainmnithe git config [] <old-name><new-name>"
+
+#: builtin/config.c
+msgid "git config remove-section [<file-option>] <name>"
+msgstr "<file-option>roinn aistrithe git config [] <name>"
+
+#: builtin/config.c
+msgid "git config edit [<file-option>]"
+msgstr "<file-option>Eagarthóireacht config git []"
+
+#: builtin/config.c
+msgid "git config [<file-option>] --get-colorbool <name> [<stdout-is-tty>]"
+msgstr "<name><stdout-is-tty>git config [<file-option>] --get-colorbool []"
+
+#: builtin/config.c
+msgid ""
+"git config get [<file-option>] [<display-option>] [--includes] [--all] [--"
+"regexp=<regexp>] [--value=<value>] [--fixed-value] [--default=<default>] "
+"<name>"
+msgstr ""
+"<value><default>git config a fháil [<file-option>] [] [--include<display-"
+"option>] [--all] [--regexp=] [-- <regexp>value=] [--luach seasta] [--"
+"default=] <name>"
+
+#: builtin/config.c
+msgid ""
+"git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] "
+"[--value=<value>] [--fixed-value] <name> <value>"
+msgstr ""
+"<value>git config set [<file-option>] [--type =] [--comment =<type>] [--all] "
+"[--value=<message>] [--luach seasta] <name><value>"
+
+#: builtin/config.c
+msgid "Config file location"
+msgstr "Suíomh comhad Config"
+
+#: builtin/config.c
+msgid "use global config file"
+msgstr "bain úsáid as comhad cumraíochta domhanda"
+
+#: builtin/config.c
+msgid "use system config file"
+msgstr "bain úsáid as comhad cumraíochta córais"
+
+#: builtin/config.c
+msgid "use repository config file"
+msgstr "bain úsáid as comhad cumraíochta stórais"
+
+#: builtin/config.c
+msgid "use per-worktree config file"
+msgstr "bain úsáid as comhad cumraíochta in aghaidh an chrann oibre"
+
+#: builtin/config.c builtin/gc.c
+msgid "use given config file"
+msgstr "bain úsáid as comhad cumraíochta tugtha"
+
+#: builtin/config.c
+msgid "blob-id"
+msgstr "blob-id"
+
+#: builtin/config.c
+msgid "read config from given blob object"
+msgstr "léigh cumraíocht ó réad blob a thugtar"
+
+#: builtin/config.c
+msgid "Type"
+msgstr "Cineál"
+
+#: builtin/config.c builtin/hash-object.c
+msgid "type"
+msgstr "cineál"
+
+#: builtin/config.c
+msgid "value is given this type"
+msgstr "tugtar luach an cineál seo"
+
+#: builtin/config.c
+msgid "value is \"true\" or \"false\""
+msgstr "tá luach “fíor” nó “bréagach”"
+
+#: builtin/config.c
+msgid "value is decimal number"
+msgstr "is é luach uimhir deachúil"
+
+#: builtin/config.c
+msgid "value is --bool or --int"
+msgstr "is é luach --bool nó --int"
+
+#: builtin/config.c
+msgid "value is --bool or string"
+msgstr "is é luach --bool nó teaghrán"
+
+#: builtin/config.c
+msgid "value is a path (file or directory name)"
+msgstr "is cosán é luach (ainm comhad nó eolaire)"
+
+#: builtin/config.c
+msgid "value is an expiry date"
+msgstr "is dáta éaga é luach"
+
+#: builtin/config.c
+msgid "Display options"
+msgstr "Roghanna taispeána"
+
+#: builtin/config.c
+msgid "terminate values with NUL byte"
+msgstr "foirceannadh luachanna le nóta NUL"
+
+#: builtin/config.c
+msgid "show variable names only"
+msgstr "taispeáin ainmneacha athróg amháin"
+
+#: builtin/config.c
+msgid "show origin of config (file, standard input, blob, command line)"
+msgstr ""
+"taispeáint bunús an chumraíochta (comhad, ionchur caighdeánach, blob, líne "
+"ordaithe)"
+
+#: builtin/config.c
+msgid "show scope of config (worktree, local, global, system, command)"
+msgstr ""
+"taispeáin raon feidhme an chumraíochta (crann oibre, áitiúil, domhanda, "
+"córas, ordú)"
+
+#: builtin/config.c
+msgid "show config keys in addition to their values"
+msgstr "taispeáin eochracha cumraithe i dteannta lena luachanna"
+
+#: builtin/config.c
+#, c-format
+msgid "unrecognized --type argument, %s"
+msgstr "argóint --type gan aithint, %s"
+
+#: builtin/config.c
+msgid "only one type at a time"
+msgstr "ach cineál amháin ag an am"
+
+#: builtin/config.c
+#, c-format
+msgid "wrong number of arguments, should be %d"
+msgstr "líon mícheart na n-argóintí, ba chóir go mbeadh %d"
+
+#: builtin/config.c
+#, c-format
+msgid "wrong number of arguments, should be from %d to %d"
+msgstr "ba chóir go mbeadh líon mícheart na n-argóintí ó %d go %d"
+
+#: builtin/config.c
+#, c-format
+msgid "invalid key pattern: %s"
+msgstr "patrún eochair neamhbhailí: %s"
+
+#: builtin/config.c config.c
+#, c-format
+msgid "invalid pattern: %s"
+msgstr "patrún neamhbhailí: %s"
+
+#: builtin/config.c
+#, c-format
+msgid "failed to format default config value: %s"
+msgstr "theip ar luach cumraíochta réamhshocraithe a fhormáidiú: %s"
+
+#: builtin/config.c
+#, c-format
+msgid "cannot parse color '%s'"
+msgstr "ní féidir dath '%s' a pháirseáil"
+
+#: builtin/config.c
+msgid "unable to parse default color value"
+msgstr "in ann luach dath réamhshocraithe a pharsáil"
+
+#: builtin/config.c
+msgid "not in a git directory"
+msgstr "nach bhfuil i eolaire git"
+
+#: builtin/config.c
+msgid "writing to stdin is not supported"
+msgstr "ní thacaítear le scríobh chuig stdin"
+
+#: builtin/config.c
+msgid "writing config blobs is not supported"
+msgstr "ní thacaítear le blobs cumraíochta a scríobh"
+
+#: builtin/config.c
+#, c-format
+msgid ""
+"# This is Git's per-user configuration file.\n"
+"[user]\n"
+"# Please adapt and uncomment the following lines:\n"
+"#\tname = %s\n"
+"#\temail = %s\n"
+msgstr ""
+"# Seo comhad cumraíochta Git in aghaidh an úsáideora.\n"
+"[úsáideoir]\n"
+"# Oiriúnaigh agus bain trácht de na línte seo a leanas le do thoil:\n"
+"#\tainm = %s\n"
+"#\tríomhphost = %s\n"
+
+#: builtin/config.c
+msgid "only one config file at a time"
+msgstr "ach comhad cumraithe amháin ag an am"
+
+#: builtin/config.c
+msgid "--local can only be used inside a git repository"
+msgstr "Ní féidir --local a úsáid ach taobh istigh de stór git"
+
+#: builtin/config.c
+msgid "--blob can only be used inside a git repository"
+msgstr "Ní féidir --blob a úsáid ach taobh istigh de stór git"
+
+#: builtin/config.c
+msgid "--worktree can only be used inside a git repository"
+msgstr "Ní féidir --worktree a úsáid ach taobh istigh de stór git"
+
+#: builtin/config.c builtin/gc.c
+msgid "$HOME not set"
+msgstr "Níl $HOME socraithe"
+
+#: builtin/config.c
+msgid ""
+"--worktree cannot be used with multiple working trees unless the config\n"
+"extension worktreeConfig is enabled. Please read \"CONFIGURATION FILE\"\n"
+"section in \"git help worktree\" for details"
+msgstr ""
+"Ní féidir --worktree a úsáid le crainn oibre iolracha mura bhfuil an "
+"cumraíocht\n"
+"Tá síneadh WorkTreeConfig cumasaithe. Léigh “COMHAD CUMRAÍOCHTA”\n"
+"roinn i “git help worktree” le haghaidh sonraí"
+
+#: builtin/config.c
+msgid "Other"
+msgstr "Eile"
+
+#: builtin/config.c
+msgid "respect include directives on lookup"
+msgstr "meas lena n-áirítear treoracha maidir le cuardach"
+
+#: builtin/config.c
+#, c-format
+msgid "unable to read config file '%s'"
+msgstr "nach féidir an comhad cumraithe '%s' a léamh"
+
+#: builtin/config.c
+msgid "error processing config file(s)"
+msgstr "comhad (í) cumraíochta próiseála earráide"
+
+#: builtin/config.c
+msgid "Filter options"
+msgstr "Roghanna scagaire"
+
+#: builtin/config.c
+msgid "return all values for multi-valued config options"
+msgstr ""
+"gach luach a thabhairt ar ais le haghaidh roghanna cumraithe illuachmhara"
+
+#: builtin/config.c
+msgid "interpret the name as a regular expression"
+msgstr "léirmhíniú an t-ainm mar abairt rialta"
+
+#: builtin/config.c
+msgid "show config with values matching the pattern"
+msgstr "taispeáin cumraíocht le luachanna a mheaitseann an phatrún"
+
+#: builtin/config.c
+msgid "use string equality when comparing values to value pattern"
+msgstr "bain úsáid as comhionannas sreangán agus luachanna á gcomparáid"
+
+#: builtin/config.c
+msgid "URL"
+msgstr "URL"
+
+#: builtin/config.c
+msgid "show config matching the given URL"
+msgstr "taispeáin configí a mheaitseáil leis an URL tugtha"
+
+#: builtin/config.c
+msgid "value"
+msgstr "luach"
+
+#: builtin/config.c
+msgid "use default value when missing entry"
+msgstr "bain úsáid as luach réamhshocraithe agus iontráil"
+
+#: builtin/config.c
+msgid "--fixed-value only applies with 'value-pattern'"
+msgstr "Ní bhaineann --fixed-value ach le 'patrún luacha'"
+
+#: builtin/config.c
+msgid "--default= cannot be used with --all or --url="
+msgstr "Ní féidir --default= a úsáid le --all nó --url ="
+
+#: builtin/config.c
+msgid "--url= cannot be used with --all, --regexp or --value"
+msgstr "Ní féidir --url = a úsáid le --all, --regexp nó --value"
+
+#: builtin/config.c
+msgid "Filter"
+msgstr "Scagaire"
+
+#: builtin/config.c
+msgid "replace multi-valued config option with new value"
+msgstr "luach nua a chur in ionad rogha cumraíochta illuachmhara"
+
+#: builtin/config.c
+msgid "human-readable comment string (# will be prepended as needed)"
+msgstr ""
+"teaghrán tráchtaireachta inléite don duine (déanfar # a ullmhú de réir mar "
+"is gá)"
+
+#: builtin/config.c
+msgid "add a new line without altering any existing values"
+msgstr "líne nua a chur leis gan aon luachanna atá ann cheana a athrú"
+
+#: builtin/config.c
+msgid "--fixed-value only applies with --value=<pattern>"
+msgstr "ní bhaineann --fixed-value ach le --value=<pattern>"
+
+#: builtin/config.c
+msgid "--append cannot be used with --value=<pattern>"
+msgstr "Ní féidir --append a úsáid le --value=<pattern>"
+
+#: builtin/config.c
+#, c-format
+msgid ""
+"cannot overwrite multiple values with a single value\n"
+" Use a regexp, --add or --replace-all to change %s."
+msgstr ""
+"ní féidir luachanna iolracha a fhorscríobh le luach amháin\n"
+" Úsáid regexp, --add nó --replace-all chun %s a athrú."
+
+#: builtin/config.c
+#, c-format
+msgid "no such section: %s"
+msgstr "gan aon chuid den sórt sin: %s"
+
+#: builtin/config.c
+msgid "editing stdin is not supported"
+msgstr "ní thacaítear le stdin eagarthóireachta"
+
+#: builtin/config.c
+msgid "editing blobs is not supported"
+msgstr "ní thacaítear le blobs eagarthóireachta"
+
+#: builtin/config.c
+#, c-format
+msgid "cannot create configuration file %s"
+msgstr "ní féidir comhad cumraíochta %s a chruthú"
+
+#: builtin/config.c
+msgid "Action"
+msgstr "Gníomhaíocht"
+
+#: builtin/config.c
+msgid "get value: name [<value-pattern>]"
+msgstr "luach a fháil: ainm [<value-pattern>]"
+
+#: builtin/config.c
+msgid "get all values: key [<value-pattern>]"
+msgstr "faigh na luachanna go léir: eochair [<value-pattern>]"
+
+#: builtin/config.c
+msgid "get values for regexp: name-regex [<value-pattern>]"
+msgstr "<value-pattern>luachanna a fháil do regexp: ainm-regex []"
+
+#: builtin/config.c
+msgid "get value specific for the URL: section[.var] URL"
+msgstr "faigh luach sonrach don URL: rannán [.var] URL"
+
+#: builtin/config.c
+msgid "replace all matching variables: name value [<value-pattern>]"
+msgstr "athróg meaitseála go léir in ionad: luach ainm [<value-pattern>]"
+
+#: builtin/config.c
+msgid "add a new variable: name value"
+msgstr "cuir athróg nua leis: luach ainm"
+
+#: builtin/config.c
+msgid "remove a variable: name [<value-pattern>]"
+msgstr "bhaint athróg: ainm [<value-pattern>]"
+
+#: builtin/config.c
+msgid "remove all matches: name [<value-pattern>]"
+msgstr "bhaint gach cluiche: ainm [<value-pattern>]"
+
+#: builtin/config.c
+msgid "rename section: old-name new-name"
+msgstr "athainmnigh an chuid: sean-ainm nua-ainm"
+
+#: builtin/config.c
+msgid "remove a section: name"
+msgstr "cuid a bhaint: ainm"
+
+#: builtin/config.c
+msgid "list all"
+msgstr "liostáil go léir"
+
+#: builtin/config.c
+msgid "open an editor"
+msgstr "eagarthóir a oscailt"
+
+#: builtin/config.c
+msgid "find the color configured: slot [<default>]"
+msgstr "faigh an dath cumraithe: sliotán [<default>]"
+
+#: builtin/config.c
+msgid "find the color setting: slot [<stdout-is-tty>]"
+msgstr "faigh an socrú dath: sliotán [<stdout-is-tty>]"
+
+#: builtin/config.c
+msgid "with --get, use default value when missing entry"
+msgstr "le --get, bain úsáid as luach réamhshocraithe agus iontráil in easnamh"
+
+#: builtin/config.c
+msgid "--get-color and variable type are incoherent"
+msgstr "Tá --get-color agus cineál athraitheach neamhchomhtháite"
+
+#: builtin/config.c
+msgid "no action specified"
+msgstr "aon ghníomh sonraithe"
+
+#: builtin/config.c
+msgid "--name-only is only applicable to --list or --get-regexp"
+msgstr "Níl --name-only infheidhme ach le --list nó --get-regexp"
+
+#: builtin/config.c
+msgid ""
+"--show-origin is only applicable to --get, --get-all, --get-regexp, and --"
+"list"
+msgstr ""
+"Níl --show-origin infheidhme ach le --get, --get-all, --get-regexp, agus --"
+"list"
+
+#: builtin/config.c
+msgid "--default is only applicable to --get"
+msgstr "Níl --default infheidhme ach le --get"
+
+#: builtin/config.c
+msgid "--comment is only applicable to add/set/replace operations"
+msgstr ""
+"Níl --comment infheidhme ach le hoibríochtaí a chur leis /socraí/athsholáthar"
+
+#: builtin/count-objects.c
+msgid "print sizes in human readable format"
+msgstr "méideanna priontála i bhformáid inléite don duine"
+
+#: builtin/credential-cache--daemon.c
+#, c-format
+msgid ""
+"The permissions on your socket directory are too loose; other\n"
+"users may be able to read your cached credentials. Consider running:\n"
+"\n"
+"\tchmod 0700 %s"
+msgstr ""
+"Tá na ceadanna ar d'eolaire soicéad ró-scaoilte; eile\n"
+"b'fhéidir go mbeidh úsáideoirí in ann do dhintiúir taiscéadaithe a léamh. "
+"Smaoinigh ar rith:\n"
+"\n"
+" chmod 0700 %s"
+
+#: builtin/credential-cache--daemon.c
+msgid "print debugging messages to stderr"
+msgstr "teachtaireachtaí dífhabhtaithe a phriontáil chuig stderr"
+
+#: builtin/credential-cache--daemon.c
+msgid "credential-cache--daemon unavailable; no unix socket support"
+msgstr "credential-cache--daemon ar fáil; gan aon tacaíocht soicéad unix"
+
+#: builtin/credential-cache.c
+msgid "credential-cache unavailable; no unix socket support"
+msgstr "taisce creidiúnaithe ar fáil; gan aon tacaíocht soicéad unix"
+
+#: builtin/credential-store.c
+#, c-format
+msgid "unable to get credential storage lock in %d ms"
+msgstr "in ann glas stórála creidiúnaithe a fháil in %d ms"
+
+#: builtin/describe.c
+msgid ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"
+msgstr ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"
+
+#: builtin/describe.c
+msgid ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"
+msgstr ""
+"git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"
+
+#: builtin/describe.c
+msgid "git describe <blob>"
+msgstr "git cur síos <blob>"
+
+#: builtin/describe.c
+msgid "head"
+msgstr "ceann"
+
+#: builtin/describe.c
+msgid "lightweight"
+msgstr "éadrom"
+
+#: builtin/describe.c
+msgid "annotated"
+msgstr "anótáilte"
+
+#: builtin/describe.c
+#, c-format
+msgid "annotated tag %s not available"
+msgstr "níl clib anótáilte %s ar fáil"
+
+#: builtin/describe.c
+#, c-format
+msgid "tag '%s' is externally known as '%s'"
+msgstr "tugtar '%s' ar an gclib '%s' go seachtrach"
+
+#: builtin/describe.c
+#, c-format
+msgid "no tag exactly matches '%s'"
+msgstr "níl aon chlib ag teacht go díreach le '%s'"
+
+#: builtin/describe.c
+#, c-format
+msgid "No exact match on refs or tags, searching to describe\n"
+msgstr ""
+"Níl aon mheaitseáil cruinn ar thaifeanna nó clibeanna, ag cuardach chun cur "
+"síos\n"
+
+#: builtin/describe.c
+#, c-format
+msgid "finished search at %s\n"
+msgstr "cuardach críochnaithe ag %s\n"
+
+#: builtin/describe.c
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+"Ní féidir le haon chlibeanna anótaithe cur síos a dhéanamh ar '%s'.\n"
+"Mar sin féin, bhí clibeanna gan anótáil ann: triail as --tags."
+
+#: builtin/describe.c
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+"Ní féidir le clibeanna cur síos a dhéanamh ar '%s'.\n"
+"Bain triail as --always, nó cruthaigh roinnt clibeanna."
+
+#: builtin/describe.c
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr "gealltanais %lu a thrasnaíodh\n"
+
+#: builtin/describe.c
+#, c-format
+msgid "found %i tags; gave up search at %s\n"
+msgstr "fuarthas %i clibeanna; thréig an cuardach ag %s\n"
+
+#: builtin/describe.c
+#, c-format
+msgid "describe %s\n"
+msgstr "déan cur síos ar %s\n"
+
+#: builtin/describe.c
+#, c-format
+msgid "Not a valid object name %s"
+msgstr "Ní ainm réad bailí %s"
+
+#: builtin/describe.c
+#, c-format
+msgid "%s is neither a commit nor blob"
+msgstr "Ní gealltanas ná blob é %s"
+
+#: builtin/describe.c
+msgid "find the tag that comes after the commit"
+msgstr "faigh an chlib a thagann tar éis an tiomanta"
+
+#: builtin/describe.c
+msgid "debug search strategy on stderr"
+msgstr "straitéis cuardaigh dífhabhtú ar stderr"
+
+#: builtin/describe.c
+msgid "use any ref"
+msgstr "bain úsáid as aon tagairt"
+
+#: builtin/describe.c
+msgid "use any tag, even unannotated"
+msgstr "úsáid aon chlib, fiú gan anótáil"
+
+#: builtin/describe.c
+msgid "always use long format"
+msgstr "úsáid formáid fada i gcónaí"
+
+#: builtin/describe.c
+msgid "only follow first parent"
+msgstr "lean ach an chéad thuismitheoir"
+
+#: builtin/describe.c
+msgid "only output exact matches"
+msgstr "ach cluichí cruinne aschuir"
+
+#: builtin/describe.c
+msgid "consider <n> most recent tags (default: 10)"
+msgstr "machnamh <n>ar na clibeanna is déanaí (réamhshocraithe: 10)"
+
+#: builtin/describe.c
+msgid "only consider tags matching <pattern>"
+msgstr "ní mheas ach meaitseáil clibeanna <pattern>"
+
+#: builtin/describe.c
+msgid "do not consider tags matching <pattern>"
+msgstr "ná smaoinigh ar mheaitseáil clibeanna <pattern>"
+
+#: builtin/describe.c builtin/name-rev.c
+msgid "show abbreviated commit object as fallback"
+msgstr "taispeáint réad tiomanta giorraithe mar fhilleadh"
+
+#: builtin/describe.c
+msgid "mark"
+msgstr "marc"
+
+#: builtin/describe.c
+msgid "append <mark> on dirty working tree (default: \"-dirty\")"
+msgstr "cuir isteach <mark>ar chrann oibre salach (réamhshocraithe: “-salach”)"
+
+#: builtin/describe.c
+msgid "append <mark> on broken working tree (default: \"-broken\")"
+msgstr "cuir isteach <mark>ar chrann oibre briste (réamhshocraithe: “-broken”)"
+
+#: builtin/describe.c
+msgid "No names found, cannot describe anything."
+msgstr ""
+"Níor aimsíodh aon ainmneacha, ní féidir cur síos a dhéanamh ar aon rud."
+
+#: builtin/describe.c
+#, c-format
+msgid "option '%s' and commit-ishes cannot be used together"
+msgstr "ní féidir rogha '%s' agus coimistí a úsáid le chéile"
+
+#: builtin/diagnose.c
+msgid ""
+"git diagnose [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
+" [--mode=<mode>]"
+msgstr ""
+"<format>git diagnosis [(-o | --output-directory)] [(-s | -- <path>suffix)]\n"
+" <mode>[--mód =]"
+
+#: builtin/diagnose.c
+msgid "specify a destination for the diagnostics archive"
+msgstr "sonraigh ceann scríbe don chartlann diagnóisic"
+
+#: builtin/diagnose.c
+msgid "specify a strftime format suffix for the filename"
+msgstr "sonraigh iarmhír formáid strftime don ainm comhaid"
+
+#: builtin/diagnose.c
+msgid "specify the content of the diagnostic archive"
+msgstr "sonraigh ábhar an chartlann dhiagnóiseach"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "nach féidir modh a pháirseáil: %s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "nach féidir id réad a pháirseáil: %s"
+
+#: builtin/diff-pairs.c
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<diff-options>]"
+
+#: builtin/diff-pairs.c builtin/log.c builtin/replay.c builtin/shortlog.c
+#: bundle.c
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "argóint gan aithint: %s"
+
+#: builtin/diff-pairs.c
+msgid "working without -z is not supported"
+msgstr "ní thacaítear le bheith ag obair gan -z"
+
+#: builtin/diff-pairs.c
+msgid "pathspec arguments not supported"
+msgstr "argóintí pathspec nach dtacaítear leis"
+
+#: builtin/diff-pairs.c
+msgid "revision arguments not allowed"
+msgstr "argóintí athbhreithnithe nach"
+
+#: builtin/diff-pairs.c
+msgid "invalid raw diff input"
+msgstr "ionchur diff amh neamhbhailí"
+
+#: builtin/diff-pairs.c
+msgid "tree objects not supported"
+msgstr "rudaí crann nach dtacaítear leis"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading path"
+msgstr "fuair EOF agus tú ag léamh cosán"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading destination path"
+msgstr "fuair EOF agus tú ag léamh cosán ceann scríbe"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "nach féidir scór athainmniú/cóipeáil a pháirseáil: %s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "stádas diff anaithnid: %c"
+
+#: builtin/diff-tree.c
+msgid "--merge-base only works with two commits"
+msgstr "Ní oibríonn --merge-base ach le dhá thiomantas"
+
+#: builtin/diff.c
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr "'%s': ní comhad rialta nó comhnasc"
+
+#: builtin/diff.c
+msgid "no merge given, only parents."
+msgstr "ní thugtar aon chumasc, tuismitheoirí amháin."
+
+#: builtin/diff.c
+#, c-format
+msgid "invalid option: %s"
+msgstr "rogha neamhbhailí: %s"
+
+#: builtin/diff.c
+#, c-format
+msgid "%s...%s: no merge base"
+msgstr "%s... %s: gan aon bhonn cumaisc"
+
+#: builtin/diff.c
+msgid "Not a git repository"
+msgstr "Ní stór git"
+
+#: builtin/diff.c builtin/grep.c
+#, c-format
+msgid "invalid object '%s' given."
+msgstr "réad neamhbhailí '%s' tugtha."
+
+#: builtin/diff.c
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr "níos mó ná dhá bhlob a thugtar: '%s'"
+
+#: builtin/diff.c
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr "réad neamh-láimhseáilte '%s' tugtha."
+
+#: builtin/diff.c
+#, c-format
+msgid "%s...%s: multiple merge bases, using %s"
+msgstr "%s... %s: bonn cumaisc iolracha, ag baint úsáide as %s"
+
+#: builtin/difftool.c
+msgid "git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]"
+msgstr "git difftool [[<options>]] <commit>[[<commit>]] [--] [<path>...]"
+
+#: builtin/difftool.c
+#, c-format
+msgid "could not read symlink %s"
+msgstr "ní fhéadfaí nasc simtéarach %s a léamh"
+
+#: builtin/difftool.c
+#, c-format
+msgid "could not read symlink file %s"
+msgstr "ní raibh in ann comhad simnasc %s a léamh"
+
+#: builtin/difftool.c
+#, c-format
+msgid "could not read object %s for symlink %s"
+msgstr "ní raibh in ann réad %s a léamh le haghaidh nasc simtéarach %s"
+
+#: builtin/difftool.c
+msgid ""
+"combined diff formats ('-c' and '--cc') are not supported in\n"
+"directory diff mode ('-d' and '--dir-diff')."
+msgstr ""
+"ní thacaítear le formáidí diff comhcheangailte ('-c' agus '--cc') i\n"
+"modh diff eolaire ('-d' agus '--dir-diff')."
+
+#: builtin/difftool.c
+#, c-format
+msgid "both files modified: '%s' and '%s'."
+msgstr "modhnaigh an dá chomhad: '%s' agus '%s'."
+
+#: builtin/difftool.c
+msgid "working tree file has been left."
+msgstr "tá comhad crann oibre fágtha."
+
+#: builtin/difftool.c sequencer.c
+#, c-format
+msgid "could not copy '%s' to '%s'"
+msgstr "ní fhéadfaí '%s' a chóipeáil chuig '%s'"
+
+#: builtin/difftool.c
+#, c-format
+msgid "temporary files exist in '%s'."
+msgstr "tá comhaid shealadacha ann i '%s'."
+
+#: builtin/difftool.c
+msgid "you may want to cleanup or recover these."
+msgstr "b'fhéidir gur mhaith leat iad seo a ghlanadh nó a aisghabháil."
+
+#: builtin/difftool.c
+#, c-format
+msgid "failed: %d"
+msgstr "theip ar: %d"
+
+#: builtin/difftool.c
+msgid "use `diff.guitool` instead of `diff.tool`"
+msgstr "bain úsáid as `diff.guitool` in ionad `diff.tool`"
+
+#: builtin/difftool.c
+msgid "perform a full-directory diff"
+msgstr "éagsúlacht eolaire lán-eolaire a dhéanamh"
+
+#: builtin/difftool.c
+msgid "do not prompt before launching a diff tool"
+msgstr "ná spreag sula seolann tú uirlis diff"
+
+#: builtin/difftool.c
+msgid "use symlinks in dir-diff mode"
+msgstr "bain úsáid as naisc siombailte i mód dir-diff"
+
+#: builtin/difftool.c
+msgid "tool"
+msgstr "uirlis"
+
+#: builtin/difftool.c
+msgid "use the specified diff tool"
+msgstr "bain úsáid as an uirlis diff sonraithe"
+
+#: builtin/difftool.c
+msgid "print a list of diff tools that may be used with `--tool`"
+msgstr "liosta d'uirlisí diff is féidir a úsáid le `--tool` a phriontáil"
+
+#: builtin/difftool.c
+msgid ""
+"make 'git-difftool' exit when an invoked diff tool returns a non-zero exit "
+"code"
+msgstr ""
+"imeacht 'git-difftool' a dhéanamh nuair a fhilleann uirlis diff a ghairmtear "
+"cód imeachta neamh-nialasach"
+
+#: builtin/difftool.c
+msgid "specify a custom command for viewing diffs"
+msgstr "sonraigh ordú saincheaptha chun féachaint ar dhifríochtaí"
+
+#: builtin/difftool.c
+msgid "passed to `diff`"
+msgstr "cuireadh chuig `diff`"
+
+#: builtin/difftool.c
+msgid "difftool requires worktree or --no-index"
+msgstr "éilíonn difftool crann oibre nó --no-index"
+
+#: builtin/difftool.c
+msgid "no <tool> given for --tool=<tool>"
+msgstr "níl aon tu <tool> gadh le haghaidh --tool=<tool>"
+
+#: builtin/difftool.c
+msgid "no <cmd> given for --extcmd=<cmd>"
+msgstr "níl <cmd> tugtha do --extcmd=<cmd>"
+
+#: builtin/fast-export.c
+msgid "git fast-export [<rev-list-opts>]"
+msgstr "git fast-export [<rev-list-opts>]"
+
+#: builtin/fast-export.c
+msgid "Error: Cannot export nested tags unless --mark-tags is specified."
+msgstr ""
+"Earráid: Ní féidir clibeanna neadaithe a onnmhairiú mura sonraítear --mark-"
+"tags."
+
+#: builtin/fast-export.c
+msgid "--anonymize-map token cannot be empty"
+msgstr "Ní féidir le comhartha --anonymize-map a bheith folamh"
+
+#: builtin/fast-export.c
+msgid "show progress after <n> objects"
+msgstr "dhul chun cinn a thaispe <n>áint"
+
+#: builtin/fast-export.c
+msgid "select handling of signed tags"
+msgstr "roghnaigh láimhseáil na clibeanna"
+
+#: builtin/fast-export.c
+msgid "select handling of signed commits"
+msgstr "roghnaigh láimhseáil tiomantas sínithe"
+
+#: builtin/fast-export.c
+msgid "select handling of tags that tag filtered objects"
+msgstr "roghnaigh láimhseáil clibeanna a ligeann rudaí"
+
+#: builtin/fast-export.c
+msgid "select handling of commit messages in an alternate encoding"
+msgstr "roghnaigh láimhseáil teachtaireachtaí tiomanta i ionchódú"
+
+#: builtin/fast-export.c
+msgid "dump marks to this file"
+msgstr "marcanna dumpáil chuig an gcomhad seo"
+
+#: builtin/fast-export.c
+msgid "import marks from this file"
+msgstr "marcanna iompórtáil ón gcomhad seo"
+
+#: builtin/fast-export.c
+msgid "import marks from this file if it exists"
+msgstr "marcanna a iompórtáil ón gcomhad seo má tá sé ann"
+
+#: builtin/fast-export.c
+msgid "fake a tagger when tags lack one"
+msgstr "clibeoir bréige nuair nach bhfuil ceann ag clibeanna"
+
+#: builtin/fast-export.c
+msgid "output full tree for each commit"
+msgstr "aschur crann iomlán do gach tiomantas"
+
+#: builtin/fast-export.c
+msgid "use the done feature to terminate the stream"
+msgstr "úsáid an ghné déanta chun an sruth a fhoirceannadh"
+
+#: builtin/fast-export.c
+msgid "skip output of blob data"
+msgstr "scipeáil aschur sonraí blob"
+
+#: builtin/fast-export.c builtin/log.c
+msgid "refspec"
+msgstr "refspec"
+
+#: builtin/fast-export.c
+msgid "apply refspec to exported refs"
+msgstr "refspec a chur i bhfeidhm ar thaifeanna onnmhair"
+
+#: builtin/fast-export.c
+msgid "anonymize output"
+msgstr "aschur gan ainm"
+
+#: builtin/fast-export.c
+msgid "from:to"
+msgstr "ó:go"
+
+#: builtin/fast-export.c
+msgid "convert <from> to <to> in anonymized output"
+msgstr "tiontaigh <from>go <to>in aschur gan ainm"
+
+#: builtin/fast-export.c
+msgid "reference parents which are not in fast-export stream by object id"
+msgstr ""
+"tuismitheoirí tagartha nach bhfuil i sruth tapa onnmhairithe de réir id réad"
+
+#: builtin/fast-export.c
+msgid "show original object ids of blobs/commits"
+msgstr "taispeáin id réad bunaidh de bhlobanna/gealltanna"
+
+#: builtin/fast-export.c
+msgid "label tags with mark ids"
+msgstr "clibeanna lipéad le id marc"
+
+#: builtin/fast-import.c
+#, c-format
+msgid "Missing from marks for submodule '%s'"
+msgstr "Ar iarraidh ó mharcanna don fho-mhodúl '%s'"
+
+#: builtin/fast-import.c
+#, c-format
+msgid "Missing to marks for submodule '%s'"
+msgstr "Ar iarraidh marcanna don fho-mhodúl '%s'"
+
+#: builtin/fast-import.c
+#, c-format
+msgid "Expected 'mark' command, got %s"
+msgstr "Táthar ag súil leis an ordú 'marc', fuair %s"
+
+#: builtin/fast-import.c
+#, c-format
+msgid "Expected 'to' command, got %s"
+msgstr "Táthar ag súil leis an ordú 'to', fuair %s"
+
+#: builtin/fast-import.c
+msgid "Expected format name:filename for submodule rewrite option"
+msgstr ""
+"Ainm formáid a bhfuil súil leis ainm comhaid don rogha athscríobh fo-mhodúil"
+
+#: builtin/fast-import.c
+#, c-format
+msgid "feature '%s' forbidden in input without --allow-unsafe-features"
+msgstr "feature '%s' forbidden in input without --allow-unsafe-features"
+
+#: builtin/fetch-pack.c
+#, c-format
+msgid "Lockfile created but not reported: %s"
+msgstr "Cruthaíodh comhad Lockfile ach nár tuairiscigh: %s"
+
+#: builtin/fetch.c
+msgid "git fetch [<options>] [<repository> [<refspec>...]]"
+msgstr "git fetch [<options>] [<repository> [<refspec>...]]"
+
+#: builtin/fetch.c
+msgid "git fetch [<options>] <group>"
+msgstr "git fetch [<options>] <group>"
+
+#: builtin/fetch.c
+msgid "git fetch --multiple [<options>] [(<repository> | <group>)...]"
+msgstr "git fetch --multiple [<options>] [(<repository> | <group>)...]"
+
+#: builtin/fetch.c
+msgid "git fetch --all [<options>]"
+msgstr "git fetch --all [<options>]"
+
+#: builtin/fetch.c
+msgid "fetch.parallel cannot be negative"
+msgstr "ní féidir fetch.parallel a bheith diúltach"
+
+#: builtin/fetch.c
+msgid "couldn't find remote ref HEAD"
+msgstr "ní raibh in ann ciantagartha HEAD a fháil"
+
+#: builtin/fetch.c
+#, c-format
+msgid "From %.*s\n"
+msgstr "Ó %.*s\n"
+
+#: builtin/fetch.c
+#, c-format
+msgid "object %s not found"
+msgstr "níor aimsíodh réad %s"
+
+#: builtin/fetch.c
+msgid "[up to date]"
+msgstr "[cothrom le dáta]"
+
+#: builtin/fetch.c
+msgid "[rejected]"
+msgstr "[diúltaithe]"
+
+#: builtin/fetch.c
+msgid "can't fetch into checked-out branch"
+msgstr "ní féidir teacht isteach i mbrainse seiceáilte"
+
+#: builtin/fetch.c
+msgid "[tag update]"
+msgstr "[Nuashonrú tag]"
+
+#: builtin/fetch.c
+msgid "unable to update local ref"
+msgstr "in ann tagairt áitiúil a nuashonrú"
+
+#: builtin/fetch.c
+msgid "would clobber existing tag"
+msgstr "chuirfeadh an chlib atá ann cheana"
+
+#: builtin/fetch.c
+msgid "[new tag]"
+msgstr "[tag nua]"
+
+#: builtin/fetch.c
+msgid "[new branch]"
+msgstr "[brainse nua]"
+
+#: builtin/fetch.c
+msgid "[new ref]"
+msgstr "[tagartha nua]"
+
+#: builtin/fetch.c
+msgid "forced update"
+msgstr "nuashonrú éigeant"
+
+#: builtin/fetch.c
+msgid "non-fast-forward"
+msgstr "neamh-tapa ar aghaidh"
+
+#: builtin/fetch.c builtin/grep.c sequencer.c
+#, c-format
+msgid "cannot open '%s'"
+msgstr "ní féidir '%s' a oscailt"
+
+#: builtin/fetch.c
+msgid ""
+"fetch normally indicates which branches had a forced update,\n"
+"but that check has been disabled; to re-enable, use '--show-forced-updates'\n"
+"flag or run 'git config fetch.showForcedUpdates true'"
+msgstr ""
+"is gnách go léiríonn teacht na brainsí a raibh nuashonrú éigeantach orthu,\n"
+"ach tá an seiceáil sin díchumasaithe; chun athchumasú, bain úsáid as '--show-"
+"forced-updates'\n"
+"bratach nó rith 'git config fetch.showForcedUpdates true'"
+
+#: builtin/fetch.c
+#, c-format
+msgid ""
+"it took %.2f seconds to check forced updates; you can use\n"
+"'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates "
+"false'\n"
+"to avoid this check\n"
+msgstr ""
+"thóg sé %.2f soicind chun nuashonruithe éigeantacha a sheiceáil; is féidir "
+"leat úsáid\n"
+"'--no-show-forced-updates 'nó rith 'git config fetch.showForcedUpdates "
+"bréaga'\n"
+"chun an seiceáil seo a sheachaint\n"
+
+#: builtin/fetch.c
+#, c-format
+msgid "%s did not send all necessary objects"
+msgstr "Níor sheol %s na rudaí riachtanacha go léir"
+
+#: builtin/fetch.c
+#, c-format
+msgid "rejected %s because shallow roots are not allowed to be updated"
+msgstr "dhiúltaigh %s toisc nach gceadaítear fréamhacha éadmhara a nuashonrú"
+
+#: builtin/fetch.c
+#, 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í fhéadfaí roinnt fios áitiúla a nuashonrú; déan iarracht rith\n"
+" 'git remote prune%s' chun aon bhrainsí sean-fhrithsheasmhach a bhaint"
+
+#: builtin/fetch.c
+#, c-format
+msgid " (%s will become dangling)"
+msgstr " (beidh %s ag crochadh)"
+
+#: builtin/fetch.c
+#, c-format
+msgid " (%s has become dangling)"
+msgstr " (%s has become dangling)"
+
+#: builtin/fetch.c
+msgid "[deleted]"
+msgstr "[scriosta]"
+
+#: builtin/fetch.c builtin/remote.c
+msgid "(none)"
+msgstr "(níl aon)"
+
+#: builtin/fetch.c
+#, c-format
+msgid "refusing to fetch into branch '%s' checked out at '%s'"
+msgstr "ag diúltú teacht isteach i mbrainse '%s' a sheiceáil amach ag '%s'"
+
+#: builtin/fetch.c
+#, c-format
+msgid "option \"%s\" value \"%s\" is not valid for %s"
+msgstr "níl an rogha “%s” luach “%s” bailí do %s"
+
+#: builtin/fetch.c
+#, c-format
+msgid "option \"%s\" is ignored for %s"
+msgstr "déantar neamhaird ar rogha “%s” do %s"
+
+#: builtin/fetch.c object-store.c
+#, c-format
+msgid "%s is not a valid object"
+msgstr "Ní réad bailí é %s"
+
+#: builtin/fetch.c
+#, c-format
+msgid "the object %s does not exist"
+msgstr "níl an réad %s ann"
+
+#: builtin/fetch.c
+#, c-format
+msgid ""
+"Run 'git remote set-head %s %s' to follow the change, or set\n"
+"'remote.%s.followRemoteHEAD' configuration option to a different value\n"
+"if you do not want to see this message. Specifically running\n"
+"'git config set remote.%s.followRemoteHEAD warn-if-not-branch-%s'\n"
+"will disable the warning until the remote changes HEAD to something else."
+msgstr ""
+"Rith 'git remote set-head %s %s' chun an t-athrú a leanúint, nó socraigh\n"
+"rogha cumraíochta 'remote.%s.followRemoteHEAD' go luach difriúil\n"
+"mura mian leat an teachtaireacht seo a fheiceáil. Go sonrach, má ritheann "
+"tú\n"
+"'git config set remote.%s.followRemoteHEAD warn-if-not-branch-%s'\n"
+"díchumasófar an rabhadh go dtí go n-athraíonn an cianda HEAD go rud éigin "
+"eile."
+
+#: builtin/fetch.c
+msgid "multiple branches detected, incompatible with --set-upstream"
+msgstr "brainsí iolracha brainsí braite, gan oiriúint le --set-upstream"
+
+#: builtin/fetch.c
+#, c-format
+msgid ""
+"could not set upstream of HEAD to '%s' from '%s' when it does not point to "
+"any branch."
+msgstr ""
+"ní fhéadfaí suas sruth de HEAD a shocrú go '%s' ó '%s' nuair nach dtugann sé "
+"in iúl go dtí aon bhrainse."
+
+#: builtin/fetch.c
+msgid "not setting upstream for a remote remote-tracking branch"
+msgstr "gan socrú suas sruth do bhrainse cianrianaithe"
+
+#: builtin/fetch.c
+msgid "not setting upstream for a remote tag"
+msgstr "gan a shocrú suas sruth le haghaidh clib iargúlta"
+
+#: builtin/fetch.c
+msgid "unknown branch type"
+msgstr "cineál brainse anaithnid"
+
+#: builtin/fetch.c
+msgid ""
+"no source branch found;\n"
+"you need to specify exactly one branch with the --set-upstream option"
+msgstr ""
+"ní bhfuarthas aon bhrainse foinse;\n"
+"ní mór duit brainse amháin a shonrú go díreach leis an rogha --set-upstream"
+
+#: builtin/fetch.c
+#, c-format
+msgid "Fetching %s\n"
+msgstr "Ag tarraingt %s\n"
+
+#: builtin/fetch.c
+#, c-format
+msgid "could not fetch %s"
+msgstr "ní fhéadfaí %s a fháil"
+
+#: builtin/fetch.c
+#, c-format
+msgid "could not fetch '%s' (exit code: %d)\n"
+msgstr "níorbh fhéidir '%s' a fháil (cód scoir: %d)\n"
+
+#: builtin/fetch.c
+msgid ""
+"no remote repository specified; please specify either a URL or a\n"
+"remote name from which new revisions should be fetched"
+msgstr ""
+"níl aon stór iargúlta sonraithe; sonraigh URL nó a\n"
+"ainm iargúlta ar chóir athbhreithnithe nua a fháil"
+
+#: builtin/fetch.c
+msgid "you need to specify a tag name"
+msgstr "ní mór duit ainm clib a shonrú"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "fetch from all remotes"
+msgstr "faigh ó gach iargúlta"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "set upstream for git pull/fetch"
+msgstr "socraigh suas sruth le haghaidh git pull/fetch"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "append to .git/FETCH_HEAD instead of overwriting"
+msgstr "cuir chuig .git/FETCH_HEAD in ionad athscríobh"
+
+#: builtin/fetch.c
+msgid "use atomic transaction to update references"
+msgstr "úsáid idirbheart adamach chun tagairtí a nuashonrú"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "path to upload pack on remote end"
+msgstr "cosán chun pacáiste a uaslódáil ar iargúlta"
+
+#: builtin/fetch.c
+msgid "force overwrite of local reference"
+msgstr "tagairt áitiúil a fhorscríobh"
+
+#: builtin/fetch.c
+msgid "fetch from multiple remotes"
+msgstr "a fháil ó iomadúla iargúlta"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "fetch all tags and associated objects"
+msgstr "gach clib agus rudaí gaolmhara a fháil"
+
+#: builtin/fetch.c
+msgid "do not fetch all tags (--no-tags)"
+msgstr "ná faigh gach clib (--no-tags)"
+
+#: builtin/fetch.c
+msgid "number of submodules fetched in parallel"
+msgstr "líon na bhfo-mhodúil a fuarthas go comhthreomhar"
+
+#: builtin/fetch.c
+msgid "modify the refspec to place all refs within refs/prefetch/"
+msgstr "an refspec a mhodhnú chun gach refs a chur laistigh de refs/prefetch/"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "prune remote-tracking branches no longer on remote"
+msgstr "brainsí cianrianaithe a ghearradh nach bhfuil ar iargúlta a"
+
+#: builtin/fetch.c
+msgid "prune local tags no longer on remote and clobber changed tags"
+msgstr ""
+"clibeanna áitiúla a ghearradh nach bhfuil ar chlibeanna iargúlta agus "
+"athraithe clobber"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "on-demand"
+msgstr "ar éileamh"
+
+#: builtin/fetch.c
+msgid "control recursive fetching of submodules"
+msgstr "tógáil athfhillteach fo-mhodúil a rialú"
+
+#: builtin/fetch.c
+msgid "write fetched references to the FETCH_HEAD file"
+msgstr "scríobh tagairtí faighte don chomhad FETCH_HEAD"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "keep downloaded pack"
+msgstr "pacáiste íoslódáilte"
+
+#: builtin/fetch.c
+msgid "allow updating of HEAD ref"
+msgstr "cead a thabhairt do nuashonrú HEAD ref"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "deepen history of shallow clone"
+msgstr "stair clón éadomhain a dhoimhniú"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "deepen history of shallow repository based on time"
+msgstr "stair stór éadomhain a dhoimhniú bunaithe ar am"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "convert to a complete repository"
+msgstr "tiontaigh go stór iomlán"
+
+#: builtin/fetch.c
+msgid "re-fetch without negotiating common commits"
+msgstr "athghabháil gan gealltanais choiteanna a chaibidliú"
+
+#: builtin/fetch.c
+msgid "prepend this to submodule path output"
+msgstr "é seo a chur ar aghaidh chuig aschur cosán fo-mhodúil"
+
+#: builtin/fetch.c
+msgid ""
+"default for recursive fetching of submodules (lower priority than config "
+"files)"
+msgstr ""
+"réamhshocraithe maidir le fo-mhodúil a fháil athshlánach (tosaíocht níos "
+"ísle ná comhaid chumraithe)"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "accept refs that update .git/shallow"
+msgstr "glacadh le hiarrachtaí a nuashonraíonn .git/shalach"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "refmap"
+msgstr "athléarscáil"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "specify fetch refmap"
+msgstr "sonraigh refmap a fháil"
+
+#: builtin/fetch.c builtin/pull.c builtin/rebase.c builtin/replay.c
+msgid "revision"
+msgstr "athbhreithiú"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "report that we have only objects reachable from this object"
+msgstr "tuairisciú nach bhfuil ach rudaí inrochtana againn ón réad seo"
+
+#: builtin/fetch.c
+msgid "do not fetch a packfile; instead, print ancestors of negotiation tips"
+msgstr ""
+"ná faigh comhad pacáiste; ina ionad sin, priontáil sinsear leideanna "
+"idirbheartaíochta"
+
+#: builtin/fetch.c
+msgid "run 'maintenance --auto' after fetching"
+msgstr "reáchtáil 'cothabháil --auto' tar éis a fháil"
+
+#: builtin/fetch.c builtin/pull.c
+msgid "check for forced-updates on all updated branches"
+msgstr "seiceáil ar nuashonruithe éigeantacha ar gach brainse nuashonraithe"
+
+#: builtin/fetch.c
+msgid "write the commit-graph after fetching"
+msgstr "scríobh an graf coimisiúnaithe tar éis a fháil"
+
+#: builtin/fetch.c
+msgid "accept refspecs from stdin"
+msgstr "glacadh le refspecs ó stdin"
+
+#: builtin/fetch.c
+msgid "--negotiate-only needs one or more --negotiation-tip=*"
+msgstr ""
+"--negotiate-only teastaíonn ceann amháin nó níos mó --negotiation-tip=*"
+
+#: builtin/fetch.c
+msgid "negative depth in --deepen is not supported"
+msgstr "ní thacaítear le doimhneacht dhiúltach i --deepen"
+
+#: builtin/fetch.c
+msgid "--unshallow on a complete repository does not make sense"
+msgstr "níl ciall le --unshallow ar stórlann iomlán"
+
+#: builtin/fetch.c
+#, c-format
+msgid "failed to fetch bundles from '%s'"
+msgstr "theip ar bhaclaí a fháil ó '%s'"
+
+#: builtin/fetch.c
+msgid "fetch --all does not take a repository argument"
+msgstr "ní ghlacann fetch --all argóint stór"
+
+#: builtin/fetch.c
+msgid "fetch --all does not make sense with refspecs"
+msgstr "ní bhíonn ciall ag teacht --all le refspecs"
+
+#: builtin/fetch.c
+#, c-format
+msgid "no such remote or remote group: %s"
+msgstr "gan aon ghrúpa iargúlta nó cianda den sórt sin: %s"
+
+#: builtin/fetch.c
+msgid "fetching a group and specifying refspecs does not make sense"
+msgstr "níl ciall grúpa a fháil agus refspecs a shonrú"
+
+#: builtin/fetch.c
+msgid "must supply remote when using --negotiate-only"
+msgstr "ní mór iargúlta a sholáthar agus tú ag úsáid --negotiate-only"
+
+#: builtin/fetch.c
+msgid "protocol does not support --negotiate-only, exiting"
+msgstr "ní thacaíonn an prótacal le --negotiate-only, ag scoir"
+
+#: builtin/fetch.c
+msgid ""
+"--filter can only be used with the remote configured in "
+"extensions.partialclone"
+msgstr ""
+"--filter Ní féidir ach an scagaire a úsáid ach leis an iargúlta cumraithe in "
+"extensions.partialclone"
+
+#: builtin/fetch.c
+msgid "--atomic can only be used when fetching from one remote"
+msgstr ""
+"--atomic ní féidir ach adamhach a úsáid ach amháin nuair a bhíonn sé á fháil "
+"ó chianrialtán amháin"
+
+#: builtin/fetch.c
+msgid "--stdin can only be used when fetching from one remote"
+msgstr ""
+"Ní féidir --stdin a úsáid ach amháin nuair a bhfaightear é ó iargúlta amháin"
+
+#: builtin/fmt-merge-msg.c
+msgid ""
+"git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"
+msgstr ""
+"<n><file>git fmt-merge-msg [-m<message>] [--log [=] | --no-log] [--comhad]"
+
+#: builtin/fmt-merge-msg.c
+msgid "populate log with at most <n> entries from shortlog"
+msgstr "logáil a chomhlánú le hiontrálacha is mó <n>ó ghearrlog"
+
+#: builtin/fmt-merge-msg.c
+msgid "alias for --log (deprecated)"
+msgstr "alias le haghaidh --log (mísheasmhach)"
+
+#: builtin/fmt-merge-msg.c
+msgid "text"
+msgstr "téacs"
+
+#: builtin/fmt-merge-msg.c
+msgid "use <text> as start of message"
+msgstr "úsáid <text> mar thús na teachtaireachta"
+
+#: builtin/fmt-merge-msg.c
+msgid "use <name> instead of the real target branch"
+msgstr "úsáid in <name> ionad na fíor-spriocbhrainse"
+
+#: builtin/fmt-merge-msg.c
+msgid "file to read from"
+msgstr "comhad le léamh ó"
+
+#: builtin/for-each-ref.c
+msgid "git for-each-ref [<options>] [<pattern>]"
+msgstr "git for-each-ref [<options>] [<pattern>]"
+
+#: builtin/for-each-ref.c
+msgid "git for-each-ref [--points-at <object>]"
+msgstr "git for-each-ref [--points-at <object>]"
+
+#: builtin/for-each-ref.c
+msgid "git for-each-ref [--merged [<commit>]] [--no-merged [<commit>]]"
+msgstr "git for-each-ref [--merged [<commit>]] [--no-merged [<commit>]]"
+
+#: builtin/for-each-ref.c
+msgid "git for-each-ref [--contains [<commit>]] [--no-contains [<commit>]]"
+msgstr "git for-each-ref [--contains [<commit>]] [--no-contains [<commit>]]"
+
+#: builtin/for-each-ref.c
+msgid "quote placeholders suitably for shells"
+msgstr "sealbhóirí áiteanna a luachan go oiriúnach do"
+
+#: builtin/for-each-ref.c
+msgid "quote placeholders suitably for perl"
+msgstr "sealbhóirí áiteanna a luachan go oiriúnach do perl"
+
+#: builtin/for-each-ref.c
+msgid "quote placeholders suitably for python"
+msgstr "sealbhóirí áiteanna a luaigh go oiriúnach do python"
+
+#: builtin/for-each-ref.c
+msgid "quote placeholders suitably for Tcl"
+msgstr "sealbhóirí áiteanna a luachan go oiriúnach do Tcl"
+
+#: builtin/for-each-ref.c
+msgid "show only <n> matched refs"
+msgstr "taispeáin ach sonraí com <n>hoiriúnaithe"
+
+#: builtin/for-each-ref.c builtin/tag.c
+msgid "respect format colors"
+msgstr "meas dathanna formáid"
+
+#: builtin/for-each-ref.c
+msgid "print only refs which points at the given object"
+msgstr "ní phriontáil ach téacsanna a phointíonn ar an réad a thugtar"
+
+#: builtin/for-each-ref.c
+msgid "print only refs that are merged"
+msgstr "ní phriontáil ach scríbhneoireachtaí atá cumasaithe"
+
+#: builtin/for-each-ref.c
+msgid "print only refs that are not merged"
+msgstr "priontáil ach scríbhinní nach bhfuil cumasc"
+
+#: builtin/for-each-ref.c
+msgid "print only refs which contain the commit"
+msgstr "ní phriontáil ach téifeanna ina bhfuil an tiomantas"
+
+#: builtin/for-each-ref.c
+msgid "print only refs which don't contain the commit"
+msgstr "ní phriontáil ach scríbhneoirí nach bhfuil an tiomantas"
+
+#: builtin/for-each-ref.c
+msgid "read reference patterns from stdin"
+msgstr "léigh patrúin tagartha ó stdin"
+
+#: builtin/for-each-ref.c
+msgid "also include HEAD ref and pseudorefs"
+msgstr "san áireamh freisin HEAD ref agus pseudorefs"
+
+#: builtin/for-each-ref.c
+msgid "unknown arguments supplied with --stdin"
+msgstr "argóintí anaithnid a sholáthraítear le --stdin"
+
+#: builtin/for-each-repo.c
+msgid "git for-each-repo --config=<config> [--] <arguments>"
+msgstr "git for-each-repo --config=<config> [--] <arguments>"
+
+#: builtin/for-each-repo.c
+msgid "config"
+msgstr "cumraíocht"
+
+#: builtin/for-each-repo.c
+msgid "config key storing a list of repository paths"
+msgstr "eochair chumraithe a stóráil liosta de chosáin stórais"
+
+#: builtin/for-each-repo.c
+msgid "keep going even if command fails in a repository"
+msgstr "coinnigh ort fiú má theipeann an t-ordú i stóras"
+
+#: builtin/for-each-repo.c
+msgid "missing --config=<config>"
+msgstr "ar iarraidh --config=<config>"
+
+#: builtin/for-each-repo.c
+#, c-format
+msgid "got bad config --config=%s"
+msgstr "fuair go dona cumraíocht --config=%s"
+
+#: builtin/fsck.c
+msgid "unknown"
+msgstr "anaithnid"
+
+#. TRANSLATORS: e.g. error in tree 01bfda: <more explanation>
+#: builtin/fsck.c
+#, c-format
+msgid "error in %s %s: %s"
+msgstr "earráid i %s %s: %s"
+
+#. TRANSLATORS: e.g. warning in tree 01bfda: <more explanation>
+#: builtin/fsck.c
+#, c-format
+msgid "warning in %s %s: %s"
+msgstr "rabhadh i %s %s: %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "broken link from %7s %s"
+msgstr "nasc briste ó %7s %s"
+
+#: builtin/fsck.c
+msgid "wrong object type in link"
+msgstr "cineál réad mícheart i nasc"
+
+#: builtin/fsck.c
+#, c-format
+msgid ""
+"broken link from %7s %s\n"
+" to %7s %s"
+msgstr ""
+"nasc briste ó %7s %s\n"
+" chuig %7s %s"
+
+#: builtin/fsck.c builtin/prune.c connected.c
+msgid "Checking connectivity"
+msgstr "Nascacht a sheiceáil"
+
+#: builtin/fsck.c
+#, c-format
+msgid "missing %s %s"
+msgstr "%s %s ar iarraidh"
+
+#: builtin/fsck.c
+#, c-format
+msgid "unreachable %s %s"
+msgstr "%s %s neamh-inrochtana"
+
+#: builtin/fsck.c
+#, c-format
+msgid "dangling %s %s"
+msgstr "ag crochadh %s %s"
+
+#: builtin/fsck.c
+msgid "could not create lost-found"
+msgstr "ní fhéadfaí a chruthú a aimsíodh caillte"
+
+#: builtin/fsck.c builtin/gc.c builtin/rebase.c rebase-interactive.c rerere.c
+#: sequencer.c
+#, c-format
+msgid "could not write '%s'"
+msgstr "ní fhéadfaí '%s' a scríobh"
+
+#: builtin/fsck.c
+#, c-format
+msgid "could not finish '%s'"
+msgstr "ní raibh '%s' in ann a chríochnú"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking %s"
+msgstr "Seiceáil %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking connectivity (%d objects)"
+msgstr "Ag seiceáil nascachta (%d réad)"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking %s %s"
+msgstr "Seiceáil %s %s"
+
+#: builtin/fsck.c
+msgid "broken links"
+msgstr "naisc briste"
+
+#: builtin/fsck.c
+#, c-format
+msgid "root %s"
+msgstr "fréamh %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "tagged %s %s (%s) in %s"
+msgstr "clib %s %s (%s) i %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: object corrupt or missing"
+msgstr "%s: réad truaillithe nó ar iarraidh"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: invalid reflog entry %s"
+msgstr "%s: iontráil reflog neamhbhailí %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking reflog %s->%s"
+msgstr "Seiceáil reflog %s->%s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: invalid sha1 pointer %s"
+msgstr "%s: pointeoir sha1 neamhbhailí %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: not a commit"
+msgstr "%s: ní gealltanas"
+
+#: builtin/fsck.c
+msgid "notice: No default references"
+msgstr "fógra: Gan aon tagairtí réamhshocraithe"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: hash-path mismatch, found at: %s"
+msgstr "%s: míchomhoiriúnú hash-path, le fáil ag: %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: object corrupt or missing: %s"
+msgstr "%s: réad truaillithe nó ar iarraidh: %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: object could not be parsed: %s"
+msgstr "%s: ní fhéadfaí réad a pháirseáil: %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "bad sha1 file: %s"
+msgstr "comhad sha1 olc: %s"
+
+#: builtin/fsck.c
+msgid "Checking object directory"
+msgstr "Seiceáil eolaire réada"
+
+#: builtin/fsck.c
+msgid "Checking object directories"
+msgstr "Seiceáil eolairí réada"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking %s link"
+msgstr "Nasc %s a sheiceáil"
+
+#: builtin/fsck.c builtin/index-pack.c
+#, c-format
+msgid "invalid %s"
+msgstr "%s neamhbhailí"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s points to something strange (%s)"
+msgstr "Léiríonn %s rud éigin aisteach (%s)"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: detached HEAD points at nothing"
+msgstr "%s: pointí HEAD scoite ag aon rud"
+
+#: builtin/fsck.c
+#, c-format
+msgid "notice: %s points to an unborn branch (%s)"
+msgstr "fógra: Díríonn %s chuig brainse neamhbhreithe (%s)"
+
+#: builtin/fsck.c
+#, c-format
+msgid "Checking cache tree of %s"
+msgstr "Crann taisce de %s a sheiceáil"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: invalid sha1 pointer in cache-tree of %s"
+msgstr "%s: pointeoir sha1 neamhbhailí i gcrann cache-%s"
+
+#: builtin/fsck.c
+msgid "non-tree in cache-tree"
+msgstr "neamh-chrann i gcrann cache-"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: invalid sha1 pointer in resolve-undo of %s"
+msgstr "%s: pointeoir sha1 neamhbhailí i réiteach a chealú de %s"
+
+#: builtin/fsck.c
+#, c-format
+msgid "unable to load rev-index for pack '%s'"
+msgstr "in ann innéacs rev-innéacs a luchtú do phacáiste '%s'"
+
+#: builtin/fsck.c
+#, c-format
+msgid "invalid rev-index for pack '%s'"
+msgstr "innéacs rev-neamhbhailí do phacáiste '%s'"
+
+#: builtin/fsck.c
+msgid "Checking ref database"
+msgstr "Seiceáil bunachar sonraí tagairt"
+
+#: builtin/fsck.c
+msgid ""
+"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
+" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
+" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
+msgstr ""
+"git fsck [--tags] [--root] [--inrochtana] [--cache] [--no-reflogs]\n"
+" [-- [no-] iomlán] [--dian] [--verbose] [--caillte]\n"
+" [-- [gan-] ag crochadh] [-- [gan-] dul chun cinn] [--nascacht amháin]\n"
+" <object>[-- [no-] ainm-rudaí] [-- [aon-] tagairtí] [...]"
+
+#: builtin/fsck.c
+msgid "show unreachable objects"
+msgstr "taispeáint rudaí dochreidte"
+
+#: builtin/fsck.c
+msgid "show dangling objects"
+msgstr "taispeáin rudaí crochtanacha"
+
+#: builtin/fsck.c
+msgid "report tags"
+msgstr "clibeanna tuarascála"
+
+#: builtin/fsck.c
+msgid "report root nodes"
+msgstr "nóid fréimhe a thuairisc"
+
+#: builtin/fsck.c
+msgid "make index objects head nodes"
+msgstr "nóid ceann rudaí innéacs a dhéanamh"
+
+#: builtin/fsck.c
+msgid "make reflogs head nodes (default)"
+msgstr "nóid ceann reflogs a dhéanamh (réamhshocraithe)"
+
+#: builtin/fsck.c
+msgid "also consider packs and alternate objects"
+msgstr "smaoinigh freisin ar phacáistí agus rudaí"
+
+#: builtin/fsck.c
+msgid "check only connectivity"
+msgstr "seiceáil ach nascacht"
+
+#: builtin/fsck.c builtin/mktag.c
+msgid "enable more strict checking"
+msgstr "cumasú seiceáil níos docht"
+
+#: builtin/fsck.c
+msgid "write dangling objects in .git/lost-found"
+msgstr "scríobh rudaí crochta in .git/lost-found"
+
+#: builtin/fsck.c builtin/prune.c
+msgid "show progress"
+msgstr "taispeáin dul chun cinn"
+
+#: builtin/fsck.c
+msgid "show verbose names for reachable objects"
+msgstr "taispeáint ainmneacha fabhracha do rudaí inrochtana"
+
+#: builtin/fsck.c
+msgid "check reference database consistency"
+msgstr "seiceáil comhsheasmhacht bunachair"
+
+#: builtin/fsck.c builtin/index-pack.c
+msgid "Checking objects"
+msgstr "Rud a sheiceáil"
+
+#: builtin/fsck.c
+#, c-format
+msgid "%s: object missing"
+msgstr "%s: réad ar iarraidh"
+
+#: builtin/fsck.c
+#, c-format
+msgid "invalid parameter: expected sha1, got '%s'"
+msgstr "paraiméadar neamhbhailí: súil le sha1, fuair '%s'"
+
+#: builtin/fsmonitor--daemon.c
+msgid "git fsmonitor--daemon start [<options>]"
+msgstr "git fsmonitor--daemon start [<options>]"
+
+#: builtin/fsmonitor--daemon.c
+msgid "git fsmonitor--daemon run [<options>]"
+msgstr "git fsmonitor--daemon run [<options>]"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "value of '%s' out of range: %d"
+msgstr "luach '%s' lasmuigh den raon: %d"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "value of '%s' not bool or int: %d"
+msgstr "luach '%s' gan bool nó int: %d"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "fsmonitor-daemon is watching '%s'\n"
+msgstr "tá fsmonitor-daemon ag féachaint ar '%s'\n"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "fsmonitor-daemon is not watching '%s'\n"
+msgstr "níl fsmonitor-daemon ag féachaint ar '%s'\n"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "could not create fsmonitor cookie '%s'"
+msgstr "ní fhéadfaí fianán fsmonitor '%s' a chruthú"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "fsmonitor: cookie_result '%d' != SEEN"
+msgstr "fsmonitor: cookie_result '%d' != SEEN"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "could not start IPC thread pool on '%s'"
+msgstr "ní fhéadfaí linn snáithe IPC a thosú ar '%s'"
+
+#: builtin/fsmonitor--daemon.c
+msgid "could not start fsmonitor listener thread"
+msgstr "ní fhéadfaí snáithe éisteora fsmonitor a thosú"
+
+#: builtin/fsmonitor--daemon.c
+msgid "could not start fsmonitor health thread"
+msgstr "ní fhéadfaí snáithe sláinte fsmonitor a thosú"
+
+#: builtin/fsmonitor--daemon.c
+msgid "could not initialize listener thread"
+msgstr "ní fhéadfadh snáithe éisteora a thionscnamh"
+
+#: builtin/fsmonitor--daemon.c
+msgid "could not initialize health thread"
+msgstr "ní fhéadfaí snáithe sláinte a thionscnamh"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "could not cd home '%s'"
+msgstr "ní fhéadfaí cd baile '%s'"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "fsmonitor--daemon is already running '%s'"
+msgstr "tá fsmonitor--daemon ag rith '%s' cheana féin"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "running fsmonitor-daemon in '%s'\n"
+msgstr "ag rith fsmonitor-daemon i '%s'\n"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "starting fsmonitor-daemon in '%s'\n"
+msgstr "ag tosú fsmonitor-daemon i '%s'\n"
+
+#: builtin/fsmonitor--daemon.c
+msgid "daemon failed to start"
+msgstr "theip ar daemon a thosú"
+
+#: builtin/fsmonitor--daemon.c
+msgid "daemon not online yet"
+msgstr "daemon nach bhfuil ar líne fós"
+
+#: builtin/fsmonitor--daemon.c
+msgid "daemon terminated"
+msgstr "deireadh le déemon"
+
+#: builtin/fsmonitor--daemon.c
+msgid "detach from console"
+msgstr "dícheangal ón gconsól"
+
+#: builtin/fsmonitor--daemon.c
+msgid "use <n> ipc worker threads"
+msgstr "úsáid snái <n>theanna oibrithe ipc"
+
+#: builtin/fsmonitor--daemon.c
+msgid "max seconds to wait for background daemon startup"
+msgstr "soicind uasta chun fanacht le tosú daemon cúlra"
+
+#: builtin/fsmonitor--daemon.c
+#, c-format
+msgid "invalid 'ipc-threads' value (%d)"
+msgstr "luach 'ipc-snáitheanna' neamhbhailí (%d)"
+
+#: builtin/fsmonitor--daemon.c t/helper/test-cache-tree.c
+#, c-format
+msgid "Unhandled subcommand '%s'"
+msgstr "Foordú neamh-láimhseáilte '%s'"
+
+#: builtin/fsmonitor--daemon.c
+msgid "fsmonitor--daemon not supported on this platform"
+msgstr "fsmonitor--daemon nach dtacaíonn sé ar an ardán seo"
+
+#: builtin/gc.c
+msgid "git gc [<options>]"
+msgstr "git gc [<options>]"
+
+#: builtin/gc.c
+#, c-format
+msgid "Failed to fstat %s: %s"
+msgstr "Theip ar fstat %s: %s"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to parse '%s' value '%s'"
+msgstr "theip ar luach '%s' a pharsáil '%s'"
+
+#: builtin/gc.c setup.c
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "ní féidir '%s' a stát"
+
+#: builtin/gc.c
+#, c-format
+msgid ""
+"The last gc run reported the following. Please correct the root cause\n"
+"and remove %s\n"
+"Automatic cleanup will not be performed until the file is removed.\n"
+"\n"
+"%s"
+msgstr ""
+"Tuairiscigh an rith gc deireanach an méid seo a leanas Ceartaigh an bunchúis "
+"le do thoil\n"
+"agus bain %s\n"
+"Ní dhéanfar glantachán uathoibríoch go dtí go mbainfear an comhad.\n"
+"\n"
+"%s"
+
+#: builtin/gc.c
+msgid "prune unreferenced objects"
+msgstr "rudaí gan tagairt a ghearradh"
+
+#: builtin/gc.c
+msgid "pack unreferenced objects separately"
+msgstr "rudaí gan tagairt a phacáil ar leithligh"
+
+#: builtin/gc.c builtin/repack.c
+msgid "with --cruft, limit the size of new cruft packs"
+msgstr "le --cruft, teorainn le méid pacáistí cruft nua"
+
+#: builtin/gc.c
+msgid "be more thorough (increased runtime)"
+msgstr "a bheith níos críochnúla (tréimhse méadaithe)"
+
+#: builtin/gc.c
+msgid "enable auto-gc mode"
+msgstr "mód auto-gc a chumasú"
+
+#: builtin/gc.c
+msgid "perform garbage collection in the background"
+msgstr "bailiú truflais a dhéanamh sa chúlra"
+
+#: builtin/gc.c
+msgid "force running gc even if there may be another gc running"
+msgstr "fórsa ag rith gc fiú má d'fhéadfadh gc eile a bheith ag rith"
+
+#: builtin/gc.c
+msgid "repack all other packs except the largest pack"
+msgstr "gach pacáiste eile a athphacáil ach amháin an pacáiste is mó"
+
+#: builtin/gc.c builtin/repack.c
+msgid "pack prefix to store a pack containing pruned objects"
+msgstr "réimír pacáiste chun pacáiste ina bhfuil rudaí gearrtha a stóráil"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to parse gc.logExpiry value %s"
+msgstr "theip ar luach gc.logExpiry %s a pháirseáil"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to parse prune expiry value %s"
+msgstr "theip ar luach éaga brúite %s a pharsáil"
+
+#: builtin/gc.c
+#, c-format
+msgid "Auto packing the repository in background for optimum performance.\n"
+msgstr "Pacáil uathoibríoch an stór sa chúlra chun an fheidhmíocht is fearr\n"
+
+#: builtin/gc.c
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr "Pacáil uathoibríoch an stór chun an fheidhmíocht is fearr\n"
+
+#: builtin/gc.c
+#, c-format
+msgid "See \"git help gc\" for manual housekeeping.\n"
+msgstr "Féach \"git help gc\" le haghaidh obair tí láimhe.\n"
+
+#: builtin/gc.c
+#, c-format
+msgid ""
+"gc is already running on machine '%s' pid %<PRIuMAX> (use --force if not)"
+msgstr ""
+"tá gc ag rith cheana féin ar mheaisín '%s' pid%<PRIuMAX>(bain úsáid as --"
+"force mura bhfuil)"
+
+#: builtin/gc.c
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+"Tá an iomarca rudaí scaoilte neamh-inrochtana ann; reáchtáil 'git prune' "
+"chun iad a bhaint."
+
+#: builtin/gc.c
+msgid ""
+"git maintenance run [--auto] [--[no-]quiet] [--task=<task>] [--schedule]"
+msgstr ""
+"<task>rith cothabhála git [--auto] [-- [no-] ciúin] [--task=] [--schedule]"
+
+#: builtin/gc.c
+msgid "--no-schedule is not allowed"
+msgstr "Ní cheadaítear --no-schedule"
+
+#: builtin/gc.c
+#, c-format
+msgid "unrecognized --schedule argument '%s'"
+msgstr "argóint --schedule gan aithint '%s'"
+
+#: builtin/gc.c
+msgid "failed to write commit-graph"
+msgstr "theip orthu graf coimisiúnaithe a scríobh"
+
+#: builtin/gc.c
+msgid "failed to prefetch remotes"
+msgstr "theip ar iargúlta iargúlta a réamhghabháil"
+
+#: builtin/gc.c
+msgid "failed to start 'git pack-objects' process"
+msgstr "theip ar phróiseas 'git pack-objects' a thosú"
+
+#: builtin/gc.c
+msgid "failed to finish 'git pack-objects' process"
+msgstr "theip ar phróiseas 'git pack-objects' a chríochnú"
+
+#: builtin/gc.c
+msgid "failed to write multi-pack-index"
+msgstr "theip ar innéacs il-phacáiste a scríobh"
+
+#: builtin/gc.c
+msgid "'git multi-pack-index expire' failed"
+msgstr "Theip ar 'git multi-pack-index in éag'"
+
+#: builtin/gc.c
+msgid "'git multi-pack-index repack' failed"
+msgstr "Theip ar 'git multi-pack-index repack'"
+
+#: builtin/gc.c
+msgid ""
+"skipping incremental-repack task because core.multiPackIndex is disabled"
+msgstr ""
+"tasc athphacáil fáis a scipeáil toisc go bhfuil core.multiPackIndex "
+"díchumasaithe"
+
+#: builtin/gc.c
+#, c-format
+msgid "lock file '%s' exists, skipping maintenance"
+msgstr "tá comhad glasála '%s' ann, ag scipeáil cothabháil"
+
+#: builtin/gc.c
+#, c-format
+msgid "task '%s' failed"
+msgstr "theip ar thasc '%s'"
+
+#: builtin/gc.c
+#, c-format
+msgid "'%s' is not a valid task"
+msgstr "Ní tasc bailí é '%s'"
+
+#: builtin/gc.c
+#, c-format
+msgid "task '%s' cannot be selected multiple times"
+msgstr "ní féidir tasc '%s' a roghnú arís agus arís eile"
+
+#: builtin/gc.c
+msgid "run tasks based on the state of the repository"
+msgstr "tascanna a reáchtáil bunaithe ar staid an stór"
+
+#: builtin/gc.c
+msgid "perform maintenance in the background"
+msgstr "cothabháil a dhéanamh sa chúlra"
+
+#: builtin/gc.c
+msgid "frequency"
+msgstr "minicíocht"
+
+#: builtin/gc.c
+msgid "run tasks based on frequency"
+msgstr "tascanna a rith bunaithe ar mhinicíocht"
+
+#: builtin/gc.c
+msgid "do not report progress or other information over stderr"
+msgstr "ná tuairiscigh dul chun cinn nó faisnéis eile faoi stderr"
+
+#: builtin/gc.c
+msgid "task"
+msgstr "tasc"
+
+#: builtin/gc.c
+msgid "run a specific task"
+msgstr "tasc ar leith a reáchtáil"
+
+#: builtin/gc.c
+msgid "use at most one of --auto and --schedule=<frequency>"
+msgstr "bain úsáid as --auto agus --schedule=<frequency> ar a mhéad"
+
+#: builtin/gc.c
+#, c-format
+msgid "unable to add '%s' value of '%s'"
+msgstr "nach féidir luach '%s' de '%s' a chur leis"
+
+#: builtin/gc.c
+msgid "return success even if repository was not registered"
+msgstr "rath ar ais fiú mura raibh stór cláraithe"
+
+#: builtin/gc.c
+#, c-format
+msgid "unable to unset '%s' value of '%s'"
+msgstr "nach féidir luach '%s' de '%s' a dhíshocrú"
+
+#: builtin/gc.c
+#, c-format
+msgid "repository '%s' is not registered"
+msgstr "níl stór '%s' cláraithe"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to expand path '%s'"
+msgstr "theip ar an gcosán '%s' a leathnú"
+
+#: builtin/gc.c
+msgid "failed to start launchctl"
+msgstr "theip ar launchctl a thosú"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to create directories for '%s'"
+msgstr "theip ar eolairí a chruthú do '%s'"
+
+#: builtin/gc.c
+#, c-format
+msgid "failed to bootstrap service %s"
+msgstr "theip ar sheirbhís bootstrap %s"
+
+#: builtin/gc.c
+msgid "failed to create temp xml file"
+msgstr "theip ar chomhad xml temp a chruthú"
+
+#: builtin/gc.c
+msgid "failed to start schtasks"
+msgstr "theip ar schasks a thosú"
+
+#: builtin/gc.c
+msgid "failed to run 'crontab -l'; your system might not support 'cron'"
+msgstr ""
+"theip ar 'crontab -l' a reáchtáil; b'fhéidir nach dtacaíonn do chóras le "
+"'cron'"
+
+#: builtin/gc.c
+msgid "failed to create crontab temporary file"
+msgstr "theip ar chomhad sealadach crontab a chruthú"
+
+#: builtin/gc.c
+msgid "failed to open temporary file"
+msgstr "theip ar chomhad sealadach a oscailt"
+
+#: builtin/gc.c
+msgid "failed to run 'crontab'; your system might not support 'cron'"
+msgstr ""
+"theip ar 'crontab' a reáchtáil; b'fhéidir nach dtacaíonn do chóras le 'cron'"
+
+#: builtin/gc.c
+msgid "'crontab' died"
+msgstr "Fuair 'crontab' bás"
+
+#: builtin/gc.c builtin/worktree.c
+#, c-format
+msgid "failed to delete '%s'"
+msgstr "theip ar '%s' a scriosadh"
+
+#: builtin/gc.c rerere.c
+#, c-format
+msgid "failed to flush '%s'"
+msgstr "theip ar '%s' a shruthlú"
+
+#: builtin/gc.c
+msgid "failed to start systemctl"
+msgstr "theip ar systemctl a thosú"
+
+#: builtin/gc.c
+msgid "failed to run systemctl"
+msgstr "theip ar systemctl a reáchtáil"
+
+#: builtin/gc.c
+#, c-format
+msgid "unrecognized --scheduler argument '%s'"
+msgstr "argóint --scheduler gan aithint '%s'"
+
+#: builtin/gc.c
+msgid "neither systemd timers nor crontab are available"
+msgstr "níl uaireoirí systemd ná crontab ar fáil"
+
+#: builtin/gc.c
+#, c-format
+msgid "%s scheduler is not available"
+msgstr "Níl sceidealóir %s ar fáil"
+
+#: builtin/gc.c
+#, c-format
+msgid ""
+"unable to create '%s.lock': %s.\n"
+"\n"
+"Another scheduled git-maintenance(1) process seems to be running in this\n"
+"repository. Please make sure no other maintenance processes are running and\n"
+"then try again. If it still fails, a git-maintenance(1) process may have\n"
+"crashed in this repository earlier: remove the file manually to continue."
+msgstr ""
+"nach féidir '%s.lock' a chruthú: %s.\n"
+"\n"
+"Is cosúil go bhfuil próiseas sceidealaithe eile git-maintenance(1) ag rith "
+"sa\n"
+"stórlann seo\n"
+"Déan cinnte go bhfuil aon phróisis chothabhála eile ag rith agus\n"
+"ansin déan iarracht arís. Má theipeann air fós, d'fhéadfadh go mbeadh "
+"próiseas cothabhála git-maintenance (1)\n"
+"tháinig isteach sa stór seo níos luaithe: bain an comhad de láimh chun "
+"leanúint ar aghaidh."
+
+#: builtin/gc.c
+msgid "cannot acquire lock for scheduled background maintenance"
+msgstr "ní féidir glas a fháil le haghaidh cothabháil sceidealta cúlra"
+
+#: builtin/gc.c
+msgid "git maintenance start [--scheduler=<scheduler>]"
+msgstr "<scheduler>tús cothabhála git [--scheduler=]"
+
+#: builtin/gc.c
+msgid "scheduler"
+msgstr "sceidealóir"
+
+#: builtin/gc.c
+msgid "scheduler to trigger git maintenance run"
+msgstr "sceidealóir chun rith cothabhála git a spreagadh"
+
+#: builtin/gc.c
+msgid "failed to set up maintenance schedule"
+msgstr "theip ar sceideal cothabhála a chur ar bun"
+
+#: builtin/gc.c
+msgid "failed to add repo to global config"
+msgstr "theip ar repo a chur le cumraíocht domhanda"
+
+#: builtin/gc.c
+msgid "git maintenance <subcommand> [<options>]"
+msgstr "cothabháil git <subcommand>[<options>]"
+
+#: builtin/grep.c
+msgid "git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"
+msgstr "git grep [<options>] [-e] <pattern>[<rev>...] [[--]<path>...]"
+
+#: builtin/grep.c
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr "grep: theip ar shnáithe a chruthú: %s"
+
+#: builtin/grep.c
+#, c-format
+msgid "invalid number of threads specified (%d) for %s"
+msgstr "líon neamhbhailí na snáitheanna a shonraítear (%d) do %s"
+
+#. TRANSLATORS: %s is the configuration
+#. variable for tweaking threads, currently
+#. grep.threads
+#.
+#: builtin/grep.c builtin/index-pack.c builtin/pack-objects.c
+#, c-format
+msgid "no threads support, ignoring %s"
+msgstr "gan tacaíocht do shnáitheanna, ag déanamh neamhaird ar %s"
+
+#: builtin/grep.c
+#, c-format
+msgid "unable to read tree %s"
+msgstr "nach féidir crann %s a léamh"
+
+#: builtin/grep.c
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr "in ann grep ó réad de chineál %s"
+
+#: builtin/grep.c
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr "tá an lasc `%c' ag súil le luach uimhriúil"
+
+#: builtin/grep.c
+msgid "search in index instead of in the work tree"
+msgstr "cuardaigh san innéacs in ionad sa chrann oibre"
+
+#: builtin/grep.c
+msgid "find in contents not managed by git"
+msgstr "aimsigh in ábhar nach mbainistíonn git"
+
+#: builtin/grep.c
+msgid "search in both tracked and untracked files"
+msgstr "cuardach i gcomhaid rianaithe agus neamhrianaithe araon"
+
+#: builtin/grep.c
+msgid "ignore files specified via '.gitignore'"
+msgstr "neamhaird a dhéanamh ar chomhaid a shonraítear trí '.gitignore'"
+
+#: builtin/grep.c
+msgid "recursively search in each submodule"
+msgstr "cuardach athshlánach i ngach fo-mhodúl"
+
+#: builtin/grep.c
+msgid "show non-matching lines"
+msgstr "línte neamh-mheaitseála a"
+
+#: builtin/grep.c
+msgid "case insensitive matching"
+msgstr "meaitseáil cás neamhíogair"
+
+#: builtin/grep.c
+msgid "match patterns only at word boundaries"
+msgstr "patrúin a mheaitseáil ach ag teorainneacha focal"
+
+#: builtin/grep.c
+msgid "process binary files as text"
+msgstr "comhaid dénártha a phróiseáil mar th"
+
+#: builtin/grep.c
+msgid "don't match patterns in binary files"
+msgstr "ná meaitseáil patrúin i gcomhaid dénártha"
+
+#: builtin/grep.c
+msgid "process binary files with textconv filters"
+msgstr "comhaid dénártha a phróiseáil le scagairí textconv"
+
+#: builtin/grep.c
+msgid "search in subdirectories (default)"
+msgstr "cuardaigh i bhfo-eolairí (réamhshocrú)"
+
+#: builtin/grep.c
+msgid "descend at most <n> levels"
+msgstr "síos ag an bhformhór na <n>leibh"
+
+#: builtin/grep.c
+msgid "use extended POSIX regular expressions"
+msgstr "bain úsáid as nathanna rialta POSIX leathnaithe"
+
+#: builtin/grep.c
+msgid "use basic POSIX regular expressions (default)"
+msgstr "úsáid abairtí rialta bunúsacha POSIX (réamhshocraithe)"
+
+#: builtin/grep.c
+msgid "interpret patterns as fixed strings"
+msgstr "patrúin a léiriú mar teaghráin seasta"
+
+#: builtin/grep.c
+msgid "use Perl-compatible regular expressions"
+msgstr "úsáid abairtí rialta atá comhoiriúnach le PERL"
+
+#: builtin/grep.c
+msgid "show line numbers"
+msgstr "taispeáin uimhreacha líne"
+
+#: builtin/grep.c
+msgid "show column number of first match"
+msgstr "taispeáin uimhir cholún an chéad chluiche"
+
+#: builtin/grep.c
+msgid "don't show filenames"
+msgstr "ná taispeáin ainmneacha comhaid"
+
+#: builtin/grep.c
+msgid "show filenames"
+msgstr "taispeáin ainmneacha comhaid"
+
+#: builtin/grep.c
+msgid "show filenames relative to top directory"
+msgstr "ainmneacha comhaid a thaispeáint i gcoibhneas"
+
+#: builtin/grep.c
+msgid "show only filenames instead of matching lines"
+msgstr "taispeáint ach ainmneacha comhaid in ionad línte meaitseála"
+
+#: builtin/grep.c
+msgid "synonym for --files-with-matches"
+msgstr "comhchiallach do --files-with-matches"
+
+#: builtin/grep.c
+msgid "show only the names of files without match"
+msgstr "taispeáint ach ainmneacha na gcomhaid gan meaitseáil"
+
+#: builtin/grep.c
+msgid "print NUL after filenames"
+msgstr "priontáil NUL tar éis ainmneacha comhaid"
+
+#: builtin/grep.c
+msgid "show only matching parts of a line"
+msgstr "taispeáin ach codanna de líne a mheaitseáil"
+
+#: builtin/grep.c
+msgid "show the number of matches instead of matching lines"
+msgstr "taispeáint líon na gcluichí in ionad línte meaitseála"
+
+#: builtin/grep.c
+msgid "highlight matches"
+msgstr "cluichí aibhsithe"
+
+#: builtin/grep.c
+msgid "print empty line between matches from different files"
+msgstr "priontáil líne folamh idir cluichí ó chomhaid éagsúla"
+
+#: builtin/grep.c
+msgid "show filename only once above matches from same file"
+msgstr ""
+"taispeáin ainm comhaid ach uair amháin thuas na cluichí ón gcomhad céanna"
+
+#: builtin/grep.c
+msgid "show <n> context lines before and after matches"
+msgstr "<n>línte comhthéacs a thaispeáint roimh agus tar"
+
+#: builtin/grep.c
+msgid "show <n> context lines before matches"
+msgstr "<n>línte comhthéacs a thaispeáint"
+
+#: builtin/grep.c
+msgid "show <n> context lines after matches"
+msgstr "<n>línte comhthéacs a thaispeáint"
+
+#: builtin/grep.c
+msgid "use <n> worker threads"
+msgstr "úsáid sná <n>itheanna oibrithe"
+
+#: builtin/grep.c
+msgid "shortcut for -C NUM"
+msgstr "aicearra le haghaidh -C NUM"
+
+#: builtin/grep.c
+msgid "show a line with the function name before matches"
+msgstr "taispeáint líne leis an ainm feidhme roimh mheaitseálacha"
+
+#: builtin/grep.c
+msgid "show the surrounding function"
+msgstr "taispeáin an fheidhm máguaird"
+
+#: builtin/grep.c
+msgid "read patterns from file"
+msgstr "patrúin a léamh ón gcomhad"
+
+#: builtin/grep.c
+msgid "match <pattern>"
+msgstr "comhoiriúnú <pattern>"
+
+#: builtin/grep.c
+msgid "combine patterns specified with -e"
+msgstr "comhcheangal patrúin a shonraítear le -e"
+
+#: builtin/grep.c
+msgid "indicate hit with exit status without output"
+msgstr "léirigh bualadh le stádas imeachta gan aschur"
+
+#: builtin/grep.c
+msgid "show only matches from files that match all patterns"
+msgstr "taispeáin ach cluichí ó chomhaid a mheaitseálann gach patrún"
+
+#: builtin/grep.c
+msgid "pager"
+msgstr "pager"
+
+#: builtin/grep.c
+msgid "show matching files in the pager"
+msgstr "taispeáint comhaid mheaitseála sa pager"
+
+#: builtin/grep.c
+msgid "allow calling of grep(1) (ignored by this build)"
+msgstr "cead a ghlaoch grep (1) (neamhaird ag an tógáil seo)"
+
+#: builtin/grep.c
+msgid "maximum number of results per file"
+msgstr "líon uasta na dtorthaí in aghaidh an chomhad"
+
+#: builtin/grep.c
+msgid "no pattern given"
+msgstr "aon phatrún a thugtar"
+
+#: builtin/grep.c
+msgid "--no-index or --untracked cannot be used with revs"
+msgstr "Ní féidir --no-index nó --untracked a úsáid le hathairí"
+
+#: builtin/grep.c
+#, c-format
+msgid "unable to resolve revision: %s"
+msgstr "nach féidir athbhreithniú a réiteach: %s"
+
+#: builtin/grep.c
+msgid "--untracked not supported with --recurse-submodules"
+msgstr "--untracked nach dtacaítear le --recurse-submodules"
+
+#: builtin/grep.c
+msgid "invalid option combination, ignoring --threads"
+msgstr "teaglaim roghanna neamhbhailí, ag neamhaird --threads"
+
+#: builtin/grep.c builtin/pack-objects.c
+msgid "no threads support, ignoring --threads"
+msgstr "níl aon tacaíocht do shnáitheanna, ag déanamh neamhaird ar --threads"
+
+#: builtin/grep.c builtin/index-pack.c builtin/pack-objects.c
+#, c-format
+msgid "invalid number of threads specified (%d)"
+msgstr "líon neamhbhailí na snáitheanna sonraithe (%d)"
+
+#: builtin/grep.c
+msgid "--open-files-in-pager only works on the worktree"
+msgstr "Ní oibríonn --open-files-in-pager ach ar an gcrann oibre"
+
+#: builtin/grep.c
+msgid "--[no-]exclude-standard cannot be used for tracked contents"
+msgstr ""
+"- ní féidir caighdeán eisiach [no-] a úsáid le haghaidh ábhar rianaithe"
+
+#: builtin/grep.c
+msgid "both --cached and trees are given"
+msgstr "tugtar --cached agus crainn araon"
+
+#: builtin/hash-object.c
+msgid ""
+"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
+" [--stdin [--literally]] [--] <file>..."
+msgstr ""
+"git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
+" [--stdin [--literally]] [--] <file>..."
+
+#: builtin/hash-object.c
+msgid "git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"
+msgstr "git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"
+
+#: builtin/hash-object.c
+msgid "object type"
+msgstr "cineál réad"
+
+#: builtin/hash-object.c
+msgid "write the object into the object database"
+msgstr "scríobh an réad isteach sa bhunachar sonraí réad"
+
+#: builtin/hash-object.c
+msgid "read the object from stdin"
+msgstr "léigh an réad ó stdin"
+
+#: builtin/hash-object.c
+msgid "store file as is without filters"
+msgstr "comhad a stóráil mar atá gan scagairí"
+
+#: builtin/hash-object.c
+msgid ""
+"just hash any random garbage to create corrupt objects for debugging Git"
+msgstr ""
+"ní gá ach aon truflais randamach a chur chun rudaí truaillithe a chruthú le "
+"haghaidh dífhab"
+
+#: builtin/hash-object.c
+msgid "process file as it were from this path"
+msgstr "comhad próiseála mar a bhí sé ón gcosán seo"
+
+#: builtin/help.c
+msgid "print all available commands"
+msgstr "gach ordú atá ar fáil a phriontáil"
+
+#: builtin/help.c
+msgid "show external commands in --all"
+msgstr "taispeáint orduithe seachtracha i --all"
+
+#: builtin/help.c
+msgid "show aliases in --all"
+msgstr "taispeáin ainmneacha in --all"
+
+#: builtin/help.c
+msgid "exclude guides"
+msgstr "treoracha a eisiamh"
+
+#: builtin/help.c
+msgid "show man page"
+msgstr "taispeáin leathanach fear"
+
+#: builtin/help.c
+msgid "show manual in web browser"
+msgstr "taispeáin lámhleabhar sa bhrabhsála"
+
+#: builtin/help.c
+msgid "show info page"
+msgstr "taispeáin leathanach faisnéise"
+
+#: builtin/help.c
+msgid "print command description"
+msgstr "cur síos ordaithe priontála"
+
+#: builtin/help.c
+msgid "print list of useful guides"
+msgstr "liosta priontáil de threoracha úsáideacha"
+
+#: builtin/help.c
+msgid "print list of user-facing repository, command and file interfaces"
+msgstr ""
+"liosta priontála de stór, comhéadain ordaithe agus comhad atá os comhair "
+"úsáideora"
+
+#: builtin/help.c
+msgid "print list of file formats, protocols and other developer interfaces"
+msgstr ""
+"liosta priontála formáidí comhaid, prótacail agus comhéadain forbróra eile"
+
+#: builtin/help.c
+msgid "print all configuration variable names"
+msgstr "priontáil gach ainm athróg cumraíochta"
+
+#: builtin/help.c
+msgid "git help [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]"
+msgstr "<command><doc>git help [[-i|--eolas] [-m|--fear] [-w|--gréasáin]] [|]"
+
+#: builtin/help.c
+#, c-format
+msgid "unrecognized help format '%s'"
+msgstr "formáid cabhrach gan aithint '%s'"
+
+#: builtin/help.c
+msgid "Failed to start emacsclient."
+msgstr "Theip ar emacsclient a thosú."
+
+#: builtin/help.c
+msgid "Failed to parse emacsclient version."
+msgstr "Theip ar leagan emacsclient a pháirseáil."
+
+#: builtin/help.c
+#, c-format
+msgid "emacsclient version '%d' too old (< 22)."
+msgstr "leagan imacsclient '%d' ró-sean (< 22)."
+
+#: builtin/help.c
+#, c-format
+msgid "failed to exec '%s'"
+msgstr "theip ar '%s' a fheidhmiú"
+
+#: builtin/help.c
+#, c-format
+msgid ""
+"'%s': path for unsupported man viewer.\n"
+"Please consider using 'man.<tool>.cmd' instead."
+msgstr ""
+"'%s': cosán do lucht féachana fear gan tacaíocht.\n"
+"Smaoinigh ar 'fear a úsáid le do thoil. <tool>.cmd' ina ionad."
+
+#: builtin/help.c
+#, c-format
+msgid ""
+"'%s': cmd for supported man viewer.\n"
+"Please consider using 'man.<tool>.path' instead."
+msgstr ""
+"'%s': cmd do lucht féachana fear tacaithe.\n"
+"Smaoinigh ar 'fear a úsáid le do thoil. <tool>.path' ina ionad sin."
+
+#: builtin/help.c
+#, c-format
+msgid "'%s': unknown man viewer."
+msgstr "'%s': féachtóir fear anaithnid."
+
+#: builtin/help.c
+msgid "no man viewer handled the request"
+msgstr "níl aon fhéachtóir fear ar an iarraidh"
+
+#: builtin/help.c
+msgid "no info viewer handled the request"
+msgstr "níl aon fhéachtóir faisnéise ag láimhseáil"
+
+#: builtin/help.c git.c
+#, c-format
+msgid "'%s' is aliased to '%s'"
+msgstr "Tá '%s' aistrithe go '%s'"
+
+#: builtin/help.c git.c
+#, c-format
+msgid "bad alias.%s string: %s"
+msgstr "droch-ainm. Teagán %s: %s"
+
+#: builtin/help.c
+#, c-format
+msgid "the '%s' option doesn't take any non-option arguments"
+msgstr "ní ghlacann an rogha '%s' aon argóintí neamh-rogha"
+
+#: builtin/help.c
+msgid ""
+"the '--no-[external-commands|aliases]' options can only be used with '--all'"
+msgstr ""
+"ní féidir na roghanna '--no- [external-commands|aliases] 'a úsáid ach le' --"
+"all '"
+
+#: builtin/help.c
+#, c-format
+msgid "usage: %s%s"
+msgstr "úsáid: %s%s"
+
+#: builtin/help.c
+msgid "'git help config' for more information"
+msgstr "'git help config' le haghaidh tuilleadh faisnéise"
+
+#: builtin/hook.c
+msgid ""
+"git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-"
+"args>]"
+msgstr ""
+"<path><hook-name><hook-args>git hook run [--ignore-missing] [--to-stdin =] "
+"[--]"
+
+#: builtin/hook.c
+msgid "silently ignore missing requested <hook-name>"
+msgstr "neamhaird go ciúin a iarrtar ar <hook-name>"
+
+#: builtin/hook.c
+msgid "file to read into hooks' stdin"
+msgstr "comhad le léamh isteach i stdin na hracaí"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "object type mismatch at %s"
+msgstr "mímheaitseáil cineál réad ag %s"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "did not receive expected object %s"
+msgstr "nár bhfuair sé réad ag súil leis %s"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "object %s: expected type %s, found %s"
+msgstr "réad %s: súil leis an gcineál %s, aimsíodh %s"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "cannot fill %d byte"
+msgid_plural "cannot fill %d bytes"
+msgstr[0] "ní féidir %d beart a líonadh"
+msgstr[1] "ní féidir %d beart a líonadh"
+msgstr[2] "ní féidir %d beart a líonadh"
+
+#: builtin/index-pack.c
+msgid "early EOF"
+msgstr "luath EOF"
+
+#: builtin/index-pack.c
+msgid "read error on input"
+msgstr "earráid léigh ar ionchur"
+
+#: builtin/index-pack.c
+msgid "used more bytes than were available"
+msgstr "úsáideadh níos mó bytes ná mar a bhí ar fáil"
+
+#: builtin/index-pack.c builtin/pack-objects.c
+msgid "pack too large for current definition of off_t"
+msgstr "pacáiste ró-mhór le haghaidh sainmhíniú reatha ar off_t"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "pack exceeds maximum allowed size (%s)"
+msgstr "sáraíonn an pacáiste an méid uasta ceadaithe (%s)"
+
+#: builtin/index-pack.c
+msgid "pack signature mismatch"
+msgstr "mímheaitseáil sínithe pacáiste"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "pack version %<PRIu32> unsupported"
+msgstr "leagan pacáiste %<PRIu32> gan tacaíocht"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "pack has bad object at offset %<PRIuMAX>: %s"
+msgstr "tá réad lochtach sa phacáiste ag an bhfritháireamh %<PRIuMAX>: %s"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "inflate returned %d"
+msgstr "infleáil ar ais %d"
+
+#: builtin/index-pack.c
+msgid "offset value overflow for delta base object"
+msgstr "ró-shreabhadh luacha a fhritháireamh do réad"
+
+#: builtin/index-pack.c
+msgid "delta base offset is out of bound"
+msgstr "tá fhritháireamh bonn delta as ceangailte"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "unknown object type %d"
+msgstr "cineál réad anaithnid %d"
+
+#: builtin/index-pack.c
+msgid "cannot pread pack file"
+msgstr "ní féidir comhad pacáiste a roghnú"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "premature end of pack file, %<PRIuMAX> byte missing"
+msgid_plural "premature end of pack file, %<PRIuMAX> bytes missing"
+msgstr[0] "deireadh roimh am comhaid phacáiste, %<PRIuMAX> beart ar iarraidh"
+msgstr[1] "deireadh roimh am comhaid phacáiste, %<PRIuMAX> beart ar iarraidh"
+msgstr[2] "deireadh roimh am comhaid phacáiste, %<PRIuMAX> beart ar iarraidh"
+
+#: builtin/index-pack.c
+msgid "serious inflate inconsistency"
+msgstr "neamhchomhsheasmhacht tromchúiseach"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "SHA1 COLLISION FOUND WITH %s !"
+msgstr "FUARTHAS IMBHALL SHA1 LE %s!"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "cannot read existing object info %s"
+msgstr "ní féidir faisnéis réad atá ann cheana %s a léamh"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "cannot read existing object %s"
+msgstr "ní féidir réad %s atá ann cheana a léamh"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "invalid blob object %s"
+msgstr "réad blob neamhbhailí %s"
+
+#: builtin/index-pack.c
+msgid "fsck error in packed object"
+msgstr "earráid fsck i réad pacáilte"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "Not all child objects of %s are reachable"
+msgstr "Níl gach réad leanbh de %s inrochtana"
+
+#: builtin/index-pack.c
+msgid "failed to apply delta"
+msgstr "theip ar delta a chur i bhfeidhm"
+
+#: builtin/index-pack.c
+msgid "Receiving objects"
+msgstr "Rudaí a fháil"
+
+#: builtin/index-pack.c
+msgid "Indexing objects"
+msgstr "Rudaí innéacsála"
+
+#: builtin/index-pack.c
+msgid "pack is corrupted (SHA1 mismatch)"
+msgstr "tá an pacáiste truaillithe (neamhoiriúnú SHA1)"
+
+#: builtin/index-pack.c
+msgid "cannot fstat packfile"
+msgstr "ní féidir le pacáiste fstat"
+
+#: builtin/index-pack.c
+msgid "pack has junk at the end"
+msgstr "tá bruscar ag an bpacáiste ag an deireadh"
+
+#: builtin/index-pack.c
+msgid "confusion beyond insanity in parse_pack_objects()"
+msgstr "mearbhall níos faide ná imní i parse_pack_objects()"
+
+#: builtin/index-pack.c
+msgid "Resolving deltas"
+msgstr "Deltas a réiteach"
+
+#: builtin/index-pack.c builtin/pack-objects.c
+#, c-format
+msgid "unable to create thread: %s"
+msgstr "nach féidir snáithe a chruthú: %s"
+
+#: builtin/index-pack.c
+msgid "confusion beyond insanity"
+msgstr "mearbhall níos faide ná mar gheall"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "completed with %d local object"
+msgid_plural "completed with %d local objects"
+msgstr[0] "críochnaithe le %d réad áitiúil"
+msgstr[1] "críochnaithe le %d réad áitiúil"
+msgstr[2] "críochnaithe le %d réad áitiúil"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "Unexpected tail checksum for %s (disk corruption?)"
+msgstr "Seicsum eireaball gan choinne do %s (éilliú diosca?)"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "pack has %d unresolved delta"
+msgid_plural "pack has %d unresolved deltas"
+msgstr[0] "tá %d delta gan réiteach sa phacáiste"
+msgstr[1] "tá %d deiltí gan réiteach sa phacáiste"
+msgstr[2] "tá %d deiltí gan réiteach sa phacáiste"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "unable to deflate appended object (%d)"
+msgstr "nach féidir réad cuibheangailte a dhíscaoileadh (%d)"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "local object %s is corrupt"
+msgstr "tá réad áitiúil %s truaillithe"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "packfile name '%s' does not end with '.%s'"
+msgstr "ní chríochnaíonn ainm pacáiste '%s' le '.%s'"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "cannot write %s file '%s'"
+msgstr "ní féidir comhad %s '%s' a scríobh"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "cannot close written %s file '%s'"
+msgstr "ní féidir comhad %s scríofa '%s' a dhúnadh"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "unable to rename temporary '*.%s' file to '%s'"
+msgstr "in ann athainmniú sealadach '*.%s' comhad chuig '%s'"
+
+#: builtin/index-pack.c
+msgid "error while closing pack file"
+msgstr "earráid agus comhad pacáiste á dúnadh"
+
+#: builtin/index-pack.c builtin/pack-objects.c
+#, c-format
+msgid "bad pack.indexVersion=%<PRIu32>"
+msgstr "droch-pack.indexVersion=%<PRIu32>"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "Cannot open existing pack file '%s'"
+msgstr "Ní féidir comhad pacáiste atá ann cheana '%s' a oscailt"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "Cannot open existing pack idx file for '%s'"
+msgstr "Ní féidir comhad idx pacáiste atá ann cheana a oscailt do '%s'"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "non delta: %d object"
+msgid_plural "non delta: %d objects"
+msgstr[0] "neamh-delta: %d réad"
+msgstr[1] "neamh-delta: %d réad"
+msgstr[2] "neamh-delta: %d réad"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "chain length = %d: %lu object"
+msgid_plural "chain length = %d: %lu objects"
+msgstr[0] "fad slabhra = %d: %lu réad"
+msgstr[1] "fad slabhra = %d: %lu réada"
+msgstr[2] "fad slabhra = %d: %lu réada"
+
+#: builtin/index-pack.c
+msgid "could not start pack-objects to repack local links"
+msgstr "ní fhéadfaí pacáiste-earraí a thosú chun naisc áitiúla a athphacáil"
+
+#: builtin/index-pack.c
+msgid "failed to feed local object to pack-objects"
+msgstr "theip ar réad áitiúil a bheathú ar rudaí pacáiste"
+
+#: builtin/index-pack.c
+msgid "index-pack: Expecting full hex object ID lines only from pack-objects."
+msgstr ""
+"index-pack: Ag súil le línte aitheantais réada heicsidheachúlach iomlán ó "
+"pack-objects amháin."
+
+#: builtin/index-pack.c
+msgid "could not finish pack-objects to repack local links"
+msgstr "ní fhéadfaí pacáistí a chríochnú chun naisc áitiúla a athphacáil"
+
+#: builtin/index-pack.c
+msgid "Cannot come back to cwd"
+msgstr "Ní féidir teacht ar ais chuig cwd"
+
+#: builtin/index-pack.c builtin/unpack-objects.c
+#, c-format
+msgid "bad --pack_header: %s"
+msgstr "droch --pack_header: %s"
+
+#: builtin/index-pack.c
+#, c-format
+msgid "bad %s"
+msgstr "droch %s"
+
+#: builtin/index-pack.c builtin/init-db.c setup.c
+#, c-format
+msgid "unknown hash algorithm '%s'"
+msgstr "algartam hais anaithnid '%s'"
+
+#: builtin/index-pack.c
+msgid "--promisor cannot be used with a pack name"
+msgstr "--promisor ní féidir é a úsáid le hainm pacáiste"
+
+#: builtin/index-pack.c
+msgid "--stdin requires a git repository"
+msgstr "--stdin teastaíonn stórlann git"
+
+#: builtin/index-pack.c
+msgid "--verify with no packfile name given"
+msgstr "--verify gan ainm comhaid pacáiste tugtha"
+
+#: builtin/index-pack.c builtin/unpack-objects.c
+msgid "fsck error in pack objects"
+msgstr "fsck earráid i rudaí pacáiste"
+
+#: builtin/init-db.c
+msgid ""
+"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
+" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
+" [--ref-format=<format>]\n"
+" [-b <branch-name> | --initial-branch=<branch-name>]\n"
+" [--shared[=<permissions>]] [<directory>]"
+msgstr ""
+"git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
+" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
+" [--ref-format=<format>]\n"
+" [-b <branch-name> | --initial-branch=<branch-name>]\n"
+" [--shared[=<permissions>]] [<directory>]"
+
+#: builtin/init-db.c
+msgid "permissions"
+msgstr "ceadanna"
+
+#: builtin/init-db.c
+msgid "specify that the git repository is to be shared amongst several users"
+msgstr "sonraigh go bhfuil an stór git le roinnt i measc roinnt úsáideoirí"
+
+#: builtin/init-db.c
+msgid "override the name of the initial branch"
+msgstr "ainm na brainse tosaigh a shárú"
+
+#: builtin/init-db.c builtin/verify-pack.c
+msgid "hash"
+msgstr "hash"
+
+#: builtin/init-db.c builtin/show-index.c builtin/verify-pack.c
+msgid "specify the hash algorithm to use"
+msgstr "sonraigh an algartam hash le húsáid"
+
+#: builtin/init-db.c
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "ní féidir teacht ar %s"
+
+#: builtin/init-db.c
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "ní féidir teacht chuig %s"
+
+#: builtin/init-db.c
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+"%s (or --work-tree=<directory>) ní cheadaítear gan sonrú %s (or --git-"
+"dir=<directory>)"
+
+#: builtin/init-db.c
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Ní féidir rochtain a fháil ar chrann oibre '%s'"
+
+#: builtin/init-db.c
+msgid "--separate-git-dir incompatible with bare repository"
+msgstr "--separate-git-dir neamhoiriúnach le stór lom"
+
+#: builtin/interpret-trailers.c
+msgid ""
+"git interpret-trailers [--in-place] [--trim-empty]\n"
+" [(--trailer (<key>|<key-alias>)[(=|:)<value>])...]\n"
+" [--parse] [<file>...]"
+msgstr ""
+"git interpret-trailers [--in-place] [--trim-empty]\n"
+" [(--trailer (<key>|<key-alias>)[(=|:)<value>])...]\n"
+" [--parse] [<file>...]"
+
+#: builtin/interpret-trailers.c wrapper.c
+#, c-format
+msgid "could not stat %s"
+msgstr "ní raibh ann %s a shástáil"
+
+#: builtin/interpret-trailers.c
+#, c-format
+msgid "file %s is not a regular file"
+msgstr "ní comhad rialta é comhad %s"
+
+#: builtin/interpret-trailers.c
+#, c-format
+msgid "file %s is not writable by user"
+msgstr "ní féidir an t-úsáideoir comhad %s a scríobh"
+
+#: builtin/interpret-trailers.c
+msgid "could not open temporary file"
+msgstr "ní fhéadfadh comhad sealadach a oscailt"
+
+#: builtin/interpret-trailers.c
+#, c-format
+msgid "could not read input file '%s'"
+msgstr "ní raibh in ann comhad ionchuir '%s' a léamh"
+
+#: builtin/interpret-trailers.c builtin/mktag.c imap-send.c
+msgid "could not read from stdin"
+msgstr "ní fhéadfaí léamh ó stdin"
+
+#: builtin/interpret-trailers.c
+#, c-format
+msgid "could not rename temporary file to %s"
+msgstr "ní fhéadfaí comhad sealadach a athainmniú go %s"
+
+#: builtin/interpret-trailers.c
+msgid "edit files in place"
+msgstr "comhaid in áit a chur in eagar"
+
+#: builtin/interpret-trailers.c
+msgid "trim empty trailers"
+msgstr "leantóirí folamh a ghear"
+
+#: builtin/interpret-trailers.c
+msgid "placement"
+msgstr "socrúcháin"
+
+#: builtin/interpret-trailers.c
+msgid "where to place the new trailer"
+msgstr "cá háit a chuirfear an leantóir nua"
+
+#: builtin/interpret-trailers.c
+msgid "action if trailer already exists"
+msgstr "gníomh má tá leantóir ann cheana féin"
+
+#: builtin/interpret-trailers.c
+msgid "action if trailer is missing"
+msgstr "gníomh má tá leantóir ar iarraidh"
+
+#: builtin/interpret-trailers.c
+msgid "output only the trailers"
+msgstr "aschur ach na leantóirí"
+
+#: builtin/interpret-trailers.c
+msgid "do not apply trailer.* configuration variables"
+msgstr "ná cuir leantóir i bhfeidhm.* athróga cumraíochta"
+
+#: builtin/interpret-trailers.c
+msgid "reformat multiline trailer values as single-line values"
+msgstr "luachanna leantóra illíne a athfhormáidiú mar luachanna aon-líne"
+
+#: builtin/interpret-trailers.c
+msgid "alias for --only-trailers --only-input --unfold"
+msgstr "ainm le haghaidh --only-trailers --only-input --unfold"
+
+#: builtin/interpret-trailers.c
+msgid "do not treat \"---\" as the end of input"
+msgstr "ná déileáil le “---” mar dheireadh an ionchuir"
+
+#: builtin/interpret-trailers.c
+msgid "trailer(s) to add"
+msgstr "leantóir (í) le cur leis"
+
+#: builtin/interpret-trailers.c
+msgid "--trailer with --only-input does not make sense"
+msgstr "níl ciall le --trailer le --only-input"
+
+#: builtin/interpret-trailers.c
+msgid "no input file given for in-place editing"
+msgstr "níl aon chomhad ionchuir a thugtar le haghaidh eagarthóireachta"
+
+#: builtin/log.c
+msgid "git log [<options>] [<revision-range>] [[--] <path>...]"
+msgstr "logáil git [<options>] [<revision-range>] [[--]<path>...]"
+
+#: builtin/log.c
+msgid "git show [<options>] <object>..."
+msgstr "git show [<options>]<object>..."
+
+#: builtin/log.c
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr "rogha neamhbhailí --decorate: %s"
+
+#: builtin/log.c diff.c
+msgid "suppress diff output"
+msgstr "aschur diff a chur faoi chois"
+
+#: builtin/log.c
+msgid "show source"
+msgstr "foinse taispeáin"
+
+#: builtin/log.c
+msgid "clear all previously-defined decoration filters"
+msgstr "glan na scagairí maisiúcháin atá sainmhínithe roimhe seo"
+
+#: builtin/log.c
+msgid "only decorate refs that match <pattern>"
+msgstr "ní mhaisigh ach na cinn a mheaitseálann <pattern>"
+
+#: builtin/log.c
+msgid "do not decorate refs that match <pattern>"
+msgstr "ná maisigh na cinn a mheaitseálann <pattern>"
+
+#: builtin/log.c
+msgid "decorate options"
+msgstr "roghanna maisiú"
+
+#: builtin/log.c
+msgid ""
+"trace the evolution of line range <start>,<end> or function :<funcname> in "
+"<file>"
+msgstr "éabhlóid raon líne<start>, <end>nó feidhm <funcname>a rianú: i <file>"
+
+#: builtin/log.c
+msgid "-L<range>:<file> cannot be used with pathspec"
+msgstr "-L<range>: ní <file>féidir é a úsáid le pathspec"
+
+#: builtin/log.c
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr "Aschur deiridh: %d %s\n"
+
+#: builtin/log.c
+#, c-format
+msgid "git show %s: bad file"
+msgstr "git show %s: droch-chomhad"
+
+#: builtin/log.c
+#, c-format
+msgid "could not read object %s"
+msgstr "ní raibh in ann réad %s a léamh"
+
+#: builtin/log.c
+#, c-format
+msgid "unknown type: %d"
+msgstr "cineál anaithnid: %d"
+
+#: builtin/log.c
+#, c-format
+msgid "%s: invalid cover from description mode"
+msgstr "%s: clúdach neamhbhailí ó mhodh tuairisc"
+
+#: builtin/log.c
+msgid "format.headers without value"
+msgstr "format.headers gan luach"
+
+#: builtin/log.c
+#, c-format
+msgid "cannot open patch file %s"
+msgstr "ní féidir comhad paiste %s a oscailt"
+
+#: builtin/log.c
+msgid "need exactly one range"
+msgstr "teastaíonn raon amháin díreach"
+
+#: builtin/log.c
+msgid "not a range"
+msgstr "ní raon"
+
+#: builtin/log.c
+#, c-format
+msgid "unable to read branch description file '%s'"
+msgstr "nach féidir an comhad tuairisc brainse '%s' a léamh"
+
+#: builtin/log.c
+msgid "cover letter needs email format"
+msgstr "teastaíonn formáid ríomhphoist ó litir"
+
+#: builtin/log.c
+msgid "failed to create cover-letter file"
+msgstr "theip ar chomhad litir chlúdaigh a chruthú"
+
+#: builtin/log.c
+#, c-format
+msgid "insane in-reply-to: %s"
+msgstr "in-fhreagairt daingniúil: %s"
+
+#: builtin/log.c
+msgid "git format-patch [<options>] [<since> | <revision-range>]"
+msgstr "git format-patch [<roghanna>] [<ó> | <raon-athbhreithnithe>]"
+
+#: builtin/log.c
+msgid "two output directories?"
+msgstr "dhá eolaire aschuir?"
+
+#: builtin/log.c
+#, c-format
+msgid "unknown commit %s"
+msgstr "tiomantas anaithnid %s"
+
+#: builtin/log.c builtin/replace.c
+#, c-format
+msgid "failed to resolve '%s' as a valid ref"
+msgstr "theip ar '%s' a réiteach mar thagartha bailí"
+
+#: builtin/log.c
+msgid "could not find exact merge base"
+msgstr "ní fhéadfaí bonn cumaisc cruinn a fháil"
+
+#: builtin/log.c
+msgid ""
+"failed to get upstream, if you want to record base commit automatically,\n"
+"please use git branch --set-upstream-to to track a remote branch.\n"
+"Or you could specify base commit by --base=<base-commit-id> manually"
+msgstr ""
+"theip ar an dul suas sruth, más mian leat an gealltanas bonn a thaifeadadh "
+"go huathoibríoch,\n"
+"bain úsáid as git branch --set-upstream-to chun brainse iargúlta a rianú.\n"
+"Nó d'fhéadfá an gealltanas bonn a shonrú trí --base=<base-commit-id> de láimh"
+
+#: builtin/log.c
+msgid "failed to find exact merge base"
+msgstr "theip orthu bonn cumaisc cruinn a fháil"
+
+#: builtin/log.c
+msgid "base commit should be the ancestor of revision list"
+msgstr "ba cheart gurb é bonn tiomantas ina sinsear an liosta athbhrei"
+
+#: builtin/log.c
+msgid "base commit shouldn't be in revision list"
+msgstr "níor cheart go mbeadh tiomantas bonn sa liosta athbhrei"
+
+#: builtin/log.c
+msgid "cannot get patch id"
+msgstr "ní féidir id paiste a fháil"
+
+#: builtin/log.c
+msgid "failed to infer range-diff origin of current series"
+msgstr "theip ar thionscnamh raon difriúil na sraithe reatha a thabhairt amach"
+
+#: builtin/log.c
+#, c-format
+msgid "using '%s' as range-diff origin of current series"
+msgstr "ag baint úsáide as '%s' mar bhunús diff raon na sraithe reatha"
+
+#: builtin/log.c
+msgid "use [PATCH n/m] even with a single patch"
+msgstr "bain úsáid as [PATCH n/m] fiú le paiste amháin"
+
+#: builtin/log.c
+msgid "use [PATCH] even with multiple patches"
+msgstr "bain úsáid as [PATCH] fiú le paistí iolracha"
+
+#: builtin/log.c
+msgid "print patches to standard out"
+msgstr "paistí a phriontáil chun caighdeánach"
+
+#: builtin/log.c
+msgid "generate a cover letter"
+msgstr "litir chlúdaigh a ghiniúint"
+
+#: builtin/log.c
+msgid "use simple number sequence for output file names"
+msgstr "úsáid seicheamh uimhreacha simplí d'ainmneacha comhaid aschu"
+
+#: builtin/log.c
+msgid "sfx"
+msgstr "sfx"
+
+#: builtin/log.c
+msgid "use <sfx> instead of '.patch'"
+msgstr "úsáid <sfx>in ionad '.patch'"
+
+#: builtin/log.c
+msgid "start numbering patches at <n> instead of 1"
+msgstr "tosú ag uimhriú paistí ag <n>seachas 1"
+
+#: builtin/log.c
+msgid "reroll-count"
+msgstr "comhaireamh ath-rollta"
+
+#: builtin/log.c
+msgid "mark the series as Nth re-roll"
+msgstr "marcáil an tsraith mar Nú ath-rolla"
+
+#: builtin/log.c
+msgid "max length of output filename"
+msgstr "fad uasta ainm an chomhaid aschuir"
+
+#: builtin/log.c
+msgid "rfc"
+msgstr "rfc"
+
+#: builtin/log.c
+msgid "add <rfc> (default 'RFC') before 'PATCH'"
+msgstr "cuir <rfc>(réamhshocraithe 'RFC') roimh 'PATCH'"
+
+#: builtin/log.c
+msgid "cover-from-description-mode"
+msgstr "modh clúdaigh ó-tuairiscríbhinní"
+
+#: builtin/log.c
+msgid "generate parts of a cover letter based on a branch's description"
+msgstr "codanna de litir chlúdaigh a ghiniúint bunaithe ar thuairisc brainse"
+
+#: builtin/log.c
+msgid "use branch description from file"
+msgstr "úsáid cur síos brainse ón gcomhad"
+
+#: builtin/log.c
+msgid "use [<prefix>] instead of [PATCH]"
+msgstr "úsáid [<prefix>] in ionad [PATCH]"
+
+#: builtin/log.c
+msgid "store resulting files in <dir>"
+msgstr "comhaid mar thoradh air a stóráil i <dir>"
+
+#: builtin/log.c
+msgid "don't strip/add [PATCH]"
+msgstr "ná stiall/cuir [PATCH] leis"
+
+#: builtin/log.c
+msgid "don't output binary diffs"
+msgstr "ná aschur difríochtaí dénártha"
+
+#: builtin/log.c
+msgid "output all-zero hash in From header"
+msgstr "aschur hash uile-nialas i Ó cheanntásc"
+
+#: builtin/log.c
+msgid "don't include a patch matching a commit upstream"
+msgstr "ná cuir paiste a mheaitseann le tiomantas suas an sruth"
+
+#: builtin/log.c
+msgid "show patch format instead of default (patch + stat)"
+msgstr "taispeáin formáid paiste in ionad réamhshocraithe (paiste + stat)"
+
+#: builtin/log.c
+msgid "Messaging"
+msgstr "Teachtaireachtaí"
+
+#: builtin/log.c
+msgid "header"
+msgstr "ceanntásc"
+
+#: builtin/log.c
+msgid "add email header"
+msgstr "ceanntásc ríomhphoist leis"
+
+#: builtin/log.c
+msgid "email"
+msgstr "ríomhphost"
+
+#: builtin/log.c
+msgid "add To: header"
+msgstr "cuir Le: ceanntásc"
+
+#: builtin/log.c
+msgid "add Cc: header"
+msgstr "cuir Cc leis: ceanntásc"
+
+#: builtin/log.c
+msgid "ident"
+msgstr "idirghníomhaire"
+
+#: builtin/log.c
+msgid "set From address to <ident> (or committer ident if absent)"
+msgstr ""
+"socraigh Ó sheoladh go dtí <ident>(nó aitheantas an tiomantais mura bhfuil "
+"sé ann)"
+
+#: builtin/log.c
+msgid "message-id"
+msgstr "id teachtaireachta"
+
+#: builtin/log.c
+msgid "make first mail a reply to <message-id>"
+msgstr "déan freagra ar an gcéad phost <message-id>"
+
+#: builtin/log.c
+msgid "boundary"
+msgstr "teorainn"
+
+#: builtin/log.c
+msgid "attach the patch"
+msgstr "ceangail an paiste"
+
+#: builtin/log.c
+msgid "inline the patch"
+msgstr "inlíne an paiste"
+
+#: builtin/log.c
+msgid "enable message threading, styles: shallow, deep"
+msgstr "cumasú snáithe teachtaireachta, stíleanna: éadomhain, domhain"
+
+#: builtin/log.c
+msgid "signature"
+msgstr "síniú"
+
+#: builtin/log.c
+msgid "add a signature"
+msgstr "cuir síniú"
+
+#: builtin/log.c
+msgid "base-commit"
+msgstr "bun-tiomantas"
+
+#: builtin/log.c
+msgid "add prerequisite tree info to the patch series"
+msgstr "cuir faisnéis rainn réamhriachtanais leis an tsraith paiste"
+
+#: builtin/log.c
+msgid "add a signature from a file"
+msgstr "cuir síniú ó chomhad"
+
+#: builtin/log.c
+msgid "don't print the patch filenames"
+msgstr "ná priontáil na hainmneacha comhaid paiste"
+
+#: builtin/log.c
+msgid "show progress while generating patches"
+msgstr "dul chun cinn a thaispeáint agus paistí"
+
+#: builtin/log.c
+msgid "show changes against <rev> in cover letter or single patch"
+msgstr "athruithe a thaispeá <rev>int i gcoinne i litir chlúdaigh nó"
+
+#: builtin/log.c
+msgid "show changes against <refspec> in cover letter or single patch"
+msgstr "athruithe a thaispeá <refspec>int i gcoinne i litir chlúdaigh nó"
+
+#: builtin/log.c builtin/range-diff.c
+msgid "percentage by which creation is weighted"
+msgstr "céatadán faoina n-ualaítear an cruthú"
+
+#: builtin/log.c
+msgid "show in-body From: even if identical to the e-mail header"
+msgstr ""
+"taispeáin in-chorp Ó: fiú más comhionann leis an gceannteideal ríomhphoist"
+
+#: builtin/log.c
+#, c-format
+msgid "invalid ident line: %s"
+msgstr "líne aitheantais neamhbhailí: %s"
+
+#: builtin/log.c
+msgid "--name-only does not make sense"
+msgstr "Ní bhíonn ciall ag --name-only"
+
+#: builtin/log.c
+msgid "--name-status does not make sense"
+msgstr "Ní bhíonn ciall ag --name-status"
+
+#: builtin/log.c
+msgid "--check does not make sense"
+msgstr "Ní bhíonn ciall ag --check"
+
+#: builtin/log.c
+msgid "--remerge-diff does not make sense"
+msgstr "Ní bhíonn ciall ag --remerge-diff"
+
+#: builtin/log.c builtin/submodule--helper.c rerere.c submodule.c
+#, c-format
+msgid "could not create directory '%s'"
+msgstr "ní fhéadfaí eolaire '%s' a chruthú"
+
+#: builtin/log.c
+msgid "--interdiff requires --cover-letter or single patch"
+msgstr "éilíonn --interdiff --cover-letter nó paiste singil"
+
+#: builtin/log.c
+msgid "Interdiff:"
+msgstr "Interdiff:"
+
+#: builtin/log.c
+#, c-format
+msgid "Interdiff against v%d:"
+msgstr "Interdiff i gcoinne v%d:"
+
+#: builtin/log.c
+msgid "--range-diff requires --cover-letter or single patch"
+msgstr "Éilíonn --range-diff --cover-letter nó paiste aonair"
+
+#: builtin/log.c
+msgid "Range-diff:"
+msgstr "Difríocht raon:"
+
+#: builtin/log.c
+#, c-format
+msgid "Range-diff against v%d:"
+msgstr "Difríocht raon i gcoinne v%d:"
+
+#: builtin/log.c
+#, c-format
+msgid "unable to read signature file '%s'"
+msgstr "nach féidir an comhad sínithe '%s' a léamh"
+
+#: builtin/log.c
+msgid "Generating patches"
+msgstr "Giniúint paistí"
+
+#: builtin/log.c
+msgid "failed to create output files"
+msgstr "theip ar chomhaid aschuir a chruthú"
+
+#: builtin/log.c
+msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]"
+msgstr "git cherry [-v] [<upstream> [<head> [<limit>]]]"
+
+#: builtin/log.c
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr ""
+"Níor féidir brainse iargúlta rianaithe a fháil, sonraigh de láimh le do th "
+"<upstream>oil.\n"
+
+#: builtin/ls-files.c builtin/ls-tree.c
+#, c-format
+msgid "could not get object info about '%s'"
+msgstr "ní fhéadfaí faisnéis réada a fháil faoi '%s'"
+
+#: builtin/ls-files.c
+msgid "git ls-files [<options>] [<file>...]"
+msgstr "git ls-files [<options>] [<file>...]"
+
+#: builtin/ls-files.c builtin/merge-tree.c
+msgid "separate paths with the NUL character"
+msgstr "cosáin ar leithligh leis an carachtar NUL"
+
+#: builtin/ls-files.c
+msgid "identify the file status with tags"
+msgstr "stádas an chomhaid a aithint le clibeanna"
+
+#: builtin/ls-files.c
+msgid "use lowercase letters for 'assume unchanged' files"
+msgstr ""
+"bain úsáid as litreacha beaga le haghaidh comhaid 'glacadh leis gan "
+"athraithe'"
+
+#: builtin/ls-files.c
+msgid "use lowercase letters for 'fsmonitor clean' files"
+msgstr "bain úsáid as litreacha beaga le haghaidh comhaid 'fsmonitor clean'"
+
+#: builtin/ls-files.c
+msgid "show cached files in the output (default)"
+msgstr "taispeáint comhaid taispeána san aschur (réamhshocraithe)"
+
+#: builtin/ls-files.c
+msgid "show deleted files in the output"
+msgstr "taispeáint comhaid scriosta san aschur"
+
+#: builtin/ls-files.c
+msgid "show modified files in the output"
+msgstr "taispeáint comhaid modhnaithe san aschur"
+
+#: builtin/ls-files.c
+msgid "show other files in the output"
+msgstr "taispeáint comhaid eile san aschur"
+
+#: builtin/ls-files.c
+msgid "show ignored files in the output"
+msgstr "taispeáint comhaid a neamhaird san aschur"
+
+#: builtin/ls-files.c
+msgid "show staged contents' object name in the output"
+msgstr "taispeáin ainm réad ábhair stáitseáilte san aschur"
+
+#: builtin/ls-files.c
+msgid "show files on the filesystem that need to be removed"
+msgstr "taispeáint comhaid ar an gcóras comhaid is gá a bhaint"
+
+#: builtin/ls-files.c
+msgid "show 'other' directories' names only"
+msgstr "taispeáin ainmneacha 'eile' amháin"
+
+#: builtin/ls-files.c
+msgid "show line endings of files"
+msgstr "taispeáint deireadh líne na gcomhaid"
+
+#: builtin/ls-files.c
+msgid "don't show empty directories"
+msgstr "ná taispeáin eolairí folamh"
+
+#: builtin/ls-files.c
+msgid "show unmerged files in the output"
+msgstr "taispeáint comhaid neamh-chumhdaithe san aschur"
+
+#: builtin/ls-files.c
+msgid "show resolve-undo information"
+msgstr "taispeáin faisnéis réitigh a chealú"
+
+#: builtin/ls-files.c
+msgid "skip files matching pattern"
+msgstr "patrún meaitseála comhaid scipeála"
+
+#: builtin/ls-files.c
+msgid "read exclude patterns from <file>"
+msgstr "léigh patrúin eisiamh ó <file>"
+
+#: builtin/ls-files.c
+msgid "read additional per-directory exclude patterns in <file>"
+msgstr "léigh patrúin breise in aghaidh eolaire a eisiamh i <file>"
+
+#: builtin/ls-files.c
+msgid "add the standard git exclusions"
+msgstr "cuir na heisiaimh caighdeánacha git"
+
+#: builtin/ls-files.c
+msgid "make the output relative to the project top directory"
+msgstr "déan an t-aschur i gcoibhneas le barr-eolaire an tion"
+
+#: builtin/ls-files.c
+msgid "if any <file> is not in the index, treat this as an error"
+msgstr ""
+"mura <file>bhfuil aon cheann san innéacs, déileáil leis seo mar earráid"
+
+#: builtin/ls-files.c builtin/merge-tree.c
+msgid "tree-ish"
+msgstr "crainn"
+
+#: builtin/ls-files.c
+msgid "pretend that paths removed since <tree-ish> are still present"
+msgstr "ligean go bhfuil cosáin a bhain <tree-ish>tear ó shin fós i láthair"
+
+#: builtin/ls-files.c
+msgid "show debugging data"
+msgstr "taispeáin sonraí dífhabhtaithe"
+
+#: builtin/ls-files.c
+msgid "suppress duplicate entries"
+msgstr "iontrálacha dúbailte a chur"
+
+#: builtin/ls-files.c
+msgid "show sparse directories in the presence of a sparse index"
+msgstr "taispeáint eolairí neamhchoitianta i láthair innéacs neamhchoitianta"
+
+#: builtin/ls-files.c
+msgid ""
+"--format cannot be used with -s, -o, -k, -t, --resolve-undo, --deduplicate, "
+"--eol"
+msgstr ""
+"Ní féidir --format a úsáid le -s, -o, -k, -t, --resolve-undo, --deduplicate, "
+"--eol"
+
+#: builtin/ls-remote.c
+msgid ""
+"git ls-remote [--branches] [--tags] [--refs] [--upload-pack=<exec>]\n"
+" [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
+" [--symref] [<repository> [<patterns>...]]"
+msgstr ""
+"git ls-remote [--branches] [--tags] [--refs] [--upload-pack=<exec>]\n"
+" [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
+" [--symref] [<repository> [<patterns>...]]"
+
+#: builtin/ls-remote.c
+msgid "do not print remote URL"
+msgstr "ná priontáil URL iargúlta"
+
+#: builtin/ls-remote.c builtin/rebase.c
+msgid "exec"
+msgstr "feidhmiúcháin"
+
+#: builtin/ls-remote.c
+msgid "path of git-upload-pack on the remote host"
+msgstr "cosán git-upload-pack ar an óstach cianda"
+
+#: builtin/ls-remote.c
+msgid "limit to tags"
+msgstr "teorainn le clibeanna"
+
+#: builtin/ls-remote.c
+msgid "limit to branches"
+msgstr "teorainn le brainsí"
+
+#: builtin/ls-remote.c builtin/show-ref.c
+msgid "deprecated synonym for --branches"
+msgstr "comhchiallach scoite do --branches"
+
+#: builtin/ls-remote.c
+msgid "do not show peeled tags"
+msgstr "ná taispeáin clibeanna scáilte"
+
+#: builtin/ls-remote.c
+msgid "take url.<base>.insteadOf into account"
+msgstr "glacadh url. <base>.insteadOf san áireamh"
+
+#: builtin/ls-remote.c
+msgid "exit with exit code 2 if no matching refs are found"
+msgstr "imeacht le cód imeachta 2 mura bhfaightear aon aifeanna meaitseála"
+
+#: builtin/ls-remote.c
+msgid "show underlying ref in addition to the object pointed by it"
+msgstr "taispeáint an tagairt bhunúsach i dteannta leis an réad a thug sé"
+
+#: builtin/ls-tree.c
+msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
+msgstr "<path>git ls-tree [<options>] [...<tree-ish>]"
+
+#: builtin/ls-tree.c
+msgid "only show trees"
+msgstr "ach crainn a thaispeáint"
+
+#: builtin/ls-tree.c
+msgid "recurse into subtrees"
+msgstr "athshlánú isteach i bhfo-chrainn"
+
+#: builtin/ls-tree.c
+msgid "show trees when recursing"
+msgstr "crainn a thaispeáint agus tú ag athf"
+
+#: builtin/ls-tree.c
+msgid "terminate entries with NUL byte"
+msgstr "foirceannadh iontrálacha le bait NUL"
+
+#: builtin/ls-tree.c
+msgid "include object size"
+msgstr "méid an rud san áireamh"
+
+#: builtin/ls-tree.c
+msgid "list only filenames"
+msgstr "ainmneacha comhaid amháin a liostáil"
+
+#: builtin/ls-tree.c
+msgid "list only objects"
+msgstr "rudaí amháin a liostáil"
+
+#: builtin/ls-tree.c
+msgid "use full path names"
+msgstr "úsáid ainmneacha cosáin iomlána"
+
+#: builtin/ls-tree.c
+msgid "list entire tree; not just current directory (implies --full-name)"
+msgstr ""
+"liostáil crann iomlán; ní hamháin eolaire reatha (tugann le tuiscint --full-"
+"name)"
+
+#: builtin/ls-tree.c
+msgid "--format can't be combined with other format-altering options"
+msgstr ""
+"Ní féidir --format a chomhcheangal le roghanna eile a athraíonn formáidí"
+
+#. TRANSLATORS: keep <> in "<" mail ">" info.
+#: builtin/mailinfo.c
+msgid "git mailinfo [<options>] <msg> <patch> < mail >info"
+msgstr "git mailinfo [<options>] <msg> <patch> < mail >info"
+
+#: builtin/mailinfo.c
+msgid "keep subject"
+msgstr "coinnigh ábhar"
+
+#: builtin/mailinfo.c
+msgid "keep non patch brackets in subject"
+msgstr "coinnigh lúibíní gan paiste san ábhar"
+
+#: builtin/mailinfo.c
+msgid "copy Message-ID to the end of commit message"
+msgstr ""
+"cóipeáil ID teachtaireachtaí go dtí deireadh na teachtaireachta tiomanta"
+
+#: builtin/mailinfo.c
+msgid "re-code metadata to i18n.commitEncoding"
+msgstr "meiteashonraí a athchódú chuig i18N.CommitEncoding"
+
+#: builtin/mailinfo.c
+msgid "disable charset re-coding of metadata"
+msgstr "díchumasú ath-chódú charset meiteashonraí"
+
+#: builtin/mailinfo.c
+msgid "encoding"
+msgstr "ionchódú"
+
+#: builtin/mailinfo.c
+msgid "re-code metadata to this encoding"
+msgstr "athchódú meiteashonraí don ionchódú seo"
+
+#: builtin/mailinfo.c
+msgid "use scissors"
+msgstr "siosúr a úsáid"
+
+#: builtin/mailinfo.c
+msgid "<action>"
+msgstr "<action>"
+
+#: builtin/mailinfo.c
+msgid "action when quoted CR is found"
+msgstr "gníomh nuair a aimsítear CR a luaitear"
+
+#: builtin/mailinfo.c
+msgid "use headers in message's body"
+msgstr "ceanntásca a úsáid i gcorp na teachtaireachta"
+
+#: builtin/mailsplit.c
+msgid "reading patches from stdin/tty..."
+msgstr "paistí a léamh ó stdin/tty..."
+
+#: builtin/mailsplit.c
+#, c-format
+msgid "empty mbox: '%s'"
+msgstr "mbox folamh: '%s'"
+
+#: builtin/merge-base.c
+msgid "git merge-base [-a | --all] <commit> <commit>..."
+msgstr "git merge-base [-a | --all] <commit> <commit>..."
+
+#: builtin/merge-base.c
+msgid "git merge-base [-a | --all] --octopus <commit>..."
+msgstr "git merge-base [-a | --all] --octopus <commit>..."
+
+#: builtin/merge-base.c
+msgid "git merge-base --is-ancestor <commit> <commit>"
+msgstr "git merge-base --is-ancestor <commit> <commit>"
+
+#: builtin/merge-base.c
+msgid "git merge-base --independent <commit>..."
+msgstr "git merge-base --independent <commit>..."
+
+#: builtin/merge-base.c
+msgid "git merge-base --fork-point <ref> [<commit>]"
+msgstr "git merge-base --fork-point <ref> [<commit>]"
+
+#: builtin/merge-base.c
+msgid "output all common ancestors"
+msgstr "aschur gach sinsear coitianta"
+
+#: builtin/merge-base.c
+msgid "find ancestors for a single n-way merge"
+msgstr "aimsigh sinsear le haghaidh cumasc n-bhealach amháin"
+
+#: builtin/merge-base.c
+msgid "list revs not reachable from others"
+msgstr "liosta revs nach féidir teacht ó dhaoine eile"
+
+#: builtin/merge-base.c
+msgid "is the first one ancestor of the other?"
+msgstr "an é an chéad sinsear amháin den duine eile?"
+
+#: builtin/merge-base.c
+msgid "find where <commit> forked from reflog of <ref>"
+msgstr "faigh cén áit a <commit> bhforcáladh ó athbhreithniú <ref>"
+
+#: builtin/merge-file.c
+msgid ""
+"git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> "
+"<orig-file> <file2>"
+msgstr ""
+"git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> "
+"<orig-file> <file2>"
+
+#: builtin/merge-file.c diff.c
+msgid ""
+"option diff-algorithm accepts \"myers\", \"minimal\", \"patience\" and "
+"\"histogram\""
+msgstr ""
+"glacann difr-algartam rogha le “myers”, “íosta”, “foighne” agus “histogram”"
+
+#: builtin/merge-file.c
+msgid "send results to standard output"
+msgstr "torthaí a sheoladh chuig aschur caigh"
+
+#: builtin/merge-file.c
+msgid "use object IDs instead of filenames"
+msgstr "úsáid ID réad in ionad ainmneacha comhaid"
+
+#: builtin/merge-file.c
+msgid "use a diff3 based merge"
+msgstr "bain úsáid as cumaisc atá bunaithe ar diff3"
+
+#: builtin/merge-file.c
+msgid "use a zealous diff3 based merge"
+msgstr "bain úsáid as cumaisc díograiseach bunaithe ar diff3"
+
+#: builtin/merge-file.c diff.c
+msgid "<algorithm>"
+msgstr "<algorithm>"
+
+#: builtin/merge-file.c diff.c
+msgid "choose a diff algorithm"
+msgstr "roghnaigh algartam diff"
+
+#: builtin/merge-file.c
+msgid "for conflicts, use this marker size"
+msgstr "le haghaidh coinbhleachtaí, bain úsáid as an méid marcóra"
+
+#: builtin/merge-file.c
+msgid "do not warn about conflicts"
+msgstr "ná tabhair rabhadh faoi choimhlintí"
+
+#: builtin/merge-file.c
+msgid "set labels for file1/orig-file/file2"
+msgstr "lipéid a shocrú le haghaidh comhad1/orig-file/file2"
+
+#: builtin/merge-file.c
+#, c-format
+msgid "object '%s' does not exist"
+msgstr "níl réad '%s' ann"
+
+#: builtin/merge-file.c
+msgid "Could not write object file"
+msgstr "Ní fhéadfaí comhad réad a scríobh"
+
+#: builtin/merge-recursive.c
+#, c-format
+msgid "unknown option %s"
+msgstr "rogha anaithnid %s"
+
+#: builtin/merge-recursive.c
+#, c-format
+msgid "could not parse object '%s'"
+msgstr "ní fhéadfaí réad '%s' a pháirseáil"
+
+#: builtin/merge-recursive.c
+#, c-format
+msgid "cannot handle more than %d base. Ignoring %s."
+msgid_plural "cannot handle more than %d bases. Ignoring %s."
+msgstr[0] "ní féidir níos mó ná %d bonn a láimhseáil. Ag neamhaird de %s."
+msgstr[1] "ní féidir níos mó ná %d bonn a láimhseáil. Ag neamhaird de %s."
+msgstr[2] "ní féidir níos mó ná %d bonn a láimhseáil. Ag neamhaird de %s."
+
+#: builtin/merge-recursive.c
+msgid "not handling anything other than two heads merge."
+msgstr "gan láimhseáil aon rud seachas dhá cheann a chumasc."
+
+#: builtin/merge-recursive.c
+#, c-format
+msgid "could not resolve ref '%s'"
+msgstr "ní fhéadfaí tagairt '%s' a réiteach"
+
+#: builtin/merge-recursive.c
+#, c-format
+msgid "Merging %s with %s\n"
+msgstr "Cumasc %s le %s\n"
+
+#: builtin/merge-tree.c
+#, c-format
+msgid "could not parse as tree '%s'"
+msgstr "ní fhéadfaí parsáil mar chrann '%s'"
+
+#: builtin/merge-tree.c builtin/merge.c
+msgid "not something we can merge"
+msgstr "ní rud is féidir linn a chumasc"
+
+#: builtin/merge-tree.c builtin/merge.c
+msgid "refusing to merge unrelated histories"
+msgstr "diúltú stair neamhghaolmhara a chumasc"
+
+#: builtin/merge-tree.c
+msgid "failure to merge"
+msgstr "teip a chumasc"
+
+#: builtin/merge-tree.c
+msgid "git merge-tree [--write-tree] [<options>] <branch1> <branch2>"
+msgstr "git merge-tree [--write-tree] [<options>] <branch1> <branch2>"
+
+#: builtin/merge-tree.c
+msgid "git merge-tree [--trivial-merge] <base-tree> <branch1> <branch2>"
+msgstr "git merge-tree [--trivial-cumaisc] <base-tree><branch1><branch2>"
+
+#: builtin/merge-tree.c
+msgid "do a real merge instead of a trivial merge"
+msgstr "déan fíor-chumasc in ionad cumaisc triobháideach"
+
+#: builtin/merge-tree.c
+msgid "do a trivial merge only"
+msgstr "déan cumaisc thréimhseach amháin"
+
+#: builtin/merge-tree.c
+msgid "also show informational/conflict messages"
+msgstr "taispeáin teachtaireachtaí faisnéis/coinbhleachta freisin"
+
+#: builtin/merge-tree.c
+msgid "suppress all output; only exit status wanted"
+msgstr "cosc a chur ar an aschur go léir; níl uaim ach stádas scoir"
+
+#: builtin/merge-tree.c
+msgid "list filenames without modes/oids/stages"
+msgstr "ainmneacha comhaid a liostáil gan modhair/oids/céimeanna"
+
+#: builtin/merge-tree.c builtin/merge.c builtin/pull.c
+msgid "allow merging unrelated histories"
+msgstr "ligean stair neamhghaolmhara a chumasc"
+
+#: builtin/merge-tree.c
+msgid "perform multiple merges, one per line of input"
+msgstr "cumaisc iolracha a dhéanamh, ceann in aghaidh an líne ionchuir"
+
+#: builtin/merge-tree.c
+msgid "specify a merge-base for the merge"
+msgstr "sonraigh bonn cumaisc don chumasc"
+
+#: builtin/merge-tree.c builtin/merge.c builtin/pull.c
+msgid "option=value"
+msgstr "rogha = luach"
+
+#: builtin/merge-tree.c builtin/merge.c builtin/pull.c
+msgid "option for selected merge strategy"
+msgstr "rogha do straitéis cumaisc roghnaithe"
+
+#: builtin/merge-tree.c
+msgid "--trivial-merge is incompatible with all other options"
+msgstr "Tá --trivial-merge neamhoiriúnach le gach rogha eile"
+
+#: builtin/merge-tree.c builtin/merge.c
+#, c-format
+msgid "unknown strategy option: -X%s"
+msgstr "rogha straitéise anaithnid: -X%s"
+
+#: builtin/merge-tree.c builtin/notes.c
+#, c-format
+msgid "malformed input line: '%s'."
+msgstr "líne ionchuir mífhoirmithe: '%s'."
+
+#: builtin/merge.c
+msgid "git merge [<options>] [<commit>...]"
+msgstr "git cumaisc [<options>] [<commit>...]"
+
+#: builtin/merge.c
+msgid "switch `m' requires a value"
+msgstr "teastaíonn luach ag lasc `m'"
+
+#: builtin/merge.c
+#, c-format
+msgid "option `%s' requires a value"
+msgstr "teastaíonn luach ag rogha `%s'"
+
+#: builtin/merge.c
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr "Níorbh fhéidir straitéis cumaisc '%s' a fháil.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Available strategies are:"
+msgstr "Is iad straitéisí atá ar fáil:"
+
+#: builtin/merge.c
+#, c-format
+msgid "Available custom strategies are:"
+msgstr "Is iad seo a leanas na straitéisí saincheaptha atá ar fáil:"
+
+#: builtin/merge.c builtin/pull.c
+msgid "do not show a diffstat at the end of the merge"
+msgstr "ná taispeáin diffstat ag deireadh an chumaisc"
+
+#: builtin/merge.c builtin/pull.c
+msgid "show a diffstat at the end of the merge"
+msgstr "taispeáin diffstat ag deireadh an chumaisc"
+
+#: builtin/merge.c builtin/pull.c
+msgid "(synonym to --stat)"
+msgstr "(Comhchiallach le --stat)"
+
+#: builtin/merge.c builtin/pull.c
+msgid "add (at most <n>) entries from shortlog to merge commit message"
+msgstr ""
+"cuir iontrálacha (ar a mh <n>éad) ó gearrlog chun teachtaireacht tiomanta a "
+"chumasc"
+
+#: builtin/merge.c builtin/pull.c
+msgid "create a single commit instead of doing a merge"
+msgstr "tiomantas amháin a chruthú in ionad cumaisc a dhéanamh"
+
+#: builtin/merge.c builtin/pull.c
+msgid "perform a commit if the merge succeeds (default)"
+msgstr "tiomantas a dhéanamh má éireoidh leis an gcumasc (réamhshocraithe)"
+
+#: builtin/merge.c builtin/pull.c
+msgid "edit message before committing"
+msgstr "teachtaireacht in eagar sula ndéanann"
+
+#: builtin/merge.c
+msgid "allow fast-forward (default)"
+msgstr "ligean go tapa ar aghaidh (réamhshocraithe)"
+
+#: builtin/merge.c builtin/pull.c
+msgid "abort if fast-forward is not possible"
+msgstr "déan deireadh a chur ar aghaidh mura féidir go tapa ar aghaidh"
+
+#: builtin/merge.c builtin/pull.c
+msgid "verify that the named commit has a valid GPG signature"
+msgstr "fíorú go bhfuil síniú bailí GPG ag an tiomantas ainmnithe"
+
+#: builtin/merge.c builtin/notes.c builtin/pull.c builtin/rebase.c
+#: builtin/revert.c
+msgid "strategy"
+msgstr "straitéis"
+
+#: builtin/merge.c builtin/pull.c
+msgid "merge strategy to use"
+msgstr "straitéis a chumasc le húsáid"
+
+#: builtin/merge.c
+msgid "merge commit message (for a non-fast-forward merge)"
+msgstr ""
+"teachtaireacht tiomanta a chumasc (le haghaidh cumaisc neamh-tapa ar aghaidh)"
+
+#: builtin/merge.c
+msgid "use <name> instead of the real target"
+msgstr "úsáid in <name>ionad an sprioc fíor"
+
+#: builtin/merge.c
+msgid "abort the current in-progress merge"
+msgstr "deireadh a chur leis an gcumasc reatha atá ar siúl"
+
+#: builtin/merge.c
+msgid "--abort but leave index and working tree alone"
+msgstr "--abort ach fág an t-innéacs agus an crann oibre ina n-aonar"
+
+#: builtin/merge.c
+msgid "continue the current in-progress merge"
+msgstr "leanúint leis an gcumasc atá ar siúl reatha"
+
+#: builtin/merge.c
+msgid "bypass pre-merge-commit and commit-msg hooks"
+msgstr "seachbhóthar crúcaí réamh-chumaisc-tiomantas agus comh-msg"
+
+#: builtin/merge.c
+msgid "could not run stash."
+msgstr "ní fhéadfadh stash a reáchtáil."
+
+#: builtin/merge.c
+msgid "stash failed"
+msgstr "theip ar stash"
+
+#: builtin/merge.c
+#, c-format
+msgid "not a valid object: %s"
+msgstr "ní réad bailí: %s"
+
+#: builtin/merge.c
+msgid "read-tree failed"
+msgstr "theip ar chrann léitheoireachta"
+
+#: builtin/merge.c
+msgid "Already up to date. (nothing to squash)"
+msgstr "Cothrom le dáta cheana féin. (rud ar bith le squash)"
+
+#: builtin/merge.c merge-ort-wrappers.c
+msgid "Already up to date."
+msgstr "Cothrom le dáta cheana féin."
+
+#: builtin/merge.c
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr "Tiomantas Squash - gan HEAD a nuashonrú\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr "Gan aon teachtaireacht cumaisc - gan HEAD a nuashonrú\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr "Ní thugann '%s' in iúl do thiomantas"
+
+#: builtin/merge.c
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr "Drochbhrainse. %s.mergeoptions teaghrán: %s"
+
+#: builtin/merge.c merge-ort-wrappers.c
+msgid "Unable to write index."
+msgstr "Ní féidir innéacs a scríobh."
+
+#: builtin/merge.c
+msgid "Not handling anything other than two heads merge."
+msgstr "Gan aon rud a láimhseáil seachas dhá cheann cumasc."
+
+#: builtin/merge.c builtin/sparse-checkout.c
+#, c-format
+msgid "unable to write %s"
+msgstr "nach féidir %s a scríobh"
+
+#: builtin/merge.c
+#, c-format
+msgid "Could not read from '%s'"
+msgstr "Ní féidir léamh ó '%s'"
+
+#: builtin/merge.c
+#, c-format
+msgid "Not committing merge; use 'git commit' to complete the merge.\n"
+msgstr ""
+"Gan cumasc a dhéanamh; bain úsáid as 'git commit' chun an cumaisc a chur i "
+"gcrích.\n"
+
+#: builtin/merge.c
+msgid ""
+"Please enter a commit message to explain why this merge is necessary,\n"
+"especially if it merges an updated upstream into a topic branch.\n"
+"\n"
+msgstr ""
+"Cuir isteach teachtaireacht tiomanta le do thoil chun a mhíniú cén fáth go "
+"bhfuil gá leis\n"
+"go háirithe má chomhcheanglaíonn sé nuashonraithe suas sruth i mbrainse "
+"ábhair.\n"
+
+#: builtin/merge.c
+msgid "An empty message aborts the commit.\n"
+msgstr "Cuireann teachtaireacht fholamh deireadh leis an tiomantas.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid ""
+"Lines starting with '%s' will be ignored, and an empty message aborts\n"
+"the commit.\n"
+msgstr ""
+"Déanfar neamhaird ar línte a thosaíonn le '%s', \n"
+"agus cuirfidh teachtaireacht fholamh deireadh leis an tiomantas.\n"
+
+#: builtin/merge.c
+msgid "Empty commit message."
+msgstr "Teachtaireacht tiomanta folamh."
+
+#: builtin/merge.c
+#, c-format
+msgid "Wonderful.\n"
+msgstr "Iontach.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+"Theip ar chumasc uathoibríoch; coimhlintí a shocrú agus ansin an toradh\n"
+
+#: builtin/merge.c
+msgid "No current branch."
+msgstr "Níl aon bhrainse reatha."
+
+#: builtin/merge.c
+msgid "No remote for the current branch."
+msgstr "Níl aon iargúlta don bhrainse reatha."
+
+#: builtin/merge.c
+msgid "No default upstream defined for the current branch."
+msgstr "Níl aon réamhshocraithe suas sruth sainithe don bhrainse reatha."
+
+#: builtin/merge.c
+#, c-format
+msgid "No remote-tracking branch for %s from %s"
+msgstr "Gan aon bhrainse cianrianaithe do %s ó %s"
+
+#: builtin/merge.c
+#, c-format
+msgid "Bad value '%s' in environment '%s'"
+msgstr "Drochluach '%s' sa timpeallacht '%s'"
+
+#: builtin/merge.c editor.c read-cache.c wrapper.c
+#, c-format
+msgid "could not close '%s'"
+msgstr "ní fhéadfaí '%s' a dhúnadh"
+
+#: builtin/merge.c
+#, c-format
+msgid "not something we can merge in %s: %s"
+msgstr "ní rud is féidir linn a chumasc i %s: %s"
+
+#: builtin/merge.c
+msgid "--abort expects no arguments"
+msgstr "--abort ag súil nach bhfuil aon argóintí"
+
+#: builtin/merge.c
+msgid "There is no merge to abort (MERGE_HEAD missing)."
+msgstr "Níl aon chumasc ann chun deireadh a chur (MERGE_HEAD ar iarraidh)."
+
+#: builtin/merge.c
+msgid "--quit expects no arguments"
+msgstr "Tá --quit ag súil nach bhfuil aon argóintí"
+
+#: builtin/merge.c
+msgid "--continue expects no arguments"
+msgstr "--continue gan aon argóintí ag súil leo"
+
+#: builtin/merge.c
+msgid "There is no merge in progress (MERGE_HEAD missing)."
+msgstr "Níl aon chumasc ar siúl (MERGE_HEAD ar iarraidh)."
+
+#: builtin/merge.c
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you merge."
+msgstr ""
+"Níor thug tú do chumasc i gcrích (MERGE_HEAD ann).\n"
+"Déan do chuid athruithe a dhéanamh sula ndéanann tú cumasc."
+
+#: builtin/merge.c
+msgid ""
+"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
+"Please, commit your changes before you merge."
+msgstr ""
+"Níor thug tú do phiocadh silíní i gcrích (CHERRY_PICK_HEAD ann).\n"
+"Déan do chuid athruithe a dhéanamh sula ndéanann tú cumasc."
+
+#: builtin/merge.c
+msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
+msgstr "Níor thug tú do phiocadh silíní i gcrích (CHERRY_PICK_HEAD ann)."
+
+#: builtin/merge.c
+msgid "No commit specified and merge.defaultToUpstream not set."
+msgstr ""
+"Níl aon tiomantas sonraithe agus níl merge.defaultToUpstream socraithe."
+
+#: builtin/merge.c
+msgid "Squash commit into empty head not supported yet"
+msgstr "Tiomann squash isteach i gceann folamh nach dtacaítear go fóill"
+
+#: builtin/merge.c
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr "Níl ciall ar thiomantas neamh-thapa ar aghaidh i gceann folamh"
+
+#: builtin/merge.c
+#, c-format
+msgid "%s - not something we can merge"
+msgstr "%s - ní rud is féidir linn a chumasc"
+
+#: builtin/merge.c
+msgid "Can merge only exactly one commit into empty head"
+msgstr "Ní féidir ach tiomantas amháin a chumasc i gceann folamh"
+
+#: builtin/merge.c
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr "Ag nuashonrú %s..%s\n"
+
+#: builtin/merge.c merge-ort-wrappers.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by merge:\n"
+" %s"
+msgstr ""
+"Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh trí "
+"chumasc:\n"
+" %s"
+
+#: builtin/merge.c
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr "Ag triail a dhéanamh cumasc in-innéacs fíor-thrá\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Nope.\n"
+msgstr "Ní hea..\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr "Ag athchasadh an chrainn go dtí go mbeidh sé foirfe...\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr "Ag iarraidh straitéis cumaisc %s...\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr "Níor láimhseáil aon straitéis chumaisc an cumasc.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr "Theip ar chumasc le straitéis %s.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Using the %s strategy to prepare resolving by hand.\n"
+msgstr "Ag baint úsáide as straitéis %s chun réiteach a ullmhú de láimh.\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr "Chuaigh cumaisc uathoibríoch go maith; stad sula ndearna sé tiomanta\n"
+
+#: builtin/merge.c
+#, c-format
+msgid "When finished, apply stashed changes with `git stash pop`\n"
+msgstr ""
+"Nuair a bheidh críochnaithe, cuir athruithe stashed i bhfeidhm le `git stash "
+"pop`\n"
+
+#: builtin/mktag.c
+#, c-format
+msgid "warning: tag input does not pass fsck: %s"
+msgstr "rabhadh: ní théann ionchur clib ar fsck: %s"
+
+#: builtin/mktag.c
+#, c-format
+msgid "error: tag input does not pass fsck: %s"
+msgstr "earráid: ní théann ionchur clib ar fsck: %s"
+
+#: builtin/mktag.c
+#, c-format
+msgid "%d (FSCK_IGNORE?) should never trigger this callback"
+msgstr "%d (FSCK_IGNORE?) níor cheart go spreagfadh an t-aisghlaoch seo"
+
+#: builtin/mktag.c
+#, c-format
+msgid "could not read tagged object '%s'"
+msgstr "ní fhéadfaí réad clibeáilte '%s' a léamh"
+
+#: builtin/mktag.c
+#, c-format
+msgid "object '%s' tagged as '%s', but is a '%s' type"
+msgstr "réad '%s' clibeáilte mar '%s', ach is cineál '%s' é"
+
+#: builtin/mktag.c
+msgid "tag on stdin did not pass our strict fsck check"
+msgstr "níor rith tag ar stdin ár seiceáil dhian fsck"
+
+#: builtin/mktag.c
+msgid "tag on stdin did not refer to a valid object"
+msgstr "níor thagraigh an chlib ar stdin do réad bailí"
+
+#: builtin/mktag.c builtin/tag.c
+msgid "unable to write tag file"
+msgstr "in ann comhad clib a scríobh"
+
+#: builtin/mktree.c
+msgid "input is NUL terminated"
+msgstr "cuirtear deireadh le hionchur NUL"
+
+#: builtin/mktree.c builtin/write-tree.c
+msgid "allow missing objects"
+msgstr "cead a cheadú rudaí"
+
+#: builtin/mktree.c
+msgid "allow creation of more than one tree"
+msgstr "cead níos mó ná crann amháin a chruthú"
+
+#: builtin/multi-pack-index.c
+msgid ""
+"git multi-pack-index [<options>] write [--preferred-pack=<pack>][--refs-"
+"snapshot=<path>]"
+msgstr ""
+"git multi-pack-index [<options>] write [--preferred-pack=<pack>][--refs-"
+"snapshot=<path>]"
+
+#: builtin/multi-pack-index.c
+msgid "git multi-pack-index [<options>] verify"
+msgstr "git multi-pack-index [<options>] verify"
+
+#: builtin/multi-pack-index.c
+msgid "git multi-pack-index [<options>] expire"
+msgstr "git multi-pack-index [<options>] expire"
+
+#: builtin/multi-pack-index.c
+msgid "git multi-pack-index [<options>] repack [--batch-size=<size>]"
+msgstr "git multi-pack-index [<options>] repack [--batch-size=<size>]"
+
+#: builtin/multi-pack-index.c
+msgid "directory"
+msgstr "eolaire"
+
+#: builtin/multi-pack-index.c
+msgid "object directory containing set of packfile and pack-index pairs"
+msgstr ""
+"eolaire réada ina bhfuil tacar de phéirí pacáiste agus innéacs pacáiste"
+
+#: builtin/multi-pack-index.c
+msgid "preferred-pack"
+msgstr "pacáiste is fearr leat"
+
+#: builtin/multi-pack-index.c
+msgid "pack for reuse when computing a multi-pack bitmap"
+msgstr "pacáiste le húsáid agus bitmap il-phacáiste á ríomh"
+
+#: builtin/multi-pack-index.c
+msgid "write multi-pack bitmap"
+msgstr "scríobh bitmap il-phacáiste"
+
+#: builtin/multi-pack-index.c
+msgid "write a new incremental MIDX"
+msgstr "scríobh MIDX incrementach nua"
+
+#: builtin/multi-pack-index.c
+msgid "write multi-pack index containing only given indexes"
+msgstr "scríobh innéacs il-phacáiste nach bhfuil ach innéacsanna ar leith"
+
+#: builtin/multi-pack-index.c
+msgid "refs snapshot for selecting bitmap commits"
+msgstr "léargas refs chun gealltanais bitmap a roghnú"
+
+#: builtin/multi-pack-index.c
+msgid ""
+"during repack, collect pack-files of smaller size into a batch that is "
+"larger than this size"
+msgstr ""
+"le linn athphacáil, bailigh comhaid pacáiste de mhéid níos lú i mbaisc atá "
+"níos mó ná an méid seo"
+
+#: builtin/mv.c
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <source><destination>"
+
+#: builtin/mv.c
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "<source>git mv [-v] [-f] [-n] [-k]... <destination-directory>"
+
+#: builtin/mv.c
+#, c-format
+msgid "Directory %s is in index and no submodule?"
+msgstr "Tá eolaire %s in innéacs agus níl aon fho-mhodúl ann?"
+
+#: builtin/mv.c
+msgid "Please stage your changes to .gitmodules or stash them to proceed"
+msgstr ""
+"Cuir do chuid athruithe ar .gitmodules nó iad a stóráil chun dul ar aghaidh"
+
+#: builtin/mv.c
+#, c-format
+msgid "%.*s is in index"
+msgstr "%.*s atá san innéacs"
+
+#: builtin/mv.c
+msgid "force move/rename even if target exists"
+msgstr "aistriúin/athainmniú a fhorbairt fiú má tá sprioc ann"
+
+#: builtin/mv.c
+msgid "skip move/rename errors"
+msgstr "scipeáil earráidí a bhogadh/athainmniú"
+
+#: builtin/mv.c
+#, c-format
+msgid "destination '%s' is not a directory"
+msgstr "ní eolaire é ceann scríbe '%s'"
+
+#: builtin/mv.c
+#, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr "Seiceáil athainmniú '%s' go '%s'\n"
+
+#: builtin/mv.c
+msgid "bad source"
+msgstr "droch-fhoinse"
+
+#: builtin/mv.c
+msgid "destination exists"
+msgstr "ceann scríbe ann"
+
+#: builtin/mv.c
+msgid "can not move directory into itself"
+msgstr "ní féidir eolaire a bhogadh isteach ina féin"
+
+#: builtin/mv.c
+msgid "destination already exists"
+msgstr "ceann scríbe ann cheana féin"
+
+#: builtin/mv.c
+msgid "source directory is empty"
+msgstr "tá eolaire foinse folamh"
+
+#: builtin/mv.c
+msgid "not under version control"
+msgstr "nach bhfuil faoi rialú leagan"
+
+#: builtin/mv.c
+msgid "conflicted"
+msgstr "coimhlinneach"
+
+#: builtin/mv.c
+#, c-format
+msgid "overwriting '%s'"
+msgstr "athscríobh '%s'"
+
+#: builtin/mv.c
+msgid "Cannot overwrite"
+msgstr "Ní féidir athscríobh"
+
+#: builtin/mv.c
+msgid "multiple sources for the same target"
+msgstr "foinsí iolracha don sprioc chéanna"
+
+#: builtin/mv.c
+msgid "destination directory does not exist"
+msgstr "níl eolaire ceann scríbe ann"
+
+#: builtin/mv.c
+msgid "destination exists in the index"
+msgstr "ceann scríbe ann san innéacs"
+
+#: builtin/mv.c
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr "%s, foinse = %s, ceann scríbe = %s"
+
+#: builtin/mv.c
+#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "ní féidir '%s' agus a eolaire tuismitheora '%s' a bhogadh"
+
+#: builtin/mv.c
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr "Athainmniú %s go %s\n"
+
+#: builtin/mv.c builtin/remote.c
+#, c-format
+msgid "renaming '%s' failed"
+msgstr "theip ar athainmniú '%s'"
+
+#: builtin/name-rev.c
+msgid "git name-rev [<options>] <commit>..."
+msgstr "git name-rev [<options>] <commit>..."
+
+#: builtin/name-rev.c
+msgid "git name-rev [<options>] --all"
+msgstr "git name-rev [<options>] --all"
+
+#: builtin/name-rev.c
+msgid "git name-rev [<options>] --annotate-stdin"
+msgstr "git name-rev [<options>] --annotate-stdin"
+
+#: builtin/name-rev.c
+msgid "print only ref-based names (no object names)"
+msgstr "ainmneacha ref-bhunaithe amháin a phriontáil (gan ainmneacha réada)"
+
+#: builtin/name-rev.c
+msgid "only use tags to name the commits"
+msgstr "ní húsáid ach clibeanna chun na gealltanais a ainmniú"
+
+#: builtin/name-rev.c
+msgid "only use refs matching <pattern>"
+msgstr "ní úsáideann ach meaitseáil refs <pattern>"
+
+#: builtin/name-rev.c
+msgid "ignore refs matching <pattern>"
+msgstr "neamhaird a dhéanamh ar mheaitseáil <pattern>"
+
+#: builtin/name-rev.c
+msgid "list all commits reachable from all refs"
+msgstr "liostáil na gealltanais go léir atá inrochtana ó gach ceann"
+
+#: builtin/name-rev.c
+msgid "deprecated: use --annotate-stdin instead"
+msgstr "díscríofa: bain úsáid as --annotate-stdin ina ionad"
+
+#: builtin/name-rev.c
+msgid "annotate text from stdin"
+msgstr "téacs a anótáil ó stdin"
+
+#: builtin/name-rev.c
+msgid "allow to print `undefined` names (default)"
+msgstr ""
+"cead a thabhairt d'ainmneacha “neamhshainithe” a phriontáil (réamhshocrú"
+
+#: builtin/name-rev.c
+msgid "dereference tags in the input (internal use)"
+msgstr "clibeanna dereference san ionchur (úsáid inmheánach)"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] [list [<object>]]"
+msgstr "git notes [--ref <notes-ref>] [list [<object>]]"
+
+#: builtin/notes.c
+msgid ""
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>] [-e]"
+msgstr ""
+"git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>] [-e]"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"
+msgstr "git notes [--ref<notes-ref>] cóipeáil [-f] <from-object><to-object>"
+
+#: builtin/notes.c
+msgid ""
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>] [-e]"
+msgstr ""
+"git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--"
+"separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c "
+"| -C) <object>] [<object>] [-e]"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
+msgstr "git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] show [<object>]"
+msgstr "git notes [--ref <notes-ref>] show [<object>]"
+
+#: builtin/notes.c
+msgid ""
+"git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"
+msgstr ""
+"git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] remove [<object>...]"
+msgstr "git notes [--ref <notes-ref>] remove [<object>...]"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] prune [-n] [-v]"
+msgstr "git notes [--ref <notes-ref>] prune [-n] [-v]"
+
+#: builtin/notes.c
+msgid "git notes [--ref <notes-ref>] get-ref"
+msgstr "git notes [--ref <notes-ref>] get-ref"
+
+#: builtin/notes.c
+msgid "git notes [list [<object>]]"
+msgstr "git notes [list [<object>]]"
+
+#: builtin/notes.c
+msgid "git notes add [<options>] [<object>]"
+msgstr "git notes add [<options>] [<object>]"
+
+#: builtin/notes.c
+msgid "git notes copy [<options>] <from-object> <to-object>"
+msgstr "git notes copy [<options>] <from-object> <to-object>"
+
+#: builtin/notes.c
+msgid "git notes copy --stdin [<from-object> <to-object>]..."
+msgstr "git notes copy --stdin [<from-object> <to-object>]..."
+
+#: builtin/notes.c
+msgid "git notes append [<options>] [<object>]"
+msgstr "git notes append [<options>] [<object>]"
+
+#: builtin/notes.c
+msgid "git notes edit [<object>]"
+msgstr "nótaí git a chur in eagar [<object>]"
+
+#: builtin/notes.c
+msgid "git notes show [<object>]"
+msgstr "taispeánann nótaí git [<object>]"
+
+#: builtin/notes.c
+msgid "git notes merge [<options>] <notes-ref>"
+msgstr "cumaisc nótaí git [<options>] <notes-ref>"
+
+#: builtin/notes.c
+msgid "git notes merge --commit [<options>]"
+msgstr "git notes merge --commit [<options>]"
+
+#: builtin/notes.c
+msgid "git notes merge --abort [<options>]"
+msgstr "git notes merge --abort [<options>]"
+
+#: builtin/notes.c
+msgid "git notes remove [<object>]"
+msgstr "git notes remove [<object>]"
+
+#: builtin/notes.c
+msgid "git notes prune [<options>]"
+msgstr "git notes prune [<options>]"
+
+#: builtin/notes.c
+msgid "Write/edit the notes for the following object:"
+msgstr "Scríobh/cuir in eagar na nótaí don réad seo a leanas:"
+
+#: builtin/notes.c
+msgid "could not read 'show' output"
+msgstr "ní raibh in ann aschur 'taispeáin' a léamh"
+
+#: builtin/notes.c
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr "theip ar 'show' a chríochnú le haghaidh réad '%s'"
+
+#: builtin/notes.c
+msgid "please supply the note contents using either -m or -F option"
+msgstr "soláthar ábhar an nóta le do thoil ag baint úsáide as rogha -m nó -F"
+
+#: builtin/notes.c
+msgid "unable to write note object"
+msgstr "in ann réad nótaí a scríobh"
+
+#: builtin/notes.c
+#, c-format
+msgid "the note contents have been left in %s"
+msgstr "tá ábhar an nóta fágtha i %s"
+
+#: builtin/notes.c builtin/tag.c
+#, c-format
+msgid "could not open or read '%s'"
+msgstr "ní fhéadfaí '%s' a oscailt nó a léamh"
+
+#: builtin/notes.c
+#, c-format
+msgid "failed to resolve '%s' as a valid ref."
+msgstr "theip ar '%s' a réiteach mar thagartha bailí."
+
+#: builtin/notes.c
+#, c-format
+msgid "failed to read object '%s'."
+msgstr "theip ar réad '%s' a léamh."
+
+#: builtin/notes.c
+#, c-format
+msgid "cannot read note data from non-blob object '%s'."
+msgstr "ní féidir sonraí nótaí a léamh ó réad neamh-blob '%s'."
+
+#: builtin/notes.c
+#, c-format
+msgid "failed to copy notes from '%s' to '%s'"
+msgstr "theip ar nótaí a chóipeáil ó '%s' go '%s'"
+
+#. TRANSLATORS: the first %s will be replaced by a git
+#. notes command: 'add', 'merge', 'remove', etc.
+#.
+#: builtin/notes.c
+#, c-format
+msgid "refusing to %s notes in %s (outside of refs/notes/)"
+msgstr "diúltú do %s nótaí i %s (lasmuigh de refs/notes/)"
+
+#: builtin/notes.c
+#, c-format
+msgid "no note found for object %s."
+msgstr "ní bhfuarthas aon nóta do réad %s."
+
+#: builtin/notes.c
+msgid "note contents as a string"
+msgstr "tabhair faoi deara ábhar mar shreang"
+
+#: builtin/notes.c
+msgid "note contents in a file"
+msgstr "tabhair faoi deara ábhar i gcomhad"
+
+#: builtin/notes.c
+msgid "reuse and edit specified note object"
+msgstr "réad nóta sonraithe a úsáid agus a chur in eagar"
+
+#: builtin/notes.c
+msgid "edit note message in editor"
+msgstr "teachtaireacht nóta in eagar san eagarthóir"
+
+#: builtin/notes.c
+msgid "reuse specified note object"
+msgstr "réad nóta sonraithe a athúsáid"
+
+#: builtin/notes.c
+msgid "allow storing empty note"
+msgstr "ligean nóta folamh a stóráil"
+
+#: builtin/notes.c
+msgid "replace existing notes"
+msgstr "nótaí atá ann cheana in ionad"
+
+#: builtin/notes.c
+msgid "<paragraph-break>"
+msgstr "<paragraph-break>"
+
+#: builtin/notes.c
+msgid "insert <paragraph-break> between paragraphs"
+msgstr "cuir isteach <paragraph-break>idir míreanna"
+
+#: builtin/notes.c
+msgid "remove unnecessary whitespace"
+msgstr "bain spás bán neamhriachtanach"
+
+#: builtin/notes.c
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Ní féidir nótaí a chur leis. Fuarthas nótaí atá ann cheana don réad %s. "
+"Úsáid '-f' chun nótaí atá ann cheana a fhorscríobh"
+
+#: builtin/notes.c
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr "Athscríobh nótaí atá ann cheana don réad %s\n"
+
+#: builtin/notes.c
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr "Nóta a bhaint le haghaidh réad %s\n"
+
+#: builtin/notes.c
+msgid "read objects from stdin"
+msgstr "léigh rudaí ó stdin"
+
+#: builtin/notes.c
+msgid "load rewriting config for <command> (implies --stdin)"
+msgstr ""
+"cumraíocht athscríbhneoireachta ualaigh le haghaidh <command>(tugann le "
+"tuiscint --stdin)"
+
+#: builtin/notes.c
+msgid "too few arguments"
+msgstr "ró-bheag argóintí"
+
+#: builtin/notes.c
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Ní féidir nótaí a chóipeáil. Fuarthas nótaí atá ann cheana don réad %s. "
+"Úsáid '-f' chun nótaí atá ann cheana a fhorscríobh"
+
+#: builtin/notes.c
+#, c-format
+msgid "missing notes on source object %s. Cannot copy."
+msgstr "nótaí in easnamh ar réad foinse %s. Ní féidir cóipeáil."
+
+#: builtin/notes.c
+#, c-format
+msgid ""
+"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
+"Please use 'git notes add -f -m/-F/-c/-C' instead.\n"
+msgstr ""
+"Tá na roghanna -M/-f/-c/-c curtha as an bhfo-ordú 'eagarthóireach'.\n"
+"Úsáid le do thoil 'git notes add -f -m/-f/-c/-C' ina ionad.\n"
+
+#: builtin/notes.c
+msgid "failed to delete ref NOTES_MERGE_PARTIAL"
+msgstr "theip ar an tagairt NOTES_MERGE_PARTIAL a scriosadh"
+
+#: builtin/notes.c
+msgid "failed to delete ref NOTES_MERGE_REF"
+msgstr "theip ar an ref a scriosadh NOTES_MERGE_REF"
+
+#: builtin/notes.c
+msgid "failed to remove 'git notes merge' worktree"
+msgstr "theip ar chrann oibre 'git notes merge' a bhaint"
+
+#: builtin/notes.c
+msgid "failed to read ref NOTES_MERGE_PARTIAL"
+msgstr "theip ar an tagairt NOTES_MERGE_PARTIAL a léamh"
+
+#: builtin/notes.c
+msgid "could not find commit from NOTES_MERGE_PARTIAL."
+msgstr "ní raibh sé in ann tiomantas a fháil ó NOTES_MERGE_PARTIAL."
+
+#: builtin/notes.c
+msgid "could not parse commit from NOTES_MERGE_PARTIAL."
+msgstr "ní raibh sé in ann tiomantas a pharsáil ó NOTES_MERGE_PARTIAL."
+
+#: builtin/notes.c
+msgid "failed to resolve NOTES_MERGE_REF"
+msgstr "theip orthu NOTES_MERGE_REF a réiteach"
+
+#: builtin/notes.c
+msgid "failed to finalize notes merge"
+msgstr "theip orthu nótaí a chumasc a chur i gcrích"
+
+#: builtin/notes.c
+#, c-format
+msgid "unknown notes merge strategy %s"
+msgstr "straitéis cumaisc nótaí anaithnid %s"
+
+#: builtin/notes.c
+msgid "General options"
+msgstr "Roghanna ginearálta"
+
+#: builtin/notes.c
+msgid "Merge options"
+msgstr "Roghanna cumaisc"
+
+#: builtin/notes.c
+msgid ""
+"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
+"cat_sort_uniq)"
+msgstr ""
+"coimhlintí nótaí a réiteach ag baint úsáide as an straitéis a thugtar "
+"(lámhleabhair/innir/a nd/union/cat_sort_uniq)"
+
+#: builtin/notes.c
+msgid "Committing unmerged notes"
+msgstr "Nótaí neamh-mheánaithe a dhéanamh"
+
+#: builtin/notes.c
+msgid "finalize notes merge by committing unmerged notes"
+msgstr "cumasc nótaí a chríochnú trí nótaí neamh-chumasaithe a dhéanamh"
+
+#: builtin/notes.c
+msgid "Aborting notes merge resolution"
+msgstr "Rún cumasc le nótaí a ghearradh"
+
+#: builtin/notes.c
+msgid "abort notes merge"
+msgstr "cumaisc nótaí abort"
+
+#: builtin/notes.c
+msgid "cannot mix --commit, --abort or -s/--strategy"
+msgstr "ní féidir --commit, --abort nó -s/--strategy a mheascadh"
+
+#: builtin/notes.c
+msgid "must specify a notes ref to merge"
+msgstr "ní mór tagairt nótaí a shonrú chun cumasc"
+
+#: builtin/notes.c
+#, c-format
+msgid "unknown -s/--strategy: %s"
+msgstr "anaithnid -s/--strategy: %s"
+
+#: builtin/notes.c
+#, c-format
+msgid "a notes merge into %s is already in-progress at %s"
+msgstr "tá nótaí a chumasc i %s ar siúl cheana féin ag %s"
+
+#: builtin/notes.c
+#, c-format
+msgid "failed to store link to current notes ref (%s)"
+msgstr "theip ar nasc a stóráil le nótaí reatha tagairt (%s)"
+
+#: builtin/notes.c
+#, c-format
+msgid ""
+"Automatic notes merge failed. Fix conflicts in %s and commit the result with "
+"'git notes merge --commit', or abort the merge with 'git notes merge --"
+"abort'.\n"
+msgstr ""
+"Theip ar chumasc nótaí uathoibríoch Socraigh coinbhleachtaí i %s agus déan "
+"an toradh a dhéanamh le 'git notes merge --commit', nó cuir deireadh leis an "
+"cumasc le 'git notes merge --abort'.\n"
+
+#: builtin/notes.c builtin/tag.c
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr "Theip ar '%s' a réiteach mar thagartha bailí."
+
+#: builtin/notes.c
+#, c-format
+msgid "Object %s has no note\n"
+msgstr "Níl aon nóta ag réad %s\n"
+
+#: builtin/notes.c
+msgid "attempt to remove non-existent note is not an error"
+msgstr "ní earráid é iarracht nóta nach bhfuil ann a bhaint"
+
+#: builtin/notes.c
+msgid "read object names from the standard input"
+msgstr "léigh ainmneacha réada ón ionchur caighdeánach"
+
+#: builtin/notes.c builtin/prune.c builtin/worktree.c
+msgid "do not remove, show only"
+msgstr "ná bain, taispeáin amháin"
+
+#: builtin/notes.c
+msgid "report pruned notes"
+msgstr "nótaí gearrtha a thuairisciú"
+
+#: builtin/notes.c
+msgid "notes-ref"
+msgstr "nótairea-tagairt"
+
+#: builtin/notes.c
+msgid "use notes from <notes-ref>"
+msgstr "úsáid nótaí ó <notes-ref>"
+
+#: builtin/notes.c builtin/remote.c parse-options.c
+#, c-format
+msgid "unknown subcommand: `%s'"
+msgstr "fo-ordú anaithnid: `%s'"
+
+#: builtin/pack-objects.c
+msgid "git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"
+msgstr "git pack-objects --stdout [<options>] [< <ref-list> | < <object-list>]"
+
+#: builtin/pack-objects.c
+msgid ""
+"git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"
+msgstr ""
+"git pack-objects [<options>] <base-name> [< <ref-list> | < <object-list>]"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "invalid --name-hash-version option: %d"
+msgstr "rogha neamhbhailí --name-hash-version: %d"
+
+#: builtin/pack-objects.c
+msgid "currently, --write-bitmap-index requires --name-hash-version=1"
+msgstr "faoi láthair, teastaíonn --write-bitmap-index --name-hash-version=1"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"write_reuse_object: could not locate %s, expected at offset %<PRIuMAX> in "
+"pack %s"
+msgstr ""
+"write_reuse_object: níorbh fhéidir %s a aimsiú, bhíothas ag súil leis ag an "
+"bhfritháireamh %<PRIuMAX> sa phacáiste %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "bad packed object CRC for %s"
+msgstr "réad pacáilte dona CRC le haghaidh %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "corrupt packed object for %s"
+msgstr "réad pacáilte truaillithe do %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "recursive delta detected for object %s"
+msgstr "braithíodh delta athfhillteach do réad %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "ordered %u objects, expected %<PRIu32>"
+msgstr "rudaí %u ordaithe, súil leis% <PRIu32>"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "expected object at offset %<PRIuMAX> in pack %s"
+msgstr ""
+"réad a bhíothas ag súil leis ag an bhfritháireamh %<PRIuMAX> sa phacáiste %s"
+
+#: builtin/pack-objects.c
+msgid "disabling bitmap writing, packs are split due to pack.packSizeLimit"
+msgstr ""
+"scríobh bitmap a dhíchumasú, roinntear pacáistí mar gheall ar "
+"pack.packSizeLimit"
+
+#: builtin/pack-objects.c
+msgid "Writing objects"
+msgstr "Rudaí a scríobh"
+
+#: builtin/pack-objects.c builtin/update-index.c
+#, c-format
+msgid "failed to stat %s"
+msgstr "theip ar stát %s"
+
+#: builtin/pack-objects.c object-file.c
+#, c-format
+msgid "failed utime() on %s"
+msgstr "theip ar utime () ar %s"
+
+#: builtin/pack-objects.c
+msgid "failed to write bitmap index"
+msgstr "theip ar innéacs bitmap a scríobh"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "wrote %<PRIu32> objects while expecting %<PRIu32>"
+msgstr "scríobh %<PRIu32> rudaí agus iad ag súil leis %<PRIu32>"
+
+#: builtin/pack-objects.c builtin/repack.c
+msgid "disabling bitmap writing, as some objects are not being packed"
+msgstr "scríobh bitmap a dhíchumasú, toisc nach bhfuil roinnt rudaí á phacáil"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "delta base offset overflow in pack for %s"
+msgstr "forsreabhadh fhritháireamh bonn delta i bpacáiste do %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "delta base offset out of bound for %s"
+msgstr "bonn delta a fhritháireamh as ceangailte do %s"
+
+#: builtin/pack-objects.c
+msgid "Counting objects"
+msgstr "Rud a chomhaireamh"
+
+#: builtin/pack-objects.c pack-bitmap.c
+#, c-format
+msgid "unable to get size of %s"
+msgstr "nach féidir méid %s a fháil"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "unable to parse object header of %s"
+msgstr "nach féidir ceanntásc réad %s a pháirseáil"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "object %s cannot be read"
+msgstr "ní féidir réad %s a léamh"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "object %s inconsistent object length (%<PRIuMAX> vs %<PRIuMAX>)"
+msgstr "fad réada neamhréireach réad %s (%<PRIuMAX> vs %<PRIuMAX>)"
+
+#: builtin/pack-objects.c
+msgid "suboptimal pack - out of memory"
+msgstr "pacáiste suboptimal - as cuimhne"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "Delta compression using up to %d threads"
+msgstr "Comhbhrú Delta ag úsáid suas le snáitheanna %d"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "unable to pack objects reachable from tag %s"
+msgstr "nach féidir rudaí a phacáil inrochtana ó chlib %s"
+
+#: builtin/pack-objects.c commit-graph.c
+#, c-format
+msgid "unable to get type of object %s"
+msgstr "nach féidir cineál réada %s a fháil"
+
+#: builtin/pack-objects.c
+msgid "Compressing objects"
+msgstr "Rudaí comhbhrúite"
+
+#: builtin/pack-objects.c
+msgid "inconsistency with delta count"
+msgstr "neamhréireacht le comhaireamh delta"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "invalid pack.allowPackReuse value: '%s'"
+msgstr "luach pack.allowPackReuse neamhbhailí: '%s'"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"value of uploadpack.blobpackfileuri must be of the form '<object-hash> <pack-"
+"hash> <uri>' (got '%s')"
+msgstr ""
+"<object-hash><pack-hash><uri>caithfidh luach uploadpack.blobpackfileuri a "
+"bheith den fhoirm '' (fuair '%s')"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"object already configured in another uploadpack.blobpackfileuri (got '%s')"
+msgstr ""
+"réad cumraithe cheana féin i uploadpack.blobpackfileuri eile (fuair '%s')"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "could not get type of object %s in pack %s"
+msgstr "ní fhéadfaí cineál réada %s a fháil i bpacáiste %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "could not find pack '%s'"
+msgstr "ní raibh an pacáiste '%s' in ann a aimsiú"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "packfile %s cannot be accessed"
+msgstr "ní féidir teacht ar chomhad pacáiste %s"
+
+#: builtin/pack-objects.c
+msgid "Enumerating cruft objects"
+msgstr "Ag áireamh rudaí cruft"
+
+#: builtin/pack-objects.c
+msgid "unable to add cruft objects"
+msgstr "in ann rudaí cruft a chur leis"
+
+#: builtin/pack-objects.c
+msgid "Traversing cruft objects"
+msgstr "Ag trasnú ar rudaí cruth"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"expected edge object ID, got garbage:\n"
+" %s"
+msgstr ""
+"ag súil le haitheantas réada imeall, fuarthas bruscar:\n"
+"%s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"expected object ID, got garbage:\n"
+" %s"
+msgstr ""
+"aitheantas réada a bhfuil súil leis, fuair truflais:\n"
+" %s"
+
+#: builtin/pack-objects.c reachable.c
+msgid "could not load cruft pack .mtimes"
+msgstr "ní fhéadfaí pacáiste cruft a luchtú .mtimes"
+
+#: builtin/pack-objects.c
+msgid "cannot open pack index"
+msgstr "ní féidir innéacs pacáiste a osc"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "loose object at %s could not be examined"
+msgstr "ní fhéadfaí réad scaoilte ag %s a scrúdú"
+
+#: builtin/pack-objects.c
+msgid "unable to force loose object"
+msgstr "in ann rud scaoilte a chur i bhfeidhm"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "not a rev '%s'"
+msgstr "ní rev '%s'"
+
+#: builtin/pack-objects.c builtin/rev-parse.c
+#, c-format
+msgid "bad revision '%s'"
+msgstr "droch-athbhreithniú '%s'"
+
+#: builtin/pack-objects.c
+msgid "unable to add recent objects"
+msgstr "in ann rudaí le déanaí a chur leis"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "unsupported index version %s"
+msgstr "leagan innéacs neamhthacaithe %s"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "bad index version '%s'"
+msgstr "droch-leagan innéacs '%s'"
+
+#: builtin/pack-objects.c
+msgid "show progress meter during object writing phase"
+msgstr "méadar dul chun cinn a thaispeáint le linn céim sc"
+
+#: builtin/pack-objects.c
+msgid "similar to --all-progress when progress meter is shown"
+msgstr "cosúil le --all-progress nuair a thaispeántar méadar dul chun cinn"
+
+#: builtin/pack-objects.c
+msgid "<version>[,<offset>]"
+msgstr "<version>[,<offset>]"
+
+#: builtin/pack-objects.c
+msgid "write the pack index file in the specified idx format version"
+msgstr "scríobh an comhad innéacs pacáiste sa leagan formáid idx sonraithe"
+
+#: builtin/pack-objects.c
+msgid "maximum size of each output pack file"
+msgstr "uasmhéid gach comhad pacáiste aschuir"
+
+#: builtin/pack-objects.c
+msgid "ignore borrowed objects from alternate object store"
+msgstr "neamhaird a dhéanamh ar rudaí atá ar iasacht ó stór"
+
+#: builtin/pack-objects.c
+msgid "ignore packed objects"
+msgstr "neamhaird a dhéanamh ar earraí"
+
+#: builtin/pack-objects.c
+msgid "limit pack window by objects"
+msgstr "teorainn fuinneog pacáiste de réir rudaí"
+
+#: builtin/pack-objects.c
+msgid "limit pack window by memory in addition to object limit"
+msgstr "teorainn le fuinneog pacáiste de réir chuimhne i dteannta le teorainn"
+
+#: builtin/pack-objects.c
+msgid "maximum length of delta chain allowed in the resulting pack"
+msgstr "fad uasta an slabhra delta a cheadaítear sa phacáiste mar thoradh air"
+
+#: builtin/pack-objects.c
+msgid "reuse existing deltas"
+msgstr "déltaí atá ann cheana a athúsáid"
+
+#: builtin/pack-objects.c
+msgid "reuse existing objects"
+msgstr "athúsáid rudaí atá ann cheana"
+
+#: builtin/pack-objects.c
+msgid "use OFS_DELTA objects"
+msgstr "bain úsáid as rudaí OFS_DELTA"
+
+#: builtin/pack-objects.c
+msgid "use threads when searching for best delta matches"
+msgstr "úsáid snáitheanna agus tú ag cuardach na cluichí delta is fearr"
+
+#: builtin/pack-objects.c
+msgid "do not create an empty pack output"
+msgstr "ná cruthaigh aschur pacáiste folamh"
+
+#: builtin/pack-objects.c
+msgid "read revision arguments from standard input"
+msgstr "léigh argóintí athbhreithnithe ó ionchur"
+
+#: builtin/pack-objects.c
+msgid "limit the objects to those that are not yet packed"
+msgstr "teorainn leis na rudaí dóibh siúd nach bhfuil pacáilte fós"
+
+#: builtin/pack-objects.c
+msgid "include objects reachable from any reference"
+msgstr "áireamh rudaí atá inrochtana ó aon tagairt"
+
+#: builtin/pack-objects.c
+msgid "include objects referred by reflog entries"
+msgstr "áireamh rudaí a dtagraítear ag iontrálacha reflog"
+
+#: builtin/pack-objects.c
+msgid "include objects referred to by the index"
+msgstr "áireamh rudaí dá dtagraíonn an t-innéacs"
+
+#: builtin/pack-objects.c
+msgid "read packs from stdin"
+msgstr "léigh pacáistí ó stdin"
+
+#: builtin/pack-objects.c
+msgid "output pack to stdout"
+msgstr "pacáiste aschuir go stdout"
+
+#: builtin/pack-objects.c
+msgid "include tag objects that refer to objects to be packed"
+msgstr "áireamh rudaí clibeanna a thagraíonn do rudaí atá le pacáil"
+
+#: builtin/pack-objects.c
+msgid "keep unreachable objects"
+msgstr "rudaí nach féidir a choinneáil"
+
+#: builtin/pack-objects.c
+msgid "pack loose unreachable objects"
+msgstr "rudaí scaoilte nach féidir a phacáil"
+
+#: builtin/pack-objects.c
+msgid "unpack unreachable objects newer than <time>"
+msgstr "rudaí nach féidir a dhíphacáil níos nuaí ná <time>"
+
+#: builtin/pack-objects.c
+msgid "create a cruft pack"
+msgstr "cruthaigh pacáiste cruft"
+
+#: builtin/pack-objects.c
+msgid "expire cruft objects older than <time>"
+msgstr "dul in éag rudaí cruft níos sine ná <time>"
+
+#: builtin/pack-objects.c
+msgid "use the sparse reachability algorithm"
+msgstr "úsáid an algartam inrochtaineachta neamhchoitianta"
+
+#: builtin/pack-objects.c
+msgid "create thin packs"
+msgstr "cruthaigh pacáistí tanaí"
+
+#: builtin/pack-objects.c
+msgid "create packs suitable for shallow fetches"
+msgstr "pacáistí a chruthú atá oiriúnach le haghaidh tógá"
+
+#: builtin/pack-objects.c
+msgid "ignore packs that have companion .keep file"
+msgstr "neamhaird a dhéanamh ar phacáistí a bhfuil comhad compánach"
+
+#: builtin/pack-objects.c
+msgid "ignore this pack"
+msgstr "neamhaird a dhéanamh ar an b"
+
+#: builtin/pack-objects.c
+msgid "pack compression level"
+msgstr "leibhéal comhbhrú pacáiste"
+
+#: builtin/pack-objects.c
+msgid "do not hide commits by grafts"
+msgstr "ná déan gealltanais ag grafts i bhfolach"
+
+#: builtin/pack-objects.c
+msgid "use a bitmap index if available to speed up counting objects"
+msgstr ""
+"úsáid innéacs bitmap má tá sé ar fáil chun rudaí a chomhaireamh a bhrostú"
+
+#: builtin/pack-objects.c
+msgid "write a bitmap index together with the pack index"
+msgstr "scríobh innéacs bitmap in éineacht leis an innéacs pacáiste"
+
+#: builtin/pack-objects.c
+msgid "write a bitmap index if possible"
+msgstr "scríobh innéacs bitmap más féidir"
+
+#: builtin/pack-objects.c
+msgid "handling for missing objects"
+msgstr "láimhseáil le haghaidh rudaí atá"
+
+#: builtin/pack-objects.c
+msgid "do not pack objects in promisor packfiles"
+msgstr "ná pacáil rudaí i gcomhaid pacáiste gealltanais"
+
+#: builtin/pack-objects.c
+msgid "implies --missing=allow-any"
+msgstr "tugann le tuiscint --missing=allow-any"
+
+#: builtin/pack-objects.c
+msgid "respect islands during delta compression"
+msgstr "meas ar oileáin le linn comhbhrúite delta"
+
+#: builtin/pack-objects.c
+msgid "protocol"
+msgstr "prótacal"
+
+#: builtin/pack-objects.c
+msgid "exclude any configured uploadpack.blobpackfileuri with this protocol"
+msgstr "eisiamh aon uploadpack.blobpackfileuri cumraithe leis an bprótacal seo"
+
+#: builtin/pack-objects.c
+msgid "use the specified name-hash function to group similar objects"
+msgstr ""
+"bain úsáid as an bhfeidhm sonraithe ainm-hash chun rudaí den chineál céanna a"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "delta chain depth %d is too deep, forcing %d"
+msgstr ""
+"tá doimhneacht slabhra delta %d ró-dhomhain, rud a chuireann iallach ar %d"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid "pack.deltaCacheLimit is too high, forcing %d"
+msgstr "pack.deltaCacheLimit ró-ard, ag cur %d i bhfeidhm"
+
+#: builtin/pack-objects.c config.c
+#, c-format
+msgid "bad pack compression level %d"
+msgstr "leibhéal comhbhrúite droch-phacáiste %d"
+
+#: builtin/pack-objects.c
+msgid "--max-pack-size cannot be used to build a pack for transfer"
+msgstr "Ní féidir --max-pack-size a úsáid chun pacáiste a thógáil le haistriú"
+
+#: builtin/pack-objects.c
+msgid "minimum pack size limit is 1 MiB"
+msgstr "is é teorainn íosta méid an phacáiste ná 1 MiB"
+
+#: builtin/pack-objects.c
+msgid "--thin cannot be used to build an indexable pack"
+msgstr "Ní féidir --thin a úsáid chun pacáiste innéacsaithe a thógáil"
+
+#: builtin/pack-objects.c
+msgid "cannot use --filter with --stdin-packs"
+msgstr "ní féidir --filter a úsáid le --stdin-packs"
+
+#: builtin/pack-objects.c
+msgid "cannot use internal rev list with --stdin-packs"
+msgstr "ní féidir liosta rev inmheánach a úsáid le --stdin-packs"
+
+#: builtin/pack-objects.c
+msgid "cannot use internal rev list with --cruft"
+msgstr "ní féidir liosta rev inmheánach a úsáid le --cruft"
+
+#: builtin/pack-objects.c
+msgid "cannot use --stdin-packs with --cruft"
+msgstr "ní féidir --stdin-packs a úsáid le --cruft"
+
+#: builtin/pack-objects.c
+msgid "Enumerating objects"
+msgstr "Rudaí a chur san áireamh"
+
+#: builtin/pack-objects.c
+#, c-format
+msgid ""
+"Total %<PRIu32> (delta %<PRIu32>), reused %<PRIu32> (delta %<PRIu32>), pack-"
+"reused %<PRIu32> (from %<PRIuMAX>)"
+msgstr ""
+"%<PRIu32> iomlán (delta %<PRIu32>), %<PRIu32> athúsáidte (delta %<PRIu32>), "
+"%<PRIu32> athúsáidte sa phacáiste (ó %<PRIuMAX>)"
+
+#: builtin/pack-redundant.c
+msgid ""
+"'git pack-redundant' is nominated for removal.\n"
+"If you still use this command, please add an extra\n"
+"option, '--i-still-use-this', on the command line\n"
+"and let us know you still use it by sending an e-mail\n"
+"to <git@vger.kernel.org>. Thanks.\n"
+msgstr ""
+"Tá 'git pack-redundant' ainmnithe le baint.\n"
+"Má úsáideann tú an t-ordú seo fós, cuir rogha b\n"
+"hreise, '--i-still-use-this', leis an líne ordaithe \n"
+"agus cuir in iúl dúinn go n-úsáideann tú fós é trí ríomhphost \n"
+"a sheoladh chuig <git@vger.kernel.org>. Go raibh maith agat.\n"
+
+#: builtin/pack-redundant.c
+msgid "refusing to run without --i-still-use-this"
+msgstr "ag diúltú rith gan --i-still-use-this fós"
+
+#: builtin/pack-refs.c
+msgid ""
+"git pack-refs [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude "
+"<pattern>]"
+msgstr ""
+"<pattern><pattern>git pack-refs [--all] [--no-prunes] [--auto] [--include] "
+"[--eisiamh]"
+
+#: builtin/pack-refs.c
+msgid "pack everything"
+msgstr "pacáil gach rud"
+
+#: builtin/pack-refs.c
+msgid "prune loose refs (default)"
+msgstr "briseadh scaoilte (réamhshocraithe)"
+
+#: builtin/pack-refs.c
+msgid "auto-pack refs as needed"
+msgstr "tuairiscintí uathoibríoch pacáiste"
+
+#: builtin/pack-refs.c
+msgid "references to include"
+msgstr "tagairtí lena n-áirítear"
+
+#: builtin/pack-refs.c
+msgid "references to exclude"
+msgstr "tagairtí chun eisiamh"
+
+#: builtin/patch-id.c
+msgid "git patch-id [--stable | --unstable | --verbatim]"
+msgstr "git patch-id [--seasmhach | --éagobhsaí | --verbatim]"
+
+#: builtin/patch-id.c
+msgid "use the unstable patch-id algorithm"
+msgstr "bain úsáid as an algartam paith-id éagobhsaí"
+
+#: builtin/patch-id.c
+msgid "use the stable patch-id algorithm"
+msgstr "bain úsáid as an algartam paith-id cobhsaí"
+
+#: builtin/patch-id.c
+msgid "don't strip whitespace from the patch"
+msgstr "ná tarraingt spás bán ón bpaiste"
+
+#: builtin/prune.c
+msgid "git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]"
+msgstr "<head>git plum [-n] [-v] [--progress] [--dul in éag] [<time>--] [...]"
+
+#: builtin/prune.c
+msgid "report pruned objects"
+msgstr "tuairisciú rudaí gearrtha"
+
+#: builtin/prune.c
+msgid "expire objects older than <time>"
+msgstr "dul in éag rudaí níos sine ná <time>"
+
+#: builtin/prune.c
+msgid "limit traversal to objects outside promisor packfiles"
+msgstr "teorainn a chur ar thrasú le rudaí lasmuigh de phacáiste gealltan"
+
+#: builtin/prune.c
+msgid "cannot prune in a precious-objects repo"
+msgstr "ní féidir le bearradh i repo rudaí luachmhara"
+
+#: builtin/pull.c
+msgid "git pull [<options>] [<repository> [<refspec>...]]"
+msgstr "git pull [<options>] [<repository>[<refspec>...]]"
+
+#: builtin/pull.c
+msgid "control for recursive fetching of submodules"
+msgstr "rialú maidir le fo-mhodúil a fháil athshlánach"
+
+#: builtin/pull.c
+msgid "Options related to merging"
+msgstr "Roghanna a bhaineann le cumasc"
+
+#: builtin/pull.c
+msgid "incorporate changes by rebasing rather than merging"
+msgstr "athruithe a ionchorprú trí athbhunú seachas cumasc"
+
+#: builtin/pull.c builtin/revert.c
+msgid "allow fast-forward"
+msgstr "ligean go tapa ar aghaidh"
+
+#: builtin/pull.c
+msgid "control use of pre-merge-commit and commit-msg hooks"
+msgstr "úsáid crúcaí réamh-chumaisc agus comh-msg a rialú"
+
+#: builtin/pull.c parse-options.h
+msgid "automatically stash/stash pop before and after"
+msgstr "pop a stash/stash go huathoibríoch roimh agus tar éis"
+
+#: builtin/pull.c
+msgid "Options related to fetching"
+msgstr "Roghanna a bhaineann le tarraingt"
+
+#: builtin/pull.c
+msgid "force overwrite of local branch"
+msgstr "forscríobh fórsa ar bhrainse áitiúil"
+
+#: builtin/pull.c
+msgid "number of submodules pulled in parallel"
+msgstr "líon na bhfo-mhodúil tarraingthe go comhthreom"
+
+#: builtin/pull.c parse-options.h
+msgid "use IPv4 addresses only"
+msgstr "bain úsáid as seoltaí IPv4 amháin"
+
+#: builtin/pull.c parse-options.h
+msgid "use IPv6 addresses only"
+msgstr "bain úsáid as seoltaí IPv6 amháin"
+
+#: builtin/pull.c
+msgid ""
+"There is no candidate for rebasing against among the refs that you just "
+"fetched."
+msgstr ""
+"Níl aon iarrthóir ann chun athbhreithniú i measc na n-airíonna a fuair tú "
+"díreach."
+
+#: builtin/pull.c
+msgid ""
+"There are no candidates for merging among the refs that you just fetched."
+msgstr ""
+"Níl aon iarrthóirí ann chun cumasc i measc na gcomharthaí a fuair tú díreach."
+
+#: builtin/pull.c
+msgid ""
+"Generally this means that you provided a wildcard refspec which had no\n"
+"matches on the remote end."
+msgstr ""
+"Go ginearálta ciallaíonn sé seo gur sholáthraíonn tú refspec cárta fiáin "
+"nach raibh aon\n"
+"cluichí ar an gceann iargúlta."
+
+#: builtin/pull.c
+#, c-format
+msgid ""
+"You asked to pull from the remote '%s', but did not specify\n"
+"a branch. Because this is not the default configured remote\n"
+"for your current branch, you must specify a branch on the command line."
+msgstr ""
+"D'iarr tú tarraingt ón iargúlta '%s', ach níor shonraigh tú\n"
+"brainse. Toisc nach é seo an cianda cumraithe réamhshocraithe\n"
+"do bhrainse reatha, ní mór duit brainse a shonrú ar an líne ordaithe."
+
+#: builtin/pull.c builtin/rebase.c
+msgid "You are not currently on a branch."
+msgstr "Níl tú ar bhrainse faoi láthair."
+
+#: builtin/pull.c
+msgid "Please specify which branch you want to rebase against."
+msgstr "Sonraigh le do thoil cén brainse is mian leat a athbhunú ina choinne."
+
+#: builtin/pull.c
+msgid "Please specify which branch you want to merge with."
+msgstr "Sonraigh le do thoil cén brainse is mian leat a chumasc leis."
+
+#: builtin/pull.c
+msgid "See git-pull(1) for details."
+msgstr "Féach git-pull (1) le haghaidh sonraí."
+
+#: builtin/pull.c builtin/rebase.c
+msgid "<remote>"
+msgstr "<remote>"
+
+#: builtin/pull.c scalar.c
+msgid "<branch>"
+msgstr "<branch>"
+
+#: builtin/pull.c builtin/rebase.c
+msgid "There is no tracking information for the current branch."
+msgstr "Níl aon fhaisnéis rianaithe don bhrainse reatha."
+
+#: builtin/pull.c
+msgid ""
+"If you wish to set tracking information for this branch you can do so with:"
+msgstr ""
+"Más mian leat faisnéis rianaithe a shocrú don bhrainse seo is féidir leat é "
+"sin a dhéanamh le:"
+
+#: builtin/pull.c
+#, c-format
+msgid ""
+"Your configuration specifies to merge with the ref '%s'\n"
+"from the remote, but no such ref was fetched."
+msgstr ""
+"Sonraíonn do chumraíocht a chumasc leis an tagairt '%s'\n"
+"ón iargúlta, ach níor faightear aon tagairt den sórt sin."
+
+#: builtin/pull.c
+#, c-format
+msgid "unable to access commit %s"
+msgstr "nach féidir teacht ar thiomantas %s"
+
+#: builtin/pull.c refspec.c
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "refspec neamhbhailí '%s'"
+
+#: builtin/pull.c
+msgid "ignoring --verify-signatures for rebase"
+msgstr "ag neamhaird --verify-signatures le haghaidh athbhunú"
+
+#: builtin/pull.c
+msgid ""
+"You have divergent branches and need to specify how to reconcile them.\n"
+"You can do so by running one of the following commands sometime before\n"
+"your next pull:\n"
+"\n"
+" git config pull.rebase false # merge\n"
+" git config pull.rebase true # rebase\n"
+" git config pull.ff only # fast-forward only\n"
+"\n"
+"You can replace \"git config\" with \"git config --global\" to set a "
+"default\n"
+"preference for all repositories. You can also pass --rebase, --no-rebase,\n"
+"or --ff-only on the command line to override the configured default per\n"
+"invocation.\n"
+msgstr ""
+"Tá brainsí éagsúla agat agus ní mór duit a shonrú conas iad a réiteach.\n"
+"Is féidir leat é sin a dhéanamh trí cheann de na horduithe seo a leanas a "
+"reáchtáil rud éigin\n"
+"do chéad tarraingt eile:\n"
+"\n"
+" git config pull.rebase false # cumaisc\n"
+" git config pull.rebase true # rebase\n"
+" git config pull.ff only # tapa ar aghaidh amháin\n"
+"\n"
+"Is féidir leat “git config --global” a chur in ionad “git config” chun "
+"réamhshocrú a shocrú\n"
+"rogha do gach stórais. Is féidir leat pas a chur freisin --rebase, --no-"
+"rebase,\n"
+"nó --ff-only ar an líne ordaithe chun an réamhshocrú cumraithe in aghaidh a "
+"shárú\n"
+"ionghairm.\n"
+
+#: builtin/pull.c
+msgid "Updating an unborn branch with changes added to the index."
+msgstr "Brainse breithe a nuashonrú le hathruithe curtha leis an innéacs."
+
+#: builtin/pull.c
+msgid "pull with rebase"
+msgstr "tarraing le rebase"
+
+#: builtin/pull.c builtin/rebase.c
+msgid "Please commit or stash them."
+msgstr "Déan iad a thiomantas nó a stóráil le do thoil."
+
+#: builtin/pull.c
+#, c-format
+msgid ""
+"fetch updated the current branch head.\n"
+"fast-forwarding your working tree from\n"
+"commit %s."
+msgstr ""
+"nuashonraigh teacht ceann an bhrainse reatha.\n"
+"do chrann oibre a chur ar aghaidh go tapa ó\n"
+"tiomantas %s."
+
+#: builtin/pull.c
+#, c-format
+msgid ""
+"Cannot fast-forward your working tree.\n"
+"After making sure that you saved anything precious from\n"
+"$ git diff %s\n"
+"output, run\n"
+"$ git reset --hard\n"
+"to recover."
+msgstr ""
+"Ní féidir do chrann oibre a chur ar aghaidh a thosú.\n"
+"Tar éis duit a chinntiú gur shábháil tú aon rud luachmhar ó\n"
+"$ git diff %s\n"
+"aschur, rith\n"
+"$ git reset --hard\n"
+"chun aisghabháil."
+
+#: builtin/pull.c
+msgid "Cannot merge multiple branches into empty head."
+msgstr "Ní féidir brainsí iomadúla a chumasc i gceann folamh."
+
+#: builtin/pull.c
+msgid "Cannot rebase onto multiple branches."
+msgstr "Ní féidir athbhunú ar iliomad brainsí."
+
+#: builtin/pull.c
+msgid "Cannot fast-forward to multiple branches."
+msgstr "Ní féidir dul ar aghaidh go tapa go brainsí iolracha."
+
+#: builtin/pull.c
+msgid "Need to specify how to reconcile divergent branches."
+msgstr "Ní mór a shonrú conas brainsí éagsúla a réiteach."
+
+#: builtin/pull.c
+msgid "cannot rebase with locally recorded submodule modifications"
+msgstr "ní féidir athbhunú le modhnuithe fo-mhodúil atá taifeadta"
+
+#: builtin/push.c
+msgid "git push [<options>] [<repository> [<refspec>...]]"
+msgstr "git push [<roghanna>] [<stóras> [<refspec>...]]"
+
+#: builtin/push.c
+msgid "tag shorthand without <tag>"
+msgstr "gearrthand clib gan <tag>"
+
+#: builtin/push.c
+msgid "--delete only accepts plain target ref names"
+msgstr "--delete ní ghlacann sé ach le hainmneacha tagartha sprice simplí"
+
+#: builtin/push.c
+msgid ""
+"\n"
+"To choose either option permanently, see push.default in 'git help config'.\n"
+msgstr ""
+"\n"
+"Chun ceachtar rogha a roghnú go buan, féach push.default i 'git help "
+"config'.\n"
+
+#: builtin/push.c
+msgid ""
+"\n"
+"To avoid automatically configuring an upstream branch when its name\n"
+"won't match the local branch, see option 'simple' of branch.autoSetupMerge\n"
+"in 'git help config'.\n"
+msgstr ""
+"\n"
+"Chun brainse suas srutha a chumrú go huathoibríoch a sheachaint nuair a\n"
+"ní mheaitseoidh sé leis an mbrainse áitiúil, féach an rogha 'simplí' de "
+"branch.autoSetupMerge\n"
+"i 'git help config'.\n"
+
+#: builtin/push.c
+#, c-format
+msgid ""
+"The upstream branch of your current branch does not match\n"
+"the name of your current branch. To push to the upstream branch\n"
+"on the remote, use\n"
+"\n"
+" git push %s HEAD:%s\n"
+"\n"
+"To push to the branch of the same name on the remote, use\n"
+"\n"
+" git push %s HEAD\n"
+"%s%s"
+msgstr ""
+"Ní mheaitseálann an brainse suas srutha de do bhrainse reatha\n"
+"ainm do bhrainse reatha. Chun brú go dtí an bhrainse suas srutha\n"
+"ar an iargúlta, bain úsáid as\n"
+"\n"
+" git push %s HEAD:%s\n"
+"\n"
+"Chun brú chuig an mbrainse den ainm céanna ar an iargúlta, bain úsáid as\n"
+"\n"
+" git push %s HEAD\n"
+"%s%s"
+
+#: builtin/push.c
+#, c-format
+msgid ""
+"You are not currently on a branch.\n"
+"To push the history leading to the current (detached HEAD)\n"
+"state now, use\n"
+"\n"
+" git push %s HEAD:<name-of-remote-branch>\n"
+msgstr ""
+"Níl tú ar bhrainse faoi láthair.\n"
+"Chun an stair a bhrú mar thoradh ar an gceann reatha (CEAD scoite)\n"
+"stát anois, bain úsáid as\n"
+"\n"
+" git push %s HEAD:<ainm-na-brainse-cianda>\n"
+
+#: builtin/push.c
+msgid ""
+"\n"
+"To have this happen automatically for branches without a tracking\n"
+"upstream, see 'push.autoSetupRemote' in 'git help config'.\n"
+msgstr ""
+"\n"
+"Chun é seo a tharlóidh go huathoibríoch do bhrainsí gan rianú\n"
+"suas sruth, féach 'push.autoSetupRemote' i 'git help config'.\n"
+
+#: builtin/push.c
+#, c-format
+msgid ""
+"The current branch %s has no upstream branch.\n"
+"To push the current branch and set the remote as upstream, use\n"
+"\n"
+" git push --set-upstream %s %s\n"
+"%s"
+msgstr ""
+"Níl brainse suas srutha ag an mbrainse reatha %s.\n"
+"Chun an brainse reatha a bhrú agus an iargúlta a shocrú mar thuas an sruth, "
+"bain úsáid as\n"
+"\n"
+" git push --set-upstream %s %s\n"
+"%s"
+
+#: builtin/push.c
+#, c-format
+msgid "The current branch %s has multiple upstream branches, refusing to push."
+msgstr ""
+"Tá brainsí iolracha suas srutha ag an mbrainse reatha %s, ag diúltú brú."
+
+#: builtin/push.c
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+"Níor shonraigh tú aon refspec le brú, agus is é push.default “rud ar bith”."
+
+#: builtin/push.c
+#, c-format
+msgid ""
+"You are pushing to remote '%s', which is not the upstream of\n"
+"your current branch '%s', without telling me what to push\n"
+"to update which remote branch."
+msgstr ""
+"Tá tú ag brú chuig '%s' iargúlta, nach bhfuil suas sruth\n"
+"do bhrainse reatha '%s', gan insint liom cad ba cheart a bhrú\n"
+"chun an brainse iargúlta a nuashonrú."
+
+#: builtin/push.c
+msgid ""
+"Updates were rejected because the tip of your current branch is behind\n"
+"its remote counterpart. If you want to integrate the remote changes,\n"
+"use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
+msgstr ""
+"Diúltaíodh nuashonruithe toisc go bhfuil barr do bhrainse reatha taobh thiar "
+"de\n"
+"a mhacasamhail iargúlta. Más mian leat na hathruithe iargúlta a "
+"chomhtháthú,\n"
+"bain úsáid as 'git pull' sula mbrú arís.\n"
+"Féach an 'Nóta faoi fast-forward 'i 'git push --help' le haghaidh sonraí."
+
+#: builtin/push.c
+msgid ""
+"Updates were rejected because a pushed branch tip is behind its remote\n"
+"counterpart. If you want to integrate the remote changes, use 'git pull'\n"
+"before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
+msgstr ""
+"Diúltaíodh nuashonruithe toisc go bhfuil barr brainse brúite taobh thiar dá\n"
+"comhghleacaí. Más mian leat na hathruithe iargúlta a chomhtháthú, bain úsáid "
+"as 'git pull'\n"
+"sula ndéantar é a bhrú arís.\n"
+"Féach an 'Nóta faoi fast-forward 'i 'git push --help' le haghaidh sonraí."
+
+#: builtin/push.c
+msgid ""
+"Updates were rejected because the remote contains work that you do not\n"
+"have locally. This is usually caused by another repository pushing to\n"
+"the same ref. If you want to integrate the remote changes, use\n"
+"'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
+msgstr ""
+"Diúltaíodh nuashonruithe toisc go bhfuil obair nach ndéanann tú san "
+"iargúlta\n"
+"a bheith agat go háitiúil. De ghnáth bíonn stór eile ag brú chuig seo\n"
+"an tagairt chéanna. Más mian leat na hathruithe iargúlta a chomhtháthú, bain "
+"úsáid as\n"
+"'git tarraing' sula ndéantar é a bhrú arís.\n"
+"Féach an 'Nóta faoi fast-forward 'i 'git push --help' le haghaidh sonraí."
+
+#: builtin/push.c
+msgid "Updates were rejected because the tag already exists in the remote."
+msgstr ""
+"Diúltaíodh nuashonruithe toisc go bhfuil an clib ann cheana féin sa iargúlta."
+
+#: builtin/push.c
+msgid ""
+"You cannot update a remote ref that points at a non-commit object,\n"
+"or update a remote ref to make it point at a non-commit object,\n"
+"without using the '--force' option.\n"
+msgstr ""
+"Ní féidir leat tagairt iargúlta a nuashonrú a chuireann in iúl ar réad neamh-"
+"thiomanta,\n"
+"nó tagairt iargúlta a nuashonrú chun é a chur in iúl ar réad neamh-"
+"thiomanta,\n"
+"gan an rogha '--force' a úsáid.\n"
+
+#: builtin/push.c
+msgid ""
+"Updates were rejected because the tip of the remote-tracking branch has\n"
+"been updated since the last checkout. If you want to integrate the\n"
+"remote changes, use 'git pull' before pushing again.\n"
+"See the 'Note about fast-forwards' in 'git push --help' for details."
+msgstr ""
+"Diúltaíodh nuashonruithe toisc go bhfuil barr na brainse cianrianaithe\n"
+"nuashonraíodh ón tseiceáil deireanach. Más mian leat an\n"
+"athruithe iargúlta, bain úsáid as 'git pull' sula mbrú arís.\n"
+"Féach an 'Nóta faoi fast-forward 'i 'git push --help' le haghaidh sonraí."
+
+#: builtin/push.c
+#, c-format
+msgid "Pushing to %s\n"
+msgstr "Ag brú chuig %s\n"
+
+#: builtin/push.c
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr "theip ar roinnt réimsí a bhrú chuig '%s'"
+
+#: builtin/push.c
+msgid ""
+"recursing into submodule with push.recurseSubmodules=only; using on-demand "
+"instead"
+msgstr ""
+"athfhillteach isteach i bhfo-mhodúl le push.recurseSubmodules=only; ag baint "
+"úsáide as ar-éileamh ina ionad"
+
+#: builtin/push.c builtin/send-pack.c submodule-config.c
+#, c-format
+msgid "invalid value for '%s'"
+msgstr "luach neamhbhailí do '%s'"
+
+#: builtin/push.c builtin/submodule--helper.c
+msgid "repository"
+msgstr "stóras"
+
+#: builtin/push.c
+msgid "push all branches"
+msgstr "brúigh gach brainse"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "mirror all refs"
+msgstr "scáthán gach ceann"
+
+#: builtin/push.c
+msgid "delete refs"
+msgstr "scrios réimsí"
+
+#: builtin/push.c
+msgid "push tags (can't be used with --all or --branches or --mirror)"
+msgstr ""
+"clibeanna brú (ní féidir iad a úsáid le --all nó --branches nó --mirror)"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "force updates"
+msgstr "nuashonruithe fórsa"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "<refname>:<expect>"
+msgstr "<refname>:<expect>"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "require old value of ref to be at this value"
+msgstr "a cheangal go mbeadh seanluach an tagartha ag an luach seo"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "require remote updates to be integrated locally"
+msgstr "éilíonn go ndéanfaí nuashonruithe iargúlta"
+
+#: builtin/push.c
+msgid "control recursive pushing of submodules"
+msgstr "brú athfhillteach ar fho-mhodúil a rialú"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "use thin pack"
+msgstr "bain úsáid as pacáiste tanaí"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "receive pack program"
+msgstr "clár pacáiste a fháil"
+
+#: builtin/push.c
+msgid "set upstream for git pull/status"
+msgstr "socraigh suas sruth le haghaidh tarraing/stádas git"
+
+#: builtin/push.c
+msgid "prune locally removed refs"
+msgstr "gearradh a bhaintear go háitiúil"
+
+#: builtin/push.c
+msgid "bypass pre-push hook"
+msgstr "seachbhóthar crúca réamh"
+
+#: builtin/push.c
+msgid "push missing but relevant tags"
+msgstr "clibeanna atá ar iarraidh ach ábhartha a"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "GPG sign the push"
+msgstr "Síníonn GPG an brú"
+
+#: builtin/push.c builtin/send-pack.c
+msgid "request atomic transaction on remote side"
+msgstr "iarraidh idirbheart adamach ar an taobh iargúl"
+
+#: builtin/push.c
+msgid "--delete doesn't make sense without any refs"
+msgstr "--delete níl ciall leis gan aon réiteoirí"
+
+#: builtin/push.c t/helper/test-bundle-uri.c
+#, c-format
+msgid "bad repository '%s'"
+msgstr "droch-stóras '%s'"
+
+#: builtin/push.c
+msgid ""
+"No configured push destination.\n"
+"Either specify the URL from the command-line or configure a remote "
+"repository using\n"
+"\n"
+" git remote add <name> <url>\n"
+"\n"
+"and then push using the remote name\n"
+"\n"
+" git push <name>\n"
+msgstr ""
+"Gan aon cheann scríbe brúite cumraithe.\n"
+"Sonraigh an URL ón líne ordaithe nó cumraigh stór iargúlta ag baint úsáide "
+"as\n"
+"\n"
+" git remote add <name> <url>\n"
+"\n"
+"agus ansin brúigh ag úsáid an ainm iargúlta\n"
+"\n"
+" git push <ainm>\n"
+
+#: builtin/push.c
+msgid "--all can't be combined with refspecs"
+msgstr "--all ní féidir é a chomhcheangal le refspecs"
+
+#: builtin/push.c
+msgid "--mirror can't be combined with refspecs"
+msgstr "--mirror ní féidir é a chomhcheangal le refspecs"
+
+#: builtin/push.c
+msgid "push options must not have new line characters"
+msgstr "ní chóir go mbeadh carachtair líne nua ag roghanna brú"
+
+#: builtin/range-diff.c
+msgid "git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"
+msgstr "git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"
+
+#: builtin/range-diff.c
+msgid "git range-diff [<options>] <old-tip>...<new-tip>"
+msgstr "git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"
+
+#: builtin/range-diff.c
+msgid "git range-diff [<options>] <base> <old-tip> <new-tip>"
+msgstr "git range-diff [<options>] <base> <old-tip> <new-tip>"
+
+#: builtin/range-diff.c
+msgid "use simple diff colors"
+msgstr "bain úsáid as dathanna diff simplí"
+
+#: builtin/range-diff.c
+msgid "notes"
+msgstr "nótaí"
+
+#: builtin/range-diff.c
+msgid "passed to 'git log'"
+msgstr "cuireadh chuig 'git log'"
+
+#: builtin/range-diff.c
+msgid "only emit output related to the first range"
+msgstr "ní scaoileann ach aschur a bhaineann leis an gcéad raon"
+
+#: builtin/range-diff.c
+msgid "only emit output related to the second range"
+msgstr "ní scaoileann ach aschur a bhaineann leis an dara raon"
+
+#: builtin/range-diff.c
+#, c-format
+msgid "not a revision: '%s'"
+msgstr "ní athbhreithniú: '%s'"
+
+#: builtin/range-diff.c
+#, c-format
+msgid "not a commit range: '%s'"
+msgstr "ní raon tiomanta: '%s'"
+
+#: builtin/range-diff.c
+#, c-format
+msgid "not a symmetric range: '%s'"
+msgstr "ní raon siméadrach: '%s'"
+
+#: builtin/range-diff.c
+msgid "need two commit ranges"
+msgstr "dhá raon tiomanta ag teastáil"
+
+#: builtin/read-tree.c
+msgid ""
+"git read-tree [(-m [--trivial] [--aggressive] | --reset | --"
+"prefix=<prefix>)\n"
+" [-u | -i]] [--index-output=<file>] [--no-sparse-checkout]\n"
+" (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"
+msgstr ""
+"git read-tree [(-m [--trivial] [--aggressive] | --reset | --"
+"prefix=<prefix>)\n"
+" [-u | -i]] [--index-output=<file>] [--no-sparse-checkout]\n"
+" (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"
+
+#: builtin/read-tree.c
+msgid "write resulting index to <file>"
+msgstr "scríobh innéacs mar thoradh air go <file>"
+
+#: builtin/read-tree.c
+msgid "only empty the index"
+msgstr "ach an t-innéacs a fholmhú"
+
+#: builtin/read-tree.c
+msgid "Merging"
+msgstr "Cumaisc"
+
+#: builtin/read-tree.c
+msgid "perform a merge in addition to a read"
+msgstr "cumaisc a dhéanamh i dteannta le léamh"
+
+#: builtin/read-tree.c
+msgid "3-way merge if no file level merging required"
+msgstr "Cumaisc trí bhealach mura gá cumasc leibhéal comhaid"
+
+#: builtin/read-tree.c
+msgid "3-way merge in presence of adds and removes"
+msgstr "Cumaisc 3 bhealach i láthair breiseanna agus bainteanna"
+
+#: builtin/read-tree.c
+msgid "same as -m, but discard unmerged entries"
+msgstr "mar an gcéanna le -m, ach caith iontrálacha neamh-chumhdaithe"
+
+#: builtin/read-tree.c
+msgid "<subdirectory>/"
+msgstr "<subdirectory>/"
+
+#: builtin/read-tree.c
+msgid "read the tree into the index under <subdirectory>/"
+msgstr "léigh an crann isteach san innéacs faoi<subdirectory>/"
+
+#: builtin/read-tree.c
+msgid "update working tree with merge result"
+msgstr "crann oibre a nuashonrú le toradh cumaisc"
+
+#: builtin/read-tree.c
+msgid "gitignore"
+msgstr "gignor"
+
+#: builtin/read-tree.c
+msgid "allow explicitly ignored files to be overwritten"
+msgstr "ligean do chomhaid a dhéantar neamhaird air go sainrá"
+
+#: builtin/read-tree.c
+msgid "don't check the working tree after merging"
+msgstr "ná seiceáil an crann oibre tar éis a chumasc"
+
+#: builtin/read-tree.c
+msgid "don't update the index or the work tree"
+msgstr "ná nuashonraigh an t-innéacs nó an crann oibre"
+
+#: builtin/read-tree.c
+msgid "skip applying sparse checkout filter"
+msgstr "scipeáil scagaire seiceála neamhchoitianta a"
+
+#: builtin/read-tree.c
+msgid "debug unpack-trees"
+msgstr "crainn díphacáilte a dhífhabhtú"
+
+#: builtin/read-tree.c
+msgid "suppress feedback messages"
+msgstr "teachtaireachtaí aiseolais"
+
+#: builtin/read-tree.c
+msgid "You need to resolve your current index first"
+msgstr "Ní mór duit d'innéacs reatha a réiteach ar dtús"
+
+#: builtin/rebase.c
+msgid ""
+"git rebase [-i] [options] [--exec <cmd>] [--onto <newbase> | --keep-base] "
+"[<upstream> [<branch>]]"
+msgstr ""
+"<upstream><branch>git rebase [-i] [roghanna] [--exec<cmd>] [--onto "
+"<newbase>| --keep-base] [[]]"
+
+#: builtin/rebase.c
+msgid ""
+"git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]"
+msgstr ""
+"<newbase><branch>git rebase [-i] [roghanna] [--exec] [-- <cmd>onto] --root []"
+
+#: builtin/rebase.c sequencer.c
+#, c-format
+msgid "could not read '%s'."
+msgstr "ní raibh '%s' in ann a léamh."
+
+#: builtin/rebase.c
+#, c-format
+msgid "could not create temporary %s"
+msgstr "ní fhéadfaí %s sealadach a chruthú"
+
+#: builtin/rebase.c
+msgid "could not mark as interactive"
+msgstr "ní fhéadfaí marcáil mar idirghníomh"
+
+#: builtin/rebase.c
+msgid "could not generate todo list"
+msgstr "ní raibh in ann liosta todo a ghiniúint"
+
+#: builtin/rebase.c
+msgid "a base commit must be provided with --upstream or --onto"
+msgstr "caithfear gealltanas bonn a sholáthar le --upstream nó --onto"
+
+#: builtin/rebase.c
+#, c-format
+msgid "%s requires the merge backend"
+msgstr "Teastaíonn %s an cúltaca cumaisc"
+
+#: builtin/rebase.c
+#, c-format
+msgid "invalid onto: '%s'"
+msgstr "neamhbhailí ar: '%s'"
+
+#: builtin/rebase.c
+#, c-format
+msgid "invalid orig-head: '%s'"
+msgstr "orig-head neamhbhailí: '%s'"
+
+#: builtin/rebase.c
+#, c-format
+msgid "ignoring invalid allow_rerere_autoupdate: '%s'"
+msgstr "neamhaird a dhéanamh de allow_rerere_autoupdate neamhbhailí: '%s'"
+
+#: builtin/rebase.c builtin/rm.c sequencer.c
+#, c-format
+msgid "could not remove '%s'"
+msgstr "ní fhéadfaí '%s' a bhaint"
+
+#: builtin/rebase.c
+#, c-format
+msgid ""
+"\n"
+"git encountered an error while preparing the patches to replay\n"
+"these revisions:\n"
+"\n"
+" %s\n"
+"\n"
+"As a result, git cannot rebase them."
+msgstr ""
+"\n"
+"Bhí earráid ag git agus é ag ullmhú na paistí chun athsheinm\n"
+"na hathbhreithnithe seo:\n"
+"\n"
+" %s\n"
+"\n"
+"Mar thoradh air sin, ní féidir le git iad a athbhunú."
+
+#: builtin/rebase.c
+#, c-format
+msgid "Unknown rebase-merges mode: %s"
+msgstr "Modh rebase-chumaisc anaithnid: %s"
+
+#: builtin/rebase.c
+#, c-format
+msgid "could not switch to %s"
+msgstr "ní fhéadfaí aistriú go %s"
+
+#: builtin/rebase.c
+msgid "apply options and merge options cannot be used together"
+msgstr "roghanna i bhfeidhm agus ní féidir roghanna cumaisc a úsáid le chéile"
+
+#: builtin/rebase.c
+msgid "--empty=ask is deprecated; use '--empty=stop' instead."
+msgstr "Tá --empty=ask díscríofa; bain úsáid as '--empty=stop' ina ionad."
+
+#: builtin/rebase.c
+#, c-format
+msgid ""
+"unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and "
+"\"stop\"."
+msgstr ""
+"cineál folamh gan aithint '%s'; is iad na luachanna bailí ná “drop”, “keep”, "
+"agus “stop”."
+
+#: builtin/rebase.c
+msgid ""
+"--rebase-merges with an empty string argument is deprecated and will stop "
+"working in a future version of Git. Use --rebase-merges without an argument "
+"instead, which does the same thing."
+msgstr ""
+"Tá --rebase-merges le argóint teaghrán folamh míshuanta agus stopfaidh sé ag "
+"obair i leagan amach anseo de Git. Úsáid --rebase-merges gan argóint ina "
+"ionad sin, a dhéanann an rud céanna."
+
+#: builtin/rebase.c
+#, c-format
+msgid ""
+"%s\n"
+"Please specify which branch you want to rebase against.\n"
+"See git-rebase(1) for details.\n"
+"\n"
+" git rebase '<branch>'\n"
+"\n"
+msgstr ""
+"%s\n"
+"Sonraigh le do thoil cén brainse ar mhaith leat athbhunú ina choinne.\n"
+"Féach git-rebase(1) le haghaidh sonraí.\n"
+"\n"
+"git rebase '<brainse>'\n"
+"\n"
+
+#: builtin/rebase.c
+#, c-format
+msgid ""
+"If you wish to set tracking information for this branch you can do so with:\n"
+"\n"
+" git branch --set-upstream-to=%s/<branch> %s\n"
+"\n"
+msgstr ""
+"Más mian leat faisnéis rianaithe a shocrú don bhrainse seo is féidir leat é "
+"sin a dhéanamh le:\n"
+"\n"
+" git branch --set-upstream-to=%s/<branch> %s\n"
+"\n"
+
+#: builtin/rebase.c
+msgid "exec commands cannot contain newlines"
+msgstr "ní féidir línte nua a bheith ag orduithe exec"
+
+#: builtin/rebase.c
+msgid "empty exec command"
+msgstr "ordú exec folamh"
+
+#: builtin/rebase.c
+msgid "rebase onto given branch instead of upstream"
+msgstr "athbhunú ar an mbrainse ar leith in ionad suas an sruth"
+
+#: builtin/rebase.c
+msgid "use the merge-base of upstream and branch as the current base"
+msgstr "bain úsáid as bonn cumaisc suas sruth agus brainse mar an bonn reatha"
+
+#: builtin/rebase.c
+msgid "allow pre-rebase hook to run"
+msgstr "ligean do chrúca réamh-athbhunaithe rith"
+
+#: builtin/rebase.c
+msgid "be quiet. implies --no-stat"
+msgstr "a bheith ciúin. tugann le tuiscint --no-stat"
+
+#: builtin/rebase.c
+msgid "display a diffstat of what changed upstream"
+msgstr "taispeáint diffstat den rud a d'athraigh suas an sruth"
+
+#: builtin/rebase.c
+msgid "do not show diffstat of what changed upstream"
+msgstr "ná taispeáin diffstat den mhéid a d'athraigh suas an sruth"
+
+#: builtin/rebase.c
+msgid "add a Signed-off-by trailer to each commit"
+msgstr "cuir leantóir sínithe le gach tiomantas"
+
+#: builtin/rebase.c
+msgid "make committer date match author date"
+msgstr "dáta an údair comhoiriúnaithe dáta a dhéanamh"
+
+#: builtin/rebase.c
+msgid "ignore author date and use current date"
+msgstr "neamhaird a dhéanamh ar dháta údair agus bain úsáid as"
+
+#: builtin/rebase.c
+msgid "synonym of --reset-author-date"
+msgstr "comhchiallach de --reset-author-date"
+
+#: builtin/rebase.c
+msgid "passed to 'git apply'"
+msgstr "cuireadh chuig 'git apply'"
+
+#: builtin/rebase.c
+msgid "ignore changes in whitespace"
+msgstr "neamhaird a dhéanamh ar athruithe i spás bán"
+
+#: builtin/rebase.c
+msgid "cherry-pick all commits, even if unchanged"
+msgstr "roghnaigh silíní gach gealltanas, fiú mura bhfuil gan athrú"
+
+#: builtin/rebase.c
+msgid "continue"
+msgstr "leanúint"
+
+#: builtin/rebase.c
+msgid "skip current patch and continue"
+msgstr "scipeáil an paiste reatha agus lean ar aghaidh"
+
+#: builtin/rebase.c
+msgid "abort and check out the original branch"
+msgstr "déan deireadh a chur agus seiceáil ar an mbrainse bunaidh"
+
+#: builtin/rebase.c
+msgid "abort but keep HEAD where it is"
+msgstr "déan deireadh ach coinnigh CEAD san áit a bhfuil sé"
+
+#: builtin/rebase.c
+msgid "edit the todo list during an interactive rebase"
+msgstr "cuir an liosta todo in eagar le linn athbhunú idirghníomhach"
+
+#: builtin/rebase.c
+msgid "show the patch file being applied or merged"
+msgstr "taispeáin an comhad paiste atá á chur i bhfeidhm nó á chumas"
+
+#: builtin/rebase.c
+msgid "use apply strategies to rebase"
+msgstr "úsáid straitéisí i bhfeidhm chun athbhunú"
+
+#: builtin/rebase.c
+msgid "use merging strategies to rebase"
+msgstr "straitéisí cumaisc a úsáid chun athbhunú"
+
+#: builtin/rebase.c
+msgid "let the user edit the list of commits to rebase"
+msgstr "lig don úsáideoir liosta na dtiomantas a athbhunú a chur in eagar"
+
+#: builtin/rebase.c
+msgid "(REMOVED) was: try to recreate merges instead of ignoring them"
+msgstr ""
+"(Bainte) a bhí: déan iarracht cumaisc a athchruthú in ionad neamhaird a "
+"dhéanamh orthu"
+
+#: builtin/rebase.c builtin/revert.c
+msgid "how to handle commits that become empty"
+msgstr "conas gealltanais a éiríonn folamh a láimhseáil"
+
+#: builtin/rebase.c
+msgid "keep commits which start empty"
+msgstr "coinnigh gealltanais a thosaíonn folamh"
+
+#: builtin/rebase.c
+msgid "move commits that begin with squash!/fixup! under -i"
+msgstr "gealltanna gluaiseachta a thosaíonn le squash! /socrú! faoi -i"
+
+#: builtin/rebase.c
+msgid "update branches that point to commits that are being rebased"
+msgstr "brainsí a nuashonrú a thugann in iúl do ghealltanais atá á athbhunú"
+
+#: builtin/rebase.c
+msgid "add exec lines after each commit of the editable list"
+msgstr ""
+"línte exec a chur leis tar éis gach tiomantas den liosta in-eagarthóireachta"
+
+#: builtin/rebase.c
+msgid "allow rebasing commits with empty messages"
+msgstr "ligean do thiomantas a athbhunú le teachtaireachtaí folamh"
+
+#: builtin/rebase.c
+msgid "try to rebase merges instead of skipping them"
+msgstr "déan iarracht cumaisc a athbhunú in ionad iad a scipeáil"
+
+#: builtin/rebase.c
+msgid "use 'merge-base --fork-point' to refine upstream"
+msgstr "bain úsáid as 'merge-base --fork-point' chun suas an sruth a bheachtú"
+
+#: builtin/rebase.c
+msgid "use the given merge strategy"
+msgstr "bain úsáid as an straitéis cumaisc tugtha"
+
+#: builtin/rebase.c builtin/revert.c
+msgid "option"
+msgstr "rogha"
+
+#: builtin/rebase.c
+msgid "pass the argument through to the merge strategy"
+msgstr "an argóint a chur ar aghaidh chuig an straitéis cumaisc"
+
+#: builtin/rebase.c
+msgid "rebase all reachable commits up to the root(s)"
+msgstr ""
+"athbhunú gach gealltanas inrochtana suas go dtí an fhréamh/na fréamhacha"
+
+#: builtin/rebase.c
+msgid "automatically re-schedule any `exec` that fails"
+msgstr "athsceidealú go huathoibríoch aon `executaithe' a the"
+
+#: builtin/rebase.c
+msgid "apply all changes, even those already present upstream"
+msgstr "gach athrú a chur i bhfeidhm, fiú iad siúd atá i láthair suas an"
+
+#: builtin/rebase.c
+msgid "It looks like 'git am' is in progress. Cannot rebase."
+msgstr "Is cosúil go bhfuil 'git am' ar siúl. Ní féidir athbhunú."
+
+#: builtin/rebase.c
+msgid ""
+"`rebase --preserve-merges` (-p) is no longer supported.\n"
+"Use `git rebase --abort` to terminate current rebase.\n"
+"Or downgrade to v2.33, or earlier, to complete the rebase."
+msgstr ""
+"Ní thacaítear le `rebase --preserve-merges` (-p) a thuilleadh.\n"
+"Úsáid `git rebase --abort` chun rebase reatha a fhoirceannadh.\n"
+"Nó íosghrádú go v2.33, nó níos luaithe, chun an athbhunú a chur i gcrích."
+
+#: builtin/rebase.c
+msgid ""
+"--preserve-merges was replaced by --rebase-merges\n"
+"Note: Your `pull.rebase` configuration may also be set to 'preserve',\n"
+"which is no longer supported; use 'merges' instead"
+msgstr ""
+"Cuireadh --preserve-merges in ionad --rebase-merges\n"
+"Nóta: Féadfar do chumraíocht `pull.rebase` a shocrú chun 'caomhnú' freisin,\n"
+"nach dtacaítear leis a thuilleadh; bain úsáid as 'cumaisc' ina ionad"
+
+#: builtin/rebase.c
+msgid "no rebase in progress"
+msgstr "níl aon athbhunú ar siúl"
+
+#: builtin/rebase.c
+msgid "The --edit-todo action can only be used during interactive rebase."
+msgstr ""
+"Ní féidir an gníomh --edit-todo a úsáid ach le linn athbhunú idirghníomhach."
+
+#: builtin/rebase.c
+msgid "Cannot read HEAD"
+msgstr "Ní féidir HEAD a léamh"
+
+#: builtin/rebase.c
+msgid ""
+"You must edit all merge conflicts and then\n"
+"mark them as resolved using git add"
+msgstr ""
+"Ní mór duit gach coinbhleacht cumaisc a chur in eagar agus ansin\n"
+"iad a mharcáil mar réitigh ag úsáid git add"
+
+#: builtin/rebase.c
+msgid "could not discard worktree changes"
+msgstr "ní fhéadfadh athruithe crann oibre a dhiúscairt"
+
+#: builtin/rebase.c
+#, c-format
+msgid "could not move back to %s"
+msgstr "ní fhéadfaí bogadh ar ais chuig %s"
+
+#: builtin/rebase.c
+#, c-format
+msgid ""
+"It seems that there is already a %s directory, and\n"
+"I wonder if you are in the middle of another rebase. If that is the\n"
+"case, please try\n"
+"\t%s\n"
+"If that is not the case, please\n"
+"\t%s\n"
+"and run me again. I am stopping in case you still have something\n"
+"valuable there.\n"
+msgstr ""
+"Dealraíonn sé go bhfuil eolaire %s ann cheana féin, agus\n"
+"N'fheadar an bhfuil tú i lár athbhunaithe eile. Más é sin an\n"
+"cás, déan iarracht\n"
+" %s\n"
+"Mura bhfuil sé sin an cás, le do thoil\n"
+" %s\n"
+"agus rith mé arís. Táim ag stopadh i gcás go bhfuil rud éigin agat fós\n"
+"luachmhar ansin.\n"
+
+#: builtin/rebase.c
+msgid "switch `C' expects a numerical value"
+msgstr "tá an lasc `C' ag súil le luach uimhriúil"
+
+#: builtin/rebase.c
+msgid ""
+"apply options are incompatible with rebase.rebaseMerges. Consider adding --"
+"no-rebase-merges"
+msgstr ""
+"tá roghanna cur i bhfeidhm neamhoiriúnach le rebase.rebaseMerges. Smaoinigh "
+"ar --no-rebase-merges a chur leis"
+
+#: builtin/rebase.c
+msgid ""
+"apply options are incompatible with rebase.updateRefs. Consider adding --no-"
+"update-refs"
+msgstr ""
+"tá roghanna cur i bhfeidhm neamhoiriúnach le rebase.updateRefs. Smaoinigh ar "
+"--no-update-refs a chur leis"
+
+#: builtin/rebase.c
+#, c-format
+msgid "Unknown rebase backend: %s"
+msgstr "Cúltaca athbhunaithe anaithnid: %s"
+
+#: builtin/rebase.c
+msgid "--reschedule-failed-exec requires --exec or --interactive"
+msgstr "Éilíonn --reschedule-failed-exec --exec nó --interactive"
+
+#: builtin/rebase.c
+#, c-format
+msgid "invalid upstream '%s'"
+msgstr "neamhbhailí suas sruth '%s'"
+
+#: builtin/rebase.c
+msgid "Could not create new root commit"
+msgstr "Ní fhéadfaí tiomantas fréimhe nua a chruthú"
+
+#: builtin/rebase.c
+#, c-format
+msgid "no such branch/commit '%s'"
+msgstr "gan aon bhrainse/tiomantas '%s' den sórt sin"
+
+#: builtin/rebase.c builtin/submodule--helper.c
+#, c-format
+msgid "No such ref: %s"
+msgstr "Níl aon tagairt den sórt sin: %s"
+
+#: builtin/rebase.c
+msgid "Could not resolve HEAD to a commit"
+msgstr "Ní fhéadfaí HEAD a réiteach le tiomantas"
+
+#: builtin/rebase.c
+#, c-format
+msgid "'%s': need exactly one merge base with branch"
+msgstr "'%s': teastaíonn bonn cumaisc amháin díreach le brainse"
+
+#: builtin/rebase.c
+#, c-format
+msgid "'%s': need exactly one merge base"
+msgstr "'%s': teastaíonn bonn cumaisc amháin díreach"
+
+#: builtin/rebase.c
+#, c-format
+msgid "Does not point to a valid commit '%s'"
+msgstr "Ní thugann sé in iúl do thiomantas bailí '%s'"
+
+#: builtin/rebase.c
+msgid "HEAD is up to date."
+msgstr "Tá HEAD cothrom le dáta."
+
+#: builtin/rebase.c
+#, c-format
+msgid "Current branch %s is up to date.\n"
+msgstr "Tá an brainse reatha %s cothrom le dáta.\n"
+
+#: builtin/rebase.c
+msgid "HEAD is up to date, rebase forced."
+msgstr "Tá HEAD cothrom le dáta, athbhunú éigeantach."
+
+#: builtin/rebase.c
+#, c-format
+msgid "Current branch %s is up to date, rebase forced.\n"
+msgstr "Tá an brainse reatha %s cothrom le dáta, athbhunú éigeantach.\n"
+
+#: builtin/rebase.c
+msgid "The pre-rebase hook refused to rebase."
+msgstr "Dhiúltaigh an crúca réamh-athbhunú a athbhunú."
+
+#: builtin/rebase.c
+#, c-format
+msgid "Changes to %s:\n"
+msgstr "Athruithe ar %s:\n"
+
+#: builtin/rebase.c
+#, c-format
+msgid "Changes from %s to %s:\n"
+msgstr "Athruithe ó %s go %s:\n"
+
+#: builtin/rebase.c
+#, c-format
+msgid "First, rewinding head to replay your work on top of it...\n"
+msgstr ""
+"Ar dtús, téann athfhillte chun do chuid oibre a athsheinm ar a bharr...\n"
+
+#: builtin/rebase.c
+msgid "Could not detach HEAD"
+msgstr "Ní fhéadfaí CEAD a dhícheangal"
+
+#: builtin/rebase.c
+#, c-format
+msgid "Fast-forwarded %s to %s.\n"
+msgstr "Cuireadh %s ar aghaidh go tapa chuig %s.\n"
+
+#: builtin/receive-pack.c
+msgid "git receive-pack <git-dir>"
+msgstr "git receive-pack <git-dir>"
+
+#: builtin/receive-pack.c
+msgid ""
+"By default, updating the current branch in a non-bare repository\n"
+"is denied, because it will make the index and work tree inconsistent\n"
+"with what you pushed, and will require 'git reset --hard' to match\n"
+"the work tree to HEAD.\n"
+"\n"
+"You can set the 'receive.denyCurrentBranch' configuration variable\n"
+"to 'ignore' or 'warn' in the remote repository to allow pushing into\n"
+"its current branch; however, this is not recommended unless you\n"
+"arranged to update its work tree to match what you pushed in some\n"
+"other way.\n"
+"\n"
+"To squelch this message and still keep the default behaviour, set\n"
+"'receive.denyCurrentBranch' configuration variable to 'refuse'."
+msgstr ""
+"De réir réamhshocraithe, nuashonrú an bhrainse reatha i stóras neamh-lom\n"
+"diúltaítear, toisc go ndéanfaidh sé an t-innéacs agus an crann oibre "
+"neamhréireach\n"
+"leis an méid a bhrúigh tú, agus beidh 'git reset --hard' ag teastáil uait "
+"chun a mheaitseáil\n"
+"an crann oibre go HEAD.\n"
+"\n"
+"Is féidir leat an t-athróg cumraíochta 'receive.denyCurrentBranch' a shocrú\n"
+"chun 'neamhaird' nó 'rabhadh' sa stór iargúlta chun ligean a bhrú isteach\n"
+"a bhrainse reatha; áfach, ní mholtar é seo mura bhfuil tú\n"
+"socraithe chun a chrann oibre a nuashonrú chun a mheaitseáil ar an méid a "
+"bhrú tú isteach\n"
+"bealach eile.\n"
+"\n"
+"Chun an teachtaireacht seo a bhrú agus an t-iompar réamhshocraithe a "
+"choinneáil fós, socraigh\n"
+"Athróg cumraíochta 'receive.denyCurrentBranch' go 'refuse'."
+
+#: builtin/receive-pack.c
+msgid ""
+"By default, deleting the current branch is denied, because the next\n"
+"'git clone' won't result in any file checked out, causing confusion.\n"
+"\n"
+"You can set 'receive.denyDeleteCurrent' configuration variable to\n"
+"'warn' or 'ignore' in the remote repository to allow deleting the\n"
+"current branch, with or without a warning message.\n"
+"\n"
+"To squelch this message, you can set it to 'refuse'."
+msgstr ""
+"De réir réamhshocraithe, diúltaítear an bhrainse reatha a scriosadh, mar an "
+"chéad chéad\n"
+"Ní bheidh aon chomhad seiceáilte amach mar thoradh ar 'git clone', rud a "
+"chruthaíonn mearbhall.\n"
+"\n"
+"Is féidir leat athróg cumraíochta 'receive.denyDeleteCurrent' a shocrú go\n"
+"'rabhadh 'nó' neamhaird 'sa stór iargúlta chun cead a scriosadh an\n"
+"brainse reatha, le teachtaireacht rabhaidh nó gan é.\n"
+"\n"
+"Chun an teachtaireacht seo a ghearradh, is féidir leat é a shocrú go 'diúlt'."
+
+#: builtin/receive-pack.c
+msgid "quiet"
+msgstr "ciúin"
+
+#: builtin/receive-pack.c
+msgid "you must specify a directory"
+msgstr "ní mór duit eolaire a shonrú"
+
+#: builtin/reflog.c
+msgid "git reflog [show] [<log-options>] [<ref>]"
+msgstr "<ref>git reflog [taispeáin] [] [<log-options>]"
+
+#: builtin/reflog.c
+msgid "git reflog list"
+msgstr "git reflog liosta"
+
+#: builtin/reflog.c
+msgid ""
+"git reflog expire [--expire=<time>] [--expire-unreachable=<time>]\n"
+" [--rewrite] [--updateref] [--stale-fix]\n"
+" [--dry-run | -n] [--verbose] [--all [--single-worktree] | "
+"<refs>...]"
+msgstr ""
+"<time><time>git reflog in éag [--expire=] [--expire-unreachable=]\n"
+" [--athscríobh] [--updateref] [--stale-fix]\n"
+" <refs>[--dry-run | -n] [--verbose] [--all [--one-worktree] |...]"
+
+#: builtin/reflog.c
+msgid ""
+"git reflog delete [--rewrite] [--updateref]\n"
+" [--dry-run | -n] [--verbose] <ref>@{<specifier>}..."
+msgstr ""
+"git reflog scrios [--athscríobh] [--updateref]\n"
+" <ref><specifier>[--driy-run | -n] [--verbose] @ {}..."
+
+#: builtin/reflog.c
+msgid "git reflog exists <ref>"
+msgstr "git reflog ann <ref>"
+
+#: builtin/reflog.c
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "<refs>git reflog titim [--all [--one-worktree] |...]"
+
+#: builtin/reflog.c
+#, c-format
+msgid "invalid timestamp '%s' given to '--%s'"
+msgstr "stampa ama neamhbhailí '%s' a thugtar do '--%s'"
+
+#: builtin/reflog.c sequencer.c
+#, c-format
+msgid "%s does not accept arguments: '%s'"
+msgstr "Ní ghlacann %s le hargóintí: '%s'"
+
+#: builtin/reflog.c
+msgid "do not actually prune any entries"
+msgstr "ná déan aon iontrálacha a ghearradh"
+
+#: builtin/reflog.c
+msgid ""
+"rewrite the old SHA1 with the new SHA1 of the entry that now precedes it"
+msgstr ""
+"athscríobh an sean-SHA1 leis an SHA1 nua den iontráil atá roimh ré anois"
+
+#: builtin/reflog.c
+msgid "update the reference to the value of the top reflog entry"
+msgstr "an tagairt do luach an iontráil reflog barr a nuashonrú"
+
+#: builtin/reflog.c
+msgid "print extra information on screen"
+msgstr "faisnéis bhreise a phriontáil ar an sc"
+
+#: builtin/reflog.c
+msgid "timestamp"
+msgstr "stampa ama"
+
+#: builtin/reflog.c
+msgid "prune entries older than the specified time"
+msgstr "iontrálacha brónta níos sine ná an t-am sonraithe"
+
+#: builtin/reflog.c
+msgid ""
+"prune entries older than <time> that are not reachable from the current tip "
+"of the branch"
+msgstr ""
+"ní féidir iontrálacha br <time>ónta níos sine ná sin a bhaint amach ó bharr "
+"reatha na brainse"
+
+#: builtin/reflog.c
+msgid "prune any reflog entries that point to broken commits"
+msgstr ""
+"aon iontrálacha reflog a ghearradh a chuireann in iúl do thiomantas briste"
+
+#: builtin/reflog.c
+msgid "process the reflogs of all references"
+msgstr "athfhillteacha na dtagairtí go léir a phróiseáil"
+
+#: builtin/reflog.c
+msgid "limits processing to reflogs from the current worktree only"
+msgstr ""
+"teorann sé leis an bpróiseáil do athfhillteacha ón gcrann oibre reatha amháin"
+
+#: builtin/reflog.c
+#, c-format
+msgid "Marking reachable objects..."
+msgstr "Rudaí inrochtana a mharcáil..."
+
+#: builtin/reflog.c
+#, c-format
+msgid "reflog could not be found: '%s'"
+msgstr "ní fhéadfaí reflog a fháil: '%s'"
+
+#: builtin/reflog.c
+msgid "no reflog specified to delete"
+msgstr "níl aon reflog sonraithe le scriosadh"
+
+#: builtin/reflog.c
+#, c-format
+msgid "invalid ref format: %s"
+msgstr "formáid tagartha neamhbhailí: %s"
+
+#: builtin/reflog.c
+msgid "drop the reflogs of all references"
+msgstr "scaoil athbhreithniú na dtagairtí go léir"
+
+#: builtin/reflog.c
+msgid "drop reflogs from the current worktree only"
+msgstr "scaoil reflogs ón gcrann oibre reatha amháin"
+
+#: builtin/reflog.c
+msgid "references specified along with --all"
+msgstr "tagairtí sonraithe in éineacht le --all"
+
+#: builtin/refs.c
+msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
+msgstr "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
+
+#: builtin/refs.c
+msgid "git refs verify [--strict] [--verbose]"
+msgstr "fíoraíonn git refs [--strong] [--verbose]"
+
+#: builtin/refs.c
+msgid "specify the reference format to convert to"
+msgstr "sonraigh an fhormáid tagartha le tiontú"
+
+#: builtin/refs.c
+msgid "perform a non-destructive dry-run"
+msgstr "rith tirim neamh-millteach a dhéanamh"
+
+#: builtin/refs.c
+msgid "drop reflogs entirely during the migration"
+msgstr "titim athfhóga go hiomlán le linn na himirce"
+
+#: builtin/refs.c
+msgid "missing --ref-format=<format>"
+msgstr "ar iarraidh --ref-format=<format>"
+
+#: builtin/refs.c
+#, c-format
+msgid "repository already uses '%s' format"
+msgstr "úsáideann stór formáid '%s' cheana féin"
+
+#: builtin/refs.c
+msgid "enable strict checking"
+msgstr "cumasú seiceáil docht"
+
+#: builtin/refs.c
+msgid "'git refs verify' takes no arguments"
+msgstr "Ní ghlacann 'git refs verify' aon argóintí"
+
+#: builtin/remote.c
+msgid ""
+"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"mirror=<fetch|push>] <name> <url>"
+msgstr ""
+"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"mirror=<fetch|push>] <name> <url>"
+
+#: builtin/remote.c
+msgid "git remote rename [--[no-]progress] <old> <new>"
+msgstr "git remote rename [--[no-]progress] <old> <new>"
+
+#: builtin/remote.c
+msgid "git remote remove <name>"
+msgstr "git remote remove <name>"
+
+#: builtin/remote.c
+msgid "git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"
+msgstr "git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"
+
+#: builtin/remote.c
+msgid "git remote [-v | --verbose] show [-n] <name>"
+msgstr "git remote [-v | --verbose] show [-n] <name>"
+
+#: builtin/remote.c
+msgid "git remote prune [-n | --dry-run] <name>"
+msgstr "git remote prune [-n | --dry-run] <name>"
+
+#: builtin/remote.c
+msgid ""
+"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"
+msgstr ""
+"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"
+
+#: builtin/remote.c
+msgid "git remote set-branches [--add] <name> <branch>..."
+msgstr "git remote set-branches [--add] <name> <branch>..."
+
+#: builtin/remote.c
+msgid "git remote get-url [--push] [--all] <name>"
+msgstr "git remote get-url [--push] [--all] <name>"
+
+#: builtin/remote.c
+msgid "git remote set-url [--push] <name> <newurl> [<oldurl>]"
+msgstr "git remote set-url [--push] <name> <newurl> [<oldurl>]"
+
+#: builtin/remote.c
+msgid "git remote set-url --add <name> <newurl>"
+msgstr "git iargúlta set-url --add <name><newurl>"
+
+#: builtin/remote.c
+msgid "git remote set-url --delete <name> <url>"
+msgstr "git iargúlta set-url --delete <name><url>"
+
+#: builtin/remote.c
+msgid "git remote add [<options>] <name> <url>"
+msgstr "git remote add [<options>] <name> <url>"
+
+#: builtin/remote.c
+msgid "git remote set-branches <name> <branch>..."
+msgstr "git remote set-branches <name> <branch>..."
+
+#: builtin/remote.c
+msgid "git remote set-branches --add <name> <branch>..."
+msgstr "git remote set-branches --add <name> <branch>..."
+
+#: builtin/remote.c
+msgid "git remote show [<options>] <name>"
+msgstr "git remote show [<options>] <name>"
+
+#: builtin/remote.c
+msgid "git remote prune [<options>] <name>"
+msgstr "git remote prune [<options>] <name>"
+
+#: builtin/remote.c
+msgid "git remote update [<options>] [<group> | <remote>]..."
+msgstr "git remote update [<options>] [<group> | <remote>]..."
+
+#: builtin/remote.c
+#, c-format
+msgid "Updating %s"
+msgstr "Nuashonrú %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not fetch %s"
+msgstr "Níorbh fhéidir %s a fháil"
+
+#: builtin/remote.c
+msgid ""
+"--mirror is dangerous and deprecated; please\n"
+"\t use --mirror=fetch or --mirror=push instead"
+msgstr ""
+"--mirror tá scáthán contúirteach agus míchuir; le do thoil\n"
+" bain úsáid as --mirror=fetch nó --mirror=push ina ionad"
+
+#: builtin/remote.c
+#, c-format
+msgid "unknown --mirror argument: %s"
+msgstr "argóint --mirror anaithnid: %s"
+
+#: builtin/remote.c
+msgid "fetch the remote branches"
+msgstr "faigh na brainsí iargúlta"
+
+#: builtin/remote.c
+msgid ""
+"import all tags and associated objects when fetching\n"
+"or do not fetch any tag at all (--no-tags)"
+msgstr ""
+"iompórtáil gach clib agus rudaí gaolmhara agus tú ag tabhairt\n"
+"nó ná faigh aon chlib ar chor ar bith (--no-tags)"
+
+#: builtin/remote.c
+msgid "branch(es) to track"
+msgstr "brainse (í) chun rianú"
+
+#: builtin/remote.c
+msgid "master branch"
+msgstr "máistirbhrainse"
+
+#: builtin/remote.c
+msgid "set up remote as a mirror to push to or fetch from"
+msgstr "cuir iargúlta ar bun mar scáthán chun brú chuig nó a fháil uaidh"
+
+#: builtin/remote.c
+msgid "specifying a master branch makes no sense with --mirror"
+msgstr "níl aon chiall ar mháistirbhrainse a shonrú le --mirror"
+
+#: builtin/remote.c
+msgid "specifying branches to track makes sense only with fetch mirrors"
+msgstr "nííl ciall le brainsí a shonrú le rianú ach le scátháin faighte"
+
+#: builtin/remote.c
+#, c-format
+msgid "remote %s already exists."
+msgstr "iargúlta %s ann cheana féin."
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not setup master '%s'"
+msgstr "Ní raibh an máistir '%s' a shocrú"
+
+#: builtin/remote.c trailer.c
+#, c-format
+msgid "more than one %s"
+msgstr "níos mó ná %s amháin"
+
+#: builtin/remote.c
+#, c-format
+msgid "unhandled branch.%s.rebase=%s; assuming 'true'"
+msgstr "brainse gan láimhseáil. %s.rebase=%s; ag glacadh leis 'fíor'"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not get fetch map for refspec %s"
+msgstr "Níorbh fhéidir léarscáil a fháil do refspec %s"
+
+#: builtin/remote.c
+msgid "(matching)"
+msgstr "(meaitseáil)"
+
+#: builtin/remote.c
+msgid "(delete)"
+msgstr "(scrios)"
+
+#: builtin/remote.c
+#, c-format
+msgid "could not set '%s'"
+msgstr "ní fhéadfaí '%s' a shocrú"
+
+#: builtin/remote.c config.c
+#, c-format
+msgid "could not unset '%s'"
+msgstr "ní fhéadfaí '%s' a dhíshocrú"
+
+#: builtin/remote.c
+#, c-format
+msgid ""
+"The %s configuration remote.pushDefault in:\n"
+"\t%s:%d\n"
+"now names the non-existent remote '%s'"
+msgstr ""
+"An cumraíocht %s remote.pushDefault i:\n"
+" %s: %d\n"
+"ainmníonn anois an iargúlta nach bhfuil ann '%s'"
+
+#: builtin/remote.c
+#, c-format
+msgid "No such remote: '%s'"
+msgstr "Níl aon iargúlta den sórt sin: '%s'"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not rename config section '%s' to '%s'"
+msgstr "Ní fhéadfaí an chuid cumraithe '%s' a athainmniú go '%s'"
+
+#: builtin/remote.c
+#, c-format
+msgid ""
+"Not updating non-default fetch refspec\n"
+"\t%s\n"
+"\tPlease update the configuration manually if necessary."
+msgstr ""
+"Gan teacht refspec neamh-réamhshocraithe a nuashonrú\n"
+" %s\n"
+" Nuashonraigh an chumraíocht de láimh más gá."
+
+#: builtin/remote.c
+msgid "Renaming remote references"
+msgstr "Tagairtí cianda a athainmniú"
+
+#: builtin/remote.c
+#, c-format
+msgid "deleting '%s' failed"
+msgstr "theip ar '%s' a scriosadh"
+
+#: builtin/remote.c
+#, c-format
+msgid "creating '%s' failed"
+msgstr "theip ar chruthú '%s'"
+
+#: builtin/remote.c
+msgid ""
+"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
+"to delete it, use:"
+msgid_plural ""
+"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
+"to delete them, use:"
+msgstr[0] ""
+"Nóta: Níor baineadh brainse lasmuigh den ordlathas refs/remotes/;\n"
+"chun é a scriosadh, bain úsáid as:"
+msgstr[1] ""
+"Nóta: Níor baineadh roinnt brainsí lasmuigh den ordlathas refs/remotes/;\n"
+"chun iad a scriosadh, bain úsáid as:"
+msgstr[2] ""
+"Nóta: Níor baineadh roinnt brainsí lasmuigh den ordlathas refs/remotes/;\n"
+"chun iad a scriosadh, bain úsáid as:"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not remove config section '%s'"
+msgstr "Ní raibh an chuid cumraithe '%s' in ann a bhaint"
+
+#: builtin/remote.c
+#, c-format
+msgid " new (next fetch will store in remotes/%s)"
+msgstr " nua (stóráilfidh an chéad fhaighteacht eile i iargúlta/%s)"
+
+#: builtin/remote.c
+msgid " tracked"
+msgstr " rianaithe"
+
+#: builtin/remote.c
+msgid " skipped"
+msgstr " scipeáilte"
+
+#: builtin/remote.c
+msgid " stale (use 'git remote prune' to remove)"
+msgstr " seasta (bain úsáid as 'git remote prune' chun a bhaint)"
+
+#: builtin/remote.c
+msgid " ???"
+msgstr " ???"
+
+#: builtin/remote.c
+#, c-format
+msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch"
+msgstr "brainse neamhbhailí. %s.merge; ní féidir athbhunú ar> 1 bhrainse"
+
+#: builtin/remote.c
+#, c-format
+msgid "rebases interactively onto remote %s"
+msgstr "athbhunú go hidirghníomhach ar iargúlta %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "rebases interactively (with merges) onto remote %s"
+msgstr "athbhunú idirghníomhach (le cumaisc) ar iargúlta %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "rebases onto remote %s"
+msgstr "athbhunú ar iargúlta %s"
+
+#: builtin/remote.c
+#, c-format
+msgid " merges with remote %s"
+msgstr " merges with remote %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "merges with remote %s"
+msgstr "cumasc le iargúlta %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "%-*s and with remote %s\n"
+msgstr "%-*s agus le iargúlta %s\n"
+
+#: builtin/remote.c
+msgid "create"
+msgstr "cruthú"
+
+#: builtin/remote.c
+msgid "delete"
+msgstr "scriosadh"
+
+#: builtin/remote.c
+msgid "up to date"
+msgstr "cothrom le dáta"
+
+#: builtin/remote.c
+msgid "fast-forwardable"
+msgstr "tapa a sheoladh"
+
+#: builtin/remote.c
+msgid "local out of date"
+msgstr "áitiúil as dáta"
+
+#: builtin/remote.c
+#, c-format
+msgid " %-*s forces to %-*s (%s)"
+msgstr " fórsaí %-*s go %-*s (%s)"
+
+#: builtin/remote.c
+#, c-format
+msgid " %-*s pushes to %-*s (%s)"
+msgstr " %-*s ag brú go %-*s (%s)"
+
+#: builtin/remote.c
+#, c-format
+msgid " %-*s forces to %s"
+msgstr " feidhmíonn %-*s chuig %s"
+
+#: builtin/remote.c
+#, c-format
+msgid " %-*s pushes to %s"
+msgstr " %-*s ag brú chuig %s"
+
+#: builtin/remote.c
+msgid "do not query remotes"
+msgstr "ná fiosraigh iargúlta"
+
+#: builtin/remote.c
+#, c-format
+msgid "* remote %s"
+msgstr "* iargúlta %s"
+
+#: builtin/remote.c
+#, c-format
+msgid " Fetch URL: %s"
+msgstr " Faigh URL: %s"
+
+#. TRANSLATORS: the colon ':' should align
+#. with the one in " Fetch URL: %s"
+#. translation.
+#.
+#: builtin/remote.c
+#, c-format
+msgid " Push URL: %s"
+msgstr " Brúigh URL: %s"
+
+#: builtin/remote.c
+msgid "(no URL)"
+msgstr "(gan URL)"
+
+#: builtin/remote.c
+#, c-format
+msgid " HEAD branch: %s"
+msgstr " Brainse CEANN: %s"
+
+#: builtin/remote.c
+msgid "(not queried)"
+msgstr "(gan iarraidh)"
+
+#: builtin/remote.c
+msgid "(unknown)"
+msgstr "(anaithnid)"
+
+#: builtin/remote.c
+#, c-format
+msgid ""
+" HEAD branch (remote HEAD is ambiguous, may be one of the following):\n"
+msgstr ""
+" Brainse HEAD (tá CEAD iargúlta débhríoch, d'fhéadfadh a bheith ar cheann "
+"de na nithe seo a leanas)\n"
+
+#: builtin/remote.c
+#, c-format
+msgid " Remote branch:%s"
+msgid_plural " Remote branches:%s"
+msgstr[0] " Brainse iargúlta: %s"
+msgstr[1] " Brainsí iargúlta:%s"
+msgstr[2] " Brainsí iargúlta:%s"
+
+#: builtin/remote.c
+msgid " (status not queried)"
+msgstr " (níor fiosraíodh an stádas)"
+
+#: builtin/remote.c
+msgid " Local branch configured for 'git pull':"
+msgid_plural " Local branches configured for 'git pull':"
+msgstr[0] " Brainse áitiúil cumraithe le haghaidh 'git pull':"
+msgstr[1] " Craobhacha áitiúla cumraithe le haghaidh 'git pull':"
+msgstr[2] " Craobhacha áitiúla cumraithe le haghaidh 'git pull':"
+
+#: builtin/remote.c
+msgid " Local refs will be mirrored by 'git push'"
+msgstr " Déanfar tagairtí áitiúla a léiriú le 'git push'"
+
+#: builtin/remote.c
+#, c-format
+msgid " Local ref configured for 'git push'%s:"
+msgid_plural " Local refs configured for 'git push'%s:"
+msgstr[0] " Tagairt áitiúil cumraithe le haghaidh 'git push'%s:"
+msgstr[1] " Tagairtí áitiúla cumraithe le haghaidh 'git push'%s:"
+msgstr[2] " Tagairtí áitiúla cumraithe le haghaidh 'git push'%s:"
+
+#: builtin/remote.c
+#, c-format
+msgid "'%s/HEAD' is unchanged and points to '%s'\n"
+msgstr "Níl '%s/head' gan athrú agus díríonn sé chuig '%s'\n"
+
+#: builtin/remote.c
+#, c-format
+msgid "'%s/HEAD' has changed from '%s' and now points to '%s'\n"
+msgstr "Tá '%s/head' athraithe ó '%s' agus léiríonn sé anois chuig '%s'\n"
+
+#: builtin/remote.c
+#, c-format
+msgid "'%s/HEAD' is now created and points to '%s'\n"
+msgstr "Cruthaítear '%s/head' anois agus léiríonn sé chuig '%s'\n"
+
+#: builtin/remote.c
+#, c-format
+msgid "'%s/HEAD' was detached at '%s' and now points to '%s'\n"
+msgstr "Bhí '%s/head' scoite ag '%s' agus díríonn sé anois chuig '%s'\n"
+
+#: builtin/remote.c
+#, c-format
+msgid ""
+"'%s/HEAD' used to point to '%s' (which is not a remote branch), but now "
+"points to '%s'\n"
+msgstr ""
+"Úsáidtear '%s/head' chun díriú chuig '%s' (nach brainse iargúlta é), ach "
+"léiríonn sé anois chuig '%s'\n"
+
+#: builtin/remote.c
+msgid "set refs/remotes/<name>/HEAD according to remote"
+msgstr "socraigh refs/remotes/<name>/HEAD de réir an chianrialtáin"
+
+#: builtin/remote.c
+msgid "delete refs/remotes/<name>/HEAD"
+msgstr "scrios refs/remotes/<name>/HEAD"
+
+#: builtin/remote.c
+msgid "Cannot determine remote HEAD"
+msgstr "Ní féidir CEAD cianda a chinneadh"
+
+#: builtin/remote.c
+msgid "Multiple remote HEAD branches. Please choose one explicitly with:"
+msgstr ""
+"Brainsí iomadúla HEAD iargúlta. Roghnaigh ceann go sainráite le do thoil:"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not delete %s"
+msgstr "Ní fhéadfaí %s a scriosadh"
+
+#: builtin/remote.c
+#, c-format
+msgid "Not a valid ref: %s"
+msgstr "Ní tagairt bailí: %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "Could not set up %s"
+msgstr "Níor féidir %s a chur ar bun"
+
+#: builtin/remote.c
+#, c-format
+msgid " %s will become dangling!"
+msgstr " Beidh %s ag crochadh!"
+
+#: builtin/remote.c
+#, c-format
+msgid " %s has become dangling!"
+msgstr " tá %s ag crochadh!"
+
+#: builtin/remote.c
+#, c-format
+msgid "Pruning %s"
+msgstr "Bearradh %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "URL: %s"
+msgstr "URL: %s"
+
+#: builtin/remote.c
+#, c-format
+msgid " * [would prune] %s"
+msgstr " * [bhearna] %s"
+
+#: builtin/remote.c
+#, c-format
+msgid " * [pruned] %s"
+msgstr " * [gearrtha] %s"
+
+#: builtin/remote.c
+msgid "prune remotes after fetching"
+msgstr "iomadáin brónta tar éis a fháil"
+
+#: builtin/remote.c
+#, c-format
+msgid "No such remote '%s'"
+msgstr "Níl aon iargúlta '%s' den sórt sin"
+
+#: builtin/remote.c
+msgid "add branch"
+msgstr "cuir brainse"
+
+#: builtin/remote.c
+msgid "no remote specified"
+msgstr "gan aon iargúlta sonraithe"
+
+#: builtin/remote.c
+msgid "query push URLs rather than fetch URLs"
+msgstr "cuir fiosrúcháin ar URLanna brú seachas URLanna aisghabhála"
+
+#: builtin/remote.c
+msgid "return all URLs"
+msgstr "gach URL a thabhairt ar ais"
+
+#: builtin/remote.c
+msgid "manipulate push URLs"
+msgstr "ionramháil URLanna bhrú"
+
+#: builtin/remote.c
+msgid "add URL"
+msgstr "cuir URL leis"
+
+#: builtin/remote.c
+msgid "delete URLs"
+msgstr "scrios URLanna"
+
+#: builtin/remote.c
+msgid "--add --delete doesn't make sense"
+msgstr "Níl ciall ag --add --delete"
+
+#: builtin/remote.c
+#, c-format
+msgid "Invalid old URL pattern: %s"
+msgstr "Sean-phatrún URL neamhbhailí: %s"
+
+#: builtin/remote.c
+#, c-format
+msgid "No such URL found: %s"
+msgstr "Níor aimsíodh aon URL den sórt sin: %s"
+
+#: builtin/remote.c
+msgid "Will not delete all non-push URLs"
+msgstr "Ní scriosfaidh sé gach URL neamh-bhrú"
+
+#: builtin/remote.c
+msgid "be verbose; must be placed before a subcommand"
+msgstr "a bheith inearálta; caithfear é a chur os comhair fo-ordú"
+
+#: builtin/repack.c
+msgid ""
+"git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
+"[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]\n"
+"[--write-midx] [--name-hash-version=<n>]"
+msgstr ""
+"git athphacáil [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
+"<n><pack-name>[--fuinneog =] [-- <n>depth=] [--threads=] [--keep- <n>pack "
+"=]\n"
+"<n>[--write-midx] [--ainm-hash-leagan =]"
+
+#: builtin/repack.c
+msgid ""
+"Incremental repacks are incompatible with bitmap indexes. Use\n"
+"--no-write-bitmap-index or disable the pack.writeBitmaps configuration."
+msgstr ""
+"Níl ath-phacáistí incréideacha comhoiriúnach le hinnéacsanna bitmap. Úsáid\n"
+"--no-write-bitmap-index nó díchumraíocht an pack.writeBitmaps a dhíchumasú."
+
+#: builtin/repack.c
+msgid "could not start pack-objects to repack promisor objects"
+msgstr "ní fhéadfaí rudaí pacáiste a thosú chun rudaí gealltanna a athphacáil"
+
+#: builtin/repack.c
+msgid "failed to feed promisor objects to pack-objects"
+msgstr "theip ar rudaí gealltanna a bheathú ar rudaí pacáiste"
+
+#: builtin/repack.c
+msgid "repack: Expecting full hex object ID lines only from pack-objects."
+msgstr ""
+"athphacáil: Ag súil le línte aitheantais réad heicseach iomlána ach ó "
+"phacáistí."
+
+#: builtin/repack.c
+msgid "could not finish pack-objects to repack promisor objects"
+msgstr ""
+"ní fhéadfadh sé rudaí pacáiste a chríochnú chun rudaí geallta a athphacáil"
+
+#: builtin/repack.c
+#, c-format
+msgid "cannot open index for %s"
+msgstr "ní féidir innéacs a oscailt do %s"
+
+#: builtin/repack.c
+#, c-format
+msgid "pack %s too large to consider in geometric progression"
+msgstr "pacáiste %s ró-mhór le breithniú i ddul chun cinn geo"
+
+#: builtin/repack.c
+#, c-format
+msgid "pack %s too large to roll up"
+msgstr "pacáiste %s ró-mhór le rolladh suas"
+
+#: builtin/repack.c
+#, c-format
+msgid "could not open tempfile %s for writing"
+msgstr "ní fhéadfaí teachtaireacht %s a oscailt le haghaidh scríobh"
+
+#: builtin/repack.c
+msgid "could not close refs snapshot tempfile"
+msgstr "ní raibh in ann tempfile snapshot refs a dhúnadh"
+
+#: builtin/repack.c
+#, c-format
+msgid "could not remove stale bitmap: %s"
+msgstr "ní fhéadfaí bitmap seasta a bhaint: %s"
+
+#: builtin/repack.c
+#, c-format
+msgid "pack prefix %s does not begin with objdir %s"
+msgstr "ní thosaíonn réimír pacáiste %s le objdir %s"
+
+#: builtin/repack.c
+msgid "pack everything in a single pack"
+msgstr "pacáil gach rud i bpacáiste amháin"
+
+#: builtin/repack.c
+msgid "same as -a, and turn unreachable objects loose"
+msgstr ""
+"mar an gcéanna le -a, agus casadh rudaí nach féidir inrochtana scaoilte"
+
+#: builtin/repack.c
+msgid "same as -a, pack unreachable cruft objects separately"
+msgstr "mar an gcéanna le -a, pacáil rudaí cruft neamh-inrochtana ar leithligh"
+
+#: builtin/repack.c
+msgid "approxidate"
+msgstr "approxidate"
+
+#: builtin/repack.c
+msgid "with --cruft, expire objects older than this"
+msgstr "le --cruft, rachadh in éag rudaí níos sine ná seo"
+
+#: builtin/repack.c
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "le --cruft, ní athphacáil ach pacáistí cruft níos lú ná seo"
+
+#: builtin/repack.c
+msgid "remove redundant packs, and run git-prune-packed"
+msgstr "bain pacáistí iomarcacha, agus rith git-prune-packed"
+
+#: builtin/repack.c
+msgid "pass --no-reuse-delta to git-pack-objects"
+msgstr "pas --no-reuse-delta chuig git-pack-objects"
+
+#: builtin/repack.c
+msgid "pass --no-reuse-object to git-pack-objects"
+msgstr "pas --no-reuse-object chuig git-pack-objects"
+
+#: builtin/repack.c
+msgid ""
+"specify the name hash version to use for grouping similar objects by path"
+msgstr ""
+"sonraigh an leagan hash ainm atá le húsáid chun rudaí den chineál céanna a "
+"ghrúpáil"
+
+#: builtin/repack.c
+msgid "do not run git-update-server-info"
+msgstr "ná reáchtáil git-update-server-info"
+
+#: builtin/repack.c
+msgid "pass --local to git-pack-objects"
+msgstr "pas --local go git-pack-objects"
+
+#: builtin/repack.c
+msgid "write bitmap index"
+msgstr "scríobh innéacs bitmap"
+
+#: builtin/repack.c
+msgid "pass --delta-islands to git-pack-objects"
+msgstr "pas --delta-islands chuig git-pack-objects"
+
+#: builtin/repack.c
+msgid "with -A, do not loosen objects older than this"
+msgstr "le -A, ná scaoil rudaí níos sine ná seo"
+
+#: builtin/repack.c
+msgid "with -a, repack unreachable objects"
+msgstr "le -a, athphacáil rudaí neamh-inrochtana"
+
+#: builtin/repack.c
+msgid "size of the window used for delta compression"
+msgstr "méid na fuinneoga a úsáidtear le haghaidh comhbhrú delta"
+
+#: builtin/repack.c
+msgid "bytes"
+msgstr "beart"
+
+#: builtin/repack.c
+msgid "same as the above, but limit memory size instead of entries count"
+msgstr ""
+"mar an gcéanna leis an méid thuas, ach teorainn le méid cuimhne in ionad "
+"iontrálacha"
+
+#: builtin/repack.c
+msgid "limits the maximum delta depth"
+msgstr "teorann sé leis an doimhneacht delta uasta"
+
+#: builtin/repack.c
+msgid "limits the maximum number of threads"
+msgstr "teorainn leis an líon uasta na snáitheanna"
+
+#: builtin/repack.c
+msgid "maximum size of each packfile"
+msgstr "uasmhéid gach pacáiste"
+
+#: builtin/repack.c
+msgid "repack objects in packs marked with .keep"
+msgstr "athphacáil rudaí i bpacáistí atá marcáilte le .keep"
+
+#: builtin/repack.c
+msgid "do not repack this pack"
+msgstr "ná déan an pacáiste seo a athphacáil"
+
+#: builtin/repack.c
+msgid "find a geometric progression with factor <N>"
+msgstr "faigh dul chun cinn geoiméadrach le fachtóir <N>"
+
+#: builtin/repack.c
+msgid "write a multi-pack index of the resulting packs"
+msgstr "scríobh innéacs il-phacáiste de na pacáistí mar thoradh air"
+
+#: builtin/repack.c
+msgid "pack prefix to store a pack containing filtered out objects"
+msgstr "réimír pacáiste chun pacáiste ina bhfuil rudaí scagtha amach a stóráil"
+
+#: builtin/repack.c
+msgid "cannot delete packs in a precious-objects repo"
+msgstr "ní féidir pacáistí a scriosadh i repo rudaí luachmhara"
+
+#: builtin/repack.c
+#, c-format
+msgid "option '%s' can only be used along with '%s'"
+msgstr "ní féidir rogha '%s' a úsáid ach amháin in éineacht le '%s'"
+
+#: builtin/repack.c
+msgid "Nothing new to pack."
+msgstr "Níl aon rud nua le pacáil."
+
+#: builtin/repack.c
+#, c-format
+msgid "renaming pack to '%s' failed"
+msgstr "theip ar phacáiste a athainmniú go '%s'"
+
+#: builtin/repack.c
+#, c-format
+msgid "pack-objects did not write a '%s' file for pack %s-%s"
+msgstr "níor scríobh pack-objects comhad '%s' do phacáiste %s-%s"
+
+#: builtin/repack.c sequencer.c
+#, c-format
+msgid "could not unlink: %s"
+msgstr "ní fhéadfaí dícheangal: %s"
+
+#: builtin/replace.c
+msgid "git replace [-f] <object> <replacement>"
+msgstr "git athsholáthair [-f] <object><replacement>"
+
+#: builtin/replace.c
+msgid "git replace [-f] --edit <object>"
+msgstr "git athsholáthair [-f] --edit <object>"
+
+#: builtin/replace.c
+msgid "git replace [-f] --graft <commit> [<parent>...]"
+msgstr "<commit><parent>git athsholáthair [-f] --graft [...]"
+
+#: builtin/replace.c
+msgid "git replace -d <object>..."
+msgstr "<object>git athsholáthair -d..."
+
+#: builtin/replace.c
+msgid "git replace [--format=<format>] [-l [<pattern>]]"
+msgstr "<pattern>git in ionad [--format =<format>] [-l []]"
+
+#: builtin/replace.c
+#, c-format
+msgid ""
+"invalid replace format '%s'\n"
+"valid formats are 'short', 'medium' and 'long'"
+msgstr ""
+"formáid athsholáthair neamhbhailí '%s'\n"
+"is iad formáidí bailí ná 'gearr', 'meánach' agus 'fada'"
+
+#: builtin/replace.c
+#, c-format
+msgid "replace ref '%s' not found"
+msgstr "athsholáthair nach bhfuarthas tagairt '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "Deleted replace ref '%s'"
+msgstr "Scriosta in ionad tagairt '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "'%s' is not a valid ref name"
+msgstr "Ní ainm tagartha bailí é '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "replace ref '%s' already exists"
+msgstr "athsholáthar tagairt '%s' atá ann cheana féin"
+
+#: builtin/replace.c
+#, c-format
+msgid ""
+"Objects must be of the same type.\n"
+"'%s' points to a replaced object of type '%s'\n"
+"while '%s' points to a replacement object of type '%s'."
+msgstr ""
+"Caithfidh rudaí a bheith den chineál céanna.\n"
+"Tugann '%s' in iúl do réad athsholáthair de chineál '%s'\n"
+"agus díríonn '%s' ar réad athsholáthair de chineál '%s'."
+
+#: builtin/replace.c
+#, c-format
+msgid "unable to open %s for writing"
+msgstr "nach féidir %s a oscailt le haghaidh scríobh"
+
+#: builtin/replace.c
+msgid "cat-file reported failure"
+msgstr "teip tuairiscithe ar chomhad cat"
+
+#: builtin/replace.c
+#, c-format
+msgid "unable to open %s for reading"
+msgstr "nach féidir %s a oscailt le haghaidh léamh"
+
+#: builtin/replace.c
+msgid "unable to spawn mktree"
+msgstr "in ann mktree a shannadh"
+
+#: builtin/replace.c
+msgid "unable to read from mktree"
+msgstr "in ann léamh ó mktree"
+
+#: builtin/replace.c
+msgid "mktree reported failure"
+msgstr "thuairiscigh mktree teip"
+
+#: builtin/replace.c
+msgid "mktree did not return an object name"
+msgstr "níor thug mktree ainm réad ar ais"
+
+#: builtin/replace.c
+#, c-format
+msgid "unable to fstat %s"
+msgstr "ní féidir le fstat %s"
+
+#: builtin/replace.c
+msgid "unable to write object to database"
+msgstr "in ann réad a scríobh chuig bunachar sonraí"
+
+#: builtin/replace.c
+#, c-format
+msgid "unable to get object type for %s"
+msgstr "nach féidir cineál réad a fháil do %s"
+
+#: builtin/replace.c
+msgid "editing object file failed"
+msgstr "theip ar eagarthóireacht ar chomhad"
+
+#: builtin/replace.c
+#, c-format
+msgid "new object is the same as the old one: '%s'"
+msgstr "tá réad nua mar an gcéanna leis an sean-réad: '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "could not parse %s as a commit"
+msgstr "ní fhéadfaí %s a pharsáil mar thiomantas"
+
+#: builtin/replace.c
+#, c-format
+msgid "bad mergetag in commit '%s'"
+msgstr "cliciú neamhchuspóir i gcomhad '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "malformed mergetag in commit '%s'"
+msgstr "comharthaí mífhoirmithe i dtiomantas '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid ""
+"original commit '%s' contains mergetag '%s' that is discarded; use --edit "
+"instead of --graft"
+msgstr ""
+"tá mergetag '%s' a dhíscaoiltear as '%s' bunaidh; bain úsáid as --edit in "
+"ionad --graft"
+
+#: builtin/replace.c
+#, c-format
+msgid "the original commit '%s' has a gpg signature"
+msgstr "tá síniú gpg ag an tiomantas bunaidh '%s'"
+
+#: builtin/replace.c
+msgid "the signature will be removed in the replacement commit!"
+msgstr "bainfear an síniú sa tiomantas athsholáthair!"
+
+#: builtin/replace.c
+#, c-format
+msgid "could not write replacement commit for: '%s'"
+msgstr "ní fhéadfaí gealltanas athsholáthair a scríobh do: '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid "graft for '%s' unnecessary"
+msgstr "graft le haghaidh '%s' gan ghá"
+
+#: builtin/replace.c
+#, c-format
+msgid "new commit is the same as the old one: '%s'"
+msgstr "tá tiomantas nua mar an gcéanna leis an seancheann: '%s'"
+
+#: builtin/replace.c
+#, c-format
+msgid ""
+"could not convert the following graft(s):\n"
+"%s"
+msgstr ""
+"ní raibh sé in ann an graft (í) seo a leanas a thiontú:\n"
+"%s"
+
+#: builtin/replace.c
+msgid "list replace refs"
+msgstr "liosta athsholáthair refs"
+
+#: builtin/replace.c
+msgid "delete replace refs"
+msgstr "scrios athsholáthair refs"
+
+#: builtin/replace.c
+msgid "edit existing object"
+msgstr "réad atá ann cheana in eagar"
+
+#: builtin/replace.c
+msgid "change a commit's parents"
+msgstr "tuismitheoirí tiomanta a athrú"
+
+#: builtin/replace.c
+msgid "convert existing graft file"
+msgstr "tiontaigh an comhad graft atá ann cheana"
+
+#: builtin/replace.c
+msgid "replace the ref if it exists"
+msgstr "athsholáthar an tagartha má tá sé ann"
+
+#: builtin/replace.c
+msgid "do not pretty-print contents for --edit"
+msgstr "ná déan ábhar álainn a phriontáil le haghaidh --edit"
+
+#: builtin/replace.c
+msgid "use this format"
+msgstr "bain úsáid as an bhformáid seo"
+
+#: builtin/replace.c
+msgid "--format cannot be used when not listing"
+msgstr "Ní féidir --format a úsáid nuair nach bhfuil sé liostaithe"
+
+#: builtin/replace.c
+msgid "-f only makes sense when writing a replacement"
+msgstr "Ní dhéanann -f ciall ach nuair a bhíonn athsholáthar á scríobh"
+
+#: builtin/replace.c
+msgid "--raw only makes sense with --edit"
+msgstr "Ní dhéanann --raw ciall ach le --edit"
+
+#: builtin/replace.c
+msgid "-d needs at least one argument"
+msgstr "-d teastaíonn argóint amháin ar a laghad"
+
+#: builtin/replace.c
+msgid "bad number of arguments"
+msgstr "droch-líon na n-argóintí"
+
+#: builtin/replace.c
+msgid "-e needs exactly one argument"
+msgstr "Teastaíonn argóint amháin díreach ó -e"
+
+#: builtin/replace.c
+msgid "-g needs at least one argument"
+msgstr "Teastaíonn argóint amháin ar a laghad ó -g"
+
+#: builtin/replace.c
+msgid "--convert-graft-file takes no argument"
+msgstr "Ní ghlacann --convert-graft-file aon argóint"
+
+#: builtin/replace.c
+msgid "only one pattern can be given with -l"
+msgstr "ní féidir ach patrún amháin a thabhairt le -l"
+
+#: builtin/replay.c
+msgid "need some commits to replay"
+msgstr "teastaíonn roinnt gealltanais chun athsheinm"
+
+#: builtin/replay.c
+msgid "all positive revisions given must be references"
+msgstr "caithfidh gach athbhreithniú dearfach a thugtar a bheith ina"
+
+#: builtin/replay.c
+msgid "argument to --advance must be a reference"
+msgstr "caithfidh argóint chuig --advance a bheith ina thagairt"
+
+#: builtin/replay.c
+msgid ""
+"cannot advance target with multiple sources because ordering would be ill-"
+"defined"
+msgstr ""
+"ní féidir leis an sprioc a chur chun cinn le foinsí iolracha toisc go mbeadh "
+"ordú"
+
+#: builtin/replay.c
+msgid ""
+"cannot implicitly determine whether this is an --advance or --onto operation"
+msgstr ""
+"ní féidir a chinneadh go hinneach an oibríocht --advance nó --onto é seo"
+
+#: builtin/replay.c
+msgid ""
+"cannot advance target with multiple source branches because ordering would "
+"be ill-defined"
+msgstr ""
+"ní féidir leis an sprioc a chur chun cinn le brainsí foinse iolracha mar go "
+"mbeadh ordú"
+
+#: builtin/replay.c
+msgid "cannot implicitly determine correct base for --onto"
+msgstr "ní féidir leis an mbonn ceart do --onto a chinneadh go hinneach"
+
+#: builtin/replay.c
+msgid ""
+"(EXPERIMENTAL!) git replay ([--contained] --onto <newbase> | --advance "
+"<branch>) <revision-range>..."
+msgstr ""
+"(TURGNAMHACH!) git replay ([--contained] --onto <newbase> | --advance "
+"<branch>) <revision-range>..."
+
+#: builtin/replay.c
+msgid "make replay advance given branch"
+msgstr "athsheoladh a dhéanamh roimh ré brainse ar leith"
+
+#: builtin/replay.c
+msgid "replay onto given commit"
+msgstr "athsheoladh ar thiomantas a thugtar"
+
+#: builtin/replay.c
+msgid "advance all branches contained in revision-range"
+msgstr "gach brainse atá sa raon athbhreithnithe a chur chun cinn"
+
+#: builtin/replay.c
+msgid "option --onto or --advance is mandatory"
+msgstr "tá rogha --onto nó --advance éigeantach"
+
+#: builtin/replay.c
+#, c-format
+msgid ""
+"some rev walking options will be overridden as '%s' bit in 'struct rev_info' "
+"will be forced"
+msgstr ""
+"cuirfear roinnt roghanna siúil rev a athshealbhú mar go gcuirfear giotán "
+"'%s' i 'struct rev_info' iallach"
+
+#: builtin/replay.c
+msgid "error preparing revisions"
+msgstr "earráid ag ullmhú athbhreith"
+
+#: builtin/replay.c
+msgid "replaying down to root commit is not supported yet!"
+msgstr "ní thacaítear le athsheinm síos go dtí tiomantas fréimhe fós!"
+
+#: builtin/replay.c
+msgid "replaying merge commits is not supported yet!"
+msgstr "ní thacaítear le gealltanna cumaisc athsheinm fós!"
+
+#: builtin/rerere.c
+msgid ""
+"git rerere [clear | forget <pathspec>... | diff | status | remaining | gc]"
+msgstr ""
+"git rerere [glan | déan dearmad<pathspec>... | diff | stádas | fágtha | gc]"
+
+#: builtin/rerere.c
+msgid "register clean resolutions in index"
+msgstr "rúin glan a chlárú san innéacs"
+
+#: builtin/rerere.c
+msgid "'git rerere forget' without paths is deprecated"
+msgstr "Tá 'git rerere dearmad' gan cosáin scothaithe"
+
+#: builtin/rerere.c
+#, c-format
+msgid "unable to generate diff for '%s'"
+msgstr "nach féidir éagsúlacht a ghiniúint do '%s'"
+
+#: builtin/reset.c
+msgid ""
+"git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]"
+msgstr ""
+"git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]"
+
+#: builtin/reset.c
+msgid "git reset [-q] [<tree-ish>] [--] <pathspec>..."
+msgstr "git reset [-q] [<tree-ish>] [--] <pathspec>..."
+
+#: builtin/reset.c
+msgid ""
+"git reset [-q] [--pathspec-from-file [--pathspec-file-nul]] [<tree-ish>]"
+msgstr ""
+"git reset [-q] [--pathspec-from-file [--pathspec-file-nul]] [<tree-ish>]"
+
+#: builtin/reset.c
+msgid "git reset --patch [<tree-ish>] [--] [<pathspec>...]"
+msgstr "git reset --patch [<tree-ish>] [--] [<pathspec>...]"
+
+#: builtin/reset.c
+msgid "mixed"
+msgstr "measctha"
+
+#: builtin/reset.c
+msgid "soft"
+msgstr "bog"
+
+#: builtin/reset.c
+msgid "hard"
+msgstr "crua"
+
+#: builtin/reset.c
+msgid "merge"
+msgstr "cumaisc"
+
+#: builtin/reset.c
+msgid "keep"
+msgstr "coinnigh"
+
+#: builtin/reset.c
+msgid "You do not have a valid HEAD."
+msgstr "Níl CEANN bailí agat."
+
+#: builtin/reset.c
+msgid "Failed to find tree of HEAD."
+msgstr "Theip ar chrann HEAD a aimsiú."
+
+#: builtin/reset.c
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr "Theip ar chrann %s a aimsiú."
+
+#: builtin/reset.c
+#, c-format
+msgid "HEAD is now at %s"
+msgstr "Tá HEAD anois ag %s"
+
+#: builtin/reset.c
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr "Ní féidir athshocrú %s a dhéanamh i lár cumaisc."
+
+#: builtin/reset.c builtin/stash.c
+msgid "be quiet, only report errors"
+msgstr "bí ciúin, ní thuairiscigh ach earráidí"
+
+#: builtin/reset.c
+msgid "skip refreshing the index after reset"
+msgstr "scipeáil an t-innéacs a athnuachan tar éis"
+
+#: builtin/reset.c
+msgid "reset HEAD and index"
+msgstr "athshocraigh HEAD agus innéacs"
+
+#: builtin/reset.c
+msgid "reset only HEAD"
+msgstr "athshocraigh CEAD amháin"
+
+#: builtin/reset.c
+msgid "reset HEAD, index and working tree"
+msgstr "athshocraigh HEAD, innéacs agus crann oibre"
+
+#: builtin/reset.c
+msgid "reset HEAD but keep local changes"
+msgstr "athshocraigh HEAD ach coinnigh athruithe áiti"
+
+#: builtin/reset.c
+msgid "record only the fact that removed paths will be added later"
+msgstr ""
+"ní thaifeadadh ach an fíric go gcuirfear cosáin bainte leis níos déanaí"
+
+#: builtin/reset.c
+#, c-format
+msgid "Failed to resolve '%s' as a valid revision."
+msgstr "Theip ar '%s' a réiteach mar athbhreithniú bailí."
+
+#: builtin/reset.c
+#, c-format
+msgid "Failed to resolve '%s' as a valid tree."
+msgstr "Theip ar '%s' a réiteach mar chrann bailí."
+
+#: builtin/reset.c
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+"--mixed le cosáin imithe i léig; bain úsáid as 'git reset -- <cosáin>' ina "
+"ionad."
+
+#: builtin/reset.c
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr "Ní féidir %s a athshocrú le cosáin."
+
+#: builtin/reset.c
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr "Ní cheadaítear athshocrú %s i stóras lom"
+
+#: builtin/reset.c
+msgid "Unstaged changes after reset:"
+msgstr "Athruithe gan stáitse tar éis athshocrú:"
+
+#: builtin/reset.c
+#, c-format
+msgid ""
+"It took %.2f seconds to refresh the index after reset. You can use\n"
+"'--no-refresh' to avoid this."
+msgstr ""
+"Thóg sé %.2f soicind an t-innéacs a athnuachan tar éis athshocrú. Is féidir "
+"leat úsáid a bhaint as\n"
+"'--no-refresh' chun é seo a sheachaint."
+
+#: builtin/reset.c
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr "Ní fhéadfaí comhad innéacs a athshocrú chun athbhreithniú '%s'."
+
+#: builtin/reset.c
+msgid "Could not write new index file."
+msgstr "Ní fhéadfaí comhad innéacs nua a scríobh."
+
+#: builtin/rev-list.c
+#, c-format
+msgid "unable to get disk usage of %s"
+msgstr "nach féidir úsáid diosca de %s a fháil"
+
+#: builtin/rev-list.c
+#, c-format
+msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
+msgstr "luach neamhbhailí do '%s': '%s', is é '%s' an t-aon fhormáid ceadaithe"
+
+#: builtin/rev-list.c
+msgid "-z option used with unsupported option"
+msgstr "-z rogha a úsáidtear le rogha gan tacaíocht"
+
+#: builtin/rev-list.c
+msgid "rev-list does not support display of notes"
+msgstr "ní thacaíonn rev-list le taispeáint nótaí"
+
+#: builtin/rev-list.c
+#, c-format
+msgid "marked counting and '%s' cannot be used together"
+msgstr "comhaireamh marcáilte agus ní féidir '%s' a úsáid le chéile"
+
+#: builtin/rev-parse.c
+msgid "git rev-parse --parseopt [<options>] -- [<args>...]"
+msgstr "git rev-parse --parseopt [<options>] -- [<args>...]"
+
+#: builtin/rev-parse.c
+msgid "keep the `--` passed as an arg"
+msgstr "coinnigh an `--` a rith mar arg"
+
+#: builtin/rev-parse.c
+msgid "stop parsing after the first non-option argument"
+msgstr "stop a pháirseáil tar éis an chéad argóint neamh-rogha"
+
+#: builtin/rev-parse.c
+msgid "output in stuck long form"
+msgstr "aschur i bhfoirm fhada greamaithe"
+
+#: builtin/rev-parse.c
+msgid "premature end of input"
+msgstr "deireadh roimh ré an ionchuir"
+
+#: builtin/rev-parse.c
+msgid "no usage string given before the `--' separator"
+msgstr "gan aon teaghrán úsáide a thugtar roimh an deighilteoir `--'"
+
+#: builtin/rev-parse.c
+msgid "missing opt-spec before option flags"
+msgstr "sonraíocht rogha in easnamh roimh bhratacha roghanna"
+
+#: builtin/rev-parse.c
+msgid "Needed a single revision"
+msgstr "Teastaíonn athbhreithniú amháin"
+
+#: builtin/rev-parse.c
+msgid ""
+"git rev-parse --parseopt [<options>] -- [<args>...]\n"
+" or: git rev-parse --sq-quote [<arg>...]\n"
+" or: git rev-parse [<options>] [<arg>...]\n"
+"\n"
+"Run \"git rev-parse --parseopt -h\" for more information on the first usage."
+msgstr ""
+"git rev-parse --parseopt [<options>] -- [<args>...]\n"
+" or: git rev-parse --sq-quote [<arg>...]\n"
+" or: git rev-parse [<options>] [<arg>...]\n"
+"\n"
+"Rith “git rev-parse --parseopt -h” le haghaidh tuilleadh faisnéise ar an "
+"gcéad úsáid."
+
+#: builtin/rev-parse.c
+msgid "--resolve-git-dir requires an argument"
+msgstr "Teastaíonn argóint ag teastáil ó --resolve-git-dir"
+
+#: builtin/rev-parse.c
+#, c-format
+msgid "not a gitdir '%s'"
+msgstr "ní ghearr '%s'"
+
+#: builtin/rev-parse.c
+msgid "--git-path requires an argument"
+msgstr "Teastaíonn argóint ag teastáil ó --git-path"
+
+#: builtin/rev-parse.c
+msgid "-n requires an argument"
+msgstr "Éilíonn -n argóint"
+
+#: builtin/rev-parse.c
+msgid "--path-format requires an argument"
+msgstr "Éilíonn --path-format argóint"
+
+#: builtin/rev-parse.c
+#, c-format
+msgid "unknown argument to --path-format: %s"
+msgstr "argóint anaithnid chuig --path-format: %s"
+
+#: builtin/rev-parse.c
+msgid "--default requires an argument"
+msgstr "Teastaíonn argóint ar --default"
+
+#: builtin/rev-parse.c
+msgid "--prefix requires an argument"
+msgstr "Teastaíonn argóint ar --prefix"
+
+#: builtin/rev-parse.c
+msgid "no object format specified"
+msgstr "aon fhormáid réada a shonra"
+
+#: builtin/rev-parse.c
+#, c-format
+msgid "unsupported object format: %s"
+msgstr "formáid réad gan tacaíocht: %s"
+
+#: builtin/rev-parse.c
+#, c-format
+msgid "unknown mode for --abbrev-ref: %s"
+msgstr "modh anaithnid do --abbrev-ref: %s"
+
+#: builtin/rev-parse.c setup.c
+msgid "this operation must be run in a work tree"
+msgstr "caithfear an oibríocht seo a reáchtáil i gcrann oibre"
+
+#: builtin/rev-parse.c
+msgid "Could not read the index"
+msgstr "Ní fhéadfaí an t-innéacs a léamh"
+
+#: builtin/rev-parse.c
+#, c-format
+msgid "unknown mode for --show-object-format: %s"
+msgstr "modh anaithnid do --show-object-format: %s"
+
+#: builtin/revert.c
+msgid ""
+"git revert [--[no-]edit] [-n] [-m <parent-number>] [-s] [-S[<keyid>]] "
+"<commit>..."
+msgstr ""
+"git revert [--[no-]edit] [-n] [-m <parent-number>] [-s] [-S[<keyid>]] "
+"<commit>..."
+
+#: builtin/revert.c
+msgid "git revert (--continue | --skip | --abort | --quit)"
+msgstr "git revert (--continue | --skip | --abort | --quit)"
+
+#: builtin/revert.c
+msgid ""
+"git cherry-pick [--edit] [-n] [-m <parent-number>] [-s] [-x] [--ff]\n"
+" [-S[<keyid>]] <commit>..."
+msgstr ""
+"git cherry-pick [--edit] [-n] [-m <parent-number>] [-s] [-x] [--ff]\n"
+" [-S[<keyid>]] <commit>..."
+
+#: builtin/revert.c
+msgid "git cherry-pick (--continue | --skip | --abort | --quit)"
+msgstr "git cherry-pick (--continue | --skip | --abort | --quit)"
+
+#: builtin/revert.c
+#, c-format
+msgid "option `%s' expects a number greater than zero"
+msgstr "tá rogha `%s' ag súil go mbeidh uimhir níos mó ná nialas"
+
+#: builtin/revert.c
+#, c-format
+msgid "%s: %s cannot be used with %s"
+msgstr "%s: Ní féidir %s a úsáid le %s"
+
+#: builtin/revert.c
+msgid "end revert or cherry-pick sequence"
+msgstr "aisiompú deiridh nó seicheamh piocadh silíní"
+
+#: builtin/revert.c
+msgid "resume revert or cherry-pick sequence"
+msgstr "athosú ar ais nó seicheamh a phiocadh silíní"
+
+#: builtin/revert.c
+msgid "cancel revert or cherry-pick sequence"
+msgstr "seicheamh aisiompthe nó silíní a roghnú a chealú"
+
+#: builtin/revert.c
+msgid "skip current commit and continue"
+msgstr "scipeáil tiomantas reatha agus lean ar aghaidh"
+
+#: builtin/revert.c
+msgid "don't automatically commit"
+msgstr "ná tiomantas go huathoibríoch"
+
+#: builtin/revert.c
+msgid "edit the commit message"
+msgstr "athraigh an teachtaireacht tiomanta"
+
+#: builtin/revert.c
+msgid "parent-number"
+msgstr "uimhir tuismitheora"
+
+#: builtin/revert.c
+msgid "select mainline parent"
+msgstr "roghnaigh tuismitheoir príomh"
+
+#: builtin/revert.c
+msgid "merge strategy"
+msgstr "straitéis cumaisc"
+
+#: builtin/revert.c
+msgid "option for merge strategy"
+msgstr "rogha le haghaidh straitéis cumaisc"
+
+#: builtin/revert.c
+msgid "append commit name"
+msgstr "ainm tiomanta a chur leis"
+
+#: builtin/revert.c
+msgid "preserve initially empty commits"
+msgstr "gealltanais folamh a chaomhnú ar dt"
+
+#: builtin/revert.c
+msgid "allow commits with empty messages"
+msgstr "gealltanna a cheadú le teachtaireachtaí folamh"
+
+#: builtin/revert.c
+msgid "deprecated: use --empty=keep instead"
+msgstr "díscríofa: bain úsáid as --empty=keep ina ionad"
+
+#: builtin/revert.c
+msgid "use the 'reference' format to refer to commits"
+msgstr ""
+"bain úsáid as an bhformáid 'tagartha' chun tagairt a dhéanamh do ghealltanais"
+
+#: builtin/revert.c
+msgid "revert failed"
+msgstr "theip ar ais"
+
+#: builtin/revert.c
+msgid "cherry-pick failed"
+msgstr "theip ar an rogha silíní"
+
+#: builtin/rm.c
+msgid ""
+"git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n"
+" [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [--] [<pathspec>...]"
+msgstr ""
+"git rm [-f | --force] [-n] [-r] [--cached] [--neamh-mheaitseáilte]\n"
+" <file>[--quiet] [--pathspec-ó-comhad = [--pathspec-comhad-nul]]\n"
+" [--] [<pathspec>...]"
+
+#: builtin/rm.c
+msgid ""
+"the following file has staged content different from both the\n"
+"file and the HEAD:"
+msgid_plural ""
+"the following files have staged content different from both the\n"
+"file and the HEAD:"
+msgstr[0] ""
+"tá ábhar stáitse ag an gcomhad seo a leanas difriúil ón araon\n"
+"comhad agus an CEAD:"
+msgstr[1] ""
+"tá ábhar stáitseáilte difriúil idir an comhad agus\n"
+"an CEAD sna comhaid seo a leanas:"
+msgstr[2] ""
+"tá ábhar stáitseáilte difriúil idir an comhad agus \n"
+"an CEAD sna comhaid seo a leanas:"
+
+#: builtin/rm.c
+msgid ""
+"\n"
+"(use -f to force removal)"
+msgstr ""
+"\n"
+"(bain úsáid as -f chun a chur i bhfeidhm)"
+
+#: builtin/rm.c
+msgid "the following file has changes staged in the index:"
+msgid_plural "the following files have changes staged in the index:"
+msgstr[0] "tá athruithe céime san innéacs ag an gcomhad seo a leanas:"
+msgstr[1] "tá athruithe céimnithe san innéacs sna comhaid seo a leanas:"
+msgstr[2] "tá athruithe céimnithe san innéacs sna comhaid seo a leanas:"
+
+#: builtin/rm.c
+msgid ""
+"\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+"\n"
+"(bain úsáid as --cached chun an comhad a choinneáil, nó -f chun a bhaint a "
+"chur i bhfeidhm)"
+
+#: builtin/rm.c
+msgid "the following file has local modifications:"
+msgid_plural "the following files have local modifications:"
+msgstr[0] "tá modhnuithe áitiúla sa chomhad seo a leanas:"
+msgstr[1] "tá modhnuithe áitiúla ar na comhaid seo a leanas:"
+msgstr[2] "tá modhnuithe áitiúla ar na comhaid seo a leanas:"
+
+#: builtin/rm.c
+msgid "do not list removed files"
+msgstr "ná liostáil comhaid a bhaintear"
+
+#: builtin/rm.c
+msgid "only remove from the index"
+msgstr "ach a bhaint as an innéacs"
+
+#: builtin/rm.c
+msgid "override the up-to-date check"
+msgstr "an seiceáil cothrom le dáta a chur ar"
+
+#: builtin/rm.c
+msgid "allow recursive removal"
+msgstr "cead a bhaint athfhillteach"
+
+#: builtin/rm.c
+msgid "exit with a zero status even if nothing matched"
+msgstr "imeacht le stádas nialasach fiú mura bhfuil aon rud comhoiriúnach"
+
+#: builtin/rm.c
+msgid "No pathspec was given. Which files should I remove?"
+msgstr "Níor tugadh aon bhealach. Cé na comhaid ba chóir dom a bhaint?"
+
+#: builtin/rm.c
+msgid "please stage your changes to .gitmodules or stash them to proceed"
+msgstr ""
+"cuir do chuid athruithe ar .gitmodules nó iad a stóráil chun dul ar aghaidh"
+
+#: builtin/rm.c
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr "gan '%s' a bhaint go athshlánach gan -r"
+
+#: builtin/rm.c
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr "git rm: ní féidir %s a bhaint"
+
+#: builtin/send-pack.c
+msgid ""
+"git send-pack [--mirror] [--dry-run] [--force]\n"
+" [--receive-pack=<git-receive-pack>]\n"
+" [--verbose] [--thin] [--atomic]\n"
+" [--[no-]signed | --signed=(true|false|if-asked)]\n"
+" [<host>:]<directory> (--all | <ref>...)"
+msgstr ""
+"git send-pack [--mirror] [--dry-run] [--force]\n"
+" [--receive-pack=<git-receive-pack>]\n"
+" [--verbose] [--thin] [--atomic]\n"
+" [--[no-]signed | --signed=(true|false|if-asked)]\n"
+" [<host>:]<directory> (--all | <ref>...)"
+
+#: builtin/send-pack.c
+msgid "remote name"
+msgstr "ainm iargúlta"
+
+#: builtin/send-pack.c
+msgid "push all refs"
+msgstr "brúigh gach ceann"
+
+#: builtin/send-pack.c
+msgid "use stateless RPC protocol"
+msgstr "prótacal RPC gan stáit a úsáid"
+
+#: builtin/send-pack.c
+msgid "read refs from stdin"
+msgstr "léigh refs ó stdin"
+
+#: builtin/send-pack.c
+msgid "print status from remote helper"
+msgstr "stádas priontála ó chúntóir cianda"
+
+#: builtin/shortlog.c
+msgid "git shortlog [<options>] [<revision-range>] [[--] <path>...]"
+msgstr "git shortlog [<options>] [<revision-range>] [[--]<path>...]"
+
+#: builtin/shortlog.c
+msgid "git log --pretty=short | git shortlog [<options>]"
+msgstr "git log --pretty=short | git shortlog [<options>]"
+
+#: builtin/shortlog.c
+msgid "using multiple --group options with stdin is not supported"
+msgstr "ní thacaítear le roghanna iolracha --group le stdin a úsáid"
+
+#: builtin/shortlog.c
+#, c-format
+msgid "using %s with stdin is not supported"
+msgstr "ní thacaítear le baint úsáide as %s le stdin"
+
+#: builtin/shortlog.c
+#, c-format
+msgid "unknown group type: %s"
+msgstr "cineál grúpa anaithnid: %s"
+
+#: builtin/shortlog.c
+msgid "group by committer rather than author"
+msgstr "grúpa de réir coimiteora seachas údar"
+
+#: builtin/shortlog.c
+msgid "sort output according to the number of commits per author"
+msgstr "aschur a shórtáil de réir líon na ngealltanais in aghaidh an údair"
+
+#: builtin/shortlog.c
+msgid "suppress commit descriptions, only provides commit count"
+msgstr "tuairiscí tiomanta a chur faoi chois, ní sholáthraíonn"
+
+#: builtin/shortlog.c
+msgid "show the email address of each author"
+msgstr "taispeáin seoladh ríomhphoist gach údair"
+
+#: builtin/shortlog.c
+msgid "<w>[,<i1>[,<i2>]]"
+msgstr "<w>[, <i1>[,<i2>]]"
+
+#: builtin/shortlog.c
+msgid "linewrap output"
+msgstr "aschur linewrap"
+
+#: builtin/shortlog.c
+msgid "field"
+msgstr "réimse"
+
+#: builtin/shortlog.c
+msgid "group by field"
+msgstr "grúpa de réir réimse"
+
+#: builtin/shortlog.c
+msgid "too many arguments given outside repository"
+msgstr "an iomarca argóintí a thugtar stóráil"
+
+#: builtin/show-branch.c
+msgid ""
+"git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
+" [--current] [--color[=<when>] | --no-color] [--sparse]\n"
+" [--more=<n> | --list | --independent | --merge-base]\n"
+" [--no-name | --sha1-name] [--topics]\n"
+" [(<rev> | <glob>)...]"
+msgstr ""
+"git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
+" [--current] [--color[=<when>] | --no-color] [--sparse]\n"
+" [--more=<n> | --list | --independent | --merge-base]\n"
+" [--no-name | --sha1-name] [--topics]\n"
+" [(<rev> | <glob>)...]"
+
+#: builtin/show-branch.c
+msgid "git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"
+msgstr "<ref>git show-branch (-g | --reflog) [= [<n>,]] [--liosta] [<base>]"
+
+#: builtin/show-branch.c
+#, c-format
+msgid "ignoring %s; cannot handle more than %d ref"
+msgid_plural "ignoring %s; cannot handle more than %d refs"
+msgstr[0] ""
+"ag déanamh neamhaird de %s; ní féidir níos mó ná %d tagairt a láimhseáil"
+msgstr[1] ""
+"ag déanamh neamhaird de %s; ní féidir níos mó ná %d tagairtí a láimhseáil"
+msgstr[2] ""
+"ag déanamh neamhaird de %s; ní féidir níos mó ná %d tagairtí a láimhseáil"
+
+#: builtin/show-branch.c
+#, c-format
+msgid "no matching refs with %s"
+msgstr "gan aon fhreagraí a mheaitseáil le %s"
+
+#: builtin/show-branch.c
+msgid "show remote-tracking and local branches"
+msgstr "taispeáint cianrianú agus brainsí áitiúla"
+
+#: builtin/show-branch.c
+msgid "show remote-tracking branches"
+msgstr "taispeáin brainsí cianrianaithe"
+
+#: builtin/show-branch.c
+msgid "color '*!+-' corresponding to the branch"
+msgstr "dath '*! +-' a fhreagraíonn don bhrainse"
+
+#: builtin/show-branch.c
+msgid "show <n> more commits after the common ancestor"
+msgstr "taispeáint <n>níos mó gealltanais tar éis an sinsear coiteann"
+
+#: builtin/show-branch.c
+msgid "synonym to more=-1"
+msgstr "comhchiallach le níos mó = -1"
+
+#: builtin/show-branch.c
+msgid "suppress naming strings"
+msgstr "teaghráin ainmniúcháin"
+
+#: builtin/show-branch.c
+msgid "include the current branch"
+msgstr "san áireamh an bhrainse reatha"
+
+#: builtin/show-branch.c
+msgid "name commits with their object names"
+msgstr "geallann ainm lena n-ainmneacha réad"
+
+#: builtin/show-branch.c
+msgid "show possible merge bases"
+msgstr "taispeáin bonn cumaisc féidear"
+
+#: builtin/show-branch.c
+msgid "show refs unreachable from any other ref"
+msgstr "taispeántais neamh-inrochtana ó aon tagairt eile"
+
+#: builtin/show-branch.c
+msgid "show commits in topological order"
+msgstr "gealltanna seó in ord topolaíoch"
+
+#: builtin/show-branch.c
+msgid "show only commits not on the first branch"
+msgstr "seó ní geallann ach ar an gcéad bhrainse"
+
+#: builtin/show-branch.c
+msgid "show merges reachable from only one tip"
+msgstr "cumaisc seó inrochtana ó chomhairle amháin"
+
+#: builtin/show-branch.c
+msgid "topologically sort, maintaining date order where possible"
+msgstr "a shórtáil topaiceach, ag coinneáil ord dáta nuair is féidir"
+
+#: builtin/show-branch.c
+msgid "<n>[,<base>]"
+msgstr "<n>[,<base>]"
+
+#: builtin/show-branch.c
+msgid "show <n> most recent ref-log entries starting at base"
+msgstr "taispeáin ion <n>trálacha ref-log is déanaí ag tosú ag an mbonn"
+
+#: builtin/show-branch.c
+msgid "no branches given, and HEAD is not valid"
+msgstr "aon bhrainsí a thugtar, agus níl HEAD bailí"
+
+#: builtin/show-branch.c
+msgid "--reflog option needs one branch name"
+msgstr "Teastaíonn ainm brainse amháin ag teastáil ó rogha --reflog"
+
+#: builtin/show-branch.c
+#, c-format
+msgid "only %d entry can be shown at one time."
+msgid_plural "only %d entries can be shown at one time."
+msgstr[0] "ní féidir ach %d iontráil a thaispeáint ag an am céanna."
+msgstr[1] "ní féidir ach %d iontráil a thaispeáint ag an am céanna."
+msgstr[2] "ní féidir ach %d iontráil a thaispeáint ag an am céanna."
+
+#: builtin/show-branch.c
+#, c-format
+msgid "no such ref %s"
+msgstr "aon tagairt den sórt sin %s"
+
+#: builtin/show-branch.c
+#, c-format
+msgid "cannot handle more than %d rev."
+msgid_plural "cannot handle more than %d revs."
+msgstr[0] "ní féidir níos mó ná %d luasghéarú a láimhseáil."
+msgstr[1] "ní féidir níos mó ná %d luasghéarú a láimhseáil."
+msgstr[2] "ní féidir níos mó ná %d luasghéarú a láimhseáil."
+
+#: builtin/show-branch.c
+#, c-format
+msgid "'%s' is not a valid ref."
+msgstr "Ní tagairt bailí é '%s'."
+
+#: builtin/show-branch.c
+#, c-format
+msgid "cannot find commit %s (%s)"
+msgstr "ní féidir teacht ar thiomantas %s (%s)"
+
+#: builtin/show-index.c
+msgid "hash-algorithm"
+msgstr "hais-algartam"
+
+#: builtin/show-index.c
+msgid "Unknown hash algorithm"
+msgstr "Algartam hash anaithnid"
+
+#: builtin/show-ref.c
+msgid ""
+"git show-ref [--head] [-d | --dereference]\n"
+" [-s | --hash[=<n>]] [--abbrev[=<n>]] [--branches] [--tags]\n"
+" [--] [<pattern>...]"
+msgstr ""
+"git show-ref [--head] [-d | --dereference]\n"
+" [-s | --hash[=<n>]] [--abbrev[=<n>]] [--branches] [--tags]\n"
+" [--] [<pattern>...]"
+
+#: builtin/show-ref.c
+msgid ""
+"git show-ref --verify [-q | --quiet] [-d | --dereference]\n"
+" [-s | --hash[=<n>]] [--abbrev[=<n>]]\n"
+" [--] [<ref>...]"
+msgstr ""
+"git show-ref --verify [-q | --quiet] [-d | --dereference]\n"
+" [-s | --hash[=<n>]] [--abbrev[=<n>]]\n"
+" [--] [<ref>...]"
+
+#: builtin/show-ref.c
+msgid "git show-ref --exclude-existing[=<pattern>]"
+msgstr "git show-ref --exclude-existing[=<pattern>]"
+
+#: builtin/show-ref.c
+msgid "git show-ref --exists <ref>"
+msgstr "git show-ref --exists <ref>"
+
+#: builtin/show-ref.c
+msgid "reference does not exist"
+msgstr "níl tagairt ann"
+
+#: builtin/show-ref.c
+msgid "failed to look up reference"
+msgstr "theip ort tagairt a lorg suas"
+
+#: builtin/show-ref.c
+msgid "only show tags (can be combined with --branches)"
+msgstr ""
+"taispeáin clibeanna amháin (is féidir iad a chomhcheangal le --branches)"
+
+#: builtin/show-ref.c
+msgid "only show branches (can be combined with --tags)"
+msgstr "ní thaispeáin ach brainsí (is féidir iad a chomhcheangal le --tags)"
+
+#: builtin/show-ref.c
+msgid "check for reference existence without resolving"
+msgstr "seiceáil chun tagartha a bheith ann gan réiteach"
+
+#: builtin/show-ref.c
+msgid "stricter reference checking, requires exact ref path"
+msgstr "seiceáil tagartha níos doichte, teastaíonn cosán tagartha"
+
+#: builtin/show-ref.c
+msgid "show the HEAD reference, even if it would be filtered out"
+msgstr "taispeáin tagairt HEAD, fiú dá ndéanfaí é a scagadh amach"
+
+#: builtin/show-ref.c
+msgid "dereference tags into object IDs"
+msgstr "clibeanna a dhíthreorú isteach in IDanna réad"
+
+#: builtin/show-ref.c
+msgid "only show SHA1 hash using <n> digits"
+msgstr "ní thaispeáin ach hais SHA1 ag úsáid <n> dhigit"
+
+#: builtin/show-ref.c
+msgid "do not print results to stdout (useful with --verify)"
+msgstr "ná priontáil torthaí chuig stdout (úsáideach le --verify)"
+
+#: builtin/show-ref.c
+msgid "show refs from stdin that aren't in local repository"
+msgstr "taispeáin airgeanna ó stdin nach bhfuil i stóras áitiúil"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"git sparse-checkout (init | list | set | add | reapply | disable | check-"
+"rules) [<options>]"
+msgstr ""
+"git sparse-checkout (init | list | set | add | reapply | disable | check-"
+"rules) [<options>]"
+
+#: builtin/sparse-checkout.c
+msgid "this worktree is not sparse"
+msgstr "níl an crann oibre seo neamhchoitianta"
+
+#: builtin/sparse-checkout.c
+msgid "this worktree is not sparse (sparse-checkout file may not exist)"
+msgstr ""
+"níl an crann oibre seo neamhchoitianta (b'fhéidir nach bhfuil comhad "
+"seiceála neamhchoitianta ann)"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid ""
+"directory '%s' contains untracked files, but is not in the sparse-checkout "
+"cone"
+msgstr ""
+"tá comhaid neamhrianaithe ag eolaire '%s', ach níl sé sa chón seiceála "
+"neamhchoitianta"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid "failed to remove directory '%s'"
+msgstr "theip ar eolaire '%s' a bhaint"
+
+#: builtin/sparse-checkout.c
+msgid "failed to create directory for sparse-checkout file"
+msgstr "theip ar eolaire a chruthú do chomhad seiceála neamhchoitianta"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid "unable to fdopen %s"
+msgstr "nach féidir %s a fdophríomhachtú"
+
+#: builtin/sparse-checkout.c
+msgid "failed to initialize worktree config"
+msgstr "theip orthu cumraíocht crann oibre a thionscnamh"
+
+#: builtin/sparse-checkout.c
+msgid "failed to modify sparse-index config"
+msgstr "theip orthu cumraíocht innéacs neamhchoitianta a mhodhnú"
+
+#: builtin/sparse-checkout.c
+msgid "initialize the sparse-checkout in cone mode"
+msgstr "an tseiceáil neamhchoitianta a thosú i mód cón"
+
+#: builtin/sparse-checkout.c
+msgid "toggle the use of a sparse index"
+msgstr "athsholáthar úsáid innéacs neamhchoitianta"
+
+#: builtin/sparse-checkout.c commit-graph.c midx-write.c sequencer.c
+#, c-format
+msgid "unable to create leading directories of %s"
+msgstr "nach féidir eolairí tosaigh de %s a chruthú"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid "failed to open '%s'"
+msgstr "theip ar '%s' a oscailt"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid "could not normalize path %s"
+msgstr "ní fhéadfaí cosán %s a normalú"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid "unable to unquote C-style string '%s'"
+msgstr "nach féidir teaghrán '%s' i stíl C a dhíluachan"
+
+#: builtin/sparse-checkout.c
+msgid "unable to load existing sparse-checkout patterns"
+msgstr "in ann patrúin seiceála neamhchoitianta atá ann a luchtú"
+
+#: builtin/sparse-checkout.c
+msgid "existing sparse-checkout patterns do not use cone mode"
+msgstr "ní úsáideann patrúin seiceála neamhchoitianta atá ann cheana modh cón"
+
+#: builtin/sparse-checkout.c
+msgid "please run from the toplevel directory in non-cone mode"
+msgstr "rith ón eolaire topevel le do thoil i mód neamh-chón"
+
+#: builtin/sparse-checkout.c
+msgid "specify directories rather than patterns (no leading slash)"
+msgstr "eolairí a shonrú seachas patrúin (gan aon slash tosaigh)"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"specify directories rather than patterns. If your directory starts with a "
+"'!', pass --skip-checks"
+msgstr ""
+"eolairí a shonrú seachas patrúin. Má thosaíonn d'eolaire le '!', pas --skip-"
+"checks"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"specify directories rather than patterns. If your directory really has any "
+"of '*?[]\\' in it, pass --skip-checks"
+msgstr ""
+"eolairí a shonrú seachas patrúin. Má tá aon cheann de '* ag d'eolaire i "
+"ndáiríre? []\\ 'ann, pas --skip-checks"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid ""
+"'%s' is not a directory; to treat it as a directory anyway, rerun with --"
+"skip-checks"
+msgstr ""
+"Ní eolaire é '%s'; chun é a chóireáil mar eolaire ar aon nós, athrith le --"
+"skip-checks"
+
+#: builtin/sparse-checkout.c
+#, c-format
+msgid ""
+"pass a leading slash before paths such as '%s' if you want a single file "
+"(see NON-CONE PROBLEMS in the git-sparse-checkout manual)."
+msgstr ""
+"téigh slasc tosaigh roimh chosáin mar '%s' más mian leat comhad amháin "
+"(féach FADHBANNA NEAMH-CONE sa lámhleabhar seiceála git-sparse-checkout)."
+
+#: builtin/sparse-checkout.c
+msgid "git sparse-checkout add [--skip-checks] (--stdin | <patterns>)"
+msgstr "git sparse-checkout add [--skip-checks] (--stdin | <patterns>)"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"skip some sanity checks on the given paths that might give false positives"
+msgstr ""
+"scipeáil roinnt seiceálacha sláinte ar na cosáin a thugtar a d'fhéadfadh "
+"dearfacha bréagacha a"
+
+#: builtin/sparse-checkout.c
+msgid "read patterns from standard in"
+msgstr "léigh patrúin ó chaighdeán i"
+
+#: builtin/sparse-checkout.c
+msgid "no sparse-checkout to add to"
+msgstr "gan aon seiceáil neamhchoitianta le cur leis"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"git sparse-checkout set [--[no-]cone] [--[no-]sparse-index] [--skip-checks] "
+"(--stdin | <patterns>)"
+msgstr ""
+"git sparse-checkout set [--[no-]cone] [--[no-]sparse-index] [--skip-checks] "
+"(--stdin | <patterns>)"
+
+#: builtin/sparse-checkout.c
+msgid "must be in a sparse-checkout to reapply sparsity patterns"
+msgstr ""
+"caithfidh sé a bheith i seiceáil neamhchoitianta chun patrúin éagsúla a "
+"athchur i bhfeidh"
+
+#: builtin/sparse-checkout.c
+msgid "error while refreshing working directory"
+msgstr "earráid agus tú ag athnuachan eolaire"
+
+#: builtin/sparse-checkout.c
+msgid ""
+"git sparse-checkout check-rules [-z] [--skip-checks][--[no-]cone] [--rules-"
+"file <file>]"
+msgstr ""
+"git sparse-checkout check-rules [-z] [--skip-checks][--[no-]cone] [--rules-"
+"file <file>]"
+
+#: builtin/sparse-checkout.c
+msgid "terminate input and output files by a NUL character"
+msgstr "comhaid ionchuir agus aschuir a fhoirceannadh le carachtar NUL"
+
+#: builtin/sparse-checkout.c
+msgid "when used with --rules-file interpret patterns as cone mode patterns"
+msgstr ""
+"nuair a úsáidtear é le --rules-file patrúin a léirmhíniú mar phatrúin mód"
+
+#: builtin/sparse-checkout.c
+msgid "use patterns in <file> instead of the current ones."
+msgstr "úsáid patrúin in <file>ionad na cinn reatha."
+
+#: builtin/stash.c
+msgid "git stash list [<log-options>]"
+msgstr "<log-options>liosta git stash []"
+
+#: builtin/stash.c
+msgid ""
+"git stash show [-u | --include-untracked | --only-untracked] [<diff-"
+"options>] [<stash>]"
+msgstr ""
+"git stash show [-u | --include-untracked | --only-untracked] [<diff-"
+"options>] [<stash>]"
+
+#: builtin/stash.c
+msgid "git stash drop [-q | --quiet] [<stash>]"
+msgstr "git stash drop [-q | --quiet] [<stash>]"
+
+#: builtin/stash.c
+msgid "git stash pop [--index] [-q | --quiet] [<stash>]"
+msgstr "git stash pop [--index] [-q | --quiet] [<stash>]"
+
+#: builtin/stash.c
+msgid "git stash apply [--index] [-q | --quiet] [<stash>]"
+msgstr "git stash apply [--index] [-q | --quiet] [<stash>]"
+
+#: builtin/stash.c
+msgid "git stash branch <branchname> [<stash>]"
+msgstr "git stash branch <branchname> [<stash>]"
+
+#: builtin/stash.c
+msgid "git stash store [(-m | --message) <message>] [-q | --quiet] <commit>"
+msgstr ""
+"git stash store [(-m | --teachtaireacht)<message>] [-q | --ciúin] <commit>"
+
+#: builtin/stash.c
+msgid ""
+"git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q "
+"| --quiet]\n"
+" [-u | --include-untracked] [-a | --all] [(-m | --message) "
+"<message>]\n"
+" [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+" [--] [<pathspec>...]]"
+msgstr ""
+"git stash [bhrú [-p | --patch] [-S | --stage] [-k | -- [no-] coinneáil "
+"innéacs] [-q | --ciúin]\n"
+" <message>[-u | --include-untracked] [-a | --all] [(-m | --teachtaireacht)]\n"
+" <file>[--pathspec-ó-comhad = [--pathspec-comhad-nul]]\n"
+" [--] [<pathspec>...]]"
+
+#: builtin/stash.c
+msgid ""
+"git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | "
+"--quiet]\n"
+" [-u | --include-untracked] [-a | --all] [<message>]"
+msgstr ""
+"git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | "
+"--quiet]\n"
+" [-u | --include-untracked] [-a | --all] [<message>]"
+
+#: builtin/stash.c
+msgid "git stash create [<message>]"
+msgstr "<message>git stash cruthaigh []"
+
+#: builtin/stash.c
+#, c-format
+msgid "'%s' is not a stash-like commit"
+msgstr "Ní gealltanas cosúil le stash é '%s'"
+
+#: builtin/stash.c
+#, c-format
+msgid "Too many revisions specified:%s"
+msgstr "Sonraítear an iomarca athbhreithnithe: %s"
+
+#: builtin/stash.c
+msgid "No stash entries found."
+msgstr "Níor aimsíodh aon iontrálacha stash."
+
+#: builtin/stash.c
+#, c-format
+msgid "%s is not a valid reference"
+msgstr "Ní tagairt bailí é %s"
+
+#: builtin/stash.c
+msgid "git stash clear with arguments is unimplemented"
+msgstr "níl git stash clear le hargóintí neamh-chur i bhfeidhm"
+
+#: builtin/stash.c
+#, c-format
+msgid ""
+"WARNING: Untracked file in way of tracked file! Renaming\n"
+" %s -> %s\n"
+" to make room.\n"
+msgstr ""
+"RABHADH: Comhad neamhrianaithe ar bhealach comhad rianaithe! Athainmniú\n"
+" %s -> %s\n"
+" chun seomra a dhéanamh.\n"
+
+#: builtin/stash.c
+msgid "cannot apply a stash in the middle of a merge"
+msgstr "ní féidir stash a chur i bhfeidhm i lár cumaisc"
+
+#: builtin/stash.c
+#, c-format
+msgid "could not generate diff %s^!."
+msgstr "ní fhéadfaí diff %s^ a ghiniúint!."
+
+#: builtin/stash.c
+msgid "conflicts in index. Try without --index."
+msgstr "coinbhleachtaí in innéacs. Bain triail as gan --index."
+
+#: builtin/stash.c
+msgid "could not save index tree"
+msgstr "ní fhéadfadh crann innéacs a shábháil"
+
+#: builtin/stash.c
+#, c-format
+msgid "Merging %s with %s"
+msgstr "Cumasc %s le %s"
+
+#: builtin/stash.c
+msgid "Index was not unstashed."
+msgstr "Ní raibh an t-innéacs gan stashed."
+
+#: builtin/stash.c
+msgid "could not restore untracked files from stash"
+msgstr "ní raibh in ann comhaid neamhrianaithe a chur ar ais ó stash"
+
+#: builtin/stash.c
+msgid "attempt to recreate the index"
+msgstr "iarracht an t-innéacs a athchruthú"
+
+#: builtin/stash.c
+#, c-format
+msgid "Dropped %s (%s)"
+msgstr "Scaoil %s (%s)"
+
+#: builtin/stash.c
+#, c-format
+msgid "%s: Could not drop stash entry"
+msgstr "%s: Ní fhéadfaí iontráil stash a scaoileadh"
+
+#: builtin/stash.c
+#, c-format
+msgid "'%s' is not a stash reference"
+msgstr "Ní tagairt stash é '%s'"
+
+#: builtin/stash.c
+msgid "The stash entry is kept in case you need it again."
+msgstr "Coinnítear an iontráil stash ar eagla go dteastaíonn sé uait arís."
+
+#: builtin/stash.c
+msgid "No branch name specified"
+msgstr "Níl aon ainm brainse sonraithe"
+
+#: builtin/stash.c
+msgid "failed to parse tree"
+msgstr "theip ar chrann a pháirseáil"
+
+#: builtin/stash.c
+msgid "failed to unpack trees"
+msgstr "theip ar chrainn a dhíphacáil"
+
+#: builtin/stash.c
+msgid "include untracked files in the stash"
+msgstr "comhaid neamhrianaithe san áireamh sa stash"
+
+#: builtin/stash.c
+msgid "only show untracked files in the stash"
+msgstr "ní thaispeánann ach comhaid neamhrianaithe sa stash"
+
+#: builtin/stash.c
+#, c-format
+msgid "Cannot update %s with %s"
+msgstr "Ní féidir %s a nuashonrú le %s"
+
+#: builtin/stash.c
+msgid "stash message"
+msgstr "teachtaireacht stash"
+
+#: builtin/stash.c
+msgid "\"git stash store\" requires one <commit> argument"
+msgstr "<commit>Éilíonn “git stash store” argóint amháin"
+
+#: builtin/stash.c
+msgid "No staged changes"
+msgstr "Gan aon athruithe céime"
+
+#: builtin/stash.c
+msgid "No changes selected"
+msgstr "Gan aon athruithe roghnaithe"
+
+#: builtin/stash.c
+msgid "You do not have the initial commit yet"
+msgstr "Níl an tiomantas tosaigh agat fós"
+
+#: builtin/stash.c
+msgid "Cannot save the current index state"
+msgstr "Ní féidir an staid innéacs reatha a shábháil"
+
+#: builtin/stash.c
+msgid "Cannot save the untracked files"
+msgstr "Ní féidir na comhaid neamhrianaithe a shábháil"
+
+#: builtin/stash.c
+msgid "Cannot save the current worktree state"
+msgstr "Ní féidir an stát crainn oibre reatha a shábháil"
+
+#: builtin/stash.c
+msgid "Cannot save the current staged state"
+msgstr "Ní féidir an stát stáitse reatha a shábháil"
+
+#: builtin/stash.c
+msgid "Cannot record working tree state"
+msgstr "Ní féidir stát crann oibre a thaifead"
+
+#: builtin/stash.c
+msgid "Can't use --patch and --include-untracked or --all at the same time"
+msgstr ""
+"Ní féidir --patch agus --include-untracked nó --all a úsáid ag an am céanna"
+
+#: builtin/stash.c
+msgid "Can't use --staged and --include-untracked or --all at the same time"
+msgstr ""
+"Ní féidir --staged agus --include-untracked nó --all a úsáid ag an am céanna"
+
+#: builtin/stash.c
+msgid "Did you forget to 'git add'?"
+msgstr "Ar ndearna tú dearmad 'git add'?"
+
+#: builtin/stash.c
+msgid "No local changes to save"
+msgstr "Níl aon athruithe áitiúla le sábháil"
+
+#: builtin/stash.c
+msgid "Cannot initialize stash"
+msgstr "Ní féidir stash a thionscnamh"
+
+#: builtin/stash.c
+msgid "Cannot save the current status"
+msgstr "Ní féidir an stádas reatha a shábháil"
+
+#: builtin/stash.c
+#, c-format
+msgid "Saved working directory and index state %s"
+msgstr "Eolaire oibre shábháilte agus staid innéacs %s"
+
+#: builtin/stash.c
+msgid "Cannot remove worktree changes"
+msgstr "Ní féidir athruithe crann oibre a bhaint"
+
+#: builtin/stash.c
+msgid "keep index"
+msgstr "coinnigh innéacs"
+
+#: builtin/stash.c
+msgid "stash staged changes only"
+msgstr "athruithe céimeádta stash amháin"
+
+#: builtin/stash.c
+msgid "stash in patch mode"
+msgstr "stash i mód paiste"
+
+#: builtin/stash.c
+msgid "quiet mode"
+msgstr "modh ciúin"
+
+#: builtin/stash.c
+msgid "include untracked files in stash"
+msgstr "comhaid neamhrianaithe a chur san áireamh i stash"
+
+#: builtin/stash.c
+msgid "include ignore files"
+msgstr "áireamh neamhaird a dhéanamh"
+
+#: builtin/stripspace.c
+msgid "skip and remove all lines starting with comment character"
+msgstr "scipeáil agus bain gach líne ag tosú le carachtar trácht"
+
+#: builtin/stripspace.c
+msgid "prepend comment character and space to each line"
+msgstr "carachtar tráchta agus spás a chur ar fáil chuig gach líne"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Expecting a full ref name, got %s"
+msgstr "Ag súil le hainm tagartha iomlán, fuair %s"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not get a repository handle for submodule '%s'"
+msgstr "ní fhéadfaí láimhseáil stór a fháil do fho-mhodúl '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"could not look up configuration '%s'. Assuming this repository is its own "
+"authoritative upstream."
+msgstr ""
+"ní fhéadfaí cumraíocht '%s' a fheiceáil suas. Ag glacadh leis gurb é an stór "
+"seo a údarásach suas sruth féin."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "No url found for submodule path '%s' in .gitmodules"
+msgstr "Níl aon url le haghaidh cosán fo-mhodúil '%s' i .gitmodules"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Entering '%s'\n"
+msgstr "Ag iontráil '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"run_command returned non-zero status for %s\n"
+"."
+msgstr ""
+"thug run_command stádas neamh-nialas ar ais do %s.\n"
+"."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"run_command returned non-zero status while recursing in the nested "
+"submodules of %s\n"
+"."
+msgstr ""
+"d'fhill run_command stádas neamh-nialasach agus é ag athshlánú sna fo-"
+"mhodúil neadaithe de %s\n"
+"."
+
+#: builtin/submodule--helper.c
+msgid "suppress output of entering each submodule command"
+msgstr "cosc a chur ar aschur gach ordú fo-mhodúil a chur isteach"
+
+#: builtin/submodule--helper.c
+msgid "recurse into nested submodules"
+msgstr "athshlánú isteach i bhfo-mhodúil neadaithe"
+
+#: builtin/submodule--helper.c
+msgid "git submodule foreach [--quiet] [--recursive] [--] <command>"
+msgstr "git submodule foreach [--quiet] [--recursive] [--] <command>"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to register url for submodule path '%s'"
+msgstr "Theip ar url a chlárú le haghaidh cosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule '%s' (%s) registered for path '%s'\n"
+msgstr "Fo-mhodúl '%s' (%s) cláraithe le haghaidh cosán '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "warning: command update mode suggested for submodule '%s'\n"
+msgstr "rabhadh: modh nuashonraithe ordaithe a mholtar don fho-mhodúl '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to register update mode for submodule path '%s'"
+msgstr "Theip ar mhodh nuashonraithe a chlárú do chonair fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+msgid "suppress output for initializing a submodule"
+msgstr "aschur a chur faoi chois chun fo-mhodúl a thosú"
+
+#: builtin/submodule--helper.c
+msgid "git submodule init [<options>] [<path>]"
+msgstr "git submodule init [<options>] [<path>]"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "no submodule mapping found in .gitmodules for path '%s'"
+msgstr ""
+"níl aon mhapáil fo-mhodúil le fáil i .gitmodules le haghaidh cosán '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not resolve HEAD ref inside the submodule '%s'"
+msgstr "ní fhéadfaí tagairt HEAD a réiteach taobh istigh den fho-mhodúl '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "failed to recurse into submodule '%s'"
+msgstr "theip ar athshlánú isteach i bhfo-mhodúl '%s'"
+
+#: builtin/submodule--helper.c
+msgid "suppress submodule status output"
+msgstr "aschur stádas fo-mhodúil a chur faoi cho"
+
+#: builtin/submodule--helper.c
+msgid ""
+"use commit stored in the index instead of the one stored in the submodule "
+"HEAD"
+msgstr ""
+"bain úsáid as tiomantas atá stóráilte san innéacs in ionad an ceann atá "
+"stóráilte sa fho-mhodúl HEAD"
+
+#: builtin/submodule--helper.c
+msgid "git submodule status [--quiet] [--cached] [--recursive] [<path>...]"
+msgstr "git submodule status [--quiet] [--cached] [--recursive] [<path>...]"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "* %s %s(blob)->%s(submodule)"
+msgstr "* %s %s (blob) -> %s (fo-mhodúl)"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "* %s %s(submodule)->%s(blob)"
+msgstr "* %s %s (fo-mhodúl) -> %s (blob)"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "couldn't hash object from '%s'"
+msgstr "ní fhéadfaí réad hash ó '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "unexpected mode %o"
+msgstr "modh gan choinne %o"
+
+#: builtin/submodule--helper.c
+msgid "use the commit stored in the index instead of the submodule HEAD"
+msgstr ""
+"bain úsáid as an gealltanas atá stóráilte san innéacs in ionad an fho-mhodúl "
+"HEAD"
+
+#: builtin/submodule--helper.c
+msgid "compare the commit in the index with that in the submodule HEAD"
+msgstr ""
+"comparáid a dhéanamh idir an tiomantas san innéacs leis an bhfo-mhodúl HEAD"
+
+#: builtin/submodule--helper.c
+msgid "skip submodules with 'ignore_config' value set to 'all'"
+msgstr "scipeáil fo-mhodúil le luach 'ignore_config' socraithe go 'go léir'"
+
+#: builtin/submodule--helper.c
+msgid "limit the summary size"
+msgstr "teorainn a chur leis an méid achoimre"
+
+#: builtin/submodule--helper.c
+msgid "git submodule summary [<options>] [<commit>] [--] [<path>]"
+msgstr "git achoimre fo-mhodúil [<options>] [<commit>] [--] [<path>]"
+
+#: builtin/submodule--helper.c
+msgid "could not fetch a revision for HEAD"
+msgstr "ní fhéadfaí athbhreithniú a fháil do HEAD"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Synchronizing submodule url for '%s'\n"
+msgstr "Url fo-mhodúil a shioncrónú do '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "failed to register url for submodule path '%s'"
+msgstr "theip ar url a chlárú le haghaidh cosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "failed to update remote for submodule '%s'"
+msgstr "theip ar iargúlta a nuashonrú do fho-mhodúl '%s'"
+
+#: builtin/submodule--helper.c
+msgid "suppress output of synchronizing submodule url"
+msgstr "aschur url fo-mhodúil sioncrónaithe a chur faoi chois"
+
+#: builtin/submodule--helper.c
+msgid "git submodule sync [--quiet] [--recursive] [<path>]"
+msgstr "git sioncrónú fo-mhodúil [--quiet] [--recursive] [<path>]"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"Submodule work tree '%s' contains a .git directory. This will be replaced "
+"with a .git file by using absorbgitdirs."
+msgstr ""
+"Tá eolair .git i gcrann oibre fo-mhodúil '%s'. Cuirfear comhad .git in ionad "
+"seo trí absorbgitdirs a úsáid."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"Submodule work tree '%s' contains local modifications; use '-f' to discard "
+"them"
+msgstr ""
+"Tá modhnuithe áitiúla i gcrann oibre fo-mhodúil '%s'; bain úsáid as '-f' "
+"chun iad a dhiúscairt"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Cleared directory '%s'\n"
+msgstr "Glanadh an eolaire '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Could not remove submodule work tree '%s'\n"
+msgstr "Níor féidir crann oibre fo-mhodúil '%s' a bhaint\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not create empty submodule directory %s"
+msgstr "ní fhéadfaí eolaire fo-mhodúil folamh %s a chruthú"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule '%s' (%s) unregistered for path '%s'\n"
+msgstr "Fo-mhodúl '%s' (%s) neamhchláraithe le haghaidh cosán '%s'\n"
+
+#: builtin/submodule--helper.c
+msgid "remove submodule working trees even if they contain local changes"
+msgstr "crainn oibre fo-mhodúil a bhaint fiú má tá athruithe áitiúla iontu"
+
+#: builtin/submodule--helper.c
+msgid "unregister all submodules"
+msgstr "gach fo-mhodúl a dhíchlárú"
+
+#: builtin/submodule--helper.c
+msgid ""
+"git submodule deinit [--quiet] [-f | --force] [--all | [--] [<path>...]]"
+msgstr ""
+"git fo-mhodúil deinit [--quiet] [-f | --force] [--all | [--] [<path>...]]"
+
+#: builtin/submodule--helper.c
+msgid "Use '--all' if you really want to deinitialize all submodules"
+msgstr "Úsáid '--all' más mian leat gach fo-mhodúl a dhíthionsú i ndáiríre"
+
+#: builtin/submodule--helper.c
+msgid ""
+"An alternate computed from a superproject's alternate is invalid.\n"
+"To allow Git to clone without an alternate in such a case, set\n"
+"submodule.alternateErrorStrategy to 'info' or, equivalently, clone with\n"
+"'--reference-if-able' instead of '--reference'."
+msgstr ""
+"Tá malartach arna ríomh ó mhalartach sárthionscadail neamhbhailí.\n"
+"Chun ligean Git a chlónú gan malartach i gcás den sórt sin, socraigh\n"
+"submodule.alternateErrorStrategy chun 'faisnéis' nó, go coibhéiseach, clónú "
+"le\n"
+"'--reference-if-able' in ionad '--reference'."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not get a repository handle for gitdir '%s'"
+msgstr "ní fhéadfaí láimhseáil stór a fháil do gitdir '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "submodule '%s' cannot add alternate: %s"
+msgstr "ní féidir le fo-mhodúl '%s' malartach a chur leis: %s"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Value '%s' for submodule.alternateErrorStrategy is not recognized"
+msgstr "Luach '%s' le haghaidh submodule.alternateErrorStrategy ní aithnítear"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Value '%s' for submodule.alternateLocation is not recognized"
+msgstr "Luach '%s' le haghaidh submodule.alternateLocation ní aithnítear"
+
+#: builtin/submodule--helper.c submodule.c
+#, c-format
+msgid "refusing to create/use '%s' in another submodule's git dir"
+msgstr "diúltú '%s' a chruthú/úsáid i git dir fo-mhodúil eile"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "directory not empty: '%s'"
+msgstr "eolaire nach folamh: '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "clone of '%s' into submodule path '%s' failed"
+msgstr "theip ar chlón '%s' isteach i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not get submodule directory for '%s'"
+msgstr "ní fhéadfaí eolaire fo-mhodúil a fháil do '%s'"
+
+#: builtin/submodule--helper.c
+msgid "alternative anchor for relative paths"
+msgstr "ancaire malartach do chonair choibhneasta"
+
+#: builtin/submodule--helper.c
+msgid "where the new submodule will be cloned to"
+msgstr "áit a gclónófar an fo-mhodúl nua"
+
+#: builtin/submodule--helper.c
+msgid "name of the new submodule"
+msgstr "ainm an fho-mhodúil nua"
+
+#: builtin/submodule--helper.c
+msgid "url where to clone the submodule from"
+msgstr "url cá háit ar féidir an fo-mhodúl a chlónáil"
+
+#: builtin/submodule--helper.c
+msgid "depth for shallow clones"
+msgstr "doimhneacht do chlóin éadomhain"
+
+#: builtin/submodule--helper.c
+msgid "force cloning progress"
+msgstr "dul chun cinn clónaithe fórsa"
+
+#: builtin/submodule--helper.c
+msgid "disallow cloning into non-empty directory"
+msgstr "clónú a dhícheadú isteach i eolaire neamh-folamh"
+
+#: builtin/submodule--helper.c
+msgid ""
+"git submodule--helper clone [--prefix=<path>] [--quiet] [--reference "
+"<repository>] [--name <name>] [--depth <depth>] [--single-branch] [--filter "
+"<filter-spec>] --url <url> --path <path>"
+msgstr ""
+"git submodule--helper clone [--prefix=<path>] [--quiet] [--reference "
+"<repository>] [--name <name>] [--depth <depth>] [--single-branch] [--filter "
+"<filter-spec>] --url <url> --path <path>"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Invalid update mode '%s' configured for submodule path '%s'"
+msgstr ""
+"Modh nuashonraithe neamhbhailí '%s' cumraithe le haghaidh cosán fo-mhodúil "
+"'%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule path '%s' not initialized"
+msgstr "Níor thosaigh cosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+msgid "Maybe you want to use 'update --init'?"
+msgstr "B'fhéidir gur mhaith leat 'update --init' a úsáid?"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Skipping unmerged submodule %s"
+msgstr "Fo-mhodúl neamh-mheánaithe %s a scipeáil"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Skipping submodule '%s'"
+msgstr "Fo-mhodúl '%s' a scipeáil"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "cannot clone submodule '%s' without a URL"
+msgstr "ní féidir le fo-mhodúl '%s' a chlónú gan URL"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to clone '%s'. Retry scheduled"
+msgstr "Theip ar chlónáil '%s'. Déan iarracht sceidealta"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to clone '%s' a second time, aborting"
+msgstr "Theip ar chlónáil '%s' an dara huair, ag cur isteach"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to checkout '%s' in submodule path '%s'"
+msgstr "Ní féidir '%s' a sheiceáil i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to rebase '%s' in submodule path '%s'"
+msgstr "Ní féidir '%s' a athbhunú i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to merge '%s' in submodule path '%s'"
+msgstr "Ní féidir '%s' a chumasc i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Execution of '%s %s' failed in submodule path '%s'"
+msgstr "Theip ar fhorghníomhú '%s %s' i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule path '%s': checked out '%s'\n"
+msgstr "Conair fo-mhodúil '%s': seiceáil amach '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule path '%s': rebased into '%s'\n"
+msgstr "Conair fo-mhodúil '%s': athbhunaithe go '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule path '%s': merged in '%s'\n"
+msgstr "Conair fo-mhodúil '%s': cumasc i '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Submodule path '%s': '%s %s'\n"
+msgstr "Conair fo-mhodúil '%s': '%s %s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to fetch in submodule path '%s'; trying to directly fetch %s:"
+msgstr ""
+"Ní féidir cosán fo-mhodúil '%s' a fháil; ag iarraidh %s a fháil go díreach:"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"Fetched in submodule path '%s', but it did not contain %s. Direct fetching "
+"of that commit failed."
+msgstr ""
+"Faightear i gcosán fo-mhodúil '%s', ach ní raibh %s ann. Theip ar an "
+"tiomantas sin a thógáil go díreach."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "could not initialize submodule at path '%s'"
+msgstr "ní fhéadfaí fo-mhodúl a thosú ag cosán '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"Submodule (%s) branch configured to inherit branch from superproject, but "
+"the superproject is not on any branch"
+msgstr ""
+"Brainse fo-mhodúil (%s) atá cumraithe chun brainse a oidhreacht ó "
+"sárthionscadal, ach níl an sárthionscadal ar aon bhrainse"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to find current revision in submodule path '%s'"
+msgstr "Ní féidir an t-athbhreithniú reatha a fháil i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to fetch in submodule path '%s'"
+msgstr "Ní féidir le cosán fo-mhodúil '%s' a fháil"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Unable to find %s revision in submodule path '%s'"
+msgstr "Ní féidir athbhreithniú %s a aimsiú i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to recurse into submodule path '%s'"
+msgstr "Theip ar athshlánú isteach i gcosán fo-mhodúil '%s'"
+
+#: builtin/submodule--helper.c
+msgid "force checkout updates"
+msgstr "nuashonruithe seiceála de"
+
+#: builtin/submodule--helper.c
+msgid "initialize uninitialized submodules before update"
+msgstr "fo-mhodúil neamhthosaithe a thosú roimh an nuashonrú"
+
+#: builtin/submodule--helper.c
+msgid "use SHA-1 of submodule's remote tracking branch"
+msgstr "úsáid SHA-1 de bhrainse cianrianaithe an fho-mhodúil"
+
+#: builtin/submodule--helper.c
+msgid "traverse submodules recursively"
+msgstr "fo-mhodúil a thrasú go athshlánach"
+
+#: builtin/submodule--helper.c
+msgid "don't fetch new objects from the remote site"
+msgstr "ná faigh rudaí nua ón suíomh iargúlta"
+
+#: builtin/submodule--helper.c
+msgid "use the 'checkout' update strategy (default)"
+msgstr "úsáid an straitéis nuashonraithe 'tseiceáil' (réamhshocraithe)"
+
+#: builtin/submodule--helper.c
+msgid "use the 'merge' update strategy"
+msgstr "úsáid an straitéis nuashonraithe 'cumaisc'"
+
+#: builtin/submodule--helper.c
+msgid "use the 'rebase' update strategy"
+msgstr "bain úsáid as an straitéis nuashonraithe 'rebase'"
+
+#: builtin/submodule--helper.c
+msgid "create a shallow clone truncated to the specified number of revisions"
+msgstr ""
+"clón éadomhain a chruthú a ghearrtar go dtí an líon sonraithe athbhreithnithe"
+
+#: builtin/submodule--helper.c
+msgid "parallel jobs"
+msgstr "poist chomhthreomhara"
+
+#: builtin/submodule--helper.c
+msgid "whether the initial clone should follow the shallow recommendation"
+msgstr "cibé an chóir don chlón tosaigh an moladh éadrom a leanú"
+
+#: builtin/submodule--helper.c
+msgid "don't print cloning progress"
+msgstr "ná déan dul chun cinn clónaithe a phriontáil"
+
+#: builtin/submodule--helper.c
+msgid "disallow cloning into non-empty directory, implies --init"
+msgstr ""
+"clónú a dhícheadú isteach i eolaire neamh-folamh, tugann le tuiscint --init"
+
+#: builtin/submodule--helper.c
+msgid ""
+"git submodule [--quiet] update [--init [--filter=<filter-spec>]] [--remote] "
+"[-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-"
+"shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] "
+"[--] [<path>...]"
+msgstr ""
+"git submodule [--quiet] update [--init [--filter=<filter-spec>]] [--remote] "
+"[-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-"
+"shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] "
+"[--] [<path>...]"
+
+#: builtin/submodule--helper.c submodule.c
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr "Theip ar HEAD a réiteach mar thagartha bailí."
+
+#: builtin/submodule--helper.c
+msgid "git submodule absorbgitdirs [<options>] [<path>...]"
+msgstr "git submodule absorbgitdirs [<options>] [<path>...]"
+
+#: builtin/submodule--helper.c
+msgid "suppress output for setting url of a submodule"
+msgstr "aschur a chur faoi chois chun url fo-mhodúil a shocrú"
+
+#: builtin/submodule--helper.c
+msgid "git submodule set-url [--quiet] <path> <newurl>"
+msgstr "git submodule set-url [--quiet] <path> <newurl>"
+
+#: builtin/submodule--helper.c
+msgid "set the default tracking branch to master"
+msgstr "socraigh an mbrainse rianaithe réamhshocraithe chun"
+
+#: builtin/submodule--helper.c
+msgid "set the default tracking branch"
+msgstr "socraigh an brainse rianaithe réamhshoc"
+
+#: builtin/submodule--helper.c
+msgid "git submodule set-branch [-q|--quiet] (-d|--default) <path>"
+msgstr "git submodule set-branch [-q|--quiet] (-d|--default) <path>"
+
+#: builtin/submodule--helper.c
+msgid "git submodule set-branch [-q|--quiet] (-b|--branch) <branch> <path>"
+msgstr "git submodule set-branch [-q|--quiet] (-b|--branch) <branch> <path>"
+
+#: builtin/submodule--helper.c
+msgid "--branch or --default required"
+msgstr "--branch nó --default ag teastáil"
+
+#: builtin/submodule--helper.c
+msgid "print only error messages"
+msgstr "teachtaireachtaí earráide amháin a phrion"
+
+#: builtin/submodule--helper.c
+msgid "force creation"
+msgstr "cruthú fórsa"
+
+#: builtin/submodule--helper.c
+msgid "show whether the branch would be created"
+msgstr "taispeáint an cruthófaí an mbrainse"
+
+#: builtin/submodule--helper.c
+msgid ""
+"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--"
+"quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>"
+msgstr ""
+"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--"
+"quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "creating branch '%s'"
+msgstr "ag cruthú brainse '%s'"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Adding existing repo at '%s' to the index\n"
+msgstr "Ag cur repo atá ann cheana ag '%s' leis an innéacs\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "'%s' already exists and is not a valid git repo"
+msgstr "Tá '%s' ann cheana féin agus ní repo git bailí é"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "A git directory for '%s' is found locally with remote(s):\n"
+msgstr "Faightear eolaire git le haghaidh '%s' go háitiúil le cianda(í):\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid ""
+"If you want to reuse this local git directory instead of cloning again from\n"
+" %s\n"
+"use the '--force' option. If the local git directory is not the correct "
+"repo\n"
+"or you are unsure what this means choose another name with the '--name' "
+"option."
+msgstr ""
+"Más mian leat an eolaire git áitiúil seo a athúsáid in ionad clónú arís ó\n"
+" %s\n"
+"bain úsáid as an rogha '--force'. Mura bhfuil an t-eolaire git áitiúil an "
+"repo ceart\n"
+"nó níl tú cinnte cad a chiallaíonn sé seo roghnaigh ainm eile leis an rogha "
+"'--name'."
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Reactivating local git directory for submodule '%s'\n"
+msgstr "Eolaire git áitiúil a athghníomhachtú do fho-mhodúl '%s'\n"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "unable to checkout submodule '%s'"
+msgstr "ní féidir le fo-mhodúl '%s' a sheiceáil"
+
+#: builtin/submodule--helper.c
+msgid "please make sure that the .gitmodules file is in the working tree"
+msgstr "déan cinnte go bhfuil an comhad .gitmodules sa chrann oibre"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to add submodule '%s'"
+msgstr "Theip ar fho-mhodúl '%s' a chur leis"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "Failed to register submodule '%s'"
+msgstr "Theip ar fho-mhodúl '%s' a chlárú"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "'%s' already exists in the index"
+msgstr "Tá '%s' ann cheana féin san innéacs"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "'%s' already exists in the index and is not a submodule"
+msgstr "Tá '%s' ann cheana féin san innéacs agus ní fo-mhodúl é"
+
+#: builtin/submodule--helper.c read-cache.c
+#, c-format
+msgid "'%s' does not have a commit checked out"
+msgstr "Níl tiomantas seiceáilte ag '%s'"
+
+#: builtin/submodule--helper.c
+msgid "branch of repository to add as submodule"
+msgstr "brainse an stór le cur mar fho-mhodúl"
+
+#: builtin/submodule--helper.c
+msgid "allow adding an otherwise ignored submodule path"
+msgstr "ligean cosán fo-mhodúil a neamhaird a chur leis"
+
+#: builtin/submodule--helper.c
+msgid "borrow the objects from reference repositories"
+msgstr "iasacht na rudaí ó stórais tagartha"
+
+#: builtin/submodule--helper.c
+msgid ""
+"sets the submodule's name to the given string instead of defaulting to its "
+"path"
+msgstr ""
+"socraíonn ainm an fho-mhodúil don teaghrán a thugtar in ionad réamhshocrú ar "
+"a chosán"
+
+#: builtin/submodule--helper.c
+msgid "git submodule add [<options>] [--] <repository> [<path>]"
+msgstr "git submodule add [<options>] [--] <repository> [<path>]"
+
+#: builtin/submodule--helper.c
+msgid "Relative path can only be used from the toplevel of the working tree"
+msgstr "Ní féidir cosán coibhneasta a úsáid ach ó bharr an chrainn oibre"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "repo URL: '%s' must be absolute or begin with ./|../"
+msgstr "repo URL: caithfidh '%s' a bheith iomlán nó tosú leis. /| .. /"
+
+#: builtin/submodule--helper.c
+#, c-format
+msgid "'%s' is not a valid submodule name"
+msgstr "Ní ainm bailí fo-mhodúil é '%s'"
+
+#: builtin/submodule--helper.c
+msgid "git submodule--helper <command>"
+msgstr "git submodule--helper <command>"
+
+#: builtin/symbolic-ref.c
+msgid "git symbolic-ref [-m <reason>] <name> <ref>"
+msgstr "git symbolic-ref [-m <reason>] <name> <ref>"
+
+#: builtin/symbolic-ref.c
+msgid "git symbolic-ref [-q] [--short] [--no-recurse] <name>"
+msgstr "git symbolic-ref [-q] [--short] [--no-recurse] <name>"
+
+#: builtin/symbolic-ref.c
+msgid "git symbolic-ref --delete [-q] <name>"
+msgstr "git symbolic-ref --delete [-q] <name>"
+
+#: builtin/symbolic-ref.c
+msgid "suppress error message for non-symbolic (detached) refs"
+msgstr ""
+"teachtaireacht earráide a chur faoi chois le haghaidh tuairimí neamh-"
+"shiombalacha"
+
+#: builtin/symbolic-ref.c
+msgid "delete symbolic ref"
+msgstr "scrios tagairt siombalach"
+
+#: builtin/symbolic-ref.c
+msgid "shorten ref output"
+msgstr "aschur tagairt a ghiorrú"
+
+#: builtin/symbolic-ref.c
+msgid "recursively dereference (default)"
+msgstr "dereference athshlánach (réamhshocraithe)"
+
+#: builtin/symbolic-ref.c builtin/update-ref.c
+msgid "reason"
+msgstr "cúis"
+
+#: builtin/symbolic-ref.c builtin/update-ref.c
+msgid "reason of the update"
+msgstr "cúis an nuashonraithe"
+
+#: builtin/tag.c
+msgid ""
+"git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]\n"
+" [(--trailer <token>[(=|:)<value>])...]\n"
+" <tagname> [<commit> | <object>]"
+msgstr ""
+"git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]\n"
+" [(--trailer <token>[(=|:)<value>])...]\n"
+" <tagname> [<commit> | <object>]"
+
+#: builtin/tag.c
+msgid "git tag -d <tagname>..."
+msgstr "git tag -d <tagname>..."
+
+#: builtin/tag.c
+msgid ""
+"git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]\n"
+" [--points-at <object>] [--column[=<options>] | --no-column]\n"
+" [--create-reflog] [--sort=<key>] [--format=<format>]\n"
+" [--merged <commit>] [--no-merged <commit>] [<pattern>...]"
+msgstr ""
+"<commit>tag git [-n [<num>]] -l [--conté] [--no-conté<commit>]\n"
+" <options>[--points-ag<object>] [--column [=] | --no-column]\n"
+" <key><format>[--create-reflog] [--sort=] [--format =]\n"
+" <pattern>[--cumaisc<commit>] [--no-cumaisc] [...<commit>]"
+
+#: builtin/tag.c
+msgid "git tag -v [--format=<format>] <tagname>..."
+msgstr "<format><tagname>tag git -v [--format =]..."
+
+#: builtin/tag.c
+#, c-format
+msgid "tag '%s' not found."
+msgstr "níor aimsíodh tag '%s'."
+
+#: builtin/tag.c
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr "Clib scriosta '%s' (bhí %s)\n"
+
+#: builtin/tag.c
+#, c-format
+msgid ""
+"\n"
+"Write a message for tag:\n"
+" %s\n"
+"Lines starting with '%s' will be ignored.\n"
+msgstr ""
+"\n"
+"Scríobh teachtaireacht don chlib:\n"
+" %s\n"
+"Déanfar neamhaird ar línte a thosaíonn le '%s'.\n"
+
+#: builtin/tag.c
+#, c-format
+msgid ""
+"\n"
+"Write a message for tag:\n"
+" %s\n"
+"Lines starting with '%s' will be kept; you may remove them yourself if you "
+"want to.\n"
+msgstr ""
+"\n"
+"Scríobh teachtaireacht don chlib:\n"
+" %s\n"
+"Coinneofar línte a thosaíonn le '%s'; féadfaidh tú iad a bhaint féin más "
+"mian leat.\n"
+
+#: builtin/tag.c
+msgid "unable to sign the tag"
+msgstr "in ann an chlib a shíniú"
+
+#: builtin/tag.c
+#, c-format
+msgid ""
+"You have created a nested tag. The object referred to by your new tag is\n"
+"already a tag. If you meant to tag the object that it points to, use:\n"
+"\n"
+"\tgit tag -f %s %s^{}"
+msgstr ""
+"Tá clib neadaithe cruthaithe agat. Is é an réad dá dtagraíonn do chlib nua\n"
+"clib cheana féin. Má bhí sé i gceist agat an réad a thugann sé in iúl dó a "
+"chlibeáil, bain úsáid as:\n"
+"\n"
+" clib git -f %s %s^ {}"
+
+#: builtin/tag.c
+msgid "bad object type."
+msgstr "droch-chineál réad."
+
+#: builtin/tag.c
+msgid "no tag message?"
+msgstr "gan aon teachtaireacht clib?"
+
+#: builtin/tag.c
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr "Tá an teachtaireacht clib fágtha i %s\n"
+
+#: builtin/tag.c
+msgid "list tag names"
+msgstr "ainmneacha clibeanna liosta"
+
+#: builtin/tag.c
+msgid "print <n> lines of each tag message"
+msgstr "<n>línte priontála de gach teachtaireacht clib"
+
+#: builtin/tag.c
+msgid "delete tags"
+msgstr "clibeanna a scriosadh"
+
+#: builtin/tag.c
+msgid "verify tags"
+msgstr "clibeanna a fíorú"
+
+#: builtin/tag.c
+msgid "Tag creation options"
+msgstr "Roghanna cruthaithe clibeanna"
+
+#: builtin/tag.c
+msgid "annotated tag, needs a message"
+msgstr "clib anótáilte, teastaíonn teachtaireacht"
+
+#: builtin/tag.c
+msgid "tag message"
+msgstr "teachtaireacht tag"
+
+#: builtin/tag.c
+msgid "force edit of tag message"
+msgstr "eagarthóireacht fórsa ar theachtaireacht"
+
+#: builtin/tag.c
+msgid "annotated and GPG-signed tag"
+msgstr "clib anótáilte agus sínithe GPS"
+
+#: builtin/tag.c
+msgid "use another key to sign the tag"
+msgstr "bain úsáid as eochair eile chun an chlib a shíniú"
+
+#: builtin/tag.c
+msgid "replace the tag if exists"
+msgstr "athsholáthar an chlib má tá sé ann"
+
+#: builtin/tag.c builtin/update-ref.c
+msgid "create a reflog"
+msgstr "cruthaigh reflog"
+
+#: builtin/tag.c
+msgid "Tag listing options"
+msgstr "Roghanna liostaithe clibeanna"
+
+#: builtin/tag.c
+msgid "show tag list in columns"
+msgstr "taispeáin liosta clibeanna i gcolúin"
+
+#: builtin/tag.c
+msgid "print only tags that contain the commit"
+msgstr "clibeanna a phriontáil ach ina bhfuil an tiomantas"
+
+#: builtin/tag.c
+msgid "print only tags that don't contain the commit"
+msgstr "clibeanna nach bhfuil an tiomantas a phriontáil ach amháin"
+
+#: builtin/tag.c
+msgid "print only tags that are merged"
+msgstr "clibeanna a chumasc amháin a phriontáil"
+
+#: builtin/tag.c
+msgid "print only tags that are not merged"
+msgstr "clibeanna nach ndéantar cumaisc a phriontáil ach amháin"
+
+#: builtin/tag.c
+msgid "print only tags of the object"
+msgstr "clibeanna den réad amháin a phriontáil"
+
+#: builtin/tag.c
+msgid "could not start 'git column'"
+msgstr "ní fhéadfaí 'git column' a thosú"
+
+#: builtin/tag.c
+#, c-format
+msgid "the '%s' option is only allowed in list mode"
+msgstr "ní cheadaítear an rogha '%s' ach i mód liosta"
+
+#: builtin/tag.c
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr "Ní ainm bailí clibeanna é '%s'."
+
+#: builtin/tag.c
+#, c-format
+msgid "tag '%s' already exists"
+msgstr "tá clib '%s' ann cheana féin"
+
+#: builtin/tag.c sequencer.c
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr "Modh glantacháin neamhbhailí %s"
+
+#: builtin/tag.c
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr "Clib nuashonraithe '%s' (bhí %s)\n"
+
+#: builtin/unpack-objects.c
+msgid "pack exceeds maximum allowed size"
+msgstr "sáraíonn an pacáiste an méid uasta a"
+
+#: builtin/unpack-objects.c
+msgid "failed to write object in stream"
+msgstr "theip ar réad a scríobh sa sruth"
+
+#: builtin/unpack-objects.c
+#, c-format
+msgid "inflate returned (%d)"
+msgstr "inflate ar ais (%d)"
+
+#: builtin/unpack-objects.c
+msgid "invalid blob object from stream"
+msgstr "réad blob neamhbhailí ón sruth"
+
+#: builtin/unpack-objects.c
+msgid "Unpacking objects"
+msgstr "Rudaí a dhíphacáil"
+
+#: builtin/update-index.c
+#, c-format
+msgid "failed to create directory %s"
+msgstr "theip ar eolaire %s a chruthú"
+
+#: builtin/update-index.c
+#, c-format
+msgid "failed to delete file %s"
+msgstr "theip ar chomhad %s a scriosadh"
+
+#: builtin/update-index.c
+#, c-format
+msgid "failed to delete directory %s"
+msgstr "theip ar eolaire %s a scriosadh"
+
+#: builtin/update-index.c
+#, c-format
+msgid "Testing mtime in '%s' "
+msgstr "Tástáil mtime i '%s' "
+
+#: builtin/update-index.c
+msgid "directory stat info does not change after adding a new file"
+msgstr "ní athraíonn eolas stat eolaire tar éis comhad nua a chur leis"
+
+#: builtin/update-index.c
+msgid "directory stat info does not change after adding a new directory"
+msgstr "ní athraíonn eolas stat eolaire tar éis eolaire nua a chur leis"
+
+#: builtin/update-index.c
+msgid "directory stat info changes after updating a file"
+msgstr "athraíonn faisnéis eolaire stat tar éis comhad a nuashonrú"
+
+#: builtin/update-index.c
+msgid "directory stat info changes after adding a file inside subdirectory"
+msgstr ""
+"athraíonn eolas stat eolaire tar éis comhad a chur taobh istigh den fho-"
+"eolaire"
+
+#: builtin/update-index.c
+msgid "directory stat info does not change after deleting a file"
+msgstr "ní athraíonn eolas stat eolaire tar éis comhad a scriosadh"
+
+#: builtin/update-index.c
+msgid "directory stat info does not change after deleting a directory"
+msgstr "ní athraíonn eolas stat eolaire tar éis eolaire a scriosadh"
+
+#: builtin/update-index.c
+msgid " OK"
+msgstr " CEART GO LEOR"
+
+#: builtin/update-index.c
+msgid "git update-index [<options>] [--] [<file>...]"
+msgstr "<file>git update-index [<options>] [--] [...]"
+
+#: builtin/update-index.c
+msgid "continue refresh even when index needs update"
+msgstr "leanúint ar aghaidh ar aghaidh ag athnuachan fiú nu"
+
+#: builtin/update-index.c
+msgid "refresh: ignore submodules"
+msgstr "athnuachan: neamhaird a dhéanamh ar fho"
+
+#: builtin/update-index.c
+msgid "do not ignore new files"
+msgstr "ná déan neamhaird de chomhaid nua"
+
+#: builtin/update-index.c
+msgid "let files replace directories and vice-versa"
+msgstr "lig do chomhaid eolairí in ionad agus a mhalairt"
+
+#: builtin/update-index.c
+msgid "notice files missing from worktree"
+msgstr "fógra comhaid atá ar iarraidh ón gcrann oibre"
+
+#: builtin/update-index.c
+msgid "refresh even if index contains unmerged entries"
+msgstr "athnuachan fiú má tá iontrálacha neamh-iontrálacha"
+
+#: builtin/update-index.c
+msgid "refresh stat information"
+msgstr "faisnéis stáit a athnuachan"
+
+#: builtin/update-index.c
+msgid "like --refresh, but ignore assume-unchanged setting"
+msgstr "cosúil le --refresh, ach déan neamhaird de shuíomh gan athrú"
+
+#: builtin/update-index.c
+msgid "<mode>,<object>,<path>"
+msgstr "<mode>,<object>, <path>"
+
+#: builtin/update-index.c
+msgid "add the specified entry to the index"
+msgstr "cuir an iontráil sonraithe leis an innéacs"
+
+#: builtin/update-index.c
+msgid "mark files as \"not changing\""
+msgstr "comhad a mharcáil mar “gan athrú”"
+
+#: builtin/update-index.c
+msgid "clear assumed-unchanged bit"
+msgstr "giotán soiléir glactha gan athrú"
+
+#: builtin/update-index.c
+msgid "mark files as \"index-only\""
+msgstr "comhad a mharcáil mar “innéacs amháin”"
+
+#: builtin/update-index.c
+msgid "clear skip-worktree bit"
+msgstr "giotán crainn oibre scipeála soiléir"
+
+#: builtin/update-index.c
+msgid "do not touch index-only entries"
+msgstr "ná déan teagmháil le iontrálacha innéacs amháin"
+
+#: builtin/update-index.c
+msgid "add to index only; do not add content to object database"
+msgstr "cuir le hinnéacs amháin; ná cuir ábhar le bunachar sonraí réada"
+
+#: builtin/update-index.c
+msgid "remove named paths even if present in worktree"
+msgstr "bain cosáin ainmnithe fiú má tá sé i gcrann oibre"
+
+#: builtin/update-index.c
+msgid "with --stdin: input lines are terminated by null bytes"
+msgstr "le --stdin: cuirtear deireadh le línte ionchuir le bytes null"
+
+#: builtin/update-index.c
+msgid "read list of paths to be updated from standard input"
+msgstr "léigh liosta na gcosáin atá le nuashonrú ó ionchur caighdeánach"
+
+#: builtin/update-index.c
+msgid "add entries from standard input to the index"
+msgstr "cuir iontrálacha ón ionchur caighdeánach leis an innéacs"
+
+#: builtin/update-index.c
+msgid "repopulate stages #2 and #3 for the listed paths"
+msgstr "céimeanna #2 agus #3 a athdhíonrú do na cosáin liostaithe"
+
+#: builtin/update-index.c
+msgid "only update entries that differ from HEAD"
+msgstr "ach iontrálacha a nuashonrú atá difriúil ó HEAD"
+
+#: builtin/update-index.c
+msgid "ignore files missing from worktree"
+msgstr "neamhaird a dhéanamh ar chomhaid atá in easnamh"
+
+#: builtin/update-index.c
+msgid "report actions to standard output"
+msgstr "gníomhartha a thuairisciú go dtí"
+
+#: builtin/update-index.c
+msgid "(for porcelains) forget saved unresolved conflicts"
+msgstr "(le haghaidh poircealláin) déan dearmad ar choimhlintí gan réiteach"
+
+#: builtin/update-index.c
+msgid "write index in this format"
+msgstr "scríobh innéacs san fhormáid seo"
+
+#: builtin/update-index.c
+msgid "report on-disk index format version"
+msgstr "leagan formáid innéacs ar dhiosca tuairisc"
+
+#: builtin/update-index.c
+msgid "enable or disable split index"
+msgstr "innéacs scoilte a chumasú nó a dh"
+
+#: builtin/update-index.c
+msgid "enable/disable untracked cache"
+msgstr "taisce neamhrianaithe a chumasú/a dhíchumasú"
+
+#: builtin/update-index.c
+msgid "test if the filesystem supports untracked cache"
+msgstr "tástáil an dtacaíonn an córas comhaid le taisce neamhrianaithe"
+
+#: builtin/update-index.c
+msgid "enable untracked cache without testing the filesystem"
+msgstr "taisce neamhrianaithe a chumasú gan an córas comhaid a thástáil"
+
+#: builtin/update-index.c
+msgid "write out the index even if is not flagged as changed"
+msgstr ""
+"scríobh amach an t-innéacs fiú mura bhfuil sé brataithe mar a athraítear"
+
+#: builtin/update-index.c
+msgid "enable or disable file system monitor"
+msgstr "monatóireacht chórais chomhaid a chumasú"
+
+#: builtin/update-index.c
+msgid "mark files as fsmonitor valid"
+msgstr "comhad a mharcáil mar fsmonitor bailí"
+
+#: builtin/update-index.c
+msgid "clear fsmonitor valid bit"
+msgstr "giotán bailí fsmonitor soiléir"
+
+#: builtin/update-index.c
+#, c-format
+msgid "%d\n"
+msgstr "%d\n"
+
+#: builtin/update-index.c
+#, c-format
+msgid "index-version: was %d, set to %d"
+msgstr "leagan innéacs: bhí %d, socraithe go %d"
+
+#: builtin/update-index.c
+msgid ""
+"core.splitIndex is set to false; remove or change it, if you really want to "
+"enable split index"
+msgstr ""
+"tá core.splitIndex socraithe go bréagach; bain nó athraigh é, más mian leat "
+"innéacs scoilte a chumasú i ndáiríre"
+
+#: builtin/update-index.c
+msgid ""
+"core.splitIndex is set to true; remove or change it, if you really want to "
+"disable split index"
+msgstr ""
+"tá core.splitIndex socraithe go fíor; bain nó athraigh é, más mian leat "
+"innéacs scoilte a dhíchumasú"
+
+#: builtin/update-index.c
+msgid ""
+"core.untrackedCache is set to true; remove or change it, if you really want "
+"to disable the untracked cache"
+msgstr ""
+"tá core.untrackedCache go fíor; bain nó athraigh é, más mian leat an taisce "
+"neamhrianaithe a dhíchumasú"
+
+#: builtin/update-index.c
+msgid "Untracked cache disabled"
+msgstr "Taisce neamhrianaithe míchumasaithe"
+
+#: builtin/update-index.c
+msgid ""
+"core.untrackedCache is set to false; remove or change it, if you really want "
+"to enable the untracked cache"
+msgstr ""
+"tá core.untrackedCache socraithe go bréagach; bain nó athraigh é, más mian "
+"leat an taisce neamhrianaithe a chumasú"
+
+#: builtin/update-index.c
+#, c-format
+msgid "Untracked cache enabled for '%s'"
+msgstr "Cumasaíodh taisce neamhrianaithe do '%s'"
+
+#: builtin/update-index.c
+msgid "core.fsmonitor is unset; set it if you really want to enable fsmonitor"
+msgstr ""
+"tá core.fsmonitor díshocraithe; socraigh é más mian leat fsmonitor a chumasú "
+"i ndáiríre"
+
+#: builtin/update-index.c
+msgid "fsmonitor enabled"
+msgstr "fsmonitor cumasaithe"
+
+#: builtin/update-index.c
+msgid ""
+"core.fsmonitor is set; remove it if you really want to disable fsmonitor"
+msgstr ""
+"tá core.fsmonitor socraithe; bain é más mian leat fsmonitor a dhíchumasú i "
+"ndáiríre"
+
+#: builtin/update-index.c
+msgid "fsmonitor disabled"
+msgstr "fsmonitor míchumasaithe"
+
+#: builtin/update-ref.c
+msgid "git update-ref [<options>] -d <refname> [<old-oid>]"
+msgstr "<refname><old-oid>git update-ref [<options>] -d []"
+
+#: builtin/update-ref.c
+msgid "git update-ref [<options>] <refname> <new-oid> [<old-oid>]"
+msgstr "<refname><new-oid><old-oid>git update-ref [<options>] []"
+
+#: builtin/update-ref.c
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+
+#: builtin/update-ref.c
+msgid "delete the reference"
+msgstr "scrios an tagairt"
+
+#: builtin/update-ref.c
+msgid "update <refname> not the one it points to"
+msgstr "nuashon <refname>raigh ní an ceann a thugann sé in iúl"
+
+#: builtin/update-ref.c
+msgid "stdin has NUL-terminated arguments"
+msgstr "tá argóintí ag foirceannadh NUL ag stdin"
+
+#: builtin/update-ref.c
+msgid "read updates from stdin"
+msgstr "léigh nuashonruithe ó stdin"
+
+#: builtin/update-ref.c
+msgid "batch reference updates"
+msgstr "nuashonruithe tagairt baisc"
+
+#: builtin/update-server-info.c
+msgid "update the info files from scratch"
+msgstr "nuashonraigh na comhaid faisnéise ón tús"
+
+#: builtin/upload-pack.c
+msgid ""
+"git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]\n"
+" [--advertise-refs] <directory>"
+msgstr ""
+"git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]\n"
+" [--advertise-refs] <directory>"
+
+#: builtin/upload-pack.c t/helper/test-serve-v2.c
+msgid "quit after a single request/response exchange"
+msgstr "scor tar éis iarrata/malartú freagartha amháin"
+
+#: builtin/upload-pack.c
+msgid "serve up the info/refs for git-http-backend"
+msgstr "freastal suas ar na faisnéise/réimsí le haghaidh git-http-backend"
+
+#: builtin/upload-pack.c
+msgid "do not try <directory>/.git/ if <directory> is no Git directory"
+msgstr ""
+"ná déan iarracht <directory>/.git/ mura bhfuil aon eolaire G <directory> it "
+"ann"
+
+#: builtin/upload-pack.c
+msgid "interrupt transfer after <n> seconds of inactivity"
+msgstr "cur isteach ar aistriú tar éis so <n>icind neamhghníomhach"
+
+#: builtin/verify-commit.c
+msgid "git verify-commit [-v | --verbose] [--raw] <commit>..."
+msgstr "git verify-commit [-v | --verbose] [--raw] <commit>..."
+
+#: builtin/verify-commit.c
+msgid "print commit contents"
+msgstr "ábhair tiomanta priontála"
+
+#: builtin/verify-commit.c builtin/verify-tag.c
+msgid "print raw gpg status output"
+msgstr "aschur stádas amh-gpg a phriontáil"
+
+#: builtin/verify-pack.c
+msgid "git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."
+msgstr "git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."
+
+#: builtin/verify-pack.c
+msgid "verbose"
+msgstr "eolach"
+
+#: builtin/verify-pack.c
+msgid "show statistics only"
+msgstr "taispeáin staitisticí amháin"
+
+#: builtin/verify-tag.c
+msgid "git verify-tag [-v | --verbose] [--format=<format>] [--raw] <tag>..."
+msgstr "<format><tag>git verify-tag [-v | --verbose] [--format =] [--raw]..."
+
+#: builtin/verify-tag.c
+msgid "print tag contents"
+msgstr "ábhar clib priontáil"
+
+#: builtin/worktree.c
+msgid ""
+"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
+msgstr ""
+"git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n"
+" [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]"
+
+#: builtin/worktree.c
+msgid "git worktree list [-v | --porcelain [-z]]"
+msgstr "liosta crann oibre git [-v | --poirceallán [-z]]"
+
+#: builtin/worktree.c
+msgid "git worktree lock [--reason <string>] <worktree>"
+msgstr "<string>glas crann oibre git [--reason] <worktree>"
+
+#: builtin/worktree.c
+msgid "git worktree move <worktree> <new-path>"
+msgstr "gluaiseacht sraith oibre git <worktree><new-path>"
+
+#: builtin/worktree.c
+msgid "git worktree prune [-n] [-v] [--expire <expire>]"
+msgstr "<expire>git worktree prun [-n] [-v] [--dul in éag]"
+
+#: builtin/worktree.c
+msgid "git worktree remove [-f] <worktree>"
+msgstr "git worktree a bhaint [-f] <worktree>"
+
+#: builtin/worktree.c
+msgid "git worktree repair [<path>...]"
+msgstr "deisiú crainn oibre git [<path>...]"
+
+#: builtin/worktree.c
+msgid "git worktree unlock <worktree>"
+msgstr "díghlasáil git worktree <worktree>"
+
+#: builtin/worktree.c
+msgid "No possible source branch, inferring '--orphan'"
+msgstr "Níl aon bhrainse foinse féideartha, ag tabhairt faoi deara '--orphan'"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new unborn branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+msgstr ""
+"Má bhí i gceist agat crann oibre a chruthú ina bhfuil brainse nua gan "
+"breith\n"
+"(brainse gan aon ghealltanais) don stór seo, is féidir leat é sin a "
+"dhéanamh\n"
+"ag baint úsáide as an bhratach --díllí:\n"
+"\n"
+" git worktree add --orphan -b %s %s\n"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"If you meant to create a worktree containing a new unborn branch\n"
+"(branch with no commits) for this repository, you can do so\n"
+"using the --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+msgstr ""
+"Má bhí i gceist agat crann oibre a chruthú ina bhfuil brainse nua gan "
+"breith\n"
+"(brainse gan aon ghealltanais) don stór seo, is féidir leat é sin a "
+"dhéanamh\n"
+"ag baint úsáide as an --orphan flag:\n"
+"\n"
+" git worktree add --orphan %s\n"
+
+#: builtin/worktree.c
+#, c-format
+msgid "Removing %s/%s: %s"
+msgstr "Ag baint %s/%s: %s"
+
+#: builtin/worktree.c
+msgid "report pruned working trees"
+msgstr "crainn oibre gearrtha a thuairisciú"
+
+#: builtin/worktree.c
+msgid "expire working trees older than <time>"
+msgstr "dul in éag crainn oibre níos sine ná <time>"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' already exists"
+msgstr "Tá '%s' ann cheana féin"
+
+#: builtin/worktree.c
+#, c-format
+msgid "unusable worktree destination '%s'"
+msgstr "ceann scríbe crainn oibre neamhúsáidte '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"'%s' is a missing but locked worktree;\n"
+"use '%s -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear"
+msgstr ""
+"Is crann oibre atá ar iarraidh ach faoi ghlas é '%s';\n"
+"bain úsáid as '%s -f 'chun athshealbhú, nó' díghlasáil 'agus' bearradh 'nó' "
+"bhaint 'chun a ghlanadh"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"'%s' is a missing but already registered worktree;\n"
+"use '%s -f' to override, or 'prune' or 'remove' to clear"
+msgstr ""
+"Is crann oibre atá ar iarraidh ach cláraithe cheana féin é '%s';\n"
+"bain úsáid as '%s -f' chun athshlánú, nó 'bearradh' nó 'bhaint' chun a "
+"ghlanadh"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to copy '%s' to '%s'; sparse-checkout may not work correctly"
+msgstr ""
+"theip ar '%s' a chóipeáil go '%s'; b'fhéidir nach n-oibreoidh an tseiceáil "
+"neamhchoitianta i gceart"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to copy worktree config from '%s' to '%s'"
+msgstr "theip ar chumraíocht crann oibre a chóipeáil ó '%s' go '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to unset '%s' in '%s'"
+msgstr "theip ar '%s' a dhíshocrú i '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid "could not create directory of '%s'"
+msgstr "ní raibh in ann eolaire de '%s' a chruthú"
+
+#: builtin/worktree.c
+msgid "initializing"
+msgstr "a thionscnamh"
+
+#: builtin/worktree.c
+#, c-format
+msgid "could not find created worktree '%s'"
+msgstr "ní raibh an crann oibre cruthaithe '%s' a aimsiú"
+
+#: builtin/worktree.c
+#, c-format
+msgid "Preparing worktree (new branch '%s')"
+msgstr "Crann oibre a ullmhú (brainse nua '%s')"
+
+#: builtin/worktree.c
+#, c-format
+msgid "Preparing worktree (resetting branch '%s'; was at %s)"
+msgstr "Ullmhú crann oibre (athshocrú brainse '%s'; bhí ag %s)"
+
+#: builtin/worktree.c
+#, c-format
+msgid "Preparing worktree (checking out '%s')"
+msgstr "Crann oibre a ullmhú (seiceáil '%s')"
+
+#: builtin/worktree.c
+#, c-format
+msgid "unreachable: invalid reference: %s"
+msgstr "unrochtana: tagairt neamhbhailí: %s"
+
+#: builtin/worktree.c
+#, c-format
+msgid "Preparing worktree (detached HEAD %s)"
+msgstr "Crann oibre a ullmhú (CEAD scoite %s)"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"HEAD points to an invalid (or orphaned) reference.\n"
+"HEAD path: '%s'\n"
+"HEAD contents: '%s'"
+msgstr ""
+"Tugann HEAD in iúl do thagairt neamhbhailí (nó dílleachta).\n"
+"Conair CEAD: '%s'\n"
+"Ábhar CEAD: '%s'"
+
+#: builtin/worktree.c
+msgid ""
+"No local or remote refs exist despite at least one remote\n"
+"present, stopping; use 'add -f' to override or fetch a remote first"
+msgstr ""
+"Níl aon réimsí áitiúla ná iargúlta ann in ainneoin cianda amháin ar a "
+"laghad\n"
+"láthair, ag stopadh; bain úsáid as 'add -f' chun iargúlta a shárú nó a fháil "
+"ar dtús"
+
+#: builtin/worktree.c
+msgid "checkout <branch> even if already checked out in other worktree"
+msgstr ""
+"seiceáil <branch>fiú má tá sé seiceáilte cheana féin i gcrann oibre eile"
+
+#: builtin/worktree.c
+msgid "create a new branch"
+msgstr "brainse nua a chruthú"
+
+#: builtin/worktree.c
+msgid "create or reset a branch"
+msgstr "brainse a chruthú nó a athshocrú"
+
+#: builtin/worktree.c
+msgid "create unborn branch"
+msgstr "cruthú brainse gan breith"
+
+#: builtin/worktree.c
+msgid "populate the new working tree"
+msgstr "an crann oibre nua a dhaonrú"
+
+#: builtin/worktree.c
+msgid "keep the new working tree locked"
+msgstr "coinnigh an crann oibre nua faoi ghlas"
+
+#: builtin/worktree.c
+msgid "reason for locking"
+msgstr "cúis le glasáil"
+
+#: builtin/worktree.c
+msgid "set up tracking mode (see git-branch(1))"
+msgstr "modh rianaithe a bhunú (féach git-branch (1))"
+
+#: builtin/worktree.c
+msgid "try to match the new branch name with a remote-tracking branch"
+msgstr ""
+"déan iarracht ainm nua na brainse a mheaitseáil le brainse cianrianaithe"
+
+#: builtin/worktree.c
+msgid "use relative paths for worktrees"
+msgstr "úsáid cosáin choibhneasta do chrainn oibre"
+
+#: builtin/worktree.c diff.c parse-options.c
+#, c-format
+msgid "options '%s', '%s', and '%s' cannot be used together"
+msgstr "ní féidir roghanna '%s', '%s', agus '%s' a úsáid le chéile"
+
+#: builtin/worktree.c
+#, c-format
+msgid "option '%s' and commit-ish cannot be used together"
+msgstr "ní féidir rogha '%s' agus comm-ish a úsáid le chéile"
+
+#: builtin/worktree.c
+msgid "added with --lock"
+msgstr "cuireadh leis le --lock"
+
+#: builtin/worktree.c
+msgid "--[no-]track can only be used if a new branch is created"
+msgstr "Ní féidir --[no-]rian a úsáid ach amháin má chruthaítear brainse nua"
+
+#: builtin/worktree.c
+msgid "show extended annotations and reasons, if available"
+msgstr "anótaí agus cúiseanna leathnaithe a thaispeáint, má tá sé ar fáil"
+
+#: builtin/worktree.c
+msgid "add 'prunable' annotation to worktrees older than <time>"
+msgstr "cuir anótáil 'prunable' le crainn oibre níos sine ná <time>"
+
+#: builtin/worktree.c
+msgid "terminate records with a NUL character"
+msgstr "deireadh a chur le taifid le carachtar NUL"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' is not a working tree"
+msgstr "Ní crann oibre é '%s'"
+
+#: builtin/worktree.c
+msgid "The main working tree cannot be locked or unlocked"
+msgstr "Ní féidir an príomhchrann oibre a ghlasáil nó a dhíghlasáil"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' is already locked, reason: %s"
+msgstr "Tá '%s' faoi ghlas cheana féin, cúis: %s"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' is already locked"
+msgstr "Tá '%s' faoi ghlas cheana féin"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' is not locked"
+msgstr "Níl '%s' faoi ghlas"
+
+#: builtin/worktree.c
+msgid "working trees containing submodules cannot be moved or removed"
+msgstr "ní féidir crainn oibre ina bhfuil fo-mhodúil a bhogadh ná a bhaint"
+
+#: builtin/worktree.c
+msgid "force move even if worktree is dirty or locked"
+msgstr "bogadh fórsa fiú má tá crann oibre salach nó faoi ghlas"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' is a main working tree"
+msgstr "Is príomhchrann oibre é '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid "could not figure out destination name from '%s'"
+msgstr "ní fhéadfaí ainm ceann scríbe a fháil amach ó '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"cannot move a locked working tree, lock reason: %s\n"
+"use 'move -f -f' to override or unlock first"
+msgstr ""
+"ní féidir crann oibre faoi ghlas a bhogadh, cúis ghlasála: %s\n"
+"bain úsáid as 'move -f -f' chun athshárú nó a dhíghlasáil ar dtús"
+
+#: builtin/worktree.c
+msgid ""
+"cannot move a locked working tree;\n"
+"use 'move -f -f' to override or unlock first"
+msgstr ""
+"ní féidir le crann oibre faoi ghlas a bhogadh;\n"
+"bain úsáid as 'move -f -f' chun athshárú nó a dhíghlasáil ar dtús"
+
+#: builtin/worktree.c
+#, c-format
+msgid "validation failed, cannot move working tree: %s"
+msgstr "theip ar bhailíochtú, ní féidir crann oibre a bhogadh: %s"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to move '%s' to '%s'"
+msgstr "theip ar '%s' a bhogadh go '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to run 'git status' on '%s'"
+msgstr "theip ar 'git status' a reáchtáil ar '%s'"
+
+#: builtin/worktree.c
+#, c-format
+msgid "'%s' contains modified or untracked files, use --force to delete it"
+msgstr ""
+"Tá comhaid modhnaithe nó neamhrianaithe i '%s', bain úsáid as --force chun é "
+"a scriosadh"
+
+#: builtin/worktree.c
+#, c-format
+msgid "failed to run 'git status' on '%s', code %d"
+msgstr "theip ar 'git status' a reáchtáil ar '%s', cód %d"
+
+#: builtin/worktree.c
+msgid "force removal even if worktree is dirty or locked"
+msgstr "bhaint fórsa fiú má tá crann oibre salach nó faoi ghlas"
+
+#: builtin/worktree.c
+#, c-format
+msgid ""
+"cannot remove a locked working tree, lock reason: %s\n"
+"use 'remove -f -f' to override or unlock first"
+msgstr ""
+"ní féidir crann oibre faoi ghlas a bhaint, cúis ghlasála: %s\n"
+"bain úsáid as 'remove -f -f' chun athshárú nó a dhíghlasáil ar dtús"
+
+#: builtin/worktree.c
+msgid ""
+"cannot remove a locked working tree;\n"
+"use 'remove -f -f' to override or unlock first"
+msgstr ""
+"ní féidir crann oibre faoi ghlas a bhaint;\n"
+"bain úsáid as 'remove -f -f' chun athshárú nó a dhíghlasáil ar dtús"
+
+#: builtin/worktree.c
+#, c-format
+msgid "validation failed, cannot remove working tree: %s"
+msgstr "theip ar bhailíochtú, ní féidir crann oibre a bhaint: %s"
+
+#: builtin/worktree.c
+#, c-format
+msgid "repair: %s: %s"
+msgstr "deisiú: %s: %s"
+
+#: builtin/worktree.c
+#, c-format
+msgid "error: %s: %s"
+msgstr "earráid: %s: %s"
+
+#: builtin/write-tree.c
+msgid "git write-tree [--missing-ok] [--prefix=<prefix>/]"
+msgstr "git write-tree [--missing-ok] [--prefix=<prefix>/]"
+
+#: builtin/write-tree.c
+msgid "<prefix>/"
+msgstr "<prefix>/"
+
+#: builtin/write-tree.c
+msgid "write tree object for a subdirectory <prefix>"
+msgstr "scríobh réad crann le haghaidh fo-eolaire <prefix>"
+
+#: builtin/write-tree.c
+msgid "only useful for debugging"
+msgstr "ach úsáideach le haghaidh dífhabhtú"
+
+#: bulk-checkin.c
+msgid "core.fsyncMethod = batch is unsupported on this platform"
+msgstr "core.fsyncMethod = ní thacaítear leis an bhaisc ar an ardán seo"
+
+#: bundle-uri.c
+#, c-format
+msgid "could not parse bundle list key %s with value '%s'"
+msgstr "ní fhéadfaí eochair liosta beartán %s a pháirseáil le luach '%s'"
+
+#: bundle-uri.c
+#, c-format
+msgid "bundle list at '%s' has no mode"
+msgstr "níl aon mhodh ag liosta beartán ag '%s'"
+
+#: bundle-uri.c
+msgid "failed to create temporary file"
+msgstr "theip ar chomhad sealadach a chruthú"
+
+#: bundle-uri.c
+msgid "insufficient capabilities"
+msgstr "cumais neamhleor"
+
+#: bundle-uri.c
+#, c-format
+msgid "file downloaded from '%s' is not a bundle"
+msgstr "ní beartán é an comhad a íoslódáladh ó '%s'"
+
+#: bundle-uri.c
+msgid "failed to store maximum creation token"
+msgstr "theip ar an comhartha cruthaithe uasta a stórá"
+
+#: bundle-uri.c
+#, c-format
+msgid "unrecognized bundle mode from URI '%s'"
+msgstr "modh beartán neamhaithnithe ó URI '%s'"
+
+#: bundle-uri.c
+#, c-format
+msgid "exceeded bundle URI recursion limit (%d)"
+msgstr "sháraigh teorainn athshlánaithe URI beartán (%d)"
+
+#: bundle-uri.c
+#, c-format
+msgid "failed to download bundle from URI '%s'"
+msgstr "theip ar an mbeartán a íoslódáil ó URI '%s'"
+
+#: bundle-uri.c
+#, c-format
+msgid "file at URI '%s' is not a bundle or bundle list"
+msgstr "comhad ag URI ní beacán nó liosta beartán é '%s'"
+
+#: bundle-uri.c
+#, c-format
+msgid "bundle-uri: unexpected argument: '%s'"
+msgstr "bundle-uri: argóint gan choinne: '%s'"
+
+#: bundle-uri.c
+msgid "bundle-uri: expected flush after arguments"
+msgstr "bundle-uri: súil le sruth tar éis argóintí"
+
+#: bundle-uri.c
+msgid "bundle-uri: got an empty line"
+msgstr "bundle-uri: got an líne folamh"
+
+#: bundle-uri.c
+msgid "bundle-uri: line is not of the form 'key=value'"
+msgstr "bundle-uri: níl an líne den fhoirm 'key=value'"
+
+#: bundle-uri.c
+msgid "bundle-uri: line has empty key or value"
+msgstr "bundle-uri: tá eochair nó luach folamh ag líne"
+
+#: bundle.c
+#, c-format
+msgid "unrecognized bundle hash algorithm: %s"
+msgstr "algartam hash beartán gan aithint: %s"
+
+#: bundle.c
+#, c-format
+msgid "unknown capability '%s'"
+msgstr "cumas anaithnid '%s'"
+
+#: bundle.c
+#, c-format
+msgid "'%s' does not look like a v2 or v3 bundle file"
+msgstr "Níl cuma '%s' cosúil le comhad beartán v2 nó v3"
+
+#: bundle.c
+#, c-format
+msgid "unrecognized header: %s%s (%d)"
+msgstr "ceanntásc gan aithint: %s%s (%d)"
+
+#: bundle.c
+msgid "Repository lacks these prerequisite commits:"
+msgstr "Níl na tiomantas réamhriachtanais seo ag an stór:"
+
+#: bundle.c
+msgid ""
+"some prerequisite commits exist in the object store, but are not connected "
+"to the repository's history"
+msgstr ""
+"tá roinnt gealltanais réamhriachtanais ann sa stór réada, ach níl siad "
+"ceangailte le stair an stór"
+
+#: bundle.c
+#, c-format
+msgid "The bundle contains this ref:"
+msgid_plural "The bundle contains these %<PRIuMAX> refs:"
+msgstr[0] "Tá an tagairt seo sa phacáiste:"
+msgstr[1] "Tá na tagairtí %<PRIuMAX> seo sa phacáiste:"
+msgstr[2] "Tá na tagairtí %<PRIuMAX> seo sa phacáiste:"
+
+#: bundle.c
+msgid "The bundle records a complete history."
+msgstr "Taifeadann an beartán stair iomlán."
+
+#: bundle.c
+#, c-format
+msgid "The bundle requires this ref:"
+msgid_plural "The bundle requires these %<PRIuMAX> refs:"
+msgstr[0] "Éilíonn an pacáiste seo an tagairt:"
+msgstr[1] "Éilíonn an pacáiste seo na tagairtí %<PRIuMAX> seo:"
+msgstr[2] "Éilíonn an pacáiste seo na tagairtí %<PRIuMAX> seo:"
+
+#: bundle.c
+#, c-format
+msgid "The bundle uses this hash algorithm: %s"
+msgstr "Úsáideann an beartán an algartam hash seo: %s"
+
+#: bundle.c
+#, c-format
+msgid "The bundle uses this filter: %s"
+msgstr "Úsáideann an beartán an scagaire seo: %s"
+
+#: bundle.c
+msgid "unable to dup bundle descriptor"
+msgstr "nach féidir tuairiscí a chur ar bhearnadh"
+
+#: bundle.c
+msgid "Could not spawn pack-objects"
+msgstr "Ní fhéadfaí rudaí pacáiste a shannadh"
+
+#: bundle.c
+msgid "pack-objects died"
+msgstr "rudaí pacáiste fuair bás"
+
+#: bundle.c
+#, c-format
+msgid "ref '%s' is excluded by the rev-list options"
+msgstr "tá ref '%s' eisiata ag na roghanna rev-list"
+
+#: bundle.c
+#, c-format
+msgid "unsupported bundle version %d"
+msgstr "leagan beartán gan tacaíocht %d"
+
+#: bundle.c
+#, c-format
+msgid "cannot write bundle version %d with algorithm %s"
+msgstr "ní féidir leagan beartán %d a scríobh le algartam %s"
+
+#: bundle.c
+msgid "Refusing to create empty bundle."
+msgstr "Diúltú beartán folamh a chruthú."
+
+#: bundle.c
+#, c-format
+msgid "cannot create '%s'"
+msgstr "ní féidir '%s' a chruthú"
+
+#: bundle.c
+msgid "index-pack died"
+msgstr "fuair an pacáiste innéacs"
+
+#: cache-tree.c
+#, c-format
+msgid "directory '%s' is present in index, but not sparse"
+msgstr "tá eolaire '%s' i láthair in innéacs, ach níl sé neamhchoitianta"
+
+#: cache-tree.c unpack-trees.c
+msgid "corrupted cache-tree has entries not present in index"
+msgstr ""
+"tá iontrálacha nach bhfuil i láthair san innéacs ag crann cache-crainn "
+"truaillte"
+
+#: cache-tree.c
+#, c-format
+msgid "%s with flags 0x%x should not be in cache-tree"
+msgstr "Níor chóir go mbeadh %s le bratacha 0x%x i gcrann cache-tree"
+
+#: cache-tree.c
+#, c-format
+msgid "bad subtree '%.*s'"
+msgstr "droch-fho-chrann '%.*s'"
+
+#: cache-tree.c
+#, c-format
+msgid "cache-tree for path %.*s does not match. Expected %s got %s"
+msgstr ""
+"ní hionann crann-taisce don chonair %.*s. Bhíothas ag súil le %s, ach fuair "
+"%s"
+
+#: chunk-format.c
+msgid "terminating chunk id appears earlier than expected"
+msgstr "is cosúil le feiceáil id cúince a fhoirceannadh níos luaithe"
+
+#: chunk-format.c
+#, c-format
+msgid "chunk id %<PRIx32> not %d-byte aligned"
+msgstr "id chosc% <PRIx32>nach bhfuil %d-byte ailínithe"
+
+#: chunk-format.c
+#, c-format
+msgid "improper chunk offset(s) %<PRIx64> and %<PRIx64>"
+msgstr "fritháireamh píosa míchuí (í)% <PRIx64>agus% <PRIx64>"
+
+#: chunk-format.c
+#, c-format
+msgid "duplicate chunk ID %<PRIx32> found"
+msgstr "aimsíodh ID smután dúblach %<PRIx32>"
+
+#: chunk-format.c
+#, c-format
+msgid "final chunk has non-zero id %<PRIx32>"
+msgstr "tá id neamh-nialasach ag an gcuid deiridh% <PRIx32>"
+
+#: chunk-format.c
+msgid "invalid hash version"
+msgstr "leagan hash neamhbhailí"
+
+#: color.c
+#, c-format
+msgid "invalid color value: %.*s"
+msgstr "luach dath neamhbhailí: %.*s"
+
+#: command-list.h
+msgid "Add file contents to the index"
+msgstr "Cuir ábhar an chomhaid leis an innéacs"
+
+#: command-list.h
+msgid "Apply a series of patches from a mailbox"
+msgstr "Cuir sraith paistí i bhfeidhm ó bhosca poist"
+
+#: command-list.h
+msgid "Annotate file lines with commit information"
+msgstr "Línte comhaid a anótáil le faisnéis tiomanta"
+
+#: command-list.h
+msgid "Apply a patch to files and/or to the index"
+msgstr "Cuir paiste i bhfeidhm ar chomhaid agus/nó ar an innéacs"
+
+#: command-list.h
+msgid "Import a GNU Arch repository into Git"
+msgstr "Iompórtáil stór GNU Arch isteach i Git"
+
+#: command-list.h
+msgid "Create an archive of files from a named tree"
+msgstr "Cruthaigh cartlann comhaid ó chrann ainmnithe"
+
+#: command-list.h
+msgid "Download missing objects in a partial clone"
+msgstr "Íoslódáil rudaí atá in easnamh i gclón pá"
+
+#: command-list.h
+msgid "Use binary search to find the commit that introduced a bug"
+msgstr ""
+"Úsáid cuardach dénártha chun an gealltanas a thug isteach fabht a fháil"
+
+#: command-list.h
+msgid "Show what revision and author last modified each line of a file"
+msgstr ""
+"Taispeáin an t-athbhreithniú agus an t-údar a mhodhnaigh gach líne de chomhad"
+
+#: command-list.h
+msgid "List, create, or delete branches"
+msgstr "Brainsí a liostáil, a chruthú nó a scriosadh"
+
+#: command-list.h
+msgid "Collect information for user to file a bug report"
+msgstr "Bailigh faisnéis don úsáideoir chun tuarascáil fabht a chomhdú"
+
+#: command-list.h
+msgid "Move objects and refs by archive"
+msgstr "Bogadh rudaí agus scríbhinní de réir cartlann"
+
+#: command-list.h
+msgid "Provide contents or details of repository objects"
+msgstr "Ábhar nó sonraí rudaí stórais a sholáthar"
+
+#: command-list.h
+msgid "Display gitattributes information"
+msgstr "Taispeáin faisnéis gitattributs"
+
+#: command-list.h
+msgid "Debug gitignore / exclude files"
+msgstr "Dífhabhtú gitignore/eisiamh comhaid"
+
+#: command-list.h
+msgid "Show canonical names and email addresses of contacts"
+msgstr "Taispeáin ainmneacha canónach agus seoltaí ríomhphoist teagmhál"
+
+#: command-list.h
+msgid "Ensures that a reference name is well formed"
+msgstr "Cinntíonn sé go bhfuil ainm tagartha foirmithe go maith"
+
+#: command-list.h
+msgid "Switch branches or restore working tree files"
+msgstr "Athraigh brainsí nó cuir comhaid crainn oibre ar ais"
+
+#: command-list.h
+msgid "Copy files from the index to the working tree"
+msgstr "Cóipeáil comhaid ón innéacs go dtí an crann oibre"
+
+#: command-list.h
+msgid "Find commits yet to be applied to upstream"
+msgstr "Faigh gealltanais nach ndéanfar cur i bhfeidhm fós ar an sruth"
+
+#: command-list.h
+msgid "Apply the changes introduced by some existing commits"
+msgstr ""
+"Cuir isteach na hathruithe a thug isteach ag roinnt gealltanais atá ann"
+
+#: command-list.h
+msgid "Graphical alternative to git-commit"
+msgstr "Rogha eile grafach seachas git-commit"
+
+#: command-list.h
+msgid "Remove untracked files from the working tree"
+msgstr "Bain comhaid neamhrianaithe ón gcrann oibre"
+
+#: command-list.h
+msgid "Clone a repository into a new directory"
+msgstr "Clóin stór isteach i eolaire nua"
+
+#: command-list.h
+msgid "Display data in columns"
+msgstr "Taispeáin sonraí i gcolúin"
+
+#: command-list.h
+msgid "Record changes to the repository"
+msgstr "Taifeadadh athruithe ar an stór"
+
+#: command-list.h
+msgid "Write and verify Git commit-graph files"
+msgstr "Scríobh agus fíoraigh comhaid choimisi-graf Git"
+
+#: command-list.h
+msgid "Create a new commit object"
+msgstr "Cruthaigh réad tiomanta nua"
+
+#: command-list.h
+msgid "Get and set repository or global options"
+msgstr "Faigh agus socraigh stór nó roghanna domhanda"
+
+#: command-list.h
+msgid "Count unpacked number of objects and their disk consumption"
+msgstr "Líon rudaí neamhphacáilte a chomhaireamh agus a dtomhaltas"
+
+#: command-list.h
+msgid "Retrieve and store user credentials"
+msgstr "Dintiúir úsáideora a aisghabháil agus"
+
+#: command-list.h
+msgid "Helper to temporarily store passwords in memory"
+msgstr "Cúntóir chun pasfhocail a stóráil i gcuimhne"
+
+#: command-list.h
+msgid "Helper to store credentials on disk"
+msgstr "Cúntóir chun dintiúir a stóráil ar dhios"
+
+#: command-list.h
+msgid "Export a single commit to a CVS checkout"
+msgstr "Easpórtáil tiomantas amháin chuig seiceáil CVS"
+
+#: command-list.h
+msgid "Salvage your data out of another SCM people love to hate"
+msgstr ""
+"Sábháil do chuid sonraí as SCM eile is breá le daoine fuath a thabhairt"
+
+#: command-list.h
+msgid "A CVS server emulator for Git"
+msgstr "Aithritheoir freastalaí CVS do Git"
+
+#: command-list.h
+msgid "A really simple server for Git repositories"
+msgstr "Freastalaí an-simplí do stórais Git"
+
+#: command-list.h
+msgid "Give an object a human readable name based on an available ref"
+msgstr "Tabhair ainm inléite daonna do réad bunaithe ar thagartha atá ar fáil"
+
+#: command-list.h
+msgid "Generate a zip archive of diagnostic information"
+msgstr "Cruthaigh cartlann zip faisnéise diagnóiseach"
+
+#: command-list.h
+msgid "Show changes between commits, commit and working tree, etc"
+msgstr "Taispeáin athruithe idir gealltanais, tiomantas agus crann oibre, srl"
+
+#: command-list.h
+msgid "Compares files in the working tree and the index"
+msgstr "Déanann comparáid idir comhaid sa chrann oibre agus san innéacs"
+
+#: command-list.h
+msgid "Compare a tree to the working tree or index"
+msgstr "Déan comparáid idir crann leis an gcrann oibre nó leis an innéacs"
+
+#: command-list.h
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Déan comparáid idir ábhar agus modh na bpéirí blob atá curtha ar fáil"
+
+#: command-list.h
+msgid "Compares the content and mode of blobs found via two tree objects"
+msgstr ""
+"Déanann comparáid idir ábhar agus modh blobs a fhaightear trí dhá rud crann"
+
+#: command-list.h
+msgid "Show changes using common diff tools"
+msgstr "Taispeáin athruithe ag úsáid uirlisí coitianta diff"
+
+#: command-list.h
+msgid "Git data exporter"
+msgstr "Easpórtóir sonraí Git"
+
+#: command-list.h
+msgid "Backend for fast Git data importers"
+msgstr "Backend d'allmhaireoirí sonraí tapa Git"
+
+#: command-list.h
+msgid "Download objects and refs from another repository"
+msgstr "Íoslódáil rudaí agus réimsí ó stór eile"
+
+#: command-list.h
+msgid "Receive missing objects from another repository"
+msgstr "Faigh rudaí atá in easnamh ó stór eile"
+
+#: command-list.h
+msgid "Rewrite branches"
+msgstr "Brainsí a athscríobh"
+
+#: command-list.h
+msgid "Produce a merge commit message"
+msgstr "Teachtaireacht tiomanta cumaisc a chur"
+
+#: command-list.h
+msgid "Output information on each ref"
+msgstr "Eolas aschuir ar gach tagairt"
+
+#: command-list.h
+msgid "Run a Git command on a list of repositories"
+msgstr "Rith ordú Git ar liosta stórais"
+
+#: command-list.h
+msgid "Prepare patches for e-mail submission"
+msgstr "Ullmhaigh paistí le haghaidh aighneachta"
+
+#: command-list.h
+msgid "Verifies the connectivity and validity of the objects in the database"
+msgstr "Fíoraíonn sé nascacht agus bailíocht na rudaí sa bhunachar sonraí"
+
+#: command-list.h
+msgid "Cleanup unnecessary files and optimize the local repository"
+msgstr "Glan comhaid gan ghá agus an stór áitiúil a bharrfheabhsú"
+
+#: command-list.h
+msgid "Extract commit ID from an archive created using git-archive"
+msgstr ""
+"Bain ID tiomanta as cartlann a cruthaíodh ag baint úsáide as git-archive"
+
+#: command-list.h
+msgid "Print lines matching a pattern"
+msgstr "Línte priontála a mheaitseálann"
+
+#: command-list.h
+msgid "A portable graphical interface to Git"
+msgstr "Comhéadan grafach iniompartha chuig Git"
+
+#: command-list.h
+msgid "Compute object ID and optionally create an object from a file"
+msgstr "Ríomh ID réad agus cruthaigh réad ó chomhad go roghnach"
+
+#: command-list.h
+msgid "Display help information about Git"
+msgstr "Taispeáin faisnéis chabhrach faoi Git"
+
+#: command-list.h
+msgid "Run git hooks"
+msgstr "Rith crúcaí git"
+
+#: command-list.h
+msgid "Server side implementation of Git over HTTP"
+msgstr "Cur i bhfeidhm taobh freastalaí Git thar HTTP"
+
+#: command-list.h
+msgid "Download from a remote Git repository via HTTP"
+msgstr "Íoslódáil ó stór iargúlta Git trí HTTP"
+
+#: command-list.h
+msgid "Push objects over HTTP/DAV to another repository"
+msgstr "Brúigh rudaí thar HTTP/DAV chuig stór eile"
+
+#: command-list.h
+msgid "Send a collection of patches from stdin to an IMAP folder"
+msgstr "Seol bailiúchán paistí ó stdin chuig fillteán IMAP"
+
+#: command-list.h
+msgid "Build pack index file for an existing packed archive"
+msgstr "Tóg comhad innéacs pacáiste do chartlann pacáilte atá ann"
+
+#: command-list.h
+msgid "Create an empty Git repository or reinitialize an existing one"
+msgstr "Cruthaigh stór Git folamh nó déan ceann atá ann cheana a athionsú"
+
+#: command-list.h
+msgid "Instantly browse your working repository in gitweb"
+msgstr "Brabhsáil láithreach do stór oibre i gitweb"
+
+#: command-list.h
+msgid "Add or parse structured information in commit messages"
+msgstr "Cuir nó déan faisnéis struchtúrtha i dteachtaireachtaí tiomanta"
+
+#: command-list.h
+msgid "Show commit logs"
+msgstr "Taispeáin logaí tiomanta"
+
+#: command-list.h
+msgid "Show information about files in the index and the working tree"
+msgstr "Taispeáin faisnéis faoi chomhaid san innéacs agus sa chrann oibre"
+
+#: command-list.h
+msgid "List references in a remote repository"
+msgstr "Liostaigh tagairtí i stór iargúlta"
+
+#: command-list.h
+msgid "List the contents of a tree object"
+msgstr "Liostaigh ábhar réad crann"
+
+#: command-list.h
+msgid "Extracts patch and authorship from a single e-mail message"
+msgstr "Baineann paiste agus údaracht as teachtaireacht ríomhphoist amháin"
+
+#: command-list.h
+msgid "Simple UNIX mbox splitter program"
+msgstr "Clár scoilteora mbox UNIX simplí"
+
+#: command-list.h
+msgid "Run tasks to optimize Git repository data"
+msgstr "Rith tascanna chun sonraí stór Git a bharrfheabhsú"
+
+#: command-list.h
+msgid "Join two or more development histories together"
+msgstr "Bí le dhá stair forbartha nó níos mó le chéile"
+
+#: command-list.h
+msgid "Find as good common ancestors as possible for a merge"
+msgstr "Faigh sinsear choiteann chomh maith agus is féidir le cumasc"
+
+#: command-list.h
+msgid "Run a three-way file merge"
+msgstr "Rith cumasc comhad trí bhealach"
+
+#: command-list.h
+msgid "Run a merge for files needing merging"
+msgstr "Reáchtáil cumaisc le haghaidh comhaid a bhfuil gá le cumasc orthu"
+
+#: command-list.h
+msgid "The standard helper program to use with git-merge-index"
+msgstr "An clár cúntóra caighdeánach le húsáid le git-merge-index"
+
+#: command-list.h
+msgid "Perform merge without touching index or working tree"
+msgstr "Déan cumasc gan teagmháil a dhéanamh le hInnéacs nó crann"
+
+#: command-list.h
+msgid "Run merge conflict resolution tools to resolve merge conflicts"
+msgstr "Rith uirlisí réitigh coinbhleachtaí cumaisc chun coinbhleachtaí"
+
+#: command-list.h
+msgid "Creates a tag object with extra validation"
+msgstr "Cruthaíonn sé réad clibeanna le bailíochtú breise"
+
+#: command-list.h
+msgid "Build a tree-object from ls-tree formatted text"
+msgstr "Tóg réad crann ó théacs formáidithe ls-tree"
+
+#: command-list.h
+msgid "Write and verify multi-pack-indexes"
+msgstr "Innéacsanna il-phacáiste a scríobh agus a fhíorú"
+
+#: command-list.h
+msgid "Move or rename a file, a directory, or a symlink"
+msgstr "Bogadh nó athainmnigh comhad, eolaire, nó nasc comhsheasmhach"
+
+#: command-list.h
+msgid "Find symbolic names for given revs"
+msgstr "Faigh ainmneacha siombalacha do thiomhartha tugtha"
+
+#: command-list.h
+msgid "Add or inspect object notes"
+msgstr "Cuir nó iniúchadh nótaí réad"
+
+#: command-list.h
+msgid "Import from and submit to Perforce repositories"
+msgstr "Iompórtáil ó stórais Perforce agus cuir isteach chuig"
+
+#: command-list.h
+msgid "Create a packed archive of objects"
+msgstr "Cruthaigh cartlann pacáilte rudaí"
+
+#: command-list.h
+msgid "Find redundant pack files"
+msgstr "Faigh comhaid pacáiste iomarcacha"
+
+#: command-list.h
+msgid "Pack heads and tags for efficient repository access"
+msgstr "Ceannanna agus clibeanna pacála le haghaidh rochtain éifeachtach"
+
+#: command-list.h
+msgid "Compute unique ID for a patch"
+msgstr "Ríomh ID uathúil le haghaidh paiste"
+
+#: command-list.h
+msgid "Prune all unreachable objects from the object database"
+msgstr ""
+"Déan gach rud nach féidir inrochtana a ghearradh ón mbunachar sonraí réad"
+
+#: command-list.h
+msgid "Remove extra objects that are already in pack files"
+msgstr "Bain rudaí breise atá i gcomhaid pacáiste cheana féin"
+
+#: command-list.h
+msgid "Fetch from and integrate with another repository or a local branch"
+msgstr "Faigh ó stór eile nó brainse áitiúil agus comhtháthú leis"
+
+#: command-list.h
+msgid "Update remote refs along with associated objects"
+msgstr "Nuashonraigh iargúlta mar aon le rudaí gaolmhara"
+
+#: command-list.h
+msgid "Applies a quilt patchset onto the current branch"
+msgstr "Cuireann paistset cuilte i bhfeidhm ar an mbrainse reatha"
+
+#: command-list.h
+msgid "Compare two commit ranges (e.g. two versions of a branch)"
+msgstr "Déan comparáid idir dhá raon tiomanta (e.g. dhá leagan de bhrainse)"
+
+#: command-list.h
+msgid "Reads tree information into the index"
+msgstr "Léann faisnéis crainn isteach san innéacs"
+
+#: command-list.h
+msgid "Reapply commits on top of another base tip"
+msgstr "Déan gealltanna a athchur i bhfeidhm ar bharr leid bonn eile"
+
+#: command-list.h
+msgid "Receive what is pushed into the repository"
+msgstr "Faigh an méid a bhrúitear isteach sa stór"
+
+#: command-list.h
+msgid "Manage reflog information"
+msgstr "Bainistigh faisnéis reflog"
+
+#: command-list.h
+msgid "Low-level access to refs"
+msgstr "Rochtain ar leibhéal íseal ar réimsí"
+
+#: command-list.h
+msgid "Manage set of tracked repositories"
+msgstr "Bainistigh sraith stórais rianaithe"
+
+#: command-list.h
+msgid "Pack unpacked objects in a repository"
+msgstr "Pacáil rudaí neamhphacáilte i stóras"
+
+#: command-list.h
+msgid "Create, list, delete refs to replace objects"
+msgstr "Cruthaigh, liostáil, scrios scríobh chun rudaí a athsholáthar"
+
+#: command-list.h
+msgid "EXPERIMENTAL: Replay commits on a new base, works with bare repos too"
+msgstr ""
+"TURGNAMHACH: Tiomann athsheoladh ar bhonn nua, oibríonn sé le repos lom "
+"freisin"
+
+#: command-list.h
+msgid "Generates a summary of pending changes"
+msgstr "Gineann achoimre ar athruithe ar feitheamh"
+
+#: command-list.h
+msgid "Reuse recorded resolution of conflicted merges"
+msgstr "Réiteach taifeadta ar chumaisc coinbhleachta a athúsáid"
+
+#: command-list.h
+msgid "Reset current HEAD to the specified state"
+msgstr "Athshocraigh HEAD reatha go dtí an stát sonraithe"
+
+#: command-list.h
+msgid "Restore working tree files"
+msgstr "Athchóirigh comhaid crann oibre"
+
+#: command-list.h
+msgid "Lists commit objects in reverse chronological order"
+msgstr "Tiomann liostaí rudaí in ord croineolaíoch droim"
+
+#: command-list.h
+msgid "Pick out and massage parameters"
+msgstr "Paraiméadair a roghnú agus massage"
+
+#: command-list.h
+msgid "Revert some existing commits"
+msgstr "Cuir roinnt gealltanais atá ann cheana ar ais"
+
+#: command-list.h
+msgid "Remove files from the working tree and from the index"
+msgstr "Bain comhaid ón gcrann oibre agus ón innéacs"
+
+#: command-list.h
+msgid "Send a collection of patches as emails"
+msgstr "Seol bailiúchán paistí mar ríomhphoist"
+
+#: command-list.h
+msgid "Push objects over Git protocol to another repository"
+msgstr "Brúigh rudaí thar phrótacal Git chuig stór eile"
+
+#: command-list.h
+msgid "Git's i18n setup code for shell scripts"
+msgstr "Cód socraithe i18n Git le haghaidh scripteanna blaosc"
+
+#: command-list.h
+msgid "Common Git shell script setup code"
+msgstr "Cód socraithe script bhlaosc Git coitianta"
+
+#: command-list.h
+msgid "Restricted login shell for Git-only SSH access"
+msgstr "Blaosc logála isteach srianta le haghaidh rochtain SSH GIT amháin"
+
+#: command-list.h
+msgid "Summarize 'git log' output"
+msgstr "Achoimre ar aschur 'git log'"
+
+#: command-list.h
+msgid "Show various types of objects"
+msgstr "Taispeáin cineálacha éagsúla rudaí"
+
+#: command-list.h
+msgid "Show branches and their commits"
+msgstr "Taispeáin brainsí agus a ngealltanais"
+
+#: command-list.h
+msgid "Show packed archive index"
+msgstr "Taispeáin an t-innéacs cartlainne"
+
+#: command-list.h
+msgid "List references in a local repository"
+msgstr "Liostaigh tagairtí i stóras áitiúil"
+
+#: command-list.h
+msgid "Reduce your working tree to a subset of tracked files"
+msgstr "Laghdaigh do chrann oibre go fo-thacar de chomhaid rianaithe"
+
+#: command-list.h
+msgid "Add file contents to the staging area"
+msgstr "Cuir ábhar an chomhaid leis an limistéar stáitse"
+
+#: command-list.h
+msgid "Stash the changes in a dirty working directory away"
+msgstr "Stóráil na hathruithe in eolaire oibre salach ar shiúl"
+
+#: command-list.h
+msgid "Show the working tree status"
+msgstr "Taispeáin stádas an chrann oibre"
+
+#: command-list.h
+msgid "Remove unnecessary whitespace"
+msgstr "Bain spás bán gan ghá"
+
+#: command-list.h
+msgid "Initialize, update or inspect submodules"
+msgstr "Fo-mhodúil a thionscnamh, a nuashonrú nó a"
+
+#: command-list.h
+msgid "Bidirectional operation between a Subversion repository and Git"
+msgstr "Oibriú déthreorach idir stór Subversion agus Git"
+
+#: command-list.h
+msgid "Switch branches"
+msgstr "Athraigh brainsí"
+
+#: command-list.h
+msgid "Read, modify and delete symbolic refs"
+msgstr "Léigh, modhnaigh agus scriosadh taiscéalaí siombalacha"
+
+#: command-list.h
+msgid "Create, list, delete or verify a tag object signed with GPG"
+msgstr "Cruthaigh, liostáil, scrios nó fíorú réad clibeanna sínithe le GPG"
+
+#: command-list.h
+msgid "Creates a temporary file with a blob's contents"
+msgstr "Cruthaíonn sé comhad sealadach le hábhar blob"
+
+#: command-list.h
+msgid "Unpack objects from a packed archive"
+msgstr "Díphacáil rudaí ó chartlann pacáilte"
+
+#: command-list.h
+msgid "Register file contents in the working tree to the index"
+msgstr "Cláraigh ábhar an chomhaid sa chrann oibre chuig an innéacs"
+
+#: command-list.h
+msgid "Update the object name stored in a ref safely"
+msgstr "Nuashonraigh ainm an réad atá stóráilte i dtagairt go sá"
+
+#: command-list.h
+msgid "Update auxiliary info file to help dumb servers"
+msgstr "Nuashonraigh comhad faisnéise cúnta chun cabhrú le freastalaithe"
+
+#: command-list.h
+msgid "Send archive back to git-archive"
+msgstr "Seol cartlann ar ais chuig git-archive"
+
+#: command-list.h
+msgid "Send objects packed back to git-fetch-pack"
+msgstr "Seol rudaí pacáilte ar ais chuig git-fetch-pack"
+
+#: command-list.h
+msgid "Show a Git logical variable"
+msgstr "Taispeáin athróg loighciúil Git"
+
+#: command-list.h
+msgid "Check the GPG signature of commits"
+msgstr "Seiceáil síniú GPG na ngealltanais"
+
+#: command-list.h
+msgid "Validate packed Git archive files"
+msgstr "Bailíochtú comhaid cartlainne Git pacáilte"
+
+#: command-list.h
+msgid "Check the GPG signature of tags"
+msgstr "Seiceáil síniú GPG na gclibeanna"
+
+#: command-list.h
+msgid "Display version information about Git"
+msgstr "Taispeáin faisnéis leagan faoi Git"
+
+#: command-list.h
+msgid "Show logs with differences each commit introduces"
+msgstr "Taispeáin logaí le difríochtaí a thugann gach tiomantas"
+
+#: command-list.h
+msgid "Manage multiple working trees"
+msgstr "Bainistigh iliomad crainn oibre"
+
+#: command-list.h
+msgid "Create a tree object from the current index"
+msgstr "Cruthaigh réad crann ón innéacs reatha"
+
+#: command-list.h
+msgid "Defining attributes per path"
+msgstr "Sainmhíniú tréithe in aghaidh an"
+
+#: command-list.h
+msgid "Git command-line interface and conventions"
+msgstr "Comhéadan agus coinbhinsiúin líne ordaithe Git"
+
+#: command-list.h
+msgid "A Git core tutorial for developers"
+msgstr "Teagaisc lárnach Git d'fhorbróirí"
+
+#: command-list.h
+msgid "Providing usernames and passwords to Git"
+msgstr "Ainmneacha úsáideora agus pasfhocail a sholáthar do"
+
+#: command-list.h
+msgid "Git for CVS users"
+msgstr "Git d'úsáideoirí CVS"
+
+#: command-list.h
+msgid "Tweaking diff output"
+msgstr "Aschur difriúil a athrú"
+
+#: command-list.h
+msgid "A useful minimum set of commands for Everyday Git"
+msgstr "Sraith íosta úsáideach orduithe do Everyday Git"
+
+#: command-list.h
+msgid "Frequently asked questions about using Git"
+msgstr "Ceisteanna coitianta faoi úsáid Git"
+
+#: command-list.h
+msgid "The bundle file format"
+msgstr "An formáid comhaid beartán"
+
+#: command-list.h
+msgid "Chunk-based file formats"
+msgstr "Formáidí comhaid bunaithe ar bhunús"
+
+#: command-list.h
+msgid "Git commit-graph format"
+msgstr "Formáid comh-graph Git"
+
+#: command-list.h
+msgid "Git index format"
+msgstr "Formáid innéacs Git"
+
+#: command-list.h
+msgid "Git pack format"
+msgstr "Formáid pacáiste Git"
+
+#: command-list.h
+msgid "Git cryptographic signature formats"
+msgstr "Formáidí sínithe cripteagrafach Git"
+
+#: command-list.h
+msgid "A Git Glossary"
+msgstr "Gloclóir Git"
+
+#: command-list.h
+msgid "Hooks used by Git"
+msgstr "Crúcaí a úsáideann Git"
+
+#: command-list.h
+msgid "Specifies intentionally untracked files to ignore"
+msgstr "Sonraíonn sé comhaid neamhrianaithe de ghnó le neamhaird"
+
+#: command-list.h
+msgid "The Git repository browser"
+msgstr "Brabhsálaí stór Git"
+
+#: command-list.h
+msgid "Map author/committer names and/or E-Mail addresses"
+msgstr "Léarscáil ainmneacha údar/coistí agus/nó seoltaí rí"
+
+#: command-list.h
+msgid "Defining submodule properties"
+msgstr "Airíonna fomhodúil a shainiú"
+
+#: command-list.h
+msgid "Git namespaces"
+msgstr "Spásanna ainmneacha Git"
+
+#: command-list.h
+msgid "Protocol v0 and v1 capabilities"
+msgstr "Cumais Prótacal v0 agus v1"
+
+#: command-list.h
+msgid "Things common to various protocols"
+msgstr "Rudaí coitianta le prótacail éagsúla"
+
+#: command-list.h
+msgid "Git HTTP-based protocols"
+msgstr "Prótacail Git HTTP bunaithe"
+
+#: command-list.h
+msgid "How packs are transferred over-the-wire"
+msgstr "Conas a aistrítear pacáistí thar an sreang"
+
+#: command-list.h
+msgid "Git Wire Protocol, Version 2"
+msgstr "Prótacal Wire Git, Leagan 2"
+
+#: command-list.h
+msgid "Helper programs to interact with remote repositories"
+msgstr "Cláir chúntóirí chun idirghníomhú le stórálaí"
+
+#: command-list.h
+msgid "Git Repository Layout"
+msgstr "Leagan Amach Stórála Git"
+
+#: command-list.h
+msgid "Specifying revisions and ranges for Git"
+msgstr "Athbhreithnithe agus raonta a shonrú do Git"
+
+#: command-list.h
+msgid "Mounting one repository inside another"
+msgstr "Stóra amháin a chur isteach taobh istigh de cheann"
+
+#: command-list.h
+msgid "A tutorial introduction to Git"
+msgstr "Réamhrá teagaisc ar Git"
+
+#: command-list.h
+msgid "A tutorial introduction to Git: part two"
+msgstr "Réamhrá teagaisc ar Git: cuid a dara"
+
+#: command-list.h
+msgid "Git web interface (web frontend to Git repositories)"
+msgstr "Comhéadan gréasáin Git (tosaigh gréasáin chuig stórais Git)"
+
+#: command-list.h
+msgid "An overview of recommended workflows with Git"
+msgstr "Forbhreathnú ar shreafaí oibre a mholtar le Git"
+
+#: command-list.h
+msgid "A tool for managing large Git repositories"
+msgstr "Uirlis chun stórtha móra Git a bhainistiú"
+
+#: commit-graph.c
+msgid "commit-graph file is too small"
+msgstr "tá comhad coimit-graph ró-bheag"
+
+#: commit-graph.c
+msgid "commit-graph oid fanout chunk is wrong size"
+msgstr "tá an méid mícheart ar an smután fanout oid commit-graph"
+
+#: commit-graph.c
+msgid "commit-graph fanout values out of order"
+msgstr "luachanna fanout choimisi-graph as ord"
+
+#: commit-graph.c
+msgid "commit-graph OID lookup chunk is the wrong size"
+msgstr "tá an méid mícheart ar an smután cuardaigh OID commit-graph"
+
+#: commit-graph.c
+msgid "commit-graph commit data chunk is wrong size"
+msgstr "tá méid mícheart ar an smután sonraí commit commit-graph"
+
+#: commit-graph.c
+msgid "commit-graph generations chunk is wrong size"
+msgstr "is méid mícheart é an píosa glúine ghlúin chomhghraif"
+
+#: commit-graph.c
+msgid "commit-graph changed-path index chunk is too small"
+msgstr "tá píosa innéacs cosáin athraithe coimisithe ró-bheag"
+
+#: commit-graph.c
+#, c-format
+msgid ""
+"ignoring too-small changed-path chunk (%<PRIuMAX> < %<PRIuMAX>) in commit-"
+"graph file"
+msgstr ""
+"ag neamhaird a dhéanamh den smután róbheag den chonair athraithe (%<PRIuMAX> "
+"< %<PRIuMAX>) i gcomhad commit-graph"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph signature %X does not match signature %X"
+msgstr "ní mheaitseálann síniú gráf coimiteach %X síniú %X"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph version %X does not match version %X"
+msgstr "ní hionann leagan %X den commit-graph agus leagan %X"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph hash version %X does not match version %X"
+msgstr "ní hionann leagan %X den hais commit-graph agus leagan %X"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph file is too small to hold %u chunks"
+msgstr "tá comhad comh-graph ró-bheag chun codanna %u a choinneáil"
+
+#: commit-graph.c
+msgid "commit-graph required OID fanout chunk missing or corrupted"
+msgstr "teastaíonn gráf coimisiúnaithe OID ar iarraidh nó truaillithe"
+
+#: commit-graph.c
+msgid "commit-graph required OID lookup chunk missing or corrupted"
+msgstr "teastaíonn píosa cuardaigh OID atá ar iarraidh nó truaillithe"
+
+#: commit-graph.c
+msgid "commit-graph required commit data chunk missing or corrupted"
+msgstr ""
+"gráf choimisiúnaithe riachtanach a thabhairt do chuid sonraí atá ar iarraidh "
+"nó"
+
+#: commit-graph.c
+#, c-format
+msgid ""
+"disabling Bloom filters for commit-graph layer '%s' due to incompatible "
+"settings"
+msgstr ""
+"scagairí Bloom a dhíchumasú le haghaidh ciseal coimit-graf '%s' mar gheall "
+"ar shuíomhanna neamh-chomho"
+
+#: commit-graph.c
+msgid "commit-graph has no base graphs chunk"
+msgstr "níl aon phíosa graif bunghraif ag commit-graph"
+
+#: commit-graph.c
+msgid "commit-graph base graphs chunk is too small"
+msgstr "tá an píosa graif bonn coimisi-graf ró-bheag"
+
+#: commit-graph.c
+msgid "commit-graph chain does not match"
+msgstr "ní mheaitseálann slabhra graf coimisiúnaithe"
+
+#: commit-graph.c
+#, c-format
+msgid "commit count in base graph too high: %<PRIuMAX>"
+msgstr "líon tiomanta i mbonngraf ró-ard:%<PRIuMAX>"
+
+#: commit-graph.c
+msgid "commit-graph chain file too small"
+msgstr "comhad slabhra commit-graph ró-bheag"
+
+#: commit-graph.c
+#, c-format
+msgid "invalid commit-graph chain: line '%s' not a hash"
+msgstr "slabhra coimit-graf neamhbhailí: ní hash é líne '%s'"
+
+#: commit-graph.c
+msgid "unable to find all commit-graph files"
+msgstr "nach féidir gach comhad gráf coimisiúnaithe a fháil"
+
+#: commit-graph.c
+msgid "invalid commit position. commit-graph is likely corrupt"
+msgstr "post tiomanta neamhbhailí. Is dócha go bhfuil graf coimite truaillithe"
+
+#: commit-graph.c
+#, c-format
+msgid "could not find commit %s"
+msgstr "ní raibh sé in ann teacht ar thiomantas %s"
+
+#: commit-graph.c
+msgid "commit-graph requires overflow generation data but has none"
+msgstr "teastaíonn sonraí giniúna ró-shreabhadh ach níl aon cheann acu"
+
+#: commit-graph.c
+msgid "commit-graph overflow generation data is too small"
+msgstr "tá sonraí giniúna ró-shreabha tiomnaithe-graif róbheag"
+
+#: commit-graph.c
+msgid "commit-graph extra-edges pointer out of bounds"
+msgstr "léiríonn imill shrea-ghraif choimisiúin amach as teorainneacha"
+
+#: commit-graph.c
+msgid "Loading known commits in commit graph"
+msgstr "Gealltanna aitheanta a luchtú i ngraf tiomanta"
+
+#: commit-graph.c
+msgid "Expanding reachable commits in commit graph"
+msgstr "Gealltanais inrochtana a leathnú sa ghraf tiomanta"
+
+#: commit-graph.c
+msgid "Clearing commit marks in commit graph"
+msgstr "Marcanna tiomanta a ghlanadh sa ghraf tiom"
+
+#: commit-graph.c
+msgid "Computing commit graph topological levels"
+msgstr "Tiomann ríomhaireacht leibhéil topaic"
+
+#: commit-graph.c
+msgid "Computing commit graph generation numbers"
+msgstr "Tiomann an ríomhaireacht uimhreacha"
+
+#: commit-graph.c
+msgid "Computing commit changed paths Bloom filters"
+msgstr "Déanann ríomhaireacht cosáin athraithe a"
+
+#: commit-graph.c
+msgid "Collecting referenced commits"
+msgstr "Gealltanna tagartha a bhailiú"
+
+#: commit-graph.c
+#, c-format
+msgid "Finding commits for commit graph in %<PRIuMAX> pack"
+msgid_plural "Finding commits for commit graph in %<PRIuMAX> packs"
+msgstr[0] "Ag aimsiú tiomantais don ghraf tiomantais sa phacáiste %<PRIuMAX>"
+msgstr[1] "Ag aimsiú tiomantais don ghraf tiomantais i bpacáistí %<PRIuMAX>"
+msgstr[2] "Ag aimsiú tiomantais don ghraf tiomantais i bpacáistí %<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
+msgid "error adding pack %s"
+msgstr "earráid ag cur pacáiste %s"
+
+#: commit-graph.c
+#, c-format
+msgid "error opening index for %s"
+msgstr "innéacs oscailte earráide do %s"
+
+#: commit-graph.c
+msgid "Finding commits for commit graph among packed objects"
+msgstr "Tiomantas a aimsiú maidir le graf tiomanta i measc rudaí pacá"
+
+#: commit-graph.c
+msgid "Finding extra edges in commit graph"
+msgstr "Imill bhreise a aimsiú i ngraf tiomanta"
+
+#: commit-graph.c
+msgid "failed to write correct number of base graph ids"
+msgstr "theip orthu líon ceart na n-idí graif bonn a scríobh"
+
+#: commit-graph.c
+msgid "unable to create temporary graph layer"
+msgstr "in ann ciseal graf sealadach a chruthú"
+
+#: commit-graph.c midx-write.c
+#, c-format
+msgid "unable to adjust shared permissions for '%s'"
+msgstr "nach féidir ceadanna roinnte a choigeartú do '%s'"
+
+#: commit-graph.c
+#, c-format
+msgid "Writing out commit graph in %d pass"
+msgid_plural "Writing out commit graph in %d passes"
+msgstr[0] "Ag scríobh amach graf tiomantais i %d pas"
+msgstr[1] "Ag scríobh amach graf tiomantais i %d pas"
+msgstr[2] "Ag scríobh amach graf tiomantais i %d pas"
+
+#: commit-graph.c
+msgid "unable to open commit-graph chain file"
+msgstr "nach féidir comhad slabhra coimis-graf a oscailt"
+
+#: commit-graph.c
+msgid "failed to rename base commit-graph file"
+msgstr "theip ar an gcomhad gráf bunchoiste a athainmniú"
+
+#: commit-graph.c
+msgid "failed to rename temporary commit-graph file"
+msgstr "theip ar chomhad gráf choiste sealadach a athainmniú"
+
+#: commit-graph.c
+#, c-format
+msgid "cannot merge graphs with %<PRIuMAX>, %<PRIuMAX> commits"
+msgstr "ní féidir graif a chumasc le %<PRIuMAX>, %<PRIuMAX> tiomantais"
+
+#: commit-graph.c
+#, c-format
+msgid "cannot merge graph %s, too many commits: %<PRIuMAX>"
+msgstr "ní féidir graf %s a chumasc, an iomarca tiomantais: %<PRIuMAX>"
+
+#: commit-graph.c
+msgid "Scanning merged commits"
+msgstr "Tiomanta cumaisc ag scanadh"
+
+#: commit-graph.c
+msgid "Merging commit-graph"
+msgstr "Graf coiste a chumasc"
+
+#: commit-graph.c
+msgid "attempting to write a commit-graph, but 'core.commitGraph' is disabled"
+msgstr ""
+"ag iarraidh graf coimite a scríobh, ach tá 'core.commitGraph' díchumasaithe"
+
+#: commit-graph.c
+#, c-format
+msgid ""
+"attempting to write a commit-graph, but 'commitGraph.changedPathsVersion' "
+"(%d) is not supported"
+msgstr ""
+"ag iarraidh commit-graph a scríobh, ach tá 'commitGraph.changedPathsVersion' "
+"(%d) ní thacaítear leis"
+
+#: commit-graph.c
+msgid "too many commits to write graph"
+msgstr "an iomarca gealltanais graf a scríobh"
+
+#: commit-graph.c
+msgid "the commit-graph file has incorrect checksum and is likely corrupt"
+msgstr ""
+"tá seicsum mícheart ag an gcomhad graf coimite agus is dócha go bhfuil sé "
+"truaillithe"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph has incorrect OID order: %s then %s"
+msgstr "tá ordú OID mícheart ag commit-graph: %s ansin %s"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph has incorrect fanout value: fanout[%d] = %u != %u"
+msgstr "tá luach fanout mícheart ag commit-graph: fanout [%d] = %u! = %u"
+
+#: commit-graph.c
+#, c-format
+msgid "failed to parse commit %s from commit-graph"
+msgstr "theip ar thiomantas %s a pharsáil ó ghraif choimisiúnaithe"
+
+#: commit-graph.c
+#, c-format
+msgid "failed to parse commit %s from object database for commit-graph"
+msgstr ""
+"theip ar thiomantas %s a pharsáil ó bhunachar sonraí réad le haghaidh graf "
+"coimite"
+
+#: commit-graph.c
+#, c-format
+msgid "root tree OID for commit %s in commit-graph is %s != %s"
+msgstr ""
+"crann fréimhe Is é OID do thiomantas %s sa ghraf tiomantais ná %s != %s"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph parent list for commit %s is too long"
+msgstr "tá liosta tuismitheoirí comh-graph do thiomantas %s rófhada"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph parent for %s is %s != %s"
+msgstr "is é an tuismitheoir comh-graph do %s ná %s! = %s"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph parent list for commit %s terminates early"
+msgstr ""
+"foirceannann liosta tuismitheora commit-graph le haghaidh commit %s go luath"
+
+#: commit-graph.c
+#, c-format
+msgid "commit-graph generation for commit %s is %<PRIuMAX> < %<PRIuMAX>"
+msgstr ""
+"is é giniúint commit-graph le haghaidh commit %s %<PRIuMAX> < %<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
+msgid "commit date for commit %s in commit-graph is %<PRIuMAX> != %<PRIuMAX>"
+msgstr ""
+"is é dáta tiomantais don tiomantas %s i commit-graph %<PRIuMAX> != %<PRIuMAX>"
+
+#: commit-graph.c
+#, c-format
+msgid ""
+"commit-graph has both zero and non-zero generations (e.g., commits '%s' and "
+"'%s')"
+msgstr ""
+"tá glúine nialasach agus neamh-nialasach ag comh-graph (e.g., geallann sé "
+"'%s' agus '%s')"
+
+#: commit-graph.c
+msgid "Verifying commits in commit graph"
+msgstr "Gealltanna a fhíorú i ngraf tiomanta"
+
+#: commit-reach.c sequencer.c
+#, c-format
+msgid "could not parse commit %s"
+msgstr "ní fhéadfaí a pharsáil a dhéanamh ar thiomantas %s"
+
+#: commit.c
+#, c-format
+msgid "%s %s is not a commit!"
+msgstr "Ní gealltanas é %s %s!"
+
+#: commit.c
+msgid ""
+"Support for <GIT_DIR>/info/grafts is deprecated\n"
+"and will be removed in a future Git version.\n"
+"\n"
+"Please use \"git replace --convert-graft-file\"\n"
+"to convert the grafts into replace refs.\n"
+"\n"
+"Turn this message off by running\n"
+"\"git config set advice.graftFileDeprecated false\""
+msgstr ""
+"Tá tacaíocht d' <GIT_DIR>/info/grafts imithe\n"
+"agus bainfear é i leagan Git amach anseo.\n"
+"\n"
+"Úsáid le do thoil “git replace --convert-graft-file”\n"
+"chun na grafts a thiontú ina ionad refs.\n"
+"\n"
+"Cas an teachtaireacht seo as trí rith\n"
+"“git config socraigh advice.graftFileDeprecated bréagach”"
+
+#: commit.c
+#, c-format
+msgid "commit %s exists in commit-graph but not in the object database"
+msgstr "tá comhad %s ann sa choimit-graph ach níl sa bhunachar sonraí réad"
+
+#: commit.c
+#, c-format
+msgid "Commit %s has an untrusted GPG signature, allegedly by %s."
+msgstr "Tá síniú GPG neamhiontaofa ag Commit %s, a líomhnaítear ag %s."
+
+#: commit.c
+#, c-format
+msgid "Commit %s has a bad GPG signature allegedly by %s."
+msgstr "Tá droch-shíniú GPG ag Commit %s a líomhnaítear ag %s."
+
+#: commit.c
+#, c-format
+msgid "Commit %s does not have a GPG signature."
+msgstr "Níl síniú GPG ag Teacht %s."
+
+#: commit.c
+#, c-format
+msgid "Commit %s has a good GPG signature by %s\n"
+msgstr "Tá síniú maith GPG ag Teacht %s le %s\n"
+
+#: commit.c
+msgid ""
+"Warning: commit message did not conform to UTF-8.\n"
+"You may want to amend it after fixing the message, or set the config\n"
+"variable i18n.commitEncoding to the encoding your project uses.\n"
+msgstr ""
+"Rabhadh: níor chomhlíon teachtaireacht tiomanta le UTF-8.\n"
+"B'fhéidir gur mhaith leat é a leasú tar éis an teachtaireacht a shocrú, nó "
+"an cumraíocht a shocrú\n"
+"athróg i18N.CommitEncoding don ionchódú a úsáideann do thionscadal.\n"
+
+#: compat/compiler.h
+msgid "no compiler information available\n"
+msgstr "níl aon fhaisnéis tiomsaitheora ar fáil\n"
+
+#: compat/compiler.h
+msgid "no libc information available\n"
+msgstr "níl aon fhaisnéis libc ar fáil\n"
+
+#: compat/disk.h
+#, c-format
+msgid "could not determine free disk size for '%s'"
+msgstr "ní fhéadfaí méid diosca saor in aisce a chinneadh do '%s'"
+
+#: compat/disk.h
+#, c-format
+msgid "could not get info for '%s'"
+msgstr "ní fhéadfaí faisnéis a fháil do '%s'"
+
+#: compat/fsmonitor/fsm-health-win32.c
+#, c-format
+msgid "[GLE %ld] health thread could not open '%ls'"
+msgstr "[GLE %ld] ní fhéadfadh snáithe sláinte '%ls' a oscailt"
+
+#: compat/fsmonitor/fsm-health-win32.c
+#, c-format
+msgid "[GLE %ld] health thread getting BHFI for '%ls'"
+msgstr "[GLE %ld] snáithe sláinte ag fáil BHFI do '%ls'"
+
+#: compat/fsmonitor/fsm-health-win32.c compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "could not convert to wide characters: '%s'"
+msgstr "ní raibh sé in ann tiontú go carachtair leathan: '%s'"
+
+#: compat/fsmonitor/fsm-health-win32.c
+#, c-format
+msgid "BHFI changed '%ls'"
+msgstr "Athraigh BHFI '%ls'"
+
+#: compat/fsmonitor/fsm-health-win32.c
+#, c-format
+msgid "unhandled case in 'has_worktree_moved': %d"
+msgstr "cás neamh-láimhseáilte i 'has_worktree_moved': %d"
+
+#: compat/fsmonitor/fsm-health-win32.c
+#, c-format
+msgid "health thread wait failed [GLE %ld]"
+msgstr "theip ar fanacht snáithe sláinte [GLE %ld]"
+
+#: compat/fsmonitor/fsm-ipc-darwin.c
+#, c-format
+msgid "Invalid path: %s"
+msgstr "Conair neamhbhailí: %s"
+
+#: compat/fsmonitor/fsm-listen-darwin.c
+msgid "Unable to create FSEventStream."
+msgstr "Ní féidir FSeventStream a chruthú."
+
+#: compat/fsmonitor/fsm-listen-darwin.c
+msgid "Failed to start the FSEventStream"
+msgstr "Theip ar an FSevenStream a thosú"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "[GLE %ld] could not convert path to UTF-8: '%.*ls'"
+msgstr "[GLE %ld] níorbh fhéidir an cosán a thiontú go UTF-8: '%.*ls'"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "[GLE %ld] could not watch '%s'"
+msgstr "Ní raibh [GLE %ld] in ann féachaint ar '%s'"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "[GLE %ld] could not get longname of '%s'"
+msgstr "Ní raibh [GLE %ld] in ann ainm fadainm '%s' a fháil"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "ReadDirectoryChangedW failed on '%s' [GLE %ld]"
+msgstr "Theip ar ReadDirectoryChangedW ar '%s' [GLE %ld]"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "GetOverlappedResult failed on '%s' [GLE %ld]"
+msgstr "Theip ar getOverlappedResult ar '%s' [GLE %ld]"
+
+#: compat/fsmonitor/fsm-listen-win32.c
+#, c-format
+msgid "could not read directory changes [GLE %ld]"
+msgstr "ní fhéadfaí athruithe eolaire a léamh [GLE %ld]"
+
+#: compat/fsmonitor/fsm-path-utils-darwin.c
+#, c-format
+msgid "opendir('%s') failed"
+msgstr "theip ar opendir ('%s')"
+
+#: compat/fsmonitor/fsm-path-utils-darwin.c
+#, c-format
+msgid "lstat('%s') failed"
+msgstr "theip ar lstat ('%s')"
+
+#: compat/fsmonitor/fsm-path-utils-darwin.c
+#, c-format
+msgid "strbuf_readlink('%s') failed"
+msgstr "theip ar strbuf_readlink ('%s')"
+
+#: compat/fsmonitor/fsm-path-utils-darwin.c
+#, c-format
+msgid "closedir('%s') failed"
+msgstr "theip ar closedir ('%s')"
+
+#: compat/fsmonitor/fsm-path-utils-win32.c
+#, c-format
+msgid "[GLE %ld] unable to open for read '%ls'"
+msgstr "[GLE %ld] nach féidir é a oscailt le haghaidh léamh '%ls'"
+
+#: compat/fsmonitor/fsm-path-utils-win32.c
+#, c-format
+msgid "[GLE %ld] unable to get protocol information for '%ls'"
+msgstr "[GLE %ld] in ann faisnéis phrótacail a fháil do '%ls'"
+
+#: compat/mingw.c
+#, c-format
+msgid "failed to copy SID (%ld)"
+msgstr "theip ar SID (%ld) a chóipeáil"
+
+#: compat/mingw.c
+#, c-format
+msgid "failed to get owner for '%s' (%ld)"
+msgstr "theip ar úinéir a fháil do '%s' (%ld)"
+
+#: compat/obstack.c
+msgid "memory exhausted"
+msgstr "cuimhne ídithe"
+
+#: compat/regex/regcomp.c
+msgid "Success"
+msgstr "Rath"
+
+#: compat/regex/regcomp.c
+msgid "No match"
+msgstr "Gan aon mheaitseáil"
+
+#: compat/regex/regcomp.c
+msgid "Invalid regular expression"
+msgstr "Léiriú rialta nebhailí"
+
+#: compat/regex/regcomp.c
+msgid "Invalid collation character"
+msgstr "Carachtar comparáide neamhbhailí"
+
+#: compat/regex/regcomp.c
+msgid "Invalid character class name"
+msgstr "Ainm ranga carachtar neamhbhailí"
+
+#: compat/regex/regcomp.c
+msgid "Trailing backslash"
+msgstr "Cúlbhraith rianaithe"
+
+#: compat/regex/regcomp.c
+msgid "Invalid back reference"
+msgstr "Tagairt cúil neamhbhailí"
+
+#: compat/regex/regcomp.c
+msgid "Unmatched [ or [^"
+msgstr "Gan chomhoiriúnú [nó [^"
+
+#: compat/regex/regcomp.c
+msgid "Unmatched ( or \\("
+msgstr "Gan chomhoiriúnú (nó\\ ("
+
+#: compat/regex/regcomp.c
+msgid "Unmatched \\{"
+msgstr "Gan comhoiriúnú\\ {"
+
+#: compat/regex/regcomp.c
+msgid "Invalid content of \\{\\}"
+msgstr "Ábhar neamhbhailí de\\ {\\}"
+
+#: compat/regex/regcomp.c
+msgid "Invalid range end"
+msgstr "Deireadh raon neamhbhailí"
+
+#: compat/regex/regcomp.c
+msgid "Memory exhausted"
+msgstr "Cuimhne ídithe"
+
+#: compat/regex/regcomp.c
+msgid "Invalid preceding regular expression"
+msgstr "Léiriú rialta neamhbhailí"
+
+#: compat/regex/regcomp.c
+msgid "Premature end of regular expression"
+msgstr "Deireadh roimh am an léirithe rialta"
+
+#: compat/regex/regcomp.c
+msgid "Regular expression too big"
+msgstr "Léiriú rialta ró-mhór"
+
+#: compat/regex/regcomp.c
+msgid "Unmatched ) or \\)"
+msgstr "Gan chomhoiriúnú) nó\\)"
+
+#: compat/regex/regcomp.c
+msgid "No previous regular expression"
+msgstr "Gan aon léiriú rialta roimhe seo"
+
+#: compat/simple-ipc/ipc-unix-socket.c compat/simple-ipc/ipc-win32.c
+msgid "could not send IPC command"
+msgstr "ní fhéadfaí ordú IPC a sheoladh"
+
+#: compat/simple-ipc/ipc-unix-socket.c compat/simple-ipc/ipc-win32.c
+msgid "could not read IPC response"
+msgstr "ní raibh sé in ann freagra IPC a léamh"
+
+#: compat/simple-ipc/ipc-unix-socket.c
+#, c-format
+msgid "could not start accept_thread '%s'"
+msgstr "ní fhéadfaí tosú accept_thread '%s'"
+
+#: compat/simple-ipc/ipc-unix-socket.c
+#, c-format
+msgid "could not start worker[0] for '%s'"
+msgstr "ní fhéadfaí oibrí [0] a thosú le haghaidh '%s'"
+
+#: compat/simple-ipc/ipc-win32.c
+#, c-format
+msgid "ConnectNamedPipe failed for '%s' (%lu)"
+msgstr "Theip ar ConnectNamedPipe le haghaidh '%s' (%lu)"
+
+#: compat/simple-ipc/ipc-win32.c
+#, c-format
+msgid "could not create fd from pipe for '%s'"
+msgstr "ní fhéadfaí fd a chruthú ó phíopa do '%s'"
+
+#: compat/simple-ipc/ipc-win32.c
+#, c-format
+msgid "could not start thread[0] for '%s'"
+msgstr "ní fhéadfaí snáithe [0] a thosú le haghaidh '%s'"
+
+#: compat/simple-ipc/ipc-win32.c
+#, c-format
+msgid "wait for hEvent failed for '%s'"
+msgstr "fanacht go dtí Theip ar feadh '%s'"
+
+#: compat/terminal.c
+msgid "cannot resume in the background, please use 'fg' to resume"
+msgstr "ní féidir atosú sa chúlra, bain úsáid as 'fg' le do thoil chun atosú"
+
+#: compat/terminal.c
+msgid "cannot restore terminal settings"
+msgstr "ní féidir le socruithe teirminéil"
+
+#: config.c
+#, c-format
+msgid ""
+"exceeded maximum include depth (%d) while including\n"
+"\t%s\n"
+"from\n"
+"\t%s\n"
+"This might be due to circular includes."
+msgstr ""
+"sháraigh an uasmhéid san áireamh doimhneacht (%d) agus\n"
+" %s\n"
+"ó\n"
+" %s\n"
+"D'fhéadfadh sé seo a bheith mar gheall ar áireamh ciorclach."
+
+#: config.c
+#, c-format
+msgid "could not expand include path '%s'"
+msgstr "ní fhéadfaí leathnú san áireamh cosán '%s'"
+
+#: config.c
+msgid "relative config includes must come from files"
+msgstr "folaíonn cumraíocht choibhneasta caithfidh teacht ó chomh"
+
+#: config.c
+msgid "relative config include conditionals must come from files"
+msgstr "ní mór coinníollacha a theacht ó chomhaid i gcumraíocht choibhneasta"
+
+#: config.c
+msgid ""
+"remote URLs cannot be configured in file directly or indirectly included by "
+"includeIf.hasconfig:remote.*.url"
+msgstr ""
+"ní féidir URLanna iargúlta a chumrú i gcomhad san áireamh go díreach nó go "
+"hindíreach ag includeIf.hasconfig:remote.*.url"
+
+#: config.c
+#, c-format
+msgid "invalid config format: %s"
+msgstr "formáid cumraíochta neamhbhailí: %s"
+
+#: config.c
+#, c-format
+msgid "missing environment variable name for configuration '%.*s'"
+msgstr "ainm athróg comhshaoil atá in easnamh do chumraíocht '%.*s'"
+
+#: config.c
+#, c-format
+msgid "missing environment variable '%s' for configuration '%.*s'"
+msgstr "athróg comhshaoil in easnamh '%s' le haghaidh cumraíocht '%.*s'"
+
+#: config.c
+#, c-format
+msgid "key does not contain a section: %s"
+msgstr "níl rannán ag eochair: %s"
+
+#: config.c
+#, c-format
+msgid "key does not contain variable name: %s"
+msgstr "níl ainm athraitheach sa eochair: %s"
+
+#: config.c sequencer.c
+#, c-format
+msgid "invalid key: %s"
+msgstr "eochair neamhbhailí: %s"
+
+#: config.c
+#, c-format
+msgid "invalid key (newline): %s"
+msgstr "eochair neamhbhailí (líne nua): %s"
+
+#: config.c
+msgid "empty config key"
+msgstr "eochair cumraíochta folamh"
+
+#: config.c
+#, c-format
+msgid "bogus config parameter: %s"
+msgstr "paraiméadar cumraíochta bréagach: %s"
+
+#: config.c
+#, c-format
+msgid "bogus format in %s"
+msgstr "formáid bhréagach i %s"
+
+#: config.c
+#, c-format
+msgid "bogus count in %s"
+msgstr "comhaireamh bréagach i %s"
+
+#: config.c
+#, c-format
+msgid "too many entries in %s"
+msgstr "an iomarca iontrálacha i %s"
+
+#: config.c
+#, c-format
+msgid "missing config key %s"
+msgstr "eochair chumraithe %s in easnamh"
+
+#: config.c
+#, c-format
+msgid "missing config value %s"
+msgstr "luach cumraíochta %s ar iarraidh"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in blob %s"
+msgstr "droch-líne cumraíochta %d i mblob %s"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in file %s"
+msgstr "droch-líne cumraíochta %d i gcomhad %s"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in standard input"
+msgstr "droch-líne cumraíochta %d i ionchur caighdeánach"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in submodule-blob %s"
+msgstr "droch-líne cumraíochta %d i bhfo-modul-blob %s"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in command line %s"
+msgstr "droch-líne cumraíochta %d i líne ordaithe %s"
+
+#: config.c
+#, c-format
+msgid "bad config line %d in %s"
+msgstr "droch-líne cumraíochta %d i %s"
+
+#: config.c
+msgid "out of range"
+msgstr "lasmuigh den raon"
+
+#: config.c
+msgid "invalid unit"
+msgstr "aonad neamhbhailí"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s': %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s': %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in blob %s: %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s' i mblob %s: %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in file %s: %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s' i gcomhad %s: %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in standard input: %s"
+msgstr ""
+"droch-luach cumraíochta uimhriúil '%s' do '%s' in ionchur caighdeánach: %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in submodule-blob %s: %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s' i bhfo-mhodúl %s: %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in command line %s: %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s' i líne ordaithe %s: %s"
+
+#: config.c
+#, c-format
+msgid "bad numeric config value '%s' for '%s' in %s: %s"
+msgstr "droch-luach cumraíochta uimhriúil '%s' do '%s' i %s: %s"
+
+#: config.c
+#, c-format
+msgid "invalid value for variable %s"
+msgstr "luach neamhbhailí don athróg %s"
+
+#: config.c
+#, c-format
+msgid "ignoring unknown core.fsync component '%s'"
+msgstr "neamhaird a dhéanamh ar chomhpháirt core.fsync anaithnid '%s'"
+
+#: config.c
+#, c-format
+msgid "bad boolean config value '%s' for '%s'"
+msgstr "droch-luach cumraíochta boolean '%s' do '%s'"
+
+#: config.c
+#, c-format
+msgid "failed to expand user dir in: '%s'"
+msgstr "theip ar dir an úsáideora a leathnú i: '%s'"
+
+#: config.c
+#, c-format
+msgid "'%s' for '%s' is not a valid timestamp"
+msgstr "Ní stampa ama bailí é '%s' do '%s'"
+
+#: config.c
+#, c-format
+msgid "abbrev length out of range: %d"
+msgstr "fad a ghiorrú lasmuigh den raon: %d"
+
+#: config.c
+#, c-format
+msgid "bad zlib compression level %d"
+msgstr "droch-leibhéal comhbhrúite zlib %d"
+
+#: config.c
+#, c-format
+msgid "%s cannot contain newline"
+msgstr "Ní féidir le líne nua a bheith ag %s"
+
+#: config.c
+#, c-format
+msgid "%s must have at least one character"
+msgstr "Ní mór carachtar amháin ar a laghad a bheith ag %s"
+
+#: config.c
+#, c-format
+msgid "ignoring unknown core.fsyncMethod value '%s'"
+msgstr "neamhaird a dhéanamh ar luach core.fsyncMethod anaithnid '%s'"
+
+#: config.c
+msgid "core.fsyncObjectFiles is deprecated; use core.fsync instead"
+msgstr ""
+"tá core.fsyncObjectFiles díscothaithe; bain úsáid as core.fsync ina ionad"
+
+#: config.c
+#, c-format
+msgid "invalid mode for object creation: %s"
+msgstr "modh neamhbhailí chun réad a chruthú: %s"
+
+#: config.c
+#, c-format
+msgid "malformed value for %s"
+msgstr "luach mífhoirmithe do %s"
+
+#: config.c
+#, c-format
+msgid "malformed value for %s: %s"
+msgstr "luach mífhoirmithe do %s: %s"
+
+#: config.c
+msgid "must be one of nothing, matching, simple, upstream or current"
+msgstr ""
+"caithfidh sé a bheith ar cheann de rud ar bith, meaitseálach, simplí, suas "
+"srutha nó reatha"
+
+#: config.c
+#, c-format
+msgid "unable to load config blob object '%s'"
+msgstr "nach féidir réad blob cumraithe '%s' a luchtú"
+
+#: config.c
+#, c-format
+msgid "reference '%s' does not point to a blob"
+msgstr "ní thugann tagairt '%s' in iúl do bhlob"
+
+#: config.c
+#, c-format
+msgid "unable to resolve config blob '%s'"
+msgstr "in ann clob config '%s' a réiteach"
+
+#: config.c
+msgid "unable to parse command-line config"
+msgstr "nach féidir cumraíocht líne ordaithe a pháirseáil"
+
+#: config.c
+msgid "unknown error occurred while reading the configuration files"
+msgstr "tharla earráid anaithnid agus na comhaid cumraíochta á léamh"
+
+#: config.c
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr "%s neamhbhailí: '%s'"
+
+#: config.c
+#, c-format
+msgid "splitIndex.maxPercentChange value '%d' should be between 0 and 100"
+msgstr "splitIndex.maxPercentChange value '%d' bheith idir 0 agus 100"
+
+#: config.c
+#, c-format
+msgid "unable to parse '%s' from command-line config"
+msgstr "ní féidir '%s' a pháirseáil ó chumraíocht líne ordaithe"
+
+#: config.c
+#, c-format
+msgid "bad config variable '%s' in file '%s' at line %d"
+msgstr "droch-athróg cumraithe '%s' sa chomhad '%s' ag líne %d"
+
+#: config.c
+#, c-format
+msgid "invalid section name '%s'"
+msgstr "ainm rannán neamhbhailí '%s'"
+
+#: config.c
+#, c-format
+msgid "%s has multiple values"
+msgstr "Tá luachanna iolracha ag %s"
+
+#: config.c
+#, c-format
+msgid "failed to write new configuration file %s"
+msgstr "theip ar chomhad cumraíochta nua %s a scríobh"
+
+#: config.c
+#, c-format
+msgid "no multi-line comment allowed: '%s'"
+msgstr "níl aon trácht illíne ceadaithe: '%s'"
+
+#: config.c
+#, c-format
+msgid "could not lock config file %s"
+msgstr "ní fhéadfaí comhad cumraíochta %s a ghlasáil"
+
+#: config.c
+#, c-format
+msgid "opening %s"
+msgstr "oscailt %s"
+
+#: config.c
+#, c-format
+msgid "invalid config file %s"
+msgstr "comhad cumraithe neamhbhailí %s"
+
+#: config.c
+#, c-format
+msgid "fstat on %s failed"
+msgstr "theip ar fstat ar %s"
+
+#: config.c
+#, c-format
+msgid "unable to mmap '%s'%s"
+msgstr "ní féidir le '%s'%s a mmapáil"
+
+#: config.c
+#, c-format
+msgid "chmod on %s failed"
+msgstr "theip ar chmod ar %s"
+
+#: config.c
+#, c-format
+msgid "could not write config file %s"
+msgstr "ní fhéadfaí comhad cumraithe %s a scríobh"
+
+#: config.c
+#, c-format
+msgid "could not set '%s' to '%s'"
+msgstr "ní fhéadfaí '%s' a shocrú go '%s'"
+
+#: config.c
+#, c-format
+msgid "invalid section name: %s"
+msgstr "ainm rannán neamhbhailí: %s"
+
+#: config.c
+#, c-format
+msgid "refusing to work with overly long line in '%s' on line %<PRIuMAX>"
+msgstr "diúltú oibriú le líne rófhada i '%s' ar líne%<PRIuMAX>"
+
+#: config.c
+#, c-format
+msgid "missing value for '%s'"
+msgstr "luach ar iarraidh do '%s'"
+
+#: connect.c
+msgid "the remote end hung up upon initial contact"
+msgstr "crochadh an deireadh iargúlta ar an teagmháil tosaigh"
+
+#: connect.c
+msgid ""
+"Could not read from remote repository.\n"
+"\n"
+"Please make sure you have the correct access rights\n"
+"and the repository exists."
+msgstr ""
+"Ní fhéadfaí léamh ó stór iargúlta.\n"
+"\n"
+"Déan cinnte go bhfuil na cearta rochtana cearta agat\n"
+"agus tá an stór ann."
+
+#: connect.c
+#, c-format
+msgid "server doesn't support '%s'"
+msgstr "ní thacaíonn freastalaí le '%s'"
+
+#: connect.c
+#, c-format
+msgid "server doesn't support feature '%s'"
+msgstr "ní thacaíonn freastalaí le gné '%s'"
+
+#: connect.c
+msgid "expected flush after capabilities"
+msgstr "súil le sruth tar éis cumais"
+
+#: connect.c
+#, c-format
+msgid "ignoring capabilities after first line '%s'"
+msgstr "neamhaird a dhéanamh ar chumais tar éis an chéad líne '%s'"
+
+#: connect.c
+msgid "protocol error: unexpected capabilities^{}"
+msgstr "earráid prótacal: cumais gan choinne ^ {}"
+
+#: connect.c
+#, c-format
+msgid "protocol error: expected shallow sha-1, got '%s'"
+msgstr "earráid prótacal: táthar ag súil le sha-1 éadrom, fuair '%s'"
+
+#: connect.c
+msgid "repository on the other end cannot be shallow"
+msgstr "ní féidir stór ar an gceann eile a bheith éadrom"
+
+#: connect.c
+msgid "invalid packet"
+msgstr "pacáiste neamhbhail"
+
+#: connect.c
+#, c-format
+msgid "protocol error: unexpected '%s'"
+msgstr "earráid prótacal: '%s' gan choinne"
+
+#: connect.c
+#, c-format
+msgid "unknown object format '%s' specified by server"
+msgstr "formáid réad anaithnid '%s' arna shonrú ag freastalaí"
+
+#: connect.c
+#, c-format
+msgid "error on bundle-uri response line %d: %s"
+msgstr "earráid ar líne freagartha cumhachta %d: %s"
+
+#: connect.c
+msgid "expected flush after bundle-uri listing"
+msgstr "súil le sruth tar éis liostú bundle-uri"
+
+#: connect.c
+msgid "expected response end packet after ref listing"
+msgstr "pacáiste deiridh freagartha a bhfuiltear ag súil leis"
+
+#: connect.c
+#, c-format
+msgid "invalid ls-refs response: %s"
+msgstr "freagra neamhbhailí ls-refs: %s"
+
+#: connect.c
+msgid "expected flush after ref listing"
+msgstr "súil le sruth tar éis liostú tagartha"
+
+#: connect.c
+#, c-format
+msgid "protocol '%s' is not supported"
+msgstr "ní thacaítear le prótacal '%s'"
+
+#: connect.c
+msgid "unable to set SO_KEEPALIVE on socket"
+msgstr "in ann SO_KEEPALIVE a shocrú ar an soicéad"
+
+#: connect.c
+#, c-format
+msgid "Looking up %s ... "
+msgstr "Ag féachaint suas %s... "
+
+#: connect.c
+#, c-format
+msgid "unable to look up %s (port %s) (%s)"
+msgstr "nach féidir a lorg suas %s (port %s) (%s)"
+
+#. TRANSLATORS: this is the end of "Looking up %s ... "
+#: connect.c
+#, c-format
+msgid ""
+"done.\n"
+"Connecting to %s (port %s) ... "
+msgstr ""
+"déanta.\n"
+"Ag nascadh le %s (port %s)... "
+
+#: connect.c
+#, c-format
+msgid ""
+"unable to connect to %s:\n"
+"%s"
+msgstr ""
+"ní féidir a nascadh le %s:\n"
+"%s"
+
+#. TRANSLATORS: this is the end of "Connecting to %s (port %s) ... "
+#: connect.c
+msgid "done."
+msgstr "déanta."
+
+#: connect.c
+#, c-format
+msgid "unable to look up %s (%s)"
+msgstr "nach féidir a lorg suas %s (%s)"
+
+#: connect.c
+#, c-format
+msgid "unknown port %s"
+msgstr "port anaithnid %s"
+
+#: connect.c
+#, c-format
+msgid "strange hostname '%s' blocked"
+msgstr "ainm óstach aisteach '%s' blocáilte"
+
+#: connect.c
+#, c-format
+msgid "strange port '%s' blocked"
+msgstr "cosc ar chalafort aisteach '%s'"
+
+#: connect.c
+#, c-format
+msgid "cannot start proxy %s"
+msgstr "ní féidir le seachfhreastalaí %s"
+
+#: connect.c
+msgid "no path specified; see 'git help pull' for valid url syntax"
+msgstr ""
+"níl aon chosán sonraithe; féach 'git help pull' le haghaidh comhréireachta "
+"bailí url"
+
+#: connect.c
+msgid "newline is forbidden in git:// hosts and repo paths"
+msgstr "tá cosc ar líne nua in óstaigh git:// agus cosáin stórais"
+
+#: connect.c
+msgid "ssh variant 'simple' does not support -4"
+msgstr "ní thacaíonn leagan ssh 'simplí' le -4"
+
+#: connect.c
+msgid "ssh variant 'simple' does not support -6"
+msgstr "ní thacaíonn leagan ssh 'simplí' le -6"
+
+#: connect.c
+msgid "ssh variant 'simple' does not support setting port"
+msgstr "ní thacaíonn leagan ssh 'simplí' le port socrú"
+
+#: connect.c
+#, c-format
+msgid "strange pathname '%s' blocked"
+msgstr "cosc ar ainm cosán aisteach '%s'"
+
+#: connect.c
+msgid "unable to fork"
+msgstr "in ann a fhorc"
+
+#: connected.c
+msgid "Could not run 'git rev-list'"
+msgstr "Ní fhéadfaí 'git rev-list' a reáchtáil"
+
+#: connected.c
+msgid "failed write to rev-list"
+msgstr "theip ar scríobh chuig rev-list"
+
+#: connected.c
+msgid "failed to close rev-list's stdin"
+msgstr "theip orthu stdin rev-list a dhúnadh"
+
+#: convert.c
+#, c-format
+msgid "illegal crlf_action %d"
+msgstr "crlf_action mídhleathach %d"
+
+#: convert.c
+#, c-format
+msgid "CRLF would be replaced by LF in %s"
+msgstr "Bheadh LF in ionad CRLF i %s"
+
+#: convert.c
+#, c-format
+msgid ""
+"in the working copy of '%s', CRLF will be replaced by LF the next time Git "
+"touches it"
+msgstr ""
+"sa chóip oibre de '%s', cuirfear LF in ionad CRLF an chéad uair eile a "
+"théann Git leis"
+
+#: convert.c
+#, c-format
+msgid "LF would be replaced by CRLF in %s"
+msgstr "Bheadh CRLF in ionad LF i %s"
+
+#: convert.c
+#, c-format
+msgid ""
+"in the working copy of '%s', LF will be replaced by CRLF the next time Git "
+"touches it"
+msgstr ""
+"sa chóip oibre de '%s', cuirfear CRLF in ionad LF an chéad uair eile a "
+"théann Git leis"
+
+#: convert.c
+#, c-format
+msgid "BOM is prohibited in '%s' if encoded as %s"
+msgstr "Tá cosc ar BOM i '%s' má tá sé ionchódaithe mar %s"
+
+#: convert.c
+#, c-format
+msgid ""
+"The file '%s' contains a byte order mark (BOM). Please use UTF-%.*s as "
+"working-tree-encoding."
+msgstr ""
+"Tá marc ordaithe beart (BOM) sa chomhad '%s'. Bain úsáid as UTF-%.*s mar "
+"ionchódú crann oibre le do thoil."
+
+#: convert.c
+#, c-format
+msgid "BOM is required in '%s' if encoded as %s"
+msgstr "Tá BOM ag teastáil i '%s' má tá sé ionchódaithe mar %s"
+
+#: convert.c
+#, c-format
+msgid ""
+"The file '%s' is missing a byte order mark (BOM). Please use UTF-%sBE or UTF-"
+"%sLE (depending on the byte order) as working-tree-encoding."
+msgstr ""
+"Tá marc ordaithe beart (BOM) ar iarraidh sa chomhad '%s'. Bain úsáid as UTF-"
+"%sBE nó UTF-%sLE (ag brath ar ord na mbeart) mar ionchódú crann oibre."
+
+#: convert.c
+#, c-format
+msgid "failed to encode '%s' from %s to %s"
+msgstr "theip ar '%s' a ionchódú ó %s go %s"
+
+#: convert.c
+#, c-format
+msgid "encoding '%s' from %s to %s and back is not the same"
+msgstr "ionchódú '%s' ó %s go %s agus níl sé mar an gcéanna ar ais"
+
+#: convert.c
+#, c-format
+msgid "cannot fork to run external filter '%s'"
+msgstr "ní féidir forc chun scagaire seachtrach '%s' a reáchtáil"
+
+#: convert.c
+#, c-format
+msgid "cannot feed the input to external filter '%s'"
+msgstr "ní féidir leis an ionchur a bheathú chuig scagaire seachtrach '%s'"
+
+#: convert.c
+#, c-format
+msgid "external filter '%s' failed %d"
+msgstr "theip ar scagaire seachtrach '%s' %d"
+
+#: convert.c
+#, c-format
+msgid "read from external filter '%s' failed"
+msgstr "theip ar léamh ó scagaire seachtrach '%s'"
+
+#: convert.c
+#, c-format
+msgid "external filter '%s' failed"
+msgstr "theip ar scagaire seachtrach '%s'"
+
+#: convert.c
+msgid "unexpected filter type"
+msgstr "cineál scagaire gan choinne"
+
+#: convert.c
+msgid "path name too long for external filter"
+msgstr "ainm cosáin rófhada le haghaidh scagaire seachtrach"
+
+#: convert.c
+#, c-format
+msgid ""
+"external filter '%s' is not available anymore although not all paths have "
+"been filtered"
+msgstr ""
+"níl an scagaire seachtrach '%s' ar fáil a thuilleadh cé nach bhfuil na "
+"cosáin uile scagtha"
+
+#: convert.c
+msgid "true/false are no valid working-tree-encodings"
+msgstr "níl aon ionchódaithe bailí crainn oibre fíor-bhréagach"
+
+#: convert.c
+#, c-format
+msgid "%s: clean filter '%s' failed"
+msgstr "%s: theip ar scagaire glan '%s'"
+
+#: convert.c
+#, c-format
+msgid "%s: smudge filter %s failed"
+msgstr "%s: theip ar scagaire smudge %s"
+
+#: credential.c
+#, c-format
+msgid "skipping credential lookup for key: credential.%s"
+msgstr "cuardach creidiúnaithe a scipeáil le haghaidh eochair: creidiúnas. %s"
+
+#: credential.c
+msgid "refusing to work with credential missing host field"
+msgstr "diúltú oibriú le réimse óstach creidiúnaithe atá ar"
+
+#: credential.c
+msgid "refusing to work with credential missing protocol field"
+msgstr "diúltú oibriú le réimse prótacal ar iarraidh creidiú"
+
+#: credential.c
+#, c-format
+msgid "url contains a newline in its %s component: %s"
+msgstr "tá líne nua ina chomhpháirt %s ag url: %s"
+
+#: credential.c
+#, c-format
+msgid "url has no scheme: %s"
+msgstr "níl aon scéim ag url: %s"
+
+#: credential.c
+#, c-format
+msgid "credential url cannot be parsed: %s"
+msgstr "ní féidir url creidiúnaithe a pháirseáil: %s"
+
+#: daemon.c
+#, c-format
+msgid "invalid timeout '%s', expecting a non-negative integer"
+msgstr "ama neamhbhailí '%s', ag súil le sláimhir neamh-dhiúltach"
+
+#: daemon.c
+#, c-format
+msgid "invalid init-timeout '%s', expecting a non-negative integer"
+msgstr "ama init-time '%s' neamhbhailí, ag súil le sláimhir neamh-dhiúltach"
+
+#: daemon.c
+#, c-format
+msgid "invalid max-connections '%s', expecting an integer"
+msgstr "naisc uasta neamhbhailí '%s', ag súil le sláimhir"
+
+#: date.c
+msgid "in the future"
+msgstr "sa todhchaí"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> second ago"
+msgid_plural "%<PRIuMAX> seconds ago"
+msgstr[0] "%<PRIuMAX> soicind ó shin"
+msgstr[1] "%<PRIuMAX> soicind ó shin"
+msgstr[2] "%<PRIuMAX> soicind ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> minute ago"
+msgid_plural "%<PRIuMAX> minutes ago"
+msgstr[0] "%<PRIuMAX> nóiméad ó shin"
+msgstr[1] "%<PRIuMAX> nóiméad ó shin"
+msgstr[2] "%<PRIuMAX> nóiméad ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> hour ago"
+msgid_plural "%<PRIuMAX> hours ago"
+msgstr[0] "%<PRIuMAX> uair an chloig ó shin"
+msgstr[1] "%<PRIuMAX> uair an chloig ó shin"
+msgstr[2] "%<PRIuMAX> uair an chloig ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> day ago"
+msgid_plural "%<PRIuMAX> days ago"
+msgstr[0] "%<PRIuMAX> lá ó shin"
+msgstr[1] "%<PRIuMAX> lá ó shin"
+msgstr[2] "%<PRIuMAX> lá ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> week ago"
+msgid_plural "%<PRIuMAX> weeks ago"
+msgstr[0] "%<PRIuMAX> seachtain ó shin"
+msgstr[1] "%<PRIuMAX> seachtain ó shin"
+msgstr[2] "%<PRIuMAX> seachtain ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> month ago"
+msgid_plural "%<PRIuMAX> months ago"
+msgstr[0] "%<PRIuMAX> mí ó shin"
+msgstr[1] "%<PRIuMAX> mí ó shin"
+msgstr[2] "%<PRIuMAX> mí ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> year"
+msgid_plural "%<PRIuMAX> years"
+msgstr[0] "%<PRIuMAX> bliain"
+msgstr[1] "%<PRIuMAX> bliain"
+msgstr[2] "%<PRIuMAX> bliain"
+
+#. TRANSLATORS: "%s" is "<n> years"
+#: date.c
+#, c-format
+msgid "%s, %<PRIuMAX> month ago"
+msgid_plural "%s, %<PRIuMAX> months ago"
+msgstr[0] "%s, %<PRIuMAX> mí ó shin"
+msgstr[1] "%s, %<PRIuMAX> mí ó shin"
+msgstr[2] "%s, %<PRIuMAX> mí ó shin"
+
+#: date.c
+#, c-format
+msgid "%<PRIuMAX> year ago"
+msgid_plural "%<PRIuMAX> years ago"
+msgstr[0] "%<PRIuMAX> bliain ó shin"
+msgstr[1] "%<PRIuMAX> bliain ó shin"
+msgstr[2] "%<PRIuMAX> bliain ó shin"
+
+#: delta-islands.c
+msgid "Propagating island marks"
+msgstr "Marcanna oileáin a iomadú"
+
+#: delta-islands.c
+#, c-format
+msgid "bad tree object %s"
+msgstr "réad droch-chrann %s"
+
+#: delta-islands.c
+#, c-format
+msgid "failed to load island regex for '%s': %s"
+msgstr "theip ar an oileán regex a luchtú do '%s': %s"
+
+#: delta-islands.c
+#, c-format
+msgid "island regex from config has too many capture groups (max=%d)"
+msgstr "tá an iomarca grúpaí gabhála ag an oileán regex ó config (max = %d)"
+
+#: delta-islands.c
+#, c-format
+msgid "Marked %d islands, done.\n"
+msgstr "Oileáin %d marcáilte, déanta.\n"
+
+#: diagnose.c
+#, c-format
+msgid "invalid --%s value '%s'"
+msgstr "neamhbhailí --%s luach '%s'"
+
+#: diagnose.c
+#, c-format
+msgid "could not archive missing directory '%s'"
+msgstr "ní fhéadfaí eolaire '%s' in easnamh a chartlannú"
+
+#: diagnose.c dir.c
+#, c-format
+msgid "could not open directory '%s'"
+msgstr "ní raibh in ann eolaire '%s' a oscailt"
+
+#: diagnose.c
+#, c-format
+msgid "skipping '%s', which is neither file nor directory"
+msgstr "ag scipeáil '%s', nach comhad ná eolaire"
+
+#: diagnose.c
+msgid "could not duplicate stdout"
+msgstr "ní fhéadfaí stdout a dhúbailt"
+
+#: diagnose.c
+#, c-format
+msgid "could not add directory '%s' to archiver"
+msgstr "ní fhéadfaí eolaire '%s' a chur leis an gcartlann"
+
+#: diagnose.c
+msgid "failed to write archive"
+msgstr "theip ar chartlann a scríobh"
+
+#: diff-lib.c
+msgid "--merge-base does not work with ranges"
+msgstr "ní oibríonn --merge-base le raonta"
+
+#: diff-lib.c
+msgid "unable to get HEAD"
+msgstr "in ann HEAD a fháil"
+
+#: diff-lib.c
+msgid "no merge base found"
+msgstr "níl aon bhonn cumaisc le fáil"
+
+#: diff-lib.c
+msgid "multiple merge bases found"
+msgstr "fuarthas bonn cumaisc iolr"
+
+#: diff-no-index.c
+msgid "cannot compare stdin to a directory"
+msgstr "ní féidir stdin a chur i gcomparáid le eolaire"
+
+#: diff-no-index.c
+msgid "cannot compare a named pipe to a directory"
+msgstr "ní féidir píopa ainmnithe a chur i gcomparáid le eolaire"
+
+#: diff-no-index.c
+msgid "git diff --no-index [<options>] <path> <path>"
+msgstr "git diff --no-index [<options>] <path> <path>"
+
+#: diff-no-index.c
+msgid ""
+"Not a git repository. Use --no-index to compare two paths outside a working "
+"tree"
+msgstr ""
+"Ní stór git. Úsáid --no-index chun dhá chosán a chur i gcomparáid lasmuigh "
+"de chrann oibre"
+
+#: diff.c
+#, c-format
+msgid " Failed to parse dirstat cut-off percentage '%s'\n"
+msgstr " Theip ar chéatadán scoir dirstat '%s' a pharsáil\n"
+
+#: diff.c
+#, c-format
+msgid " Unknown dirstat parameter '%s'\n"
+msgstr " Paraiméadar dirstat anaithnid '%s'\n"
+
+#: diff.c
+msgid ""
+"color moved setting must be one of 'no', 'default', 'blocks', 'zebra', "
+"'dimmed-zebra', 'plain'"
+msgstr ""
+"caithfidh socrú dath a bhogadh a bheith ar cheann de 'níl', "
+"'réamhshocraithe', 'bloic', 'zebra', 'dimmed-zebra', 'simplí'"
+
+#: diff.c
+#, c-format
+msgid ""
+"unknown color-moved-ws mode '%s', possible values are 'ignore-space-change', "
+"'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'"
+msgstr ""
+"modh dath-gluaisea-ws anaithnid '%s', is iad na luachanna féideartha "
+"'neamhaird-spas-athrú', 'neamhaird a dhéanamh ar spás-at-eol', 'neamhaird a "
+"dhéanamh ar uile-spás', 'ligead-indentation-change'"
+
+#: diff.c
+msgid ""
+"color-moved-ws: allow-indentation-change cannot be combined with other "
+"whitespace modes"
+msgstr ""
+"dath-moved-ws: ní féidir athrú ligead-ionchur a chomhcheangal le modhanna "
+"spás bán eile"
+
+#: diff.c
+#, c-format
+msgid "Unknown value for 'diff.submodule' config variable: '%s'"
+msgstr "Luach anaithnid d'athróg cumraithe 'diff.submodule': '%s'"
+
+#: diff.c merge-ort.c transport.c
+#, c-format
+msgid "unknown value for config '%s': %s"
+msgstr "luach anaithnid do chumraíocht '%s': %s"
+
+#: diff.c
+#, c-format
+msgid ""
+"Found errors in 'diff.dirstat' config variable:\n"
+"%s"
+msgstr ""
+"Earráidí aimsithe in athróg config 'diff.dirstat':\n"
+"%s"
+
+#: diff.c
+#, c-format
+msgid "external diff died, stopping at %s"
+msgstr "fuair diff seachtrach bás, ag stopadh ag %s"
+
+#: diff.c
+msgid "--follow requires exactly one pathspec"
+msgstr "Teastaíonn --follow go díreach cosán amháin"
+
+#: diff.c
+#, c-format
+msgid "pathspec magic not supported by --follow: %s"
+msgstr "draíocht pathspec nach dtacaíonn --follow: %s"
+
+#: diff.c parse-options.c
+#, c-format
+msgid "options '%s', '%s', '%s', and '%s' cannot be used together"
+msgstr "ní féidir roghanna '%s', '%s', '%s', agus '%s' a úsáid le chéile"
+
+#: diff.c
+#, c-format
+msgid "options '%s' and '%s' cannot be used together, use '%s' with '%s'"
+msgstr ""
+"ní féidir roghanna '%s' agus '%s' a úsáid le chéile, bain úsáid as '%s' le "
+"'%s'"
+
+#: diff.c
+#, c-format
+msgid ""
+"options '%s' and '%s' cannot be used together, use '%s' with '%s' and '%s'"
+msgstr ""
+"ní féidir roghanna '%s' agus '%s' a úsáid le chéile, bain úsáid as '%s' le "
+"'%s' agus '%s'"
+
+#: diff.c
+#, c-format
+msgid "invalid --stat value: %s"
+msgstr "luach --stat neamhbhailí: %s"
+
+#: diff.c parse-options.c
+#, c-format
+msgid "%s expects a numerical value"
+msgstr "Tá %s ag súil le luach uimhriúil"
+
+#: diff.c
+#, c-format
+msgid ""
+"Failed to parse --dirstat/-X option parameter:\n"
+"%s"
+msgstr ""
+"Theip ar pharaiméadar rogha --dirstat/-X a pháirseáil:\n"
+"%s"
+
+#: diff.c
+#, c-format
+msgid "unknown change class '%c' in --diff-filter=%s"
+msgstr "aicme athraithe anaithnid '%c' i --diff-filter=%s"
+
+#: diff.c
+#, c-format
+msgid "unknown value after ws-error-highlight=%.*s"
+msgstr "luach anaithnid tar éis ws-error-highlight =%.*s"
+
+#: diff.c
+#, c-format
+msgid "unable to resolve '%s'"
+msgstr "nach féidir '%s' a réiteach"
+
+#: diff.c
+#, c-format
+msgid "%s expects <n>/<m> form"
+msgstr "Tá %s ag súil le<n>/fo <m>irm"
+
+#: diff.c
+#, c-format
+msgid "%s expects a character, got '%s'"
+msgstr "Tá %s ag súil le carachtar, fuair '%s'"
+
+#: diff.c
+#, c-format
+msgid "bad --color-moved argument: %s"
+msgstr "argóint lochtach --color-moved: %s"
+
+#: diff.c
+#, c-format
+msgid "invalid mode '%s' in --color-moved-ws"
+msgstr "modh neamhbhailí '%s' i --color-moved-ws"
+
+#: diff.c
+#, c-format
+msgid "invalid argument to %s"
+msgstr "argóint neamhbhailí chuig %s"
+
+#: diff.c
+#, c-format
+msgid "invalid regex given to -I: '%s'"
+msgstr "regex neamhbhailí a thugtar do -I: '%s'"
+
+#: diff.c
+msgid "-G requires a non-empty argument"
+msgstr "Éilíonn -G argóint neamh-folamh"
+
+#: diff.c
+msgid "-S requires a non-empty argument"
+msgstr "Éilíonn -S argóint neamh-folamh"
+
+#: diff.c
+#, c-format
+msgid "failed to parse --submodule option parameter: '%s'"
+msgstr "theip ar pharaiméadar rogha --submodule a pháirseáil: '%s'"
+
+#: diff.c
+#, c-format
+msgid "bad --word-diff argument: %s"
+msgstr "argóint olc --word-diff: %s"
+
+#: diff.c
+msgid "Diff output format options"
+msgstr "Roghanna formáid aschuir diff"
+
+#: diff.c
+msgid "generate patch"
+msgstr "paiste a ghiniúint"
+
+#: diff.c
+msgid "<n>"
+msgstr "<n>"
+
+#: diff.c
+msgid "generate diffs with <n> lines context"
+msgstr "difríochtaí a ghiniúint le comhthéacs <n>lín"
+
+#: diff.c
+msgid "generate the diff in raw format"
+msgstr "giniúint an diff i bhformáid amh"
+
+#: diff.c
+msgid "synonym for '-p --raw'"
+msgstr "comhchiallach do '-p --raw'"
+
+#: diff.c
+msgid "synonym for '-p --stat'"
+msgstr "comhchiallach do '-p --stat'"
+
+#: diff.c
+msgid "machine friendly --stat"
+msgstr "cairdiúil le meaisín --stat"
+
+#: diff.c
+msgid "output only the last line of --stat"
+msgstr "aschur ach an líne dheireanach de --stat"
+
+#: diff.c
+msgid "<param1>,<param2>..."
+msgstr "<param1>,<param2>..."
+
+#: diff.c
+msgid ""
+"output the distribution of relative amount of changes for each sub-directory"
+msgstr "aschur dáileadh méid coibhneasta na n-athruithe do gach fo-eolaire"
+
+#: diff.c
+msgid "synonym for --dirstat=cumulative"
+msgstr "comhchiallach do --dirstat=cumulative"
+
+#: diff.c
+msgid "synonym for --dirstat=files,<param1>,<param2>..."
+msgstr "comhchiallaigh le haghaidh --dirstat=files,<param1>,<param2>..."
+
+#: diff.c
+msgid "warn if changes introduce conflict markers or whitespace errors"
+msgstr ""
+"rabhadh má thugann athruithe marcóirí coinbhleachta nó earráidí spás bán "
+"isteach"
+
+#: diff.c
+msgid "condensed summary such as creations, renames and mode changes"
+msgstr ""
+"achoimre chomhdhlúite mar chruthúcháin, athainmneacha agus athruithe mó"
+
+#: diff.c
+msgid "show only names of changed files"
+msgstr "taispeáint ach ainmneacha comhaid athraithe"
+
+#: diff.c
+msgid "show only names and status of changed files"
+msgstr "taispeáint ach ainmneacha agus stádas na gcomhaid athraithe"
+
+#: diff.c
+msgid "<width>[,<name-width>[,<count>]]"
+msgstr "<width>[, <name-width>[,<count>]]"
+
+#: diff.c
+msgid "generate diffstat"
+msgstr "diffstat a ghiniúint"
+
+#: diff.c
+msgid "<width>"
+msgstr "<width>"
+
+#: diff.c
+msgid "generate diffstat with a given width"
+msgstr "diffstat a ghiniúint le leithead ar leith"
+
+#: diff.c
+msgid "generate diffstat with a given name width"
+msgstr "diffstat a ghiniúint le leithead ainm ar leith"
+
+#: diff.c
+msgid "generate diffstat with a given graph width"
+msgstr "diffstat a ghiniúint le leithead graf ar leith"
+
+#: diff.c
+msgid "<count>"
+msgstr "<count>"
+
+#: diff.c
+msgid "generate diffstat with limited lines"
+msgstr "diffstat a ghiniúint le línte teoranta"
+
+#: diff.c
+msgid "generate compact summary in diffstat"
+msgstr "achoimre dlúth a ghiniúint i diffstat"
+
+#: diff.c
+msgid "output a binary diff that can be applied"
+msgstr "aschur diff dénártha is féidir a chur i bhfeidhm"
+
+#: diff.c
+msgid "show full pre- and post-image object names on the \"index\" lines"
+msgstr ""
+"taispeáint ainmneacha réad réad réamh-íomhá iomlána ar na línte “innéacs”"
+
+#: diff.c
+msgid "show colored diff"
+msgstr "taispeáin éagsúlacht daite"
+
+#: diff.c
+msgid "<kind>"
+msgstr "<kind>"
+
+#: diff.c
+msgid ""
+"highlight whitespace errors in the 'context', 'old' or 'new' lines in the "
+"diff"
+msgstr ""
+"aird a tharraingt ar earráidí spás bán sna línte 'comhthéacs', 'sean' nó "
+"'nua' sa diff"
+
+#: diff.c
+msgid ""
+"do not munge pathnames and use NULs as output field terminators in --raw or "
+"--numstat"
+msgstr ""
+"ná cuir ainmneacha cosáin agus bain úsáid as NULanna mar chríochnóirí réimse "
+"aschuir i --raw nó --numstat"
+
+#: diff.c
+msgid "<prefix>"
+msgstr "<prefix>"
+
+#: diff.c
+msgid "show the given source prefix instead of \"a/\""
+msgstr "taispeáint an réimír foinse a thugtar in ionad “a/”"
+
+#: diff.c
+msgid "show the given destination prefix instead of \"b/\""
+msgstr "taispeáin an réimír ceann scríbe tugtha in ionad “b/”"
+
+#: diff.c
+msgid "prepend an additional prefix to every line of output"
+msgstr "réimír bhreise a chur ar fáil do gach líne aschuir"
+
+#: diff.c
+msgid "do not show any source or destination prefix"
+msgstr "ná taispeáin aon réimír foinse nó ceann scríbe"
+
+#: diff.c
+msgid "use default prefixes a/ and b/"
+msgstr "bain úsáid as réamhshocraithe a/ agus b/"
+
+#: diff.c
+msgid "show context between diff hunks up to the specified number of lines"
+msgstr ""
+"comhthéacs a thaispeáint idir diff hunks suas go dtí an líon sonraithe línte"
+
+#: diff.c
+msgid "<char>"
+msgstr "<char>"
+
+#: diff.c
+msgid "specify the character to indicate a new line instead of '+'"
+msgstr "sonraigh an carachtar chun líne nua a léiriú in ionad '+'"
+
+#: diff.c
+msgid "specify the character to indicate an old line instead of '-'"
+msgstr "sonraigh an carachtar chun sean-líne a chur in iúl in ionad '-'"
+
+#: diff.c
+msgid "specify the character to indicate a context instead of ' '"
+msgstr "sonraigh an carachtar chun comhthéacs in ionad '' a chur in iúl"
+
+#: diff.c
+msgid "Diff rename options"
+msgstr "Roghanna athainmnithe Diff"
+
+#: diff.c
+msgid "<n>[/<m>]"
+msgstr "<n>[/<m>]"
+
+#: diff.c
+msgid "break complete rewrite changes into pairs of delete and create"
+msgstr ""
+"athruithe iomlána athscríobh a bhriseadh i bpéirí scrios agus cruthaigh"
+
+#: diff.c
+msgid "detect renames"
+msgstr "athainmneacha a bhrath"
+
+#: diff.c
+msgid "omit the preimage for deletes"
+msgstr "fág an réamhíomhá le haghaidh scriosadh"
+
+#: diff.c
+msgid "detect copies"
+msgstr "cóipí a bhrath"
+
+#: diff.c
+msgid "use unmodified files as source to find copies"
+msgstr "úsáid comhaid neamh-mhodhnaithe mar fhoinse chun cóipeanna a fháil"
+
+#: diff.c
+msgid "disable rename detection"
+msgstr "díchumasaigh braite athainmnithe"
+
+#: diff.c
+msgid "use empty blobs as rename source"
+msgstr "bain úsáid as blobs folamh mar fhoinse athainmnithe"
+
+#: diff.c
+msgid "continue listing the history of a file beyond renames"
+msgstr "leanúint ar aghaidh ag liostáil stair chomhaid thar athainmneacha"
+
+#: diff.c
+msgid ""
+"prevent rename/copy detection if the number of rename/copy targets exceeds "
+"given limit"
+msgstr ""
+"cosc a chur ar athainmniú/braite cóipeála má sháraíonn líon na spriocanna "
+"athainmniúcháin/cóipeála"
+
+#: diff.c
+msgid "Diff algorithm options"
+msgstr "Roghanna algartam Diff"
+
+#: diff.c
+msgid "produce the smallest possible diff"
+msgstr "an difríocht is lú is féidir a tháirgeadh"
+
+#: diff.c
+msgid "ignore whitespace when comparing lines"
+msgstr "neamhaird a dhéanamh ar spás bán agus tú ag comparáid"
+
+#: diff.c
+msgid "ignore changes in amount of whitespace"
+msgstr "neamhaird a dhéanamh ar athruithe i méid an spás bán"
+
+#: diff.c
+msgid "ignore changes in whitespace at EOL"
+msgstr "neamhaird a dhéanamh ar athruithe i spás bán ag EOL"
+
+#: diff.c
+msgid "ignore carrier-return at the end of line"
+msgstr "neamhaird a dhéanamh ar thuairisceán iompróra ag deireadh na líne"
+
+#: diff.c
+msgid "ignore changes whose lines are all blank"
+msgstr "neamhaird a dhéanamh ar athruithe atá a línte bán"
+
+#: diff.c
+msgid "<regex>"
+msgstr "<regex>"
+
+#: diff.c
+msgid "ignore changes whose all lines match <regex>"
+msgstr "neamhaird a dhéanamh ar athruithe a mheaitseann <regex>"
+
+#: diff.c
+msgid "heuristic to shift diff hunk boundaries for easy reading"
+msgstr "heuristic chun teorainneacha éagsúla a aistriú le haghaidh léamh éasca"
+
+#: diff.c
+msgid "generate diff using the \"patience diff\" algorithm"
+msgstr "diff a ghiniúint ag baint úsáide as an algartam “diff foighne”"
+
+#: diff.c
+msgid "generate diff using the \"histogram diff\" algorithm"
+msgstr "diff a ghiniúint ag baint úsáide as an algartam “diff histogram”"
+
+#: diff.c
+msgid "<text>"
+msgstr "<text>"
+
+#: diff.c
+msgid "generate diff using the \"anchored diff\" algorithm"
+msgstr "diff a ghiniúint ag baint úsáide as an algartam “diff ancáraithe”"
+
+#: diff.c
+msgid "<mode>"
+msgstr "<mode>"
+
+#: diff.c
+msgid "show word diff, using <mode> to delimit changed words"
+msgstr ""
+"taispeáint diff focal, ag baint úsáide as focail <mode>athraithe a theorannú"
+
+#: diff.c
+msgid "use <regex> to decide what a word is"
+msgstr "bain úsáid <regex>as chun cinneadh a dhéanamh cad é focal"
+
+#: diff.c
+msgid "equivalent to --word-diff=color --word-diff-regex=<regex>"
+msgstr "coibhéiseach le --word-diff=color --word-diff-regex=<regex>"
+
+#: diff.c
+msgid "moved lines of code are colored differently"
+msgstr "tá línte cóid bogadh daite difriúil"
+
+#: diff.c
+msgid "how white spaces are ignored in --color-moved"
+msgstr "conas a dhéantar neamhaird de spásanna bána i --color-moved"
+
+#: diff.c
+msgid "Other diff options"
+msgstr "Roghanna diff eile"
+
+#: diff.c
+msgid "when run from subdir, exclude changes outside and show relative paths"
+msgstr ""
+"nuair a bheidh á rith ó subdir, eisiamh athruithe lasmuigh agus taispeáin "
+"coibhneasta"
+
+#: diff.c
+msgid "treat all files as text"
+msgstr "déileáil le gach comhad mar théacs"
+
+#: diff.c
+msgid "swap two inputs, reverse the diff"
+msgstr "dhá ionchur a mhalartú, an diff a aisiompú"
+
+#: diff.c
+msgid "exit with 1 if there were differences, 0 otherwise"
+msgstr "imeacht le 1 má bhí difríochtaí ann, 0 ar shlí eile"
+
+#: diff.c
+msgid "disable all output of the program"
+msgstr "díchumasú gach aschur an chláir"
+
+#: diff.c
+msgid "allow an external diff helper to be executed"
+msgstr "ligean do chúntóir diff seachtrach a fhorghníomhú"
+
+#: diff.c
+msgid "run external text conversion filters when comparing binary files"
+msgstr "reáchtáil scagairí tiontaithe téacs seachtracha agus comhaid"
+
+#: diff.c
+msgid "<when>"
+msgstr "<when>"
+
+#: diff.c
+msgid "ignore changes to submodules in the diff generation"
+msgstr "neamhaird a dhéanamh ar athruithe ar fho-mhodúil sa ghiniúint diff"
+
+#: diff.c
+msgid "<format>"
+msgstr "<format>"
+
+#: diff.c
+msgid "specify how differences in submodules are shown"
+msgstr "sonraigh conas a thaispeántar na difríochtaí i bhfo-"
+
+#: diff.c
+msgid "hide 'git add -N' entries from the index"
+msgstr "folaigh iontrálacha 'git add -N' ón innéacs"
+
+#: diff.c
+msgid "treat 'git add -N' entries as real in the index"
+msgstr "déileáil le hiontrálacha 'git add -N' mar atá fíor san innéacs"
+
+#: diff.c
+msgid "<string>"
+msgstr "<string>"
+
+#: diff.c
+msgid ""
+"look for differences that change the number of occurrences of the specified "
+"string"
+msgstr ""
+"cuardaigh difríochtaí a athraíonn líon na n-imeachtaí sa sreang sonraithe"
+
+#: diff.c
+msgid ""
+"look for differences that change the number of occurrences of the specified "
+"regex"
+msgstr ""
+"cuardaigh difríochtaí a athraíonn líon na n-imeachtaí sa regex sonraithe"
+
+#: diff.c
+msgid "show all changes in the changeset with -S or -G"
+msgstr "taispeáint na hathruithe go léir sa tacar athraithe le -S nó -G"
+
+#: diff.c
+msgid "treat <string> in -S as extended POSIX regular expression"
+msgstr "caitheamh <string>le -S mar léiriú rialta POSIX leathnaithe"
+
+#: diff.c
+msgid "control the order in which files appear in the output"
+msgstr "rialú an t-ord ina bhfuil comhaid le feiceáil san aschur"
+
+#: diff.c
+msgid "<path>"
+msgstr "<path>"
+
+#: diff.c
+msgid "show the change in the specified path first"
+msgstr "taispeáin an t-athrú ar an gcosán sonraithe ar dtús"
+
+#: diff.c
+msgid "skip the output to the specified path"
+msgstr "scipeáil an t-aschur chuig an gcosán sonraithe"
+
+#: diff.c
+msgid "<object-id>"
+msgstr "<object-id>"
+
+#: diff.c
+msgid ""
+"look for differences that change the number of occurrences of the specified "
+"object"
+msgstr "cuardaigh difríochtaí a athraíonn líon na n-earraí den réad sonraithe"
+
+#: diff.c
+msgid "[(A|C|D|M|R|T|U|X|B)...[*]]"
+msgstr "[(A|C|D|M|R|T|U|X|B)... [*]]"
+
+#: diff.c
+msgid "select files by diff type"
+msgstr "roghnaigh comhaid de réir cineál diff"
+
+#: diff.c
+msgid "<file>"
+msgstr "<file>"
+
+#: diff.c
+msgid "output to a specific file"
+msgstr "aschur chuig comhad ar leith"
+
+#: diff.c
+msgid "exhaustive rename detection was skipped due to too many files."
+msgstr ""
+"scipeánadh braite athainmnithe uileghabhálach mar gheall ar an iomarca "
+"comhaid."
+
+#: diff.c
+msgid "only found copies from modified paths due to too many files."
+msgstr ""
+"ní bhfuarthas ach cóipeanna ó chosáin modhnaithe mar gheall ar an iomarca "
+"comhaid."
+
+#: diff.c
+#, c-format
+msgid ""
+"you may want to set your %s variable to at least %d and retry the command."
+msgstr ""
+"b'fhéidir gur mhaith leat d'athróg %s a shocrú go %d ar a laghad agus "
+"iarracht a dhéanamh arís ar an ordú."
+
+#: diffcore-order.c
+#, c-format
+msgid "failed to read orderfile '%s'"
+msgstr "theip ar chomhad ordaithe '%s' a léamh"
+
+#: diffcore-rename.c
+msgid "Performing inexact rename detection"
+msgstr "Braite athainmnithe míchruinn a dhéanamh"
+
+#: diffcore-rotate.c
+#, c-format
+msgid "No such path '%s' in the diff"
+msgstr "Níl aon chosán den sórt sin '%s' sa diff"
+
+#: dir.c
+#, c-format
+msgid "pathspec '%s' did not match any file(s) known to git"
+msgstr "níor mheaitseáil pathspec '%s' aon chomhad (í) ar eolas ag git"
+
+#: dir.c
+#, c-format
+msgid "unrecognized pattern: '%s'"
+msgstr "patrún gan aithint: '%s'"
+
+#: dir.c
+#, c-format
+msgid "unrecognized negative pattern: '%s'"
+msgstr "patrún diúltach gan aithint: '%s'"
+
+#: dir.c
+#, c-format
+msgid "your sparse-checkout file may have issues: pattern '%s' is repeated"
+msgstr ""
+"d'fhéadfadh fadhbanna a bheith ag do chomhad seiceála neamhchoitianta: "
+"déantar patrún '%s' arís eile"
+
+#: dir.c
+msgid "disabling cone pattern matching"
+msgstr "meaitseáil patrún cón a dhíchumas"
+
+#: dir.c
+#, c-format
+msgid "cannot use %s as an exclude file"
+msgstr "ní féidir %s a úsáid mar chomhad eisiata"
+
+#: dir.c
+msgid "failed to get kernel name and information"
+msgstr "theip ar ainm eithne agus faisnéis a fháil"
+
+#: dir.c
+msgid "untracked cache is disabled on this system or location"
+msgstr ""
+"tá taisce neamhrianaithe díchumasaithe ar an gcóras nó ar an suíomh seo"
+
+#: dir.c
+msgid ""
+"No directory name could be guessed.\n"
+"Please specify a directory on the command line"
+msgstr ""
+"Ní fhéadfaí aon ainm eolaire a thuairim.\n"
+"Sonraigh eolaire ar an líne ordaithe le do thoil"
+
+#: dir.c
+#, c-format
+msgid "index file corrupt in repo %s"
+msgstr "comhad innéacs truaillithe i repo %s"
+
+#: dir.c
+#, c-format
+msgid "could not create directories for %s"
+msgstr "ní fhéadfaí eolairí a chruthú do %s"
+
+#: dir.c
+#, c-format
+msgid "could not migrate git directory from '%s' to '%s'"
+msgstr "ní fhéadfaí eolaire git a aistriú ó '%s' go '%s'"
+
+#: editor.c
+#, c-format
+msgid "hint: Waiting for your editor to close the file...%c"
+msgstr "leid: Ag fanacht go ndúnfaidh d'eagarthóir an comhad... %c"
+
+#: editor.c sequencer.c wrapper.c
+#, c-format
+msgid "could not write to '%s'"
+msgstr "ní fhéadfaí scríobh chuig '%s'"
+
+#: editor.c
+#, c-format
+msgid "could not edit '%s'"
+msgstr "ní fhéadfaí '%s' a chur in eagar"
+
+#: entry.c
+msgid "Filtering content"
+msgstr "Ábhar scagadh"
+
+#: entry.c
+#, c-format
+msgid "could not stat file '%s'"
+msgstr "ní fhéadfaí an comhad '%s' a statú"
+
+#: environment.c
+#, c-format
+msgid "bad git namespace path \"%s\""
+msgstr "cosán spás ainmneacha git go dona “%s”"
+
+#: exec-cmd.c
+#, c-format
+msgid "too many args to run %s"
+msgstr "an iomarca args chun %s a rith"
+
+#: fetch-pack.c
+#, c-format
+msgid ""
+"You are attempting to fetch %s, which is in the commit graph file but not in "
+"the object database.\n"
+"This is probably due to repo corruption.\n"
+"If you are attempting to repair this repo corruption by refetching the "
+"missing object, use 'git fetch --refetch' with the missing object."
+msgstr ""
+"Tá tú ag iarraidh %s a fháil, atá sa chomhad graf tiomanta ach nach bhfuil "
+"sa bhunachar sonraí réada.\n"
+"Is dócha go bhfuil sé seo mar gheall ar éilliú repo.\n"
+"Má tá tú ag iarraidh an éilliú repo seo a dheisiú tríd an réad atá in "
+"easnamh a athghabháil, bain úsáid as 'git fetch --refetch' leis an réad atá "
+"ar iarraidh."
+
+#: fetch-pack.c
+msgid "git fetch-pack: expected shallow list"
+msgstr "git fetch-pack: liosta éadomhain a bhfuiltear ag súil leis"
+
+#: fetch-pack.c
+msgid "git fetch-pack: expected a flush packet after shallow list"
+msgstr ""
+"git fetch-pack: bhíothas ag súil le paicéad sruthán tar éis liosta éadrom"
+
+#: fetch-pack.c
+msgid "git fetch-pack: expected ACK/NAK, got a flush packet"
+msgstr "git fetch-pack: ag súil le ACK/NAK, fuair sé paicéad sruthán"
+
+#: fetch-pack.c
+#, c-format
+msgid "git fetch-pack: expected ACK/NAK, got '%s'"
+msgstr "git fetch-pack: ag súil le ACK/NAK, fuair '%s'"
+
+#: fetch-pack.c
+msgid "unable to write to remote"
+msgstr "in ann scríobh chuig iargúlta"
+
+#: fetch-pack.c
+msgid "Server supports filter"
+msgstr "Tacaíonn freastalaí le sc"
+
+#: fetch-pack.c
+#, c-format
+msgid "invalid shallow line: %s"
+msgstr "líne éadomhain neamhbhailí: %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "invalid unshallow line: %s"
+msgstr "líne neamhéadrom neamhbhailí: %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "object not found: %s"
+msgstr "níor aimsíodh réad: %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "error in object: %s"
+msgstr "earráid i réad: %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "no shallow found: %s"
+msgstr "níl aon éadrom aimsithe: %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "expected shallow/unshallow, got %s"
+msgstr "bhíothas ag súil leis íol/neamhéadrom, fuair %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "got %s %d %s"
+msgstr "fuair %s %d %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "invalid commit %s"
+msgstr "tiomantas neamhbhailí %s"
+
+#: fetch-pack.c
+msgid "giving up"
+msgstr "tabhairt suas"
+
+#: fetch-pack.c progress.h
+msgid "done"
+msgstr "déanta"
+
+#: fetch-pack.c
+#, c-format
+msgid "got %s (%d) %s"
+msgstr "fuair %s (%d) %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "Marking %s as complete"
+msgstr "Mharcáil %s mar iomlán"
+
+#: fetch-pack.c
+#, c-format
+msgid "already have %s (%s)"
+msgstr "tá %s ann cheana féin (%s)"
+
+#: fetch-pack.c
+msgid "fetch-pack: unable to fork off sideband demultiplexer"
+msgstr "pacáiste tarchuir: ní féidir le démultiplexer banna taobh a fhorc"
+
+#: fetch-pack.c
+msgid "protocol error: bad pack header"
+msgstr "earráid prótacal: ceanntásc an phacá"
+
+#: fetch-pack.c
+#, c-format
+msgid "fetch-pack: unable to fork off %s"
+msgstr "fetch-pack: ní féidir %s a fhorc"
+
+#: fetch-pack.c
+msgid "fetch-pack: invalid index-pack output"
+msgstr "fetch-pack: aschur pacáiste innéacs-neamhbhailí"
+
+#: fetch-pack.c
+#, c-format
+msgid "%s failed"
+msgstr "Theip ar %s"
+
+#: fetch-pack.c
+msgid "error in sideband demultiplexer"
+msgstr "earráid i demultiplexer taobhbanna"
+
+#: fetch-pack.c
+#, c-format
+msgid "Server version is %.*s"
+msgstr "Is é leagan freastalaí %.*s"
+
+#: fetch-pack.c
+#, c-format
+msgid "Server supports %s"
+msgstr "Tacaíonn freastalaí le %s"
+
+#: fetch-pack.c
+msgid "Server does not support shallow clients"
+msgstr "Ní thacaíonn freastalaí le cliaint éadrom"
+
+#: fetch-pack.c
+msgid "Server does not support --shallow-since"
+msgstr "Ní thacaíonn freastalaí le --shallow-since"
+
+#: fetch-pack.c
+msgid "Server does not support --shallow-exclude"
+msgstr "Ní thacaíonn freastalaí le --shallow-exclude"
+
+#: fetch-pack.c
+msgid "Server does not support --deepen"
+msgstr "Ní thacaíonn freastalaí le --deepen"
+
+#: fetch-pack.c
+msgid "Server does not support this repository's object format"
+msgstr "Ní thacaíonn freastalaí le formáid réad an stór seo"
+
+#: fetch-pack.c
+msgid "no common commits"
+msgstr "gan aon gealltanais choiteann"
+
+#: fetch-pack.c
+msgid "git fetch-pack: fetch failed."
+msgstr "git fetch-pack: theip ar fáil."
+
+#: fetch-pack.c
+#, c-format
+msgid "mismatched algorithms: client %s; server %s"
+msgstr "halgartaim míchomhoiriúnach: cliant %s; freastalaí %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "the server does not support algorithm '%s'"
+msgstr "ní thacaíonn an freastalaí algartam '%s'"
+
+#: fetch-pack.c
+msgid "Server does not support shallow requests"
+msgstr "Ní thacaíonn an freastalaí le hiarratais"
+
+#: fetch-pack.c
+msgid "unable to write request to remote"
+msgstr "in ann iarratas a scríobh chuig iargúlta"
+
+#: fetch-pack.c
+#, c-format
+msgid "expected '%s', received '%s'"
+msgstr "bhíothas ag súil le '%s', fuarthas '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "expected '%s'"
+msgstr "ag súil le '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "unexpected acknowledgment line: '%s'"
+msgstr "líne admhaithe gan choinne: '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "error processing acks: %d"
+msgstr "earráidí próiseála earráide: %d"
+
+#. TRANSLATORS: The parameter will be 'ready', a protocol
+#. keyword.
+#.
+#: fetch-pack.c
+#, c-format
+msgid "expected packfile to be sent after '%s'"
+msgstr "táthar ag súil go seolfar pacáid tar éis '%s'"
+
+#. TRANSLATORS: The parameter will be 'ready', a protocol
+#. keyword.
+#.
+#: fetch-pack.c
+#, c-format
+msgid "expected no other sections to be sent after no '%s'"
+msgstr ""
+"bhíothas ag súil nach gcuirfear aon chuid eile a sheoladh tar éis gan '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "error processing shallow info: %d"
+msgstr "earráid ag próiseáil faisnéis éadrom: %d"
+
+#: fetch-pack.c
+#, c-format
+msgid "expected wanted-ref, got '%s'"
+msgstr "bhíothas ag súil leis an tagairt a theastaigh, fuair '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "unexpected wanted-ref: '%s'"
+msgstr "gan choinne wanted-ref: '%s'"
+
+#: fetch-pack.c
+#, c-format
+msgid "error processing wanted refs: %d"
+msgstr "próiseáil earráidí a theastaíonn referens: %d"
+
+#: fetch-pack.c
+msgid "git fetch-pack: expected response end packet"
+msgstr "git fetch-pack: paicéad deiridh freagartha ag súil leis"
+
+#: fetch-pack.c
+msgid "no matching remote head"
+msgstr "gan ceann iargúlta meaitseála"
+
+#: fetch-pack.c
+msgid "unexpected 'ready' from remote"
+msgstr "gan choinne 'réidh' ó iargúlta"
+
+#: fetch-pack.c
+#, c-format
+msgid "no such remote ref %s"
+msgstr "aon tagairt iargúlta den sórt sin %s"
+
+#: fetch-pack.c
+#, c-format
+msgid "Server does not allow request for unadvertised object %s"
+msgstr "Ní cheadaíonn freastalaí iarraidh ar réad neamhfhógraithe %s"
+
+#: fsmonitor-ipc.c
+#, c-format
+msgid "fsmonitor_ipc__send_query: invalid path '%s'"
+msgstr "fsmonitor_ipc__send_query: cosán neamhbhailí '%s'"
+
+#: fsmonitor-ipc.c
+#, c-format
+msgid "fsmonitor_ipc__send_query: unspecified error on '%s'"
+msgstr "fsmonitor_ipc__send_query: earráid neamhshonraithe ar '%s'"
+
+#: fsmonitor-ipc.c
+msgid "fsmonitor--daemon is not running"
+msgstr "níl fsmonitor--daemon ag rith"
+
+#: fsmonitor-ipc.c
+#, c-format
+msgid "could not send '%s' command to fsmonitor--daemon"
+msgstr "ní fhéadfaí ordú '%s' a sheoladh chuig fsmonitor--daemon"
+
+#: fsmonitor-settings.c
+#, c-format
+msgid "bare repository '%s' is incompatible with fsmonitor"
+msgstr "níl stór lom '%s' neamhoiriúnach le fsmonitor"
+
+#: fsmonitor-settings.c
+#, c-format
+msgid "repository '%s' is incompatible with fsmonitor due to errors"
+msgstr "tá stór '%s' neamh-chomhoiriúnach le fsmonitor de bharr earráidí"
+
+#: fsmonitor-settings.c
+#, c-format
+msgid "remote repository '%s' is incompatible with fsmonitor"
+msgstr "níl stór iargúlta '%s' neamhoiriúnach le fsmonitor"
+
+#: fsmonitor-settings.c
+#, c-format
+msgid "virtual repository '%s' is incompatible with fsmonitor"
+msgstr "níl stór fíorúil '%s' neamhoiriúnach le fsmonitor"
+
+#: fsmonitor-settings.c
+#, c-format
+msgid ""
+"socket directory '%s' is incompatible with fsmonitor due to lack of Unix "
+"sockets support"
+msgstr ""
+"tá eolaire soicéad '%s' neamhoiriúnach le fsmonitor mar gheall ar easpa "
+"tacaíochta soicéid Unix"
+
+#: git.c
+msgid ""
+"git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
+" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
+" [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-"
+"lazy-fetch]\n"
+" [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n"
+" [--work-tree=<path>] [--namespace=<name>] [--config-"
+"env=<name>=<envvar>]\n"
+" <command> [<args>]"
+msgstr ""
+"git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
+" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
+" [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-"
+"lazy-fetch]\n"
+" [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n"
+" [--work-tree=<path>] [--namespace=<name>] [--config-"
+"env=<name>=<envvar>]\n"
+" <command> [<args>]"
+
+#: git.c
+msgid ""
+"'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.\n"
+"See 'git help git' for an overview of the system."
+msgstr ""
+"Liostaíonn 'git help -a' agus 'git help -g' fo-orduithe atá ar fáil agus "
+"roinnt\n"
+"treoracha coincheap. <concept>Féach 'git cabhr <command>'nó 'git cabhr'\n"
+"léamh faoi fho-ordú nó coincheap ar leith.\n"
+"Féach 'git help git' le haghaidh forbhreathnú ar an gcóras."
+
+#: git.c help.c
+#, c-format
+msgid "unsupported command listing type '%s'"
+msgstr "cineál liostaithe ordaithe gan tacaíocht '%s'"
+
+#: git.c
+#, c-format
+msgid "no directory given for '%s' option\n"
+msgstr "níl aon eolaire tugtha do rogha '%s'\n"
+
+#: git.c
+#, c-format
+msgid "no namespace given for --namespace\n"
+msgstr "aon spás ainmneacha a thugtar do --namespace\n"
+
+#: git.c
+#, c-format
+msgid "-c expects a configuration string\n"
+msgstr "-c ag súil le teaghrán cumraíochta\n"
+
+#: git.c
+#, c-format
+msgid "no config key given for --config-env\n"
+msgstr "níl aon eochair chumraithe tugtha do --config-env\n"
+
+#: git.c
+#, c-format
+msgid "no attribute source given for --attr-source\n"
+msgstr "níor tugadh foinse tréith do --attr-source\n"
+
+#: git.c
+#, c-format
+msgid "unknown option: %s\n"
+msgstr "rogha anaithnid: %s\n"
+
+#: git.c
+#, c-format
+msgid "while expanding alias '%s': '%s'"
+msgstr "agus ainm '%s' á leathnú: '%s'"
+
+#: git.c
+#, c-format
+msgid ""
+"alias '%s' changes environment variables.\n"
+"You can use '!git' in the alias to do this"
+msgstr ""
+"athraíonn alias '%s' athróga comhshaoil.\n"
+"Is féidir leat úsáid a bhaint as '!git' san alias chun é seo a dhéanamh"
+
+#: git.c
+#, c-format
+msgid "empty alias for %s"
+msgstr "alias folamh do %s"
+
+#: git.c
+#, c-format
+msgid "recursive alias: %s"
+msgstr "ainm athfhillteach: %s"
+
+#: git.c
+msgid "write failure on standard output"
+msgstr "teip scríobh ar aschur caighdeánach"
+
+#: git.c
+msgid "unknown write failure on standard output"
+msgstr "teip scríbhneoireachta anaithnid ar aschur"
+
+#: git.c
+msgid "close failed on standard output"
+msgstr "theip ar dhún ar aschur caighdeánach"
+
+#: git.c
+#, c-format
+msgid "alias loop detected: expansion of '%s' does not terminate:%s"
+msgstr "aimsíodh lúb alias: ní chuirtear deireadh le leathnú '%s': %s"
+
+#: git.c
+#, c-format
+msgid "cannot handle %s as a builtin"
+msgstr "ní féidir %s a láimhseáil mar thógáil"
+
+#: git.c
+#, c-format
+msgid ""
+"usage: %s\n"
+"\n"
+msgstr ""
+"úsáid: %s\n"
+"\n"
+
+#: git.c
+#, c-format
+msgid "expansion of alias '%s' failed; '%s' is not a git command\n"
+msgstr "theip ar leathnú an leasainm '%s'; ní ordú git é '%s'\n"
+
+#: git.c
+#, c-format
+msgid "failed to run command '%s': %s\n"
+msgstr "theip ort an t-ordú '%s' a reáchtáil: %s\n"
+
+#: gpg-interface.c
+msgid "could not create temporary file"
+msgstr "ní fhéadfaí comhad sealadach a chruthú"
+
+#: gpg-interface.c
+#, c-format
+msgid "failed writing detached signature to '%s'"
+msgstr "theip ar shíniú scoite a scríobh chuig '%s'"
+
+#: gpg-interface.c
+msgid ""
+"gpg.ssh.allowedSignersFile needs to be configured and exist for ssh "
+"signature verification"
+msgstr ""
+"ní mór gpg.ssh.allowedSignersFile a chumrú agus a bheith ann le haghaidh "
+"fíorú sínithe ssh"
+
+#: gpg-interface.c
+msgid ""
+"ssh-keygen -Y find-principals/verify is needed for ssh signature "
+"verification (available in openssh version 8.2p1+)"
+msgstr ""
+"tá gá le ssh-keygen -Y aimsithe/fíorú le haghaidh fíorú sínithe ssh (ar fáil "
+"i leagan openssh 8.2p1 +)"
+
+#: gpg-interface.c
+#, c-format
+msgid "ssh signing revocation file configured but not found: %s"
+msgstr "comhad cúlghairm sínithe ssh cumraithe ach níor aimsíodh: %s"
+
+#: gpg-interface.c
+#, c-format
+msgid "bad/incompatible signature '%s'"
+msgstr "síniú droch-/neamhchomhoiriúnach '%s'"
+
+#: gpg-interface.c
+#, c-format
+msgid "failed to get the ssh fingerprint for key '%s'"
+msgstr "theip ar mhéarloirg ssh a fháil don eochair '%s'"
+
+#: gpg-interface.c
+msgid ""
+"either user.signingkey or gpg.ssh.defaultKeyCommand needs to be configured"
+msgstr "is gá user.signingkey nó gpg.ssh.defaultKeyCommand a chumrú"
+
+#: gpg-interface.c
+#, c-format
+msgid "gpg.ssh.defaultKeyCommand succeeded but returned no keys: %s %s"
+msgstr ""
+"d’éirigh le gpg.ssh.defaultKeyCommand ach níor tugadh aon eochracha ar ais: "
+"%s %s"
+
+#: gpg-interface.c
+#, c-format
+msgid "gpg.ssh.defaultKeyCommand failed: %s %s"
+msgstr "theip ar gpg.ssh.defaultKeyCommand: %s %s"
+
+#: gpg-interface.c
+#, c-format
+msgid ""
+"gpg failed to sign the data:\n"
+"%s"
+msgstr ""
+"theip ar gpg na sonraí a shíniú:\n"
+"%s"
+
+#: gpg-interface.c
+msgid "user.signingKey needs to be set for ssh signing"
+msgstr "ní mór user.signingKey a shocrú le haghaidh síniú ssh"
+
+#: gpg-interface.c
+#, c-format
+msgid "failed writing ssh signing key to '%s'"
+msgstr "theip ar an eochair sínithe ssh a scríobh chuig '%s'"
+
+#: gpg-interface.c
+#, c-format
+msgid "failed writing ssh signing key buffer to '%s'"
+msgstr "theip ar scríobh ssh a shíniú maolán eochair chuig '%s'"
+
+#: gpg-interface.c
+msgid ""
+"ssh-keygen -Y sign is needed for ssh signing (available in openssh version "
+"8.2p1+)"
+msgstr ""
+"ssh-keygen -Y comhartha ag teastáil le haghaidh síniú ssh (ar fáil i leagan "
+"openssh 8.2p1+)"
+
+#: gpg-interface.c
+#, c-format
+msgid "failed reading ssh signing data buffer from '%s'"
+msgstr "theip ar mhaolán sonraí sínithe ssh a léamh ó '%s'"
+
+#: graph.c
+#, c-format
+msgid "ignored invalid color '%.*s' in log.graphColors"
+msgstr "neamhaird ar dhath neamhbhailí '%.*s' i log.graphColors"
+
+#: grep.c
+msgid ""
+"given pattern contains NULL byte (via -f <file>). This is only supported "
+"with -P under PCRE v2"
+msgstr ""
+"tá byte NULL (trí -f<file>) i bpatrún tugtha. Ní thacaítear leis seo ach le "
+"-P faoi PCRE v2"
+
+#: grep.c
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr "'%s': ní féidir %s a léamh"
+
+#: grep.c
+#, c-format
+msgid "'%s': short read"
+msgstr "'%s': léamh gearr"
+
+#: help.c
+msgid "start a working area (see also: git help tutorial)"
+msgstr "tús a chur le limistéar oibre (féach freisin: teagaisc cabhrach git)"
+
+#: help.c
+msgid "work on the current change (see also: git help everyday)"
+msgstr "obair ar an athrú reatha (féach freisin: git help gach lá)"
+
+#: help.c
+msgid "examine the history and state (see also: git help revisions)"
+msgstr ""
+"scrúdú a dhéanamh ar an stair agus an stát (féach freisin: athbhreithnithe "
+"cabhrach git)"
+
+#: help.c
+msgid "grow, mark and tweak your common history"
+msgstr "do stair choiteann a fhás, a mharcáil agus a athrú"
+
+#: help.c
+msgid "collaborate (see also: git help workflows)"
+msgstr "comhoibriú (féach freisin: sreafaí oibre cabhrach git)"
+
+#: help.c
+msgid "Main Porcelain Commands"
+msgstr "Príomh-Orduithe Poirce"
+
+#: help.c
+msgid "Ancillary Commands / Manipulators"
+msgstr "Orduithe Coimhdeachta/Ionramhálaí"
+
+#: help.c
+msgid "Ancillary Commands / Interrogators"
+msgstr "Orduithe Coimhdeacha/Ceisteoirí"
+
+#: help.c
+msgid "Interacting with Others"
+msgstr "Idirghníomhú le daoine eile"
+
+#: help.c
+msgid "Low-level Commands / Manipulators"
+msgstr "Orduithe Ísealleibhéil/Ionramhálaithe"
+
+#: help.c
+msgid "Low-level Commands / Interrogators"
+msgstr "Orduithe ísealleibhéil/ceisteoirí"
+
+#: help.c
+msgid "Low-level Commands / Syncing Repositories"
+msgstr "Orduithe Leibhéal Íseal/Stóráin Sioncrónaithe"
+
+#: help.c
+msgid "Low-level Commands / Internal Helpers"
+msgstr "Orduithe Leibhéal Íseal/Cúntóirí Inmheánacha"
+
+#: help.c
+msgid "User-facing repository, command and file interfaces"
+msgstr "Comhéadain stór, ordaithe agus comhad atá os comhair úsáideora"
+
+#: help.c
+msgid "Developer-facing file formats, protocols and other interfaces"
+msgstr ""
+"Formáidí comhaid, prótacail agus comhéadain eile atá os comhair an fhorbróra"
+
+#: help.c
+#, c-format
+msgid "available git commands in '%s'"
+msgstr "orduithe git atá ar fáil i '%s'"
+
+#: help.c
+msgid "git commands available from elsewhere on your $PATH"
+msgstr "orduithe git ar fáil ó áiteanna eile ar do $PATH"
+
+#: help.c
+msgid "These are common Git commands used in various situations:"
+msgstr "Seo orduithe coitianta Git a úsáidtear i gcásanna éagsúla:"
+
+#: help.c
+msgid "The Git concept guides are:"
+msgstr "Is iad na treoracha coincheap Git:"
+
+#: help.c
+msgid "User-facing repository, command and file interfaces:"
+msgstr "Stóráil, ordaithe agus comhéadain comhad atá os comhair úsáideora:"
+
+#: help.c
+msgid "File formats, protocols and other developer interfaces:"
+msgstr "Formáidí comhaid, prótacail agus comhéadain forbróra eile:"
+
+#: help.c
+msgid "External commands"
+msgstr "Orduithe seachtracha"
+
+#: help.c
+msgid "Command aliases"
+msgstr "Ainmneacha ordaithe"
+
+#: help.c
+msgid "See 'git help <command>' to read about a specific subcommand"
+msgstr "Féach 'git help <command>'chun léamh faoi fho-ordú ar leith"
+
+#: help.c
+#, c-format
+msgid ""
+"'%s' appears to be a git command, but we were not\n"
+"able to execute it. Maybe git-%s is broken?"
+msgstr ""
+"Is cosúil gur ordú git é '%s', ach ní raibh muid\n"
+"in ann é a fhorghníomhú. B'fhéidir go bhfuil git-%s briste?"
+
+#: help.c
+#, c-format
+msgid "git: '%s' is not a git command. See 'git --help'."
+msgstr "git: Ní ordú git é '%s'. Féach 'git --help'."
+
+#: help.c
+msgid "Uh oh. Your system reports no Git commands at all."
+msgstr ""
+"Ó, a Dhia. Ní thuairiscíonn do chóras aon orduithe Git ar chor ar bith."
+
+#: help.c
+#, c-format
+msgid "WARNING: You called a Git command named '%s', which does not exist."
+msgstr "RABHADH: Ghlaoigh tú ordú Git darb ainm '%s', nach bhfuil ann."
+
+#: help.c
+#, c-format
+msgid "Continuing under the assumption that you meant '%s'."
+msgstr "Ag leanúint faoin toimhde gur chiallaigh tú '%s'."
+
+#: help.c
+#, c-format
+msgid "Run '%s' instead [y/N]? "
+msgstr "Rith '%s' ina ionad sin [y/N]? "
+
+#: help.c
+#, c-format
+msgid "Continuing in %0.1f seconds, assuming that you meant '%s'."
+msgstr ""
+"Ag leanúint ar aghaidh i %0.1f soicind, ag glacadh leis gur chiallaigh tú "
+"'%s'."
+
+#: help.c
+msgid ""
+"\n"
+"The most similar command is"
+msgid_plural ""
+"\n"
+"The most similar commands are"
+msgstr[0] ""
+"\n"
+"Is é an t-ordú is cosúla ná"
+msgstr[1] ""
+"\n"
+"Is iad na horduithe is cosúla ná"
+msgstr[2] ""
+"\n"
+"Is iad na horduithe is cosúla ná"
+
+#: help.c
+msgid "git version [--build-options]"
+msgstr "leagan git [--build-options]"
+
+#: help.c
+#, c-format
+msgid "%s: %s - %s"
+msgstr "%s: %s - %s"
+
+#: help.c
+msgid ""
+"\n"
+"Did you mean this?"
+msgid_plural ""
+"\n"
+"Did you mean one of these?"
+msgstr[0] ""
+"\n"
+"An raibh sé seo i gceist agat?"
+msgstr[1] ""
+"\n"
+"An raibh ceann acu seo i gceist agat?"
+msgstr[2] ""
+"\n"
+"An raibh ceann acu seo i gceist agat?"
+
+#: hook.c
+#, c-format
+msgid ""
+"The '%s' hook was ignored because it's not set as executable.\n"
+"You can disable this warning with `git config set advice.ignoredHook false`."
+msgstr ""
+"Rinneadh neamhaird ar an gcroca '%s' toisc nach bhfuil sé socraithe mar "
+"infheidhmithe.\n"
+"Is féidir leat an rabhadh seo a dhíchumasú le `git config set "
+"advice.ignoredHook false `."
+
+#: http-fetch.c
+msgid "not a git repository"
+msgstr "ní stór git"
+
+#: http-fetch.c
+#, c-format
+msgid "argument to --packfile must be a valid hash (got '%s')"
+msgstr ""
+"caithfidh argóint chuig --packfile a bheith ina hash bailí (fuair '%s')"
+
+#: http.c
+#, c-format
+msgid "negative value for http.postBuffer; defaulting to %d"
+msgstr "luach diúltach do http.postBuffer; réamhshocraithe go %d"
+
+#: http.c
+msgid "Delegation control is not supported with cURL < 7.22.0"
+msgstr "Ní thacaítear le cURL <7.22.0 le rialú tarscaireachta"
+
+#: http.c
+msgid "Unknown value for http.proactiveauth"
+msgstr "Luach anaithnid do http.proactiveauth"
+
+#: http.c parse.c
+#, c-format
+msgid "failed to parse %s"
+msgstr "theip ar %s a pharsáil"
+
+#: http.c
+#, c-format
+msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
+msgstr "'%s' cúltaca SSL gan tacaíocht. Cúltaca SSL tacaithe:"
+
+#: http.c
+#, c-format
+msgid "Could not set SSL backend to '%s': cURL was built without SSL backends"
+msgstr "Níor féidir cúltaca SSL a shocrú go '%s': Tógadh cURL gan cúltaca SSL"
+
+#: http.c
+#, c-format
+msgid "Could not set SSL backend to '%s': already set"
+msgstr "Níorbh fhéidir cúltaca SSL a shocrú go '%s': socraithe cheana féin"
+
+#: http.c
+msgid "refusing to read cookies from http.cookiefile '-'"
+msgstr "diúltú fianáin a léamh ó http.cookiefile '-'"
+
+#: http.c
+msgid "ignoring http.savecookies for empty http.cookiefile"
+msgstr ""
+"neamhaird a dhéanamh ar http.savecookies le haghaidh http.cookiefile folamh"
+
+#: http.c
+#, c-format
+msgid ""
+"unable to update url base from redirection:\n"
+" asked for: %s\n"
+" redirect: %s"
+msgstr ""
+"in ann bonn url a nuashonrú ó atreorú:\n"
+" iarrtha ar: %s\n"
+" atreorú: %s"
+
+#: ident.c
+msgid "Author identity unknown\n"
+msgstr "Céannacht an údair anaithnid\n"
+
+#: ident.c
+msgid "Committer identity unknown\n"
+msgstr "Céannacht an chomórtais anaithnid\n"
+
+#: ident.c
+msgid ""
+"\n"
+"*** Please tell me who you are.\n"
+"\n"
+"Run\n"
+"\n"
+" git config --global user.email \"you@example.com\"\n"
+" git config --global user.name \"Your Name\"\n"
+"\n"
+"to set your account's default identity.\n"
+"Omit --global to set the identity only in this repository.\n"
+"\n"
+msgstr ""
+"\n"
+"*** Inis dom cé tú féin, le do thoil.\n"
+"\n"
+"Rith\n"
+"\n"
+" git config --global user.email \"you@example.com”\n"
+" git config --global user.name “Do Ainm”\n"
+"\n"
+"chun féiniúlacht réamhshocraithe do chuntais a shocrú.\n"
+"Fág --global chun an aitheantas a shocrú sa stór seo amháin.\n"
+
+#: ident.c
+msgid "no email was given and auto-detection is disabled"
+msgstr "níor tugadh aon ríomhphost agus tá brath uathoibríoch faoi"
+
+#: ident.c
+#, c-format
+msgid "unable to auto-detect email address (got '%s')"
+msgstr "in ann seoladh ríomhphoist a bhrath go huathoibríoch (fuair '%s')"
+
+#: ident.c
+msgid "no name was given and auto-detection is disabled"
+msgstr "ní tugadh aon ainm agus tá brath uathoibríoch faoi dhíchum"
+
+#: ident.c
+#, c-format
+msgid "unable to auto-detect name (got '%s')"
+msgstr "ní féidir ainm a bhrath go huathoibríoch (fuair '%s')"
+
+#: ident.c
+#, c-format
+msgid "empty ident name (for <%s>) not allowed"
+msgstr "ainm ident folamh (le haghaidh <%s>) nach gceadaítear"
+
+#: ident.c
+#, c-format
+msgid "name consists only of disallowed characters: %s"
+msgstr "ní chuimsíonn ainm ach carachtair neamh-cheadaithe: %s"
+
+#: list-objects-filter-options.c
+msgid "expected 'tree:<depth>'"
+msgstr "<depth>'crann ag súil leis: '"
+
+#: list-objects-filter-options.c
+msgid "sparse:path filters support has been dropped"
+msgstr "neamhchoitianta: tá tacaíocht scagairí cosáin titim"
+
+#: list-objects-filter-options.c
+#, c-format
+msgid "'%s' for 'object:type=<type>' is not a valid object type"
+msgstr "<type>Ní cineál réad bailí é '%s' le haghaidh 'object:type='"
+
+#: list-objects-filter-options.c
+#, c-format
+msgid "invalid filter-spec '%s'"
+msgstr "scagaire neamhbhailí '%s'"
+
+#: list-objects-filter-options.c
+#, c-format
+msgid "must escape char in sub-filter-spec: '%c'"
+msgstr "ní mór don char a éalú i sub-filter-spec: '%c'"
+
+#: list-objects-filter-options.c
+msgid "expected something after combine:"
+msgstr "ag súil le rud éigin tar éis an chomhcheangail:"
+
+#: list-objects-filter-options.c
+msgid "multiple filter-specs cannot be combined"
+msgstr "ní féidir ilshonraíochtaí scagaire a chomhcheangal"
+
+#: list-objects-filter-options.c
+msgid "unable to upgrade repository format to support partial clone"
+msgstr "in ann formáid stórais a uasghrádú chun tacú le clón páirteach"
+
+#: list-objects-filter-options.h
+msgid "args"
+msgstr "args"
+
+#: list-objects-filter-options.h
+msgid "object filtering"
+msgstr "scagadh réad"
+
+#: list-objects-filter.c
+#, c-format
+msgid "unable to access sparse blob in '%s'"
+msgstr "ní féidir rochtain a fháil ar bhlob neamhchoitianta i '%s'"
+
+#: list-objects-filter.c
+#, c-format
+msgid "unable to parse sparse filter data in %s"
+msgstr "nach féidir sonraí scagaire neamhchoitianta a pháirseáil i %s"
+
+#: list-objects.c
+#, c-format
+msgid "entry '%s' in tree %s has tree mode, but is not a tree"
+msgstr "tá modh crann ag iontráil '%s' i gcrann %s, ach ní crann í"
+
+#: list-objects.c
+#, c-format
+msgid "entry '%s' in tree %s has blob mode, but is not a blob"
+msgstr "tá modh blob ag iontráil '%s' i gcrann %s, ach ní blob í"
+
+#: list-objects.c
+#, c-format
+msgid "unable to load root tree for commit %s"
+msgstr "nach féidir crann fréimhe a luchtú le haghaidh tiomanta %s"
+
+#: lockfile.c
+#, c-format
+msgid ""
+"Unable to create '%s.lock': %s.\n"
+"\n"
+"Another git process seems to be running in this repository, e.g.\n"
+"an editor opened by 'git commit'. Please make sure all processes\n"
+"are terminated then try again. If it still fails, a git process\n"
+"may have crashed in this repository earlier:\n"
+"remove the file manually to continue."
+msgstr ""
+"Ní féidir '%s.lock' a chruthú: %s.\n"
+"\n"
+"Is cosúil go bhfuil próiseas git eile ag rith sa stór seo, e.g.\n"
+"eagarthóir a osclaíodh ag 'git commit'. Déan cinnte le do thoil gach "
+"próiseas\n"
+"foirceanntar ansin déan iarracht arís. Má theipeann air fós, próiseas git\n"
+"d'fhéadfadh go mbeadh sé titim sa stór seo níos luaithe:\n"
+"bain an comhad de láimh chun leanúint ar aghaidh."
+
+#: lockfile.c
+#, c-format
+msgid "Unable to create '%s.lock': %s"
+msgstr "Ní féidir '%s.lock' a chruthú: %s"
+
+#: log-tree.c
+msgid "unable to create temporary object directory"
+msgstr "in ann eolaire réad sealadach a chruthú"
+
+#: loose.c
+#, c-format
+msgid "could not write loose object index %s"
+msgstr "ní fhéadfaí innéacs réad scaoilte %s a scrí"
+
+#: loose.c
+#, c-format
+msgid "failed to write loose object index %s"
+msgstr "theip ar innéacs réad scaoilte %s a scríobh"
+
+#: ls-refs.c
+#, c-format
+msgid "unexpected line: '%s'"
+msgstr "líne gan choinne: '%s'"
+
+#: ls-refs.c
+msgid "expected flush after ls-refs arguments"
+msgstr "súil le sruth tar éis argóintí ls-refs"
+
+#: mailinfo.c
+msgid "quoted CRLF detected"
+msgstr "braithíodh CRLF a luaitear"
+
+#: mem-pool.c strbuf.c wrapper.c
+#, c-format
+msgid "unable to format message: %s"
+msgstr "nach féidir teachtaireacht a fhormáidiú: %s"
+
+#: merge-ll.c
+#, c-format
+msgid "invalid marker-size '%s', expecting an integer"
+msgstr "méid marcóra neamhbhailí '%s', ag súil le sláimhir"
+
+#: merge-ort-wrappers.c
+#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Ní fhéadfaí réad '%s' a pháirseáil"
+
+#: merge-ort.c
+#, c-format
+msgid "Failed to merge submodule %s (not checked out)"
+msgstr "Theip ar fho-mhodúl %s a chumasc (níor seiceáiltear amach)"
+
+#: merge-ort.c
+#, c-format
+msgid "Failed to merge submodule %s (no merge base)"
+msgstr "Theip ar fho-mhodúl %s a chumasc (gan aon bhonn cumaisc)"
+
+#: merge-ort.c
+#, c-format
+msgid "Failed to merge submodule %s (commits not present)"
+msgstr "Theip ar fho-mhodúl %s a chumasc (níl gealltanas ann)"
+
+#: merge-ort.c
+#, c-format
+msgid "error: failed to merge submodule %s (repository corrupt)"
+msgstr "earráid: theip ar fho-mhodúl %s a chumasc (stór truaillithe)"
+
+#: merge-ort.c
+#, c-format
+msgid "Failed to merge submodule %s (commits don't follow merge-base)"
+msgstr "Theip ar fho-mhodúl %s a chumasc (ní leanann gealltanna cumaisc bonn)"
+
+#: merge-ort.c
+#, c-format
+msgid "Note: Fast-forwarding submodule %s to %s"
+msgstr "Nóta: Fo-mhodúl %s a chur ar aghaidh go tapa chuig %s"
+
+#: merge-ort.c
+#, c-format
+msgid "Failed to merge submodule %s"
+msgstr "Theip ar fho-mhodúl %s a chumasc"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"Failed to merge submodule %s, but a possible merge resolution exists: %s"
+msgstr ""
+"Theip ar fho-mhodúl %s a chumasc, ach tá réiteach cumaisc féideartha ann: %s"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"Failed to merge submodule %s, but multiple possible merges exist:\n"
+"%s"
+msgstr ""
+"Theip ar fho-mhodúl %s a chumasc, ach tá go leor cumaisc féideartha ann:\n"
+"%s"
+
+#: merge-ort.c
+#, c-format
+msgid "error: failed to execute internal merge for %s"
+msgstr "earráid: theip ar chumasc inmheánach a chur i gcrích le haghaidh %s"
+
+#: merge-ort.c
+#, c-format
+msgid "error: unable to add %s to database"
+msgstr "earráid: ní féidir %s a chur leis an mbunachar sonraí"
+
+#: merge-ort.c
+#, c-format
+msgid "Auto-merging %s"
+msgstr "Cumaisc uathoibríoch %s"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
+"implicit directory rename(s) putting the following path(s) there: %s."
+msgstr ""
+"COIMHLINT (athainmniú intuigthe dir): Comhad/dir atá ann cheana ag %s i "
+"mbealach athainmniú eolaire intuigthe ag cur na cosáin seo a leanas ann: %s."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
+"implicit directory renames tried to put these paths there: %s"
+msgstr ""
+"CONFLICT (athainmniú intuigthe): Ní féidir níos mó ná cosán amháin a mhapáil "
+"chuig %s; rinne athainmneacha eolaire intuigthe iarracht na cosáin seo a "
+"chur ann: %s"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (directory rename split): Unclear where to rename %s to; it was "
+"renamed to multiple other directories, with no destination getting a "
+"majority of the files."
+msgstr ""
+"CONFLICT (scoilt athainmniú eolaire): Níl soiléir cá háit le %s a "
+"athainmniú; athainmníodh é go eolairí éagsúla eile, gan aon cheann scríbe a "
+"fháil tromlach na gcomhaid."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
+"renamed."
+msgstr ""
+"RABHADH: Seachaint %s a chur i bhfeidhm -> %s a athainmniú go %s, toisc gur "
+"athainmníodh %s féin."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"Path updated: %s added in %s inside a directory that was renamed in %s; "
+"moving it to %s."
+msgstr ""
+"Conair nuashonraithe: Cuireadh %s isteach i %s taobh istigh de eolaire a "
+"athainmníodh i %s; ag bogadh é go %s."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"Path updated: %s renamed to %s in %s, inside a directory that was renamed in "
+"%s; moving it to %s."
+msgstr ""
+"Conair nuashonraithe: Athainmníodh %s go %s i %s, taobh istigh de eolaire a "
+"athainmníodh i %s; é ag bogadh go %s."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (file location): %s added in %s inside a directory that was renamed "
+"in %s, suggesting it should perhaps be moved to %s."
+msgstr ""
+"COIMHLINT (suíomh comhaid): Cuireadh %s isteach i %s taobh istigh de eolaire "
+"a athainmníodh i %s, rud a thugann le tuiscint gur cheart é a aistriú go %s "
+"b'fhéidir."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (file location): %s renamed to %s in %s, inside a directory that "
+"was renamed in %s, suggesting it should perhaps be moved to %s."
+msgstr ""
+"COIMHLINT (suíomh comhaid): Athainmníodh %s go %s i %s, taobh istigh de "
+"eolaire a athainmníodh i %s, ag moladh gur cheart é a aistriú go %s "
+"b'fhéidir."
+
+#: merge-ort.c
+#, c-format
+msgid "CONFLICT (rename/rename): %s renamed to %s in %s and to %s in %s."
+msgstr ""
+"COIMHLINT (athainmniú/athainmniú): Athainmníodh %s go %s i %s agus go %s i "
+"%s."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (rename involved in collision): rename of %s -> %s has content "
+"conflicts AND collides with another path; this may result in nested conflict "
+"markers."
+msgstr ""
+"COIMHLINT (athainmniú a bhaineann le imbhualadh): athainmnigh %s -> tá "
+"coinbhleachtaí ábhair ag %s AGUS imbhuaileann sé le cosán eile; d'fhéadfadh "
+"marcóirí coinbhleachta neadaithe a bheith mar thoradh air seo."
+
+#: merge-ort.c
+#, c-format
+msgid "CONFLICT (rename/delete): %s renamed to %s in %s, but deleted in %s."
+msgstr ""
+"COIMHLINT (athainmniú/scrios): Athainmníodh %s go %s i %s, ach scriosadh é i "
+"%s."
+
+#: merge-ort.c
+#, c-format
+msgid "error: cannot read object %s"
+msgstr "earráid: ní féidir réad %s a léamh"
+
+#: merge-ort.c
+#, c-format
+msgid "error: object %s is not a blob"
+msgstr "earráid: ní blob é réad %s"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (file/directory): directory in the way of %s from %s; moving it to "
+"%s instead."
+msgstr ""
+"CONFLICT (comhad/eolaire): eolaire ar bhealach %s ó %s; é a bhogadh go %s "
+"ina ionad."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (distinct types): %s had different types on each side; renamed both "
+"of them so each can be recorded somewhere."
+msgstr ""
+"COIMHLINT (cineálacha ar leith): Bhí cineálacha difriúla ag %s ar gach "
+"taobh; athainmníodh an dá cheann ionas gur féidir gach ceann a thaifeadadh "
+"áit éigin."
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (distinct types): %s had different types on each side; renamed one "
+"of them so each can be recorded somewhere."
+msgstr ""
+"COIMHLINT (cineálacha ar leith): Bhí cineálacha difriúla ag %s ar gach "
+"taobh; athainmníodh ceann acu ionas gur féidir gach ceann a thaifeadadh áit "
+"éigin."
+
+#: merge-ort.c
+msgid "content"
+msgstr "ábhar"
+
+#: merge-ort.c
+msgid "add/add"
+msgstr "cuirte/cuir leis"
+
+#: merge-ort.c
+msgid "submodule"
+msgstr "fo-mhodúl"
+
+#: merge-ort.c
+#, c-format
+msgid "CONFLICT (%s): Merge conflict in %s"
+msgstr "COIMHLINT (%s): Cumaisc coinbhleacht i %s"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s "
+"of %s left in tree."
+msgstr ""
+"CONFLICT (modhnó/scriosadh): Scriosta %s i %s agus modhnaithe i %s. Tá "
+"leagan %s de %s fágtha sa chrann."
+
+#. TRANSLATORS: This is a line of advice to resolve a merge
+#. conflict in a submodule. The first argument is the submodule
+#. name, and the second argument is the abbreviated id of the
+#. commit that needs to be merged. For example:
+#. - go to submodule (mysubmodule), and either merge commit abc1234"
+#.
+#: merge-ort.c
+#, c-format
+msgid ""
+" - go to submodule (%s), and either merge commit %s\n"
+" or update to an existing commit which has merged those changes\n"
+msgstr ""
+" - téigh go dtí an fo-mhodúl (%s), agus cumasc an tiomantas %s\n"
+" nó nuashonraigh chuig tiomantas atá ann cheana féin a bhfuil na "
+"hathruithe sin cumasctha aige.\n"
+
+#: merge-ort.c
+#, c-format
+msgid ""
+"Recursive merging with submodules currently only supports trivial cases.\n"
+"Please manually handle the merging of each conflicted submodule.\n"
+"This can be accomplished with the following steps:\n"
+"%s - come back to superproject and run:\n"
+"\n"
+" git add %s\n"
+"\n"
+" to record the above merge or update\n"
+" - resolve any other conflicts in the superproject\n"
+" - commit the resulting index in the superproject\n"
+msgstr ""
+"Faoi láthair ní thacaíonn cumasc athfhillteach le fo-mhodúil ach le cásanna "
+"míbhá\n"
+"Láimhseáil le cumasc gach fo-mhodúl coimhlinte de láimh le do thoil.\n"
+"Is féidir é seo a chur i gcrích leis na céimeanna seo a leanas:\n"
+"%s - teacht ar ais chuig superproject agus rith:\n"
+"\n"
+" git add %s\n"
+"\n"
+" chun an cumasc thuas nó nuashonrú a thaifead\n"
+" - aon choimhlintí eile sa superproject a réiteach\n"
+" - an t-innéacs mar thoradh air a thiomnú sa sárthionscadal\n"
+
+#. TRANSLATORS: The %s arguments are: 1) tree hash of a merge
+#. base, and 2-3) the trees for the two trees we're merging.
+#.
+#: merge-ort.c
+#, c-format
+msgid "collecting merge info failed for trees %s, %s, %s"
+msgstr "theip ar fhaisnéis chumaisc a bhailiú do chrainn %s, %s, %s"
+
+#: merge.c
+msgid "failed to read the cache"
+msgstr "theip ar an taisce a léamh"
+
+#: midx-write.c
+#, c-format
+msgid "failed to add packfile '%s'"
+msgstr "theip ar chomhad pacáiste '%s' a chur leis"
+
+#: midx-write.c
+#, c-format
+msgid "failed to open pack-index '%s'"
+msgstr "theip ar innéacs pacáiste '%s' a oscailt"
+
+#: midx-write.c
+#, c-format
+msgid "failed to locate object %d in packfile"
+msgstr "theip ar réad %d a aimsiú i packfile"
+
+#: midx-write.c
+msgid "cannot store reverse index file"
+msgstr "ní féidir comhad innéacs droim a stóráil"
+
+#: midx-write.c
+#, c-format
+msgid "could not parse line: %s"
+msgstr "ní fhéadfaí líne a pháirseáil: %s"
+
+#: midx-write.c
+#, c-format
+msgid "malformed line: %s"
+msgstr "líne mhífhoirmithe: %s"
+
+#: midx-write.c
+msgid "could not load pack"
+msgstr "ní fhéadfaí pacáiste a luchtú"
+
+#: midx-write.c
+#, c-format
+msgid "could not open index for %s"
+msgstr "ní raibh in ann innéacs a oscailt do %s"
+
+#: midx-write.c
+#, c-format
+msgid "unable to link '%s' to '%s'"
+msgstr "ní féidir '%s' a nascadh le '%s'"
+
+#: midx-write.c midx.c
+#, c-format
+msgid "failed to clear multi-pack-index at %s"
+msgstr "theip ar innéacs il-phacáiste a ghlanadh ag %s"
+
+#: midx-write.c
+msgid "ignoring existing multi-pack-index; checksum mismatch"
+msgstr ""
+"neamhaird a dhéanamh ar innéacs il-phacáiste atá ann cheana; mímheaitseáil"
+
+#: midx-write.c
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "ní fhéadfaí innéacs droim a luchtú do MIDX %s"
+
+#: midx-write.c
+msgid "Adding packfiles to multi-pack-index"
+msgstr "Comhaid pacáiste a chur le hinnéacs il-phacáiste"
+
+#: midx-write.c
+#, c-format
+msgid "unknown preferred pack: '%s'"
+msgstr "pacáiste roghnaithe anaithnid: '%s'"
+
+#: midx-write.c
+#, c-format
+msgid "cannot select preferred pack %s with no objects"
+msgstr "ní féidir pacáiste roghnaithe %s a roghnú gan aon rudaí"
+
+#: midx-write.c
+#, c-format
+msgid "did not see pack-file %s to drop"
+msgstr "níor chonaic sé pacáist-chomhad %s le scaoileadh"
+
+#: midx-write.c
+#, c-format
+msgid "preferred pack '%s' is expired"
+msgstr "tá an pacáiste roghnaithe '%s' in éag"
+
+#: midx-write.c
+msgid "no pack files to index."
+msgstr "gan aon phacáiste comhaid le hinnéacs."
+
+#: midx-write.c
+msgid "refusing to write multi-pack .bitmap without any objects"
+msgstr "diúltú a scríobh il-pacáiste.bitmap gan aon rudaí"
+
+#: midx-write.c
+msgid "unable to create temporary MIDX layer"
+msgstr "in ann ciseal MIDX sealadach a chruthú"
+
+#: midx-write.c
+msgid "could not write multi-pack bitmap"
+msgstr "ní fhéadfaí bitmap il-phacáiste a scríobh"
+
+#: midx-write.c
+msgid "unable to open multi-pack-index chain file"
+msgstr "in ann comhad slabhra in-innéacs il-phacáiste a oscailt"
+
+#: midx-write.c
+msgid "unable to rename new multi-pack-index layer"
+msgstr "in ann ciseal innéacs ilphacáiste nua a athainmniú"
+
+#: midx-write.c
+msgid "could not write multi-pack-index"
+msgstr "ní fhéadfaí innéacs il-phacáiste a scríobh"
+
+#: midx-write.c
+msgid "cannot expire packs from an incremental multi-pack-index"
+msgstr ""
+"ní féidir le pacáistí a chur in éag ó innéacs ilphacáiste incriminteach"
+
+#: midx-write.c
+msgid "Counting referenced objects"
+msgstr "Rud tagartha a chomhaireamh"
+
+#: midx-write.c
+msgid "Finding and deleting unreferenced packfiles"
+msgstr "Comhaid pacáiste gan tagairt a aimsiú agus a scriosadh"
+
+#: midx-write.c
+msgid "cannot repack an incremental multi-pack-index"
+msgstr "ní féidir le hinnéacs ilphacáiste incriminteach a athphacáil"
+
+#: midx-write.c
+msgid "could not start pack-objects"
+msgstr "ní fhéadfaí pacáiste-rudaí a thosú"
+
+#: midx-write.c
+msgid "could not finish pack-objects"
+msgstr "ní raibh sé in ann pacáistí a chríochnú"
+
+#: midx.c
+msgid "multi-pack-index OID fanout is of the wrong size"
+msgstr "tá fanout OID ilphacáiste den mhéid mícheart"
+
+#: midx.c
+#, c-format
+msgid ""
+"oid fanout out of order: fanout[%d] = %<PRIx32> > %<PRIx32> = fanout[%d]"
+msgstr "fanout oid as ord: fanout [%d] =% <PRIx32>>% <PRIx32>= fanout [%d]"
+
+#: midx.c
+msgid "multi-pack-index OID lookup chunk is the wrong size"
+msgstr "tá an méid mícheart ar an smután cuardaigh OID innéacs ilphacáiste"
+
+#: midx.c
+msgid "multi-pack-index object offset chunk is the wrong size"
+msgstr ""
+"tá an méid mícheart ar an smután fritháireamh réada innéacs ilphacáiste"
+
+#: midx.c
+#, c-format
+msgid "multi-pack-index file %s is too small"
+msgstr "tá comhad in-innéacs ilphacáiste %s ró-bheag"
+
+#: midx.c
+#, c-format
+msgid "multi-pack-index signature 0x%08x does not match signature 0x%08x"
+msgstr "ní mheaitseálann síniú innéacs il-phacáiste 0x%08x síniú 0x%08x"
+
+#: midx.c
+#, c-format
+msgid "multi-pack-index version %d not recognized"
+msgstr "ní aithnítear leagan innéacs il-phacáiste %d"
+
+#: midx.c
+#, c-format
+msgid "multi-pack-index hash version %u does not match version %u"
+msgstr "ní hionann leagan %u den hais innéacs ilphacáiste agus leagan %u"
+
+#: midx.c
+msgid "multi-pack-index required pack-name chunk missing or corrupted"
+msgstr ""
+"innéacs il-phacáiste teastaíonn píosa ainm pacáiste ar iarraidh nó "
+"truaillithe"
+
+#: midx.c
+msgid "multi-pack-index required OID fanout chunk missing or corrupted"
+msgstr ""
+"teastaíonn innéacs il-phacáiste le píosa fanout OID atá ar iarraidh nó "
+"truaillithe"
+
+#: midx.c
+msgid "multi-pack-index required OID lookup chunk missing or corrupted"
+msgstr ""
+"teastaíonn innéacs ilphacáiste cuardaigh OID atá ar iarraidh nó truaillithe"
+
+#: midx.c
+msgid "multi-pack-index required object offsets chunk missing or corrupted"
+msgstr ""
+"smután fritháireamh réada riachtanach innéacs ilphacáiste ar iarraidh nó "
+"truaillithe"
+
+#: midx.c
+msgid "multi-pack-index pack-name chunk is too short"
+msgstr "tá píosa ainm pacáiste innéacs il-phacáiste ró-ghearr"
+
+#: midx.c
+#, c-format
+msgid "multi-pack-index pack names out of order: '%s' before '%s'"
+msgstr "ainmneacha pacáiste in-innéacs il-phacáiste as ord: '%s' roimh '%s'"
+
+#: midx.c
+msgid "multi-pack-index chain file too small"
+msgstr "comhad slabhra in-innéacs il-phacáiste ró-bheag"
+
+#: midx.c
+#, c-format
+msgid "pack count in base MIDX too high: %<PRIuMAX>"
+msgstr "líon pacáiste i mbonn MIDX ró-ard:%<PRIuMAX>"
+
+#: midx.c
+#, c-format
+msgid "object count in base MIDX too high: %<PRIuMAX>"
+msgstr "líon rudaí i mbonn MIDX ró-ard:%<PRIuMAX>"
+
+#: midx.c
+#, c-format
+msgid "invalid multi-pack-index chain: line '%s' not a hash"
+msgstr "slabhra innéacs il-phacáiste neamhbhailí: ní hash é líne '%s'"
+
+#: midx.c
+msgid "unable to find all multi-pack index files"
+msgstr "in ann gach comhad innéacs il-phacáiste a fháil"
+
+#: midx.c
+msgid "invalid MIDX object position, MIDX is likely corrupt"
+msgstr "suíomh réad MIDX neamhbhailí, is dócha go bhfuil MIDX truaillithe"
+
+#: midx.c
+#, c-format
+msgid "bad pack-int-id: %u (%u total packs)"
+msgstr "bad pack-int-id: %u (pacáistí iomlána %u)"
+
+#: midx.c
+msgid "MIDX does not contain the BTMP chunk"
+msgstr "Níl an píosa BTMP i MIDX"
+
+#: midx.c
+#, c-format
+msgid "could not load bitmapped pack %<PRIu32>"
+msgstr "ní fhéadfaí pacáiste bitmapped a luchtú% <PRIu32>"
+
+#: midx.c
+msgid "multi-pack-index stores a 64-bit offset, but off_t is too small"
+msgstr ""
+"stórálann innéacs il-phacáiste fritháireamh 64-giotán, ach tá off_t ró-bheag"
+
+#: midx.c
+msgid "multi-pack-index large offset out of bounds"
+msgstr "innéacs il-phacáiste fhritháireamh mór as teorainneacha"
+
+#: midx.c
+msgid "multi-pack-index file exists, but failed to parse"
+msgstr "tá comhad in-innéacs il-phacáiste ann, ach theip air a pháirseáil"
+
+#: midx.c
+msgid "incorrect checksum"
+msgstr "seiceáil mícheart"
+
+#: midx.c
+msgid "Looking for referenced packfiles"
+msgstr "Ag lorg comhaid pacáiste tagartha"
+
+#: midx.c
+msgid "the midx contains no oid"
+msgstr "níl aon oid sa midx"
+
+#: midx.c
+msgid "Verifying OID order in multi-pack-index"
+msgstr "Ordú OID a fhíorú in innéacs il-phacáiste"
+
+#: midx.c
+#, c-format
+msgid "oid lookup out of order: oid[%d] = %s >= %s = oid[%d]"
+msgstr "cuardach oid as ord: oid [%d] = %s >= %s = oid [%d]"
+
+#: midx.c
+msgid "Sorting objects by packfile"
+msgstr "Rudaí a shórtáil de réir pacáiste"
+
+#: midx.c
+msgid "Verifying object offsets"
+msgstr "Athshraith réada a fhíorú"
+
+#: midx.c
+#, c-format
+msgid "failed to load pack entry for oid[%d] = %s"
+msgstr "theip ar iontráil pacáiste a luchtú do oid [%d] = %s"
+
+#: midx.c
+#, c-format
+msgid "failed to load pack-index for packfile %s"
+msgstr "theip ar innéacs pacáiste a luchtú do phacáiste %s"
+
+#: midx.c
+#, c-format
+msgid "incorrect object offset for oid[%d] = %s: %<PRIx64> != %<PRIx64>"
+msgstr ""
+"fritháireamh réada mícheart le haghaidh oid[%d] = %s: %<PRIx64> != %<PRIx64>"
+
+#: name-hash.c
+#, c-format
+msgid "unable to create lazy_dir thread: %s"
+msgstr "nach féidir snáithe lazy_dir a chruthú: %s"
+
+#: name-hash.c
+#, c-format
+msgid "unable to create lazy_name thread: %s"
+msgstr "nach féidir snáithe lazy_name a chruthú: %s"
+
+#: name-hash.c
+#, c-format
+msgid "unable to join lazy_name thread: %s"
+msgstr "ní féidir teacht le snáithe lazy_name: %s"
+
+#: notes-merge.c
+#, c-format
+msgid ""
+"You have not concluded your previous notes merge (%s exists).\n"
+"Please, use 'git notes merge --commit' or 'git notes merge --abort' to "
+"commit/abort the previous merge before you start a new notes merge."
+msgstr ""
+"Níor chríochnaigh tú do chuid nótaí roimhe seo a chumasc (%s ann).\n"
+"Le do thoil, bain úsáid as 'git notes merge --commit 'nó 'git notes merge --"
+"abort' chun an cumasc roimhe seo a cheangail/deireadh a chur leis sula "
+"dtosaíonn tú le cumasc nótaí nua."
+
+#: notes-merge.c
+#, c-format
+msgid "You have not concluded your notes merge (%s exists)."
+msgstr "Níor chríochnaigh tú do chuid nótaí a chumasc (%s ann)."
+
+#: notes-utils.c
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr "Ní féidir crann nótaí neamhthionsaithe/gan tagairt a dhéanamh"
+
+#: notes-utils.c
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr "Luach lochtach notes.rewriteMode: '%s'"
+
+#: notes-utils.c
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr "Diúltú nótaí a athscríobh i %s (lasmuigh de refs/notes/)"
+
+#. TRANSLATORS: The first %s is the name of
+#. the environment variable, the second %s is
+#. its value.
+#.
+#: notes-utils.c
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr "Droch-luach %s: '%s'"
+
+#: object-file-convert.c
+msgid "failed to decode tree entry"
+msgstr "theip ar iontráil crann a dhíchódú"
+
+#: object-file-convert.c
+#, c-format
+msgid "failed to map tree entry for %s"
+msgstr "theip ar iontráil crann a mhapáil do %s"
+
+#: object-file-convert.c
+#, c-format
+msgid "bad %s in commit"
+msgstr "droch %s i dtiomantas"
+
+#: object-file-convert.c
+#, c-format
+msgid "unable to map %s %s in commit object"
+msgstr "nach féidir %s %s a mhapáil i réad tiomanta"
+
+#: object-file-convert.c
+#, c-format
+msgid "Failed to convert object from %s to %s"
+msgstr "Theip ar réad a thiontú ó %s go %s"
+
+#: object-file.c
+#, c-format
+msgid "object file %s is empty"
+msgstr "tá comhad réad %s folamh"
+
+#: object-file.c
+#, c-format
+msgid "corrupt loose object '%s'"
+msgstr "réad scaoilte truaillithe '%s'"
+
+#: object-file.c
+#, c-format
+msgid "garbage at end of loose object '%s'"
+msgstr "truflais ag deireadh réad scaoilte '%s'"
+
+#: object-file.c
+#, c-format
+msgid "unable to open loose object %s"
+msgstr "nach féidir réad scaoilte %s a oscailt"
+
+#: object-file.c
+#, c-format
+msgid "unable to parse %s header"
+msgstr "nach féidir ceannteideal %s a pháirseáil"
+
+#: object-file.c
+msgid "invalid object type"
+msgstr "cineál réad neamhbhailí"
+
+#: object-file.c
+#, c-format
+msgid "unable to unpack %s header"
+msgstr "ní féidir ceannteideal %s a dhíphacáil"
+
+#: object-file.c
+#, c-format
+msgid "header for %s too long, exceeds %d bytes"
+msgstr "ceannteideal do %s rófhada, níos mó ná %d bytes"
+
+#: object-file.c
+#, c-format
+msgid "loose object %s (stored in %s) is corrupt"
+msgstr "tá réad scaoilte %s (stóráilte i %s) truaillithe"
+
+#: object-file.c
+#, c-format
+msgid "unable to open %s"
+msgstr "ní féidir %s a oscailt"
+
+#: object-file.c
+#, c-format
+msgid "files '%s' and '%s' differ in contents"
+msgstr "tá difríocht idir comhaid '%s' agus '%s' in ábhar"
+
+#: object-file.c
+#, c-format
+msgid "unable to write file %s"
+msgstr "nach féidir comhad %s a scríobh"
+
+#: object-file.c
+#, c-format
+msgid "unable to write repeatedly vanishing file %s"
+msgstr "in ann comhad %s atá ag imeacht arís agus arís eile a scríobh"
+
+#: object-file.c
+#, c-format
+msgid "unable to set permission to '%s'"
+msgstr "nach féidir cead a shocrú do '%s'"
+
+#: object-file.c
+msgid "error when closing loose object file"
+msgstr "earráid agus comhad réad scaoilte á ndú"
+
+#: object-file.c
+#, c-format
+msgid "insufficient permission for adding an object to repository database %s"
+msgstr "cead neamhleor chun réad a chur le bunachar sonraí stórais %s"
+
+#: object-file.c
+msgid "unable to create temporary file"
+msgstr "in ann comhad sealadach a chruthú"
+
+#: object-file.c
+msgid "unable to write loose object file"
+msgstr "in ann comhad réad scaoilte a scríobh"
+
+#: object-file.c
+#, c-format
+msgid "unable to deflate new object %s (%d)"
+msgstr "nach féidir réad nua %s a dhíoslagadh (%d)"
+
+#: object-file.c
+#, c-format
+msgid "deflateEnd on object %s failed (%d)"
+msgstr "theip ar deflateEnd ar réad %s (%d)"
+
+#: object-file.c
+#, c-format
+msgid "confused by unstable object source data for %s"
+msgstr "mearbhall de bharr sonraí foinse réada éagobhsaí do %s"
+
+#: object-file.c
+#, c-format
+msgid "write stream object %ld != %<PRIuMAX>"
+msgstr "scríobh réad srutha %ld! =%<PRIuMAX>"
+
+#: object-file.c
+#, c-format
+msgid "unable to stream deflate new object (%d)"
+msgstr "nach féidir réad nua a dhíscaoileadh a shruthlú (%d)"
+
+#: object-file.c
+#, c-format
+msgid "deflateEnd on stream object failed (%d)"
+msgstr "theip ar réad srutha DeflateEnd (%d)"
+
+#: object-file.c
+#, c-format
+msgid "unable to create directory %s"
+msgstr "nach féidir eolaire %s a chruthú"
+
+#: object-file.c
+#, c-format
+msgid "cannot read object for %s"
+msgstr "ní féidir réad a léamh do %s"
+
+#: object-file.c
+#, c-format
+msgid "cannot map object %s to %s"
+msgstr "ní féidir réad %s a mhapáil go %s"
+
+#: object-file.c
+#, c-format
+msgid "object fails fsck: %s"
+msgstr "teipeann ar réad fsck: %s"
+
+#: object-file.c
+msgid "refusing to create malformed object"
+msgstr "diúltú réad mífhoirmithe a chruthú"
+
+#: object-file.c
+#, c-format
+msgid "read error while indexing %s"
+msgstr "earráid léite agus %s á innéacsú"
+
+#: object-file.c
+#, c-format
+msgid "short read while indexing %s"
+msgstr "léamh gearr agus %s á innéacsú"
+
+#: object-file.c
+#, c-format
+msgid "%s: failed to insert into database"
+msgstr "%s: theip ort a chur isteach sa bhunachar sonraí"
+
+#: object-file.c
+#, c-format
+msgid "%s: unsupported file type"
+msgstr "%s: cineál comhaid gan tacaíocht"
+
+#: object-file.c
+#, c-format
+msgid "hash mismatch for %s (expected %s)"
+msgstr "neamhoiriúnú hash do %s (súil leis %s)"
+
+#: object-file.c
+#, c-format
+msgid "unable to mmap %s"
+msgstr "nach féidir %s a mmapáil"
+
+#: object-file.c
+#, c-format
+msgid "unable to unpack header of %s"
+msgstr "nach féidir ceanntásc %s a dhíphacáil"
+
+#: object-file.c
+#, c-format
+msgid "unable to parse header of %s"
+msgstr "nach féidir ceannteideal %s a pháirseáil"
+
+#: object-file.c
+#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "ní féidir cineál a pharsáil ó cheanntásc '%s' de %s"
+
+#: object-file.c
+#, c-format
+msgid "unable to unpack contents of %s"
+msgstr "nach féidir ábhar %s a dhíphacáil"
+
+#. TRANSLATORS: This is a line of ambiguous object
+#. output shown when we cannot look up or parse the
+#. object in question. E.g. "deadbeef [bad object]".
+#.
+#: object-name.c
+#, c-format
+msgid "%s [bad object]"
+msgstr "%s [droch-réad]"
+
+#. TRANSLATORS: This is a line of ambiguous commit
+#. object output. E.g.:
+#. *
+#. "deadbeef commit 2021-01-01 - Some Commit Message"
+#.
+#: object-name.c
+#, c-format
+msgid "%s commit %s - %s"
+msgstr "Déanann %s tiomanta %s - %s"
+
+#. TRANSLATORS: This is a line of ambiguous
+#. tag object output. E.g.:
+#. *
+#. "deadbeef tag 2022-01-01 - Some Tag Message"
+#. *
+#. The second argument is the YYYY-MM-DD found
+#. in the tag.
+#. *
+#. The third argument is the "tag" string
+#. from object.c.
+#.
+#: object-name.c
+#, c-format
+msgid "%s tag %s - %s"
+msgstr "Clib %s %s - %s"
+
+#. TRANSLATORS: This is a line of ambiguous
+#. tag object output where we couldn't parse
+#. the tag itself. E.g.:
+#. *
+#. "deadbeef [bad tag, could not parse it]"
+#.
+#: object-name.c
+#, c-format
+msgid "%s [bad tag, could not parse it]"
+msgstr "%s [droch-chlib, ní fhéadfaí é a pháirseáil]"
+
+#. TRANSLATORS: This is a line of ambiguous <type>
+#. object output. E.g. "deadbeef tree".
+#.
+#: object-name.c
+#, c-format
+msgid "%s tree"
+msgstr "%s crann"
+
+#. TRANSLATORS: This is a line of ambiguous <type>
+#. object output. E.g. "deadbeef blob".
+#.
+#: object-name.c
+#, c-format
+msgid "%s blob"
+msgstr "%s blob"
+
+#: object-name.c
+#, c-format
+msgid "short object ID %s is ambiguous"
+msgstr "tá ID réad gairid %s débhríoch"
+
+#. TRANSLATORS: The argument is the list of ambiguous
+#. objects composed in show_ambiguous_object(). See
+#. its "TRANSLATORS" comments for details.
+#.
+#: object-name.c
+#, c-format
+msgid ""
+"The candidates are:\n"
+"%s"
+msgstr ""
+"Is iad na hiarrthóirí:\n"
+"%s"
+
+#: object-name.c
+msgid ""
+"Git normally never creates a ref that ends with 40 hex characters\n"
+"because it will be ignored when you just specify 40-hex. These refs\n"
+"may be created by mistake. For example,\n"
+"\n"
+" git switch -c $br $(git rev-parse ...)\n"
+"\n"
+"where \"$br\" is somehow empty and a 40-hex ref is created. Please\n"
+"examine these refs and maybe delete them. Turn this message off by\n"
+"running \"git config set advice.objectNameWarning false\""
+msgstr ""
+"De ghnáth ní chruthaíonn Git tagartha riamh a chríochnaíonn le 40 carachtar\n"
+"toisc go ndéanfar neamhaird air nuair a shonraíonn tú ach 40-hex. Na "
+"hiarratais seo\n"
+"d'fhéadfaí a chruthú trí dhearmad. Mar shampla,\n"
+"\n"
+" git switch -c $br $(git rev-parse ...)\n"
+"\n"
+"áit a bhfuil “$br” folamh ar bhealach éigin agus cruthaítear tagairt 40-hex. "
+"Le do thoil\n"
+"scrúdú a dhéanamh ar na haifeanna seo agus b'fhéidir iad a scriosadh. Cas an "
+"teachtaireacht seo as\n"
+"ag rith \"git config set advice.objectNameWarning false\""
+
+#: object-name.c
+#, c-format
+msgid "log for '%.*s' only goes back to %s"
+msgstr "ní théann logáil le haghaidh '%.*s' ach ar ais go %s"
+
+#: object-name.c
+#, c-format
+msgid "log for '%.*s' only has %d entries"
+msgstr "níl ach iontráil i logáil le haghaidh '%.*s' ach %d ceann"
+
+#: object-name.c
+#, c-format
+msgid "path '%s' exists on disk, but not in '%.*s'"
+msgstr "tá cosán '%s' ann ar an diosca, ach ní i '%.*s'"
+
+#: object-name.c
+#, c-format
+msgid ""
+"path '%s' exists, but not '%s'\n"
+"hint: Did you mean '%.*s:%s' aka '%.*s:./%s'?"
+msgstr ""
+"tá an cosán '%s' ann, ach níl '%s' ann\n"
+"leid: An raibh tú i gceist agat '%.*s:%s' aka '%.*s:./%s'?"
+
+#: object-name.c
+#, c-format
+msgid "path '%s' does not exist in '%.*s'"
+msgstr "níl cosán '%s' ann i '%.*s'"
+
+#: object-name.c
+#, c-format
+msgid ""
+"path '%s' is in the index, but not at stage %d\n"
+"hint: Did you mean ':%d:%s'?"
+msgstr ""
+"tá cosán '%s' san innéacs, ach ní ag céim %d\n"
+"leid: An raibh i gceist agat ': %d: %s'?"
+
+#: object-name.c
+#, c-format
+msgid ""
+"path '%s' is in the index, but not '%s'\n"
+"hint: Did you mean ':%d:%s' aka ':%d:./%s'?"
+msgstr ""
+"tá an conair '%s' san innéacs, ach ní '%s'\n"
+"leideanna: an é ':%d:%s' a bhí i gceist agat, nó ':%d:./%s'?"
+
+#: object-name.c
+#, c-format
+msgid "path '%s' exists on disk, but not in the index"
+msgstr "tá cosán '%s' ann ar an diosca, ach ní san innéacs"
+
+#: object-name.c
+#, c-format
+msgid "path '%s' does not exist (neither on disk nor in the index)"
+msgstr "níl cosán '%s' ann (ní ar an diosca ná san innéacs)"
+
+#: object-name.c
+msgid "relative path syntax can't be used outside working tree"
+msgstr ""
+"ní féidir comhréir cosáin choibhneasta a úsáid lasmuigh de chrann oibre"
+
+#: object-name.c
+#, c-format
+msgid "<object>:<path> required, only <object> '%s' given"
+msgstr "<object>: ri <path>achtanach, ní <object>thugtar ach '%s'"
+
+#: object-name.c
+#, c-format
+msgid "invalid object name '%.*s'."
+msgstr "ainm réada neamhbhailí '%.*s'."
+
+#: object-store.c
+#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "níl an eolaire réada %s ann; seiceáil .git/objects/info/alternates"
+
+#: object-store.c
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "nach féidir cosán réad malartach a normalú: %s"
+
+#: object-store.c
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s: neamhaird a dhéanamh ar stórais rudaí malartacha, neadú ró-"
+
+#: object-store.c
+msgid "unable to fdopen alternates lockfile"
+msgstr "in ann comhad glasála malartacha a fdopen"
+
+#: object-store.c
+msgid "unable to read alternates file"
+msgstr "in ann comhad malartach a léamh"
+
+#: object-store.c
+msgid "unable to move new alternates file into place"
+msgstr "in ann comhad malartacha nua a bhogadh isteach"
+
+#: object-store.c
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "níl cosán '%s' ann"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr "ní thacaítear le stór tagartha '%s' mar sheiceáil nasctha go fóill."
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "ní stór áitiúil é stór tagartha '%s'."
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "tá stóras tagartha '%s' éadomhain"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "tá stór tagartha '%s' grapháilte"
+
+#: object-store.c
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "ní fhéadfaí eolaire réada a fháil a mheaitseáil %s"
+
+#: object-store.c
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "líne neamhbhailí agus tú ag paráil iarmhairtí malartacha: %s"
+
+#: object-store.c
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "nach bhfuarthas %s a athsholáthar do %s"
+
+#: object-store.c
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "tá réad pacáilte %s (stóráilte i %s) truaillithe"
+
+#: object-store.c
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "mapáil atá in easnamh de %s go %s"
+
+#: object-store.c
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "Ní réad bailí '%s' é %s '"
+
+#: object.c
+#, c-format
+msgid "invalid object type \"%s\""
+msgstr "cineál réad neamhbhailí “%s”"
+
+#: object.c
+#, c-format
+msgid "object %s is a %s, not a %s"
+msgstr "is %s é réad %s, ní %s"
+
+#: object.c
+#, c-format
+msgid "object %s has unknown type id %d"
+msgstr "réad %s tá cineál ID anaithnid %d aige"
+
+#: object.c
+#, c-format
+msgid "unable to parse object: %s"
+msgstr "nach féidir réad a pháirseáil: %s"
+
+#: object.c
+#, c-format
+msgid "hash mismatch %s"
+msgstr "neamhoiriúnú hash %s"
+
+#: pack-bitmap-write.c
+#, c-format
+msgid "duplicate entry when writing bitmap index: %s"
+msgstr "iontráil dúblach agus innéacs bitmap á scríobh: %s"
+
+#: pack-bitmap-write.c
+#, c-format
+msgid "attempted to store non-selected commit: '%s'"
+msgstr "rinne iarracht tiomantas neamh-roghnaithe a stóráil: '%s'"
+
+#: pack-bitmap-write.c
+msgid "too many pseudo-merges"
+msgstr "an iomarca bréag-chumaisc"
+
+#: pack-bitmap-write.c
+msgid "trying to write commit not in index"
+msgstr "ag iarraidh tiomantas a scríobh ní in innéacs"
+
+#: pack-bitmap.c
+msgid "failed to load bitmap index (corrupted?)"
+msgstr "theip ar innéacs bitmap a luchtú (truaillithe?)"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index (too small)"
+msgstr "innéacs bitmap truaillithe (ró-bheag)"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index file (wrong header)"
+msgstr "comhad innéacs bitmap truaillithe (ceanntásc mícheart)"
+
+#: pack-bitmap.c
+#, c-format
+msgid "unsupported version '%d' for bitmap index file"
+msgstr "leagan gan tacaíocht '%d' do chomhad innéacs bitmap"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index file (too short to fit hash cache)"
+msgstr ""
+"comhad innéacs bitmap truaillithe (róghearr chun taisce hash a fheistiú)"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index file (too short to fit lookup table)"
+msgstr ""
+"comhad innéacs bitmap truaillithe (róghearr chun tábla cuardaigh a fheistiú)"
+
+#: pack-bitmap.c
+msgid ""
+"corrupted bitmap index file (too short to fit pseudo-merge table header)"
+msgstr ""
+"comhad innéacs bitmap truaillithe (ró-ghearr chun ceannteideal tábla bréag-"
+"chumasc a fheistiú)"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index file (too short to fit pseudo-merge table)"
+msgstr ""
+"comhad innéacs bitmap truaillithe (ró-ghearr chun tábla bréag-chumasc a "
+"fheistiú)"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap index file, pseudo-merge table too short"
+msgstr "comhad innéacs bitmap truaillithe, tábla bréag-chumasc ró-ghearr"
+
+#: pack-bitmap.c
+#, c-format
+msgid "duplicate entry in bitmap index: '%s'"
+msgstr "iontráil dúblach in innéacs bitmap: '%s'"
+
+#: pack-bitmap.c
+#, c-format
+msgid "corrupt ewah bitmap: truncated header for entry %d"
+msgstr "bitmap ewah truaillithe: ceannteideal gearrtha le haghaidh iontráil %d"
+
+#: pack-bitmap.c
+#, c-format
+msgid "corrupt ewah bitmap: commit index %u out of range"
+msgstr "bitmap ewah truaillithe: innéacs tiomanta %u lasmuigh den raon"
+
+#: pack-bitmap.c
+msgid "corrupted bitmap pack index"
+msgstr "innéacs pacáiste bitmap truaillte"
+
+#: pack-bitmap.c
+msgid "invalid XOR offset in bitmap pack index"
+msgstr "fritháireamh XOR neamhbhailí in innéacs pacáiste bitmap"
+
+#: pack-bitmap.c
+msgid "cannot fstat bitmap file"
+msgstr "ní féidir comhad bitmap fstat"
+
+#: pack-bitmap.c
+msgid "checksum doesn't match in MIDX and bitmap"
+msgstr "ní mheaitseálann seicsum i MIDX agus bitmap"
+
+#: pack-bitmap.c
+msgid "multi-pack bitmap is missing required reverse index"
+msgstr "tá an t-innéacs droim riachtanach in easnamh ilphacáiste"
+
+#: pack-bitmap.c
+#, c-format
+msgid "could not open pack %s"
+msgstr "ní fhéadfaí pacáiste %s a oscailt"
+
+#: pack-bitmap.c
+msgid "corrupt bitmap lookup table: triplet position out of index"
+msgstr "tábla cuardaigh bitmap truaillithe: suíomh triplet as innéacs"
+
+#: pack-bitmap.c
+msgid "corrupt bitmap lookup table: xor chain exceeds entry count"
+msgstr "tábla cuardaigh bitmap truaillithe: sáraíonn slabhra xor líon iontrála"
+
+#: pack-bitmap.c
+#, c-format
+msgid "corrupt bitmap lookup table: commit index %u out of range"
+msgstr ""
+"tábla cuardaigh bitmap truaillithe: innéacs tiomanta %u lasmuigh den raon"
+
+#: pack-bitmap.c
+#, c-format
+msgid "corrupt ewah bitmap: truncated header for bitmap of commit \"%s\""
+msgstr ""
+"bitmap ewah truaillithe: ceannteideal gearrtha le haghaidh bitmap de "
+"thiomantas “%s”"
+
+#: pack-bitmap.c
+#, c-format
+msgid "unable to load pack: '%s', disabling pack-reuse"
+msgstr "in ann pacáiste a luchtú: '%s', athúsáid pacáiste a dhíchumasú"
+
+#: pack-bitmap.c
+msgid "unable to compute preferred pack, disabling pack-reuse"
+msgstr "in ann pacáiste roghnaithe a ríomh, athúsáid pacáiste a dhíchumasú"
+
+#: pack-bitmap.c
+#, c-format
+msgid "object '%s' not found in type bitmaps"
+msgstr "níor aimsíodh réad '%s' i gcineál bitmaps"
+
+#: pack-bitmap.c
+#, c-format
+msgid "object '%s' does not have a unique type"
+msgstr "níl cineál uathúil ag réad '%s'"
+
+#: pack-bitmap.c
+#, c-format
+msgid "object '%s': real type '%s', expected: '%s'"
+msgstr "réad '%s': fíor-chineál '%s', ag súil leis: '%s'"
+
+#: pack-bitmap.c
+#, c-format
+msgid "object not in bitmap: '%s'"
+msgstr "réad nach bhfuil i mbitmap: '%s'"
+
+#: pack-bitmap.c
+msgid "failed to load bitmap indexes"
+msgstr "theip ar innéacsanna bitmap a luchtú"
+
+#: pack-bitmap.c
+msgid "you must specify exactly one commit to test"
+msgstr "ní mór duit tiomantas amháin a shonrú go díreach chun tástáil"
+
+#: pack-bitmap.c
+#, c-format
+msgid "commit '%s' doesn't have an indexed bitmap"
+msgstr "cumann nach bhfuil bitmap innéacsaithe ag '%s'"
+
+#: pack-bitmap.c
+msgid "mismatch in bitmap results"
+msgstr "mímheaitseáil i dtorthaí bitmap"
+
+#: pack-bitmap.c
+#, c-format
+msgid "pseudo-merge index out of range (%<PRIu32> >= %<PRIuMAX>)"
+msgstr "innéacs bréag-chumaisc lasmuigh den raon (%<PRIu32> >= %<PRIuMAX>)"
+
+#: pack-bitmap.c
+#, c-format
+msgid "could not find '%s' in pack '%s' at offset %<PRIuMAX>"
+msgstr ""
+"ní raibh '%s' in ann teacht i bpacáiste '%s' ag fhritháireamh%<PRIuMAX>"
+
+#: pack-bitmap.c
+#, c-format
+msgid "unable to get disk usage of '%s'"
+msgstr "ní féidir úsáid diosca a fháil de '%s'"
+
+#: pack-bitmap.c
+#, c-format
+msgid "bitmap file '%s' has invalid checksum"
+msgstr "tá seicsum neamhbhailí ag comhad bitmap '%s'"
+
+#: pack-mtimes.c
+#, c-format
+msgid "mtimes file %s is too small"
+msgstr "tá comhad mtimes %s ró-bheag"
+
+#: pack-mtimes.c
+#, c-format
+msgid "mtimes file %s has unknown signature"
+msgstr "tá síniú anaithnid ag comhad mtimes %s"
+
+#: pack-mtimes.c
+#, c-format
+msgid "mtimes file %s has unsupported version %<PRIu32>"
+msgstr "tá leagan neamh-tacaithe ag comhad mtimes %s% <PRIu32>"
+
+#: pack-mtimes.c
+#, c-format
+msgid "mtimes file %s has unsupported hash id %<PRIu32>"
+msgstr "tá id hash neamh-tacaithe ag comhad %s mtimes% <PRIu32>"
+
+#: pack-mtimes.c
+#, c-format
+msgid "mtimes file %s is corrupt"
+msgstr "tá comhad mtimes %s truaillithe"
+
+#: pack-revindex.c
+#, c-format
+msgid "reverse-index file %s is too small"
+msgstr "tá comhad innéacs droim %s róbheag"
+
+#: pack-revindex.c
+#, c-format
+msgid "reverse-index file %s is corrupt"
+msgstr "tá comhad innéacs droim %s truaillithe"
+
+#: pack-revindex.c
+#, c-format
+msgid "reverse-index file %s has unknown signature"
+msgstr "tá síniú anaithnid ag comhad innéacs droim %s"
+
+#: pack-revindex.c
+#, c-format
+msgid "reverse-index file %s has unsupported version %<PRIu32>"
+msgstr "tá leagan neamh-tacaithe ag comhad innéacs droim %s% <PRIu32>"
+
+#: pack-revindex.c
+#, c-format
+msgid "reverse-index file %s has unsupported hash id %<PRIu32>"
+msgstr "tá id hash neamh-tacaithe ag comhad innéacs droim %s% <PRIu32>"
+
+#: pack-revindex.c
+msgid "invalid checksum"
+msgstr "seiceáil neamhbhailí"
+
+#: pack-revindex.c
+#, c-format
+msgid "invalid rev-index position at %<PRIu64>: %<PRIu32> != %<PRIu32>"
+msgstr ""
+"suíomh innéacs-athraithe neamhbhailí ag %<PRIu64>: %<PRIu32> != %<PRIu32>"
+
+#: pack-revindex.c
+msgid "multi-pack-index reverse-index chunk is the wrong size"
+msgstr "tá smután droim ar ais-innéacs il-phacáiste ar an méid mícheart"
+
+#: pack-revindex.c
+msgid "could not determine preferred pack"
+msgstr "ní fhéadfaí pacáiste is fearr a chinneadh"
+
+#: pack-write.c
+msgid "cannot both write and verify reverse index"
+msgstr "ní féidir innéacs droim a scríobh agus a fhíorú"
+
+#: pack-write.c
+#, c-format
+msgid "could not stat: %s"
+msgstr "ní fhéadfaí stat: %s"
+
+#: pack-write.c
+#, c-format
+msgid "failed to make %s readable"
+msgstr "theip ar %s a dhéanamh inléite"
+
+#: pack-write.c
+#, c-format
+msgid "could not write '%s' promisor file"
+msgstr "ní fhéadfaí comhad gealltanais '%s' a scríobh"
+
+#: packfile.c
+msgid "offset before end of packfile (broken .idx?)"
+msgstr "fhritháireamh roimh dheireadh an phackfile (.idx briste?)"
+
+#: packfile.c
+#, c-format
+msgid "packfile %s cannot be mapped%s"
+msgstr "ní féidir comhaid pacáiste %s a mhapáil %s"
+
+#: packfile.c
+#, c-format
+msgid "offset before start of pack index for %s (corrupt index?)"
+msgstr ""
+"fhritháireamh roimh thús an innéacs pacáiste do %s (innéacs truaillithe?)"
+
+#: packfile.c
+#, c-format
+msgid "offset beyond end of pack index for %s (truncated index?)"
+msgstr ""
+"fhritháireamh thar dheireadh an innéacs pacáiste do %s (innéacs gearrtha?)"
+
+#: parse-options-cb.c
+#, c-format
+msgid "malformed expiration date '%s'"
+msgstr "dáta éaga mífhoirmithe '%s'"
+
+#: parse-options-cb.c
+#, c-format
+msgid "option `%s' expects \"always\", \"auto\", or \"never\""
+msgstr "tá rogha `%s' ag súil le “i gcónaí”, “uathoibríoch”, nó “riamh”"
+
+#: parse-options-cb.c
+#, c-format
+msgid "malformed object name '%s'"
+msgstr "ainm réad mífhoirmithe '%s'"
+
+#: parse-options-cb.c
+#, c-format
+msgid "option `%s' expects \"%s\" or \"%s\""
+msgstr "tá rogha `%s' ag súil le “%s” nó “%s”"
+
+#: parse-options.c
+#, c-format
+msgid "%s requires a value"
+msgstr "Teastaíonn luach ó %s"
+
+#: parse-options.c
+#, c-format
+msgid "%s takes no value"
+msgstr "Ní ghlacann %s aon luach"
+
+#: parse-options.c
+#, c-format
+msgid "%s isn't available"
+msgstr "Níl %s ar fáil"
+
+#: parse-options.c
+#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "luach %s do %s nach bhfuil sa raon [%<PRIdMAX>,%<PRIdMAX>]"
+
+#: parse-options.c
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "Tá %s ag súil le luach sláireach le iarmhír roghnach k/m/g"
+
+#: parse-options.c
+#, c-format
+msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
+msgstr ""
+"Tá %s ag súil le luach sláimhir neamh-dhiúltach le iarmhír roghnach k/m/g"
+
+#: parse-options.c
+#, c-format
+msgid "ambiguous option: %s (could be --%s%s or --%s%s)"
+msgstr "rogha débhríoch: %s (d'fhéadfadh a bheith --%s%s nó --%s%s)"
+
+#: parse-options.c
+#, c-format
+msgid "did you mean `--%s` (with two dashes)?"
+msgstr "an raibh i gceist agat `--%s` (le dhá shraith)?"
+
+#: parse-options.c
+#, c-format
+msgid "alias of --%s"
+msgstr "alias de --%s"
+
+#: parse-options.c
+msgid "need a subcommand"
+msgstr "fo-ordú ag teastáil"
+
+#: parse-options.c
+#, c-format
+msgid "unknown option `%s'"
+msgstr "rogha anaithnid `%s'"
+
+#: parse-options.c
+#, c-format
+msgid "unknown switch `%c'"
+msgstr "lasc anaithnid `%c'"
+
+#: parse-options.c
+#, c-format
+msgid "unknown non-ascii option in string: `%s'"
+msgstr "rogha neamh-ascii anaithnid i sreang: `%s'"
+
+#. TRANSLATORS: The "<%s>" part of this string
+#. stands for an optional value given to a command
+#. line option in the long form, and "<>" is there
+#. as a convention to signal that it is a
+#. placeholder (i.e. the user should substitute it
+#. with the real value). If your language uses a
+#. different convention, you can change "<%s>" part
+#. to match yours, e.g. it might use "|%s|" instead,
+#. or if the alphabet is different enough it may use
+#. "%s" without any placeholder signal. Most
+#. translations leave this message as is.
+#.
+#: parse-options.c
+#, c-format
+msgid "[=<%s>]"
+msgstr "[=<%s>]"
+
+#. TRANSLATORS: The "<%s>" part of this string
+#. stands for an optional value given to a command
+#. line option in the short form, and "<>" is there
+#. as a convention to signal that it is a
+#. placeholder (i.e. the user should substitute it
+#. with the real value). If your language uses a
+#. different convention, you can change "<%s>" part
+#. to match yours, e.g. it might use "|%s|" instead,
+#. or if the alphabet is different enough it may use
+#. "%s" without any placeholder signal. Most
+#. translations leave this message as is.
+#.
+#: parse-options.c
+#, c-format
+msgid "[<%s>]"
+msgstr "[<%s>]"
+
+#. TRANSLATORS: The "<%s>" part of this string stands for a
+#. value given to a command line option, and "<>" is there
+#. as a convention to signal that it is a placeholder
+#. (i.e. the user should substitute it with the real value).
+#. If your language uses a different convention, you can
+#. change "<%s>" part to match yours, e.g. it might use
+#. "|%s|" instead, or if the alphabet is different enough it
+#. may use "%s" without any placeholder signal. Most
+#. translations leave this message as is.
+#.
+#: parse-options.c
+#, c-format
+msgid " <%s>"
+msgstr " <%s>"
+
+#: parse-options.c
+msgid "..."
+msgstr "..."
+
+#: parse-options.c
+#, c-format
+msgid "usage: %s"
+msgstr "úsáid: %s"
+
+#. TRANSLATORS: the colon here should align with the
+#. one in "usage: %s" translation.
+#.
+#: parse-options.c
+#, c-format
+msgid " or: %s"
+msgstr " nó: %s"
+
+#. TRANSLATORS: You should only need to translate this format
+#. string if your language is a RTL language (e.g. Arabic,
+#. Hebrew etc.), not if it's a LTR language (e.g. German,
+#. Russian, Chinese etc.).
+#. *
+#. When a translated usage string has an embedded "\n" it's
+#. because options have wrapped to the next line. The line
+#. after the "\n" will then be padded to align with the
+#. command name, such as N_("git cmd [opt]\n<8
+#. spaces>[opt2]"), where the 8 spaces are the same length as
+#. "git cmd ".
+#. *
+#. This format string prints out that already-translated
+#. line. The "%*s" is whitespace padding to account for the
+#. padding at the start of the line that we add in this
+#. function. The "%s" is a line in the (hopefully already
+#. translated) N_() usage string, which contained embedded
+#. newlines before we split it up.
+#.
+#: parse-options.c
+#, c-format
+msgid "%*s%s"
+msgstr "%*s%s"
+
+#: parse-options.c
+#, c-format
+msgid " %s"
+msgstr " %s"
+
+#: parse-options.c
+msgid "-NUM"
+msgstr "-NUMBER"
+
+#: parse-options.c
+#, c-format
+msgid "opposite of --no-%s"
+msgstr "os coinne de --no-%s"
+
+#: parse-options.h
+msgid "expiry-date"
+msgstr "dáta éaga"
+
+#: parse-options.h
+msgid "no-op (backward compatibility)"
+msgstr "no-op (comhoiriúnacht ar chúl)"
+
+#: parse-options.h
+msgid "be more verbose"
+msgstr "a bheith níos inbhreithnithe"
+
+#: parse-options.h
+msgid "be more quiet"
+msgstr "a bheith níos ciúine"
+
+#: parse-options.h
+msgid "use <n> digits to display object names"
+msgstr "úsáid dhigit <n>í chun ainmneacha réada a thaispe"
+
+#: parse-options.h
+msgid "prefixed path to initial superproject"
+msgstr "cosán réamhshocraithe chuig an superproject tosaigh"
+
+#: parse-options.h
+msgid "how to strip spaces and #comments from message"
+msgstr "conas spásanna agus #comments a scriosadh ó theachtaireacht"
+
+#: parse-options.h
+msgid "read pathspec from file"
+msgstr "léigh pathspec ón gcomhad"
+
+#: parse-options.h
+msgid ""
+"with --pathspec-from-file, pathspec elements are separated with NUL character"
+msgstr ""
+"le --pathspec-from-file, déantar eilimintí pathspec scartha le carachtar NUL"
+
+#: parse.c
+#, c-format
+msgid "bad boolean environment value '%s' for '%s'"
+msgstr "droch-luach timpeallachta boolean '%s' do '%s'"
+
+#: path-walk.c
+#, c-format
+msgid "failed to walk children of tree %s: not found"
+msgstr "theip ar pháistí crann %s a shiúl: níor aimsíodh"
+
+#: path-walk.c
+#, c-format
+msgid "failed to find object %s"
+msgstr "theip ar réad %s a aimsiú"
+
+#: path-walk.c
+#, c-format
+msgid "failed to find tag %s"
+msgstr "theip ar chlib %s a aimsiú"
+
+#: path-walk.c
+msgid "failed to setup revision walk"
+msgstr "theip orthu siúlóid athbhreithnithe"
+
+#: path.c
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Ní fhéadfaí %s a dhéanamh inscríofa de réir grúpa"
+
+#: pathspec.c
+msgid "Escape character '\\' not allowed as last character in attr value"
+msgstr ""
+"Ní cheadaítear carachtar éalaithe '\\' mar charachtar deireanach i luach attr"
+
+#: pathspec.c
+msgid "Only one 'attr:' specification is allowed."
+msgstr "Ní cheadaítear ach sonraíocht 'attr: 'amháin."
+
+#: pathspec.c
+msgid "attr spec must not be empty"
+msgstr "ní chóir go mbeadh sonraíocht attr folamh"
+
+#: pathspec.c
+#, c-format
+msgid "invalid attribute name %s"
+msgstr "ainm tréithe neamhbhailí %s"
+
+#: pathspec.c
+msgid "global 'glob' and 'noglob' pathspec settings are incompatible"
+msgstr "níl socruithe pathspec domhanda 'glob' agus 'noglob' neamhoiriúnach"
+
+#: pathspec.c
+msgid ""
+"global 'literal' pathspec setting is incompatible with all other global "
+"pathspec settings"
+msgstr ""
+"níl suíomh cosáin domhanda 'litriúil' gan luí le gach socruithe beatháin "
+"domhanda eile"
+
+#: pathspec.c
+msgid "invalid parameter for pathspec magic 'prefix'"
+msgstr "paraiméadar neamhbhailí do 'réimír' draíochta pathspec"
+
+#: pathspec.c
+#, c-format
+msgid "Invalid pathspec magic '%.*s' in '%s'"
+msgstr "Draíocht pathspec neamhbhailí '%.*s' i '%s'"
+
+#: pathspec.c
+#, c-format
+msgid "Missing ')' at the end of pathspec magic in '%s'"
+msgstr "Ar iarraidh ')' ag deireadh draíochta pathspec i '%s'"
+
+#: pathspec.c
+#, c-format
+msgid "Unimplemented pathspec magic '%c' in '%s'"
+msgstr "Draíocht pathspec neamh-chur i bhfeidhm '%c' i '%s'"
+
+#: pathspec.c
+#, c-format
+msgid "%s: 'literal' and 'glob' are incompatible"
+msgstr "%s: Níl 'literal' agus 'glob' neamhoiriúnach"
+
+#: pathspec.c
+#, c-format
+msgid "'%s' is outside the directory tree"
+msgstr "Tá '%s' lasmuigh den chrann eolaire"
+
+#: pathspec.c
+#, c-format
+msgid "%s: '%s' is outside repository at '%s'"
+msgstr "%s: Tá '%s' an stór lasmuigh ag '%s'"
+
+#: pathspec.c
+#, c-format
+msgid "'%s' (mnemonic: '%c')"
+msgstr "'%s' (mnemonic: '%c')"
+
+#: pathspec.c
+#, c-format
+msgid "%s: pathspec magic not supported by this command: %s"
+msgstr "%s: nach dtacaíonn an t-ordú seo le draíocht pathspec: %s"
+
+#: pathspec.c
+#, c-format
+msgid "pathspec '%s' is beyond a symbolic link"
+msgstr "tá pathspec '%s' thar nasc siombalach"
+
+#: pathspec.c
+#, c-format
+msgid "line is badly quoted: %s"
+msgstr "tá an líne luaite go dona: %s"
+
+#: pkt-line.c
+msgid "unable to write flush packet"
+msgstr "in ann pacáiste srutháin a scríobh"
+
+#: pkt-line.c
+msgid "unable to write delim packet"
+msgstr "in ann pacáiste delim a scríobh"
+
+#: pkt-line.c
+msgid "unable to write response end packet"
+msgstr "in ann pacáiste deiridh freagartha a scríobh"
+
+#: pkt-line.c
+msgid "flush packet write failed"
+msgstr "theip ar scríobh paicéad sru"
+
+#: pkt-line.c
+msgid "protocol error: impossibly long line"
+msgstr "earráid prótacal: líne fhada dodhéanta"
+
+#: pkt-line.c
+msgid "packet write with format failed"
+msgstr "theip ar scríobh pacáiste le formáid"
+
+#: pkt-line.c
+msgid "packet write failed - data exceeds max packet size"
+msgstr "theip ar scríobh paicéad - sáraíonn sonraí méid uasta an"
+
+#: pkt-line.c
+#, c-format
+msgid "packet write failed: %s"
+msgstr "theip ar scríobh pacáiste: %s"
+
+#: pkt-line.c
+msgid "read error"
+msgstr "earráid léigh"
+
+#: pkt-line.c
+msgid "the remote end hung up unexpectedly"
+msgstr "crochadh an deireadh iargúlta suas gan choinne"
+
+#: pkt-line.c
+#, c-format
+msgid "protocol error: bad line length character: %.4s"
+msgstr "earráid prótacal: carachtar fad droch-líne: %.4s"
+
+#: pkt-line.c
+#, c-format
+msgid "protocol error: bad line length %d"
+msgstr "earráid prótacal: fad droch-líne %d"
+
+#: pkt-line.c sideband.c
+#, c-format
+msgid "remote error: %s"
+msgstr "earráid iargúlta: %s"
+
+#: preload-index.c
+msgid "Refreshing index"
+msgstr "Innéacs athnuachana"
+
+#: preload-index.c
+#, c-format
+msgid "unable to create threaded lstat: %s"
+msgstr "nach féidir lstat snáithithe a chruthú: %s"
+
+#: pretty.c
+msgid "unable to parse --pretty format"
+msgstr "in ann formáid --pretty a pháirseáil"
+
+#: promisor-remote.c
+msgid "lazy fetching disabled; some objects may not be available"
+msgstr ""
+"tarraingt leisciúil míchumasaithe; b'fhéidir nach mbeidh roinnt rudaí ar fáil"
+
+#: promisor-remote.c
+msgid "promisor-remote: unable to fork off fetch subprocess"
+msgstr "gealltó-iargúlta: ní féidir leis an bhfophróiseas faighte a fhorc"
+
+#: promisor-remote.c
+msgid "promisor-remote: could not write to fetch subprocess"
+msgstr "gealltó-iargúlta: ní fhéadfaí scríobh chun fophróiseas a fháil"
+
+#: promisor-remote.c
+msgid "promisor-remote: could not close stdin to fetch subprocess"
+msgstr "gealltó-iargúlta: ní fhéadfaí stdin a dhúnadh chun fophróiseas a fháil"
+
+#: promisor-remote.c
+#, c-format
+msgid "promisor remote name cannot begin with '/': %s"
+msgstr "ní féidir ainm iargúlta gealltanaí tosú le '/': %s"
+
+#: promisor-remote.c
+#, c-format
+msgid "could not fetch %s from promisor remote"
+msgstr "ní fhéadfaí %s a fháil ó iargúlta gealltanach"
+
+#: promisor-remote.c
+#, c-format
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "níl aon URL nó folamh fógraithe le haghaidh iargúlta '%s'"
+
+#: promisor-remote.c
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "iargúlta ar a dtugtar '%s' ach le URL '%s' in ionad '%s'"
+
+#: promisor-remote.c
+#, c-format
+msgid "unknown '%s' value for '%s' config option"
+msgstr "luach '%s' anaithnid do rogha cumraithe '%s'"
+
+#: promisor-remote.c
+#, c-format
+msgid "unknown element '%s' from remote info"
+msgstr "eilimint anaithnid '%s' ó fhaisnéis iargúlta"
+
+#: promisor-remote.c
+#, c-format
+msgid "accepted promisor remote '%s' not found"
+msgstr "nár aimsíodh gealltanas iargúlta '%s'"
+
+#: protocol-caps.c
+msgid "object-info: expected flush after arguments"
+msgstr "ear-eolas: súil le sruth tar éis argóintí"
+
+#: prune-packed.c
+msgid "Removing duplicate objects"
+msgstr "Rudaí dúblacha a bhaint"
+
+#: pseudo-merge.c
+#, c-format
+msgid "failed to load pseudo-merge regex for %s: '%s'"
+msgstr "theip ar régex bréag-cumaisc a luchtú do %s: '%s'"
+
+#: pseudo-merge.c
+#, c-format
+msgid "%s must be non-negative, using default"
+msgstr "Ní mór %s a bheith neamh-dhiúltach, ag baint úsáide as"
+
+#: pseudo-merge.c
+#, c-format
+msgid "%s must be between 0 and 1, using default"
+msgstr "Caithfidh %s a bheith idir 0 agus 1, ag baint úsáide as réamhshocrú"
+
+#: pseudo-merge.c
+#, c-format
+msgid "%s must be positive, using default"
+msgstr "Caithfidh %s a bheith dearfach, ag úsáid réamhshocraithe"
+
+#: pseudo-merge.c
+#, c-format
+msgid "pseudo-merge group '%s' missing required pattern"
+msgstr "grúpa bréagchumaisc '%s' ar iarraidh patrún riachtanach"
+
+#: pseudo-merge.c
+#, c-format
+msgid "pseudo-merge group '%s' has unstable threshold before stable one"
+msgstr "tá tairseach éagobhsaí ag an ngrúpa bréagchumaisc '%s' roimh cheann"
+
+#: pseudo-merge.c
+#, c-format
+msgid ""
+"pseudo-merge regex from config has too many capture groups (max=%<PRIuMAX>)"
+msgstr ""
+"tá an iomarca grúpaí gabhála sa regex pseudo-merge ón chumraíocht "
+"(uasmhéid=%<PRIuMAX>)"
+
+#: pseudo-merge.c
+#, c-format
+msgid "extended pseudo-merge read out-of-bounds (%<PRIuMAX> >= %<PRIuMAX>)"
+msgstr ""
+"léamh sínte cumaisc bhréige lasmuigh de theorainneacha (%<PRIuMAX> >= "
+"%<PRIuMAX>)"
+
+#: pseudo-merge.c
+#, c-format
+msgid "extended pseudo-merge entry is too short (%<PRIuMAX> >= %<PRIuMAX>)"
+msgstr "tá an iontráil shínte chumaisc ró-ghearr (%<PRIuMAX> >= %<PRIuMAX>)"
+
+#: pseudo-merge.c
+#, c-format
+msgid "could not find pseudo-merge for commit %s at offset %<PRIuMAX>"
+msgstr ""
+"ní fhéadfaí a aimsiú bréag-chumasc do thiomantas %s ag "
+"fhritháireamh%<PRIuMAX>"
+
+#: pseudo-merge.c
+#, c-format
+msgid "extended pseudo-merge lookup out-of-bounds (%<PRIu32> >= %<PRIu32>)"
+msgstr ""
+"cuardach sínte cumaisc bhréige lasmuigh de theorainneacha (%<PRIu32> >= "
+"%<PRIu32>)"
+
+#: pseudo-merge.c
+#, c-format
+msgid "out-of-bounds read: (%<PRIuMAX> >= %<PRIuMAX>)"
+msgstr "léamh lasmuigh de theorainneacha: (%<PRIuMAX> >= %<PRIuMAX>)"
+
+#: pseudo-merge.c
+#, c-format
+msgid "could not read extended pseudo-merge table for commit %s"
+msgstr ""
+"ní fhéadfaí tábla bréag-chumaisc leathnaithe a léamh le haghaidh tiomanta %s"
+
+#: range-diff.c
+msgid "could not start `log`"
+msgstr "ní fhéadfaí 'log' a thosú"
+
+#: range-diff.c
+msgid "could not read `log` output"
+msgstr "ní raibh in ann aschur `log` a léamh"
+
+#: range-diff.c sequencer.c
+#, c-format
+msgid "could not parse commit '%s'"
+msgstr "ní fhéadfaí gealladh '%s' a pháirseáil"
+
+#: range-diff.c
+#, c-format
+msgid ""
+"could not parse first line of `log` output: did not start with 'commit ': "
+"'%s'"
+msgstr ""
+"ní raibh sé in ann an chéad líne d'aschur `log` a pháirseáil: níor thosaigh "
+"sé le 'commit': '%s'"
+
+#: range-diff.c
+#, c-format
+msgid "could not parse git header '%.*s'"
+msgstr "níorbh fhéidir ceanntásc git a pharsáil '%.*s'"
+
+#: range-diff.c
+msgid "failed to generate diff"
+msgstr "theip ar éagsúlacht a ghiniúint"
+
+#: range-diff.c
+#, c-format
+msgid "could not parse log for '%s'"
+msgstr "ní raibh in ann logáil a pháirseáil le haghaidh '%s'"
+
+#: reachable.c
+#, c-format
+msgid "invalid extra cruft tip: '%s'"
+msgstr "tip cruft bhreise neamhbhailí: '%s'"
+
+#: reachable.c
+msgid "unable to enumerate additional recent objects"
+msgstr "in ann rudaí breise le déanaí a áireamh"
+
+#: read-cache.c
+#, c-format
+msgid "will not add file alias '%s' ('%s' already exists in index)"
+msgstr ""
+"ní chuirfidh sé alias comhad '%s' leis (tá '%s' ann cheana féin san innéacs)"
+
+#: read-cache.c
+msgid "cannot create an empty blob in the object database"
+msgstr "ní féidir le blob folamh a chruthú sa bhunachar sonraí réad"
+
+#: read-cache.c
+#, c-format
+msgid "%s: can only add regular files, symbolic links or git-directories"
+msgstr ""
+"%s: ní féidir ach comhaid rialta, naisc siombalacha nó eolairí git-eolairí a "
+"chur leis"
+
+#: read-cache.c
+#, c-format
+msgid "unable to index file '%s'"
+msgstr "ní féidir an comhad '%s' a innéacsú"
+
+#: read-cache.c
+#, c-format
+msgid "unable to add '%s' to index"
+msgstr "ní féidir '%s' a chur leis an innéacs"
+
+#: read-cache.c
+#, c-format
+msgid "'%s' appears as both a file and as a directory"
+msgstr "Tá '%s' le feiceáil mar chomhad agus mar eolaire"
+
+#: read-cache.c
+msgid "Refresh index"
+msgstr "Innéacs athnuachan"
+
+#: read-cache.c
+#, c-format
+msgid ""
+"index.version set, but the value is invalid.\n"
+"Using version %i"
+msgstr ""
+"index.version socraithe, ach tá an luach neamhbhailí.\n"
+"Ag baint úsáide as leagan %i"
+
+#: read-cache.c
+#, c-format
+msgid ""
+"GIT_INDEX_VERSION set, but the value is invalid.\n"
+"Using version %i"
+msgstr ""
+"socraigh GIT_INDEX_VERSION, ach tá an luach neamhbhailí.\n"
+"Ag baint úsáide as leagan %i"
+
+#: read-cache.c
+#, c-format
+msgid "bad signature 0x%08x"
+msgstr "droch-shíniú 0x%08x"
+
+#: read-cache.c
+#, c-format
+msgid "bad index version %d"
+msgstr "leagan innéacs droch%d"
+
+#: read-cache.c
+msgid "bad index file sha1 signature"
+msgstr "comhad innéacs droch-sha1 síniú"
+
+#: read-cache.c
+#, c-format
+msgid "index uses %.4s extension, which we do not understand"
+msgstr "úsáideann innéacs síneadh %.4s, nach dtuigimid"
+
+#: read-cache.c
+#, c-format
+msgid "ignoring %.4s extension"
+msgstr "neamhaird a dhéanamh le síneadh %.4s"
+
+#: read-cache.c
+#, c-format
+msgid "unknown index entry format 0x%08x"
+msgstr "formáid iontrála innéacs anaithnid 0x%08x"
+
+#: read-cache.c
+#, c-format
+msgid "malformed name field in the index, near path '%s'"
+msgstr "réimse ainm mhífhoirmithe san innéacs, in aice le cosán '%s'"
+
+#: read-cache.c
+msgid "unordered stage entries in index"
+msgstr "iontrálacha céime neamh-ordaithe san innéacs"
+
+#: read-cache.c
+#, c-format
+msgid "multiple stage entries for merged file '%s'"
+msgstr "iontrálacha ilchéime do chomhad cumaisc '%s'"
+
+#: read-cache.c
+#, c-format
+msgid "unordered stage entries for '%s'"
+msgstr "iontrálacha stáitse neamh-ordaithe do '%s'"
+
+#: read-cache.c
+#, c-format
+msgid "unable to create load_cache_entries thread: %s"
+msgstr "ní féidir an snáithe load_cache_entries a chruthú: %s"
+
+#: read-cache.c
+#, c-format
+msgid "unable to join load_cache_entries thread: %s"
+msgstr "ní féidir teacht le snáithe load_cache_entries thread: %s"
+
+#: read-cache.c
+#, c-format
+msgid "%s: index file open failed"
+msgstr "%s: theip ar oscailt comhad innéacs"
+
+#: read-cache.c
+#, c-format
+msgid "%s: cannot stat the open index"
+msgstr "%s: ní féidir an t-innéacs oscailte a stáit"
+
+#: read-cache.c
+#, c-format
+msgid "%s: index file smaller than expected"
+msgstr "%s: comhad innéacs níos lú ná mar a bhí súil leis"
+
+#: read-cache.c
+#, c-format
+msgid "%s: unable to map index file%s"
+msgstr "%s: ní féidir comhad innéacs %s a mhapáil"
+
+#: read-cache.c
+#, c-format
+msgid "unable to create load_index_extensions thread: %s"
+msgstr "nach féidir snáithe load_index_extensions a chruthú: %s"
+
+#: read-cache.c
+#, c-format
+msgid "unable to join load_index_extensions thread: %s"
+msgstr "ní féidir teacht le snáithe load_index_extensions: %s"
+
+#: read-cache.c
+#, c-format
+msgid "could not freshen shared index '%s'"
+msgstr "ní raibh in ann innéacs roinnte '%s' a athnuachan"
+
+#: read-cache.c
+#, c-format
+msgid "broken index, expect %s in %s, got %s"
+msgstr "innéacs briste, súil le %s i %s, fuair %s"
+
+#: read-cache.c
+msgid "cannot write split index for a sparse index"
+msgstr "ní féidir innéacs scoilte a scríobh le haghaidh innéacs neall"
+
+#: read-cache.c
+msgid "failed to convert to a sparse-index"
+msgstr "theip ar thiontú go innéacs neamhchoitianta"
+
+#: read-cache.c
+#, c-format
+msgid "unable to open git dir: %s"
+msgstr "in ann git dir a oscailt: %s"
+
+#: read-cache.c
+#, c-format
+msgid "unable to unlink: %s"
+msgstr "nach féidir dínasc a dhéanamh: %s"
+
+#: read-cache.c
+#, c-format
+msgid "cannot fix permission bits on '%s'"
+msgstr "ní féidir giotáin ceada a shocrú ar '%s'"
+
+#: read-cache.c
+#, c-format
+msgid "%s: cannot drop to stage #0"
+msgstr "%s: ní féidir titim go dtí céim #0"
+
+#: read-cache.c
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "stádas diff gan choinne %c"
+
+#: read-cache.c
+#, c-format
+msgid "remove '%s'\n"
+msgstr "bain '%s'\n"
+
+#: rebase-interactive.c
+msgid ""
+"You can fix this with 'git rebase --edit-todo' and then run 'git rebase --"
+"continue'.\n"
+"Or you can abort the rebase with 'git rebase --abort'.\n"
+msgstr ""
+"Is féidir leat é seo a shocrú le 'git rebase --edit-todo' agus ansin 'git "
+"rebase --continue' a rith.\n"
+"Nó is féidir leat an rebase a chur le 'git rebase --abort'.\n"
+
+#: rebase-interactive.c
+#, c-format
+msgid ""
+"unrecognized setting %s for option rebase.missingCommitsCheck. Ignoring."
+msgstr ""
+"socrú neamhaithnithe %s le haghaidh rogha rebase.missingCommitsCheck. "
+"Neamhaird a dhéanamh."
+
+#: rebase-interactive.c
+msgid ""
+"\n"
+"Commands:\n"
+"p, pick <commit> = use commit\n"
+"r, reword <commit> = use commit, but edit the commit message\n"
+"e, edit <commit> = use commit, but stop for amending\n"
+"s, squash <commit> = use commit, but meld into previous commit\n"
+"f, fixup [-C | -c] <commit> = like \"squash\" but keep only the previous\n"
+" commit's log message, unless -C is used, in which case\n"
+" keep only this commit's message; -c is same as -C but\n"
+" opens the editor\n"
+"x, exec <command> = run command (the rest of the line) using shell\n"
+"b, break = stop here (continue rebase later with 'git rebase --continue')\n"
+"d, drop <commit> = remove commit\n"
+"l, label <label> = label current HEAD with a name\n"
+"t, reset <label> = reset HEAD to a label\n"
+"m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\n"
+" create a merge commit using the original merge commit's\n"
+" message (or the oneline, if no original merge commit was\n"
+" specified); use -c <commit> to reword the commit message\n"
+"u, update-ref <ref> = track a placeholder for the <ref> to be updated\n"
+" to this position in the new commits. The <ref> is\n"
+" updated at the end of the rebase\n"
+"\n"
+"These lines can be re-ordered; they are executed from top to bottom.\n"
+msgstr ""
+"\n"
+"Orduithe:\n"
+"p, pioc <commit>= úsáid tiomantas\n"
+"r, athfhocal <commit>= bain úsáid as tiomantas, ach cuir an teachtaireacht "
+"tiomanta in eagar\n"
+"e, eagarthóire <commit>acht = tiomantas a úsáid, ach stop le haghaidh leasú\n"
+"s, squash <commit>= gealltanas a úsáid, ach cuir isteach i dtiomantas roimhe "
+"seo\n"
+"f, fixup [-C | -c] <commit>= cosúil le “squash” ach ní choinnigh ach an "
+"ceann roimhe seo\n"
+" teachtaireacht logála commit, mura n-úsáidtear -C, sa "
+"chás sin\n"
+" coinnigh ach teachtaireacht an tiomanta seo; tá -c mar an "
+"gcéanna le -C ach\n"
+" osclaíonn an t-eagarthóir\n"
+"x, exec <command>= ordú reáchtáil (an chuid eile den líne) ag baint úsáide "
+"as bhlaosc\n"
+"b, briseadh = stad anseo (lean ar aghaidh ar rebase níos déanaí le 'git "
+"rebase --continue')\n"
+"d, titim <commit>= bain tiomantas\n"
+"l, lipéad <label>= lipéad CEAD reatha le hainm\n"
+"t, athshocraigh <label>= athshocraigh HEAD go lipéad\n"
+"<oneline>m, cumaisc [-C <commit>| -c<commit>] <label>[#]\n"
+" tiomantas cumaisc a chruthú ag baint úsáide as an tiomantas cumaisc\n"
+" teachtaireacht (nó an t-aonlíne, mura raibh aon chomhcheangal "
+"cumaisc bunaidh\n"
+" sonraithe); bain úsáid as -c chun an teachtai <commit>reacht "
+"tiomanta a athfhocal\n"
+"<ref>u, update-ref <ref>= rianú sealbhóir áite chun an a nuashonrú\n"
+" chuig an bpost seo sna gealltanais nua. Is <ref>é\n"
+" nuashonraithe ag deireadh an athbhunaithe\n"
+"\n"
+"Is féidir na línte seo a athordú; déantar iad a fhorghníomhú ó bharr go "
+"bun.\n"
+
+#: rebase-interactive.c
+#, c-format
+msgid "Rebase %s onto %s (%d command)"
+msgid_plural "Rebase %s onto %s (%d commands)"
+msgstr[0] "Athbhunú %s ar %s (ordú %d)"
+msgstr[1] "Athbhunú %s ar %s (%d orduithe)"
+msgstr[2] "Athbhunú %s ar %s (%d orduithe)"
+
+#: rebase-interactive.c
+msgid ""
+"\n"
+"Do not remove any line. Use 'drop' explicitly to remove a commit.\n"
+msgstr ""
+"\n"
+"Ná bain aon líne. Bain úsáid as 'drop' go sainráite chun tiomantas a "
+"bhaint.\n"
+
+#: rebase-interactive.c
+msgid ""
+"\n"
+"If you remove a line here THAT COMMIT WILL BE LOST.\n"
+msgstr ""
+"\n"
+"Má bhaineann tú líne anseo CAILLFIDH AN TIOMANTAS.\n"
+
+#: rebase-interactive.c
+msgid ""
+"\n"
+"You are editing the todo file of an ongoing interactive rebase.\n"
+"To continue rebase after editing, run:\n"
+" git rebase --continue\n"
+"\n"
+msgstr ""
+"\n"
+"Tá tú ag eagarthóireacht ar chomhad todo de athbhunú idirghníomhach "
+"leanúnach.\n"
+"Chun leanúint ar aghaidh ag athbhunú tar éis eagarthóireachta,\n"
+" git rebase --continue\n"
+"\n"
+
+#: rebase-interactive.c
+msgid ""
+"\n"
+"However, if you remove everything, the rebase will be aborted.\n"
+"\n"
+msgstr ""
+"\n"
+"Mar sin féin, má bhaineann tú gach rud, cuirfear deireadh leis an athbhunú.\n"
+
+#: rebase-interactive.c
+#, c-format
+msgid "could not write '%s'."
+msgstr "ní fhéadfaí '%s' a scríobh."
+
+#: rebase-interactive.c
+#, c-format
+msgid ""
+"Warning: some commits may have been dropped accidentally.\n"
+"Dropped commits (newer to older):\n"
+msgstr ""
+"Rabhadh: b'fhéidir gur titim roinnt gealltanna de thaisme.\n"
+"Gealltanna titim (níos nuaí go níos sine):\n"
+
+#: rebase-interactive.c
+#, c-format
+msgid ""
+"To avoid this message, use \"drop\" to explicitly remove a commit.\n"
+"\n"
+"Use 'git config rebase.missingCommitsCheck' to change the level of "
+"warnings.\n"
+"The possible behaviours are: ignore, warn, error.\n"
+"\n"
+msgstr ""
+"Chun an teachtaireacht seo a sheachaint, bain úsáid as “titim” chun "
+"tiomantas a bhaint go sainráite.\n"
+"\n"
+"Úsáid 'git config rebase.missingCommitsCheck' chun leibhéal na rabhaidh a "
+"athrú.\n"
+"Is iad na hiompraíochtaí féideartha: neamhaird a dhéanamh, rabhadh, "
+"earráid.\n"
+
+#: rebase.c
+#, c-format
+msgid "%s: 'preserve' superseded by 'merges'"
+msgstr "%s: cuireadh 'caomhnú' in ionad 'le' cumaisc '"
+
+#: ref-filter.c wt-status.c
+msgid "gone"
+msgstr "imithe"
+
+#: ref-filter.c
+#, c-format
+msgid "ahead %d"
+msgstr "ar aghaidh %d"
+
+#: ref-filter.c
+#, c-format
+msgid "behind %d"
+msgstr "taobh thiar de %d"
+
+#: ref-filter.c
+#, c-format
+msgid "ahead %d, behind %d"
+msgstr "tosaigh %d, taobh thiar de %d"
+
+#: ref-filter.c
+#, c-format
+msgid "%%(%.*s) does not take arguments"
+msgstr "%%(%.*s) ní ghlacann argóintí"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized %%(%.*s) argument: %s"
+msgstr "neamhaithnithe %%(%.*s) argóint: %s"
+
+#: ref-filter.c
+#, c-format
+msgid "expected format: %%(color:<color>)"
+msgstr "formáid ionchais: %%(color:<dath>)"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized color: %%(color:%s)"
+msgstr "dath gan aithint: %%(color:%s)"
+
+#: ref-filter.c
+#, c-format
+msgid "Integer value expected refname:lstrip=%s"
+msgstr "Luach sláimhir a bhfuiltear ag súil leis refname:lstrip=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "Integer value expected refname:rstrip=%s"
+msgstr "Luach sláimhir a bhfuiltear ag súil leis refname:rstrip=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "expected %%(trailers:key=<value>)"
+msgstr "ionchasach %%(trailers:key=<value>)"
+
+#: ref-filter.c
+#, c-format
+msgid "unknown %%(trailers) argument: %s"
+msgstr "argóint %%(trailers) anaithnid: %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected contents:lines=%s"
+msgstr "ábhar ag súil le luach dearfach:lines=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "argument expected for %s"
+msgstr "argóint ag súil le haghaidh %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected %s=%s"
+msgstr "luach dearfach a bhfuiltear ag súil leis %s=%s"
+
+#: ref-filter.c
+#, c-format
+msgid "cannot fully parse %s=%s"
+msgstr "ní féidir %s=%s a pháirseáil go hiomlán"
+
+#: ref-filter.c
+#, c-format
+msgid "value expected %s="
+msgstr "luach ag súil leis %s="
+
+#: ref-filter.c
+#, c-format
+msgid "positive value expected '%s' in %%(%s)"
+msgstr "luach dearfach a bhíothas ag súil le '%s' i %%(%s)"
+
+#: ref-filter.c
+#, c-format
+msgid "expected format: %%(align:<width>,<position>)"
+msgstr "ionchasach formáid: %%(align:<width>,<position>)"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized position:%s"
+msgstr "suíomh gan aithint:%s"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized width:%s"
+msgstr "leithead gan aithint:%s"
+
+#: ref-filter.c
+#, c-format
+msgid "unrecognized %%(%s) argument: %s"
+msgstr "argóint %%(%s) gan aitheantas: %s"
+
+#: ref-filter.c
+#, c-format
+msgid "positive width expected with the %%(align) atom"
+msgstr "leithead dearfach a bhíothas ag súil leis leis an adamh %%(align)"
+
+#: ref-filter.c
+#, c-format
+msgid "expected format: %%(ahead-behind:<committish>)"
+msgstr "formáid ionchais: %%(ahead-behind:<committish>)"
+
+#: ref-filter.c
+#, c-format
+msgid "expected format: %%(is-base:<committish>)"
+msgstr "formáid ionchais: %%(is-base:<committish>)"
+
+#: ref-filter.c
+#, c-format
+msgid "malformed field name: %.*s"
+msgstr "ainm réimse mífhoirmithe: %.*s"
+
+#: ref-filter.c
+#, c-format
+msgid "unknown field name: %.*s"
+msgstr "ainm réimse anaithnid: %.*s"
+
+#: ref-filter.c
+#, c-format
+msgid ""
+"not a git repository, but the field '%.*s' requires access to object data"
+msgstr ""
+"ní stórlann git é, ach éilíonn an réimse '%.*s' rochtain ar shonraí réada"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(%s) atom used without a %%(%s) atom"
+msgstr "formáid: %%(%s) adaim a úsáidtear gan adaim %%(%s)"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(then) atom used more than once"
+msgstr "formáid: %%(then) adaim a úsáidtear níos mó ná uair amháin"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(then) atom used after %%(else)"
+msgstr "formáid: %%(then) adaim a úsáidtear tar éis %%(else)"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(else) atom used more than once"
+msgstr "formáid: %%(else) adaim a úsáidtear níos mó ná uair amháin"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(end) atom used without corresponding atom"
+msgstr "formáid: %%(end) adaim a úsáidtear gan adaim chomhfhreagrach"
+
+#: ref-filter.c
+#, c-format
+msgid "malformed format string %s"
+msgstr "teaghrán formáid mhífhoirmithe %s"
+
+#: ref-filter.c
+#, c-format
+msgid "this command reject atom %%(%.*s)"
+msgstr "diúltú an t-ordú seo adamh %%(%.*s)"
+
+#: ref-filter.c
+#, c-format
+msgid "--format=%.*s cannot be used with --python, --shell, --tcl"
+msgstr "--format=%.*s ní féidir é a úsáid le --python, --shell, --tcl"
+
+#: ref-filter.c
+msgid "failed to run 'describe'"
+msgstr "theip ar 'cur síos' a rith"
+
+#: ref-filter.c
+#, c-format
+msgid "(no branch, rebasing %s)"
+msgstr "(gan aon bhrainse, athbhunú %s)"
+
+#: ref-filter.c
+#, c-format
+msgid "(no branch, rebasing detached HEAD %s)"
+msgstr "(gan aon bhrainse, athbhunú CEAD scoite %s)"
+
+#: ref-filter.c
+#, c-format
+msgid "(no branch, bisect started on %s)"
+msgstr "(gan aon bhrainse, thosaigh bisect ar %s)"
+
+#: ref-filter.c
+#, c-format
+msgid "(HEAD detached at %s)"
+msgstr "(HEAD scoite ag %s)"
+
+#: ref-filter.c
+#, c-format
+msgid "(HEAD detached from %s)"
+msgstr "(CEAD scoite ó %s)"
+
+#: ref-filter.c
+msgid "(no branch)"
+msgstr "(gan aon bhrainse)"
+
+#: ref-filter.c
+#, c-format
+msgid "missing object %s for %s"
+msgstr "réad atá ar iarraidh %s do %s"
+
+#: ref-filter.c
+#, c-format
+msgid "parse_object_buffer failed on %s for %s"
+msgstr "theip ar parse_object_buffer ar %s do %s"
+
+#: ref-filter.c
+#, c-format
+msgid "malformed object at '%s'"
+msgstr "réad mífhoirmithe ag '%s'"
+
+#: ref-filter.c
+#, c-format
+msgid "ignoring ref with broken name %s"
+msgstr "neamhaird a dhéanamh ar tagairt le ainm briste %s"
+
+#: ref-filter.c refs.c
+#, c-format
+msgid "ignoring broken ref %s"
+msgstr "ag déanamh neamhaird ar thagairt briste %s"
+
+#: ref-filter.c
+#, c-format
+msgid "format: %%(end) atom missing"
+msgstr "formáid :%%(end) ataim ar iarraidh"
+
+#: ref-filter.c
+#, c-format
+msgid "malformed object name %s"
+msgstr "ainm réad mífhoirmithe %s"
+
+#: ref-filter.c
+#, c-format
+msgid "option `%s' must point to a commit"
+msgstr "caithfidh rogha `%s' a chur in iúl do thiomantas"
+
+#: ref-filter.h
+msgid "key"
+msgstr "eochair"
+
+#: ref-filter.h
+msgid "field name to sort on"
+msgstr "ainm réimse le sórtáil"
+
+#: ref-filter.h
+msgid "exclude refs which match pattern"
+msgstr "a eisiamh iarmhairtí a mheaitseálann patrún"
+
+#: reflog.c
+#, c-format
+msgid "not a reflog: %s"
+msgstr "ní athbhreithniú: %s"
+
+#: reflog.c
+#, c-format
+msgid "no reflog for '%s'"
+msgstr "gan aon athbhreithniú do '%s'"
+
+#: refs.c
+#, c-format
+msgid "%s does not point to a valid object!"
+msgstr "Ní thugann %s in iúl go réad bailí!"
+
+#: refs.c
+#, c-format
+msgid ""
+"Using '%s' as the name for the initial branch. This default branch name\n"
+"is subject to change. To configure the initial branch name to use in all\n"
+"of your new repositories, which will suppress this warning, call:\n"
+"\n"
+"\tgit config --global init.defaultBranch <name>\n"
+"\n"
+"Names commonly chosen instead of 'master' are 'main', 'trunk' and\n"
+"'development'. The just-created branch can be renamed via this command:\n"
+"\n"
+"\tgit branch -m <name>\n"
+msgstr ""
+"Ag baint úsáide as '%s' mar ainm don bhrainse tosaigh. An ainm brainse "
+"réamhshocraithe\n"
+"tá sé faoi réir athraithe. Chun an t-ainm brainse tosaigh a chumrú le húsáid "
+"i ngach\n"
+"de do stór nua, a chuirfidh an rabhadh seo a chur faoi chois, glaoigh ar:\n"
+"\n"
+"\tgit config --global init.defaultBranch <name>\n"
+"\n"
+"Is iad na hainmneacha a roghnaítear go coitianta in ionad 'máistir' príomh "
+"',' stoc 'agus\n"
+"'forbair'. Is féidir an brainse atá díreach cruthaithe a athainmniú tríd an "
+"ordú seo:\n"
+"\n"
+"\tgit branch -m <name>\n"
+
+#: refs.c
+#, c-format
+msgid "could not retrieve `%s`"
+msgstr "ní fhéadfaí `%s` a aisghabháil"
+
+#: refs.c
+#, c-format
+msgid "invalid branch name: %s = %s"
+msgstr "ainm brainse neamhbhailí: %s = %s"
+
+#: refs.c
+#, c-format
+msgid "ignoring dangling symref %s"
+msgstr "ag déanamh neamhaird ar shiomtref crochta %s"
+
+#: refs.c
+#, c-format
+msgid "log for ref %s has gap after %s"
+msgstr "tá bearna ag logáil le haghaidh tagairt %s tar éis %s"
+
+#: refs.c
+#, c-format
+msgid "log for ref %s unexpectedly ended on %s"
+msgstr "chríochnaigh logáil le haghaidh tagairt %s gan choinne ar %s"
+
+#: refs.c
+#, c-format
+msgid "log for %s is empty"
+msgstr "tá logáil le haghaidh %s folamh"
+
+#: refs.c
+#, c-format
+msgid "refusing to update reflog for pseudoref '%s'"
+msgstr "diúltú reflog a nuashonrú do pseudoref '%s'"
+
+#: refs.c
+#, c-format
+msgid "refusing to update pseudoref '%s'"
+msgstr "diúltú pseudoref '%s' a nuashonrú"
+
+#: refs.c
+#, c-format
+msgid "refusing to update reflog with bad name '%s'"
+msgstr "diúltú reflog a nuashonrú le droch-ainm '%s'"
+
+#: refs.c
+#, c-format
+msgid "refusing to update ref with bad name '%s'"
+msgstr "diúltú tagairt a nuashonrú le droch-ainm '%s'"
+
+#: refs.c
+msgid "refusing to force and skip creation of reflog"
+msgstr "diúltú cruthú reflog a chur i bhfeidhm agus a scipeáil"
+
+#: refs.c
+#, c-format
+msgid "update_ref failed for ref '%s': %s"
+msgstr "theip ar update_ref le haghaidh tagairt '%s': %s"
+
+#: refs.c
+#, c-format
+msgid "multiple updates for ref '%s' not allowed"
+msgstr "ní cheadaítear nuashonruithe iolracha le haghaidh tagairt '%s'"
+
+#: refs.c
+msgid "ref updates forbidden inside quarantine environment"
+msgstr "nuashonruithe ref toirmiscthe laistigh de"
+
+#: refs.c
+msgid "ref updates aborted by hook"
+msgstr "nuashonruithe tagartha a chuirtear deireadh leis"
+
+#: refs.c
+#, c-format
+msgid "'%s' exists; cannot create '%s'"
+msgstr "Tá '%s' ann; ní féidir '%s' a chruthú"
+
+#: refs.c
+#, c-format
+msgid "cannot process '%s' and '%s' at the same time"
+msgstr "ní féidir '%s' agus '%s' a phróiseáil ag an am céanna"
+
+#: refs.c
+#, c-format
+msgid "could not delete reference %s: %s"
+msgstr "ní fhéadfaí tagairt %s a scriosadh: %s"
+
+#: refs.c
+#, c-format
+msgid "could not delete references: %s"
+msgstr "ní fhéadfaí tagairtí a scriosadh: %s"
+
+#: refs.c
+#, c-format
+msgid "Finished dry-run migration of refs, the result can be found at '%s'\n"
+msgstr ""
+"Imirce tirim críochnaithe na n-iarmhairc, is féidir an toradh a fháil ag "
+"'%s'\n"
+
+#: refs.c
+#, c-format
+msgid "could not remove temporary migration directory '%s'"
+msgstr "ní fhéadfaí eolaire imirce sealadach '%s' a bhaint"
+
+#: refs.c
+#, c-format
+msgid "migrated refs can be found at '%s'"
+msgstr "is féidir airgeanna imirceacha a fháil ag '%s'"
+
+#: refs/files-backend.c refs/reftable-backend.c
+#, c-format
+msgid ""
+"cannot lock ref '%s': expected symref with target '%s': but is a regular ref"
+msgstr ""
+"ní féidir tagairt '%s' a ghlasáil: ag súil le symref le sprioc '%s': ach is "
+"tagairt rialta é"
+
+#: refs/files-backend.c
+#, c-format
+msgid "cannot read ref file '%s'"
+msgstr "ní féidir comhad tagartha '%s' a léamh"
+
+#: refs/files-backend.c
+#, c-format
+msgid "cannot open directory %s"
+msgstr "ní féidir eolaire %s a oscailt"
+
+#: refs/files-backend.c
+msgid "Checking references consistency"
+msgstr "Comhsheasmhacht tagairtí"
+
+#: refs/packed-backend.c
+#, c-format
+msgid "unable to open '%s'"
+msgstr "ní féidir '%s' a oscailt"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "refname is dangerous: %s"
+msgstr "tá refname contúirteach: %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "trying to write ref '%s' with nonexistent object %s"
+msgstr "ag iarraidh tagairt '%s' a scríobh le réad nach bhfuil %s ann"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "trying to write non-commit object %s to branch '%s'"
+msgstr "ag iarraidh réad neamh-thiomanta %s a scríobh chuig brainse '%s'"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid ""
+"multiple updates for 'HEAD' (including one via its referent '%s') are not "
+"allowed"
+msgstr ""
+"ní cheadaítear nuashonruithe iolracha do 'HEAD' (lena n-áirítear ceann tríd "
+"an tagairt '%s')"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "cannot lock ref '%s': unable to resolve reference '%s'"
+msgstr "ní féidir tagairt '%s' a ghlasáil: ní féidir tagairt '%s' a réiteach"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "cannot lock ref '%s': error reading reference"
+msgstr "ní féidir tagairt '%s' a ghlasáil: earráid ag léamh tagairt"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid ""
+"multiple updates for '%s' (including one via symref '%s') are not allowed"
+msgstr ""
+"ní cheadaítear nuashonruithe iolracha do '%s' (lena n-áirítear ceann trí "
+"symref '%s')"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "cannot lock ref '%s': reference already exists"
+msgstr "ní féidir tagairt '%s' a ghlasáil: tá tagairt ann cheana féin"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "cannot lock ref '%s': reference is missing but expected %s"
+msgstr ""
+"ní féidir tagairt '%s' a ghlasáil: tá tagairt ar iarraidh ach táthar ag súil "
+"leis %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "cannot lock ref '%s': is at %s but expected %s"
+msgstr ""
+"ní féidir tagairt '%s' a ghlasáil: tá sé ag %s ach táthar ag súil leis %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "reftable: transaction prepare: %s"
+msgstr "athfhabhtaithe: ullmhú idirbheart: %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "reftable: transaction failure: %s"
+msgstr "athfhabhtaithe: teip ar idirbheart: %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "unable to compact stack: %s"
+msgstr "nach féidir cruach a dhlúthú: %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "refname %s not found"
+msgstr "ní aimsíodh refname %s"
+
+#: refs/reftable-backend.c
+#, c-format
+msgid "refname %s is a symbolic ref, copying it is not supported"
+msgstr "rs tagairt siombalach é refname %s, ní thacaítear leis a chóipeáil"
+
+#: refspec.c
+#, c-format
+msgid "pattern '%s' has no '*'"
+msgstr "níl aon '*' ag patrún '%s'"
+
+#: refspec.c
+#, c-format
+msgid "replacement '%s' has no '*'"
+msgstr "níl aon '*' ag athsholáthar '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "invalid quoting in push-option value: '%s'"
+msgstr "luachan neamhbhailí i luach brú rogha: '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "unknown value for object-format: %s"
+msgstr "luach anaithnid d'fhormáid réad: %s"
+
+#: remote-curl.c
+#, c-format
+msgid "%sinfo/refs not valid: is this a git repository?"
+msgstr "Níl %sinfo/refs bailí: an stór git é seo?"
+
+#: remote-curl.c
+msgid "invalid server response; expected service, got flush packet"
+msgstr "freagra freastalaí neamhbhailí; seirbhís a bhíothas ag súil"
+
+#: remote-curl.c
+#, c-format
+msgid "invalid server response; got '%s'"
+msgstr "freagra freastalaí neamhbhailí; fuair '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "repository '%s' not found"
+msgstr "níor aimsíodh stór '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "Authentication failed for '%s'"
+msgstr "Theip ar fhíordheimhniú do '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "unable to access '%s' with http.pinnedPubkey configuration: %s"
+msgstr "ní féidir rochtain a fháil ar '%s' le cumraíocht http.pinnedPubkey: %s"
+
+#: remote-curl.c
+#, c-format
+msgid "unable to access '%s': %s"
+msgstr "ní féidir teacht ar '%s': %s"
+
+#: remote-curl.c
+#, c-format
+msgid "redirecting to %s"
+msgstr "atreorú chuig %s"
+
+#: remote-curl.c
+msgid "shouldn't have EOF when not gentle on EOF"
+msgstr "níor chóir go mbeadh EOF ann nuair nach bhfuil sé miline ar EOF"
+
+#: remote-curl.c
+msgid "remote server sent unexpected response end packet"
+msgstr "sheol freastalaí iargúlta paicéad deiridh"
+
+#: remote-curl.c
+msgid "unable to rewind rpc post data - try increasing http.postBuffer"
+msgstr ""
+"nach féidir sonraí post rpc a athfhillt - déan iarracht http.postBuffer a "
+"mhéadú"
+
+#: remote-curl.c
+#, c-format
+msgid "remote-curl: bad line length character: %.4s"
+msgstr "iargúlta: carachtar fad droch-líne: %.4s"
+
+#: remote-curl.c
+msgid "remote-curl: unexpected response end packet"
+msgstr "iargúlta: paicéad deiridh freagartha gan choinne"
+
+#: remote-curl.c
+#, c-format
+msgid "RPC failed; %s"
+msgstr "Theip ar RPC; %s"
+
+#: remote-curl.c
+msgid "cannot handle pushes this big"
+msgstr "ní féidir brú mór seo a láimhseáil"
+
+#: remote-curl.c
+#, c-format
+msgid "cannot deflate request; zlib deflate error %d"
+msgstr "ní féidir iarratas a dhíscaoileadh; earráid dífhabhtaithe zlib %d"
+
+#: remote-curl.c
+#, c-format
+msgid "cannot deflate request; zlib end error %d"
+msgstr "ní féidir iarratas a dhíscaoileadh; earráid deiridh zlib %d"
+
+#: remote-curl.c
+#, c-format
+msgid "%d bytes of length header were received"
+msgstr "Fuarthas %d bytes de cheanntásc fad"
+
+#: remote-curl.c
+#, c-format
+msgid "%d bytes of body are still expected"
+msgstr "Táthar ag súil fós ag súil le %d bytes den chorp"
+
+#: remote-curl.c
+msgid "dumb http transport does not support shallow capabilities"
+msgstr "ní thacaíonn iompar HTTP dumb le cumais éadomhain"
+
+#: remote-curl.c
+msgid "fetch failed."
+msgstr "theip ar fáil."
+
+#: remote-curl.c
+msgid "cannot fetch by sha1 over smart http"
+msgstr "ní féidir le sha1 a fháil thar http cliste"
+
+#: remote-curl.c
+#, c-format
+msgid "protocol error: expected sha/ref, got '%s'"
+msgstr "earráid prótacal: súil le sha/ref, fuair '%s'"
+
+#: remote-curl.c
+#, c-format
+msgid "http transport does not support %s"
+msgstr "ní thacaíonn iompar http le %s"
+
+#: remote-curl.c
+msgid "protocol error: expected '<url> <path>', missing space"
+msgstr "earráid prótacal: súil leis '<url><path>', spás in easnamh"
+
+#: remote-curl.c
+#, c-format
+msgid "failed to download file at URL '%s'"
+msgstr "theip ar an comhad a íoslódáil ag URL '%s'"
+
+#: remote-curl.c
+msgid "git-http-push failed"
+msgstr "theip ar git-http-push"
+
+#: remote-curl.c
+msgid "remote-curl: usage: git remote-curl <remote> [<url>]"
+msgstr "<remote><url>remote-curl: úsáid: git remote-curl []"
+
+#: remote-curl.c
+msgid "remote-curl: error reading command stream from git"
+msgstr "remote-curl: earráid ag léamh sruth ordaithe ó git"
+
+#: remote-curl.c
+msgid "remote-curl: fetch attempted without a local repo"
+msgstr "remote-curl: iarracht a fháil gan repo áitiúil"
+
+#: remote-curl.c
+#, c-format
+msgid "remote-curl: unknown command '%s' from git"
+msgstr "remote-curl: ordú anaithnid '%s' ó git"
+
+#: remote.c
+#, c-format
+msgid ""
+"reading remote from \"%s/%s\", which is nominated for removal.\n"
+"\n"
+"If you still use the \"remotes/\" directory it is recommended to\n"
+"migrate to config-based remotes:\n"
+"\n"
+"\tgit remote rename %s %s\n"
+"\n"
+"If you cannot, please let us know why you still need to use it by\n"
+"sending an e-mail to <git@vger.kernel.org>."
+msgstr ""
+"léamh iargúlta ó \"%s/%s\", atá ainmnithe lena bhaint.\n"
+"\n"
+"Má úsáideann tú an eolaire “iargúlta/” fós moltar\n"
+"aistriú chuig iargúlta bunaithe ar chumraíocht:\n"
+"\n"
+" git iargúlta a athainmniú %s %s\n"
+"\n"
+"Mura féidir leat, cuir in iúl dúinn le do thoil cén fáth a gcaithfidh tú\n"
+"é a úsáid fós trí ríomhphost a sheoladh chuig <git@vger.kernel.org>."
+
+#: remote.c
+#, c-format
+msgid "config remote shorthand cannot begin with '/': %s"
+msgstr "ní féidir le '/' tosú le gearrthánach iargúlta config: %s"
+
+#: remote.c
+msgid "more than one receivepack given, using the first"
+msgstr ""
+"níos mó ná pacáiste glacadóra amháin a thugtar, ag baint úsáide as an gcéad"
+
+#: remote.c
+msgid "more than one uploadpack given, using the first"
+msgstr ""
+"níos mó ná pacáiste uaslódála amháin tugtha, ag baint úsáide as an gcéad"
+
+#: remote.c
+#, c-format
+msgid "unrecognized followRemoteHEAD value '%s' ignored"
+msgstr "neamhaird a dhéanamh ar luach FollowRemoteHead '%s' gan aithint"
+
+#: remote.c
+#, c-format
+msgid "unrecognized value transfer.credentialsInUrl: '%s'"
+msgstr "aistriú luacha transfer.credentialsInUrl: '%s'"
+
+#: remote.c
+#, c-format
+msgid "URL '%s' uses plaintext credentials"
+msgstr "Úsáideann URL '%s' dhintiúir téacs simplí"
+
+#: remote.c
+#, c-format
+msgid "Cannot fetch both %s and %s to %s"
+msgstr "Ní féidir %s agus %s a fháil chuig %s"
+
+#: remote.c
+#, c-format
+msgid "%s usually tracks %s, not %s"
+msgstr "Is gnách go rianann %s %s, ní %s"
+
+#: remote.c
+#, c-format
+msgid "%s tracks both %s and %s"
+msgstr "Rianann %s %s agus %s araon"
+
+#: remote.c
+#, c-format
+msgid "src refspec %s does not match any"
+msgstr "src refspec %s ní mheaitseálann aon"
+
+#: remote.c
+#, c-format
+msgid "src refspec %s matches more than one"
+msgstr "meaitseálann src refspec %s níos mó ná ceann amháin"
+
+#. TRANSLATORS: "matches '%s'%" is the <dst> part of "git push
+#. <remote> <src>:<dst>" push, and "being pushed ('%s')" is
+#. the <src>.
+#.
+#: remote.c
+#, c-format
+msgid ""
+"The destination you provided is not a full refname (i.e.,\n"
+"starting with \"refs/\"). We tried to guess what you meant by:\n"
+"\n"
+"- Looking for a ref that matches '%s' on the remote side.\n"
+"- Checking if the <src> being pushed ('%s')\n"
+" is a ref in \"refs/{heads,tags}/\". If so we add a corresponding\n"
+" refs/{heads,tags}/ prefix on the remote side.\n"
+"\n"
+"Neither worked, so we gave up. You must fully qualify the ref."
+msgstr ""
+"Ní ainm athainmnithe iomlán é an ceann scríbe a sholáthair tú (i.e., \n"
+"ag tosú le \"refs/\"). Rinneamar iarracht buille faoi thuairim a thabhairt "
+"faoi cad a bhí i gceist agat le:\n"
+"\n"
+"- Ag lorg tagartha a mheaitseálann '%s' ar an taobh iargúlta.\n"
+"- Ag seiceáil an bhfuil an <src> atá á bhrú ('%s') ina thagairt \n"
+" i \"refs/{heads,tags}/\". Más ea, cuirimid réimír comhfhreagrach r\n"
+" efs/{heads,tags}/ leis ar an taobh iargúlta.\n"
+"\n"
+"Níor oibrigh ceachtar acu, mar sin thugamar suas. Caithfidh tú an tagairt a "
+"cháiliú go hiomlán."
+
+#: remote.c
+#, c-format
+msgid ""
+"The <src> part of the refspec is a commit object.\n"
+"Did you mean to create a new branch by pushing to\n"
+"'%s:refs/heads/%s'?"
+msgstr ""
+"Is <src>réad tiomanta í an chuid den refspec.\n"
+"An raibh i gceist agat brainse nua a chruthú trí bhrú chuig\n"
+"'%s:refs/heads/%s'?"
+
+#: remote.c
+#, c-format
+msgid ""
+"The <src> part of the refspec is a tag object.\n"
+"Did you mean to create a new tag by pushing to\n"
+"'%s:refs/tags/%s'?"
+msgstr ""
+"Is <src>réad clibeanna é an chuid den refspec.\n"
+"An raibh i gceist agat clib nua a chruthú trí bhrú chuig\n"
+"'%s:refs/tags/%s'?"
+
+#: remote.c
+#, c-format
+msgid ""
+"The <src> part of the refspec is a tree object.\n"
+"Did you mean to tag a new tree by pushing to\n"
+"'%s:refs/tags/%s'?"
+msgstr ""
+"Is <src>réad crann í an chuid den refspec.\n"
+"An raibh sé i gceist agat crann nua a chlibeáil trí bhrú chuig\n"
+"'%s:refs/tags/%s'?"
+
+#: remote.c
+#, c-format
+msgid ""
+"The <src> part of the refspec is a blob object.\n"
+"Did you mean to tag a new blob by pushing to\n"
+"'%s:refs/tags/%s'?"
+msgstr ""
+"Is <src>réad blob é an chuid den refspec.\n"
+"An raibh sé i gceist agat blob nua a chlibeáil trí bhrú chuig\n"
+"'%s:refs/tags/%s'?"
+
+#: remote.c
+#, c-format
+msgid "%s cannot be resolved to branch"
+msgstr "Ní féidir %s a réiteach chuig an mbrainse"
+
+#: remote.c
+#, c-format
+msgid "unable to delete '%s': remote ref does not exist"
+msgstr "ní féidir '%s' a scriosadh: níl tagairt iargúlta ann"
+
+#: remote.c
+#, c-format
+msgid "dst refspec %s matches more than one"
+msgstr "meaitseálann dst refspec %s níos mó ná ceann amháin"
+
+#: remote.c
+#, c-format
+msgid "dst ref %s receives from more than one src"
+msgstr "faigheann dst ref %s ó níos mó ná src amháin"
+
+#: remote.c
+msgid "HEAD does not point to a branch"
+msgstr "Ní chuireann HEAD in iúl do bhrainse"
+
+#: remote.c
+#, c-format
+msgid "no such branch: '%s'"
+msgstr "aon bhrainse den sórt sin: '%s'"
+
+#: remote.c
+#, c-format
+msgid "no upstream configured for branch '%s'"
+msgstr "níl aon chumrú suas srutha le haghaidh brainse '%s'"
+
+#: remote.c
+#, c-format
+msgid "upstream branch '%s' not stored as a remote-tracking branch"
+msgstr "brainse suas srutha '%s' nach stóráiltear mar bhrainse cianrianaithe"
+
+#: remote.c
+#, c-format
+msgid "push destination '%s' on remote '%s' has no local tracking branch"
+msgstr ""
+"níl aon bhrainse rianaithe áitiúil ag ceann scríbe brúite '%s' ar iargúlta "
+"'%s'"
+
+#: remote.c
+#, c-format
+msgid "branch '%s' has no remote for pushing"
+msgstr "níl aon iargúlta ag brainse '%s' chun brú"
+
+#: remote.c
+#, c-format
+msgid "push refspecs for '%s' do not include '%s'"
+msgstr "ní chuimsíonn '%s' brú refspections do '%s'"
+
+#: remote.c
+msgid "push has no destination (push.default is 'nothing')"
+msgstr "níl aon cheann scríbe ag brú (is é 'rud ar bith' push.default)"
+
+#: remote.c
+msgid "cannot resolve 'simple' push to a single destination"
+msgstr "ní féidir brú 'simplí' a réiteach chuig ceann scríbe amháin"
+
+#: remote.c
+#, c-format
+msgid "couldn't find remote ref %s"
+msgstr "ní raibh in ann tagairt iargúlta %s a fháil"
+
+#: remote.c
+#, c-format
+msgid "* Ignoring funny ref '%s' locally"
+msgstr "* Ag neamhaird den tagairt ghreannmhar '%s' go háitiúil"
+
+#: remote.c
+#, c-format
+msgid "Your branch is based on '%s', but the upstream is gone.\n"
+msgstr "Tá do bhrainse bunaithe ar '%s', ach tá an suas sruth imithe.\n"
+
+#: remote.c
+msgid " (use \"git branch --unset-upstream\" to fixup)\n"
+msgstr " (bain úsáid as \"git branch --unset-upstream\" chun é a dheisiú)\n"
+
+#: remote.c
+#, c-format
+msgid "Your branch is up to date with '%s'.\n"
+msgstr "Tá do bhrainse cothrom le dáta le '%s'.\n"
+
+#: remote.c
+#, c-format
+msgid "Your branch and '%s' refer to different commits.\n"
+msgstr "Tagraíonn do bhrainse agus '%s' do thiomnuithe difriúla.\n"
+
+#: remote.c
+#, c-format
+msgid " (use \"%s\" for details)\n"
+msgstr " (bain úsáid as \"%s\" le haghaidh sonraí)\n"
+
+#: remote.c
+#, 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] "Tá do bhrainse chun tosaigh ar '%s' le tiomantas %d.\n"
+msgstr[1] "Tá do bhrainse chun tosaigh ar '%s' le tiomantais %d.\n"
+msgstr[2] "Tá do bhrainse chun tosaigh ar '%s' le tiomantais %d.\n"
+
+#: remote.c
+msgid " (use \"git push\" to publish your local commits)\n"
+msgstr " (bain úsáid as “git push” chun do thiomanta áitiúla a fhoilsiú)\n"
+
+#: remote.c
+#, c-format
+msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
+msgid_plural ""
+"Your branch is behind '%s' by %d commits, and can be fast-forwarded.\n"
+msgstr[0] ""
+"Tá do bhrainse taobh thiar de '%s' faoi %d tiomantas, agus is féidir é a "
+"luasghéarú ar aghaidh.\n"
+msgstr[1] ""
+"Tá do bhrainse taobh thiar de '%s' faoi %d tiomnuithe, agus is féidir é a "
+"luasghéarú ar aghaidh.\n"
+msgstr[2] ""
+"Tá do bhrainse taobh thiar de '%s' faoi %d tiomnuithe, agus is féidir é a "
+"luasghéarú ar aghaidh.\n"
+
+#: remote.c
+msgid " (use \"git pull\" to update your local branch)\n"
+msgstr " (bain úsáid as “git pull” chun do bhrainse áitiúil a nuashonrú)\n"
+
+#: remote.c
+#, c-format
+msgid ""
+"Your branch and '%s' have diverged,\n"
+"and have %d and %d different commit each, respectively.\n"
+msgid_plural ""
+"Your branch and '%s' have diverged,\n"
+"and have %d and %d different commits each, respectively.\n"
+msgstr[0] ""
+"Tá do bhrainse agus '%s' scartha óna chéile,\n"
+"agus tá %d agus %d tiomnú difriúil acu faoi seach.\n"
+msgstr[1] ""
+"Tá do bhrainse agus '%s' scartha óna chéile,\n"
+"agus tá %d agus %d tiomnuithe difriúla acu faoi seach.\n"
+msgstr[2] ""
+"Tá do bhrainse agus '%s' scartha óna chéile,\n"
+"agus tá %d agus %d tiomnuithe difriúla acu faoi seach.\n"
+
+#: remote.c
+msgid ""
+" (use \"git pull\" if you want to integrate the remote branch with yours)\n"
+msgstr ""
+" (bain úsáid as “git pull” más mian leat an brainse iargúlta a chomhtháthú "
+"le leatsa)\n"
+
+#: remote.c
+#, c-format
+msgid "cannot parse expected object name '%s'"
+msgstr "ní féidir ainm réad a bhfuil súil leis '%s' a pharsáil"
+
+#: remote.c
+#, c-format
+msgid "cannot strip one component off url '%s'"
+msgstr "ní féidir comhpháirt amháin a bhaint as url '%s'"
+
+#: replace-object.c
+#, c-format
+msgid "bad replace ref name: %s"
+msgstr "droch-ainm tagartha athsholáthair: %s"
+
+#: replace-object.c
+#, c-format
+msgid "duplicate replace ref: %s"
+msgstr "athsholáthar dúblach tagairt: %s"
+
+#: replace-object.c
+#, c-format
+msgid "replace depth too high for object %s"
+msgstr "doimhneacht ró-ard a chur in ionad do réad %s"
+
+#: rerere.c
+msgid "corrupt MERGE_RR"
+msgstr "truaillithe MERGE_RR"
+
+#: rerere.c
+msgid "unable to write rerere record"
+msgstr "in ann taifead a scríobh arís"
+
+#: rerere.c
+#, c-format
+msgid "there were errors while writing '%s' (%s)"
+msgstr "bhí earráidí ann agus tú ag scríobh '%s' (%s)"
+
+#: rerere.c
+#, c-format
+msgid "could not parse conflict hunks in '%s'"
+msgstr "ní fhéadfaí coimhlint a pharsáil i '%s'"
+
+#: rerere.c
+#, c-format
+msgid "failed utime() on '%s'"
+msgstr "theip ar utime () ar '%s'"
+
+#: rerere.c
+#, c-format
+msgid "writing '%s' failed"
+msgstr "theip ar scríobh '%s'"
+
+#: rerere.c
+#, c-format
+msgid "Staged '%s' using previous resolution."
+msgstr "'%s 'céim ag baint úsáide as réiteach roimhe seo."
+
+#: rerere.c
+#, c-format
+msgid "Recorded resolution for '%s'."
+msgstr "Réiteach taifeadta le haghaidh '%s'."
+
+#: rerere.c
+#, c-format
+msgid "Resolved '%s' using previous resolution."
+msgstr "Réitigh '%s' ag úsáid réiteach roimhe seo."
+
+#: rerere.c
+#, c-format
+msgid "cannot unlink stray '%s'"
+msgstr "ní féidir le '%s' a dhínascadh"
+
+#: rerere.c
+#, c-format
+msgid "Recorded preimage for '%s'"
+msgstr "Réamhíomhá taifeadta do '%s'"
+
+#: rerere.c
+#, c-format
+msgid "failed to update conflicted state in '%s'"
+msgstr "theip ar an stát coinbhleachta a nuashonrú i '%s'"
+
+#: rerere.c
+#, c-format
+msgid "no remembered resolution for '%s'"
+msgstr "níl aon réiteach cuimhne ar '%s'"
+
+#: rerere.c
+#, c-format
+msgid "Updated preimage for '%s'"
+msgstr "Réamhíomhá nuashonraithe do '%s'"
+
+#: rerere.c
+#, c-format
+msgid "Forgot resolution for '%s'\n"
+msgstr "Déan dearmad dearmad ar réiteach '%s'\n"
+
+#: rerere.c
+msgid "unable to open rr-cache directory"
+msgstr "in ann eolaire rr-cache a oscailt"
+
+#: rerere.h
+msgid "update the index with reused conflict resolution if possible"
+msgstr "an t-innéacs a nuashonrú le réiteach coinbhleachta a athúsáidtear"
+
+#: reset.c
+msgid "could not determine HEAD revision"
+msgstr "ní raibh sé in ann athbhreithniú HEAD"
+
+#: reset.c sequencer.c
+#, c-format
+msgid "failed to find tree of %s"
+msgstr "theip ar chrann %s a aimsiú"
+
+#: revision.c
+#, c-format
+msgid "unsupported section for hidden refs: %s"
+msgstr "rannán gan tacaíocht do thaifeanna i bhfolach: %s"
+
+#: revision.c
+msgid "--exclude-hidden= passed more than once"
+msgstr "--exclude-hidden= rith níos mó ná uair amháin"
+
+#: revision.c
+#, c-format
+msgid "resolve-undo records `%s` which is missing"
+msgstr "taifid réitigh a chealú `%s` atá ar iarraidh"
+
+#: revision.c
+#, c-format
+msgid "%s exists but is a symbolic ref"
+msgstr "Tá %s ann ach is tagairt siombalach é"
+
+#: revision.c
+msgid ""
+"--merge requires one of the pseudorefs MERGE_HEAD, CHERRY_PICK_HEAD, "
+"REVERT_HEAD or REBASE_HEAD"
+msgstr ""
+"Teastaíonn --merge ceann de na pseudorefs MERGE_HEAD, CHERRY_PICK_HEAD, "
+"REVERT_HEAD nó REBASE_HEAD"
+
+#: revision.c
+#, c-format
+msgid "could not get commit for --ancestry-path argument %s"
+msgstr "ní fhéadfaí tiomantas a fháil le haghaidh argóint --ancestry-path %s"
+
+#: revision.c
+msgid "--unpacked=<packfile> no longer supported"
+msgstr "--unpacked=<packfile> ní thacaítear leis a thuilleadh"
+
+#: revision.c
+#, c-format
+msgid "invalid option '%s' in --stdin mode"
+msgstr "rogha neamhbhailí '%s' i mód --stdin"
+
+#: revision.c
+msgid "your current branch appears to be broken"
+msgstr "is cosúil go bhfuil do bhrainse reatha briste"
+
+#: revision.c
+#, c-format
+msgid "your current branch '%s' does not have any commits yet"
+msgstr "níl aon gealltanais fós ag do bhrainse reatha '%s'"
+
+#: revision.c
+msgid "object filtering requires --objects"
+msgstr "teastaíonn scagadh réad --objects"
+
+#: revision.c
+msgid "-L does not yet support diff formats besides -p and -s"
+msgstr "Ní thacaíonn -L le formáidí diff fós seachas -p agus -s"
+
+#: run-command.c
+#, c-format
+msgid "cannot create async thread: %s"
+msgstr "ní féidir snáithe async a chruthú: %s"
+
+#: scalar.c worktree.c
+#, c-format
+msgid "'%s' does not exist"
+msgstr "Níl '%s' ann"
+
+#: scalar.c
+#, c-format
+msgid "could not switch to '%s'"
+msgstr "ní fhéadfaí aistriú go '%s'"
+
+#: scalar.c
+msgid "need a working directory"
+msgstr "teastaíonn eolaire oibre"
+
+#: scalar.c
+msgid "Scalar enlistments require a worktree"
+msgstr "Teastaíonn crann oibre ó liostú scalar"
+
+#: scalar.c
+#, c-format
+msgid "could not configure %s=%s"
+msgstr "ní fhéadfaí %s=%s a chumrú"
+
+#: scalar.c
+msgid "could not configure log.excludeDecoration"
+msgstr "ní fhéadfaí log.excludeDecoration a chumrú"
+
+#: scalar.c
+msgid "could not add enlistment"
+msgstr "ní fhéadfaí liostú a chur leis"
+
+#: scalar.c
+msgid "could not set recommended config"
+msgstr "ní fhéadfaí cumraíocht mholta a shocrú"
+
+#: scalar.c
+msgid "could not toggle maintenance"
+msgstr "níorbh fhéidir cothabháil a athrú"
+
+#: scalar.c
+msgid "could not start the FSMonitor daemon"
+msgstr "ní fhéadfaí an daemon FSMonitor a thosú"
+
+#: scalar.c
+msgid "could not turn off maintenance"
+msgstr "ní fhéadfadh cothabháil a mhúchadh"
+
+#: scalar.c
+msgid "could not remove enlistment"
+msgstr "ní fhéadfaí liostú a bhaint"
+
+#: scalar.c
+#, c-format
+msgid "remote HEAD is not a branch: '%.*s'"
+msgstr "ní brainse é iargúlta HEAD: '%.*s"
+
+#: scalar.c
+msgid "failed to get default branch name from remote; using local default"
+msgstr ""
+"theip ar ainm brainse réamhshocraithe a fháil ó iargúlta; ag baint úsáide as"
+
+#: scalar.c
+msgid "failed to get default branch name"
+msgstr "theip ort ainm brainse réamhshocraithe a fháil"
+
+#: scalar.c
+msgid "failed to unregister repository"
+msgstr "theip ar stór a dhíchlárú"
+
+#: scalar.c
+msgid "failed to stop the FSMonitor daemon"
+msgstr "theip ar an daemon FSMonitor a stopadh"
+
+#: scalar.c
+msgid "failed to delete enlistment directory"
+msgstr "theip ar eolaire liostála a scriosadh"
+
+#: scalar.c
+msgid "branch to checkout after clone"
+msgstr "brainse chun an tseiceáil tar éis clóin"
+
+#: scalar.c
+msgid "when cloning, create full working directory"
+msgstr "agus tú ag clónú, cruthaigh eolaire oibre iomlán"
+
+#: scalar.c
+msgid "only download metadata for the branch that will be checked out"
+msgstr "meiteashonraí a íoslódáil ach don bhrainse a sheiceálfar"
+
+#: scalar.c
+msgid "create repository within 'src' directory"
+msgstr "cruthaigh stór laistigh de eolaire 'src'"
+
+#: scalar.c
+msgid "specify if tags should be fetched during clone"
+msgstr "sonraigh an gcaithfear clibeanna a fháil le linn clóin"
+
+#: scalar.c
+msgid "specify if background maintenance should be enabled"
+msgstr "sonraigh an bhfuil cothabháil chúlra le cumasú"
+
+#: scalar.c
+msgid ""
+"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
+msgstr ""
+"clón scálach [--single-branch] [--branch <príomhbhrainse>] [--full-clone]\n"
+"[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<liostáil>]"
+
+#: scalar.c
+#, c-format
+msgid "cannot deduce worktree name from '%s'"
+msgstr "ní féidir ainm crann oibre a bhaint as '%s'"
+
+#: scalar.c
+#, c-format
+msgid "directory '%s' exists already"
+msgstr "tá eolaire '%s' ann cheana féin"
+
+#: scalar.c
+#, c-format
+msgid "failed to get default branch for '%s'"
+msgstr "theip ar bhrainse réamhshocraithe a fháil do '%s'"
+
+#: scalar.c
+#, c-format
+msgid "could not configure remote in '%s'"
+msgstr "ní fhéadfaí iargúlta a chumrú i '%s'"
+
+#: scalar.c
+#, c-format
+msgid "could not disable tags in '%s'"
+msgstr "ní fhéadfaí clibeanna a dhíchumasú i '%s'"
+
+#: scalar.c
+#, c-format
+msgid "could not configure '%s'"
+msgstr "ní fhéadfaí '%s' a chumrú"
+
+#: scalar.c
+msgid "partial clone failed; attempting full clone"
+msgstr "theip ar chlón páirteach; iarracht clón iomlán"
+
+#: scalar.c
+msgid "could not configure for full clone"
+msgstr "ní fhéadfaí a chumrú le haghaidh clón iomlán"
+
+#: scalar.c
+msgid "scalar diagnose [<enlistment>]"
+msgstr "<enlistment>diagnóis scalar []"
+
+#: scalar.c
+msgid "`scalar list` does not take arguments"
+msgstr "Ní ghlacann `liosta scalar` argóintí"
+
+#: scalar.c
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "clár scálach [--[gan-]chothabháil] [<liostáil>]"
+
+#: scalar.c
+msgid "reconfigure all registered enlistments"
+msgstr "gach liostáil cláraithe a athchumrú"
+
+#: scalar.c
+msgid "(enable|disable|keep)"
+msgstr "(cumasaigh|díchumasaigh|coinnigh)"
+
+#: scalar.c
+msgid "signal how to adjust background maintenance"
+msgstr "comhartha a thabhairt maidir le conas cothabháil chúlra a choigeartú"
+
+#: scalar.c
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+
+#: scalar.c
+msgid "--all or <enlistment>, but not both"
+msgstr "--all nó <enlistment>, ach ní an dá cheann"
+
+#: scalar.c
+#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "mód anaithnid don rogha --maintenance: %s"
+
+#: scalar.c
+#, c-format
+msgid "could not remove stale scalar.repo '%s'"
+msgstr "ní fhéadfaí scalar.repo '%s' a bhaint as scalar.repo"
+
+#: scalar.c
+#, c-format
+msgid "removed stale scalar.repo '%s'"
+msgstr "bainte scale scalar.repo '%s'"
+
+#: scalar.c
+#, c-format
+msgid "repository at '%s' has different owner"
+msgstr "tá úinéir difriúil ag an stórlann ag '%s'"
+
+#: scalar.c
+#, c-format
+msgid "repository at '%s' has a format issue"
+msgstr "tá ceist formáide ag stór ag '%s'"
+
+#: scalar.c
+#, c-format
+msgid "repository not found in '%s'"
+msgstr "ní bhfuarthas stór i '%s'"
+
+#: scalar.c
+#, c-format
+msgid ""
+"to unregister this repository from Scalar, run\n"
+"\tgit config --global --unset --fixed-value scalar.repo \"%s\""
+msgstr ""
+"chun an stór seo a dhíchlárú ó Scalar, reáchtáil\n"
+" git config --global --unset --fixed-value scalar.repo “%s”"
+
+#: scalar.c
+msgid ""
+"scalar run <task> [<enlistment>]\n"
+"Tasks:\n"
+msgstr ""
+"rith scalar <tasc> [<liostáil>]\n"
+"Tascanna:\n"
+
+#: scalar.c
+#, c-format
+msgid "no such task: '%s'"
+msgstr "gan aon tasc den sórt sin: '%s'"
+
+#: scalar.c
+msgid "scalar unregister [<enlistment>]"
+msgstr "<enlistment>scálar díchlárú []"
+
+#: scalar.c
+msgid "scalar delete <enlistment>"
+msgstr "scriosadh scalar <enlistment>"
+
+#: scalar.c
+msgid "refusing to delete current working directory"
+msgstr "diúltú eolaire oibre reatha a scriosadh"
+
+#: scalar.c
+msgid "include Git version"
+msgstr "leagan Git san áireamh"
+
+#: scalar.c
+msgid "include Git's build options"
+msgstr "áireamh roghanna tógála Git"
+
+#: scalar.c
+msgid "scalar verbose [-v | --verbose] [--build-options]"
+msgstr "scalar verbose [-v | --verbose] [--build-options]"
+
+#: scalar.c
+msgid "-C requires a <directory>"
+msgstr "Éilíonn -C a <directory>"
+
+#: scalar.c
+#, c-format
+msgid "could not change to '%s'"
+msgstr "ní fhéadfaí athrú go '%s'"
+
+#: scalar.c
+msgid "-c requires a <key>=<value> argument"
+msgstr "<value>Éilíonn -c a <key>= argóint"
+
+#: scalar.c
+msgid ""
+"scalar [-C <directory>] [-c <key>=<value>] <command> [<options>]\n"
+"\n"
+"Commands:\n"
+msgstr ""
+"scalar [-C <eolaire>] [-c <eochair>=<luach>] <ordú> [<roghanna>]\n"
+"\n"
+"Orduithe:\n"
+
+#: send-pack.c
+msgid "unexpected flush packet while reading remote unpack status"
+msgstr "paicéad srutháin gan choinne agus stádas díphacála iargúlta"
+
+#: send-pack.c
+#, c-format
+msgid "unable to parse remote unpack status: %s"
+msgstr "nach féidir stádas iargúlta díphacáil a pháirseáil: %s"
+
+#: send-pack.c
+#, c-format
+msgid "remote unpack failed: %s"
+msgstr "theip ar dhíphacáil iargúlta: %s"
+
+#: send-pack.c
+msgid "failed to sign the push certificate"
+msgstr "theip ar an deimhniú brú a shíniú"
+
+#: send-pack.c
+msgid "send-pack: unable to fork off fetch subprocess"
+msgstr "pacáiste seolta: ní féidir leis an bhfophróiseas faighte a fhorc"
+
+#: send-pack.c
+msgid "push negotiation failed; proceeding anyway with push"
+msgstr "theip ar chaibidlíocht brú; dul ar aghaidh ar aon nós"
+
+#: send-pack.c
+msgid "the receiving end does not support this repository's hash algorithm"
+msgstr "ní thacaíonn an deireadh glacadh le halgartam hash an stór seo"
+
+#: send-pack.c
+msgid "the receiving end does not support --signed push"
+msgstr "ní thacaíonn an deireadh glacadh le brú --signed"
+
+#: send-pack.c
+msgid ""
+"not sending a push certificate since the receiving end does not support --"
+"signed push"
+msgstr ""
+"níl teastas brú á sheoladh ós rud é nach dtacaíonn an taobh glactha le --"
+"signed brúigh"
+
+#: send-pack.c
+msgid "the receiving end does not support --atomic push"
+msgstr "ní thacaíonn an deireadh glacadh le brú --atomic"
+
+#: send-pack.c
+msgid "the receiving end does not support push options"
+msgstr "ní thacaíonn an deireadh glacadh le roghanna brú"
+
+#: sequencer.c
+#, c-format
+msgid "invalid commit message cleanup mode '%s'"
+msgstr "modh glantacháin teachtaireachta tiomanta neamhbhailí '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "could not delete '%s'"
+msgstr "ní fhéadfaí '%s' a scriosadh"
+
+#: sequencer.c
+msgid "revert"
+msgstr "filleadh"
+
+#: sequencer.c
+msgid "cherry-pick"
+msgstr "pioc silíní"
+
+#: sequencer.c
+msgid "rebase"
+msgstr "athbhunú"
+
+#: sequencer.c
+#, c-format
+msgid "unknown action: %d"
+msgstr "gníomh anaithnid: %d"
+
+#: sequencer.c
+msgid ""
+"Resolve all conflicts manually, mark them as resolved with\n"
+"\"git add/rm <conflicted_files>\", then run \"git rebase --continue\".\n"
+"You can instead skip this commit: run \"git rebase --skip\".\n"
+"To abort and get back to the state before \"git rebase\", run \"git rebase --"
+"abort\"."
+msgstr ""
+"Réiteach na coinbhleachtaí go léir de láimh, marcáil iad mar réiteach\n"
+"“git add/rm <conflicted_files>“, ansin rith “git rebase --continue”.\n"
+"Ina áit sin is féidir leat an tiomantas seo a scipeáil: rith “git rebase --"
+"skip”.\n"
+"Chun abordú agus dul ar ais go dtí an stát roimh “git rebase”, reáchtáil "
+"“git rebase --abort”."
+
+#: sequencer.c
+msgid ""
+"after resolving the conflicts, mark the corrected paths\n"
+"with 'git add <paths>' or 'git rm <paths>'"
+msgstr ""
+"tar éis na coinbhleachtaí a réiteach, marcáil na cosáin cearta\n"
+"<paths>le 'git add <paths>'nó 'git rm'"
+
+#: sequencer.c
+msgid ""
+"After resolving the conflicts, mark them with\n"
+"\"git add/rm <pathspec>\", then run\n"
+"\"git cherry-pick --continue\".\n"
+"You can instead skip this commit with \"git cherry-pick --skip\".\n"
+"To abort and get back to the state before \"git cherry-pick\",\n"
+"run \"git cherry-pick --abort\"."
+msgstr ""
+"Tar éis na coinbhleachtaí a réiteach, marcáil iad le\n"
+"“git add/rm <pathspec>“, ansin rith\n"
+"\"git cherry-pick --continue\".\n"
+"Is féidir leat an tiomantas seo a scipeáil ina ionad sin le \"git cherry-"
+"pick --skip\n"
+"Chun abordú agus dul ar ais go dtí an stát roimh “git cherry-pick”,\n"
+"reáchtáil “git cherry-pick --abort”."
+
+#: sequencer.c
+msgid ""
+"After resolving the conflicts, mark them with\n"
+"\"git add/rm <pathspec>\", then run\n"
+"\"git revert --continue\".\n"
+"You can instead skip this commit with \"git revert --skip\".\n"
+"To abort and get back to the state before \"git revert\",\n"
+"run \"git revert --abort\"."
+msgstr ""
+"Tar éis na coinbhleachtaí a réiteach, marcáil iad le\n"
+"“git add/rm <pathspec>“, ansin rith\n"
+"“git ar ais --continue ar aghaidh”.\n"
+"Ina áit sin is féidir leat an tiomantas seo a scipeáil le “git revert --"
+"skip”.\n"
+"Chun deireadh a chur leis agus dul ar ais go dtí an stát roimh “git "
+"revert”,\n"
+"reáchtáil “git revert --abort”."
+
+#: sequencer.c
+#, c-format
+msgid "could not lock '%s'"
+msgstr "ní fhéadfaí '%s' a ghlasáil"
+
+#: sequencer.c
+#, c-format
+msgid "could not write eol to '%s'"
+msgstr "ní fhéadfaí eol a scríobh chuig '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "failed to finalize '%s'"
+msgstr "theip ar '%s' a chur i gcrích"
+
+#: sequencer.c
+#, c-format
+msgid "your local changes would be overwritten by %s."
+msgstr "d'athruithe áitiúla a fhorscríobhadh ag %s."
+
+#: sequencer.c
+msgid "commit your changes or stash them to proceed."
+msgstr "do chuid athruithe a dhéanamh nó iad a stóráil chun dul ar aghaidh."
+
+#. TRANSLATORS: %s will be "revert", "cherry-pick" or
+#. "rebase".
+#.
+#: sequencer.c
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr "%s: Ní féidir comhad innéacs nua a scríobh"
+
+#: sequencer.c
+msgid "unable to update cache tree"
+msgstr "in ann crann taisce a nuashonrú"
+
+#: sequencer.c
+msgid "could not resolve HEAD commit"
+msgstr "ní fhéadfaí tiomantas HEAD a réiteach"
+
+#: sequencer.c
+#, c-format
+msgid "no key present in '%.*s'"
+msgstr "níl aon eochair i láthair i '%.*s"
+
+#: sequencer.c
+#, c-format
+msgid "unable to dequote value of '%s'"
+msgstr "nach féidir luach '%s' a dhíchur"
+
+#: sequencer.c
+msgid "'GIT_AUTHOR_NAME' already given"
+msgstr "'GIT_AUTHOR_NAME' tugtha cheana féin"
+
+#: sequencer.c
+msgid "'GIT_AUTHOR_EMAIL' already given"
+msgstr "'GIT_AUTHOR_EMAIL' tugtha cheana féin"
+
+#: sequencer.c
+msgid "'GIT_AUTHOR_DATE' already given"
+msgstr "'GIT_AUTHOR_DATE' tugtha cheana féin"
+
+#: sequencer.c
+#, c-format
+msgid "unknown variable '%s'"
+msgstr "athróg anaithnid '%s'"
+
+#: sequencer.c
+msgid "missing 'GIT_AUTHOR_NAME'"
+msgstr "ar iarraidh 'GIT_AUTHOR_NAME'"
+
+#: sequencer.c
+msgid "missing 'GIT_AUTHOR_EMAIL'"
+msgstr "ar iarraidh 'GIT_AUTHOR_EMAIL'"
+
+#: sequencer.c
+msgid "missing 'GIT_AUTHOR_DATE'"
+msgstr "ar iarraidh 'GIT_AUTHOR_DATE'"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"you have staged changes in your working tree\n"
+"If these changes are meant to be squashed into the previous commit, run:\n"
+"\n"
+" git commit --amend %s\n"
+"\n"
+"If they are meant to go into a new commit, run:\n"
+"\n"
+" git commit %s\n"
+"\n"
+"In both cases, once you're done, continue with:\n"
+"\n"
+" git rebase --continue\n"
+msgstr ""
+"tá athruithe céime agat i do chrann oibre\n"
+"Má tá na hathruithe seo i gceist a chur isteach sa tiomantas roimhe seo, "
+"reáchtáil:\n"
+"\n"
+" git commit --amend %s\n"
+"\n"
+"Má tá siad i gceist dul i dtiomantas nua, reáchtáil:\n"
+"\n"
+" git commit %s\n"
+"\n"
+"Sa dá chás, nuair a bheidh tú déanta, lean ar aghaidh leis:\n"
+"\n"
+" git rebase --continue\n"
+
+#: sequencer.c
+msgid "'prepare-commit-msg' hook failed"
+msgstr "Theip ar chroí 'prepar-chommit-msg'"
+
+#: sequencer.c
+msgid ""
+"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"
+msgstr ""
+"Cumraíodh d'ainm agus do sheoladh ríomhphoist bunaithe go huath\n"
+"ar d'ainm úsáideora agus d'ainm óstach. Seiceáil le do thoil go bhfuil siad "
+"cruinn.\n"
+"Is féidir leat an teachtaireacht seo a chosc trí iad a shocrú go sainráite. "
+"Rith an\n"
+"ag leanúint an t-ordú agus lean na treoracha i d'eagarthóir chun a chur in "
+"eagar\n"
+"do chomhad cumraíochta:\n"
+"\n"
+" git config --global --edit\n"
+"\n"
+"Tar éis duit é seo a dhéanamh, féadfaidh tú an aitheantas a úsáidtear don "
+"tiomantas seo a shocrú le:\n"
+"\n"
+" git commit --amend --reset-author\n"
+
+#: sequencer.c
+msgid ""
+"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"
+"\n"
+" git config --global user.name \"Your Name\"\n"
+" git config --global user.email you@example.com\n"
+"\n"
+"After doing this, you may fix the identity used for this commit with:\n"
+"\n"
+" git commit --amend --reset-author\n"
+msgstr ""
+"Cumraíodh d'ainm agus do sheoladh ríomhphoist bunaithe go huath\n"
+"ar d'ainm úsáideora agus d'ainm óstach. Seiceáil le do thoil go bhfuil siad "
+"cruinn.\n"
+"Is féidir leat an teachtaireacht seo a chosc trí iad a shocrú go sainráite:\n"
+"\n"
+" git config --global user.name \"Your Name\"\n"
+" git config --global user.email you@example.com\n"
+"\n"
+"Tar éis duit é seo a dhéanamh, féadfaidh tú an aitheantas a úsáidtear don "
+"tiomantas seo a shocrú le:\n"
+"\n"
+" git commit --amend --reset-author\n"
+
+#: sequencer.c
+msgid "couldn't look up newly created commit"
+msgstr "ní fhéadfadh sé gealltanas nua-chruthaithe a fheiceáil"
+
+#: sequencer.c
+msgid "could not parse newly created commit"
+msgstr "ní fhéadfadh sé gealltanas nua-chruthaithe a pháirsí"
+
+#: sequencer.c
+msgid "unable to resolve HEAD after creating commit"
+msgstr "in ann HEAD a réiteach tar éis tiomantas a chruthú"
+
+#: sequencer.c
+msgid "detached HEAD"
+msgstr "scoite CEANN"
+
+#: sequencer.c
+msgid " (root-commit)"
+msgstr " (fréamh-thiomantas)"
+
+#: sequencer.c
+msgid "could not parse HEAD"
+msgstr "ní fhéadfaí HEAD a pháirseáil"
+
+#: sequencer.c
+#, c-format
+msgid "HEAD %s is not a commit!"
+msgstr "Ní gealltanas é HEAD %s!"
+
+#: sequencer.c
+msgid "unable to parse commit author"
+msgstr "ní féidir leis an údar tiomanta a pharsáil"
+
+#: sequencer.c
+#, c-format
+msgid "unable to read commit message from '%s'"
+msgstr "nach féidir teachtaireacht tiomanta ó '%s' a léamh"
+
+#: sequencer.c
+#, c-format
+msgid "invalid author identity '%s'"
+msgstr "aitheantas údair neamhbhailí '%s'"
+
+#: sequencer.c
+msgid "corrupt author: missing date information"
+msgstr "údar truaillithe: faisnéis dáta in easnamh"
+
+#: sequencer.c
+#, c-format
+msgid "could not update %s"
+msgstr "ní fhéadfaí %s a nuashonrú"
+
+#: sequencer.c
+#, c-format
+msgid "could not parse parent commit %s"
+msgstr "ní fhéadfaí tuismitheoir tiomantas %s a pharsáil"
+
+#: sequencer.c
+#, c-format
+msgid "unknown command: %d"
+msgstr "ordú anaithnid: %d"
+
+#: sequencer.c
+msgid "This is the 1st commit message:"
+msgstr "Seo an chéad teachtaireacht tiomanta:"
+
+#: sequencer.c
+#, c-format
+msgid "This is the commit message #%d:"
+msgstr "Seo an teachtaireacht tiomanta #%d:"
+
+#: sequencer.c
+msgid "The 1st commit message will be skipped:"
+msgstr "Scaipfear an chéad teachtaireacht tiomanta:"
+
+#: sequencer.c
+#, c-format
+msgid "The commit message #%d will be skipped:"
+msgstr "Scaipfear an teachtaireacht tiomanta #%d:"
+
+#: sequencer.c
+#, c-format
+msgid "This is a combination of %d commits."
+msgstr "Is meascán de ghealltanais %d é seo."
+
+#: sequencer.c
+#, c-format
+msgid "cannot write '%s'"
+msgstr "ní féidir '%s' a scríobh"
+
+#: sequencer.c
+msgid "need a HEAD to fixup"
+msgstr "teastaíonn CEAD ag teastáil chun socrú"
+
+#: sequencer.c
+msgid "could not read HEAD"
+msgstr "ní raibh in ann HEAD a léamh"
+
+#: sequencer.c
+msgid "could not read HEAD's commit message"
+msgstr "ní raibh sé in ann teachtaireacht tiomanta HEAD a léamh"
+
+#: sequencer.c
+#, c-format
+msgid "could not read commit message of %s"
+msgstr "ní raibh sé in ann teachtaireacht tiomanta %s a léamh"
+
+#: sequencer.c
+msgid "your index file is unmerged."
+msgstr "tá do chomhad innéacs neamh-chumasaithe."
+
+#: sequencer.c
+msgid "cannot fixup root commit"
+msgstr "ní féidir le déanamh fréimhe a shocrú"
+
+#: sequencer.c
+#, c-format
+msgid "commit %s is a merge but no -m option was given."
+msgstr "cumasc é tiomnú %s ach níor tugadh rogha -m."
+
+#: sequencer.c
+#, c-format
+msgid "commit %s does not have parent %d"
+msgstr "commiteáil %s níl tuismitheoir %d aige"
+
+#: sequencer.c
+#, c-format
+msgid "cannot get commit message for %s"
+msgstr "ní féidir teachtaireacht tiomanta a fháil do %s"
+
+#. TRANSLATORS: The first %s will be a "todo" command like
+#. "revert" or "pick", the second %s a SHA1.
+#: sequencer.c
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr "%s: ní féidir le tuismitheoir tiomantas %s a pharsáil"
+
+#: sequencer.c
+#, c-format
+msgid "could not revert %s... %s"
+msgstr "ní raibh ann %s a chur ar ais... %s"
+
+#: sequencer.c
+#, c-format
+msgid "could not apply %s... %s"
+msgstr "ní fhéadfaí %s a chur i bhfeidhm... %s"
+
+#: sequencer.c
+#, c-format
+msgid "dropping %s %s -- patch contents already upstream\n"
+msgstr "scaoileadh %s %s -- ábhar paiste suas an sruth cheana féin\n"
+
+#: sequencer.c
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr "git %s: theip ar an t-innéacs a léamh"
+
+#: sequencer.c
+#, c-format
+msgid "git %s: failed to refresh the index"
+msgstr "git %s: theip ar an t-innéacs a athnuachan"
+
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid label"
+msgstr "Ní lipéad bailí é '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "'%s' is not a valid refname"
+msgstr "Ní athainm bailí é '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "update-ref requires a fully qualified refname e.g. refs/heads/%s"
+msgstr "teastaíonn athainm iomlán cáilithe uasghabháilte e.g. refs/heads/%s"
+
+#: sequencer.c
+#, c-format
+msgid "'%s' does not accept merge commits"
+msgstr "Ní ghlacann '%s' le gealltanais cumaisc"
+
+#. TRANSLATORS: 'pick' and 'merge -C' should not be
+#. translated.
+#.
+#: sequencer.c
+msgid ""
+"'pick' does not take a merge commit. If you wanted to\n"
+"replay the merge, use 'merge -C' on the commit."
+msgstr ""
+"Ní ghlacann 'pick' tiomantas cumaisc. Dá mbeadh tú ag iarraidh\n"
+"athsheinn an cumaisc, bain úsáid as 'cumaisc -C' ar an tiomantas."
+
+#. TRANSLATORS: 'reword' and 'merge -c' should not be
+#. translated.
+#.
+#: sequencer.c
+msgid ""
+"'reword' does not take a merge commit. If you wanted to\n"
+"replay the merge and reword the commit message, use\n"
+"'merge -c' on the commit"
+msgstr ""
+"Ní ghlacann 'athfhoil' tiomantas cumaisc. Dá mbeadh tú ag iarraidh\n"
+"athsheinn an teachtaireacht thiomanta a chumasc agus athfhocal, bain úsáid "
+"as\n"
+"'cumaisc -c' ar an tiomantas"
+
+#. TRANSLATORS: 'edit', 'merge -C' and 'break' should
+#. not be translated.
+#.
+#: sequencer.c
+msgid ""
+"'edit' does not take a merge commit. If you wanted to\n"
+"replay the merge, use 'merge -C' on the commit, and then\n"
+"'break' to give the control back to you so that you can\n"
+"do 'git commit --amend && git rebase --continue'."
+msgstr ""
+"Ní ghlacann 'eagarthó' tiomantas cumaisc. Dá mbeadh tú ag iarraidh\n"
+"athsheinn an cumaisc, bain úsáid as 'cumaisc -C' ar an tiomantas, agus "
+"ansin\n"
+"'brise' chun an rialú a thabhairt ar ais duit ionas gur féidir leat\n"
+"déan 'git commit --amend && git rebase --continue'."
+
+#: sequencer.c
+msgid "cannot squash merge commit into another commit"
+msgstr "ní féidir le squash tiomantas a chumasc i dtiomantas eile"
+
+#: sequencer.c
+#, c-format
+msgid "invalid command '%.*s'"
+msgstr "ordú neamhbhailí '%.*s"
+
+#: sequencer.c
+#, c-format
+msgid "missing arguments for %s"
+msgstr "argóintí atá in easnamh do %s"
+
+#: sequencer.c
+#, c-format
+msgid "could not parse '%s'"
+msgstr "ní fhéadfaí '%s' a pháirseáil"
+
+#: sequencer.c
+#, c-format
+msgid "invalid line %d: %.*s"
+msgstr "líne neamhbhailí %d: %.*s"
+
+#: sequencer.c
+#, c-format
+msgid "cannot '%s' without a previous commit"
+msgstr "ní féidir '%s' gan gealltanas roimhe seo"
+
+#: sequencer.c
+msgid "cancelling a cherry picking in progress"
+msgstr "piocadh silíní atá ar siúl a chur ar ceal"
+
+#: sequencer.c
+msgid "cancelling a revert in progress"
+msgstr "filleadh atá ar siúl a chealú"
+
+#: sequencer.c
+msgid "please fix this using 'git rebase --edit-todo'."
+msgstr ""
+"déan é seo a shocrú le do thoil ag baint úsáide as 'git rebase --edit-todo'."
+
+#: sequencer.c
+#, c-format
+msgid "unusable instruction sheet: '%s'"
+msgstr "bileog treoracha neamhúsáidte: '%s'"
+
+#: sequencer.c
+msgid "no commits parsed."
+msgstr "níl aon gealltanais paráilsithe."
+
+#: sequencer.c
+msgid "cannot cherry-pick during a revert."
+msgstr "ní féidir le silíní a phiocadh le linn filleadh."
+
+#: sequencer.c
+msgid "cannot revert during a cherry-pick."
+msgstr "ní féidir filleadh ar ais le linn pioc silíní."
+
+#: sequencer.c
+msgid "unusable squash-onto"
+msgstr "squash-on neamhúsáidte"
+
+#: sequencer.c
+#, c-format
+msgid "malformed options sheet: '%s'"
+msgstr "bileog roghanna mífhoirmithe: '%s'"
+
+#: sequencer.c
+msgid "empty commit set passed"
+msgstr "rith tacar tiomanta folamh"
+
+#: sequencer.c
+msgid "revert is already in progress"
+msgstr "tá filleadh ar siúl cheana féin"
+
+#: sequencer.c
+#, c-format
+msgid "try \"git revert (--continue | %s--abort | --quit)\""
+msgstr "bain triail as “git revert (--continue | %s--abort | --quit)”"
+
+#: sequencer.c
+msgid "cherry-pick is already in progress"
+msgstr "tá pioc silíní ar siúl cheana féin"
+
+#: sequencer.c
+#, c-format
+msgid "try \"git cherry-pick (--continue | %s--abort | --quit)\""
+msgstr "bain triail as “git cherry-pick (--continue | %s--abort | --quit)”"
+
+#: sequencer.c
+#, c-format
+msgid "could not create sequencer directory '%s'"
+msgstr "ní fhéadfaí eolaire seicheamhach '%s' a chruthú"
+
+#: sequencer.c
+msgid "no cherry-pick or revert in progress"
+msgstr "níl aon phiocadh silíní nó filleadh ar siúl ar siúl"
+
+#: sequencer.c
+msgid "cannot resolve HEAD"
+msgstr "ní féidir le HEAD a réiteach"
+
+#: sequencer.c
+msgid "cannot abort from a branch yet to be born"
+msgstr "ní féidir éirí as brainse nach rugadh fós"
+
+#: sequencer.c
+#, c-format
+msgid "cannot read '%s': %s"
+msgstr "ní féidir '%s' a léamh: %s"
+
+#: sequencer.c
+msgid "unexpected end of file"
+msgstr "deireadh gan choinne an chomhaid"
+
+#: sequencer.c
+#, c-format
+msgid "stored pre-cherry-pick HEAD file '%s' is corrupt"
+msgstr "tá comhad HEAD réamh-phiocadh silíní stóráilte '%s' truaillithe"
+
+#: sequencer.c
+msgid "You seem to have moved HEAD. Not rewinding, check your HEAD!"
+msgstr "Is cosúil gur bhogadh tú CEANN. Gan athfhillte, seiceáil do CHEANN!"
+
+#: sequencer.c
+msgid "no revert in progress"
+msgstr "níl aon fhilleadh ar siúl"
+
+#: sequencer.c
+msgid "no cherry-pick in progress"
+msgstr "níl aon phiocadh silíní ar siúl"
+
+#: sequencer.c
+msgid "failed to skip the commit"
+msgstr "theip ar an gealltanas a scipeáil"
+
+#: sequencer.c
+msgid "there is nothing to skip"
+msgstr "níl aon rud le scipeáil"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"have you committed already?\n"
+"try \"git %s --continue\""
+msgstr ""
+"an ndearna tú tiomanta cheana féin?\n"
+"bain triail as “git %s --continue”"
+
+#: sequencer.c
+msgid "cannot read HEAD"
+msgstr "ní féidir le HEAD a léamh"
+
+#: sequencer.c
+msgid "could not write commit message file"
+msgstr "ní raibh sé in ann comhad teachtaireachta tiomanta a"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"You can amend the commit now, with\n"
+"\n"
+" git commit --amend %s\n"
+"\n"
+"Once you are satisfied with your changes, run\n"
+"\n"
+" git rebase --continue\n"
+msgstr ""
+"Féadfaidh tú an gealltanas a leasú anois, le\n"
+"\n"
+" git commit --amend %s\n"
+"\n"
+"Nuair a bheidh tú sásta le d'athruithe, rith\n"
+"\n"
+" git rebase --continue\n"
+
+#: sequencer.c
+#, c-format
+msgid "Could not apply %s... %.*s"
+msgstr "Níorbh fhéidir iarratas a dhéanamh %s... %.*s"
+
+#: sequencer.c
+#, c-format
+msgid "Could not merge %.*s"
+msgstr "Níorbh fhéidir cumasc %.*s"
+
+#: sequencer.c
+#, c-format
+msgid "Executing: %s\n"
+msgstr "Forghníomhú: %s\n"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"execution failed: %s\n"
+"%sYou can fix the problem, and then run\n"
+"\n"
+" git rebase --continue\n"
+"\n"
+msgstr ""
+"theip ar fhorghníomhú: %s\n"
+"%sIs féidir leat an fhadhb a shocrú, agus ansin rith\n"
+"\n"
+" git rebase --continue\n"
+
+#: sequencer.c
+msgid "and made changes to the index and/or the working tree.\n"
+msgstr "agus rinne siad athruithe ar an innéacs agus/nó ar an gcrann oibre.\n"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"execution succeeded: %s\n"
+"but left changes to the index and/or the working tree.\n"
+"Commit or stash your changes, and then run\n"
+"\n"
+" git rebase --continue\n"
+"\n"
+msgstr ""
+"d'éirigh leis an bhforghníomhú: %s\n"
+"ach d'fhág sé athruithe ar an innéacs agus/nó ar an gcrann oibre.\n"
+"Déan do chuid athruithe a dhéanamh nó a stóráil, agus ansin rith\n"
+"\n"
+" git rebase --continue\n"
+"\n"
+
+#: sequencer.c
+#, c-format
+msgid "illegal label name: '%.*s'"
+msgstr "ainm lipéid neamhdhleathach: '%.*s'"
+
+#: sequencer.c
+#, c-format
+msgid "could not resolve '%s'"
+msgstr "ní fhéadfaí '%s' a réiteach"
+
+#: sequencer.c
+msgid "writing fake root commit"
+msgstr "tiomantas fréamh bréige a scríobh"
+
+#: sequencer.c
+msgid "writing squash-onto"
+msgstr "scríobh squash-on"
+
+#: sequencer.c
+msgid "cannot merge without a current revision"
+msgstr "ní féidir a chumasc gan athbhreithniú reatha"
+
+#: sequencer.c
+#, c-format
+msgid "unable to parse '%.*s'"
+msgstr "nach féidir le parsáil a dhéanamh '%.*s"
+
+#: sequencer.c
+#, c-format
+msgid "nothing to merge: '%.*s'"
+msgstr "níl aon rud le cumasc: '%.*s'"
+
+#: sequencer.c
+msgid "octopus merge cannot be executed on top of a [new root]"
+msgstr "ní féidir cumaisc ochtair a fhorghníomhú ar bharr [fréamh nua]"
+
+#: sequencer.c
+#, c-format
+msgid "could not get commit message of '%s'"
+msgstr "ní fhéadfaí teachtaireacht tiomanta de '%s' a fháil"
+
+#: sequencer.c
+#, c-format
+msgid "could not even attempt to merge '%.*s'"
+msgstr "níorbh fhéidir fiú iarracht a dhéanamh '%.*s' a chumasc"
+
+#: sequencer.c
+msgid "merge: Unable to write new index file"
+msgstr "cumaisc: Ní féidir comhad innéacs nua a scríobh"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"another 'rebase' process appears to be running; '%s.lock' already exists"
+msgstr ""
+"is cosúil go bhfuil próiseas 'rebase' eile ag rith; tá '%s.lock' ann cheana "
+"féin"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"Updated the following refs with %s:\n"
+"%s"
+msgstr ""
+"Nuashonraíodh na hifríochtaí seo a leanas le %s:\n"
+"%s"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"Failed to update the following refs with %s:\n"
+"%s"
+msgstr ""
+"Theip ar na hiarratais seo a leanas a nuashonrú le %s:\n"
+"%s"
+
+#: sequencer.c
+msgid "Cannot autostash"
+msgstr "Ní féidir uathoibriú"
+
+#: sequencer.c
+#, c-format
+msgid "Unexpected stash response: '%s'"
+msgstr "Freagra stash gan choinne: '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "Could not create directory for '%s'"
+msgstr "Ní fhéadfaí eolaire a chruthú do '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "Created autostash: %s\n"
+msgstr "Autostash cruthaithe: %s\n"
+
+#: sequencer.c
+msgid "could not reset --hard"
+msgstr "ní fhéadfaí athshocrú --hard"
+
+#: sequencer.c
+#, c-format
+msgid "Applied autostash.\n"
+msgstr "Autostash feidhmithe.\n"
+
+#: sequencer.c
+#, c-format
+msgid "cannot store %s"
+msgstr "ní féidir %s a stóráil"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"%s\n"
+"Your changes are safe in the stash.\n"
+"You can run \"git stash pop\" or \"git stash drop\" at any time.\n"
+msgstr ""
+"%s\n"
+"Tá do chuid athruithe sábháilte sa stóras.\n"
+"Is féidir leat \"git stash pop\" nó \"git stash drop\" a rith ag am ar "
+"bith.\n"
+
+#: sequencer.c
+msgid "Applying autostash resulted in conflicts."
+msgstr "Bhí coinbhleachtaí mar thoradh ar autostash i bhfeidhm."
+
+#: sequencer.c
+msgid "Autostash exists; creating a new stash entry."
+msgstr "Tá Autostash ann; ag cruthú iontráil nua stash."
+
+#: sequencer.c
+msgid "autostash reference is a symref"
+msgstr "is é tagairt autostash ina symref"
+
+#: sequencer.c
+msgid "could not detach HEAD"
+msgstr "ní fhéadfadh CEAD a dhícheangal"
+
+#: sequencer.c
+#, c-format
+msgid "Stopped at HEAD\n"
+msgstr "Stopadh ag HEAD\n"
+
+#: sequencer.c
+#, c-format
+msgid "Stopped at %s\n"
+msgstr "Stop ag %s\n"
+
+#: sequencer.c
+#, c-format
+msgid ""
+"Could not execute the todo command\n"
+"\n"
+" %.*s\n"
+"It has been rescheduled; To edit the command before continuing, please\n"
+"edit the todo list first:\n"
+"\n"
+" git rebase --edit-todo\n"
+" git rebase --continue\n"
+msgstr ""
+"Ní fhéadfaí an t-ordú todo a fhorghníomhú\n"
+"\n"
+" %.*s\n"
+"Tá sé athsceidealaithe; Chun an t-ordú a chur in eagar sula leanann tú ar "
+"aghaidh, le do thoil\n"
+"cuir an liosta todo in eagar ar dtús:\n"
+"\n"
+" git rebase --edit-todo\n"
+" git rebase --continue\n"
+
+#: sequencer.c
+#, c-format
+msgid "Stopped at %s... %.*s\n"
+msgstr "Stopadh ag %s... %.*s\n"
+
+#: sequencer.c
+#, c-format
+msgid "Rebasing (%d/%d)%s"
+msgstr "Ag athbhunú (%d/%d) %s"
+
+#: sequencer.c
+#, c-format
+msgid "unknown command %d"
+msgstr "ordú anaithnid %d"
+
+#: sequencer.c
+msgid "could not read orig-head"
+msgstr "ní raibh sé in ann ceann orig-head a léamh"
+
+#: sequencer.c
+msgid "could not read 'onto'"
+msgstr "ní fhéadfaí 'ar' léamh"
+
+#: sequencer.c
+#, c-format
+msgid "could not update HEAD to %s"
+msgstr "ní fhéadfaí HEAD a nuashonrú go %s"
+
+#: sequencer.c
+#, c-format
+msgid "Successfully rebased and updated %s.\n"
+msgstr "Athbhunaithe agus nuashonraithe %s go rathúil.\n"
+
+#: sequencer.c
+msgid "cannot rebase: You have unstaged changes."
+msgstr "ní féidir athbhunú: Tá athruithe gan stáitse agat."
+
+#: sequencer.c
+msgid "cannot amend non-existing commit"
+msgstr "ní féidir gealltanas nach bhfuil ann a leasú"
+
+#: sequencer.c
+#, c-format
+msgid "invalid file: '%s'"
+msgstr "comhad neamhbhailí: '%s'"
+
+#: sequencer.c
+#, c-format
+msgid "invalid contents: '%s'"
+msgstr "ábhar neamhbhailí: '%s'"
+
+#: sequencer.c
+msgid ""
+"\n"
+"You have uncommitted changes in your working tree. Please, commit them\n"
+"first and then run 'git rebase --continue' again."
+msgstr ""
+"\n"
+"Tá athruithe neamhthiomanta agat i do chrann oibre. Le do thoil, tiomnaigh "
+"iad\n"
+"ar dtús agus ansin rith 'git rebase --continue' arís."
+
+#: sequencer.c
+#, c-format
+msgid "could not write file: '%s'"
+msgstr "ní fhéadfaí comhad a scríobh: '%s'"
+
+#: sequencer.c
+msgid "could not remove CHERRY_PICK_HEAD"
+msgstr "ní fhéadfaí CHERRY_PICK_HEAD a bhaint"
+
+#: sequencer.c
+msgid "could not commit staged changes."
+msgstr "ní fhéadfadh athruithe stáitse a dhéanamh."
+
+#: sequencer.c
+#, c-format
+msgid "%s: can't cherry-pick a %s"
+msgstr "%s: ní féidir %s a roghnú silíní"
+
+#: sequencer.c
+#, c-format
+msgid "%s: bad revision"
+msgstr "%s: droch-athbhreithniú"
+
+#: sequencer.c
+msgid "can't revert as initial commit"
+msgstr "ní féidir teacht ar ais mar thiomantas tosaigh"
+
+#: sequencer.c
+#, c-format
+msgid "skipped previously applied commit %s"
+msgstr "scipeáil tiomantas %s a cuireadh i bhfeidhm"
+
+#: sequencer.c
+msgid "use --reapply-cherry-picks to include skipped commits"
+msgstr ""
+"bain úsáid as --reapply-cherry-picks chun gealltanais scipeáilte a áireamh"
+
+#: sequencer.c
+msgid "make_script: unhandled options"
+msgstr "make_script: roghanna neamh-láimhseáilte"
+
+#: sequencer.c
+msgid "make_script: error preparing revisions"
+msgstr "make_script: earráid ag ullmhú athbhreithnithe"
+
+#: sequencer.c
+msgid "nothing to do"
+msgstr "aon rud le déanamh"
+
+#: sequencer.c
+msgid "could not skip unnecessary pick commands"
+msgstr "ní fhéadfadh orduithe pioc gan ghá a scipeáil"
+
+#: sequencer.c
+msgid "the script was already rearranged."
+msgstr "athshocraíodh an script cheana féin."
+
+#: sequencer.c
+#, c-format
+msgid "update-refs file at '%s' is invalid"
+msgstr "tá comhad update-refs ag '%s' neamhbhailí"
+
+#: setup.c
+#, c-format
+msgid "'%s' is outside repository at '%s'"
+msgstr "Tá '%s' an stór lasmuigh ag '%s'"
+
+#: setup.c
+#, c-format
+msgid ""
+"%s: no such path in the working tree.\n"
+"Use 'git <command> -- <path>...' to specify paths that do not exist locally."
+msgstr ""
+"%s: níl aon chosán den sórt sin sa chrann oibre.\n"
+"Úsáid 'git <command>--<path>... 'chun cosáin nach bhfuil ann go háitiúil a "
+"shonrú."
+
+#: setup.c
+#, c-format
+msgid ""
+"ambiguous argument '%s': unknown revision or path not in the working tree.\n"
+"Use '--' to separate paths from revisions, like this:\n"
+"'git <command> [<revision>...] -- [<file>...]'"
+msgstr ""
+"argóint débhríoch '%s': athbhreithniú anaithnid nó cosán nach bhfuil sa "
+"chrann oibre.\n"
+"Úsáid '--' chun cosáin a scaradh ó athbhreithnithe, mar seo:\n"
+"'git <command>[<revision>...] -- [<file>...] '"
+
+#: setup.c
+#, c-format
+msgid "option '%s' must come before non-option arguments"
+msgstr "caithfidh rogha '%s' teacht roimh argóintí neamh-rogha"
+
+#: setup.c
+#, c-format
+msgid ""
+"ambiguous argument '%s': both revision and filename\n"
+"Use '--' to separate paths from revisions, like this:\n"
+"'git <command> [<revision>...] -- [<file>...]'"
+msgstr ""
+"argóint débhríoch '%s': athbhreithniú agus ainm comhaid araon\n"
+"Úsáid '--' chun cosáin a scaradh ó athbhreithnithe, mar seo:\n"
+"'git <command>[<revision>...] -- [<file>...] '"
+
+#: setup.c
+msgid "unable to set up work tree using invalid config"
+msgstr ""
+"in ann crann oibre a chur ar bun ag baint úsáide as cumraíocht nebhailí"
+
+#: setup.c
+#, c-format
+msgid "'%s' already specified as '%s'"
+msgstr "'%s' sonraithe cheana féin mar '%s'"
+
+#: setup.c
+#, c-format
+msgid "Expected git repo version <= %d, found %d"
+msgstr "Leagan repo git ag súil leis <= %d, aimsíodh %d"
+
+#: setup.c
+msgid "unknown repository extension found:"
+msgid_plural "unknown repository extensions found:"
+msgstr[0] "síneadh stórais anaithnid aimsithe:"
+msgstr[1] "síntí stórais anaithnide aimsithe:"
+msgstr[2] "síntí stórais anaithnide aimsithe:"
+
+#: setup.c
+msgid "repo version is 0, but v1-only extension found:"
+msgid_plural "repo version is 0, but v1-only extensions found:"
+msgstr[0] "is é leagan repo 0, ach fuarthas síneadh v1 amháin:"
+msgstr[1] "is é 0 an leagan den stór, ach fuarthas síntí v1 amháin:"
+msgstr[2] "is é 0 an leagan den stór, ach fuarthas síntí v1 amháin:"
+
+#: setup.c
+#, c-format
+msgid "error opening '%s'"
+msgstr "earráid ag oscailt '%s'"
+
+#: setup.c
+#, c-format
+msgid "too large to be a .git file: '%s'"
+msgstr "ró-mhór le bheith ina chomhad .git: '%s'"
+
+#: setup.c
+#, c-format
+msgid "error reading %s"
+msgstr "earráid ag léamh %s"
+
+#: setup.c
+#, c-format
+msgid "invalid gitfile format: %s"
+msgstr "formáid gitfile neamhbhailí: %s"
+
+#: setup.c
+#, c-format
+msgid "no path in gitfile: %s"
+msgstr "gan aon chosán i gitfile: %s"
+
+#: setup.c
+#, c-format
+msgid "not a git repository: %s"
+msgstr "ní stór git: %s"
+
+#: setup.c
+#, c-format
+msgid "'$%s' too big"
+msgstr "'$%s' ró-mhór"
+
+#: setup.c
+#, c-format
+msgid "not a git repository: '%s'"
+msgstr "ní stór git: '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot chdir to '%s'"
+msgstr "ní féidir teacht ar '%s'"
+
+#: setup.c
+msgid "cannot come back to cwd"
+msgstr "ní féidir teacht ar ais chuig cwd"
+
+#: setup.c
+#, c-format
+msgid "failed to stat '%*s%s%s'"
+msgstr "theip ar '%*s%s%s' a thaispeáint"
+
+#: setup.c
+#, c-format
+msgid "safe.directory '%s' not absolute"
+msgstr "níl safe.directory '%s' iomlán"
+
+#: setup.c
+#, c-format
+msgid ""
+"detected dubious ownership in repository at '%s'\n"
+"%sTo add an exception for this directory, call:\n"
+"\n"
+"\tgit config --global --add safe.directory %s"
+msgstr ""
+"braitheadh úinéireacht amhrasach sa stórlann ag '%s'\n"
+"%sChun eisceacht a chur leis an eolaire seo, glaoigh ar:\n"
+"\n"
+"git config --global --add safe.directory %s"
+
+#: setup.c
+msgid "Unable to read current working directory"
+msgstr "Ní féidir eolaire oibre reatha a léamh"
+
+#: setup.c
+#, c-format
+msgid "cannot change to '%s'"
+msgstr "ní féidir athrú go '%s'"
+
+#: setup.c
+#, c-format
+msgid "not a git repository (or any of the parent directories): %s"
+msgstr "ní stór git (nó aon cheann de na tuismitheoireolairí): %s"
+
+#: setup.c
+#, c-format
+msgid ""
+"not a git repository (or any parent up to mount point %s)\n"
+"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)."
+msgstr ""
+"ní stór git (nó aon thuismitheoir suas go dtí an pointe gléasta %s)\n"
+"Stopadh ag teorainn an chórais chomhaid (níl GIT_DISCOVERY_ACROSS_FILESYSTEM "
+"socraithe)."
+
+#: setup.c
+#, c-format
+msgid "cannot use bare repository '%s' (safe.bareRepository is '%s')"
+msgstr "ní féidir stór lom '%s' a úsáid (safe.bareRepository is '%s')"
+
+#: setup.c
+#, c-format
+msgid ""
+"problem with core.sharedRepository filemode value (0%.3o).\n"
+"The owner of files must always have read and write permissions."
+msgstr ""
+"fadhb le luach mód comhaid core.sharedRepository (0%.3o).\n"
+"Ní mór ceadanna léite agus scríbhneoireachta a bheith ag úinéir na gcomhad i "
+"gcónaí."
+
+#: setup.c
+msgid "fork failed"
+msgstr "theip ar fhorc"
+
+#: setup.c
+msgid "setsid failed"
+msgstr "theip ar setsid"
+
+#: setup.c
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "ní féidir teacht ar theimpléad '%s'"
+
+#: setup.c
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "ní féidir '%s' a oscailt"
+
+#: setup.c
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "ní féidir nasc '%s' a léamh"
+
+#: setup.c
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "ní féidir '%s' '' %s 'a nascadh"
+
+#: setup.c
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "ní féidir '%s' a chóipeáil chuig '%s'"
+
+#: setup.c
+#, c-format
+msgid "ignoring template %s"
+msgstr "ag neamhaird den teimpléad %s"
+
+#: setup.c
+#, c-format
+msgid "templates not found in %s"
+msgstr "teimpléid gan aimsiú i %s"
+
+#: setup.c
+#, c-format
+msgid "not copying templates from '%s': %s"
+msgstr "gan teimpléid a chóipeáil ó '%s': %s"
+
+#: setup.c
+#, c-format
+msgid "invalid initial branch name: '%s'"
+msgstr "ainm brainse tosaigh neamhbhailí: '%s'"
+
+#: setup.c
+#, c-format
+msgid "re-init: ignored --initial-branch=%s"
+msgstr "ath-init: neamhaird a dhéanamh ar --initial-branch=%s"
+
+#: setup.c
+#, c-format
+msgid "unable to handle file type %d"
+msgstr "in ann cineál comhad %d a láimhseáil"
+
+#: setup.c
+#, c-format
+msgid "unable to move %s to %s"
+msgstr "nach féidir %s a bhogadh go %s"
+
+#: setup.c
+msgid "attempt to reinitialize repository with different hash"
+msgstr "iarracht a dhéanamh stór a aththionsú le hash difriúil"
+
+#: setup.c
+msgid ""
+"attempt to reinitialize repository with different reference storage format"
+msgstr ""
+"iarracht a dhéanamh stór a aththionsú le formáid stórála tagartha difriúil"
+
+#: setup.c
+#, c-format
+msgid "%s already exists"
+msgstr "Tá %s ann cheana féin"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing shared Git repository in %s%s\n"
+msgstr "Stórlann Git roinnte atá ann cheana a athsheoladh i %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Reinitialized existing Git repository in %s%s\n"
+msgstr "Aththionscnaíodh stór Git atá ann cheana i %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty shared Git repository in %s%s\n"
+msgstr "Stórlann Git roinnte folamh tosaithe i %s%s\n"
+
+#: setup.c
+#, c-format
+msgid "Initialized empty Git repository in %s%s\n"
+msgstr "Stórlann Git folamh tosaithe i %s%s\n"
+
+#: sparse-index.c
+#, c-format
+msgid "index entry is a directory, but not sparse (%08x)"
+msgstr "is eolaire é iontráil innéacs, ach ní neamhchoitianta (%08x)"
+
+#: split-index.c
+msgid "cannot use split index with a sparse index"
+msgstr "ní féidir innéacs scoilte a úsáid le hinnéacs neamhchoitianta"
+
+#. TRANSLATORS: The first %s is a command like "ls-tree".
+#: strbuf.c
+#, c-format
+msgid "bad %s format: element '%s' does not start with '('"
+msgstr "fhormáid olc %s: ní thosaíonn eilimint '%s' le '('"
+
+#. TRANSLATORS: The first %s is a command like "ls-tree".
+#: strbuf.c
+#, c-format
+msgid "bad %s format: element '%s' does not end in ')'"
+msgstr "droch-fhormáid %s: ní chríochnaíonn eilimint '%s' i ')'"
+
+#. TRANSLATORS: %s is a command like "ls-tree".
+#: strbuf.c
+#, c-format
+msgid "bad %s format: %%%.*s"
+msgstr "fhormáid %s olc: %%%.*s"
+
+#. TRANSLATORS: IEC 80000-13:2008 gibibyte
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u GiB"
+msgstr "%u.%2.2u GiB"
+
+#. TRANSLATORS: IEC 80000-13:2008 gibibyte/second
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u GiB/s"
+msgstr "%u.%2.2u GiB/s"
+
+#. TRANSLATORS: IEC 80000-13:2008 mebibyte
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u MiB"
+msgstr "%u.%2.2u MiB"
+
+#. TRANSLATORS: IEC 80000-13:2008 mebibyte/second
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u MiB/s"
+msgstr "%u.%2.2u MiB/s"
+
+#. TRANSLATORS: IEC 80000-13:2008 kibibyte
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u KiB"
+msgstr "%u.%2.2u KiB"
+
+#. TRANSLATORS: IEC 80000-13:2008 kibibyte/second
+#: strbuf.c
+#, c-format
+msgid "%u.%2.2u KiB/s"
+msgstr "%u.%2.2u KiB/s"
+
+#. TRANSLATORS: IEC 80000-13:2008 byte
+#: strbuf.c
+#, c-format
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "%u beart"
+msgstr[1] "%u beart"
+msgstr[2] "%u beart"
+
+#. TRANSLATORS: IEC 80000-13:2008 byte/second
+#: strbuf.c
+#, c-format
+msgid "%u byte/s"
+msgid_plural "%u bytes/s"
+msgstr[0] "%u beart/s"
+msgstr[1] "%u beart/s"
+msgstr[2] "%u beart/s"
+
+#: submodule-config.c
+#, c-format
+msgid "ignoring suspicious submodule name: %s"
+msgstr "ag déanamh neamhaird d'ainm fo-mhodúil amhrasach: %s"
+
+#: submodule-config.c
+msgid "negative values not allowed for submodule.fetchJobs"
+msgstr "luachanna diúltacha nach gceadaítear le haghaidh submodule.fetchJobs"
+
+#: submodule-config.c
+#, c-format
+msgid "ignoring '%s' which may be interpreted as a command-line option: %s"
+msgstr ""
+"neamhaird a dhéanamh ar '%s' ar féidir a léirmhíniú mar rogha líne ordaithe: "
+"%s"
+
+#: submodule-config.c
+#, c-format
+msgid "Could not update .gitmodules entry %s"
+msgstr "Ní fhéadfaí iontráil.gitmodules %s a nuashonrú"
+
+#: submodule.c
+msgid "Cannot change unmerged .gitmodules, resolve merge conflicts first"
+msgstr ""
+"Ní féidir .gitmodules neamh-chumhdaithe a athrú, coinbhleachtaí cumaisc a "
+"réiteach"
+
+#: submodule.c
+#, c-format
+msgid "Could not find section in .gitmodules where path=%s"
+msgstr ""
+"Níorbh fhéidir an rannóg a aimsiú i .gitmodules áit a bhfuil an cosán = %s"
+
+#: submodule.c
+#, c-format
+msgid "Could not remove .gitmodules entry for %s"
+msgstr "Ní fhéadfaí iontráil.gitmodules a bhaint do %s"
+
+#: submodule.c
+msgid "staging updated .gitmodules failed"
+msgstr "theip ar stáisiú nuashonraithe .gitmodules"
+
+#: submodule.c
+#, c-format
+msgid "in unpopulated submodule '%s'"
+msgstr "i bhfo-mhodúl neamhdhaonra '%s'"
+
+#: submodule.c
+#, c-format
+msgid "Pathspec '%s' is in submodule '%.*s'"
+msgstr "Tá pathspec '%s' i bhfo-mhodúl '%.*s"
+
+#: submodule.c
+#, c-format
+msgid "bad --ignore-submodules argument: %s"
+msgstr "argóint olc --ignore-submodules: %s"
+
+#: submodule.c
+#, c-format
+msgid ""
+"Submodule in commit %s at path: '%s' collides with a submodule named the "
+"same. Skipping it."
+msgstr ""
+"Fo-mhodúl i dtiomantas %s ag an gcosán: imbhuaileann '%s' le fo-mhodúl darb "
+"ainm mar an gcéanna. Ag scipeáil é."
+
+#: submodule.c
+#, c-format
+msgid "submodule entry '%s' (%s) is a %s, not a commit"
+msgstr "is %s é iontráil an fhomhodúil '%s' (%s), ní tiomnú"
+
+#: submodule.c
+#, c-format
+msgid ""
+"Could not run 'git rev-list <commits> --not --remotes -n 1' command in "
+"submodule %s"
+msgstr ""
+"Ní raibh an t-ordú 'git rev-list <commits>--not --remotes -n 1' a reáchtáil "
+"i bhfo-mhodúl %s"
+
+#: submodule.c
+#, c-format
+msgid "process for submodule '%s' failed"
+msgstr "theip ar phróiseas le haghaidh fo-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "Pushing submodule '%s'\n"
+msgstr "Ag brú an fho-mhodúil '%s'\n"
+
+#: submodule.c
+#, c-format
+msgid "Unable to push submodule '%s'\n"
+msgstr "Ní féidir an fho-mhodúl '%s' a bhrú\n"
+
+#: submodule.c
+#, c-format
+msgid "Fetching submodule %s%s\n"
+msgstr "Ag fáil fo-mhodúl %s%s\n"
+
+#: submodule.c
+#, c-format
+msgid "Could not access submodule '%s'\n"
+msgstr "Níorbh fhéidir rochtain a fháil ar fho-mhodúl '%s'\n"
+
+#: submodule.c
+#, c-format
+msgid "Could not access submodule '%s' at commit %s\n"
+msgstr "Níorbh fhéidir rochtain a fháil ar fho-mhodúl '%s' ag tiomantas %s\n"
+
+#: submodule.c
+#, c-format
+msgid "Fetching submodule %s%s at commit %s\n"
+msgstr "Ag fáil fo-mhodúl %s%s ag an tiomnú %s\n"
+
+#: submodule.c
+#, c-format
+msgid ""
+"Errors during submodule fetch:\n"
+"%s"
+msgstr ""
+"Earráidí le linn teacht fo-mhodúil:\n"
+"%s"
+
+#: submodule.c
+#, c-format
+msgid "'%s' not recognized as a git repository"
+msgstr "Ní aithnítear '%s' mar stór git"
+
+#: submodule.c
+#, c-format
+msgid "Could not run 'git status --porcelain=2' in submodule %s"
+msgstr "Ní féidir 'git status --porcelain=2' a reáchtáil i bhfo-mhodúl %s"
+
+#: submodule.c
+#, c-format
+msgid "'git status --porcelain=2' failed in submodule %s"
+msgstr "Theip ar 'git status --porcelain=2' i bhfo-mhodúl %s"
+
+#: submodule.c
+#, c-format
+msgid "could not start 'git status' in submodule '%s'"
+msgstr "ní fhéadfaí 'git status' a thosú i bhfo-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "could not run 'git status' in submodule '%s'"
+msgstr "ní fhéadfaí 'git status' a reáchtáil i bhfo-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "Could not unset core.worktree setting in submodule '%s'"
+msgstr "Ní fhéadfaí socrú core.worktree a dhíshocrú i bhfo-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "could not recurse into submodule '%s'"
+msgstr "ní fhéadfaí athshlánú isteach i bhfo-mhodúl '%s'"
+
+#: submodule.c
+msgid "could not reset submodule index"
+msgstr "ní fhéadfadh innéacs fo-mhodúil a athshocrú"
+
+#: submodule.c
+#, c-format
+msgid "submodule '%s' has dirty index"
+msgstr "tá innéacs salach ag fo-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "Submodule '%s' could not be updated."
+msgstr "Ní fhéadfaí fo-mhodúl '%s' a nuashonrú."
+
+#: submodule.c
+#, c-format
+msgid "submodule git dir '%s' is inside git dir '%.*s'"
+msgstr "tá fo-mhodúl git dir '%s' taobh istigh de git dir '%.*s"
+
+#: submodule.c
+#, c-format
+msgid "expected '%.*s' in submodule path '%s' not to be a symbolic link"
+msgstr ""
+"ag súil leis '%.*s' i gcosán fo-mhodúil '%s' gan a bheith ina nasc siombalach"
+
+#: submodule.c
+#, c-format
+msgid "expected submodule path '%s' not to be a symbolic link"
+msgstr "ag súil nach mbeidh cosán fo-mhodúil '%s' ina nasc siombalach"
+
+#: submodule.c
+#, c-format
+msgid ""
+"relocate_gitdir for submodule '%s' with more than one worktree not supported"
+msgstr ""
+"relocate_gitdir le haghaidh fo-mhodúil '%s' le níos mó ná crann oibre amháin "
+"nach dtacaítear leis"
+
+#: submodule.c
+#, c-format
+msgid "could not lookup name for submodule '%s'"
+msgstr "ní fhéadfaí ainm a lorg don fho-mhodúl '%s'"
+
+#: submodule.c
+#, c-format
+msgid "refusing to move '%s' into an existing git dir"
+msgstr "diúltú '%s' a bhogadh isteach i git dir atá ann cheana"
+
+#: submodule.c
+#, c-format
+msgid ""
+"Migrating git directory of '%s%s' from\n"
+"'%s' to\n"
+"'%s'\n"
+msgstr ""
+"Ag aistriú eolaire git de '%s%s' ó\n"
+"'%s' go\n"
+"'%s'\n"
+
+#: submodule.c
+msgid "could not start ls-files in .."
+msgstr "ní fhéadfaí ls-files a thosú i.."
+
+#: submodule.c
+#, c-format
+msgid "ls-tree returned unexpected return code %d"
+msgstr "d’fhill an crann ls cód fillte gan choinne %d"
+
+#: symlinks.c
+#, c-format
+msgid "failed to lstat '%s'"
+msgstr "theip ar lstat '%s'"
+
+#: t/helper/test-bundle-uri.c
+msgid "no remote configured to get bundle URIs from"
+msgstr "gan aon iargúlta cumraithe chun URIs beartán a fháil ó"
+
+#: t/helper/test-bundle-uri.c
+msgid "could not get the bundle-uri list"
+msgstr "ní raibh in ann an liosta bundle-uri a fháil"
+
+#: t/helper/test-cache-tree.c
+msgid "test-tool cache-tree <options> (control|prime|update)"
+msgstr "test-tool cache-tree <options> (control|prime|update)"
+
+#: t/helper/test-cache-tree.c
+msgid "clear the cache tree before each iteration"
+msgstr "glan an crann taisce roimh gach athrú"
+
+#: t/helper/test-cache-tree.c
+msgid "number of entries in the cache tree to invalidate (default 0)"
+msgstr ""
+"líon na n-iontrálacha sa chrann taisce le neamhbhailí (réamhshocraithe 0)"
+
+#: t/helper/test-pack-deltas.c
+msgid "the number of objects to write"
+msgstr "líon na rudaí le scríobh"
+
+#: t/helper/test-path-walk.c
+msgid "test-tool path-walk <options> -- <revision-options>"
+msgstr "test-tool path-walk <options> -- <revision-options>"
+
+#: t/helper/test-path-walk.c
+msgid "toggle inclusion of blob objects"
+msgstr "cuimsiú rudaí blob a thógáil"
+
+#: t/helper/test-path-walk.c
+msgid "toggle inclusion of commit objects"
+msgstr "toggle áireamh rudaí tiomanta"
+
+#: t/helper/test-path-walk.c
+msgid "toggle inclusion of tag objects"
+msgstr "cuimsiú rudaí clibeanna a thosc"
+
+#: t/helper/test-path-walk.c
+msgid "toggle inclusion of tree objects"
+msgstr "cuimsiú rudaí crann a thógáil"
+
+#: t/helper/test-path-walk.c
+msgid "toggle pruning of uninteresting paths"
+msgstr "bearradh cosáin neamh-spéisiúla a thosú"
+
+#: t/helper/test-path-walk.c
+msgid "read a pattern list over stdin"
+msgstr "léigh liosta patrún thar stdin"
+
+#: t/helper/test-reach.c
+#, c-format
+msgid "commit %s is not marked reachable"
+msgstr "nach bhfuil comhordú %s marcáilte inrochtana"
+
+#: t/helper/test-reach.c
+msgid "too many commits marked reachable"
+msgstr "an iomarca gealltanais atá marcáilte inrochtana"
+
+#: t/helper/test-read-midx.c
+msgid "could not determine MIDX preferred pack"
+msgstr "ní fhéadfaí pacáiste is fearr MIDX a chinneadh"
+
+#: t/helper/test-serve-v2.c
+msgid "test-tool serve-v2 [<options>]"
+msgstr "test-tool serve-v2 [<options>]"
+
+#: t/helper/test-serve-v2.c
+msgid "exit immediately after advertising capabilities"
+msgstr "imeacht díreach tar éis cumais fógraíochta"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc is-active [<name>] [<options>]"
+msgstr "<name><options>tá cúntóir tástála simple-ipc gníomhach [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc run-daemon [<name>] [<threads>]"
+msgstr "<name><threads>cúntóir tástála simple-ipc run-daemon [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc start-daemon [<name>] [<threads>] [<max-wait>]"
+msgstr ""
+"<name><threads><max-wait>cúntóir tástála simple-ipc tosaigh daemon [] [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc stop-daemon [<name>] [<max-wait>]"
+msgstr "<name><max-wait>cúntóir tástála simple-ipc stad-daemon [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc send [<name>] [<token>]"
+msgstr "<name><token>cúntóir tástála simple-ipc seol [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid "test-helper simple-ipc sendbytes [<name>] [<bytecount>] [<byte>]"
+msgstr "<name><bytecount><byte>test-helper simple-ipc sendbytes [] [] []"
+
+#: t/helper/test-simple-ipc.c
+msgid ""
+"test-helper simple-ipc multiple [<name>] [<threads>] [<bytecount>] "
+"[<batchsize>]"
+msgstr ""
+"test-helper simple-ipc multiple [<name>] [<threads>] [<bytecount>] "
+"[<batchsize>]"
+
+#: t/helper/test-simple-ipc.c
+msgid "name or pathname of unix domain socket"
+msgstr "ainm nó ainm cosán soicéad fearainn unix"
+
+#: t/helper/test-simple-ipc.c
+msgid "named-pipe name"
+msgstr "ainm píopa ainmnithe"
+
+#: t/helper/test-simple-ipc.c
+msgid "number of threads in server thread pool"
+msgstr "líon na snáitheanna i linn snáithe freastalaí"
+
+#: t/helper/test-simple-ipc.c
+msgid "seconds to wait for daemon to start or stop"
+msgstr "soicind chun fanacht go dtosóidh nó stopfaidh an daemon"
+
+#: t/helper/test-simple-ipc.c
+msgid "number of bytes"
+msgstr "líon na mbetaí"
+
+#: t/helper/test-simple-ipc.c
+msgid "number of requests per thread"
+msgstr "líon iarratais in aghaidh an snáithe"
+
+#: t/helper/test-simple-ipc.c
+msgid "byte"
+msgstr "bith"
+
+#: t/helper/test-simple-ipc.c
+msgid "ballast character"
+msgstr "carachtar balasta"
+
+#: t/helper/test-simple-ipc.c
+msgid "token"
+msgstr "comhartha"
+
+#: t/helper/test-simple-ipc.c
+msgid "command token to send to the server"
+msgstr "comhartha ordaithe le seoladh chuig an bhfreastalaí"
+
+#: t/unit-tests/unit-test.c
+msgid "unit-test [<options>]"
+msgstr "unit-test [<options>]"
+
+#: t/unit-tests/unit-test.c
+msgid "immediately exit upon the first failed test"
+msgstr "imeacht láithreach ar an gcéad tástáil theip"
+
+#: t/unit-tests/unit-test.c
+msgid "suite[::test]"
+msgstr "suite [::test]"
+
+#: t/unit-tests/unit-test.c
+msgid "run only test suite or individual test <suite[::test]>"
+msgstr "reáchtáil ach sraith tástála nó tástáil aonair <suite [::test] >"
+
+#: t/unit-tests/unit-test.c
+msgid "suite"
+msgstr "svuít"
+
+#: t/unit-tests/unit-test.c
+msgid "exclude test suite <suite>"
+msgstr "sraith tástála a eisiamh <suite>"
+
+#: trailer.c
+#, c-format
+msgid "running trailer command '%s' failed"
+msgstr "theip ar an ordú leantóir '%s' a rith"
+
+#: trailer.c
+#, c-format
+msgid "unknown value '%s' for key '%s'"
+msgstr "luach anaithnid '%s' don eochair '%s'"
+
+#: trailer.c
+#, c-format
+msgid "empty trailer token in trailer '%.*s'"
+msgstr "comhartha leantóra folamh i leantóir '%.*s'"
+
+#: transport-helper.c
+msgid "full write to remote helper failed"
+msgstr "theip ar scríobh iomlán chuig cianchúntóir"
+
+#: transport-helper.c
+#, c-format
+msgid "unable to find remote helper for '%s'"
+msgstr "in ann cúntóir iargúlta a aimsiú do '%s'"
+
+#: transport-helper.c
+msgid "can't dup helper output fd"
+msgstr "ní féidir le aschur cúntóra fd a dhéanamh"
+
+#: transport-helper.c
+#, c-format
+msgid ""
+"unknown mandatory capability %s; this remote helper probably needs newer "
+"version of Git"
+msgstr ""
+"cumas éigeantach anaithnid %s; is dócha go mbeidh leagan níos nuaí de Git ag "
+"teastáil ó"
+
+#: transport-helper.c
+msgid "this remote helper should implement refspec capability"
+msgstr "ba cheart go gcuirfeadh an cúntóir cianda seo cumas refspec"
+
+#: transport-helper.c
+#, c-format
+msgid "%s unexpectedly said: '%s'"
+msgstr "Dúirt %s gan choinne: '%s'"
+
+#: transport-helper.c
+#, c-format
+msgid "%s also locked %s"
+msgstr "Glas %s freisin %s"
+
+#: transport-helper.c
+msgid "couldn't run fast-import"
+msgstr "ní raibh in ann allmhairiú tapa a reá"
+
+#: transport-helper.c
+msgid "error while running fast-import"
+msgstr "earráid agus iompórtáil tapa á rith"
+
+#: transport-helper.c
+#, c-format
+msgid "could not read ref %s"
+msgstr "ní raibh in ann tagairt %s a léamh"
+
+#: transport-helper.c
+#, c-format
+msgid "unknown response to connect: %s"
+msgstr "freagra anaithnid chun nascadh: %s"
+
+#: transport-helper.c
+msgid "setting remote service path not supported by protocol"
+msgstr "cosán seirbhíse iargúlta a shocrú nach dtacaíonn"
+
+#: transport-helper.c
+msgid "invalid remote service path"
+msgstr "cosán seirbhíse iargúlta"
+
+#: transport-helper.c
+#, c-format
+msgid "can't connect to subservice %s"
+msgstr "ní féidir nasc a dhéanamh le fo-sheirbhís %s"
+
+#: transport-helper.c transport.c
+msgid "--negotiate-only requires protocol v2"
+msgstr "--negotiate-only ag teastáil prótacal v2"
+
+#: transport-helper.c
+msgid "'option' without a matching 'ok/error' directive"
+msgstr "'roghan' gan treoir 'ok/earráid' a mheaitseáil"
+
+#: transport-helper.c
+#, c-format
+msgid "expected ok/error, helper said '%s'"
+msgstr "súil le ok/earráid, dúirt an cúntóir '%s'"
+
+#: transport-helper.c
+#, c-format
+msgid "helper reported unexpected status of %s"
+msgstr "thuairiscigh cúntóir stádas gan choinne %s"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support dry-run"
+msgstr "ní thacaíonn cúntóir %s le rith tirim"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support --signed"
+msgstr "ní thacaíonn cúntóir %s le --signed"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support --signed=if-asked"
+msgstr "ní thacaíonn cúntóir %s le --signed=if-iarrtha"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support --atomic"
+msgstr "ní thacaíonn cúntóir %s le --atomic"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support --%s"
+msgstr "ní thacaíonn cúntóir %s le --%s"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support 'push-option'"
+msgstr "ní thacaíonn cúntóir %s le 'push-rogha'"
+
+#: transport-helper.c
+msgid "remote-helper doesn't support push; refspec needed"
+msgstr "ní thacaíonn cúntóir iargúlta le brú; teastaíonn refspec"
+
+#: transport-helper.c
+#, c-format
+msgid "helper %s does not support '--force'"
+msgstr "ní thacaíonn cúntóir %s le '--force'"
+
+#: transport-helper.c
+msgid "couldn't run fast-export"
+msgstr "ní raibh sé in ann onnmhairiú tapa a"
+
+#: transport-helper.c
+msgid "error while running fast-export"
+msgstr "earráid agus easpórtáil tapa á rith"
+
+#: transport-helper.c
+#, c-format
+msgid ""
+"No refs in common and none specified; doing nothing.\n"
+"Perhaps you should specify a branch.\n"
+msgstr ""
+"Níl aon réimsí i gcoiteann agus níl aon cheann sonraithe; ní dhéanann aon "
+"rud.\n"
+"B'fhéidir gur chóir duit brainse a shonrú.\n"
+
+#: transport-helper.c
+#, c-format
+msgid "unsupported object format '%s'"
+msgstr "formáid réad gan tacaíocht '%s'"
+
+#: transport-helper.c
+#, c-format
+msgid "malformed response in ref list: %s"
+msgstr "freagra mífhoirmithe sa liosta tagartha: %s"
+
+#: transport-helper.c
+#, c-format
+msgid "read(%s) failed"
+msgstr "theip ar léamh (%s)"
+
+#: transport-helper.c
+#, c-format
+msgid "write(%s) failed"
+msgstr "theip ar scríobh (%s)"
+
+#: transport-helper.c
+#, c-format
+msgid "%s thread failed"
+msgstr "Theip ar snáithe %s"
+
+#: transport-helper.c
+#, c-format
+msgid "%s thread failed to join: %s"
+msgstr "Theip ar shnáithe %s a bheith páirteach: %s"
+
+#: transport-helper.c
+#, c-format
+msgid "can't start thread for copying data: %s"
+msgstr "ní féidir snáithe a thosú chun sonraí a chóipeáil: %s"
+
+#: transport-helper.c
+#, c-format
+msgid "%s process failed to wait"
+msgstr "Theip ar phróiseas %s fanacht"
+
+#: transport-helper.c
+#, c-format
+msgid "%s process failed"
+msgstr "Theip ar phróiseas %s"
+
+#: transport-helper.c
+msgid "can't start thread for copying data"
+msgstr "ní féidir snáithe a thosú chun sonraí a chóipe"
+
+#: transport.c
+#, c-format
+msgid "Would set upstream of '%s' to '%s' of '%s'\n"
+msgstr "Socródh sé suas sruth de '%s' go '%s' de '%s'\n"
+
+#: transport.c
+#, c-format
+msgid "could not read bundle '%s'"
+msgstr "ní fhéadfaí beartán '%s' a léamh"
+
+#: transport.c
+#, c-format
+msgid "transport: invalid depth option '%s'"
+msgstr "iompar: rogha doimhneachta neamhbhailí '%s'"
+
+#: transport.c
+msgid "see protocol.version in 'git help config' for more details"
+msgstr ""
+"féach protocol.version in 'git help config' le haghaidh tuilleadh sonraí"
+
+#: transport.c
+msgid "server options require protocol version 2 or later"
+msgstr "teastaíonn leagan prótacal 2 nó níos déanaí ó roghanna"
+
+#: transport.c
+msgid "server does not support wait-for-done"
+msgstr "ní thacaíonn freastalaí le fanacht le déanamh"
+
+#: transport.c
+msgid "could not parse transport.color.* config"
+msgstr "ní fhéadfaí transport.color.* config a pháirseáil"
+
+#: transport.c
+msgid "support for protocol v2 not implemented yet"
+msgstr "tacaíocht do phrótacal v2 nach bhfuil curtha i bhfeidhm"
+
+#: transport.c
+#, c-format
+msgid "transport '%s' not allowed"
+msgstr "ní cheadaítear iompar '%s'"
+
+#: transport.c
+msgid "git-over-rsync is no longer supported"
+msgstr "ní thacaítear le git-over-rsync a thuilleadh"
+
+#: transport.c
+#, c-format
+msgid ""
+"The following submodule paths contain changes that can\n"
+"not be found on any remote:\n"
+msgstr ""
+"Tá athruithe ar féidir leis na cosáin fo-mhodúil seo a leanas\n"
+"nach bhfuil le fáil ar aon iargúlta:\n"
+
+#: transport.c
+#, c-format
+msgid ""
+"\n"
+"Please try\n"
+"\n"
+"\tgit push --recurse-submodules=on-demand\n"
+"\n"
+"or cd to the path and use\n"
+"\n"
+"\tgit push\n"
+"\n"
+"to push them to a remote.\n"
+"\n"
+msgstr ""
+"\n"
+"Déan iarracht\n"
+"\n"
+"\tgit push --recurse-submodules=on-demand\n"
+"\n"
+"nó cd chuig an gcosán agus úsáid\n"
+"\n"
+" Brúigh git\n"
+"\n"
+"chun iad a bhrú chuig iargúlta.\n"
+
+#: transport.c
+msgid "Aborting."
+msgstr "Ag gearradh."
+
+#: transport.c
+msgid "failed to push all needed submodules"
+msgstr "theip ar gach fo-mhodúl riachtanach a bhrú"
+
+#: transport.c
+msgid "bundle-uri operation not supported by protocol"
+msgstr "oibríocht bundle-uri nach dtacaíonn prótacal"
+
+#: transport.c
+msgid "could not retrieve server-advertised bundle-uri list"
+msgstr "ní fhéadfaí liosta bundle-uri a fógraíodh ag freastalaí a aisghab"
+
+#: transport.c
+msgid "operation not supported by protocol"
+msgstr "oibriú nach dtacaíonn prótacal"
+
+#: tree-walk.c
+msgid "too-short tree object"
+msgstr "réad crann ró-ghearr"
+
+#: tree-walk.c
+msgid "malformed mode in tree entry"
+msgstr "modh mífhoirmithe i iontráil crann"
+
+#: tree-walk.c
+msgid "empty filename in tree entry"
+msgstr "ainm comhaid folamh i iontráil crann"
+
+#: tree-walk.c
+msgid "too-short tree file"
+msgstr "comhad crann ró-ghearr"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by checkout:\n"
+"%%sPlease commit your changes or stash them before you switch branches."
+msgstr ""
+"Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh trí "
+"sheiceáil:\n"
+"%%sDéan d'athruithe nó déan iad a stóráil sula n-athraíonn tú brainsí."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by checkout:\n"
+"%%s"
+msgstr ""
+"Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh trí "
+"sheiceáil:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by merge:\n"
+"%%sPlease commit your changes or stash them before you merge."
+msgstr ""
+"Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh trí "
+"chumasc:\n"
+"%%sDo chuid athruithe a dhéanamh nó cuir isteach iad sula ndéanann tú a "
+"chumasc."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by merge:\n"
+"%%s"
+msgstr ""
+"Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh trí "
+"chumasc:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by %s:\n"
+"%%sPlease commit your changes or stash them before you %s."
+msgstr ""
+"Déanfadh %s d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh:\n"
+"%%sDéan do chuid athruithe nó iad a stóráil os comhair %s."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Your local changes to the following files would be overwritten by %s:\n"
+"%%s"
+msgstr ""
+"Déanfadh %s d'athruithe áitiúla ar na comhaid seo a leanas a fhorscríobh:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Updating the following directories would lose untracked files in them:\n"
+"%s"
+msgstr ""
+"Chaillfeadh na n-eolairí seo a leanas a nuashonrú comhaid gan rianú iontu:\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Refusing to remove the current working directory:\n"
+"%s"
+msgstr ""
+"Diúltú an eolaire oibre reatha a bhaint:\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by checkout:\n"
+"%%sPlease move or remove them before you switch branches."
+msgstr ""
+"Bainfí na comhaid crann oibre gan rianú seo a leanas trí sheiceáil:\n"
+"%%sBogadh nó bain iad sula n-athraíonn tú brainsí."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by checkout:\n"
+"%%s"
+msgstr ""
+"Bainfí na comhaid crann oibre gan rianú seo a leanas trí sheiceáil:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by merge:\n"
+"%%sPlease move or remove them before you merge."
+msgstr ""
+"Bainfí na comhaid crann oibre gan rianú seo a leanas trí chumasc:\n"
+"%%sDo thoil bog nó bain iad sula ndéanann tú a chumasc."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by merge:\n"
+"%%s"
+msgstr ""
+"Bainfí na comhaid crann oibre gan rianú seo a leanas trí chumasc:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by %s:\n"
+"%%sPlease move or remove them before you %s."
+msgstr ""
+"Bainfí %s na comhaid crann oibre neamhrianaithe seo a leanas:\n"
+"%%sDo thoil bog nó bain iad roimh %s."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be removed by %s:\n"
+"%%s"
+msgstr ""
+"Bainfí %s na comhaid crann oibre neamhrianaithe seo a leanas:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by "
+"checkout:\n"
+"%%sPlease move or remove them before you switch branches."
+msgstr ""
+"Déanfaí na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh trí "
+"sheiceáil:\n"
+"%%sBogadh nó bain iad sula n-athraíonn tú brainsí."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by "
+"checkout:\n"
+"%%s"
+msgstr ""
+"Déanfaí na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh trí "
+"sheiceáil:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by merge:\n"
+"%%sPlease move or remove them before you merge."
+msgstr ""
+"Déanfaí na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh trí "
+"chumasc:\n"
+"%%sDo thoil bog nó bain iad sula ndéanann tú cumasc."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by merge:\n"
+"%%s"
+msgstr ""
+"Déanfaí na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh trí "
+"chumasc:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by %s:\n"
+"%%sPlease move or remove them before you %s."
+msgstr ""
+"Bheadh %s na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh:\n"
+"%%sDo thoil bog nó bain iad roimh %s."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following untracked working tree files would be overwritten by %s:\n"
+"%%s"
+msgstr ""
+"Bheadh %s na comhaid crann oibre neamhrianaithe seo a leanas a fhorscríobh:\n"
+"%%s"
+
+#: unpack-trees.c
+#, c-format
+msgid "Entry '%s' overlaps with '%s'. Cannot bind."
+msgstr "Tá iontráil '%s' ag forluí le '%s'. Ní féidir ceangal a dhéanamh."
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"Cannot update submodule:\n"
+"%s"
+msgstr ""
+"Ní féidir fo-mhodúl a nuashonrú:\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following paths are not up to date and were left despite sparse "
+"patterns:\n"
+"%s"
+msgstr ""
+"Níl na cosáin seo a leanas cothrom le dáta agus fágadh iad in ainneoin "
+"patrúin neamhchoitianta:\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following paths are unmerged and were left despite sparse patterns:\n"
+"%s"
+msgstr ""
+"Tá na cosáin seo a leanas gan chumasc agus fágadh iad in ainneoin patrúin "
+"neamhchoitianta:\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"The following paths were already present and thus not updated despite sparse "
+"patterns:\n"
+"%s"
+msgstr ""
+"Bhí na cosáin seo a leanas i láthair cheana féin agus dá bhrí sin níor "
+"nuashonraíodh in ainneoin\n"
+"%s"
+
+#: unpack-trees.c
+#, c-format
+msgid "Aborting\n"
+msgstr "Gearradh\n"
+
+#: unpack-trees.c
+#, c-format
+msgid ""
+"After fixing the above paths, you may want to run `git sparse-checkout "
+"reapply`.\n"
+msgstr ""
+"Tar éis duit na cosáin thuas a shocrú, b'fhéidir gur mhaith leat `git sparse-"
+"checkout reapply` a reáchtáil.\n"
+
+#: unpack-trees.c
+msgid "Updating files"
+msgstr "Comhad a nuashonrú"
+
+#: unpack-trees.c
+msgid ""
+"the following paths have collided (e.g. case-sensitive paths\n"
+"on a case-insensitive filesystem) and only one from the same\n"
+"colliding group is in the working tree:\n"
+msgstr ""
+"bhuail na cosáin seo a leanas (e.g. cosáin cás-íogair\n"
+"ar chóras comhaid cás-neamh-íogair) agus ach ceann amháin ón gcéanna\n"
+"tá grúpa imbhuailte sa chrann oibre:\n"
+
+#: unpack-trees.c
+msgid "Updating index flags"
+msgstr "Nuashonrú bratacha innéacs"
+
+#: unpack-trees.c
+#, c-format
+msgid "worktree and untracked commit have duplicate entries: %s"
+msgstr ""
+"tá iontrálacha dúbailte ag crann oibre agus tiomantas neamhrianaithe: %s"
+
+#: upload-pack.c
+msgid "expected flush after fetch arguments"
+msgstr "súil le sruth tar éis argóintí a fháil"
+
+#: urlmatch.c
+msgid "invalid URL scheme name or missing '://' suffix"
+msgstr "ainm scéime URL neamhbhailí nó iarmhír ': //' in easnamh"
+
+#: urlmatch.c
+#, c-format
+msgid "invalid %XX escape sequence"
+msgstr "seicheamh éalaithe %XX neamhbhailí"
+
+#: urlmatch.c
+msgid "missing host and scheme is not 'file:'"
+msgstr "ní 'comhad: 'í an óstach agus an scéim atá in easnamh:"
+
+#: urlmatch.c
+msgid "a 'file:' URL may not have a port number"
+msgstr "b'fhéidir nach mbeadh uimhir chalafoirt ag URL 'file: '"
+
+#: urlmatch.c
+msgid "invalid characters in host name"
+msgstr "carachtair neamhbhailí in ainm ósta"
+
+#: urlmatch.c
+msgid "invalid port number"
+msgstr "uimhir phort neamhbhail"
+
+#: urlmatch.c
+msgid "invalid '..' path segment"
+msgstr "deighleog cosáin '..' neamhbhailí"
+
+#: usage.c
+#, c-format
+msgid "error: unable to format message: %s\n"
+msgstr "earráid: ní féidir teachtaireacht a fhormáidiú: %s\n"
+
+#: usage.c
+msgid "usage: "
+msgstr "úsáid: "
+
+#: usage.c
+msgid "fatal: "
+msgstr "marfach: "
+
+#: usage.c
+msgid "error: "
+msgstr "earráid: "
+
+#: usage.c
+msgid "warning: "
+msgstr "rabhadh: "
+
+#: version.c
+#, c-format
+msgid "uname() failed with error '%s' (%d)\n"
+msgstr "theip ar uname () le earráid '%s' (%d)\n"
+
+#: walker.c
+msgid "Fetching objects"
+msgstr "Rudaí a fháil"
+
+#: worktree.c
+#, c-format
+msgid "'%s' at main working tree is not the repository directory"
+msgstr "Ní hé '%s' ag an bpríomhchrann oibre an eolaire stórais"
+
+#: worktree.c
+#, c-format
+msgid "'%s' file does not contain absolute path to the working tree location"
+msgstr "Níl cosán iomlán chuig suíomh an chrainn oibre i gcomhad '%s'"
+
+#: worktree.c
+#, c-format
+msgid "'%s' is not a .git file, error code %d"
+msgstr "Ní comhad .git é '%s', cód earráide %d"
+
+#: worktree.c
+#, c-format
+msgid "'%s' does not point back to '%s'"
+msgstr "Ní dhíríonn '%s' ar ais chuig '%s'"
+
+#: worktree.c
+msgid "not a directory"
+msgstr "ní eolaire"
+
+#: worktree.c
+msgid ".git is not a file"
+msgstr "Ní comhad é .git"
+
+#: worktree.c
+msgid ".git file broken"
+msgstr "comhad .git briste"
+
+#: worktree.c
+msgid ".git file incorrect"
+msgstr "comhad .git mícheart"
+
+#: worktree.c
+msgid ".git file absolute/relative path mismatch"
+msgstr "comhad .git neamhoiriúnú iomlán/coibhneasta coibhneasta"
+
+#: worktree.c
+msgid "not a valid path"
+msgstr "ní cosán bailí"
+
+#: worktree.c
+msgid "unable to locate repository; .git is not a file"
+msgstr "in ann stór a aimsiú; ní comhad é .git"
+
+#: worktree.c
+msgid "unable to locate repository; .git file does not reference a repository"
+msgstr "in ann stór a aimsiú; ní thagann comhad .git tagairt do stór"
+
+#: worktree.c
+msgid "unable to locate repository; .git file broken"
+msgstr "in ann stór a aimsiú; comhad .git briste"
+
+#: worktree.c
+msgid "gitdir unreadable"
+msgstr "gitdir unreadable"
+
+#: worktree.c
+msgid "gitdir absolute/relative path mismatch"
+msgstr "mímheaitseáil cosán iomlán/coibhneasta gitdir"
+
+#: worktree.c
+msgid "gitdir incorrect"
+msgstr "gitdir mícheart"
+
+#: worktree.c
+msgid "not a valid directory"
+msgstr "ní eolaire bailí"
+
+#: worktree.c
+msgid "gitdir file does not exist"
+msgstr "níl comhad gitdir ann"
+
+#: worktree.c
+#, c-format
+msgid "unable to read gitdir file (%s)"
+msgstr "nach féidir comhad gitdir a léamh (%s)"
+
+#: worktree.c
+#, c-format
+msgid "short read (expected %<PRIuMAX> bytes, read %<PRIuMAX>)"
+msgstr "léamh gearr (súil leis%<PRIuMAX>bytes, léithe%<PRIuMAX>)"
+
+#: worktree.c
+msgid "invalid gitdir file"
+msgstr "comhad gitdir neamhbhailí"
+
+#: worktree.c
+msgid "gitdir file points to non-existent location"
+msgstr "pointeálann comhad gitdir chuig suíomh nach bhfuil ann"
+
+#: worktree.c
+#, c-format
+msgid "unable to set %s in '%s'"
+msgstr "nach féidir %s a shocrú i '%s'"
+
+#: worktree.c
+#, c-format
+msgid "unable to unset %s in '%s'"
+msgstr "nach féidir %s a dhíshocrú i '%s'"
+
+#: worktree.c
+msgid "failed to set extensions.worktreeConfig setting"
+msgstr "theip ar shocrú extensions.worktreeConfig"
+
+#: worktree.c
+msgid "unable to upgrade repository format to support relative worktrees"
+msgstr "in ann formáid stórais a uasghrádú chun tacú le crainn oibre coibh"
+
+#: worktree.c
+msgid "unable to set extensions.relativeWorktrees setting"
+msgstr "ní féidir an socrú extensions.relativeWorktrees a shocrú"
+
+#: wrapper.c
+#, c-format
+msgid "could not setenv '%s'"
+msgstr "ní fhéadfaí '%s' a shocrú"
+
+#: wrapper.c
+#, c-format
+msgid "unable to create '%s'"
+msgstr "ní féidir '%s' a chruthú"
+
+#: wrapper.c
+#, c-format
+msgid "could not open '%s' for reading and writing"
+msgstr "ní fhéadfaí '%s' a oscailt le haghaidh léamh agus scríbhneoireachta"
+
+#: wrapper.c
+#, c-format
+msgid "unable to access '%s'"
+msgstr "ní féidir rochtain a fháil ar '%s'"
+
+#: wrapper.c
+msgid "unable to get current working directory"
+msgstr "in ann eolaire oibre reatha a fháil"
+
+#: wrapper.c
+msgid "unable to get random bytes"
+msgstr "in ann bétaí randamacha a fháil"
+
+#: wrapper.c
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "ag iarraidh mmapáil %<PRIuMAX> thar theorainn %<PRIuMAX>"
+
+#: wrapper.c
+#, c-format
+msgid "mmap failed%s"
+msgstr "theip ar mmap %s"
+
+#: wt-status.c
+msgid "Unmerged paths:"
+msgstr "Cosáin neamh-chumasaithe:"
+
+#: wt-status.c
+msgid " (use \"git restore --staged <file>...\" to unstage)"
+msgstr ""
+" (bain úsáid as “git restore --staged <comhad>...” chun an stáitse a dhíchur)"
+
+#: wt-status.c
+#, c-format
+msgid " (use \"git restore --source=%s --staged <file>...\" to unstage)"
+msgstr ""
+" (bain úsáid as \"git restore --source=%s --staged <comhad>...\" chun an "
+"stáitse a dhí-ardú)"
+
+#: wt-status.c
+msgid " (use \"git rm --cached <file>...\" to unstage)"
+msgstr ""
+" (bain úsáid as “git rm --cached <comhad>...” chun an stáitse a dhíchur)"
+
+#: wt-status.c
+msgid " (use \"git add <file>...\" to mark resolution)"
+msgstr " (bain úsáid as “git add <comhad>...” chun réiteach a mharcáil)"
+
+#: wt-status.c
+msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr ""
+" (bain úsáid \"git add/rm <comhad>...\" de réir mar is cuí chun réiteach a "
+"mharcáil)"
+
+#: wt-status.c
+msgid " (use \"git rm <file>...\" to mark resolution)"
+msgstr " (bain úsáid as “git rm <comhad>...” chun réiteach a mharcáil)"
+
+#: wt-status.c
+msgid "Changes to be committed:"
+msgstr "Athruithe atá le déanamh:"
+
+#: wt-status.c
+msgid "Changes not staged for commit:"
+msgstr "Athruithe nach ndearnadh a chur ar stáitse le haghaidh tiomantais:"
+
+#: wt-status.c
+msgid " (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+" (bain úsáid as “git add <comhad>...” chun an méid a bheidh tiomanta a "
+"nuashonrú)"
+
+#: wt-status.c
+msgid " (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+" (bain úsáid as “git add/rm <comhad>...” chun an méid a bheidh tiomanta a "
+"nuashonrú)"
+
+#: wt-status.c
+msgid ""
+" (use \"git restore <file>...\" to discard changes in working directory)"
+msgstr ""
+" (bain úsáid as “git restore <comhad>...” chun athruithe ar eolaire oibre a "
+"dhiúscairt)"
+
+#: wt-status.c
+msgid " (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+" (an t-ábhar neamhrianaithe nó modhnaithe i bhfo-mhodúil a thiomsú nó a "
+"dhiúscairt)"
+
+#: wt-status.c
+#, c-format
+msgid " (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+" (bain úsáid as “git %s <comhad>...” chun an méid a bheidh tiomanta san "
+"áireamh)"
+
+#: wt-status.c
+msgid "both deleted:"
+msgstr "scriosta an dá cheann:"
+
+#: wt-status.c
+msgid "added by us:"
+msgstr "curtha leis againn:"
+
+#: wt-status.c
+msgid "deleted by them:"
+msgstr "scriosta ag siad:"
+
+#: wt-status.c
+msgid "added by them:"
+msgstr "a chuir siad leis:"
+
+#: wt-status.c
+msgid "deleted by us:"
+msgstr "scriosta againn:"
+
+#: wt-status.c
+msgid "both added:"
+msgstr "chuir an bheirt leis:"
+
+#: wt-status.c
+msgid "both modified:"
+msgstr "an dá cheann modhnaithe:"
+
+#: wt-status.c
+msgid "new file:"
+msgstr "comhad nua:"
+
+#: wt-status.c
+msgid "copied:"
+msgstr "cóipeáilte:"
+
+#: wt-status.c
+msgid "deleted:"
+msgstr "scriosta:"
+
+#: wt-status.c
+msgid "modified:"
+msgstr "modhnaithe:"
+
+#: wt-status.c
+msgid "renamed:"
+msgstr "athainmnithe:"
+
+#: wt-status.c
+msgid "typechange:"
+msgstr "cineál cineál:"
+
+#: wt-status.c
+msgid "unknown:"
+msgstr "anaithnid:"
+
+#: wt-status.c
+msgid "unmerged:"
+msgstr "gan chumasc:"
+
+#: wt-status.c
+msgid "new commits, "
+msgstr "tiomantais nua, "
+
+#: wt-status.c
+msgid "modified content, "
+msgstr "ábhar modhnaithe, "
+
+#: wt-status.c
+msgid "untracked content, "
+msgstr "ábhar neamhrianaithe, "
+
+#: wt-status.c
+#, c-format
+msgid "Your stash currently has %d entry"
+msgid_plural "Your stash currently has %d entries"
+msgstr[0] "Tá %d iontráil i do stash faoi láthair"
+msgstr[1] "Tá %d iontrálacha ar do stash faoi láthair"
+msgstr[2] "Tá %d iontrálacha ar do stash faoi láthair"
+
+#: wt-status.c
+msgid "Submodules changed but not updated:"
+msgstr "Fo-mhodúil athraithe ach gan nuashonrú:"
+
+#: wt-status.c
+msgid "Submodule changes to be committed:"
+msgstr "Athruithe fo-mhodúil atá le tiomantas:"
+
+#: wt-status.c
+msgid ""
+"Do not modify or remove the line above.\n"
+"Everything below it will be ignored."
+msgstr ""
+"Ná déan an líne thuas a mhodhnú ná a bhaint.\n"
+"Déanfar neamhaird ar gach rud thíos é."
+
+#: wt-status.c
+#, c-format
+msgid ""
+"\n"
+"It took %.2f seconds to compute the branch ahead/behind values.\n"
+"You can use '--no-ahead-behind' to avoid this.\n"
+msgstr ""
+"\n"
+"Thóg sé %.2f soicind chun luachanna na brainse chun tosaigh/taobh thiar a "
+"ríomh.\n"
+"Is féidir leat '--no-ahead-behind' a úsáid chun seo a sheachaint.\n"
+
+#: wt-status.c
+msgid "You have unmerged paths."
+msgstr "Tá cosáin neamh-chumasaithe agat."
+
+#: wt-status.c
+msgid " (fix conflicts and run \"git commit\")"
+msgstr " (coinbhleachtaí a shocrú agus reáchtáil “git commit”)"
+
+#: wt-status.c
+msgid " (use \"git merge --abort\" to abort the merge)"
+msgstr ""
+" (bain úsáid as “git merge --abort” chun an cumaisc a chur ar deireadh)"
+
+#: wt-status.c
+msgid "All conflicts fixed but you are still merging."
+msgstr "Socraíodh gach coinbhleacht ach tá tú fós ag cumasc."
+
+#: wt-status.c
+msgid " (use \"git commit\" to conclude merge)"
+msgstr " (bain úsáid as “git commit” chun cumasc a thabhairt i gcrích)"
+
+#: wt-status.c
+msgid "You are in the middle of an am session."
+msgstr "Tá tú i lár seisiún am."
+
+#: wt-status.c
+msgid "The current patch is empty."
+msgstr "Tá an paiste reatha folamh."
+
+#: wt-status.c
+msgid " (fix conflicts and then run \"git am --continue\")"
+msgstr " (déan coinbhleachtaí a shocrú agus ansin rith “git am --continue”)"
+
+#: wt-status.c
+msgid " (use \"git am --skip\" to skip this patch)"
+msgstr " (bain úsáid as “git am --skip” chun an paiste seo a scipeáil)"
+
+#: wt-status.c
+msgid ""
+" (use \"git am --allow-empty\" to record this patch as an empty commit)"
+msgstr ""
+" (bain úsáid as “git am --allow-empty” chun an paiste seo a thaifeadadh mar "
+"thiomantas folamh)"
+
+#: wt-status.c
+msgid " (use \"git am --abort\" to restore the original branch)"
+msgstr ""
+" (bain úsáid as “git am --abort” chun an bhrainse bunaidh a chur ar ais)"
+
+#: wt-status.c
+msgid "git-rebase-todo is missing."
+msgstr "tá git-rebase-todo ar iarraidh."
+
+#: wt-status.c
+msgid "No commands done."
+msgstr "Níl aon orduithe déanta."
+
+#: wt-status.c
+#, c-format
+msgid "Last command done (%<PRIuMAX> command done):"
+msgid_plural "Last commands done (%<PRIuMAX> commands done):"
+msgstr[0] "An chéad ordú eile le déanamh (%<PRIuMAX>ordú atá fágtha):"
+msgstr[1] "Na chéad orduithe eile le déanamh (%<PRIuMAX> orduithe atá fágtha):"
+msgstr[2] "Na chéad orduithe eile le déanamh (%<PRIuMAX> orduithe atá fágtha):"
+
+#: wt-status.c
+#, c-format
+msgid " (see more in file %s)"
+msgstr " (féach tuilleadh i gcomhad %s)"
+
+#: wt-status.c
+msgid "No commands remaining."
+msgstr "Níl aon orduithe fágtha."
+
+#: wt-status.c
+#, c-format
+msgid "Next command to do (%<PRIuMAX> remaining command):"
+msgid_plural "Next commands to do (%<PRIuMAX> remaining commands):"
+msgstr[0] "An chéad ordú eile le déanamh (%<PRIuMAX> an t-ordú atá fágtha):"
+msgstr[1] "Na chéad orduithe eile le déanamh (%<PRIuMAX> orduithe atá fágtha):"
+msgstr[2] "Na chéad orduithe eile le déanamh (%<PRIuMAX> orduithe atá fágtha):"
+
+#: wt-status.c
+msgid " (use \"git rebase --edit-todo\" to view and edit)"
+msgstr ""
+" (bain úsáid as “git rebase --edit-todo” chun féachaint agus eagar a chur in "
+"eagar)"
+
+#: wt-status.c
+#, c-format
+msgid "You are currently rebasing branch '%s' on '%s'."
+msgstr "Tá tú ag athbhunú brainse '%s' faoi láthair ar '%s'."
+
+#: wt-status.c
+msgid "You are currently rebasing."
+msgstr "Tá tú ag athbhunú faoi láthair."
+
+#: wt-status.c
+msgid " (fix conflicts and then run \"git rebase --continue\")"
+msgstr ""
+" (déan coinbhleachtaí a shocrú agus ansin rith “git rebase --continue”)"
+
+#: wt-status.c
+msgid " (use \"git rebase --skip\" to skip this patch)"
+msgstr " (bain úsáid as “git rebase --skip” chun an paiste seo a scipeáil)"
+
+#: wt-status.c
+msgid " (use \"git rebase --abort\" to check out the original branch)"
+msgstr ""
+" (bain úsáid as “git rebase --abort” chun an bhrainse bunaidh a sheiceáil)"
+
+#: wt-status.c
+msgid " (all conflicts fixed: run \"git rebase --continue\")"
+msgstr " (gach coinbhleacht socraithe: reáchtáil “git rebase --continue”)"
+
+#: wt-status.c
+#, c-format
+msgid ""
+"You are currently splitting a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Tá tiomantas á roinnt agat faoi láthair agus tú ag athbhunú brainse '%s' ar "
+"'%s'."
+
+#: wt-status.c
+msgid "You are currently splitting a commit during a rebase."
+msgstr "Tá tú ag roinnt tiomantas faoi láthair le linn athbhunaithe."
+
+#: wt-status.c
+msgid " (Once your working directory is clean, run \"git rebase --continue\")"
+msgstr ""
+" (Nuair a bheidh d'eolaire oibre glan, reáchtáil “git rebase --continue”)"
+
+#: wt-status.c
+#, c-format
+msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
+msgstr ""
+"Tá tú ag eagarthóireacht faoi láthair agus tú ag athbhunú brainse '%s' ar "
+"'%s'."
+
+#: wt-status.c
+msgid "You are currently editing a commit during a rebase."
+msgstr "Tá tú ag eagarthóireacht tiomanta faoi láthair le linn athbhunaithe."
+
+#: wt-status.c
+msgid " (use \"git commit --amend\" to amend the current commit)"
+msgstr " (bain úsáid as “git commit --amend” chun an tiomantas reatha a leasú)"
+
+#: wt-status.c
+msgid ""
+" (use \"git rebase --continue\" once you are satisfied with your changes)"
+msgstr ""
+" (bain úsáid as “git rebase --continue” nuair a bheidh tú sásta le "
+"d'athruithe)"
+
+#: wt-status.c
+msgid "Cherry-pick currently in progress."
+msgstr "Cherry-pick atá ar siúl faoi láthair."
+
+#: wt-status.c
+#, c-format
+msgid "You are currently cherry-picking commit %s."
+msgstr "Tá tiomantas %s ag piocadh silíní faoi láthair."
+
+#: wt-status.c
+msgid " (fix conflicts and run \"git cherry-pick --continue\")"
+msgstr " (coinbhleachtaí a shocrú agus reáchtáil “git cherry-pick --continue”)"
+
+#: wt-status.c
+msgid " (run \"git cherry-pick --continue\" to continue)"
+msgstr " (reáchtáil “git cherry-pick --continue ” chun leanúint ar aghaidh)"
+
+#: wt-status.c
+msgid " (all conflicts fixed: run \"git cherry-pick --continue\")"
+msgstr " (gach coinbhleacht socraithe: reáchtáil “git cherry-pick --continue”)"
+
+#: wt-status.c
+msgid " (use \"git cherry-pick --skip\" to skip this patch)"
+msgstr ""
+" (bain úsáid as “git cherry-pick --skip” chun an paiste seo a scipeáil)"
+
+#: wt-status.c
+msgid " (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"
+msgstr ""
+" (bain úsáid as “git cherry-pick --abort” chun an oibríocht pioc silíní a "
+"chealú)"
+
+#: wt-status.c
+msgid "Revert currently in progress."
+msgstr "Ar ais atá ar siúl faoi láthair."
+
+#: wt-status.c
+#, c-format
+msgid "You are currently reverting commit %s."
+msgstr "Tá tiomantas %s á chur ar ais faoi láthair."
+
+#: wt-status.c
+msgid " (fix conflicts and run \"git revert --continue\")"
+msgstr " (déan coinbhleachtaí a shocrú agus rith “git revert --continue”)"
+
+#: wt-status.c
+msgid " (run \"git revert --continue\" to continue)"
+msgstr " (reáchtáil “git revert --continue” chun leanúint ar aghaidh)"
+
+#: wt-status.c
+msgid " (all conflicts fixed: run \"git revert --continue\")"
+msgstr " (gach coinbhleacht socraithe: reáchtáil “git revert --continue”)"
+
+#: wt-status.c
+msgid " (use \"git revert --skip\" to skip this patch)"
+msgstr " (bain úsáid as “git revert --skip” chun an paiste seo a scipeáil)"
+
+#: wt-status.c
+msgid " (use \"git revert --abort\" to cancel the revert operation)"
+msgstr ""
+" (bain úsáid as “git revert --abort” chun an oibríocht aisghabhála a chealú)"
+
+#: wt-status.c
+#, c-format
+msgid "You are currently bisecting, started from branch '%s'."
+msgstr "Tá tú ag déileáil faoi láthair, tosaigh tú ó bhrainse '%s'."
+
+#: wt-status.c
+msgid "You are currently bisecting."
+msgstr "Tá tú ag déileáil faoi láthair."
+
+#: wt-status.c
+msgid " (use \"git bisect reset\" to get back to the original branch)"
+msgstr ""
+" (bain úsáid as “git bisect reset” chun filleadh ar an mbrainse bunaidh)"
+
+#: wt-status.c
+msgid "You are in a sparse checkout."
+msgstr "Tá tú i seiceáil neamhchoitianta."
+
+#: wt-status.c
+#, c-format
+msgid "You are in a sparse checkout with %d%% of tracked files present."
+msgstr ""
+"Tá tú i seiceáil neamhchoitianta le %d%% de na comhaid rianaithe i láthair."
+
+#: wt-status.c
+msgid "On branch "
+msgstr "Ar bhrainse "
+
+#: wt-status.c
+msgid "interactive rebase in progress; onto "
+msgstr "athbhunú idirghníomhach atá ar siúl; ar "
+
+#: wt-status.c
+msgid "rebase in progress; onto "
+msgstr "athbhunú atá ar siúl; ar "
+
+#: wt-status.c
+msgid "HEAD detached at "
+msgstr "HEAD scoite ag "
+
+#: wt-status.c
+msgid "HEAD detached from "
+msgstr "CEANN scartha ó "
+
+#: wt-status.c
+msgid "Not currently on any branch."
+msgstr "Níl sé ar aon bhrainse faoi láthair."
+
+#: wt-status.c
+msgid "Initial commit"
+msgstr "Tiomantas tosaigh"
+
+#: wt-status.c
+msgid "No commits yet"
+msgstr "Níl aon gealltanais fós"
+
+#: wt-status.c
+msgid "Untracked files"
+msgstr "Comhaid neamhrianaithe"
+
+#: wt-status.c
+msgid "Ignored files"
+msgstr "Comhaid neamhaird"
+
+#: wt-status.c
+#, c-format
+msgid ""
+"It took %.2f seconds to enumerate untracked files,\n"
+"but the results were cached, and subsequent runs may be faster."
+msgstr ""
+"Thóg sé %.2f soicind comhaid gan rianú a áireamh,\n"
+"ach cuireadh na torthaí a chosc, agus d'fhéadfadh rith ina dhiaidh sin a "
+"bheith níos gasta."
+
+#: wt-status.c
+#, c-format
+msgid "It took %.2f seconds to enumerate untracked files."
+msgstr "Thóg sé %.2f soicind comhaid gan rianú a áireamh."
+
+#: wt-status.c
+msgid "See 'git help status' for information on how to improve this."
+msgstr ""
+"Féach 'git help status' le haghaidh faisnéise maidir le conas é seo a "
+"fheabhsú."
+
+#: wt-status.c
+#, c-format
+msgid "Untracked files not listed%s"
+msgstr "Comhaid neamhrianaithe nár liostaíodh %s"
+
+#: wt-status.c
+msgid " (use -u option to show untracked files)"
+msgstr " (bain úsáid as an rogha -u chun comhaid neamhrianaithe a thaispeáint)"
+
+#: wt-status.c
+msgid "No changes"
+msgstr "Gan aon athruithe"
+
+#: wt-status.c
+#, c-format
+msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
+msgstr ""
+"níl aon athruithe curtha le tiomantas (bain úsáid as “git add” agus/nó “git "
+"commit -a”)\n"
+
+#: wt-status.c
+#, c-format
+msgid "no changes added to commit\n"
+msgstr "níl aon athruithe curtha le tiomantas\n"
+
+#: wt-status.c
+#, c-format
+msgid ""
+"nothing added to commit but untracked files present (use \"git add\" to "
+"track)\n"
+msgstr ""
+"ní chuirtear aon rud le tiomantas ach comhaid neamhrianaithe i láthair (bain "
+"úsáid as “git add” chun rianú)\n"
+
+#: wt-status.c
+#, c-format
+msgid "nothing added to commit but untracked files present\n"
+msgstr "ní chuir aon rud le tiomantas ach comhaid neamhrianaithe i láthair\n"
+
+#: wt-status.c
+#, c-format
+msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
+msgstr ""
+"aon rud le tiomantas (comhaid a chruthú/cóipeáil agus bain úsáid as “git "
+"add” chun rianú)\n"
+
+#: wt-status.c
+#, c-format
+msgid "nothing to commit\n"
+msgstr "aon rud le tiomantas\n"
+
+#: wt-status.c
+#, c-format
+msgid "nothing to commit (use -u to show untracked files)\n"
+msgstr ""
+"aon rud le tiomantas (bain úsáid as -u chun comhaid neamhrianaithe a "
+"thaispeáint)\n"
+
+#: wt-status.c
+#, c-format
+msgid "nothing to commit, working tree clean\n"
+msgstr "aon rud le tiomantas, crann oibre glan\n"
+
+#: wt-status.c
+msgid "No commits yet on "
+msgstr "Níl aon gealltanas ar aghaidh go fóill "
+
+#: wt-status.c
+msgid "HEAD (no branch)"
+msgstr "CEAD (gan aon bhrainse)"
+
+#: wt-status.c
+msgid "different"
+msgstr "difriúil"
+
+#: wt-status.c
+msgid "behind "
+msgstr "taobh thiar "
+
+#: wt-status.c
+msgid "ahead "
+msgstr "chun tosaigh "
+
+#. TRANSLATORS: the action is e.g. "pull with rebase"
+#: wt-status.c
+#, c-format
+msgid "cannot %s: You have unstaged changes."
+msgstr "ní féidir %s: Tá athruithe gan stáitse agat."
+
+#: wt-status.c
+msgid "additionally, your index contains uncommitted changes."
+msgstr "ina theannta sin, tá athruithe neamhthiomanta i d'innéacs."
+
+#: wt-status.c
+#, c-format
+msgid "cannot %s: Your index contains uncommitted changes."
+msgstr "ní féidir %s: Tá athruithe neamhthiomanta ag d'innéacs."
+
+#: xdiff-interface.c
+#, c-format
+msgid "unknown style '%s' given for '%s'"
+msgstr "stíl anaithnid '%s' a thugtar do '%s'"
+
+#: git-merge-octopus.sh git-merge-resolve.sh
+msgid ""
+"Error: Your local changes to the following files would be overwritten by "
+"merge"
+msgstr ""
+"Earráid: Déanfaí d'athruithe áitiúla ar na comhaid seo a leanas a "
+"fhorscríobh trí chumasc"
+
+#: git-merge-octopus.sh
+msgid "Automated merge did not work."
+msgstr "Níor oibrigh cumaisc uathoibrithe."
+
+#: git-merge-octopus.sh
+msgid "Should not be doing an octopus."
+msgstr "Níor chóir go mbeadh sé ag déanamh ochtair."
+
+#: git-merge-octopus.sh
+#, sh-format
+msgid "Unable to find common commit with $pretty_name"
+msgstr "Ní féidir tiomantas coiteann a fháil le $pretty_name"
+
+#: git-merge-octopus.sh
+#, sh-format
+msgid "Already up to date with $pretty_name"
+msgstr "Cothrom le dáta cheana féin le $pretty_name"
+
+#: git-merge-octopus.sh
+#, sh-format
+msgid "Fast-forwarding to: $pretty_name"
+msgstr "Seoladh go tapa chuig: $pretty_name"
+
+#: git-merge-octopus.sh
+#, sh-format
+msgid "Trying simple merge with $pretty_name"
+msgstr "Ag iarraidh cumasc simplí le $pretty_name"
+
+#: git-merge-octopus.sh
+msgid "Simple merge did not work, trying automatic merge."
+msgstr ""
+"Níor oibrigh an cumasc simplí, táim ag iarraidh cumasc uathoibríoch a "
+"dhéanamh."
+
+#: git-sh-setup.sh
+#, sh-format
+msgid "usage: $dashless $USAGE"
+msgstr "úsáid: $dashless $USAGE"
+
+#: git-sh-setup.sh
+#, sh-format
+msgid "Cannot chdir to $cdup, the toplevel of the working tree"
+msgstr "Ní féidir a chdir go $cdup, barr an chrainn oibre"
+
+#: git-sh-setup.sh
+#, sh-format
+msgid "fatal: $program_name cannot be used without a working tree."
+msgstr "marfach: ní féidir $program_name a úsáid gan crann oibre."
+
+#: git-sh-setup.sh
+msgid "Cannot rewrite branches: You have unstaged changes."
+msgstr "Ní féidir brainsí a athscríobh: Tá athruithe gan stáitse agat."
+
+#: git-sh-setup.sh
+#, sh-format
+msgid "Cannot $action: You have unstaged changes."
+msgstr "Ní féidir $action: Tá athruithe gan stáitse agat."
+
+#: git-sh-setup.sh
+#, sh-format
+msgid "Cannot $action: Your index contains uncommitted changes."
+msgstr "Ní féidir $action: Tá athruithe neamhthiomanta i d'innéacs."
+
+#: git-sh-setup.sh
+msgid "Additionally, your index contains uncommitted changes."
+msgstr "Ina theannta sin, tá athruithe neamhthiomanta i d'innéacs."
+
+#: git-sh-setup.sh
+msgid "You need to run this command from the toplevel of the working tree."
+msgstr "Ní mór duit an t-ordú seo a reáchtáil ó bharr an chrainn oibre."
+
+#: git-sh-setup.sh
+msgid "Unable to determine absolute path of git directory"
+msgstr "Ní féidir cosán iomlán eolaire git a chinneadh"
+
+#: git-send-email.perl
+msgid "local zone differs from GMT by a non-minute interval\n"
+msgstr "tá eatramh neamh-nóiméid difriúil ón gcrios áitiúil\n"
+
+#: git-send-email.perl
+msgid "local time offset greater than or equal to 24 hours\n"
+msgstr ""
+"fritháireamh ama áitiúil atá níos mó ná nó cothrom le 24 uair an chloig\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "fatal: command '%s' died with exit code %d"
+msgstr "marfach: fuair an t-ordú '%s' bás le cód imeachta %d"
+
+#: git-send-email.perl
+msgid "the editor exited uncleanly, aborting everything"
+msgstr "d’imigh an t-eagarthóir go neamhghlan, ag cur deireadh le gach rud"
+
+#: git-send-email.perl
+#, perl-format
+msgid ""
+"'%s' contains an intermediate version of the email you were composing.\n"
+msgstr "Tá leagan idirmheánach den ríomhphost a bhí á scríobh agat i '%s'.\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "'%s.final' contains the composed email.\n"
+msgstr "Cuimsíonn '%s.final' an ríomhphost comhdhéanta.\n"
+
+#: git-send-email.perl
+msgid "--dump-aliases incompatible with other options\n"
+msgstr "--dump-aliases neamhoiriúnach le roghanna eile\n"
+
+#: git-send-email.perl
+msgid "--dump-aliases and --translate-aliases are mutually exclusive\n"
+msgstr "Tá --dump-aliases agus --translate-aliases frithpháirteach\n"
+
+#: git-send-email.perl
+msgid ""
+"fatal: found configuration options for 'sendmail'\n"
+"git-send-email is configured with the sendemail.* options - note the 'e'.\n"
+"Set sendemail.forbidSendmailVariables to false to disable this check.\n"
+msgstr ""
+"marfach: aimsíodh roghanna cumraíochta do 'sendmail'\n"
+"Tá git-send-email cumraithe leis na roghanna sendemail.* - tabhair faoi "
+"deara an 'e'.\n"
+"Socraigh sendemail.forbidSendmailVariables go bréagach chun an seiceáil seo "
+"a dhíchumasú.\n"
+
+#: git-send-email.perl
+msgid "Cannot run git format-patch from outside a repository\n"
+msgstr "Ní féidir git format-patch a rith ó lasmuigh de stórlann\n"
+
+#: git-send-email.perl
+msgid ""
+"`batch-size` and `relogin` must be specified together (via command-line or "
+"configuration option)\n"
+msgstr ""
+"Caithfear `méid baisce' agus `athlogán' a shonrú le chéile (trí líne "
+"ordaithe nó rogha cumraíochta)\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Unknown --suppress-cc field: '%s'\n"
+msgstr "Réimse anaithnid --suppress-cc: '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Unknown --confirm setting: '%s'\n"
+msgstr "Socrú --confirm anaithnid: '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "warning: sendmail alias with quotes is not supported: %s\n"
+msgstr "rabhadh: ní thacaítear le alias sendmail le luachana: %s\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "warning: `:include:` not supported: %s\n"
+msgstr "rabhadh: `:include: `níl tacaíocht: %s\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "warning: `/file` or `|pipe` redirection not supported: %s\n"
+msgstr "rabhadh: Ní thacaítear le hathreorú `/comhad` nó `|píopa`: %s\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "warning: sendmail line is not recognized: %s\n"
+msgstr "rabhadh: ní aithnítear líne sendmail: %s\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid ""
+"File '%s' exists but it could also be the range of commits\n"
+"to produce patches for. Please disambiguate by...\n"
+"\n"
+" * Saying \"./%s\" if you mean a file; or\n"
+" * Giving --format-patch option if you mean a range.\n"
+msgstr ""
+"Tá comhad '%s' ann ach d'fhéadfadh sé a bheith ina raon na dtiomanta "
+"freisin\n"
+"chun paistí a tháirgeadh le haghaidh. Déan díbhríochnú le do thoil le do "
+"thoil\n"
+"\n"
+" * Ag rá”. /%s” má tá comhad i gceist agat; nó\n"
+" * Rogha --format-patch a thabhairt má tá raon i gceist agat.\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Failed to opendir %s: %s"
+msgstr "Theip ar %s a oscailt: %s"
+
+#: git-send-email.perl
+msgid ""
+"\n"
+"No patch files specified!\n"
+"\n"
+msgstr ""
+"\n"
+"Níl aon chomhaid paiste sonraithe!\n"
+"\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "No subject line in %s?"
+msgstr "Níl aon líne ábhair i %s?"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Failed to open for writing %s: %s"
+msgstr "Theip ar oscailt le haghaidh scríbhneoireachta %s: %s"
+
+#: git-send-email.perl
+msgid ""
+"Lines beginning in \"GIT:\" will be removed.\n"
+"Consider including an overall diffstat or table of contents\n"
+"for the patch you are writing.\n"
+"\n"
+"Clear the body content if you don't wish to send a summary.\n"
+msgstr ""
+"Bainfear línte a thosaíonn i “GIT:”.\n"
+"Smaoinigh ar diffstat foriomlán nó tábla ábhair a áireamh\n"
+"don phaiste atá á scríobh agat.\n"
+"\n"
+"Glan ábhar an choirp mura dteastaíonn uait achoimre a sheoladh.\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Failed to open %s.final: %s"
+msgstr "Theip ar %s.final a oscailt: %s"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Failed to open %s: %s"
+msgstr "Theip ar %s a oscailt: %s"
+
+#: git-send-email.perl
+msgid "Summary email is empty, skipping it\n"
+msgstr "Tá ríomhphost achoimre folamh, ag scipeáil é\n"
+
+#. TRANSLATORS: please keep [y/N] as is.
+#: git-send-email.perl
+#, perl-format
+msgid "Are you sure you want to use <%s> [y/N]? "
+msgstr "An bhfuil tú cinnte gur mhaith leat <%s> [Y/n] a úsáid? "
+
+#: git-send-email.perl
+msgid ""
+"The following files are 8bit, but do not declare a Content-Transfer-"
+"Encoding.\n"
+msgstr ""
+"Is iad na comhaid seo a leanas 8bit, ach ná dearbhaíonn siad Ionchódú "
+"Aistrithe Ábhar.\n"
+
+#: git-send-email.perl
+msgid "Which 8bit encoding should I declare [UTF-8]? "
+msgstr "Cén ionchódú 8 giotán ba chóir dom a dhearbhú [UTF-8]? "
+
+#: git-send-email.perl
+#, perl-format
+msgid ""
+"Refusing to send because the patch\n"
+"\t%s\n"
+"has the template subject '*** SUBJECT HERE ***'. Pass --force if you really "
+"want to send.\n"
+msgstr ""
+"Diúltú a sheoladh mar gheall ar an paiste\n"
+"\t%s\n"
+"tá an teimpléad faoi réir an ábhair '*** ÁBHAR ANSEO ***'. Pasáil --force "
+"más mian leat a sheoladh i ndáiríre.\n"
+
+#: git-send-email.perl
+msgid "To whom should the emails be sent (if anyone)?"
+msgstr "Cé chuige ba chóir na ríomhphoist a sheoladh (más duine ar bith)?"
+
+#: git-send-email.perl
+#, perl-format
+msgid "fatal: alias '%s' expands to itself\n"
+msgstr "marfach: leathnaíonn alias '%s' chuige féin\n"
+
+#: git-send-email.perl
+msgid "Message-ID to be used as In-Reply-To for the first email (if any)? "
+msgstr ""
+"Aitheantas an Teachtaireachta le húsáid mar In-Reply-To don chéad ríomhphost "
+"(más ann dó)? "
+
+#: git-send-email.perl
+#, perl-format
+msgid "error: unable to extract a valid address from: %s\n"
+msgstr "earráid: ní féidir seoladh bailí a bhaint as: %s\n"
+
+#. TRANSLATORS: Make sure to include [q] [d] [e] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-send-email.perl
+msgid "What to do with this address? ([q]uit|[d]rop|[e]dit): "
+msgstr "Cad atá le déanamh leis an seoladh seo? ([q]uit|[d]rop|[e]dit): "
+
+#: git-send-email.perl
+#, perl-format
+msgid "CA path \"%s\" does not exist"
+msgstr "Níl cosán CA “%s” ann"
+
+#: git-send-email.perl
+msgid ""
+" The Cc list above has been expanded by additional\n"
+" addresses found in the patch commit message. By default\n"
+" send-email prompts before sending whenever this occurs.\n"
+" This behavior is controlled by the sendemail.confirm\n"
+" configuration setting.\n"
+"\n"
+" For additional information, run 'git send-email --help'.\n"
+" To retain the current behavior, but squelch this message,\n"
+" run 'git config --global sendemail.confirm auto'.\n"
+"\n"
+msgstr ""
+" Leathnaíodh an liosta Cc thuas trí bhreise\n"
+" seoltaí a fhaightear sa teachtaireacht tiomanta paiste. De réir "
+"réamhshocraithe\n"
+" spreagann ríomhphost a sheoladh sula seoltar aon uair a tharlaíonn sé "
+"seo.\n"
+" Tá an t-iompar seo á rialú ag an sendemail.confirm\n"
+" socrú cumraíochta.\n"
+"\n"
+" Le haghaidh faisnéise breise, reáchtáil 'git send-email --help'.\n"
+" Chun an t-iompar reatha a choinneáil, ach an teachtaireacht seo a "
+"scriosadh,\n"
+" reáchtáil 'git config --global sendemail.confirm auto'.\n"
+
+#. TRANSLATORS: Make sure to include [y] [n] [e] [q] [a] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-send-email.perl
+msgid "Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): "
+msgstr ""
+"An bhfuil tú ag iarraidh an ríomhphost seo a sheoladh? ([y]es|[n]o|[e]dit|"
+"[q]uit|[a]ll): "
+
+#: git-send-email.perl
+msgid "Send this email reply required"
+msgstr "Seol an freagra ríomhphoist riachtanach"
+
+#: git-send-email.perl
+msgid "The required SMTP server is not properly defined."
+msgstr "Níl an freastalaí SMTP riachtanach sainmhínithe i gceart."
+
+#: git-send-email.perl
+#, perl-format
+msgid "Server does not support STARTTLS! %s"
+msgstr "Ní thacaíonn freastalaí le STARTTLS! %s"
+
+#: git-send-email.perl
+#, perl-format
+msgid "STARTTLS failed! %s"
+msgstr "Theip ar STARTTLS! %s"
+
+#: git-send-email.perl
+msgid "Unable to initialize SMTP properly. Check config and use --smtp-debug."
+msgstr ""
+"Ní féidir SMTP a thionscnamh i gceart. Seiceáil configí agus bain úsáid as --"
+"smtp-debug."
+
+#: git-send-email.perl
+#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Athshannaigh Outlook ID teachtaireachta chuig: %s\n"
+
+#: git-send-email.perl
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr ""
+"Rabhadh: Ní fhéadfaí teachtaireachtaí ID a aisghabháil ó fhreagairt "
+"freastalaí.\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Failed to send %s\n"
+msgstr "Theip ar %s a sheoladh\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Dry-Sent %s"
+msgstr "Seoladh tirim %s"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Sent %s"
+msgstr "Seoladh %s"
+
+#: git-send-email.perl
+msgid "Dry-OK. Log says:"
+msgstr "Tirim-ceart go leor. Log deir:"
+
+#: git-send-email.perl
+msgid "OK. Log says:"
+msgstr "CEART GO LEOR. Log deir:"
+
+#: git-send-email.perl
+msgid "Result: "
+msgstr "Toradh: "
+
+#: git-send-email.perl
+msgid "Result: OK"
+msgstr "Toradh: Ceart go leor"
+
+#: git-send-email.perl
+#, perl-format
+msgid "can't open file %s"
+msgstr "ní féidir comhad %s a oscailt"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(mbox) Adding cc: %s from line '%s'\n"
+msgstr "(mbox) Ag cur cc: %s ó líne '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(mbox) Adding to: %s from line '%s'\n"
+msgstr "(mbox) Ag cur le: %s ó líne '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(non-mbox) Adding cc: %s from line '%s'\n"
+msgstr "(non-mbox) Ag cur cc: %s ó líne '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(body) Adding cc: %s from line '%s'\n"
+msgstr "(corp) Ag cur cc: %s ó líne '%s'\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(%s) Could not execute '%s'"
+msgstr "(%s) Ní raibh '%s' in ann a fhorghníomhú"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(%s) Malformed output from '%s'"
+msgstr "(%s) Aschur mífheidhmithe ó '%s'"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(%s) failed to close pipe to '%s'"
+msgstr "Theip ar (%s) píopa a dhúnadh chuig '%s'"
+
+#: git-send-email.perl
+#, perl-format
+msgid "(%s) Adding %s: %s from: '%s'\n"
+msgstr "(%s) Ag cur %s leis: %s ó: '%s'\n"
+
+#: git-send-email.perl
+msgid "cannot send message as 7bit"
+msgstr "ní féidir teachtaireacht a sheoladh mar 7bit"
+
+#: git-send-email.perl
+msgid "invalid transfer encoding"
+msgstr "ionchódú aistrithe bailí"
+
+#: git-send-email.perl
+#, perl-format
+msgid ""
+"fatal: %s: rejected by %s hook\n"
+"%s\n"
+"warning: no patches were sent\n"
+msgstr ""
+"marfach: %s: dhiúltaithe ag %s hook\n"
+"%s\n"
+"rabhadh: níor seoladh aon phaistí\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "unable to open %s: %s\n"
+msgstr "nach féidir %s a oscailt: %s\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid ""
+"fatal: %s:%d is longer than 998 characters\n"
+"warning: no patches were sent\n"
+msgstr ""
+"marfach: %s: %d níos faide ná 998 carachtar\n"
+"rabhadh: níor seoladh aon phaistí\n"
+
+#: git-send-email.perl
+#, perl-format
+msgid "Skipping %s with backup suffix '%s'.\n"
+msgstr "Scaipeáil %s le hiarmhír cúltaca '%s'.\n"
+
+#. TRANSLATORS: please keep "[y|N]" as is.
+#: git-send-email.perl
+#, perl-format
+msgid "Do you really want to send %s? [y|N]: "
+msgstr "An bhfuil tú ag iarraidh %s a sheoladh i ndáiríre? [y|N]: "
+
+#~ msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
+#~ msgstr "git cat-file (-t | -s) [--leis-cineál gan eolas] <object>"
+
+#~ msgid "allow -s and -t to work with broken/corrupt objects"
+#~ msgstr "ligean do -s agus -t oibriú le rudaí briste/truaillithe"
+
+#, c-format
+#~ msgid "%s: object is of unknown type '%s': %s"
+#~ msgstr "%s: tá réad de chineál anaithnid '%s': %s"
+
+#, c-format
+#~ msgid "unable to read '%s'"
+#~ msgstr "ní féidir '%s' a léamh"
diff --git a/po/id.po b/po/id.po
index 7d32c51..d318019 100644
--- a/po/id.po
+++ b/po/id.po
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-05 22:57+0000\n"
-"PO-Revision-Date: 2025-03-09 17:44+0700\n"
+"POT-Creation-Date: 2025-05-27 22:57+0000\n"
+"PO-Revision-Date: 2025-06-07 08:26+0700\n"
"Last-Translator: Bagas Sanjaya <bagasdotme@gmail.com>\n"
"Language-Team: Indonesian\n"
"Language: id\n"
@@ -951,10 +951,9 @@
#: builtin/fast-export.c builtin/fetch.c builtin/help.c builtin/index-pack.c
#: builtin/init-db.c builtin/log.c builtin/ls-files.c builtin/merge-base.c
#: builtin/merge-tree.c builtin/merge.c builtin/pack-objects.c builtin/rebase.c
-#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-list.c
-#: builtin/rev-parse.c builtin/show-branch.c builtin/stash.c
-#: builtin/submodule--helper.c builtin/tag.c builtin/worktree.c parse-options.c
-#: range-diff.c revision.c
+#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-parse.c
+#: builtin/show-branch.c builtin/stash.c builtin/submodule--helper.c
+#: builtin/tag.c builtin/worktree.c parse-options.c range-diff.c revision.c
#, c-format
msgid "options '%s' and '%s' cannot be used together"
msgstr "Opsi '%s' dan '%s' tidak dapat digunakan bersamaan"
@@ -1857,7 +1856,7 @@
msgid "bad --attr-source or GIT_ATTR_SOURCE"
msgstr "--attr-source atau GIT_ATTR_SOURCE jelek"
-#: attr.c read-cache.c
+#: attr.c read-cache.c refs/packed-backend.c
#, c-format
msgid "unable to stat '%s'"
msgstr "tidak dapat men-stat '%s'"
@@ -2703,7 +2702,7 @@
msgid "bypass pre-applypatch and applypatch-msg hooks"
msgstr "lewati kail pre-applypatch dan applypatch-msg"
-#: builtin/am.c
+#: builtin/am.c builtin/cat-file.c
msgid "historical option -- no-op"
msgstr "opsi bersejarah -- no-op"
@@ -4022,7 +4021,7 @@
msgid "Unbundling objects"
msgstr "Membongkar bundel objek"
-#: builtin/cat-file.c merge-recursive.c
+#: builtin/cat-file.c
#, c-format
msgid "cannot read object %s '%s'"
msgstr "tidak dapat membaca objek %s '%s'"
@@ -4059,12 +4058,8 @@
msgstr "git cat-file <tipe> <objek>"
#: builtin/cat-file.c
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <objek>"
-
-#: builtin/cat-file.c
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <objek>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <objek>"
#: builtin/cat-file.c
msgid ""
@@ -4111,10 +4106,6 @@
msgid "show object size"
msgstr "perlihatkan ukuran objek"
-#: builtin/cat-file.c
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "perbolehkan -s dan -t bekerja dengan objek rusak"
-
#: builtin/cat-file.c builtin/log.c
msgid "use mail map file"
msgstr "gunakan berkas peta surat"
@@ -4190,6 +4181,15 @@
msgstr "gunakan <jalur> untuk (--textconv | --filters); tidak dengan 'batch'"
#: builtin/cat-file.c
+msgid "objects filter only supported in batch mode"
+msgstr "penyaring objek hanya didukung di mode kelompok"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "penyaring objek tidak didukung: '%s'"
+
+#: builtin/cat-file.c
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "'%s=<%s>' butuh '%s' atau '%s'"
@@ -7029,6 +7029,64 @@
msgid "specify the content of the diagnostic archive"
msgstr "sebutkan isi arsip diagnostik"
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "tidak dapat menguraikan mode: %s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "tidak dapat menguraikan id objek: %s"
+
+#: builtin/diff-pairs.c
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<opsi diff>]"
+
+#: builtin/diff-pairs.c builtin/log.c builtin/replay.c builtin/shortlog.c
+#: bundle.c
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "argumen tidak dikenal: %s"
+
+#: builtin/diff-pairs.c
+msgid "working without -z is not supported"
+msgstr "bekerja tanpa -z tidak didukung"
+
+#: builtin/diff-pairs.c
+msgid "pathspec arguments not supported"
+msgstr "argumen spek jalur tidak didukung"
+
+#: builtin/diff-pairs.c
+msgid "revision arguments not allowed"
+msgstr "argumen revisi tidak diperbolehkan"
+
+#: builtin/diff-pairs.c
+msgid "invalid raw diff input"
+msgstr "masukan diff mentah tidak valid"
+
+#: builtin/diff-pairs.c
+msgid "tree objects not supported"
+msgstr "objek pohon tidak didukung"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading path"
+msgstr "dapat EOF ketika membaca jalur"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading destination path"
+msgstr "dapat EOF ketika membaca jalur tujuan"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "tidak dapat menguraikan nilai penamaan ulang/salin : %s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "status diff tidak dikenal: %c"
+
#: builtin/diff-tree.c
msgid "--merge-base only works with two commits"
msgstr "--merge-base hanya bekerja dengan dua komit"
@@ -7210,6 +7268,10 @@
msgstr "pilih penanganan tag bertandatangan"
#: builtin/fast-export.c
+msgid "select handling of signed commits"
+msgstr "pilih penanganan komit bertandatangan"
+
+#: builtin/fast-export.c
msgid "select handling of tags that tag filtered objects"
msgstr "pilih penanganan tag yang men-tag objek tersaring"
@@ -7472,7 +7534,7 @@
msgid "option \"%s\" is ignored for %s"
msgstr "opsi \"%s\" diabaikan untuk %s"
-#: builtin/fetch.c object-file.c
+#: builtin/fetch.c object-store.c
#, c-format
msgid "%s is not a valid object"
msgstr "%s bukan sebuah objek valid"
@@ -8024,11 +8086,6 @@
#: builtin/fsck.c
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s: objek bertipe tidak dikenal '%s': %s"
-
-#: builtin/fsck.c
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s: objek tidak dapat diuraikan: %s"
@@ -8100,11 +8157,15 @@
msgstr "indeks balik tidak valid untuk pak '%s'"
#: builtin/fsck.c
+msgid "Checking ref database"
+msgstr "Memeriksa basis referensi"
+
+#: builtin/fsck.c
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
@@ -8159,6 +8220,10 @@
msgid "show verbose names for reachable objects"
msgstr "perlihatkan nama lantung untuk objek yang dapat dicapai"
+#: builtin/fsck.c
+msgid "check reference database consistency"
+msgstr "Memeriksa konsistensi basis data referensi"
+
#: builtin/fsck.c builtin/index-pack.c
msgid "Checking objects"
msgstr "Memeriksa objek"
@@ -9612,11 +9677,6 @@
"lacak evolusi rentang baris <awal>,<akhir> atau fungsi :<nama fungsi> dalam "
"<berkas>"
-#: builtin/log.c builtin/replay.c builtin/shortlog.c bundle.c
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "argumen tidak dikenal: %s"
-
#: builtin/log.c
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<rentang>:<berkas> tidak dapat digunakan dengan spek jalur"
@@ -10464,6 +10524,10 @@
msgstr "perlihatkan juga pesan informasi/konflik"
#: builtin/merge-tree.c
+msgid "suppress all output; only exit status wanted"
+msgstr "redam semua keluaran; hanya status keluar yang diinginkan"
+
+#: builtin/merge-tree.c
msgid "list filenames without modes/oids/stages"
msgstr "daftar nama berkas tanpa mode/oid/tahap"
@@ -10624,7 +10688,7 @@
msgid "Already up to date. (nothing to squash)"
msgstr "Sudah diperbarui. (tidak ada yang bisa dilumat)"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Already up to date."
msgstr "Sudah terbaru."
@@ -10648,7 +10712,7 @@
msgid "Bad branch.%s.mergeoptions string: %s"
msgstr "Untai branch.%s.mergeoptions jelek: %s"
-#: builtin/merge.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Unable to write index."
msgstr "Tidak dapat menulis indeks."
@@ -10809,7 +10873,7 @@
msgid "Updating %s..%s\n"
msgstr "Memperbarui %s..%s\n"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
#, c-format
msgid ""
"Your local changes to the following files would be overwritten by merge:\n"
@@ -10976,8 +11040,12 @@
"sebuah batch yang lebih besar dari ukuran ini"
#: builtin/mv.c
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<opsi>] <sumber>... <tujuan>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <sumber> <tujuan>"
+
+#: builtin/mv.c
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <sumber> <direktori tujuan>"
#: builtin/mv.c
#, c-format
@@ -11067,6 +11135,11 @@
#: builtin/mv.c
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "tidak dapat memindahkan baik '%s' dan direktori induknya '%s'"
+
+#: builtin/mv.c
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "Mengganti nama %s ke %s\n"
@@ -12241,6 +12314,11 @@
msgid "unable to access commit %s"
msgstr "Tidak dapat mengakses komit %s"
+#: builtin/pull.c refspec.c
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "spek referensi tidak valid '%s'"
+
#: builtin/pull.c
msgid "ignoring --verify-signatures for rebase"
msgstr "mengabaikan --verify-signatures untuk pendasaran ulang"
@@ -13389,6 +13467,10 @@
msgstr "git reflog exists <referensi>"
#: builtin/reflog.c
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktee] | <referensi>...]"
+
+#: builtin/reflog.c
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "stempel waktu tidak valid '%s' diberikan ke '--%s'"
@@ -13450,8 +13532,8 @@
#: builtin/reflog.c
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s tidak menunjuk ke apapun!"
+msgid "reflog could not be found: '%s'"
+msgstr "tidak dapat menemukan log referensi: '%s'"
#: builtin/reflog.c
msgid "no reflog specified to delete"
@@ -13462,6 +13544,18 @@
msgid "invalid ref format: %s"
msgstr "format referensi tidak valid: %s"
+#: builtin/reflog.c
+msgid "drop the reflogs of all references"
+msgstr "jatuhkan log referensi semua referensi"
+
+#: builtin/reflog.c
+msgid "drop reflogs from the current worktree only"
+msgstr "hanya jatuhkan log referensi dari pohon kerja saat ini"
+
+#: builtin/reflog.c
+msgid "references specified along with --all"
+msgstr "referensi yang dirincikan bersamaan dengan --all"
+
#: builtin/refs.c
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
@@ -14152,6 +14246,10 @@
msgstr "dengan --cruft, kadaluarsakan objek yang lebih tua dari ini"
#: builtin/repack.c
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "dengan --cruft, hanya pak ulang pak sampah yang lebih kecil dari ini"
+
+#: builtin/repack.c
msgid "remove redundant packs, and run git-prune-packed"
msgstr "hapus pak berlebihan, dan jalankan git-prune-packed"
@@ -14759,6 +14857,10 @@
"nilai tidak valid untuk '%s': '%s', format yang diperbolehkan hanyalah '%s'"
#: builtin/rev-list.c
+msgid "-z option used with unsupported option"
+msgstr "osi -z digunakan dengan opsi yang tidak didukung"
+
+#: builtin/rev-list.c
msgid "rev-list does not support display of notes"
msgstr "rev-list tidak mendukung penampilan catatan"
@@ -17082,8 +17184,8 @@
msgstr "git update-ref [<options>] <nama referensi> <oid baru> [<oid lama>]"
#: builtin/update-ref.c
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<opsi>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<opsi>] --stdin [-z] [--batch-updates]"
#: builtin/update-ref.c
msgid "delete the reference"
@@ -17101,6 +17203,10 @@
msgid "read updates from stdin"
msgstr "baca pembaruan dari masukan standar"
+#: builtin/update-ref.c
+msgid "batch reference updates"
+msgstr "kelompokkan pembaruan referensi"
+
#: builtin/update-server-info.c
msgid "update the info files from scratch"
msgstr "perbarui berkas info dari awal"
@@ -17961,6 +18067,10 @@
msgstr "Bandingkan pohon kepada pohon kerja atau indeks"
#: command-list.h
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Bandingkan isi dan mode pasangan blob yang disediakan"
+
+#: command-list.h
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr "Bandingkan isi dan mode blob yang ditemukan lewat dua objek pohon"
@@ -20127,7 +20237,7 @@
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "Nilai tidak dikenal untuk variabel konfigurasi 'diff.submodule': '%s'"
-#: diff.c merge-recursive.c transport.c
+#: diff.c merge-ort.c transport.c
#, c-format
msgid "unknown value for config '%s': %s"
msgstr "nilai tidak dikenal untuk konfigurasi '%s': %s"
@@ -21587,6 +21697,11 @@
msgid "Unknown value for http.proactiveauth"
msgstr "nilai tidak dikenal untuk http.proactiveauth"
+#: http.c parse.c
+#, c-format
+msgid "failed to parse %s"
+msgstr "gagal menguraikan %s"
+
#: http.c
#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
@@ -21814,7 +21929,12 @@
msgid "invalid marker-size '%s', expecting an integer"
msgstr "marker-size '%s' tidak valid, bilangan bulat diharapkan"
-#: merge-ort.c merge-recursive.c
+#: merge-ort-wrappers.c
+#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Tidak dapat menguraikan objek '%s'"
+
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Gagal menggabungkan submodul %s (tidak di-checkout)"
@@ -21824,7 +21944,7 @@
msgid "Failed to merge submodule %s (no merge base)"
msgstr "Gagal menggabungkan submodul %s (tidak ada dasar penggabungan)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits not present)"
msgstr "Gagal menggabungkan submodul %s (komit tidak ada)"
@@ -21834,7 +21954,7 @@
msgid "error: failed to merge submodule %s (repository corrupt)"
msgstr "kesalahan: gagal menggabungkan submodul %s (repositori rusak)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits don't follow merge-base)"
msgstr ""
@@ -21878,12 +21998,12 @@
msgid "error: unable to add %s to database"
msgstr "kesalahan: tidak dapat menambahkan %s ke basis data"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Auto-merging %s"
msgstr "Menggabungkan otomatis %s"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
@@ -21892,7 +22012,7 @@
"KONFLIK (penamaan ulang direktori implisit): Berkas/direktori yang sudah ada "
"pada %s saat penamaan ulang direktori menempatkan jalur berikut di sana: %s."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
@@ -21913,7 +22033,7 @@
"ulang %s; itu dinamai ulang ke banyak direktori lainnya, dengan tiada tujuan "
"mendapatkan mayoritas berkas."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
@@ -21922,7 +22042,7 @@
"PERINGATAN: Menghindari menerapkan penamaan ulang %s -> %s ke %s, karena %s-"
"nya sendiri dinamai ulang."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s added in %s inside a directory that was renamed in %s; "
@@ -21931,7 +22051,7 @@
"Jalur diperbarui: %s menambahkan %s di dalam sebuah direktori yang dinamai "
"ulang di %s; memindahkan ke %s."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s renamed to %s in %s, inside a directory that was renamed in "
@@ -21940,7 +22060,7 @@
"Jalur diperbarui: %s dinamai ulang ke %s di %s, di dalam sebuah direktori "
"yang dinamai ulang di %s; memindahkan ke %s."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s added in %s inside a directory that was renamed "
@@ -21949,7 +22069,7 @@
"KONFLIK (lokasi berkas): %s menambahkan %s di dalam sebuah direktori yang "
"dinamai ulang di %s, menyarankan mungkin dipindahkan ke %s."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s renamed to %s in %s, inside a directory that "
@@ -22020,19 +22140,19 @@
"KONFLIK (tipe berbeda): %s punya tipe berbeda pada setiap sisi; salah "
"satunya dinamai ulang sehingga masing-masing dapat direkam di suatu tempat."
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "content"
msgstr "konten"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "add/add"
msgstr "penambahan/penambahan"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "submodule"
msgstr "submodul"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
msgstr "KONFLIK (%s): Konflik penggabungan di %s"
@@ -22096,325 +22216,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "pengumpulan info penggabungan gagal untuk pohon %s, %s, dan %s"
-#: merge-recursive.c
-msgid "(bad commit)\n"
-msgstr "(komit jelek)\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "add_cacheinfo gagal untuk jalur '%s'; penggabungan dibatalkan."
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr ""
-"add_cacheinfo gagal menyegarkan untuk jalur '%s'; penggabungan dibatalkan."
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "gagal membuat jalur '%s'%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Menghapus %s untuk membuat ruang untuk subdirektori\n"
-
-#: merge-recursive.c
-msgid ": perhaps a D/F conflict?"
-msgstr ": mungkin konflik direktori/berkas?"
-
-#: merge-recursive.c
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "menolak menghilangkan berkas tak terlacak pada '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "blob diharapkan untuk %s '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "gagal membuka '%s': %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "gagal menautkan simbolik '%s': %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "tidak tahu apa yang dilakukan dengan %06o %s '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "Gagal menggabungkan submodul %s (repositori rusak)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "Memaju-cepat submodul %s ke komit berikut:"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "Memaju-cepat submodul %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
-"Gagal menggabungkan submodul %s (penggabungan komit berikutnya tidak "
-"ditemukan)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "Gagal menggabungkan submodul %s (bukan maju-cepat)"
-
-#: merge-recursive.c
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "Sebuah resolusi penggabungan yang mungkin ditemukan untuk submodul:\n"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Jika benar, cukup misalkan tambahkan ke indeks dengan menggunakan:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"yang akan menerima saran ini.\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "Gagal menggabungkan submodul %s (banyak penggabungan ditemukan)"
-
-#: merge-recursive.c
-msgid "failed to execute internal merge"
-msgstr "gagal menjalankan penggabungan internal"
-
-#: merge-recursive.c
-#, c-format
-msgid "unable to add %s to database"
-msgstr "tidak dapat menambahkan %s ke basis data"
-
-#: merge-recursive.c
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr ""
-"Kesalahan: Menolak menghilangkan berkas tak terlacak pada %s; menulis ke %s "
-"sebagai gantinya."
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"KONFLIK (%s/penghapusan): %s dihapus di %s dan %s di %s. Versi %s dari %s "
-"ditinggalkan di dalam pohon."
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"KONFLIK (%s/penghapusan): %s dihapus di %s dan %s ke %s di %s. Versi %s dari "
-"%s ditinggalkan di dalam pohon."
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"KONFLIK (%s/penghapusan): %s dihapus di %s dan %s di %s. Versi %s dari %s "
-"ditinggalkan di dalam pohon pada %s."
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"KONFLIK (%s/penghapusan): %s dihapus di %s dan %s ke %s di %s. Versi %s dari "
-"%s ditinggalkan di dalam pohon pada %s."
-
-#: merge-recursive.c
-msgid "rename"
-msgstr "penamaan ulang"
-
-#: merge-recursive.c
-msgid "renamed"
-msgstr "dinamai ulang"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "Menolak menghilangkan berkas kotor pada %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr ""
-"Menolak menghilangkan berkas tak terlacak pada %s, bahkan jika itu berjalan."
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"KONFLIK (penamaan ulang/penambahan): Penamaan ulang %s-%s di %s. %s "
-"ditambahkan di %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr ""
-"%s adalah sebuah direktori dalam %s menambahkan sebagai %s sebagai gantinya"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr ""
-"Menolak menghilangkan berkas tak terlacak pada %s; menambahkan sebagai %s "
-"sebagai gantinya"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"KONFLIK (penamaan ulang/penamaan ulang): Penamaan ulang \"%s\"->\"%s\" di "
-"dalam cabang \"%s\" penamaan ulang \"%s\"->\"%s\" di \"%s\"%s"
-
-#: merge-recursive.c
-msgid " (left unresolved)"
-msgstr " dibiarkan tak diselesaikan"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"KONFLIK (penamaan ulang/penamaan ulang): Penamaan ulang %s->%s di %s. "
-"Penamaan ulang %s->%s di %s"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"KONFLIK (pemecahan penamaan ulang direktori): Tidak jelas dimana untuk "
-"menempatkan %s karena direktori %s dinamai ulang ke banyak direktori "
-"lainnya, dengan tidak ada tujuan yang mendapatkan mayoritas berkas."
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"KONFLIK (penamaan ulang/penamaan ulang): Penamaan ulang direktori %s->%s di "
-"%s. Penamaan ulang %s->%s di %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "cannot read object %s"
-msgstr "tidak dapat membaca objek %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "object %s is not a blob"
-msgstr "objek %s bukanlah sebuah blob"
-
-#: merge-recursive.c
-msgid "modify"
-msgstr "ubah"
-
-#: merge-recursive.c
-msgid "modified"
-msgstr "diubah"
-
-#: merge-recursive.c
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "%s dilewatkan (digabungkan sama seperti yang ada)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Menambahkan sebagai %s sebagai gantinya"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s"
-msgstr "Menghapus %s"
-
-#: merge-recursive.c
-msgid "file/directory"
-msgstr "berkas/direktori"
-
-#: merge-recursive.c
-msgid "directory/file"
-msgstr "direktori/berkas"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
-"KONFLIK (%s): Ada direktori dengan nama %s di %s. Menambahakn %s sebagai %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding %s"
-msgstr "Menambahkan %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "KONFLIK (penambahan/penambahan): Konflik penggabungan di %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "penggabungan pohon %s dan %s gagal"
-
-#: merge-recursive.c
-msgid "Merging:"
-msgstr "Menggabungkan:"
-
-#: merge-recursive.c
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "%u leluhur umum ditemukan:"
-msgstr[1] "%u leluhur umum ditemukan:"
-
-#: merge-recursive.c
-msgid "merge returned no commit"
-msgstr "penggabungan tidak mengembalikan komit"
-
-#: merge-recursive.c
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "Tidak dapat menguraikan objek '%s'"
-
#: merge.c
msgid "failed to read the cache"
msgstr "gagal membaca tembolok"
@@ -22468,14 +22269,15 @@
msgstr "gagal membersihkan indeks multipak pada %s"
#: midx-write.c
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "tidak dapat menulis MIDX tambahan dengan bitmap"
-
-#: midx-write.c
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr "abaikan indeks multipak yang sudah ada; checksum tidak cocok"
#: midx-write.c
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "tidak dapat memuat indeks balik untuk MIDX %s"
+
+#: midx-write.c
msgid "Adding packfiles to multi-pack-index"
msgstr "Menambahkan berkas pak ke indeks multipak"
@@ -22797,79 +22599,6 @@
#: object-file.c
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr "direktori objek %s tidak ada; periksa .git/objects/info/alternates"
-
-#: object-file.c
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "tidak dapat menormalisasikan jalur objek alternatif: %s"
-
-#: object-file.c
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s: mengabaikan penyimpanan objek alternatif, bersarang terlalu dalam"
-
-#: object-file.c
-msgid "unable to fdopen alternates lockfile"
-msgstr "tidak dapat men-fdopen berkas kunci alternatif"
-
-#: object-file.c
-msgid "unable to read alternates file"
-msgstr "tidak dapat membaca berkas alternatif"
-
-#: object-file.c
-msgid "unable to move new alternates file into place"
-msgstr "tidak dapat memindahkan berkas alternatif baru ke tempatnya"
-
-#: object-file.c
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "jalur '%s' tidak ada"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr ""
-"repositori referensi '%s' sebagai sebuah checkout tertaut belum didukung."
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "repositori referensi '%s' bukan sebuah repositori lokal"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "repositori referensi '%s' dangkal"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "repositori referensi '%s' cangkok"
-
-#: object-file.c
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "tidak dapat menemukan direktori objek yang cocok dengan %s"
-
-#: object-file.c
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "baris tidak valid saat menguraikan referensi alternatif: %s"
-
-#: object-file.c
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "mencoba men-mmap %<PRIuMAX> di atas batas %<PRIuMAX>"
-
-#: object-file.c
-#, c-format
-msgid "mmap failed%s"
-msgstr "mmap gagal%s"
-
-#: object-file.c
-#, c-format
msgid "object file %s is empty"
msgstr "berkas objek %s kosong"
@@ -22914,21 +22643,6 @@
#: object-file.c
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "pengganti %s tidak ditemukan untuk %s"
-
-#: object-file.c
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "objek terpak %s (disimpan di %s) rusak"
-
-#: object-file.c
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "pemetaan %s ke %s hilang"
-
-#: object-file.c
-#, c-format
msgid "unable to open %s"
msgstr "tidak dapat membuka %s"
@@ -23047,11 +22761,6 @@
#: object-file.c
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s bukan sebuah objek '%s' valid"
-
-#: object-file.c
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "hash tidak cocok untuk %s (diharapkan %s)"
@@ -23072,6 +22781,11 @@
#: object-file.c
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "tidak dapat menguraikan tipe dari kepala '%s' dari '%s'"
+
+#: object-file.c
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "tidak dapat membongkar isi %s"
@@ -23248,6 +22962,89 @@
msgid "invalid object name '%.*s'."
msgstr "nama objek tidak valid '%.*s'."
+#: object-store.c
+#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "direktori objek %s tidak ada; periksa .git/objects/info/alternates"
+
+#: object-store.c
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "tidak dapat menormalisasikan jalur objek alternatif: %s"
+
+#: object-store.c
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s: mengabaikan penyimpanan objek alternatif, bersarang terlalu dalam"
+
+#: object-store.c
+msgid "unable to fdopen alternates lockfile"
+msgstr "tidak dapat men-fdopen berkas kunci alternatif"
+
+#: object-store.c
+msgid "unable to read alternates file"
+msgstr "tidak dapat membaca berkas alternatif"
+
+#: object-store.c
+msgid "unable to move new alternates file into place"
+msgstr "tidak dapat memindahkan berkas alternatif baru ke tempatnya"
+
+#: object-store.c
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "jalur '%s' tidak ada"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr ""
+"repositori referensi '%s' sebagai sebuah checkout tertaut belum didukung."
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "repositori referensi '%s' bukan sebuah repositori lokal"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "repositori referensi '%s' dangkal"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "repositori referensi '%s' cangkok"
+
+#: object-store.c
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "tidak dapat menemukan direktori objek yang cocok dengan %s"
+
+#: object-store.c
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "baris tidak valid saat menguraikan referensi alternatif: %s"
+
+#: object-store.c
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "pengganti %s tidak ditemukan untuk %s"
+
+#: object-store.c
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "objek terpak %s (disimpan di %s) rusak"
+
+#: object-store.c
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "pemetaan %s ke %s hilang"
+
+#: object-store.c
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s bukan sebuah objek '%s' valid"
+
#: object.c
#, c-format
msgid "invalid object type \"%s\""
@@ -23601,6 +23398,16 @@
#: parse-options.c
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "nilai %s untuk %s di luar rentang [%<PRIdMAX>,%<PRIdMAX>]"
+
+#: parse-options.c
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s mengharapkan nilai bilangan bulat dengan akhiran opsional k/m/g"
+
+#: parse-options.c
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr ""
"%s mengharapkan nilai bilangan bulat non negatif dengan akhiran opsional k/m/"
@@ -23787,11 +23594,6 @@
msgid "bad boolean environment value '%s' for '%s'"
msgstr "nilai lingkungan boolean '%s' jelek untuk '%s'"
-#: parse.c
-#, c-format
-msgid "failed to parse %s"
-msgstr "gagal menguraikan %s"
-
#: path-walk.c
#, c-format
msgid "failed to walk children of tree %s: not found"
@@ -23999,8 +23801,13 @@
#: promisor-remote.c
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "remote yang terkenal bernama '%s' tapi dengan url '%s' daripada '%s'"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "tidak ada URL atau URL kosong yang diiklankan untuk remote '%s'"
+
+#: promisor-remote.c
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "remote yang terkenal bernama '%s' tapi dengan URL '%s' daripada '%s'"
#: promisor-remote.c
#, c-format
@@ -24931,6 +24738,11 @@
msgid "Checking references consistency"
msgstr "Memeriksa konsistensi referensi"
+#: refs/packed-backend.c
+#, c-format
+msgid "unable to open '%s'"
+msgstr "tidak dapat membuka '%s'"
+
#: refs/reftable-backend.c
#, c-format
msgid "refname is dangerous: %s"
@@ -25016,11 +24828,6 @@
#: refspec.c
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "spek referensi tidak valid '%s'"
-
-#: refspec.c
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "pola '%s' tidak mempunyai '*'"
@@ -25688,8 +25495,8 @@
msgstr "tidak dapat menyetel konfigurasi yang direkomendasikan"
#: scalar.c
-msgid "could not turn on maintenance"
-msgstr "tidak dapat mengaktifkan pemeliharaan"
+msgid "could not toggle maintenance"
+msgstr "tidak dapat mengalihkan pemeliharaan"
#: scalar.c
msgid "could not start the FSMonitor daemon"
@@ -25747,15 +25554,19 @@
#: scalar.c
msgid "specify if tags should be fetched during clone"
-msgstr "rincikan jikan tag hendak diambil selama kloning"
+msgstr "rincikan jika tag hendak diambil selama kloning"
+
+#: scalar.c
+msgid "specify if background maintenance should be enabled"
+msgstr "rincikan jika pemeliharaan balik layar hendak diaktifkan"
#: scalar.c
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <cabang utama>] [--full-clone]\n"
-"\t[--[-no-]src] [--[no-]tags] <url> [<pendaftaran>]"
+"\t[--[-no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<pendaftaran>]"
#: scalar.c
#, c-format
@@ -25804,16 +25615,28 @@
msgstr "`scalar list` tidak mengambil argumen"
#: scalar.c
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<pendaftaran>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<pendaftaran>]"
#: scalar.c
msgid "reconfigure all registered enlistments"
msgstr "konfigurasi ulang semua pendaftaran yang terdaftar"
#: scalar.c
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <pendaftaran>]"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+#: scalar.c
+msgid "signal how to adjust background maintenance"
+msgstr "beri sinyal bagaimana pemeliharaan balik layar diatur"
+
+#: scalar.c
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<pendaftaran>]"
#: scalar.c
msgid "--all or <enlistment>, but not both"
@@ -25821,6 +25644,11 @@
#: scalar.c
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "mode untuk --maintenance tidak dikenal: %s"
+
+#: scalar.c
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "tidak dapat menghapus scalar.repo basi '%s'"
@@ -27560,6 +27388,10 @@
msgid "number of entries in the cache tree to invalidate (default 0)"
msgstr "jumlah entri di dalam pohon tembolok untuk dinirvalidasi (asali 0)"
+#: t/helper/test-pack-deltas.c
+msgid "the number of objects to write"
+msgstr "jumlah objek tertulis yang ditulis"
+
#: t/helper/test-path-walk.c
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <opsi> -- <opsi revisi>"
@@ -28503,6 +28335,16 @@
msgid "unable to get random bytes"
msgstr "tidak dapat mendapatkan bita acak"
+#: wrapper.c
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "mencoba men-mmap %<PRIuMAX> di atas batas %<PRIuMAX>"
+
+#: wrapper.c
+#, c-format
+msgid "mmap failed%s"
+msgstr "mmap gagal%s"
+
#: wt-status.c
msgid "Unmerged paths:"
msgstr "Jalur yang tak tergabung:"
@@ -29421,6 +29263,15 @@
#: git-send-email.perl
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook memberikan ulang Message-ID ke: %s\n"
+
+#: git-send-email.perl
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "Peringatan: Tidak dapat mengambil Message-ID dari respons peladen.\n"
+
+#: git-send-email.perl
+#, perl-format
msgid "Failed to send %s\n"
msgstr "Gagal mengirim %s\n"
diff --git a/po/meson.build b/po/meson.build
index d7154b6..de3b4e2 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -8,6 +8,7 @@
'el',
'es',
'fr',
+ 'ga',
'id',
'is',
'it',
diff --git a/po/tr.po b/po/tr.po
index 4ed91cb..9f5edc1 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -96,8 +96,8 @@
msgstr ""
"Project-Id-Version: Git Turkish Localization Project\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-11 15:01+0300\n"
-"PO-Revision-Date: 2025-03-11 15:00+0300\n"
+"POT-Creation-Date: 2025-05-29 11:02+0300\n"
+"PO-Revision-Date: 2025-05-29 12:00+0300\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: Turkish (https://github.com/bitigchi/git-po/)\n"
"Language: tr\n"
@@ -3333,11 +3333,8 @@
msgid "git cat-file <type> <object>"
msgstr "git cat-file <tür> <nesne>"
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <nesne>"
-
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <nesne>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <nesne>"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3352,10 +3349,9 @@
" [--buffer] [--follow-symlinks] [--unordered]\n"
" [--textconv | --filters] [-Z]"
msgstr ""
-"git cat-file (--batch | --batch-check | --batch-command) [--batch-all-"
-"objects]\n"
-" [--buffer] [--follow-symlinks] [--unordered]\n"
-" [--textconv | --filters] [-Z]"
+"git cat-file (--batch | --batch-check | --batch-command)\n"
+" [--batch-all-objects] [--buffer] [--follow-symlinks]\n"
+" [--unordered] [--textconv | --filters] [-Z]"
msgid "Check object existence or emit object contents"
msgstr "Nesne varlığını denetle veya nesne içeriğini yay"
@@ -3375,9 +3371,6 @@
msgid "show object size"
msgstr "nesne boyutunu göster"
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "-s ve -t'nin bozuk/hasarlı nesnelerle çalışmasına izin ver"
-
msgid "use mail map file"
msgstr "posta eşlem dosyasını kullan"
@@ -3435,6 +3428,13 @@
msgstr ""
"(--textconv | --filters) için bir <yol> kullan; ancak 'batch' ile değil"
+msgid "objects filter only supported in batch mode"
+msgstr "nesneler süzgeci yalnızca toplu iş kipinde desteklenir"
+
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "nesne süzgeci desteklenmiyor: '%s'"
+
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "'%s=<%s>' için '%s' veya '%s' gerekiyor"
@@ -5695,6 +5695,50 @@
msgid "specify the content of the diagnostic archive"
msgstr "tanı arşivinin içeriğini belirtin"
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "kip ayrıştırılamıyor: %s"
+
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "nesne kimliği ayrıştırılamıyor: %s"
+
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<diff-seçenekleri>]"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "tanımlanamayan argüman: %s"
+
+msgid "working without -z is not supported"
+msgstr "-z olmadan çalışma desteklenmiyor"
+
+msgid "pathspec arguments not supported"
+msgstr "yol belirteci argümanları desteklenmiyor"
+
+msgid "revision arguments not allowed"
+msgstr "revizyon argümanlarına izin verilmiyor"
+
+msgid "invalid raw diff input"
+msgstr "geçersiz ham diff girişi"
+
+msgid "tree objects not supported"
+msgstr "ağaç nesneleri desteklenmiyor"
+
+msgid "got EOF while reading path"
+msgstr "yol okunurken dosya sonu alındı"
+
+msgid "got EOF while reading destination path"
+msgstr "hedef yol okunurken dosya sonu alındı"
+
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "yeniden adlandır/kopyala puanı ayrıştırılamıyor: %s"
+
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "bilinmeyen diff durumu: %c"
+
msgid "--merge-base only works with two commits"
msgstr "--merge-base yalnızca iki işleme ile kullanılabilir"
@@ -5837,6 +5881,9 @@
msgid "select handling of signed tags"
msgstr "imzalanan etiketlerin nasıl ele alınacağını seçin"
+msgid "select handling of signed commits"
+msgstr "imzalanan işlemelerin nasıl ele alınacağını seçin"
+
msgid "select handling of tags that tag filtered objects"
msgstr "nesnelerce süzülen etiketlerin nasıl ele alınacağını seçin"
@@ -6478,10 +6525,6 @@
msgstr "%s: nesne hasarlı veya kayıp: %s"
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s: nesne bilinmeyen bir türde: '%s': %s"
-
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s: nesne ayrıştırılamadı: %s"
@@ -6538,16 +6581,19 @@
msgid "invalid rev-index for pack '%s'"
msgstr "'%s' paketi için geçersiz rev-index"
+msgid "Checking ref database"
+msgstr "Başvuru günlüğü denetleniyor"
+
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<nesne>...]"
+" [--[no-]name-objects] [--[no-]references] [<nesne>...]"
msgid "show unreachable objects"
msgstr "ulaşılamayan nesneleri göster"
@@ -6585,6 +6631,9 @@
msgid "show verbose names for reachable objects"
msgstr "ulaşılabilir nesneler için ayrıntılı adları göster"
+msgid "check reference database consistency"
+msgstr "başvuru veritabanı tutarlılığını denetle"
+
msgid "Checking objects"
msgstr "Nesneler denetleniyor"
@@ -7726,10 +7775,6 @@
"<dosya> içindeki <başlangıç>,<bitiş> satır eriminin veya :<işlevadı> "
"işlevinin evrimini izle"
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "tanımlanamayan argüman: %s"
-
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<erim>:<dosya>, yol belirteci ile kullanılamıyor"
@@ -8373,6 +8418,9 @@
msgid "also show informational/conflict messages"
msgstr "ayrıcı bilgi/çakışma iletilerini göster"
+msgid "suppress all output; only exit status wanted"
+msgstr "tüm çıktıyı sustur; yalnızca çıkış durumu istenir"
+
msgid "list filenames without modes/oids/stages"
msgstr "kipi/oid'si/hazırlığı olmayan dosya adlarını listele"
@@ -8772,8 +8820,11 @@
"yeniden paketleme sırasında daha küçük boyutlu paket dosyalarını bu boyuttan "
"daha büyük bir toplu iş olarak toplayın"
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<seçenekler>] <kaynak>... <hedef>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <kaynak> <hedef>"
+
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <kaynak>... <hedef-dizin>"
#, c-format
msgid "Directory %s is in index and no submodule?"
@@ -8844,6 +8895,10 @@
msgstr "%s, kaynak=%s, hedef:%s"
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "hem '%s' ve onun üst dizini '%s' taşınamıyor"
+
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "%s, %s olarak yeniden adlandırılıyor\n"
@@ -9763,6 +9818,10 @@
msgid "unable to access commit %s"
msgstr "%s işlemesine erişilemedi"
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "geçersiz başvuru belirteci '%s'"
+
msgid "ignoring --verify-signatures for rebase"
msgstr "yeniden temellendirme için --verify-signatures yok sayılıyor"
@@ -10721,6 +10780,9 @@
msgid "git reflog exists <ref>"
msgstr "git reflog exists <başvuru>"
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <başvurular>...]"
+
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "geçersiz zaman damgası '%s', '--%s' argümanına verildi"
@@ -10770,8 +10832,8 @@
msgstr "Ulaşılabilir nesneler imleniyor..."
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s hiçbir yere işaret etmiyor!"
+msgid "reflog could not be found: '%s'"
+msgstr "başvuru günlüğü bulunamadı: '%s'"
msgid "no reflog specified to delete"
msgstr "silmek için bir başvuru günlüğü belirtilmedi"
@@ -10780,6 +10842,15 @@
msgid "invalid ref format: %s"
msgstr "geçersiz başvuru biçimi: %s"
+msgid "drop the reflogs of all references"
+msgstr "tüm başvuruların başvuru günlüklerini bırak"
+
+msgid "drop reflogs from the current worktree only"
+msgstr "yalnızca geçerli çalışma ağacından olan başvuru günlüklerini bırak"
+
+msgid "references specified along with --all"
+msgstr "--all ile belirtilmiş başvurular"
+
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<biçim> [--no-reflog] [--dry-run]"
@@ -11333,6 +11404,9 @@
msgid "with --cruft, expire objects older than this"
msgstr "--cruft ile bundan daha eski nesneleri yürürlükten kaldır"
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "--cruft ile yalnızca bundan daha küçük paketleri yeniden paketle"
+
msgid "remove redundant packs, and run git-prune-packed"
msgstr "gereksiz paketleri kaldır ve 'git-prune-packed' çalıştır"
@@ -11809,6 +11883,9 @@
msgid "invalid value for '%s': '%s', the only allowed format is '%s'"
msgstr "'%s' için geçersiz değer: '%s', tek izin verilen biçim '%s'"
+msgid "-z option used with unsupported option"
+msgstr "-z seçeneği desteklenmeyen seçenekle kullanıldı"
+
msgid "rev-list does not support display of notes"
msgstr "rev-list not görüntülemesini desteklemiyor"
@@ -13652,8 +13729,8 @@
msgstr ""
"git update-ref [<seçenekler>] <bşvr-adı> <yeni-n-kiml> [<eski-n-kiml>]"
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<seçenekler>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<seçenekler>] --stdin [-z] [--batch-updates]"
msgid "delete the reference"
msgstr "başvuruyu sil"
@@ -13667,6 +13744,9 @@
msgid "read updates from stdin"
msgstr "güncellemeleri stdin'den oku"
+msgid "batch reference updates"
+msgstr "toplu başvuru güncellemeleri"
+
msgid "update the info files from scratch"
msgstr "bilgi dosyalarını en baştan güncelle"
@@ -14236,10 +14316,10 @@
msgstr "Eksik nesneleri kısımsal bir klonda indir"
msgid "Use binary search to find the commit that introduced a bug"
-msgstr "Hatalara neden olan işlemeyi bulmada ikili arama kullan"
+msgstr "Hatalara neden olan işlemeyi ikili aramayla bul"
msgid "Show what revision and author last modified each line of a file"
-msgstr "Dosya satırlarını son değiştiren revizyon/yazarı göster"
+msgstr "Dosya satırına son elleyen revizyonu/yazarı göster"
msgid "List, create, or delete branches"
msgstr "Dal oluştur, sil veya listele"
@@ -14266,7 +14346,7 @@
msgstr "Bir başvuru adının düzgünce oluşturulduğundan emin ol"
msgid "Switch branches or restore working tree files"
-msgstr "Dal değiştir veya çalışma ağacını eski haline geri getir"
+msgstr "Dal değiştir/çalışma ağacını eski haline geri getir"
msgid "Copy files from the index to the working tree"
msgstr "Dosyaları indeksten çalışma ağacına kopyala"
@@ -14275,7 +14355,7 @@
msgstr "Henüz üstkaynağa uygulanmayan işlemeleri bul"
msgid "Apply the changes introduced by some existing commits"
-msgstr "Mevcut bazı işlemelerin getirdiği değişiklikleri uygula"
+msgstr "Bazı işlemelerin getirdiği değişiklikleri uygula"
msgid "Graphical alternative to git-commit"
msgstr "git-commit için grafik tabanlı alternatif"
@@ -14308,7 +14388,7 @@
msgstr "Kullanıcı yetkilerini al ve depola"
msgid "Helper to temporarily store passwords in memory"
-msgstr "Parolaları geçici olarak bellekte saklamak için yardımcı"
+msgstr "Parolaları geçicide bellekte saklamak için yardımcı"
msgid "Helper to store credentials on disk"
msgstr "Yetkileri diskte saklamak için yardımcı"
@@ -14326,7 +14406,7 @@
msgstr "Git depoları için gerçekten yalın bir sunucu"
msgid "Give an object a human readable name based on an available ref"
-msgstr "Uygun bir başvuruyu temel alıp nesneye okunabilir ad ver"
+msgstr "Uygun bir başvuru temeliyle nesneye okunabilir ad ver"
msgid "Generate a zip archive of diagnostic information"
msgstr "Tanı bilgisinin bir zip arşivini oluştur"
@@ -14340,8 +14420,12 @@
msgid "Compare a tree to the working tree or index"
msgstr "Bir ağacı çalışma ağacı veya indeks ile karşılaştır"
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "İkili çiftinin içeriğini ve kipini kıyasla"
+
msgid "Compares the content and mode of blobs found via two tree objects"
-msgstr "İki ağaç nesnesiyle bulunan ikililerin içerik/kipini karşılaştır"
+msgstr ""
+"İki ağaç nesnesiyle bulunan ikililerin içeriğini ve kipini karşılaştırır"
msgid "Show changes using common diff tools"
msgstr "Değişiklikleri yaygın diff araçlarıyla göster"
@@ -14374,13 +14458,13 @@
msgstr "E-posta teslimi için yamaları hazırla"
msgid "Verifies the connectivity and validity of the objects in the database"
-msgstr "Veritab. nesnelerin bağlanırlığını ve geçerliliğini sına"
+msgstr "Veri nesnesinin bağlanırlığını ve geçerliliğini sına"
msgid "Cleanup unnecessary files and optimize the local repository"
msgstr "Gereksiz dosyaları temizle ve yerel depoyu eniyile"
msgid "Extract commit ID from an archive created using git-archive"
-msgstr "İşleme iletisini bir git-archive arşivinden çıkartıp al"
+msgstr "İşleme iletisini git-archive arşivinden çıkarıp al"
msgid "Print lines matching a pattern"
msgstr "Bir dizgi ile eşleşen satırları yazdır"
@@ -14389,7 +14473,7 @@
msgstr "Git için taşınabilir bir grafik arabirim"
msgid "Compute object ID and optionally create an object from a file"
-msgstr "Nesne kimliğini hesapla/dosyadan isteğe bağlı nesne oluştur"
+msgstr "Nesne kimliğini hesapla-isteğe bağlı nesne oluştur"
msgid "Display help information about Git"
msgstr "Git yardım bilgisini görüntüle"
@@ -14407,13 +14491,13 @@
msgstr "Nesneleri HTTP/DAV üzerinden başka bir depoya it"
msgid "Send a collection of patches from stdin to an IMAP folder"
-msgstr "stdin'den bir IMAP klasörüne bir yama derlemesi gönder"
+msgstr "stdin'den bir IMAP klasörüne yama derlemesi gönder"
msgid "Build pack index file for an existing packed archive"
-msgstr "Mevcut paketli bir arşiv için paket indeks dosyası yap"
+msgstr "Paketli bir arşiv için paket indeks dosyası yap"
msgid "Create an empty Git repository or reinitialize an existing one"
-msgstr "Boş bir Git deposu oluştur veya olanı yeniden ilklendir"
+msgstr "Boş Git deposu oluştur veya olanı yeniden ilklendir"
msgid "Instantly browse your working repository in gitweb"
msgstr "gitweb'deki çalışma deposuna anında göz at"
@@ -14446,7 +14530,7 @@
msgstr "İki veya daha fazla geliştirme geçmişini birleştir"
msgid "Find as good common ancestors as possible for a merge"
-msgstr "Birleştirme için olabildiğince en iyi ortak ataları bul"
+msgstr "Birleştirme için olabildiğince en iyi ortak atayı bul"
msgid "Run a three-way file merge"
msgstr "Bir 3 yönlü dosya birleştirmesi çalıştır"
@@ -14473,7 +14557,7 @@
msgstr "multi-pack-index doğrula ve yaz"
msgid "Move or rename a file, a directory, or a symlink"
-msgstr "Dosya, dizin veya sembolik bağları taşı/yeniden adlandır"
+msgstr "Dosya, dizin, sembolik bağları taşı/yeniden adlandır"
msgid "Find symbolic names for given revs"
msgstr "Verilen revizyonlar için sembolik adları bul"
@@ -14491,7 +14575,7 @@
msgstr "Gereksiz paket dosyalarını bul"
msgid "Pack heads and tags for efficient repository access"
-msgstr "Etkili depo erişimi için dal uçları ve etiketler paketle"
+msgstr "Tez depo erişimi için dal uçları ve etiketler paketle"
msgid "Compute unique ID for a patch"
msgstr "Bir yama için eşi olmayan numara hesapla"
@@ -14500,13 +14584,13 @@
msgstr "Ulaşılamayan tüm nesneleri nesne veritabanından buda"
msgid "Remove extra objects that are already in pack files"
-msgstr "Halihazırda paket dosyalarında olan ek nesneleri kaldır"
+msgstr "Halihazırda paket dosyalarındaki ek nesneleri kaldır"
msgid "Fetch from and integrate with another repository or a local branch"
msgstr "Başka bir depo veya yerel daldan getir ve tümleştir"
msgid "Update remote refs along with associated objects"
-msgstr "İlişkin nesnelerle birlikte uzak başvuruları da güncelle"
+msgstr "İlişkin nesneleri ve uzak başvuruları güncelle"
msgid "Applies a quilt patchset onto the current branch"
msgstr "Geçerli dala bir \"Quilt\" yama seti uygula"
@@ -14536,17 +14620,16 @@
msgstr "Bir depodaki paketlenmemiş nesneleri paketle"
msgid "Create, list, delete refs to replace objects"
-msgstr "Nesne değiştirmek için başvurular oluştur, sil, listele"
+msgstr "Nesne değiştirmek için başvuru oluştur, sil, listele"
msgid "EXPERIMENTAL: Replay commits on a new base, works with bare repos too"
-msgstr ""
-"DENEYSEL: İşlemeleri yeni temelde yeniden oynat, çıplak depolarla da çalışır"
+msgstr "DENEYSEL: İşlemeleri yeni temelde oynat, çıplak depolarla çalışır"
msgid "Generates a summary of pending changes"
msgstr "Bekleyen değişikliklerin bir özetini çıkart"
msgid "Reuse recorded resolution of conflicted merges"
-msgstr "Çakışan birleştirmelerin kayıtlı çözümlerini yen. kullan"
+msgstr "Çakışmaların kayıtlı çözümlerini yeniden kullan"
msgid "Reset current HEAD to the specified state"
msgstr "Geçerli HEAD'i belirtilen duruma sıfırla"
@@ -14597,7 +14680,7 @@
msgstr "Yerel bir depodaki başvuruları listele"
msgid "Reduce your working tree to a subset of tracked files"
-msgstr "Çalışma ağacını izlenen dosyaların alt kümesine küçült"
+msgstr "Çalışma ağacını izlenen dosyanın alt kümesine küçült"
msgid "Add file contents to the staging area"
msgstr "Dosya içeriğini hazırlama alanına ekle"
@@ -14615,7 +14698,7 @@
msgstr "Altmodülleri ilklendir, güncelle veya incele"
msgid "Bidirectional operation between a Subversion repository and Git"
-msgstr "Bir Subversion ve Git deposu arasında iki yönlü işlemler"
+msgstr "Subversion ve Git arasında iki yönlü işlemler"
msgid "Switch branches"
msgstr "Dal değiştir"
@@ -14624,10 +14707,10 @@
msgstr "Sembolik başvuruları oku, düzenle ve sil"
msgid "Create, list, delete or verify a tag object signed with GPG"
-msgstr "GPG imzalı bir etiket oluştur, sil, listele veya doğrula"
+msgstr "GPG imzalı etiket oluştur, sil, listele, doğrula"
msgid "Creates a temporary file with a blob's contents"
-msgstr "Bir ikili nesnenin içeriği ile geçici bir dosya oluştur"
+msgstr "İkili nesnenin içeriği ile geçici bir dosya oluştur"
msgid "Unpack objects from a packed archive"
msgstr "Paketlenmiş bir arşivden nesneleri çıkar"
@@ -14636,11 +14719,10 @@
msgstr "Çalışma ağacındaki dosya içeriğini indekse kaydet"
msgid "Update the object name stored in a ref safely"
-msgstr "Güvenlice bir başvuruda depolanan nesne adını güncelle"
+msgstr "Güvenlice başvuruda depolanan nesne adını güncelle"
msgid "Update auxiliary info file to help dumb servers"
-msgstr ""
-"Programlanamayan sunuculara destek için yardımcı veri dosyasını güncelle"
+msgstr "Aptal sunuculara destek için ek bilgiyi güncelle"
msgid "Send archive back to git-archive"
msgstr "Arşivi git-archive'e geri gönder"
@@ -14679,7 +14761,7 @@
msgstr "Git komut satırı arabirimi ve kuralları"
msgid "A Git core tutorial for developers"
-msgstr "Geliştiriciler için Git çekirdeği eğitmeni"
+msgstr "Geliştiriciler için Git çekirdek öğreticisi"
msgid "Providing usernames and passwords to Git"
msgstr "Git'e kullanıcı adları ve parolalar belirt"
@@ -14715,7 +14797,7 @@
msgstr "Git kriptografik imza biçimleri"
msgid "A Git Glossary"
-msgstr "Git Kavram Dizini"
+msgstr "Bir Git kavram dizini"
msgid "Hooks used by Git"
msgstr "Git tarafından kullanılan kancalar"
@@ -14727,7 +14809,7 @@
msgstr "Git depo tarayıcısı"
msgid "Map author/committer names and/or E-Mail addresses"
-msgstr "Yazar/İşleyici adlarını ve/veya e-posta adreslerini eşlemle"
+msgstr "Yazar/İşleyici adını, e-posta adreslerini eşlemle"
msgid "Defining submodule properties"
msgstr "Altmodül özelliklerini tanımlama"
@@ -14763,10 +14845,10 @@
msgstr "Bir depoyu bir başkasının içine bağlama"
msgid "A tutorial introduction to Git"
-msgstr "Git'e Giriş"
+msgstr "Git'e giriş için bir öğretici"
msgid "A tutorial introduction to Git: part two"
-msgstr "Git'e Giriş: Bölüm 2"
+msgstr "Git'e giriş için bir öğretici: Bölüm 2"
msgid "Git web interface (web frontend to Git repositories)"
msgstr "Git web arabirimi (Git depoları için web ön ucu)"
@@ -16858,12 +16940,10 @@
msgstr ""
"git [-v | --version] [-h | --help] [-C <yol>] [-c <ad>=<değer>]\n"
" [--exec-path[=<yol>]] [--html-path] [--man-path] [--info-path]\n"
-" [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-"
-"lazy-fetch]\n"
-" [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n"
-" [--work-tree=<path>] [--namespace=<ad>] [--config-env=<ad>=<çevre-"
-"değişkeni>]\n"
-" <komut> [<argümanlar>]"
+" [-p | --paginate | -P | --no-pager] [--no-replace-objects]\n"
+" [--no-lazy-fetch] [--no-optional-locks] [--no-advice] [--bare]\n"
+" [--git-dir=<yol>] [--work-tree=<yol>] [--namespace=<ad>]\n"
+" [--config-env=<ad>=<çevre-değişkeni>] <komut> [<argümanlar>]"
msgid ""
"'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -17221,6 +17301,10 @@
msgstr "http.proactiveauth için bilinmeyen değer"
#, c-format
+msgid "failed to parse %s"
+msgstr "%s ayrıştırılamadı"
+
+#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
msgstr "Desteklenmeyen SSL arka ucu '%s'. Desteklenen SSL arka uçları:"
@@ -17410,6 +17494,10 @@
msgstr "geçersiz imleyici boyutu '%s', bir tamsayı bekleniyor"
#, c-format
+msgid "Could not parse object '%s'"
+msgstr "'%s' nesnesi ayrıştırılamadı"
+
+#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "%s altmodülü birleştirilemedi (çıkış yapılmadı)"
@@ -17654,268 +17742,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "şu ağaçlar için birleştirme bilgisi toplama başarısız: %s, %s, %s"
-msgid "(bad commit)\n"
-msgstr "(hatalı işleme)\n"
-
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr ""
-"add_cacheinfo '%s' yolu için başarısız oldu; birleştirme iptal ediliyor."
-
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr "add_cacheinfo '%s' yolu için yenilenemedi; birleştirme iptal ediliyor."
-
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "'%s'%s yolu oluşturulamadı"
-
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Altdizine yer açmak için %s kaldırılıyor\n"
-
-msgid ": perhaps a D/F conflict?"
-msgstr ": bir D/F çakışması olabilir mi?"
-
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "'%s' konumundaki izlenmeyen dosyayı kaybetme reddediliyor"
-
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "%s '%s' için ikili nesne bekleniyordu"
-
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "'%s' açılamadı: %s"
-
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "'%s' için sembolik bağ oluşturulamadı: %s"
-
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "şununla ne yapılacağı bilinmiyor: %06o %s '%s'"
-
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "%s altmodülü birleştirilemedi (depo hasarlı)"
-
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "%s altmodülü şu işlemeye ileri sarılıyor:"
-
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "%s altmodülü ileri sarılıyor"
-
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr ""
-"%s altmodülü birleştirilemedi (işlemeleri takip eden birleştirme bulunamadı)"
-
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "%s altmodülü birleştirilemedi (ileri sarım değil)"
-
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "Şu altmodül için olası bir birleştirme çözümü bulundu:\n"
-
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Eğer bu doğruysa yalnızca indekse ekleyin, örneğin:\n"
-"\n"
-"\tgit update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"komutu bu öneriyi kabul edecektir.\n"
-
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "%s altmodülü birleştirilemedi (birden çok birleştirme bulundu)"
-
-msgid "failed to execute internal merge"
-msgstr "iç birleştirme yürütülemedi"
-
-#, c-format
-msgid "unable to add %s to database"
-msgstr "%s veritabanına eklenemiyor"
-
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr ""
-"Hata: %s konumundaki izlenmeyen dosyayı kaybetme reddediliyor, bunun yerine "
-"%s konumuna yazılacak."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"ÇAKIŞMA (%s/silme): %s silindi (%s içinde) ve %s (%s içinde). %s (%s) sürümü "
-"ağaçta bırakıldı."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"ÇAKIŞMA (%s/silme): %s silindi (%s içinde) ve %s şuraya: %s (%s içinde). %s "
-"(%s) sürümü ağaçta bırakıldı."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"ÇAKIŞMA (%s/silme): %s silindi (%s içinde) ve %s (%s içinde). %s (%s) sürümü "
-"ağaçta %s konumunda bırakıldı."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"ÇAKIŞMA (%s/silme): %s silindi (%s içinde) ve %s şuraya: %s (%s içinde). %s "
-"(%s) sürümü ağaçta %s konumunda bırakıldı."
-
-msgid "rename"
-msgstr "yeniden adlandır"
-
-msgid "renamed"
-msgstr "yeniden adlandırıldı"
-
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "%s konumundaki kirli dosyayı kaybetme reddediliyor"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr ""
-"Engel olduğu halde %s konumundaki izlenmeyen dosyayı kaybetme reddediliyor."
-
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"ÇAKIŞMA (yeniden adlandır/ekle): %s->%s olarak adlandırıldı (%s içinde). %s "
-"eklendi (%s içinde)"
-
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s bir dizin (%s içinde), bunun yerine %s olarak ekleniyor"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr ""
-"%s konumundaki izlenmeyen dosyayı kaybetme reddediliyor, bunun yerine %s "
-"olarak ekleniyor"
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"ÇAKIŞMA (y. adlandır/y. adlandır): \"%s\"->\"%s\" olarak adlandır (\"%s\" "
-"dalında), \"%s\"->\"%s\" olarak adlandır (\"%s\"%s içinde)"
-
-msgid " (left unresolved)"
-msgstr " (çözülmeden bırakıldı)"
-
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"ÇAKIŞMA (y. adlandır/y. adlandır): %s->%s olarak adlandır (%s içinde). %s-"
-">%s olarak adlandır (%s içinde)"
-
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"ÇAKIŞMA: (dizin yeniden adlandırma ayrılması): %s ögesinin nereye "
-"yerleştirileceği belirsiz; çünkü %s dizini birden çok başka dizine yeniden "
-"adlandırılırken hiçbir hedef dosyaların büyük çoğunluğunu almadı."
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"ÇAKIŞMA (y. adlandır/y. adlandır): Dizini %s->%s olarak adlandır (%s "
-"içinde). Dizini %s->%s olarak adlandır (%s içinde)"
-
-#, c-format
-msgid "cannot read object %s"
-msgstr "%s nesnesi okunamıyor"
-
-#, c-format
-msgid "object %s is not a blob"
-msgstr "%s nesnesi ikili bir nesne değil"
-
-msgid "modify"
-msgstr "değiştir"
-
-msgid "modified"
-msgstr "değiştirilmiş"
-
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "%s atlandı (var olan ile aynı biçimde birleştirildi)"
-
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Bunun yerine %s olarak ekleniyor"
-
-#, c-format
-msgid "Removing %s"
-msgstr "%s kaldırılıyor"
-
-msgid "file/directory"
-msgstr "dosya/dizin"
-
-msgid "directory/file"
-msgstr "dizin/dosya"
-
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr ""
-"ÇAKIŞMA (%s): %s adıyla bir dizin var (%s içinde). %s, %s olarak ekleniyor"
-
-#, c-format
-msgid "Adding %s"
-msgstr "%s ekleniyor"
-
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "ÇAKIŞMA (ekle/ekle): %s içinde birleştirme çakışması"
-
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "%s ve %s ağaçlarının birleştirilmesi başarısız"
-
-msgid "Merging:"
-msgstr "Birleştiriliyor:"
-
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "%u ortak ata bulundu:"
-msgstr[1] "%u ortak ata bulundu:"
-
-msgid "merge returned no commit"
-msgstr "birleştirme herhangi bir işleme döndürmedi"
-
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "'%s' nesnesi ayrıştırılamadı"
-
msgid "failed to read the cache"
msgstr "önbellek okunamadı"
@@ -17957,12 +17783,13 @@
msgid "failed to clear multi-pack-index at %s"
msgstr "multi-pack-index %s konumunda temizlenemedi"
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "biteşlem ile artımlı MIDX yazılamıyor"
-
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr "var olan multi-pack-index yok sayılıyor; sağlama toplamı uyumsuzluğu"
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "MIDX %s için ters indeks yüklenemedi"
+
msgid "Adding packfiles to multi-pack-index"
msgstr "Paket dosyaları multi-pack-index'e ekleniyor"
@@ -18214,64 +18041,6 @@
msgstr "Nesne, %s -> %s olarak dönüştürülemedi"
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr "nesne dizini %s yok; şurayı denetleyin: .git/objects/info/alternates"
-
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "alternatif nesne yolu olağanlaştırılamıyor: %s"
-
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s: alternatif nesne depoları yok sayılıyor, iç içe geçme pek derin"
-
-msgid "unable to fdopen alternates lockfile"
-msgstr "alternatifler kilit dosyası fdopen yapılamıyor"
-
-msgid "unable to read alternates file"
-msgstr "alternatifler dosyası okunamıyor"
-
-msgid "unable to move new alternates file into place"
-msgstr "yeni alternatifler dosyası yerine taşınamıyor"
-
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "'%s' diye bir yol yok"
-
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr ""
-"Bağlantı yapılmış çıkış olarak '%s' başvuru deposu henüz desteklenmiyor."
-
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "Başvuru deposu '%s' yerel bir depo değil."
-
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "başvuru deposu '%s' sığ"
-
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "başvuru deposu '%s' aşılı"
-
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "'%s' ile eşleşen nesne dizini bulunamadı"
-
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "alternatif başvurular ayrıştırılırken geçersiz satır: %s"
-
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "%<PRIuMAX>, %<PRIuMAX> sınırı üzerinden mmap yapılmaya çalışılıyor"
-
-#, c-format
-msgid "mmap failed%s"
-msgstr "mmap başarısız%s"
-
-#, c-format
msgid "object file %s is empty"
msgstr "nesne dosyası %s boş"
@@ -18307,18 +18076,6 @@
msgstr "%s gevşek nesnesi (%s içinde depolanıyor) hasarlı"
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "%s yedeği %s için bulunamadı"
-
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "paketlenmiş nesne %s (%s içinde depolanıyor) hasarlı"
-
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "%s ögesinin %s ögesine eksik eşlemlemesi"
-
-#, c-format
msgid "unable to open %s"
msgstr "%s açılamıyor"
@@ -18411,10 +18168,6 @@
msgstr "%s: desteklenmeyen dosya türü"
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s geçerli bir '%s' nesnesi değil"
-
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "%s için sağlama uyuşmazlığı (%s bekleniyordu)"
@@ -18431,6 +18184,10 @@
msgstr "%s üstbilgisi ayrıştırılamıyor"
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "%s ögesinin '%s' üstbilgisinden tür ayrıştırılamıyor"
+
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "%s içeriği açılamıyor"
@@ -18588,6 +18345,72 @@
msgstr "geçersiz nesne adı: '%.*s'."
#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "nesne dizini %s yok; şurayı denetleyin: .git/objects/info/alternates"
+
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "alternatif nesne yolu olağanlaştırılamıyor: %s"
+
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s: alternatif nesne depoları yok sayılıyor, iç içe geçme pek derin"
+
+msgid "unable to fdopen alternates lockfile"
+msgstr "alternatifler kilit dosyası fdopen yapılamıyor"
+
+msgid "unable to read alternates file"
+msgstr "alternatifler dosyası okunamıyor"
+
+msgid "unable to move new alternates file into place"
+msgstr "yeni alternatifler dosyası yerine taşınamıyor"
+
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "'%s' diye bir yol yok"
+
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr ""
+"Bağlantı yapılmış çıkış olarak '%s' başvuru deposu henüz desteklenmiyor."
+
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "Başvuru deposu '%s' yerel bir depo değil."
+
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "başvuru deposu '%s' sığ"
+
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "başvuru deposu '%s' aşılı"
+
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "'%s' ile eşleşen nesne dizini bulunamadı"
+
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "alternatif başvurular ayrıştırılırken geçersiz satır: %s"
+
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "%s yedeği %s için bulunamadı"
+
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "paketlenmiş nesne %s (%s içinde depolanıyor) hasarlı"
+
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "%s ögesinin %s ögesine eksik eşlemlemesi"
+
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s geçerli bir '%s' nesnesi değil"
+
+#, c-format
msgid "invalid object type \"%s\""
msgstr "geçersiz nesne türü \"%s\""
@@ -18866,6 +18689,14 @@
msgstr "%s kullanılabilir değil"
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "%s değeri, %s için, [%<PRIdMAX>, %<PRIdMAX>] eriminde değil"
+
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s bir tamsayı bekliyor, isteğe bağlı k/m/g eki ile"
+
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr "%s negatif olmayan bir tamsayı bekliyor, isteğe bağlı k/m/g eki ile"
@@ -19024,10 +18855,6 @@
msgstr "hatalı Boole çevre değeri '%s', '%s' için"
#, c-format
-msgid "failed to parse %s"
-msgstr "%s ayrıştırılamadı"
-
-#, c-format
msgid "failed to walk children of tree %s: not found"
msgstr "%s ağacının alt ögeleri yürütülemedi: bulunamadı"
@@ -19186,8 +19013,12 @@
msgstr "vaatçi uzak konumundan %s getirilemedi"
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "bilinen uzak konum adı '%s'; ancak url'si '%s'; '%s' olmalı"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "'%s' uzak konumu için olmayan veya boş URL sağlandı"
+
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "bilinen uzak konum adı '%s'; ancak URL'si '%s'; '%s' olmalı"
#, c-format
msgid "unknown '%s' value for '%s' config option"
@@ -19953,6 +19784,10 @@
msgstr "Başvuruların tutarlılığı denetleniyor"
#, c-format
+msgid "unable to open '%s'"
+msgstr "'%s' açılamıyor"
+
+#, c-format
msgid "refname is dangerous: %s"
msgstr "başvuru adı tehlikeli: %s"
@@ -20020,10 +19855,6 @@
msgstr "başvuru adı %s bir sembolik bağ, onu kopyalamak desteklenmiyor"
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "geçersiz başvuru belirteci '%s'"
-
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "'%s' dizgisinde '*' yok"
@@ -20568,8 +20399,8 @@
msgid "could not set recommended config"
msgstr "önerilen yapılandırma ayarlanamadı"
-msgid "could not turn on maintenance"
-msgstr "bakım ayarı açılamadı"
+msgid "could not toggle maintenance"
+msgstr "bakım devreye alınamadı/devreden çıkarılamadı"
msgid "could not start the FSMonitor daemon"
msgstr "FSMonitor ardalan süreci başlatılamadı"
@@ -20615,12 +20446,15 @@
msgid "specify if tags should be fetched during clone"
msgstr "etiketlerin klonlama sırasında getirilip getirilmeyeceğini belirt"
+msgid "specify if background maintenance should be enabled"
+msgstr "arka plan bakımı etkinleştirilmesi gerekirse belirt"
+
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <ana-dal>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<listeleme>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<gönüllü-kayıt>]"
#, c-format
msgid "cannot deduce worktree name from '%s'"
@@ -20653,22 +20487,36 @@
msgstr "tam klonlama için yapılandırılamadı"
msgid "scalar diagnose [<enlistment>]"
-msgstr "scalar diagnose [<gönüllükayıt>]"
+msgstr "scalar diagnose [<gönüllü-kayıt>]"
msgid "`scalar list` does not take arguments"
msgstr "'scalar list' argüman almıyor"
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<gönüllükayıt>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<gönüllü-kayıt>]"
msgid "reconfigure all registered enlistments"
msgstr "tüm kaydı yapılmış gönüllü kayıtları yeniden yapılandır"
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <gönüllükayıt>]"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+msgid "signal how to adjust background maintenance"
+msgstr "arka plan bakımının nasıl ayarlanacağını sinyalle"
+
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)]\n"
+" [--all | <gönüllü-kayıt>]"
msgid "--all or <enlistment>, but not both"
-msgstr "--all veya <gönüllükayıt>; ancak ikisi değil"
+msgstr "--all veya <gönüllü-kayıt>; ancak ikisi değil"
+
+#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "--maintenance seçeneği için bilinmeyen kip: %s"
#, c-format
msgid "could not remove stale scalar.repo '%s'"
@@ -22095,6 +21943,9 @@
msgid "number of entries in the cache tree to invalidate (default 0)"
msgstr "önbellek ağacındaki geçersizleştirilecek girdi sayısı (öntanımlı 0)"
+msgid "the number of objects to write"
+msgstr "yazılacak nesnelerin sayısı"
+
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <seçenekler> -- <revizyon-seçenekleri>"
@@ -22862,6 +22713,14 @@
msgid "unable to get random bytes"
msgstr "rastgele baytlar alınamıyor"
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "%<PRIuMAX>, %<PRIuMAX> sınırı üzerinden mmap yapılmaya çalışılıyor"
+
+#, c-format
+msgid "mmap failed%s"
+msgstr "mmap başarısız%s"
+
msgid "Unmerged paths:"
msgstr "Birleştirilmemiş yollar:"
@@ -23596,6 +23455,13 @@
"yapın."
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook, Message-ID'yi şuna yeniden atadı: %s\n"
+
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "Uyarı: Sunucu yanıtından Message-ID alınamadı.\n"
+
+#, perl-format
msgid "Failed to send %s\n"
msgstr "%s gönderilemedi\n"
diff --git a/po/uk.po b/po/uk.po
index 39c2228..5ae839f 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,8 +8,8 @@
msgstr ""
"Project-Id-Version: Git v2.46\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-09 15:40-0700\n"
-"PO-Revision-Date: 2025-03-09 16:53-0700\n"
+"POT-Creation-Date: 2025-06-07 16:24-0700\n"
+"PO-Revision-Date: 2025-06-03 18:43-0700\n"
"Last-Translator: Kateryna Golovanova <kate@kgthreads.com>\n"
"Language-Team: Ukrainian <https://github.com/arkid15r/git-uk-l10n/>\n"
"Language: uk\n"
@@ -18,7 +18,7 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
-"X-Generator: Poedit 3.5\n"
+"X-Generator: Poedit 3.6\n"
#, c-format
msgid "Huh (%s)?"
@@ -3304,11 +3304,8 @@
msgid "git cat-file <type> <object>"
msgstr "git cat-file <тип> <об’єкт>"
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <об’єкт>"
-
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <об’єкт>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <об’єкт>"
msgid ""
"git cat-file (--textconv | --filters)\n"
@@ -3348,9 +3345,6 @@
msgid "show object size"
msgstr "показати розмір об’єкта"
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "дозволити -s та -t працювати з пошкодженими/зіпсованими об’єктами"
-
msgid "use mail map file"
msgstr "використовувати файл відповідності поштових адрес"
@@ -3406,6 +3400,13 @@
msgid "use a <path> for (--textconv | --filters); Not with 'batch'"
msgstr "використати <шлях> для (--textconv | --filters); не з \"batch\""
+msgid "objects filter only supported in batch mode"
+msgstr "фільтр об’єктів підтримується лише в пакетному режимі"
+
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "фільтрування об’єктів не підтримується: \"%s\""
+
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "\"%s=<%s>\" потребує \"%s\" або \"%s\""
@@ -5699,6 +5700,50 @@
msgid "specify the content of the diagnostic archive"
msgstr "вказати вміст архіву діагностики"
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "не вдалося розібрати режим: %s"
+
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "не вдалося розібрати ідентифікатор об’єкта: %s"
+
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<опціі-різниці>]"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "нерозпізнаний аргумент: %s"
+
+msgid "working without -z is not supported"
+msgstr "робота без -z не підтримується"
+
+msgid "pathspec arguments not supported"
+msgstr "аргументи для визначника шляху не підтримуються"
+
+msgid "revision arguments not allowed"
+msgstr "аргументи ревізії не дозволені"
+
+msgid "invalid raw diff input"
+msgstr "невірне введення необробленої різниці"
+
+msgid "tree objects not supported"
+msgstr "об’єкти дерева не підтримуються"
+
+msgid "got EOF while reading path"
+msgstr "отримано EOF під час зчитування шляху"
+
+msgid "got EOF while reading destination path"
+msgstr "отримано EOF під час зчитування шляху призначення"
+
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "не вдалося розібрати оцінку перейменування/копіювання: %s"
+
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "невідомий статус різниці: %c"
+
msgid "--merge-base only works with two commits"
msgstr "--merge-base працює лише з двома комітами"
@@ -5839,6 +5884,9 @@
msgid "select handling of signed tags"
msgstr "вибрати обробку підписаних тегів"
+msgid "select handling of signed commits"
+msgstr "вибрати обробку підписаних комітів"
+
msgid "select handling of tags that tag filtered objects"
msgstr "вибрати обробку тегів, якими позначено відфільтровані обʼєкти"
@@ -6488,10 +6536,6 @@
msgstr "%s: об’єкт пошкоджений або відсутній: %s"
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s: об’єкт невідомого типу \"%s\": %s"
-
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s: неможливо розібрати об’єкт: %s"
@@ -6548,16 +6592,19 @@
msgid "invalid rev-index for pack '%s'"
msgstr "неприпустимий rev-index для \"%s\""
+msgid "Checking ref database"
+msgstr "Перевірка бази даних посилань"
+
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<обʼєкт>...]"
+" [--[no-]name-objects] [--[no-]references] [<об’єкт>...]"
msgid "show unreachable objects"
msgstr "показати недосяжні об’єкти"
@@ -6595,6 +6642,9 @@
msgid "show verbose names for reachable objects"
msgstr "показувати докладні назви для доступних об’єктів"
+msgid "check reference database consistency"
+msgstr "перевірити базу даних посилань"
+
msgid "Checking objects"
msgstr "Перевірка обʼєктів"
@@ -7748,10 +7798,6 @@
"простежити еволюцію діапазону рядків <початок>,<кінець> або функції :<назва-"
"функції> в <файлі>"
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "нерозпізнаний аргумент: %s"
-
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<діапазон>:<файл> не можна використовувати з визначником шляху"
@@ -8408,6 +8454,9 @@
msgid "also show informational/conflict messages"
msgstr "також показувати інформаційні/конфліктні повідомлення"
+msgid "suppress all output; only exit status wanted"
+msgstr "приховати весь вивід; потрібен лише статус виходу"
+
msgid "list filenames without modes/oids/stages"
msgstr "вивести назви файлів без режимів/oid/стадій"
@@ -8812,8 +8861,11 @@
"під час перепакування збирати пакувальні файли меншого розміру в партію, "
"більшу за цей розмір"
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<опції>] <джерело>... <призначення>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <джерело> <призначення>"
+
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <джерело>... <директорія-призначення>"
#, c-format
msgid "Directory %s is in index and no submodule?"
@@ -8884,6 +8936,11 @@
msgstr "%s, джерело=%s, призначення=%s"
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr ""
+"неможливо перенести як \"%s\", так і його батьківську директорію \"%s\""
+
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "Перейменування %s на %s\n"
@@ -9809,6 +9866,10 @@
msgid "unable to access commit %s"
msgstr "не вдалося отримати доступ до коміту %s"
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "неприпустимий визначник посилання \"%s\""
+
msgid "ignoring --verify-signatures for rebase"
msgstr "ігнорування --verify-signatures для перебазування"
@@ -10175,7 +10236,7 @@
"\n"
"а потім виконайте надсилання, використовуючи назву віддаленого сховища\n"
"\n"
-" git push <ім'я>\n"
+" git push <імʼя>\n"
msgid "--all can't be combined with refspecs"
msgstr "--all не можна комбінувати з визначниками посилань"
@@ -10792,6 +10853,9 @@
msgid "git reflog exists <ref>"
msgstr "git reflog exists <посилання>"
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <посилання>...]"
+
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "неприпустима позначка часу \"%s\" передана до \"--%s\""
@@ -10840,8 +10904,8 @@
msgstr "Позначення досяжних обʼєктів..."
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s вказує в нікуди!"
+msgid "reflog could not be found: '%s'"
+msgstr "не вдалося знайти журнал посилань: \"%s\""
msgid "no reflog specified to delete"
msgstr "не вказано журнал посилань для видалення"
@@ -10850,6 +10914,15 @@
msgid "invalid ref format: %s"
msgstr "неприпустимий формат посилання: %s"
+msgid "drop the reflogs of all references"
+msgstr "видалити журнали для всіх посилань"
+
+msgid "drop reflogs from the current worktree only"
+msgstr "видаляти журнали посилань лише з поточного робочого дерева"
+
+msgid "references specified along with --all"
+msgstr "посилання, вказані разом з --all"
+
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<формат> [--no-reflog] [--dry-run]"
@@ -11412,6 +11485,9 @@
msgid "with --cruft, expire objects older than this"
msgstr "з --cruft видалити обʼєкти, старіші за цей термін"
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "з параметром --cruft, перепакувати лише марні пакунки, менші за цей розмір"
+
msgid "remove redundant packs, and run git-prune-packed"
msgstr "видалити зайві пакунки і запустити git-prune-packed"
@@ -11890,6 +11966,9 @@
msgstr ""
"неприпустиме значення для \"%s\": \"%s\", єдиним допустимим форматом є \"%s\""
+msgid "-z option used with unsupported option"
+msgstr "Опція -z використовується з непідтримуваною опцією"
+
msgid "rev-list does not support display of notes"
msgstr "rev-list не підтримує відображення нотаток"
@@ -13771,8 +13850,8 @@
msgstr ""
"git update-ref [<опції>] <назва-посилання> <новий-oid> [<старий-oid>]"
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<опції>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<опції>] --stdin [-z] [--batch-updates]"
msgid "delete the reference"
msgstr "видалити посилання"
@@ -13786,6 +13865,9 @@
msgid "read updates from stdin"
msgstr "читати оновлення з stdin"
+msgid "batch reference updates"
+msgstr "пакетне оновлення посилань"
+
msgid "update the info files from scratch"
msgstr "оновити інформаційні файли з чистого аркуша"
@@ -14475,6 +14557,9 @@
msgid "Compare a tree to the working tree or index"
msgstr "Порівняти дерево з робочим деревом або індексом"
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "Порівняйте вміст і режим наданих blob пар"
+
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr ""
"Порівнює вміст та режим blob обʼєктів, знайдених у двох обʼєктах дерева"
@@ -17376,6 +17461,10 @@
msgstr "Невідоме значення для http.proactiveauth"
#, c-format
+msgid "failed to parse %s"
+msgstr "не вдалося розібрати %s"
+
+#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
msgstr "Непідтримуваний SSL обробник \"%s\". Підтримувані SSL обробники:"
@@ -17565,6 +17654,10 @@
msgstr "неправильний розмір маркера \"%s\", очікується число"
#, c-format
+msgid "Could not parse object '%s'"
+msgstr "Не вдалося розібрати обʼєкт \"%s\""
+
+#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "Не вдалося обʼєднати підмодуль %s (не активне)"
@@ -17805,267 +17898,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "збирання інформації про злиття не вдалося для дерев %s, %s, %s"
-msgid "(bad commit)\n"
-msgstr "(невірний коміт)\n"
-
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "невдала спроба add_cacheinfo для шляху \"%s\"; переривання злиття."
-
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr ""
-"процесу add_cacheinfo не вдалося зробити оновлення для шляху \"%s\"; "
-"переривання злиття."
-
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "не вдалося створити шлях \"%s\"%s"
-
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "Видалення %s, щоб звільнити місце для піддиректорії\n"
-
-msgid ": perhaps a D/F conflict?"
-msgstr ": можливо, D/F конфлікт?"
-
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "відмовлено у втраті невідстежуваного файла \"%s\""
-
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "blob очікується для %s \"%s\""
-
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "не вдалося відкрити \"%s\": %s"
-
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "не вдалося зробити символьне посилання \"%s\": %s"
-
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "не знаю, що робити з %06o %s \"%s\""
-
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "Не вдалося обʼєднати підмодуль %s (сховище пошкоджено)"
-
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "Перемотування підмодуля %s вперед до наступного коміту:"
-
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "Перемотування підмодуля %s вперед"
-
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr "Не вдалося злити підмодуль %s (злиття наступних комітів не знайдено)"
-
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "Не вдалося злити підмодуль %s (не вдалося перемотати вперед)"
-
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "Знайдено можливе вирішення злиття для підмодуля:\n"
-
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"Якщо все вірно, просто додайте це до індексу, наприклад,\n"
-"використавши:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"який прийме цю пропозицію.\n"
-
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "Не вдалося злити підмодуль %s (знайдено більше одного злиття)"
-
-msgid "failed to execute internal merge"
-msgstr "не вдалося виконати внутрішнє злиття"
-
-#, c-format
-msgid "unable to add %s to database"
-msgstr "не вдалося додати %s до бази даних"
-
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr ""
-"Помилка: відмовлено у втраті невідстежуваного файла %s; натомість записуємо "
-"до %s."
-
-#, 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 залишено "
-"в дереві."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"КОНФЛІКТ (%s/видалено): %s видалено в %s і %s в %s в %s. Версію %s з %s "
-"залишено у дереві."
-
-#, 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."
-
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"КОНФЛІКТ (%s/видалено): %s видалено в %s і %s в %s в %s. Версію %s з %s "
-"залишено в дереві в %s."
-
-msgid "rename"
-msgstr "перейменувати"
-
-msgid "renamed"
-msgstr "перейменовано"
-
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "Відмовлено у втраті брудного файла %s"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr ""
-"Відмовлено у втраті невідстежуваного файла %s, не дивлячись на те, що він "
-"знаходиться на шляху."
-
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"КОНФЛІКТ (перейменовано/додано): перейменовано %s->%s в %s. Додано %s в %s"
-
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s є директорією в %s, натомість додаємо як %s"
-
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr "Відмовлено у втраті невідстежуваного файла %s; натомість додаємо як %s"
-
-#, 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"
-
-msgid " (left unresolved)"
-msgstr " (залишилося нерозвʼязаним)"
-
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"КОНФЛІКТ (перейменовано/перейменовано): перейменовано %s->%s в %s. "
-"Перейменовано %s->%s в %s"
-
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"КОНФЛІКТ (розбіжність під час перейменування директорії): Неясно, куди "
-"помістити %s, оскільки директорію %s було перейменовано в кілька інших "
-"директорій, жодна з яких не отримала більшості файлів."
-
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"КОНФЛІКТ (перейменовано/перейменовано): перейменовано директорію %s->%s в "
-"%s. Перейменовано директорію %s->%s в %s"
-
-#, c-format
-msgid "cannot read object %s"
-msgstr "неможливо прочитати обʼєкт %s"
-
-#, c-format
-msgid "object %s is not a blob"
-msgstr "обʼєкт %s не є blob"
-
-msgid "modify"
-msgstr "змінити"
-
-msgid "modified"
-msgstr "змінено"
-
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "Пропущено %s (злите - те саме, що й існуюче)"
-
-#, c-format
-msgid "Adding as %s instead"
-msgstr "Додавання як %s замість цього"
-
-#, c-format
-msgid "Removing %s"
-msgstr "Видалення %s"
-
-msgid "file/directory"
-msgstr "файл/директорія"
-
-msgid "directory/file"
-msgstr "директорія/файл"
-
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr "КОНФЛІКТ (%s): в %s існує директорія з іменем %s. Додавання %s як %s"
-
-#, c-format
-msgid "Adding %s"
-msgstr "Додавання %s"
-
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "КОНФЛІКТ (додано/додано): Конфлікт злиття у %s"
-
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "не вдалося злити дерева %s та %s"
-
-msgid "Merging:"
-msgstr "Злиття:"
-
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "знайшли %u спільного предка:"
-msgstr[1] "знайшли %u спільних предків:"
-msgstr[2] "знайшли %u спільних предків:"
-
-msgid "merge returned no commit"
-msgstr "злиття не повернуло коміт"
-
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "Не вдалося розібрати обʼєкт \"%s\""
-
msgid "failed to read the cache"
msgstr "не вдалося прочитати кеш"
@@ -18107,13 +17939,14 @@
msgid "failed to clear multi-pack-index at %s"
msgstr "не вдалося очистити multi-pack-index при %s"
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "неможливо записати інкрементний MIDX з bitmap"
-
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr ""
"ігнорування існуючого multi-pack-index; невідповідність контрольних сум"
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "не вдалося завантажити зворотний індекс для MIDX %s"
+
msgid "Adding packfiles to multi-pack-index"
msgstr "Додавання пакунків до multi-pack-index"
@@ -18370,65 +18203,6 @@
msgstr "Не вдалося перетворити обʼєкт з \"%s\" на \"%s\""
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr "директорія об’єкта %s не існує; перевірте .git/objects/info/alternates"
-
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "не вдалося нормалізувати шлях запозиченого обʼєкта: %s"
-
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr ""
-"%s: ігнорування місць збереження запозичених об’єктів, надто глибока "
-"вкладеність"
-
-msgid "unable to fdopen alternates lockfile"
-msgstr "не вдалося виконати fdopen для файла блокування запозичених обʼєктів"
-
-msgid "unable to read alternates file"
-msgstr "не вдалося прочитати файл запозичених обʼєктів"
-
-msgid "unable to move new alternates file into place"
-msgstr "не вдалося перемістити файл нових запозичених обʼєктів на місце"
-
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "шлях \"%s\" не існує"
-
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr "посилання на сховище \"%s\" як повʼязане поки що не підтримується."
-
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "сховище посилання \"%s\" не є локальним сховищем."
-
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "сховище посилання \"%s\" є неглибоким"
-
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "сховище посилання \"%s\" прищеплено"
-
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "не вдалося знайти директорію обʼєктів, що відповідає %s"
-
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "неприпустимий рядок при розбиранні посилань запозичених обʼєктів: %s"
-
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "спроба виконати mmap %<PRIuMAX> за межею %<PRIuMAX>"
-
-#, c-format
-msgid "mmap failed%s"
-msgstr "операція mmap не вдалася%s"
-
-#, c-format
msgid "object file %s is empty"
msgstr "обʼєктний файл %s порожній"
@@ -18464,18 +18238,6 @@
msgstr "вільний обʼєкт %s (що зберігається у %s) пошкоджено"
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "заміна %s не знайдена для %s"
-
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "упакований обʼєкт %s (що зберігається у %s) пошкоджено"
-
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "відсутнє зіставлення %s до %s"
-
-#, c-format
msgid "unable to open %s"
msgstr "не вдалося відкрити %s"
@@ -18568,10 +18330,6 @@
msgstr "%s: непідтримуваний тип файлу"
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s не є допустимим \"%s\" обʼєктом"
-
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "невідповідність хешу для %s (очікувалось %s)"
@@ -18588,6 +18346,10 @@
msgstr "не вдалося розібрати заголовок %s"
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "не вдалося розібрати тип з заголовка \"%s\" в %s"
+
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "не вдалося розпакувати вміст %s"
@@ -18748,6 +18510,73 @@
msgstr "неприпустима назва обʼєкта \"%.*s\"."
#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "директорія об’єкта %s не існує; перевірте .git/objects/info/alternates"
+
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "не вдалося нормалізувати шлях запозиченого обʼєкта: %s"
+
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr ""
+"%s: ігнорування місць збереження запозичених об’єктів, надто глибока "
+"вкладеність"
+
+msgid "unable to fdopen alternates lockfile"
+msgstr "не вдалося виконати fdopen для файла блокування запозичених обʼєктів"
+
+msgid "unable to read alternates file"
+msgstr "не вдалося прочитати файл запозичених обʼєктів"
+
+msgid "unable to move new alternates file into place"
+msgstr "не вдалося перемістити файл нових запозичених обʼєктів на місце"
+
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "шлях \"%s\" не існує"
+
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr "посилання на сховище \"%s\" як повʼязане поки що не підтримується."
+
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "сховище посилання \"%s\" не є локальним сховищем."
+
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "сховище посилання \"%s\" є неглибоким"
+
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "сховище посилання \"%s\" прищеплено"
+
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "не вдалося знайти директорію обʼєктів, що відповідає %s"
+
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "неприпустимий рядок при розбиранні посилань запозичених обʼєктів: %s"
+
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "заміна %s не знайдена для %s"
+
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "упакований обʼєкт %s (що зберігається у %s) пошкоджено"
+
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "відсутнє зіставлення %s до %s"
+
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s не є допустимим \"%s\" обʼєктом"
+
+#, c-format
msgid "invalid object type \"%s\""
msgstr "неприпустимий тип обʼєкту \"%s\""
@@ -19034,6 +18863,14 @@
msgstr "%s недоступний"
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "значення %s для %s не в діапазоні [%<PRIdMAX>,%<PRIdMAX>]"
+
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s очікує ціле значення з необовʼязковим суфіксом k/m/g"
+
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr "%s очікує невід'ємне ціле значення з опціональним суфіксом k/m/g"
@@ -19193,10 +19030,6 @@
msgstr "невірне булеве значення оточення \"%s\" для \"%s\""
#, c-format
-msgid "failed to parse %s"
-msgstr "не вдалося розібрати %s"
-
-#, c-format
msgid "failed to walk children of tree %s: not found"
msgstr "не вдалося пройти дочірні елементи дерева %s: не знайдено"
@@ -19361,8 +19194,14 @@
msgstr "не вдалося отримати %s з віддаленого promisor"
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "відоме віддалене сховище з імʼям \"%s\" має URL \"%s\" замість \"%s\""
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "відсутній або пустий обіцяний URL для віддаленого \"%s\""
+
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr ""
+"відоме віддалене призначення з імʼям \"%s\", але з URL-адресою \"%s\" "
+"замість \"%s\""
#, c-format
msgid "unknown '%s' value for '%s' config option"
@@ -20128,6 +19967,10 @@
msgstr "Перевірка співпадіння посилань"
#, c-format
+msgid "unable to open '%s'"
+msgstr "не вдалося відкрити \"%s\""
+
+#, c-format
msgid "refname is dangerous: %s"
msgstr "refname є небезпечним: %s"
@@ -20201,10 +20044,6 @@
"назва посилання %s є символьним посиланням, копіювання якого не підтримується"
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "неприпустимий визначник посилання \"%s\""
-
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "шаблон \"%s\" не має \"*\""
@@ -20360,7 +20199,7 @@
#, c-format
msgid "config remote shorthand cannot begin with '/': %s"
-msgstr "скорочене ім'я віддаленої конфігураціі не може починатися з \"/\": %s"
+msgstr "скорочене імʼя віддаленої конфігураціі не може починатися з \"/\": %s"
msgid "more than one receivepack given, using the first"
msgstr "надано більше одного пакунка для отримання, використано перший"
@@ -20766,8 +20605,8 @@
msgid "could not set recommended config"
msgstr "не вдалося встановити рекомендовану конфігурацію"
-msgid "could not turn on maintenance"
-msgstr "не вдалося ввімкнути технічне обслуговування"
+msgid "could not toggle maintenance"
+msgstr "не вдалося переключити обслуговування"
msgid "could not start the FSMonitor daemon"
msgstr "не вдалося запустити FSMonitor демон"
@@ -20815,12 +20654,16 @@
msgid "specify if tags should be fetched during clone"
msgstr "вказати, чи потрібно отримувати теги під час клонування"
+msgid "specify if background maintenance should be enabled"
+msgstr "вказати, чи потрібно ввімкнути фонове обслуговування"
+
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
-"scalar clone [--single-branch] [--branch <головна-гілка>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <URL-адреса> [<коренева-директорія-проекту>]"
+"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<коренева-"
+"директорія-проекту>]"
#, c-format
msgid "cannot deduce worktree name from '%s'"
@@ -20858,19 +20701,33 @@
msgid "`scalar list` does not take arguments"
msgstr "\"scalar list\" не приймає аргументів"
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<коренева-директорія-проекту>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<коренева-директорія-проекту>]"
msgid "reconfigure all registered enlistments"
msgstr "переналаштувати всі зареєстровані кореневі директорії проекту"
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <коренева-директорія-проекту>]"
+msgid "(enable|disable|keep)"
+msgstr "(увімкнути|вимкнути|зберегти)"
+
+msgid "signal how to adjust background maintenance"
+msgstr "повідомити про те, як налаштувати фонове обслуговування"
+
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | <коренева-"
+"директорія-проекту>]"
msgid "--all or <enlistment>, but not both"
msgstr "--all або <коренева-директорія-проекту>, але не обидва"
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "невідомий режим для опції --maintenance: %s"
+
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "неможливо видалити застаріле scalar.repo \"%s\""
@@ -22323,6 +22180,9 @@
msgstr ""
"кількість записів у дереві кешу, які потрібно анулювати (за замовчуванням 0)"
+msgid "the number of objects to write"
+msgstr "кількість об’єктів для запису"
+
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <опції> -- <опції-ревізії>."
@@ -23105,6 +22965,14 @@
msgid "unable to get random bytes"
msgstr "не вдалося отримати випадкові байти"
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "спроба виконати mmap %<PRIuMAX> за межею %<PRIuMAX>"
+
+#, c-format
+msgid "mmap failed%s"
+msgstr "операція mmap не вдалася%s"
+
msgid "Unmerged paths:"
msgstr "Не злиті шляхи:"
@@ -23861,6 +23729,13 @@
"скористайтесь --smtp-debug."
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook перепризначив Message-ID на: %s\n"
+
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "Попередження: Не вдалося отримати Message-ID з відповіді сервера.\n"
+
+#, perl-format
msgid "Failed to send %s\n"
msgstr "Не вдалося надіслати %s\n"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 5cde401..139ae33 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -155,8 +155,8 @@
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-09 20:34+0800\n"
-"PO-Revision-Date: 2025-03-12 14:47+0800\n"
+"POT-Creation-Date: 2025-06-08 20:30+0800\n"
+"PO-Revision-Date: 2025-06-12 14:50+0800\n"
"Last-Translator: Teng Long <dyroneteng@gmail.com>\n"
"Language-Team: GitHub <https://github.com/dyrone/git/>\n"
"Language: zh_CN\n"
@@ -1075,10 +1075,9 @@
#: builtin/fast-export.c builtin/fetch.c builtin/help.c builtin/index-pack.c
#: builtin/init-db.c builtin/log.c builtin/ls-files.c builtin/merge-base.c
#: builtin/merge-tree.c builtin/merge.c builtin/pack-objects.c builtin/rebase.c
-#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-list.c
-#: builtin/rev-parse.c builtin/show-branch.c builtin/stash.c
-#: builtin/submodule--helper.c builtin/tag.c builtin/worktree.c parse-options.c
-#: range-diff.c revision.c
+#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-parse.c
+#: builtin/show-branch.c builtin/stash.c builtin/submodule--helper.c
+#: builtin/tag.c builtin/worktree.c parse-options.c range-diff.c revision.c
#, c-format
msgid "options '%s' and '%s' cannot be used together"
msgstr "选项 '%s' 和 '%s' 不能同时使用"
@@ -1965,7 +1964,7 @@
msgid "bad --attr-source or GIT_ATTR_SOURCE"
msgstr "错误的 --attr-source 或 GIT_ATTR_SOURCE"
-#: attr.c read-cache.c
+#: attr.c read-cache.c refs/packed-backend.c
#, c-format
msgid "unable to stat '%s'"
msgstr "无法对 %s 执行 stat"
@@ -2777,7 +2776,7 @@
msgid "bypass pre-applypatch and applypatch-msg hooks"
msgstr "绕过 pre-applypatch 和 applypatch-msg 钩子"
-#: builtin/am.c
+#: builtin/am.c builtin/cat-file.c
msgid "historical option -- no-op"
msgstr "老的参数 —— 无作用"
@@ -4084,7 +4083,7 @@
msgid "Unbundling objects"
msgstr "解包对象中"
-#: builtin/cat-file.c merge-recursive.c
+#: builtin/cat-file.c
#, c-format
msgid "cannot read object %s '%s'"
msgstr "不能读取对象 %s '%s'"
@@ -4121,12 +4120,8 @@
msgstr "git cat-file <类型> <对象>"
#: builtin/cat-file.c
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <对象>"
-
-#: builtin/cat-file.c
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <对象>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <对象>"
#: builtin/cat-file.c
msgid ""
@@ -4172,10 +4167,6 @@
msgid "show object size"
msgstr "显示对象大小"
-#: builtin/cat-file.c
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "允许 -s 和 -t 对损坏的对象生效"
-
#: builtin/cat-file.c builtin/log.c
msgid "use mail map file"
msgstr "使用邮件映射文件"
@@ -4247,6 +4238,15 @@
msgstr "(--textconv | --filters) 使用 <路径>;而不是 'batch'"
#: builtin/cat-file.c
+msgid "objects filter only supported in batch mode"
+msgstr "对象过滤器只支持批处理模式"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "不支持对象过滤器:'%s'"
+
+#: builtin/cat-file.c
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "'%s=<%s>' 需要 '%s' 或 '%s'"
@@ -5952,7 +5952,7 @@
#: builtin/commit.c bundle.c rerere.c sequencer.c
#, c-format
msgid "could not open '%s'"
-msgstr "不能打开 '%s'"
+msgstr "无法打开 '%s'"
#: builtin/commit.c
msgid "could not write commit template"
@@ -7038,6 +7038,64 @@
msgid "specify the content of the diagnostic archive"
msgstr "指定诊断信息归档包的内容"
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "不能解析模式:%s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "不能解析对象ID:%s"
+
+#: builtin/diff-pairs.c
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<差异选项>]"
+
+#: builtin/diff-pairs.c builtin/log.c builtin/replay.c builtin/shortlog.c
+#: bundle.c
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "未识别的参数:%s"
+
+#: builtin/diff-pairs.c
+msgid "working without -z is not supported"
+msgstr "不支持在不带 -z 参数的情况下工作"
+
+#: builtin/diff-pairs.c
+msgid "pathspec arguments not supported"
+msgstr "不支持路径规格参数"
+
+#: builtin/diff-pairs.c
+msgid "revision arguments not allowed"
+msgstr "不支持版本参数"
+
+#: builtin/diff-pairs.c
+msgid "invalid raw diff input"
+msgstr "无效的原始 diff 输入"
+
+#: builtin/diff-pairs.c
+msgid "tree objects not supported"
+msgstr "不支持树对象"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading path"
+msgstr "读取路径时遇到文件结束"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading destination path"
+msgstr "读取目标路径时遇到文件结束"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "无法解析重命名/复制分数:%s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "未知的差异状态:%c"
+
#: builtin/diff-tree.c
msgid "--merge-base only works with two commits"
msgstr "--merge-base 仅适用于两个提交"
@@ -7215,6 +7273,10 @@
msgstr "选择如何处理签名标签"
#: builtin/fast-export.c
+msgid "select handling of signed commits"
+msgstr "选择如何处理已签名提交"
+
+#: builtin/fast-export.c
msgid "select handling of tags that tag filtered objects"
msgstr "选择当标签指向被过滤对象时该标签的处理方式"
@@ -7474,7 +7536,7 @@
msgid "option \"%s\" is ignored for %s"
msgstr "选项 \"%s\" 为 %s 所忽略"
-#: builtin/fetch.c object-file.c
+#: builtin/fetch.c object-store.c
#, c-format
msgid "%s is not a valid object"
msgstr "%s 不是一个有效的对象"
@@ -8013,11 +8075,6 @@
#: builtin/fsck.c
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s:对象有未知的类型 '%s': %s"
-
-#: builtin/fsck.c
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s:不能解析对象:%s"
@@ -8089,16 +8146,20 @@
msgstr "包文件 '%s' 的反向索引文件无效"
#: builtin/fsck.c
+msgid "Checking ref database"
+msgstr "正在检查引用数据库"
+
+#: builtin/fsck.c
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<对象>...]"
+" [--[no-]name-objects] [--[no-]references] [<对象>...]"
#: builtin/fsck.c
msgid "show unreachable objects"
@@ -8148,6 +8209,10 @@
msgid "show verbose names for reachable objects"
msgstr "显示可达对象的详细名称"
+#: builtin/fsck.c
+msgid "check reference database consistency"
+msgstr "检查引用数据库一致性"
+
#: builtin/fsck.c builtin/index-pack.c
msgid "Checking objects"
msgstr "正在检查对象"
@@ -9580,11 +9645,6 @@
"<file>"
msgstr "跟踪 <文件> 中 <开始>,<结束> 范围内的行或函数 :<函数名> 的演变"
-#: builtin/log.c builtin/replay.c builtin/shortlog.c bundle.c
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "未能识别的参数:%s"
-
#: builtin/log.c
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<范围>:<文件> 不能和路径表达式共用"
@@ -9602,7 +9662,7 @@
#: builtin/log.c
#, c-format
msgid "could not read object %s"
-msgstr "不能读取对象 %s"
+msgstr "无法读取对象 %s"
#: builtin/log.c
#, c-format
@@ -10420,6 +10480,10 @@
msgstr "同时显示额外信息/冲突消息"
#: builtin/merge-tree.c
+msgid "suppress all output; only exit status wanted"
+msgstr "抑制所有输出;只保留退出状态"
+
+#: builtin/merge-tree.c
msgid "list filenames without modes/oids/stages"
msgstr "列出没有模式/对象 ID/暂存的文件名"
@@ -10580,7 +10644,7 @@
msgid "Already up to date. (nothing to squash)"
msgstr "已经是最新的。(无可挤压)"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Already up to date."
msgstr "已经是最新的。"
@@ -10604,7 +10668,7 @@
msgid "Bad branch.%s.mergeoptions string: %s"
msgstr "坏的 branch.%s.mergeoptions 字符串:%s"
-#: builtin/merge.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Unable to write index."
msgstr "不能写入索引。"
@@ -10760,7 +10824,7 @@
msgid "Updating %s..%s\n"
msgstr "更新 %s..%s\n"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
#, c-format
msgid ""
"Your local changes to the following files would be overwritten by merge:\n"
@@ -10922,8 +10986,12 @@
msgstr "在 repack 期间,将较小尺寸的包文件收集到大于此大小的批次中"
#: builtin/mv.c
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<选项>] <源>... <目标>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <源> <目标>"
+
+#: builtin/mv.c
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <源>... <目标目录>"
#: builtin/mv.c
#, c-format
@@ -11013,6 +11081,11 @@
#: builtin/mv.c
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "不能同时移动 '%s' 及其父目录 '%s'"
+
+#: builtin/mv.c
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "重命名 %s 至 %s\n"
@@ -12151,6 +12224,11 @@
msgid "unable to access commit %s"
msgstr "无法访问提交 %s"
+#: builtin/pull.c refspec.c
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "无效的引用规格:'%s'"
+
#: builtin/pull.c
msgid "ignoring --verify-signatures for rebase"
msgstr "为变基操作忽略 --verify-signatures"
@@ -13255,6 +13333,10 @@
msgstr "git reflog exists <引用>"
#: builtin/reflog.c
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <引用>...]"
+
+#: builtin/reflog.c
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "给 '--%2$s' 的时间戳 '%1$s' 无效"
@@ -13314,8 +13396,8 @@
#: builtin/reflog.c
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s 指向不存在!"
+msgid "reflog could not be found: '%s'"
+msgstr "无法找到引用日志:'%s'"
#: builtin/reflog.c
msgid "no reflog specified to delete"
@@ -13326,6 +13408,18 @@
msgid "invalid ref format: %s"
msgstr "无效的引用格式:%s"
+#: builtin/reflog.c
+msgid "drop the reflogs of all references"
+msgstr "丢弃所有引用的引用日志"
+
+#: builtin/reflog.c
+msgid "drop reflogs from the current worktree only"
+msgstr "仅从当前工作区中丢弃引用日志"
+
+#: builtin/reflog.c
+msgid "references specified along with --all"
+msgstr "--all 选项不能与具体引用同时使用"
+
#: builtin/refs.c
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<格式> [--no-reflog] [--dry-run]"
@@ -14006,6 +14100,10 @@
msgstr "使用 --cruft,使早于给定时间的对象过期"
#: builtin/repack.c
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "使用 --cruft 时,仅重新打包小于此大小的废弃包文件"
+
+#: builtin/repack.c
msgid "remove redundant packs, and run git-prune-packed"
msgstr "删除多余的包,运行 git-prune-packed"
@@ -14597,6 +14695,10 @@
msgstr "'%s' 的值无效:'%s',唯一允许的格式是 '%s'"
#: builtin/rev-list.c
+msgid "-z option used with unsupported option"
+msgstr "-z 选项与不支持的选项同时使用"
+
+#: builtin/rev-list.c
msgid "rev-list does not support display of notes"
msgstr "rev-list 不支持显示注解"
@@ -16865,8 +16967,8 @@
msgstr "git update-ref [<选项>] <引用名> <新对象> [<旧对象>]"
#: builtin/update-ref.c
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<选项>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<选项>] --stdin [-z] [--batch-updates]"
#: builtin/update-ref.c
msgid "delete the reference"
@@ -16884,6 +16986,10 @@
msgid "read updates from stdin"
msgstr "从标准输入读取更新"
+#: builtin/update-ref.c
+msgid "batch reference updates"
+msgstr "批量引用更新"
+
#: builtin/update-server-info.c
msgid "update the info files from scratch"
msgstr "从头开始更新文件信息"
@@ -17730,6 +17836,10 @@
msgstr "将一个树和工作区或索引做比较"
#: command-list.h
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "比较提供的 blob 对的内容和模式"
+
+#: command-list.h
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr "比较两个树对象的文件内容和模式"
@@ -19861,7 +19971,7 @@
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "配置变量 'diff.submodule' 未知的取值:'%s'"
-#: diff.c merge-recursive.c transport.c
+#: diff.c merge-ort.c transport.c
#, c-format
msgid "unknown value for config '%s': %s"
msgstr "配置 '%s' 未知的取值:%s"
@@ -21288,6 +21398,11 @@
msgid "Unknown value for http.proactiveauth"
msgstr "http.proactiveauth 为未知取值"
+#: http.c parse.c
+#, c-format
+msgid "failed to parse %s"
+msgstr "无法解析 %s"
+
#: http.c
#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
@@ -21512,7 +21627,12 @@
msgid "invalid marker-size '%s', expecting an integer"
msgstr "无效的标记大小 '%s',应为一个整数"
-#: merge-ort.c merge-recursive.c
+#: merge-ort-wrappers.c
+#, c-format
+msgid "Could not parse object '%s'"
+msgstr "不能解析对象 '%s'"
+
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "无法合并子模组 %s (没有检出)"
@@ -21522,7 +21642,7 @@
msgid "Failed to merge submodule %s (no merge base)"
msgstr "无法合并子模组 %s (没有合并基线)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits not present)"
msgstr "无法合并子模组 %s(提交不存在)"
@@ -21532,7 +21652,7 @@
msgid "error: failed to merge submodule %s (repository corrupt)"
msgstr "错误:无法合并子模组 %s(仓库损坏)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits don't follow merge-base)"
msgstr "无法合并子模组 %s (提交未跟随合并基线)"
@@ -21572,12 +21692,12 @@
msgid "error: unable to add %s to database"
msgstr "错误:不能添加 %s 至对象库"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Auto-merging %s"
msgstr "自动合并 %s"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
@@ -21586,7 +21706,7 @@
"冲突(隐式目录重命名):处于隐式目录重命名的现存文件/目录 %s,将以下路径放"
"在:%s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
@@ -21605,14 +21725,14 @@
"冲突(分割的目录重命名):不清楚重命名 %s 到哪里,因为它被重命名到多个其他目"
"录中,没有一个目标目录中包含多数文件。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
"renamed."
msgstr "警告:避免应用 %s -> %s 的重命名到 %s,因为 %s 本身已被重命名。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s added in %s inside a directory that was renamed in %s; "
@@ -21620,7 +21740,7 @@
msgstr ""
"路径已更新:%s 添加到 %s,位于一个被重命名到 %s 的目录中,将其移动到 %s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s renamed to %s in %s, inside a directory that was renamed in "
@@ -21629,7 +21749,7 @@
"路径已更新:%1$s 重命名为 %3$s 中的 %2$s,而该目录被重命名到 %4$s 中,将其移"
"动到 %5$s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s added in %s inside a directory that was renamed "
@@ -21638,7 +21758,7 @@
"冲突(文件位置):%s 添加到 %s,位于一个被重命名为 %s 的目录中,建议将其移动"
"到 %s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s renamed to %s in %s, inside a directory that "
@@ -21703,19 +21823,19 @@
"冲突(不同类型):%s 在两侧有不同的类型,将其中之一重命名以便它们能记录在不同"
"位置。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "content"
msgstr "内容"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "add/add"
msgstr "添加/添加"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "submodule"
msgstr "子模组"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
msgstr "冲突(%s):合并冲突于 %s"
@@ -21777,312 +21897,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "无法收集树 %s、%s、%s 的合并信息"
-#: merge-recursive.c
-msgid "(bad commit)\n"
-msgstr "(坏提交)\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "add_cacheinfo 对路径 '%s' 执行失败,合并终止。"
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr "add_cacheinfo 无法刷新路径 '%s',合并终止。"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "无法创建路径 '%s'%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "删除 %s 以便为子目录留出空间\n"
-
-#: merge-recursive.c
-msgid ": perhaps a D/F conflict?"
-msgstr ":可能是一个目录/文件冲突?"
-
-#: merge-recursive.c
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "拒绝丢弃 '%s' 中的未跟踪文件"
-
-#: merge-recursive.c
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "%s '%s' 应为数据对象"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "无法打开 '%s':%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "无法创建符号链接 '%s':%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "不知道如何处理 %06o %s '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "无法合并子模组 %s(仓库损坏)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "子模组 %s 快进到如下提交:"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "快进子模组 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr "无法合并子模组 %s (没发现合并跟随的提交)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "无法合并子模组 %s(非快进)"
-
-#: merge-recursive.c
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "找到子模组的一个可能的合并方案:\n"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"如果这个正确,将其添加到索引,例如使用命令:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"以接受此建议。\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "无法合并子模组 %s (发现多个合并)"
-
-#: merge-recursive.c
-msgid "failed to execute internal merge"
-msgstr "无法执行内部合并"
-
-#: merge-recursive.c
-#, c-format
-msgid "unable to add %s to database"
-msgstr "不能添加 %s 至对象库"
-
-#: merge-recursive.c
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr "错误:拒绝丢失未跟踪文件 '%s',而是写入 %s。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"冲突(%1$s/删除):%2$s 在 %3$s 中被删除,在 %5$s 中被 %4$s。%7$s 的 %6$s 版"
-"本被保留。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"冲突(%1$s/删除):%2$s 在 %3$s 中被删除,在 %6$s 中的 %5$s 被 %4$s。%8$s 的 "
-"%7$s 版本被保留。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"冲突(%1$s/删除):%2$s 在 %3$s 中被删除,在 %5$s 中被 %4$s。%7$s 的 %6$s 版"
-"本保留在 %8$s 中。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"冲突(%1$s/删除):%2$s 在 %3$s 中被删除,在 %6$s 中的 %5$s 被 %4$s。%8$s 的 "
-"%7$s 版本保留在 %9$s 中。"
-
-#: merge-recursive.c
-msgid "rename"
-msgstr "重命名"
-
-#: merge-recursive.c
-msgid "renamed"
-msgstr "重命名"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "拒绝丢失脏文件 '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr "拒绝在 '%s' 处失去未跟踪文件,即使它存在于重命名中。"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr "冲突(重命名/添加):在 %3$s 中重命名 %1$s->%2$s。在 %5$s 中添加 %4$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s 是 %s 中的一个目录而以 %s 为名被添加"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr "拒绝丢失未跟踪文件 '%s',而是添加为 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"冲突(重命名/重命名):在分支 \"%3$s\" 中重命名 \"%1$s\"->\"%2$s\",在分支 "
-"\"%6$s\" 中重命名 \"%4$s\"->\"%5$s\"%7$s"
-
-#: merge-recursive.c
-msgid " (left unresolved)"
-msgstr "(留下未解决)"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"冲突(重命名/重命名):在 %3$s 中重命名 %1$s->%2$s,在 %6$s 中重命名 %4$s-"
-">%5$s"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"冲突(分割的目录重命名):不清楚 %s 应该放在哪里,因为目录 %s 被重命名到多个"
-"其它目录,没有目录包含大部分文件。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"冲突(重命名/重命名):在 %3$s 中重命名目录 %1$s->%2$s,在 %6$s 中重命名目录 "
-"%4$s->%5$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "cannot read object %s"
-msgstr "不能读取对象 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "object %s is not a blob"
-msgstr "对象 %s 不是一个数据对象"
-
-#: merge-recursive.c
-msgid "modify"
-msgstr "修改"
-
-#: merge-recursive.c
-msgid "modified"
-msgstr "修改"
-
-#: merge-recursive.c
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "略过 %s(已经做过相同合并)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding as %s instead"
-msgstr "而是以 %s 为名添加"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s"
-msgstr "删除 %s"
-
-#: merge-recursive.c
-msgid "file/directory"
-msgstr "文件/目录"
-
-#: merge-recursive.c
-msgid "directory/file"
-msgstr "目录/文件"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr "冲突(%1$s):在 %3$s 中有一个名为 %2$s 的目录。以 %5$s 为名添加 %4$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding %s"
-msgstr "添加 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "冲突(add/add):合并冲突于 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "无法合并树 %s 和 %s"
-
-#: merge-recursive.c
-msgid "Merging:"
-msgstr "合并:"
-
-#: merge-recursive.c
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "发现 %u 个共同祖先:"
-msgstr[1] "发现 %u 个共同祖先:"
-
-#: merge-recursive.c
-msgid "merge returned no commit"
-msgstr "合并未返回提交"
-
-#: merge-recursive.c
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "不能解析对象 '%s'"
-
#: merge.c
msgid "failed to read the cache"
msgstr "无法读取缓存"
@@ -22136,14 +21950,15 @@
msgstr "无法清理位于 %s 的多包索引"
#: midx-write.c
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "无法使用位图写入增量 MIDX"
-
-#: midx-write.c
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr "忽略已存在的多包索引,校验码不匹配"
#: midx-write.c
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "无法加载多包索引 %s 的反向索引"
+
+#: midx-write.c
msgid "Adding packfiles to multi-pack-index"
msgstr "添加包文件到多包索引"
@@ -22459,78 +22274,6 @@
#: object-file.c
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr "对象目录 %s 不存在,检查 .git/objects/info/alternates"
-
-#: object-file.c
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "无法规范化备用对象路径:%s"
-
-#: object-file.c
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s:忽略备用对象库,嵌套太深"
-
-#: object-file.c
-msgid "unable to fdopen alternates lockfile"
-msgstr "无法 fdopen 替换锁文件"
-
-#: object-file.c
-msgid "unable to read alternates file"
-msgstr "无法读取替代文件"
-
-#: object-file.c
-msgid "unable to move new alternates file into place"
-msgstr "无法将新的备用文件移动到位"
-
-#: object-file.c
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "路径 '%s' 不存在"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr "尚不支持将参考仓库 '%s' 作为一个链接检出。"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "参考仓库 '%s' 不是一个本地仓库。"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "参考仓库 '%s' 是一个浅克隆"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "参考仓库 '%s' 已被移植"
-
-#: object-file.c
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "无法找到和 %s 匹配的对象目录"
-
-#: object-file.c
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "解析备用引用时无效的行:%s"
-
-#: object-file.c
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "尝试 mmap %<PRIuMAX>,超过了最大值 %<PRIuMAX>"
-
-#: object-file.c
-#, c-format
-msgid "mmap failed%s"
-msgstr "mmap 失败%s"
-
-#: object-file.c
-#, c-format
msgid "object file %s is empty"
msgstr "对象文件 %s 为空"
@@ -22575,21 +22318,6 @@
#: object-file.c
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "找不到 %2$s 的替代 %1$s"
-
-#: object-file.c
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "打包对象 %s(保存在 %s)已损坏"
-
-#: object-file.c
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "缺少 %s 到 %s 的映射"
-
-#: object-file.c
-#, c-format
msgid "unable to open %s"
msgstr "不能打开 %s"
@@ -22706,11 +22434,6 @@
#: object-file.c
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s 不是一个有效的 '%s' 对象"
-
-#: object-file.c
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "%s 的哈希值不匹配(预期 %s)"
@@ -22731,6 +22454,11 @@
#: object-file.c
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "无法从 %s 的包头 '%s' 中解析类型"
+
+#: object-file.c
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "无法解压缩 %s 的内容"
@@ -22906,6 +22634,88 @@
msgid "invalid object name '%.*s'."
msgstr "无效的对象名 '%.*s'。"
+#: object-store.c
+#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "对象目录 %s 不存在,检查 .git/objects/info/alternates"
+
+#: object-store.c
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "无法规范化备用对象路径:%s"
+
+#: object-store.c
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s:忽略备用对象库,嵌套太深"
+
+#: object-store.c
+msgid "unable to fdopen alternates lockfile"
+msgstr "无法 fdopen alternates 的锁文件"
+
+#: object-store.c
+msgid "unable to read alternates file"
+msgstr "无法读取 alternates 文件"
+
+#: object-store.c
+msgid "unable to move new alternates file into place"
+msgstr "无法将新的 alternates 文件移动到位"
+
+#: object-store.c
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "路径 '%s' 不存在"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr "尚不支持将参考仓库 '%s' 作为链接检出。"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "参考仓库 '%s' 不是本地仓库。"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "参考仓库 '%s' 是浅克隆"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "参考仓库 '%s' 已被移植"
+
+#: object-store.c
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "无法找到和 %s 匹配的对象目录"
+
+#: object-store.c
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "解析备用引用时遇到无效的行:%s"
+
+#: object-store.c
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "找不到 %2$s 的替代 %1$s"
+
+#: object-store.c
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "打包对象 %s(保存在 %s)已损坏"
+
+#: object-store.c
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "缺少 %s 到 %s 的映射"
+
+#: object-store.c
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s 不是有效的 '%s' 对象"
+
#: object.c
#, c-format
msgid "invalid object type \"%s\""
@@ -23253,6 +23063,16 @@
#: parse-options.c
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "%2$s 的值 %1$s 不在范围 [%3$<PRIdMAX>,%4$<PRIdMAX>] 内"
+
+#: parse-options.c
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s 期望一个带可选 k/m/g 后缀的整数"
+
+#: parse-options.c
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr "%s 期望一个非负整数和一个可选的 k/m/g 后缀"
@@ -23437,11 +23257,6 @@
msgid "bad boolean environment value '%s' for '%s'"
msgstr "对于 '%2$s' 的错误的布尔环境取值 '%1$s'"
-#: parse.c
-#, c-format
-msgid "failed to parse %s"
-msgstr "无法解析 %s"
-
#: path-walk.c
#, c-format
msgid "failed to walk children of tree %s: not found"
@@ -23644,8 +23459,13 @@
#: promisor-remote.c
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
-msgstr "已知远程名称为 '%s',但 url 为 '%s' 而不是 '%s'"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "远程 '%s' 的 URL 没有公布或为空"
+
+#: promisor-remote.c
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
+msgstr "已知远程名称为 '%s',但 URL 是 '%s' 而非 '%s'"
#: promisor-remote.c
#, c-format
@@ -24546,6 +24366,11 @@
msgid "Checking references consistency"
msgstr "正在检查引用一致性"
+#: refs/packed-backend.c
+#, c-format
+msgid "unable to open '%s'"
+msgstr "无法打开 '%s'"
+
#: refs/reftable-backend.c
#, c-format
msgid "refname is dangerous: %s"
@@ -24626,11 +24451,6 @@
#: refspec.c
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "无效的引用规格:'%s'"
-
-#: refspec.c
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "模式 '%s' 没有 '*'"
@@ -25286,8 +25106,8 @@
msgstr "无法设置推荐的配置"
#: scalar.c
-msgid "could not turn on maintenance"
-msgstr "无法打开维护模式"
+msgid "could not toggle maintenance"
+msgstr "无法切换维护模式"
#: scalar.c
msgid "could not start the FSMonitor daemon"
@@ -25347,12 +25167,16 @@
msgstr "如若应在克隆期间获取标签则指定"
#: scalar.c
+msgid "specify if background maintenance should be enabled"
+msgstr "指定是否启用后台维护"
+
+#: scalar.c
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<登记>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<登记>]"
#: scalar.c
#, c-format
@@ -25401,16 +25225,27 @@
msgstr "`scalar list` 不带参数"
#: scalar.c
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<登记>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<登记>]"
#: scalar.c
msgid "reconfigure all registered enlistments"
msgstr "重新配置所有注册的登记"
#: scalar.c
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <登记>]"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+#: scalar.c
+msgid "signal how to adjust background maintenance"
+msgstr "指定如何调整后台维护"
+
+#: scalar.c
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | <登记>]"
#: scalar.c
msgid "--all or <enlistment>, but not both"
@@ -25418,6 +25253,11 @@
#: scalar.c
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "--maintenance 选项的模式未知:%s"
+
+#: scalar.c
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "无法删除过期的 scalar.repo '%s'"
@@ -27123,6 +26963,10 @@
msgid "number of entries in the cache tree to invalidate (default 0)"
msgstr "缓存树中无效化的条目数量(默认 0)"
+#: t/helper/test-pack-deltas.c
+msgid "the number of objects to write"
+msgstr "写入对象的数量"
+
#: t/helper/test-path-walk.c
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <选项> -- <版本选项>"
@@ -28051,6 +27895,16 @@
msgid "unable to get random bytes"
msgstr "无法获取随机字节"
+#: wrapper.c
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "尝试内存映射(mmap) %<PRIuMAX>,超过了最大值 %<PRIuMAX>"
+
+#: wrapper.c
+#, c-format
+msgid "mmap failed%s"
+msgstr "mmap 失败%s"
+
#: wt-status.c
msgid "Unmerged paths:"
msgstr "未合并的路径:"
@@ -28971,6 +28825,15 @@
#: git-send-email.perl
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook 重新分配了 Message-ID 为:%s\n"
+
+#: git-send-email.perl
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "警告:无法从服务器响应中获取 Message-ID。\n"
+
+#: git-send-email.perl
+#, perl-format
msgid "Failed to send %s\n"
msgstr "无法发送 %s\n"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index aa74d65..4fcbb71 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -30,8 +30,8 @@
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2025-03-09 10:39+0800\n"
-"PO-Revision-Date: 2025-03-09 10:52+0800\n"
+"POT-Creation-Date: 2025-06-12 22:09+0800\n"
+"PO-Revision-Date: 2025-06-12 22:25+0800\n"
"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
"Language-Team: Chinese (Traditional) <http://weblate.slat.org/projects/git-"
"po/git-cli/zh_Hant/>\n"
@@ -40,7 +40,7 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 3.5\n"
+"X-Generator: Poedit 3.6\n"
"X-ZhConverter: 繁化姬 dict-f4bc617e-r910 @ 2019/11/16 20:23:12 | https://"
"zhconvert.org\n"
@@ -954,10 +954,9 @@
#: builtin/fast-export.c builtin/fetch.c builtin/help.c builtin/index-pack.c
#: builtin/init-db.c builtin/log.c builtin/ls-files.c builtin/merge-base.c
#: builtin/merge-tree.c builtin/merge.c builtin/pack-objects.c builtin/rebase.c
-#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-list.c
-#: builtin/rev-parse.c builtin/show-branch.c builtin/stash.c
-#: builtin/submodule--helper.c builtin/tag.c builtin/worktree.c parse-options.c
-#: range-diff.c revision.c
+#: builtin/repack.c builtin/replay.c builtin/reset.c builtin/rev-parse.c
+#: builtin/show-branch.c builtin/stash.c builtin/submodule--helper.c
+#: builtin/tag.c builtin/worktree.c parse-options.c range-diff.c revision.c
#, c-format
msgid "options '%s' and '%s' cannot be used together"
msgstr "無法同時使用「%s」和「%s」選項"
@@ -1838,7 +1837,7 @@
msgid "bad --attr-source or GIT_ATTR_SOURCE"
msgstr "無效的 --attr-source 或 GIT_ATTR_SOURCE"
-#: attr.c read-cache.c
+#: attr.c read-cache.c refs/packed-backend.c
#, c-format
msgid "unable to stat '%s'"
msgstr "無法統計「%s」"
@@ -2655,7 +2654,7 @@
msgid "bypass pre-applypatch and applypatch-msg hooks"
msgstr "繞過 pre-applypatch 和 applypatch-msg 掛鉤"
-#: builtin/am.c
+#: builtin/am.c builtin/cat-file.c
msgid "historical option -- no-op"
msgstr "歷史遺留選項——無作用"
@@ -3237,7 +3236,7 @@
#: builtin/blame.c
msgid "show output score for blame entries"
-msgstr "顯示溯源項目的輸出得分"
+msgstr "顯示溯源項目的輸出分數"
#: builtin/blame.c
msgid "show original filename (Default: auto)"
@@ -3702,8 +3701,8 @@
#: builtin/branch.c
msgid ""
-"branch with --recurse-submodules can only be used if submodule."
-"propagateBranches is enabled"
+"branch with --recurse-submodules can only be used if "
+"submodule.propagateBranches is enabled"
msgstr ""
"有 --recurse-submodules 的分支,只能在啟用 submodule.propagateBranches 時使用"
@@ -3967,7 +3966,7 @@
msgid "Unbundling objects"
msgstr "正在拆分物件"
-#: builtin/cat-file.c merge-recursive.c
+#: builtin/cat-file.c
#, c-format
msgid "cannot read object %s '%s'"
msgstr "無法讀取物件 %s「%s」"
@@ -4004,12 +4003,9 @@
msgstr "git cat-file <type> <object>"
#: builtin/cat-file.c
-msgid "git cat-file (-e | -p) <object>"
-msgstr "git cat-file (-e | -p) <object>"
-
-#: builtin/cat-file.c
-msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
-msgstr "git cat-file (-t | -s) [--allow-unknown-type] <object>"
+#| msgid "git cat-file (-e | -p) <object>"
+msgid "git cat-file (-e | -p | -t | -s) <object>"
+msgstr "git cat-file (-e | -p | -t | -s) <object>"
#: builtin/cat-file.c
msgid ""
@@ -4056,10 +4052,6 @@
msgid "show object size"
msgstr "顯示物件大小"
-#: builtin/cat-file.c
-msgid "allow -s and -t to work with broken/corrupt objects"
-msgstr "允許 -s 和 -t 對損壞的物件生效"
-
#: builtin/cat-file.c builtin/log.c
msgid "use mail map file"
msgstr "使用信件映射檔案"
@@ -4131,6 +4123,15 @@
msgstr "請在 (--textconv | --filters) 使用 <path>,而非「batch」"
#: builtin/cat-file.c
+msgid "objects filter only supported in batch mode"
+msgstr "物件過濾器僅支援批次模式"
+
+#: builtin/cat-file.c
+#, c-format
+msgid "objects filter not supported: '%s'"
+msgstr "不支援的物件過濾器:「%s」"
+
+#: builtin/cat-file.c
#, c-format
msgid "'%s=<%s>' needs '%s' or '%s'"
msgstr "「%s=<%s>」需要「%s」或「%s」"
@@ -5642,17 +5643,6 @@
msgstr "git commit-tree:讀取失敗"
#: builtin/commit.c
-#| msgid ""
-#| "git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n"
-#| " [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|"
-#| "reword):]<commit>]\n"
-#| " [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n"
-#| " [--allow-empty-message] [--no-verify] [-e] [--"
-#| "author=<author>]\n"
-#| " [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n"
-#| " [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
-#| " [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]\n"
-#| " [--] [<pathspec>...]"
msgid ""
"git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]\n"
" [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|"
@@ -6933,6 +6923,65 @@
msgid "specify the content of the diagnostic archive"
msgstr "指定診斷封存檔的內容"
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse mode: %s"
+msgstr "無法解析模式:%s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse object id: %s"
+msgstr "無法解析物件 ID:%s"
+
+#: builtin/diff-pairs.c
+#| msgid "git repack [<options>]"
+msgid "git diff-pairs -z [<diff-options>]"
+msgstr "git diff-pairs -z [<diff-options>]"
+
+#: builtin/diff-pairs.c builtin/log.c builtin/replay.c builtin/shortlog.c
+#: bundle.c
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "不認識的引數:%s"
+
+#: builtin/diff-pairs.c
+msgid "working without -z is not supported"
+msgstr "不支援在無 -z 的情況下運作"
+
+#: builtin/diff-pairs.c
+msgid "pathspec arguments not supported"
+msgstr "不支援路徑規格引數"
+
+#: builtin/diff-pairs.c
+msgid "revision arguments not allowed"
+msgstr "不允許有修訂版本引數"
+
+#: builtin/diff-pairs.c
+msgid "invalid raw diff input"
+msgstr "無效的原始 diff 輸入"
+
+#: builtin/diff-pairs.c
+msgid "tree objects not supported"
+msgstr "不支援樹狀物件"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading path"
+msgstr "讀取路徑時遇到 EOF"
+
+#: builtin/diff-pairs.c
+msgid "got EOF while reading destination path"
+msgstr "讀取目的地路徑時遇到 EOF"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unable to parse rename/copy score: %s"
+msgstr "無法解析重新命名/複製分數:%s"
+
+#: builtin/diff-pairs.c
+#, c-format
+msgid "unknown diff status: %c"
+msgstr "非預期的 diff 狀態:%c"
+
#: builtin/diff-tree.c
msgid "--merge-base only works with two commits"
msgstr "--merge-base 只對 2 個以上的提交有用"
@@ -7110,6 +7159,10 @@
msgstr "選擇如何處理簽名標籤"
#: builtin/fast-export.c
+msgid "select handling of signed commits"
+msgstr "選擇如何處理簽名提交"
+
+#: builtin/fast-export.c
msgid "select handling of tags that tag filtered objects"
msgstr "選擇當標籤指向被過濾物件時該標籤的處理方式"
@@ -7369,7 +7422,7 @@
msgid "option \"%s\" is ignored for %s"
msgstr "選項「%s」被 %s 忽略"
-#: builtin/fetch.c object-file.c
+#: builtin/fetch.c object-store.c
#, c-format
msgid "%s is not a valid object"
msgstr "%s 不是一個有效的物件"
@@ -7636,8 +7689,8 @@
#: builtin/fetch.c
msgid ""
-"--filter can only be used with the remote configured in extensions."
-"partialclone"
+"--filter can only be used with the remote configured in "
+"extensions.partialclone"
msgstr "只可以將 --filter 用於在 extensions.partialclone 中設定的遠端版本庫"
#: builtin/fetch.c
@@ -7912,11 +7965,6 @@
#: builtin/fsck.c
#, c-format
-msgid "%s: object is of unknown type '%s': %s"
-msgstr "%s:物件屬於「%s」未知類型:%s"
-
-#: builtin/fsck.c
-#, c-format
msgid "%s: object could not be parsed: %s"
msgstr "%s:不能解析物件:%s"
@@ -7988,16 +8036,25 @@
msgstr "「%s」封裝的修訂版索引 (rev-index) 無效"
#: builtin/fsck.c
+msgid "Checking ref database"
+msgstr "正在檢查引用資料庫"
+
+#: builtin/fsck.c
+#| msgid ""
+#| "git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
+#| " [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
+#| " [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
+#| " [--[no-]name-objects] [<object>...]"
msgid ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
msgstr ""
"git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
-" [--[no-]name-objects] [<object>...]"
+" [--[no-]name-objects] [--[no-]references] [<object>...]"
#: builtin/fsck.c
msgid "show unreachable objects"
@@ -8047,6 +8104,10 @@
msgid "show verbose names for reachable objects"
msgstr "顯示可以取得物件的詳細名稱"
+#: builtin/fsck.c
+msgid "check reference database consistency"
+msgstr "正在檢查資料庫一致性"
+
#: builtin/fsck.c builtin/index-pack.c
msgid "Checking objects"
msgstr "正在檢查物件"
@@ -8221,7 +8282,7 @@
#: builtin/gc.c builtin/repack.c
msgid "with --cruft, limit the size of new cruft packs"
-msgstr "搭配 --cruft,限制新廢棄封裝的大小"
+msgstr "搭配 --cruft,限制新無用包的大小"
#: builtin/gc.c
msgid "be more thorough (increased runtime)"
@@ -8732,7 +8793,7 @@
#: builtin/grep.c
msgid "indicate hit with exit status without output"
-msgstr "不輸出,而用離開碼標記命中狀態"
+msgstr "不輸出,而用結束狀態碼標記命中狀態"
#: builtin/grep.c
msgid "show only matches from files that match all patterns"
@@ -9473,11 +9534,6 @@
"<file>"
msgstr "追蹤 <開始>,<結束> 範圍中橫列或 <檔案> 中> :<函數名稱> 的變化史"
-#: builtin/log.c builtin/replay.c builtin/shortlog.c bundle.c
-#, c-format
-msgid "unrecognized argument: %s"
-msgstr "不認識的引數:%s"
-
#: builtin/log.c
msgid "-L<range>:<file> cannot be used with pathspec"
msgstr "-L<範圍>:<檔案> 和 pathspec 不能同時使用"
@@ -10310,6 +10366,10 @@
msgstr "亦顯示資訊性或衝突訊息"
#: builtin/merge-tree.c
+msgid "suppress all output; only exit status wanted"
+msgstr "隱藏所有輸出,只需要結束狀態碼"
+
+#: builtin/merge-tree.c
msgid "list filenames without modes/oids/stages"
msgstr "列出檔名,但不附加 modes/oids/stages"
@@ -10471,7 +10531,7 @@
msgid "Already up to date. (nothing to squash)"
msgstr "已經是最新的。(無需壓縮 (squash))"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Already up to date."
msgstr "已經是最新的。"
@@ -10495,7 +10555,7 @@
msgid "Bad branch.%s.mergeoptions string: %s"
msgstr "壞的 branch.%s.mergeoptions 字串:%s"
-#: builtin/merge.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
msgid "Unable to write index."
msgstr "不能寫入索引。"
@@ -10651,7 +10711,7 @@
msgid "Updating %s..%s\n"
msgstr "更新 %s..%s\n"
-#: builtin/merge.c merge-ort-wrappers.c merge-recursive.c
+#: builtin/merge.c merge-ort-wrappers.c
#, c-format
msgid ""
"Your local changes to the following files would be overwritten by merge:\n"
@@ -10813,8 +10873,14 @@
msgstr "在 repack 期間,將較小尺寸的包檔案收集到大於此大小的批次中"
#: builtin/mv.c
-msgid "git mv [<options>] <source>... <destination>"
-msgstr "git mv [<選項>] <來源>... <目的地>"
+#| msgid "git mv [<options>] <source>... <destination>"
+msgid "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+msgstr "git mv [-v] [-f] [-n] [-k] <source> <destination>"
+
+#: builtin/mv.c
+#| msgid "git mv [<options>] <source>... <destination>"
+msgid "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
+msgstr "git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>"
#: builtin/mv.c
#, c-format
@@ -10904,6 +10970,11 @@
#: builtin/mv.c
#, c-format
+msgid "cannot move both '%s' and its parent directory '%s'"
+msgstr "無法同時移動「%s」和其上層目錄「%s」"
+
+#: builtin/mv.c
+#, c-format
msgid "Renaming %s to %s\n"
msgstr "重新命名 %s 至 %s\n"
@@ -11534,15 +11605,15 @@
#: builtin/pack-objects.c
msgid "Enumerating cruft objects"
-msgstr "正在枚舉廢棄物件"
+msgstr "正在枚舉無用物件"
#: builtin/pack-objects.c
msgid "unable to add cruft objects"
-msgstr "無法加入廢棄物件"
+msgstr "無法加入無用物件"
#: builtin/pack-objects.c
msgid "Traversing cruft objects"
-msgstr "正在遍歷廢棄物件"
+msgstr "正在遍歷無用物件"
#: builtin/pack-objects.c
#, c-format
@@ -11564,7 +11635,7 @@
#: builtin/pack-objects.c reachable.c
msgid "could not load cruft pack .mtimes"
-msgstr "無法載入廢棄封包 .mtimes"
+msgstr "無法載入無用包 .mtimes"
#: builtin/pack-objects.c
msgid "cannot open pack index"
@@ -11709,11 +11780,11 @@
#: builtin/pack-objects.c
msgid "create a cruft pack"
-msgstr "建立廢棄封包"
+msgstr "建立無用包"
#: builtin/pack-objects.c
msgid "expire cruft objects older than <time>"
-msgstr "將早於 <time> 的廢棄物件設為過期"
+msgstr "將早於 <time> 的無用物件設為過期"
#: builtin/pack-objects.c
msgid "use the sparse reachability algorithm"
@@ -12043,6 +12114,11 @@
msgid "unable to access commit %s"
msgstr "無法存取提交 %s"
+#: builtin/pull.c refspec.c
+#, c-format
+msgid "invalid refspec '%s'"
+msgstr "無效的引用規格:「%s」"
+
#: builtin/pull.c
msgid "ignoring --verify-signatures for rebase"
msgstr "為重定基底動作忽略 --verify-signatures"
@@ -13150,6 +13226,10 @@
msgstr "git reflog exists <引用>"
#: builtin/reflog.c
+msgid "git reflog drop [--all [--single-worktree] | <refs>...]"
+msgstr "git reflog drop [--all [--single-worktree] | <refs>...]"
+
+#: builtin/reflog.c
#, c-format
msgid "invalid timestamp '%s' given to '--%s'"
msgstr "傳入「--%s」的時間戳「%s」無效"
@@ -13209,8 +13289,8 @@
#: builtin/reflog.c
#, c-format
-msgid "%s points nowhere!"
-msgstr "%s 指向不存在!"
+msgid "reflog could not be found: '%s'"
+msgstr "找不到引用日誌:「%s」"
#: builtin/reflog.c
msgid "no reflog specified to delete"
@@ -13221,8 +13301,19 @@
msgid "invalid ref format: %s"
msgstr "無效的引用格式:%s"
+#: builtin/reflog.c
+msgid "drop the reflogs of all references"
+msgstr "捨棄所有引用的引用日誌"
+
+#: builtin/reflog.c
+msgid "drop reflogs from the current worktree only"
+msgstr "只捨棄目前工作目錄的引用日誌"
+
+#: builtin/reflog.c
+msgid "references specified along with --all"
+msgstr "同時指定參照和 --all 引數"
+
#: builtin/refs.c
-#| msgid "git refs migrate --ref-format=<format> [--dry-run]"
msgid "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
msgstr "git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]"
@@ -13890,7 +13981,7 @@
#: builtin/repack.c
msgid "same as -a, pack unreachable cruft objects separately"
-msgstr "和 -a 相同,會獨立封裝無法存取的廢棄物件"
+msgstr "和 -a 相同,會獨立封裝無法存取的無用物件"
#: builtin/repack.c
msgid "approxidate"
@@ -13898,7 +13989,11 @@
#: builtin/repack.c
msgid "with --cruft, expire objects older than this"
-msgstr "搭配 --cruft 會將早於此的物件標為過期"
+msgstr "搭配 --cruft,會將早於此的物件標為過期"
+
+#: builtin/repack.c
+msgid "with --cruft, only repack cruft packs smaller than this"
+msgstr "搭配 --cruft,僅重新打包小於此大小的無用包"
#: builtin/repack.c
msgid "remove redundant packs, and run git-prune-packed"
@@ -14494,6 +14589,10 @@
msgstr "「%s」的數值無效:「%s」,唯一允許的格式是「%s」"
#: builtin/rev-list.c
+msgid "-z option used with unsupported option"
+msgstr "-z 選項與不支援的選項一起使用"
+
+#: builtin/rev-list.c
msgid "rev-list does not support display of notes"
msgstr "rev-list 不支援顯示註解"
@@ -16757,8 +16856,9 @@
msgstr "git update-ref [<options>] <refname> <new-oid> [<old-oid>]"
#: builtin/update-ref.c
-msgid "git update-ref [<options>] --stdin [-z]"
-msgstr "git update-ref [<選項>] --stdin [-z]"
+#| msgid "git update-ref [<options>] --stdin [-z]"
+msgid "git update-ref [<options>] --stdin [-z] [--batch-updates]"
+msgstr "git update-ref [<options>] --stdin [-z] [--batch-updates]"
#: builtin/update-ref.c
msgid "delete the reference"
@@ -16776,6 +16876,10 @@
msgid "read updates from stdin"
msgstr "從標準輸入讀取更新"
+#: builtin/update-ref.c
+msgid "batch reference updates"
+msgstr "批次引用更新"
+
#: builtin/update-server-info.c
msgid "update the info files from scratch"
msgstr "從頭開始更新檔案訊息"
@@ -17620,6 +17724,10 @@
msgstr "將一個樹和工作區或索引做比較"
#: command-list.h
+msgid "Compare the content and mode of provided blob pairs"
+msgstr "比較指定的兩個資料物件的內容和模式"
+
+#: command-list.h
msgid "Compares the content and mode of blobs found via two tree objects"
msgstr "比較兩個樹狀物件的檔案內容和模式"
@@ -18858,8 +18966,8 @@
"remote URLs cannot be configured in file directly or indirectly included by "
"includeIf.hasconfig:remote.*.url"
msgstr ""
-"無法在檔案設定遠端 URL,無論是直接或間接透過 includeIf.hasconfig:remote.*."
-"url 引入"
+"無法在檔案設定遠端 URL,無論是直接或間接透過 "
+"includeIf.hasconfig:remote.*.url 引入"
#: config.c
#, c-format
@@ -19738,7 +19846,7 @@
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "設定變數 'diff.submodule' 未知的取值:'%s'"
-#: diff.c merge-recursive.c transport.c
+#: diff.c merge-ort.c transport.c
#, c-format
msgid "unknown value for config '%s': %s"
msgstr "設定 '%s' 的取值未知:%s"
@@ -21163,6 +21271,11 @@
msgid "Unknown value for http.proactiveauth"
msgstr "http.proactiveauth 的值未知"
+#: http.c parse.c
+#, c-format
+msgid "failed to parse %s"
+msgstr "解析 %s 失敗"
+
#: http.c
#, c-format
msgid "Unsupported SSL backend '%s'. Supported SSL backends:"
@@ -21388,7 +21501,12 @@
msgid "invalid marker-size '%s', expecting an integer"
msgstr "無效的 marker-size「%s」,應為整數"
-#: merge-ort.c merge-recursive.c
+#: merge-ort-wrappers.c
+#, c-format
+msgid "Could not parse object '%s'"
+msgstr "無法解析物件「%s」"
+
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (not checked out)"
msgstr "無法合併子模組 %s (沒有簽出)"
@@ -21398,7 +21516,7 @@
msgid "Failed to merge submodule %s (no merge base)"
msgstr "無法合併 %s 子模組(沒有合併基底)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits not present)"
msgstr "無法合併子模組 %s(提交不存在)"
@@ -21408,7 +21526,7 @@
msgid "error: failed to merge submodule %s (repository corrupt)"
msgstr "錯誤:無法合併子模組 %s (版本庫損壞)"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Failed to merge submodule %s (commits don't follow merge-base)"
msgstr "無法合併子模組 %s (提交未跟隨合併基礎)"
@@ -21448,12 +21566,12 @@
msgid "error: unable to add %s to database"
msgstr "錯誤:無法將 %s 加進資料庫"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "Auto-merging %s"
msgstr "自動合併 %s"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
@@ -21462,7 +21580,7 @@
"衝突(隱式目錄重新命名):處於隱式目錄重新命名的現存檔案/目錄 %s,將以下路徑"
"放在:%s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
@@ -21481,14 +21599,14 @@
"衝突(分割的目錄重新命名):未知 %s 重新命名的位置。它被重新命名為多個其他目"
"錄,但沒有目的地取得過半檔案。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
"renamed."
msgstr "警告:避免套用 %s -> %s 的重新命名到 %s,因為 %s 本身已被重新命名。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s added in %s inside a directory that was renamed in %s; "
@@ -21496,7 +21614,7 @@
msgstr ""
"路徑已更新:%s 新增到 %s,位於一個被重新命名到 %s 的目錄中,將其移動到 %s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"Path updated: %s renamed to %s in %s, inside a directory that was renamed in "
@@ -21505,7 +21623,7 @@
"路徑已更新:%1$s 重新命名為 %3$s 中的 %2$s,而該目錄被重新命名到 %4$s 中,將"
"其移動到 %5$s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s added in %s inside a directory that was renamed "
@@ -21514,7 +21632,7 @@
"衝突(檔案位置):%s 新增到 %s,位於一個被重新命名為 %s 的目錄中,建議將其移"
"動到 %s。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid ""
"CONFLICT (file location): %s renamed to %s in %s, inside a directory that "
@@ -21581,19 +21699,19 @@
"衝突(類型有異):兩方的 %s 類型皆不同。已經重新命名其中一個來源,這樣就可以"
"分別記錄這兩方檔案。"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "content"
msgstr "內容"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "add/add"
msgstr "新增/新增"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
msgid "submodule"
msgstr "子模組"
-#: merge-ort.c merge-recursive.c
+#: merge-ort.c
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
msgstr "衝突(%s):合併衝突於 %s"
@@ -21655,312 +21773,6 @@
msgid "collecting merge info failed for trees %s, %s, %s"
msgstr "%s, %s, %s 樹的合併資訊收集失敗"
-#: merge-recursive.c
-msgid "(bad commit)\n"
-msgstr "(壞提交)\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed for path '%s'; merge aborting."
-msgstr "add_cacheinfo 對路徑 '%s' 執行失敗,合併終止。"
-
-#: merge-recursive.c
-#, c-format
-msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
-msgstr "add_cacheinfo 無法重新整理路徑 '%s',合併終止。"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to create path '%s'%s"
-msgstr "建立路徑 '%s'%s 失敗"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s to make room for subdirectory\n"
-msgstr "刪除 %s 以便為子目錄留出空間\n"
-
-#: merge-recursive.c
-msgid ": perhaps a D/F conflict?"
-msgstr ":可能是一個目錄/檔案衝突?"
-
-#: merge-recursive.c
-#, c-format
-msgid "refusing to lose untracked file at '%s'"
-msgstr "拒絕捨棄 '%s' 中的未追蹤檔案"
-
-#: merge-recursive.c
-#, c-format
-msgid "blob expected for %s '%s'"
-msgstr "%s '%s' 應為資料物件"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to open '%s': %s"
-msgstr "開啟 '%s' 失敗:%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "failed to symlink '%s': %s"
-msgstr "建立符號連結 '%s' 失敗:%s"
-
-#: merge-recursive.c
-#, c-format
-msgid "do not know what to do with %06o %s '%s'"
-msgstr "不知道如何處理 %06o %s '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (repository corrupt)"
-msgstr "無法合併子模組 %s (版本庫損壞)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s to the following commit:"
-msgstr "子模組 %s 快轉到如下提交:"
-
-#: merge-recursive.c
-#, c-format
-msgid "Fast-forwarding submodule %s"
-msgstr "快轉子模組 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (merge following commits not found)"
-msgstr "無法合併子模組 %s (找不到合併跟隨的提交)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (not fast-forward)"
-msgstr "無法合併子模組 %s(非快轉)"
-
-#: merge-recursive.c
-msgid "Found a possible merge resolution for the submodule:\n"
-msgstr "找到子模組的一個可能的合併方案:\n"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"If this is correct simply add it to the index for example\n"
-"by using:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"which will accept this suggestion.\n"
-msgstr ""
-"正確的話,就能直接加進索引,例如執行下述命令:\n"
-"\n"
-" git update-index --cacheinfo 160000 %s \"%s\"\n"
-"\n"
-"接受本建議。\n"
-
-#: merge-recursive.c
-#, c-format
-msgid "Failed to merge submodule %s (multiple merges found)"
-msgstr "無法合併子模組 %s (發現多個合併)"
-
-#: merge-recursive.c
-msgid "failed to execute internal merge"
-msgstr "無法執行內部合併"
-
-#: merge-recursive.c
-#, c-format
-msgid "unable to add %s to database"
-msgstr "無法將 %s 加進資料庫"
-
-#: merge-recursive.c
-#, c-format
-msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
-msgstr "錯誤:拒絕遺失未追蹤檔案 '%s',而是寫入 %s。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree."
-msgstr ""
-"衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %5$s 中被 %4$s。%7$s 的 %6$s 版"
-"本被保留。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree."
-msgstr ""
-"衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %6$s 中的 %5$s 被 %4$s。%8$s 的 "
-"%7$s 版本被保留。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
-"in tree at %s."
-msgstr ""
-"衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %5$s 中被 %4$s。%7$s 的 %6$s 版"
-"本保留在 %8$s 中。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of %s "
-"left in tree at %s."
-msgstr ""
-"衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %6$s 中的 %5$s 被 %4$s。%8$s 的 "
-"%7$s 版本保留在 %9$s 中。"
-
-#: merge-recursive.c
-msgid "rename"
-msgstr "重新命名"
-
-#: merge-recursive.c
-msgid "renamed"
-msgstr "已重新命名"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose dirty file at %s"
-msgstr "拒絕遺失髒檔案 '%s'"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s, even though it's in the way."
-msgstr "拒絕在 '%s' 處失去未追蹤檔案,即使它存在於重新命名中。"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
-msgstr ""
-"衝突(重新命名/新增):在 %3$s 中重新命名 %1$s->%2$s。在 %5$s 中新增 %4$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "%s is a directory in %s adding as %s instead"
-msgstr "%s 是 %s 中的一個目錄而已 %s 為名被新增"
-
-#: merge-recursive.c
-#, c-format
-msgid "Refusing to lose untracked file at %s; adding as %s instead"
-msgstr "拒絕遺失未追蹤檔案 '%s',而是新增為 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
-"\"%s\"->\"%s\" in \"%s\"%s"
-msgstr ""
-"衝突(重新命名/重新命名):在分支 \"%3$s\" 中重新命名 \"%1$s\"->\"%2$s\",在"
-"分支 \"%6$s\" 中重新命名 \"%4$s\"->\"%5$s\"%7$s"
-
-#: merge-recursive.c
-msgid " (left unresolved)"
-msgstr " (留下未解決)"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
-msgstr ""
-"衝突(重新命名/重新命名):在 %3$s 中重新命名 %1$s->%2$s,在 %6$s 中重新命名 "
-"%4$s->%5$s"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (directory rename split): Unclear where to place %s because "
-"directory %s was renamed to multiple other directories, with no destination "
-"getting a majority of the files."
-msgstr ""
-"衝突(分割的目錄重新命名):不清楚 %s 應該放在哪裡,因為目錄 %s 被重新命名到"
-"多個其它目錄,沒有目錄包含大部分檔案。"
-
-#: merge-recursive.c
-#, c-format
-msgid ""
-"CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
-">%s in %s"
-msgstr ""
-"衝突(重新命名/重新命名):在 %3$s 中重新命名目錄 %1$s->%2$s,在 %6$s 中重新"
-"命名目錄 %4$s->%5$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "cannot read object %s"
-msgstr "不能讀取物件 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "object %s is not a blob"
-msgstr "物件 %s 不是一個資料物件"
-
-#: merge-recursive.c
-msgid "modify"
-msgstr "修改"
-
-#: merge-recursive.c
-msgid "modified"
-msgstr "修改"
-
-#: merge-recursive.c
-#, c-format
-msgid "Skipped %s (merged same as existing)"
-msgstr "略過 %s(已經做過相同合併)"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding as %s instead"
-msgstr "而是以 %s 為名新增"
-
-#: merge-recursive.c
-#, c-format
-msgid "Removing %s"
-msgstr "刪除 %s"
-
-#: merge-recursive.c
-msgid "file/directory"
-msgstr "檔案/目錄"
-
-#: merge-recursive.c
-msgid "directory/file"
-msgstr "目錄/檔案"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
-msgstr "衝突(%1$s):在 %3$s 中有一個名為 %2$s 的目錄。以 %5$s 為名新增 %4$s"
-
-#: merge-recursive.c
-#, c-format
-msgid "Adding %s"
-msgstr "新增 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "CONFLICT (add/add): Merge conflict in %s"
-msgstr "衝突(add/add):合併衝突於 %s"
-
-#: merge-recursive.c
-#, c-format
-msgid "merging of trees %s and %s failed"
-msgstr "無法合併樹 %s 和 %s"
-
-#: merge-recursive.c
-msgid "Merging:"
-msgstr "合併:"
-
-#: merge-recursive.c
-#, c-format
-msgid "found %u common ancestor:"
-msgid_plural "found %u common ancestors:"
-msgstr[0] "發現 %u 個共同祖先:"
-
-#: merge-recursive.c
-msgid "merge returned no commit"
-msgstr "合併未返回提交"
-
-#: merge-recursive.c
-#, c-format
-msgid "Could not parse object '%s'"
-msgstr "無法解析物件「%s」"
-
#: merge.c
msgid "failed to read the cache"
msgstr "讀取快取失敗"
@@ -22014,14 +21826,15 @@
msgstr "清理位於 %s 的多包索引失敗"
#: midx-write.c
-msgid "cannot write incremental MIDX with bitmap"
-msgstr "無法寫入有位圖的增量 MIDX"
-
-#: midx-write.c
msgid "ignoring existing multi-pack-index; checksum mismatch"
msgstr "忽略現有的多包索引:總和檢查碼不符"
#: midx-write.c
+#, c-format
+msgid "could not load reverse index for MIDX %s"
+msgstr "無法載入 MIDX %s 的反向索引"
+
+#: midx-write.c
msgid "Adding packfiles to multi-pack-index"
msgstr "正在新增 packfile 至多包索引"
@@ -22337,78 +22150,6 @@
#: object-file.c
#, c-format
-msgid "object directory %s does not exist; check .git/objects/info/alternates"
-msgstr "物件目錄 %s 不存在,檢查 .git/objects/info/alternates"
-
-#: object-file.c
-#, c-format
-msgid "unable to normalize alternate object path: %s"
-msgstr "無法規範化備用物件路徑:%s"
-
-#: object-file.c
-#, c-format
-msgid "%s: ignoring alternate object stores, nesting too deep"
-msgstr "%s:忽略備用物件庫,嵌套太深"
-
-#: object-file.c
-msgid "unable to fdopen alternates lockfile"
-msgstr "無法 fdopen 取代鎖檔案"
-
-#: object-file.c
-msgid "unable to read alternates file"
-msgstr "無法讀取替代檔案"
-
-#: object-file.c
-msgid "unable to move new alternates file into place"
-msgstr "無法將新的替代檔案移動到位"
-
-#: object-file.c
-#, c-format
-msgid "path '%s' does not exist"
-msgstr "路徑 '%s' 不存在"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' as a linked checkout is not supported yet."
-msgstr "尚不支援將引用版本庫 '%s' 作為一個連結簽出。"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is not a local repository."
-msgstr "引用版本庫 '%s' 不是一個本機版本庫。"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is shallow"
-msgstr "引用版本庫 '%s' 是一個淺複製"
-
-#: object-file.c
-#, c-format
-msgid "reference repository '%s' is grafted"
-msgstr "引用版本庫 '%s' 已被移植"
-
-#: object-file.c
-#, c-format
-msgid "could not find object directory matching %s"
-msgstr "找不到符合 %s 的物件目錄"
-
-#: object-file.c
-#, c-format
-msgid "invalid line while parsing alternate refs: %s"
-msgstr "解析備用引用時無效的行:%s"
-
-#: object-file.c
-#, c-format
-msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
-msgstr "嘗試 mmap %<PRIuMAX>,超過了最大值 %<PRIuMAX>"
-
-#: object-file.c
-#, c-format
-msgid "mmap failed%s"
-msgstr "mmap 失敗%s"
-
-#: object-file.c
-#, c-format
msgid "object file %s is empty"
msgstr "物件檔案 %s 為空"
@@ -22453,21 +22194,6 @@
#: object-file.c
#, c-format
-msgid "replacement %s not found for %s"
-msgstr "找不到 %2$s 的替代 %1$s"
-
-#: object-file.c
-#, c-format
-msgid "packed object %s (stored in %s) is corrupt"
-msgstr "打包物件 %s(儲存在 %s)已損壞"
-
-#: object-file.c
-#, c-format
-msgid "missing mapping of %s to %s"
-msgstr "缺少 %s 到 %s 的映射"
-
-#: object-file.c
-#, c-format
msgid "unable to open %s"
msgstr "不能開啟 %s"
@@ -22584,11 +22310,6 @@
#: object-file.c
#, c-format
-msgid "%s is not a valid '%s' object"
-msgstr "%s 不是一個有效的 '%s' 物件"
-
-#: object-file.c
-#, c-format
msgid "hash mismatch for %s (expected %s)"
msgstr "%s 的雜湊值不符合(預期 %s)"
@@ -22609,6 +22330,11 @@
#: object-file.c
#, c-format
+msgid "unable to parse type from header '%s' of %s"
+msgstr "無法從 %2$s 的標頭「%1$s」解析類型"
+
+#: object-file.c
+#, c-format
msgid "unable to unpack contents of %s"
msgstr "無法解壓縮 %s 的內容"
@@ -22785,6 +22511,88 @@
msgid "invalid object name '%.*s'."
msgstr "'%.*s' 物件名稱無效。"
+#: object-store.c
+#, c-format
+msgid "object directory %s does not exist; check .git/objects/info/alternates"
+msgstr "物件目錄 %s 不存在,檢查 .git/objects/info/alternates"
+
+#: object-store.c
+#, c-format
+msgid "unable to normalize alternate object path: %s"
+msgstr "無法規範化備用物件路徑:%s"
+
+#: object-store.c
+#, c-format
+msgid "%s: ignoring alternate object stores, nesting too deep"
+msgstr "%s:忽略備用物件庫,嵌套太深"
+
+#: object-store.c
+msgid "unable to fdopen alternates lockfile"
+msgstr "無法 fdopen 取代鎖檔案"
+
+#: object-store.c
+msgid "unable to read alternates file"
+msgstr "無法讀取替代檔案"
+
+#: object-store.c
+msgid "unable to move new alternates file into place"
+msgstr "無法將新的替代檔案移動到位"
+
+#: object-store.c
+#, c-format
+msgid "path '%s' does not exist"
+msgstr "路徑 '%s' 不存在"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' as a linked checkout is not supported yet."
+msgstr "尚不支援將引用版本庫 '%s' 作為一個連結簽出。"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is not a local repository."
+msgstr "引用版本庫 '%s' 不是一個本機版本庫。"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is shallow"
+msgstr "引用版本庫 '%s' 是一個淺複製"
+
+#: object-store.c
+#, c-format
+msgid "reference repository '%s' is grafted"
+msgstr "引用版本庫 '%s' 已被移植"
+
+#: object-store.c
+#, c-format
+msgid "could not find object directory matching %s"
+msgstr "找不到符合 %s 的物件目錄"
+
+#: object-store.c
+#, c-format
+msgid "invalid line while parsing alternate refs: %s"
+msgstr "解析備用引用時無效的行:%s"
+
+#: object-store.c
+#, c-format
+msgid "replacement %s not found for %s"
+msgstr "找不到 %2$s 的替代 %1$s"
+
+#: object-store.c
+#, c-format
+msgid "packed object %s (stored in %s) is corrupt"
+msgstr "打包物件 %s(儲存在 %s)已損壞"
+
+#: object-store.c
+#, c-format
+msgid "missing mapping of %s to %s"
+msgstr "缺少 %s 到 %s 的映射"
+
+#: object-store.c
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s 不是一個有效的 '%s' 物件"
+
#: object.c
#, c-format
msgid "invalid object type \"%s\""
@@ -23132,6 +22940,16 @@
#: parse-options.c
#, c-format
+msgid "value %s for %s not in range [%<PRIdMAX>,%<PRIdMAX>]"
+msgstr "%2$s 的數值 %1$s 不在 [%3$<PRIdMAX>,%4$<PRIdMAX>] 範圍內"
+
+#: parse-options.c
+#, c-format
+msgid "%s expects an integer value with an optional k/m/g suffix"
+msgstr "%s 期望為一個選擇性帶有 k/m/g 後綴的整數值"
+
+#: parse-options.c
+#, c-format
msgid "%s expects a non-negative integer value with an optional k/m/g suffix"
msgstr "%s 期望一個非負整數和一個可選的 k/m/g 後綴"
@@ -23316,11 +23134,6 @@
msgid "bad boolean environment value '%s' for '%s'"
msgstr "「%2$s」的「%1$s」布林環境值無效"
-#: parse.c
-#, c-format
-msgid "failed to parse %s"
-msgstr "解析 %s 失敗"
-
#: path-walk.c
#, c-format
msgid "failed to walk children of tree %s: not found"
@@ -23523,7 +23336,12 @@
#: promisor-remote.c
#, c-format
-msgid "known remote named '%s' but with url '%s' instead of '%s'"
+msgid "no or empty URL advertised for remote '%s'"
+msgstr "遠端「%s」未公佈 URL 或 URL 空白"
+
+#: promisor-remote.c
+#, c-format
+msgid "known remote named '%s' but with URL '%s' instead of '%s'"
msgstr "已知有遠端名為「%s」,但其 URL 為「%s」而非「%s」"
#: promisor-remote.c
@@ -23652,7 +23470,7 @@
#: reachable.c
#, c-format
msgid "invalid extra cruft tip: '%s'"
-msgstr "無效的額外廢棄提交修訂版:「%s」"
+msgstr "無效的額外無用提交修訂版:「%s」"
#: reachable.c
msgid "unable to enumerate additional recent objects"
@@ -24425,6 +24243,11 @@
msgid "Checking references consistency"
msgstr "正在檢查引用一致性"
+#: refs/packed-backend.c
+#, c-format
+msgid "unable to open '%s'"
+msgstr "無法開啟「%s」"
+
#: refs/reftable-backend.c
#, c-format
msgid "refname is dangerous: %s"
@@ -24505,11 +24328,6 @@
#: refspec.c
#, c-format
-msgid "invalid refspec '%s'"
-msgstr "無效的引用規格:「%s」"
-
-#: refspec.c
-#, c-format
msgid "pattern '%s' has no '*'"
msgstr "符合模式「%s」中沒有「*」"
@@ -25164,8 +24982,8 @@
msgstr "無法設定建議組態"
#: scalar.c
-msgid "could not turn on maintenance"
-msgstr "無法開啟維護模式"
+msgid "could not toggle maintenance"
+msgstr "無法切換維護模式"
#: scalar.c
msgid "could not start the FSMonitor daemon"
@@ -25225,12 +25043,19 @@
msgstr "指定是否要在複製階段抓取標籤"
#: scalar.c
+msgid "specify if background maintenance should be enabled"
+msgstr "指定是否要啟用背景維護模式"
+
+#: scalar.c
+#| msgid ""
+#| "scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
+#| "\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
msgid ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
msgstr ""
"scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]\n"
-"\t[--[no-]src] [--[no-]tags] <url> [<enlistment>]"
+"\t[--[no-]src] [--[no-]tags] [--[no-]maintenance] <url> [<enlistment>]"
#: scalar.c
#, c-format
@@ -25279,16 +25104,31 @@
msgstr "`scalar list` 未取引數"
#: scalar.c
-msgid "scalar register [<enlistment>]"
-msgstr "scalar register [<enlistment>]"
+#| msgid "scalar register [<enlistment>]"
+msgid "scalar register [--[no-]maintenance] [<enlistment>]"
+msgstr "scalar register [--[no-]maintenance] [<enlistment>]"
#: scalar.c
msgid "reconfigure all registered enlistments"
msgstr "重新設定所有註冊的編列名單"
#: scalar.c
-msgid "scalar reconfigure [--all | <enlistment>]"
-msgstr "scalar reconfigure [--all | <enlistment>]"
+#| msgid "enable/disable untracked cache"
+msgid "(enable|disable|keep)"
+msgstr "(enable|disable|keep)"
+
+#: scalar.c
+msgid "signal how to adjust background maintenance"
+msgstr "指示調整背景維護模式的方式"
+
+#: scalar.c
+#| msgid "scalar reconfigure [--all | <enlistment>]"
+msgid ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
+msgstr ""
+"scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | "
+"<enlistment>]"
#: scalar.c
msgid "--all or <enlistment>, but not both"
@@ -25296,6 +25136,11 @@
#: scalar.c
#, c-format
+msgid "unknown mode for --maintenance option: %s"
+msgstr "--maintenance 選項的值無效:%s"
+
+#: scalar.c
+#, c-format
msgid "could not remove stale scalar.repo '%s'"
msgstr "無法移除過時的 scalar.repo「%s」"
@@ -27003,6 +26848,10 @@
msgid "number of entries in the cache tree to invalidate (default 0)"
msgstr "在快取樹狀物件中,要使失效的項目數量(預設值為 0)"
+#: t/helper/test-pack-deltas.c
+msgid "the number of objects to write"
+msgstr "要寫入的物件數量"
+
#: t/helper/test-path-walk.c
msgid "test-tool path-walk <options> -- <revision-options>"
msgstr "test-tool path-walk <options> -- <revision-options>"
@@ -27931,6 +27780,16 @@
msgid "unable to get random bytes"
msgstr "無法取得隨機位元組"
+#: wrapper.c
+#, c-format
+msgid "attempting to mmap %<PRIuMAX> over limit %<PRIuMAX>"
+msgstr "嘗試 mmap %<PRIuMAX>,超過了最大值 %<PRIuMAX>"
+
+#: wrapper.c
+#, c-format
+msgid "mmap failed%s"
+msgstr "mmap 失敗%s"
+
#: wt-status.c
msgid "Unmerged paths:"
msgstr "未合併的路徑:"
@@ -28851,6 +28710,15 @@
#: git-send-email.perl
#, perl-format
+msgid "Outlook reassigned Message-ID to: %s\n"
+msgstr "Outlook 將 Message-ID 重新指派為:%s\n"
+
+#: git-send-email.perl
+msgid "Warning: Could not retrieve Message-ID from server response.\n"
+msgstr "警告:無法從伺服器回應中取得 Message-ID。\n"
+
+#: git-send-email.perl
+#, perl-format
msgid "Failed to send %s\n"
msgstr "無法傳送 %s\n"
@@ -28969,6 +28837,272 @@
msgid "Do you really want to send %s? [y|N]: "
msgstr "您真的要傳送 %s?[y|N]: "
+#~ msgid "git cat-file (-t | -s) [--allow-unknown-type] <object>"
+#~ msgstr "git cat-file (-t | -s) [--allow-unknown-type] <object>"
+
+#~ msgid "allow -s and -t to work with broken/corrupt objects"
+#~ msgstr "允許 -s 和 -t 對損壞的物件生效"
+
+#, c-format
+#~ msgid "%s: object is of unknown type '%s': %s"
+#~ msgstr "%s:物件屬於「%s」未知類型:%s"
+
+#, c-format
+#~ msgid "%s points nowhere!"
+#~ msgstr "%s 指向不存在!"
+
+#~ msgid "(bad commit)\n"
+#~ msgstr "(壞提交)\n"
+
+#, c-format
+#~ msgid "add_cacheinfo failed for path '%s'; merge aborting."
+#~ msgstr "add_cacheinfo 對路徑 '%s' 執行失敗,合併終止。"
+
+#, c-format
+#~ msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
+#~ msgstr "add_cacheinfo 無法重新整理路徑 '%s',合併終止。"
+
+#, c-format
+#~ msgid "failed to create path '%s'%s"
+#~ msgstr "建立路徑 '%s'%s 失敗"
+
+#, c-format
+#~ msgid "Removing %s to make room for subdirectory\n"
+#~ msgstr "刪除 %s 以便為子目錄留出空間\n"
+
+#~ msgid ": perhaps a D/F conflict?"
+#~ msgstr ":可能是一個目錄/檔案衝突?"
+
+#, c-format
+#~ msgid "refusing to lose untracked file at '%s'"
+#~ msgstr "拒絕捨棄 '%s' 中的未追蹤檔案"
+
+#, c-format
+#~ msgid "blob expected for %s '%s'"
+#~ msgstr "%s '%s' 應為資料物件"
+
+#, c-format
+#~ msgid "failed to open '%s': %s"
+#~ msgstr "開啟 '%s' 失敗:%s"
+
+#, c-format
+#~ msgid "failed to symlink '%s': %s"
+#~ msgstr "建立符號連結 '%s' 失敗:%s"
+
+#, c-format
+#~ msgid "do not know what to do with %06o %s '%s'"
+#~ msgstr "不知道如何處理 %06o %s '%s'"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (repository corrupt)"
+#~ msgstr "無法合併子模組 %s (版本庫損壞)"
+
+#, c-format
+#~ msgid "Fast-forwarding submodule %s to the following commit:"
+#~ msgstr "子模組 %s 快轉到如下提交:"
+
+#, c-format
+#~ msgid "Fast-forwarding submodule %s"
+#~ msgstr "快轉子模組 %s"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (merge following commits not found)"
+#~ msgstr "無法合併子模組 %s (找不到合併跟隨的提交)"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (not fast-forward)"
+#~ msgstr "無法合併子模組 %s(非快轉)"
+
+#~ msgid "Found a possible merge resolution for the submodule:\n"
+#~ msgstr "找到子模組的一個可能的合併方案:\n"
+
+#, c-format
+#~ msgid ""
+#~ "If this is correct simply add it to the index for example\n"
+#~ "by using:\n"
+#~ "\n"
+#~ " git update-index --cacheinfo 160000 %s \"%s\"\n"
+#~ "\n"
+#~ "which will accept this suggestion.\n"
+#~ msgstr ""
+#~ "正確的話,就能直接加進索引,例如執行下述命令:\n"
+#~ "\n"
+#~ " git update-index --cacheinfo 160000 %s \"%s\"\n"
+#~ "\n"
+#~ "接受本建議。\n"
+
+#, c-format
+#~ msgid "Failed to merge submodule %s (multiple merges found)"
+#~ msgstr "無法合併子模組 %s (發現多個合併)"
+
+#~ msgid "failed to execute internal merge"
+#~ msgstr "無法執行內部合併"
+
+#, c-format
+#~ msgid "unable to add %s to database"
+#~ msgstr "無法將 %s 加進資料庫"
+
+#, c-format
+#~ msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
+#~ msgstr "錯誤:拒絕遺失未追蹤檔案 '%s',而是寫入 %s。"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s "
+#~ "left in tree."
+#~ msgstr ""
+#~ "衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %5$s 中被 %4$s。%7$s 的 %6$s "
+#~ "版本被保留。"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of "
+#~ "%s left in tree."
+#~ msgstr ""
+#~ "衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %6$s 中的 %5$s 被 %4$s。%8$s "
+#~ "的 %7$s 版本被保留。"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s "
+#~ "left in tree at %s."
+#~ msgstr ""
+#~ "衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %5$s 中被 %4$s。%7$s 的 %6$s "
+#~ "版本保留在 %8$s 中。"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s/delete): %s deleted in %s and %s to %s in %s. Version %s of "
+#~ "%s left in tree at %s."
+#~ msgstr ""
+#~ "衝突(%1$s/刪除):%2$s 在 %3$s 中被刪除,在 %6$s 中的 %5$s 被 %4$s。%8$s "
+#~ "的 %7$s 版本保留在 %9$s 中。"
+
+#~ msgid "rename"
+#~ msgstr "重新命名"
+
+#~ msgid "renamed"
+#~ msgstr "已重新命名"
+
+#, c-format
+#~ msgid "Refusing to lose dirty file at %s"
+#~ msgstr "拒絕遺失髒檔案 '%s'"
+
+#, c-format
+#~ msgid "Refusing to lose untracked file at %s, even though it's in the way."
+#~ msgstr "拒絕在 '%s' 處失去未追蹤檔案,即使它存在於重新命名中。"
+
+#, c-format
+#~ msgid "CONFLICT (rename/add): Rename %s->%s in %s. Added %s in %s"
+#~ msgstr ""
+#~ "衝突(重新命名/新增):在 %3$s 中重新命名 %1$s->%2$s。在 %5$s 中新增 %4$s"
+
+#, c-format
+#~ msgid "%s is a directory in %s adding as %s instead"
+#~ msgstr "%s 是 %s 中的一個目錄而已 %s 為名被新增"
+
+#, c-format
+#~ msgid "Refusing to lose untracked file at %s; adding as %s instead"
+#~ msgstr "拒絕遺失未追蹤檔案 '%s',而是新增為 %s"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename "
+#~ "\"%s\"->\"%s\" in \"%s\"%s"
+#~ msgstr ""
+#~ "衝突(重新命名/重新命名):在分支 \"%3$s\" 中重新命名 \"%1$s\"->\"%2$s\","
+#~ "在分支 \"%6$s\" 中重新命名 \"%4$s\"->\"%5$s\"%7$s"
+
+#~ msgid " (left unresolved)"
+#~ msgstr " (留下未解決)"
+
+#, c-format
+#~ msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
+#~ msgstr ""
+#~ "衝突(重新命名/重新命名):在 %3$s 中重新命名 %1$s->%2$s,在 %6$s 中重新命"
+#~ "名 %4$s->%5$s"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (directory rename split): Unclear where to place %s because "
+#~ "directory %s was renamed to multiple other directories, with no "
+#~ "destination getting a majority of the files."
+#~ msgstr ""
+#~ "衝突(分割的目錄重新命名):不清楚 %s 應該放在哪裡,因為目錄 %s 被重新命名"
+#~ "到多個其它目錄,沒有目錄包含大部分檔案。"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory "
+#~ "%s->%s in %s"
+#~ msgstr ""
+#~ "衝突(重新命名/重新命名):在 %3$s 中重新命名目錄 %1$s->%2$s,在 %6$s 中重"
+#~ "新命名目錄 %4$s->%5$s"
+
+#, c-format
+#~ msgid "cannot read object %s"
+#~ msgstr "不能讀取物件 %s"
+
+#, c-format
+#~ msgid "object %s is not a blob"
+#~ msgstr "物件 %s 不是一個資料物件"
+
+#~ msgid "modify"
+#~ msgstr "修改"
+
+#~ msgid "modified"
+#~ msgstr "修改"
+
+#, c-format
+#~ msgid "Skipped %s (merged same as existing)"
+#~ msgstr "略過 %s(已經做過相同合併)"
+
+#, c-format
+#~ msgid "Adding as %s instead"
+#~ msgstr "而是以 %s 為名新增"
+
+#, c-format
+#~ msgid "Removing %s"
+#~ msgstr "刪除 %s"
+
+#~ msgid "file/directory"
+#~ msgstr "檔案/目錄"
+
+#~ msgid "directory/file"
+#~ msgstr "目錄/檔案"
+
+#, c-format
+#~ msgid ""
+#~ "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
+#~ msgstr ""
+#~ "衝突(%1$s):在 %3$s 中有一個名為 %2$s 的目錄。以 %5$s 為名新增 %4$s"
+
+#, c-format
+#~ msgid "Adding %s"
+#~ msgstr "新增 %s"
+
+#, c-format
+#~ msgid "CONFLICT (add/add): Merge conflict in %s"
+#~ msgstr "衝突(add/add):合併衝突於 %s"
+
+#, c-format
+#~ msgid "merging of trees %s and %s failed"
+#~ msgstr "無法合併樹 %s 和 %s"
+
+#~ msgid "Merging:"
+#~ msgstr "合併:"
+
+#, c-format
+#~ msgid "found %u common ancestor:"
+#~ msgid_plural "found %u common ancestors:"
+#~ msgstr[0] "發現 %u 個共同祖先:"
+
+#~ msgid "merge returned no commit"
+#~ msgstr "合併未返回提交"
+
+#~ msgid "cannot write incremental MIDX with bitmap"
+#~ msgstr "無法寫入有位圖的增量 MIDX"
+
#, c-format
#~ msgid "Could not find remote branch %s to clone."
#~ msgstr "找不到要複製的遠端分支 %s。"
@@ -28977,9 +29111,6 @@
#~ msgid "merging cannot continue; got unclean result of %d"
#~ msgstr "無法繼續合併:從 %d 收到的結果不乾淨"
-#~ msgid "git repack [<options>]"
-#~ msgstr "git repack [<選項>]"
-
#~ msgid "--onto and --advance are incompatible"
#~ msgstr "--onto 和 --advance 不相容"
@@ -29029,10 +29160,6 @@
#~ msgstr "使用 [RFC PATCH] 代替 [PATCH]"
#, c-format
-#~ msgid "no URLs configured for remote '%s'"
-#~ msgstr "沒有給遠端版本庫 '%s' 設定 URL"
-
-#, c-format
#~ msgid "remote '%s' has no configured URL"
#~ msgstr "“%s” 遠端未設定 URL"
diff --git a/preload-index.c b/preload-index.c
index 40ab2ab..b222821 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -2,7 +2,6 @@
* Copyright (C) 2008 Linus Torvalds
*/
-#define USE_THE_REPOSITORY_VARIABLE
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
@@ -19,6 +18,7 @@
#include "repository.h"
#include "symlinks.h"
#include "trace2.h"
+#include "config.h"
/*
* Mostly randomly chosen maximum thread counts: we
@@ -111,6 +111,9 @@ void preload_index(struct index_state *index,
struct thread_data data[MAX_PARALLEL];
struct progress_data pd;
int t2_sum_lstat = 0;
+ int core_preload_index = 1;
+
+ repo_config_get_bool(index->repo, "core.preloadindex", &core_preload_index);
if (!HAVE_THREADS || !core_preload_index)
return;
@@ -132,7 +135,7 @@ void preload_index(struct index_state *index,
memset(&pd, 0, sizeof(pd));
if (refresh_flags & REFRESH_PROGRESS && isatty(2)) {
- pd.progress = start_delayed_progress(the_repository,
+ pd.progress = start_delayed_progress(index->repo,
_("Refreshing index"),
index->cache_nr);
pthread_mutex_init(&pd.mutex, NULL);
diff --git a/pretty.c b/pretty.c
index 0bc8ad8..cee96b9 100644
--- a/pretty.c
+++ b/pretty.c
@@ -141,7 +141,7 @@ static void setup_commit_formats(void)
COPY_ARRAY(commit_formats, builtin_formats,
ARRAY_SIZE(builtin_formats));
- git_config(git_pretty_formats_config, NULL);
+ repo_config(the_repository, git_pretty_formats_config, NULL);
}
static struct cmt_fmt_map *find_commit_format_recursive(const char *sought,
diff --git a/prio-queue.c b/prio-queue.c
index ec33ac2..9748528 100644
--- a/prio-queue.c
+++ b/prio-queue.c
@@ -58,22 +58,10 @@ void prio_queue_put(struct prio_queue *queue, void *thing)
}
}
-void *prio_queue_get(struct prio_queue *queue)
+static void sift_down_root(struct prio_queue *queue)
{
- void *result;
size_t ix, child;
- if (!queue->nr)
- return NULL;
- if (!queue->compare)
- return queue->array[--queue->nr].data; /* LIFO */
-
- result = queue->array[0].data;
- if (!--queue->nr)
- return result;
-
- queue->array[0] = queue->array[queue->nr];
-
/* Push down the one at the root */
for (ix = 0; ix * 2 + 1 < queue->nr; ix = child) {
child = ix * 2 + 1; /* left */
@@ -86,6 +74,23 @@ void *prio_queue_get(struct prio_queue *queue)
swap(queue, child, ix);
}
+}
+
+void *prio_queue_get(struct prio_queue *queue)
+{
+ void *result;
+
+ if (!queue->nr)
+ return NULL;
+ if (!queue->compare)
+ return queue->array[--queue->nr].data; /* LIFO */
+
+ result = queue->array[0].data;
+ if (!--queue->nr)
+ return result;
+
+ queue->array[0] = queue->array[queue->nr];
+ sift_down_root(queue);
return result;
}
@@ -97,3 +102,17 @@ void *prio_queue_peek(struct prio_queue *queue)
return queue->array[queue->nr - 1].data;
return queue->array[0].data;
}
+
+void prio_queue_replace(struct prio_queue *queue, void *thing)
+{
+ if (!queue->nr) {
+ prio_queue_put(queue, thing);
+ } else if (!queue->compare) {
+ queue->array[queue->nr - 1].ctr = queue->insertion_ctr++;
+ queue->array[queue->nr - 1].data = thing;
+ } else {
+ queue->array[0].ctr = queue->insertion_ctr++;
+ queue->array[0].data = thing;
+ sift_down_root(queue);
+ }
+}
diff --git a/prio-queue.h b/prio-queue.h
index 38d0326..da7fad2 100644
--- a/prio-queue.h
+++ b/prio-queue.h
@@ -52,6 +52,14 @@ void *prio_queue_get(struct prio_queue *);
*/
void *prio_queue_peek(struct prio_queue *);
+/*
+ * Replace the "thing" that compares the smallest with a new "thing",
+ * like prio_queue_get()+prio_queue_put() would do, but in a more
+ * efficient way. Does the same as prio_queue_put() if the queue is
+ * empty.
+ */
+void prio_queue_replace(struct prio_queue *queue, void *thing);
+
void clear_prio_queue(struct prio_queue *);
/* Reverse the LIFO elements */
diff --git a/promisor-remote.c b/promisor-remote.c
index 9d05858..08b0da8 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -3,7 +3,7 @@
#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "promisor-remote.h"
#include "config.h"
#include "trace2.h"
@@ -46,7 +46,7 @@ static int fetch_objects(struct repository *repo,
"fetch", remote_name, "--no-tags",
"--no-write-fetch-head", "--recurse-submodules=no",
"--filter=blob:none", "--stdin", NULL);
- if (!git_config_get_bool("promisor.quiet", &quiet) && quiet)
+ if (!repo_config_get_bool(the_repository, "promisor.quiet", &quiet) && quiet)
strvec_push(&child.args, "--quiet");
if (start_command(&child))
die(_("promisor-remote: unable to fork off fetch subprocess"));
@@ -245,8 +245,8 @@ static int remove_fetched_oids(struct repository *repo,
struct object_id *new_oids;
for (i = 0; i < oid_nr; i++)
- if (oid_object_info_extended(repo, &old_oids[i], NULL,
- OBJECT_INFO_SKIP_FETCH_OBJECT)) {
+ if (odb_read_object_info_extended(repo->objects, &old_oids[i], NULL,
+ OBJECT_INFO_SKIP_FETCH_OBJECT)) {
remaining[i] = 1;
remaining_nr++;
}
@@ -327,7 +327,7 @@ static void promisor_info_vecs(struct repository *repo,
char *url_key = xstrfmt("remote.%s.url", r->name);
/* Only add remotes with a non empty URL */
- if (!git_config_get_string_tmp(url_key, &url) && *url) {
+ if (!repo_config_get_string_tmp(the_repository, url_key, &url) && *url) {
strvec_push(names, r->name);
strvec_push(urls, url);
}
@@ -343,7 +343,7 @@ char *promisor_remote_info(struct repository *repo)
struct strvec names = STRVEC_INIT;
struct strvec urls = STRVEC_INIT;
- git_config_get_bool("promisor.advertise", &advertise_promisors);
+ repo_config_get_bool(the_repository, "promisor.advertise", &advertise_promisors);
if (!advertise_promisors)
return NULL;
@@ -433,7 +433,7 @@ static void filter_promisor_remote(struct repository *repo,
struct strvec names = STRVEC_INIT;
struct strvec urls = STRVEC_INIT;
- if (!git_config_get_string_tmp("promisor.acceptfromserver", &accept_str)) {
+ if (!repo_config_get_string_tmp(the_repository, "promisor.acceptfromserver", &accept_str)) {
if (!*accept_str || !strcasecmp("None", accept_str))
accept = ACCEPT_NONE;
else if (!strcasecmp("KnownUrl", accept_str))
diff --git a/prompt.c b/prompt.c
index f21c5bf..706fba2 100644
--- a/prompt.c
+++ b/prompt.c
@@ -77,12 +77,6 @@ char *git_prompt(const char *prompt, int flags)
int git_read_line_interactively(struct strbuf *line)
{
- int ret;
-
fflush(stdout);
- ret = strbuf_getline_lf(line, stdin);
- if (ret != EOF)
- strbuf_trim_trailing_newline(line);
-
- return ret;
+ return strbuf_getline(line, stdin);
}
diff --git a/protocol-caps.c b/protocol-caps.c
index 9b8db37..ecdd0dc 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -6,7 +6,7 @@
#include "hash.h"
#include "hex.h"
#include "object.h"
-#include "object-store.h"
+#include "odb.h"
#include "repository.h"
#include "string-list.h"
#include "strbuf.h"
@@ -64,7 +64,7 @@ static void send_info(struct repository *r, struct packet_writer *writer,
strbuf_addstr(&send_buffer, oid_str);
if (info->size) {
- if (oid_object_info(r, &oid, &object_size) < 0) {
+ if (odb_read_object_info(r->objects, &oid, &object_size) < 0) {
strbuf_addstr(&send_buffer, " ");
} else {
strbuf_addf(&send_buffer, " %lu", object_size);
diff --git a/protocol.c b/protocol.c
index bae7226..65f6621 100644
--- a/protocol.c
+++ b/protocol.c
@@ -24,7 +24,7 @@ enum protocol_version get_protocol_version_config(void)
const char *git_test_k = "GIT_TEST_PROTOCOL_VERSION";
const char *git_test_v;
- if (!git_config_get_string_tmp("protocol.version", &value)) {
+ if (!repo_config_get_string_tmp(the_repository, "protocol.version", &value)) {
enum protocol_version version = parse_protocol_version(value);
if (version == protocol_unknown_version)
diff --git a/prune-packed.c b/prune-packed.c
index 92fb4fb..d49dc11 100644
--- a/prune-packed.c
+++ b/prune-packed.c
@@ -40,7 +40,7 @@ void prune_packed_objects(int opts)
progress = start_delayed_progress(the_repository,
_("Removing duplicate objects"), 256);
- for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
+ for_each_loose_file_in_source(the_repository->objects->sources,
prune_object, NULL, prune_subdir, &opts);
/* Ensure we show 100% before finishing progress */
diff --git a/reachable.c b/reachable.c
index 9dc748f..22266db 100644
--- a/reachable.c
+++ b/reachable.c
@@ -170,7 +170,7 @@ static void load_gc_recent_objects(struct recent_data *data)
data->extra_recent_oids_loaded = 1;
- if (git_config_get_string_multi("gc.recentobjectshook", &programs))
+ if (repo_config_get_string_multi(the_repository, "gc.recentobjectshook", &programs))
return;
for (i = 0; i < programs->nr; i++) {
@@ -211,7 +211,7 @@ static void add_recent_object(const struct object_id *oid,
* later processing, and the revision machinery expects
* commits and tags to have been parsed.
*/
- type = oid_object_info(the_repository, oid, NULL);
+ type = odb_read_object_info(the_repository->objects, oid, NULL);
if (type < 0)
die("unable to get object info for %s", oid_to_hex(oid));
@@ -319,7 +319,7 @@ int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
oidset_init(&data.extra_recent_oids, 0);
data.extra_recent_oids_loaded = 0;
- r = for_each_loose_object(add_recent_loose, &data,
+ r = for_each_loose_object(the_repository->objects, add_recent_loose, &data,
FOR_EACH_OBJECT_LOCAL_ONLY);
if (r)
goto done;
diff --git a/read-cache.c b/read-cache.c
index c0bb760..06ad74d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -20,7 +20,7 @@
#include "refs.h"
#include "dir.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "tree.h"
#include "commit.h"
@@ -254,7 +254,7 @@ static int ce_compare_link(const struct cache_entry *ce, size_t expected_size)
if (strbuf_readlink(&sb, ce->name, expected_size))
return -1;
- buffer = repo_read_object_file(the_repository, &ce->oid, &type, &size);
+ buffer = odb_read_object(the_repository->objects, &ce->oid, &type, &size);
if (buffer) {
if (size == sb.len)
match = memcmp(buffer, sb.buf, size);
@@ -690,7 +690,7 @@ static struct cache_entry *create_alias_ce(struct index_state *istate,
void set_object_name_for_intent_to_add_entry(struct cache_entry *ce)
{
struct object_id oid;
- if (write_object_file("", 0, OBJ_BLOB, &oid))
+ if (odb_write_object(the_repository->objects, "", 0, OBJ_BLOB, &oid))
die(_("cannot create an empty blob in the object database"));
oidcpy(&ce->oid, &oid);
}
@@ -1456,7 +1456,8 @@ int repo_refresh_and_write_index(struct repository *repo,
struct lock_file lock_file = LOCK_INIT;
int fd, ret = 0;
- fd = repo_hold_locked_index(repo, &lock_file, 0);
+ fd = repo_hold_locked_index(repo, &lock_file,
+ gentle ? 0 : LOCK_REPORT_ON_ERROR);
if (!gentle && fd < 0)
return -1;
if (refresh_index(repo->index, refresh_flags, pathspec, seen, header_msg))
@@ -2754,7 +2755,7 @@ static int record_eoie(void)
{
int val;
- if (!git_config_get_bool("index.recordendofindexentries", &val))
+ if (!repo_config_get_bool(the_repository, "index.recordendofindexentries", &val))
return val;
/*
@@ -2769,7 +2770,7 @@ static int record_ieot(void)
{
int val;
- if (!git_config_get_bool("index.recordoffsettable", &val))
+ if (!repo_config_get_bool(the_repository, "index.recordoffsettable", &val))
return val;
/*
@@ -3485,8 +3486,8 @@ void *read_blob_data_from_index(struct index_state *istate,
}
if (pos < 0)
return NULL;
- data = repo_read_object_file(the_repository, &istate->cache[pos]->oid,
- &type, &sz);
+ data = odb_read_object(the_repository->objects, &istate->cache[pos]->oid,
+ &type, &sz);
if (!data || type != OBJ_BLOB) {
free(data);
return NULL;
@@ -3729,9 +3730,9 @@ void prefetch_cache_entries(const struct index_state *istate,
if (S_ISGITLINK(ce->ce_mode) || !must_prefetch(ce))
continue;
- if (!oid_object_info_extended(the_repository, &ce->oid,
- NULL,
- OBJECT_INFO_FOR_PREFETCH))
+ if (!odb_read_object_info_extended(the_repository->objects,
+ &ce->oid, NULL,
+ OBJECT_INFO_FOR_PREFETCH))
continue;
oid_array_append(&to_fetch, &ce->oid);
}
diff --git a/rebase-interactive.c b/rebase-interactive.c
index cbeb864..809f76a 100644
--- a/rebase-interactive.c
+++ b/rebase-interactive.c
@@ -30,7 +30,7 @@ static enum missing_commit_check_level get_missing_commit_check_level(void)
{
const char *value;
- if (git_config_get_value("rebase.missingcommitscheck", &value) ||
+ if (repo_config_get_value(the_repository, "rebase.missingcommitscheck", &value) ||
!strcasecmp("ignore", value))
return MISSING_COMMIT_CHECK_IGNORE;
if (!strcasecmp("warn", value))
diff --git a/ref-filter.c b/ref-filter.c
index 7a27463..4edf0df 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -12,7 +12,7 @@
#include "refs.h"
#include "wildmatch.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "repo-settings.h"
#include "repository.h"
@@ -2302,8 +2302,8 @@ static int get_object(struct ref_array_item *ref, int deref, struct object **obj
oi->info.sizep = &oi->size;
oi->info.typep = &oi->type;
}
- if (oid_object_info_extended(the_repository, &oi->oid, &oi->info,
- OBJECT_INFO_LOOKUP_REPLACE))
+ if (odb_read_object_info_extended(the_repository->objects, &oi->oid, &oi->info,
+ OBJECT_INFO_LOOKUP_REPLACE))
return strbuf_addf_ret(err, -1, _("missing object %s for %s"),
oid_to_hex(&oi->oid), ref->refname);
if (oi->info.disk_sizep && oi->disk_size < 0)
@@ -2684,6 +2684,41 @@ static int filter_exclude_match(struct ref_filter *filter, const char *refname)
}
/*
+ * We need to seek to the reference right after a given marker but excluding any
+ * matching references. So we seek to the lexicographically next reference.
+ */
+static int start_ref_iterator_after(struct ref_iterator *iter, const char *marker)
+{
+ struct strbuf sb = STRBUF_INIT;
+ int ret;
+
+ strbuf_addstr(&sb, marker);
+ strbuf_addch(&sb, 1);
+
+ ret = ref_iterator_seek(iter, sb.buf, 0);
+
+ strbuf_release(&sb);
+ return ret;
+}
+
+static int for_each_fullref_with_seek(struct ref_filter *filter, each_ref_fn cb,
+ void *cb_data, unsigned int flags)
+{
+ struct ref_iterator *iter;
+ int ret = 0;
+
+ iter = refs_ref_iterator_begin(get_main_ref_store(the_repository), "",
+ NULL, 0, flags);
+ if (filter->start_after)
+ ret = start_ref_iterator_after(iter, filter->start_after);
+
+ if (ret)
+ return ret;
+
+ return do_for_each_ref_iterator(iter, cb, cb_data);
+}
+
+/*
* This is the same as for_each_fullref_in(), but it tries to iterate
* only over the patterns we'll care about. Note that it _doesn't_ do a full
* pattern match, so the callback still has to match each ref individually.
@@ -2694,8 +2729,8 @@ static int for_each_fullref_in_pattern(struct ref_filter *filter,
{
if (filter->kind & FILTER_REFS_ROOT_REFS) {
/* In this case, we want to print all refs including root refs. */
- return refs_for_each_include_root_refs(get_main_ref_store(the_repository),
- cb, cb_data);
+ return for_each_fullref_with_seek(filter, cb, cb_data,
+ DO_FOR_EACH_INCLUDE_ROOT_REFS);
}
if (!filter->match_as_path) {
@@ -2704,8 +2739,7 @@ static int for_each_fullref_in_pattern(struct ref_filter *filter,
* prefixes like "refs/heads/" etc. are stripped off,
* so we have to look at everything:
*/
- return refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "", NULL, cb, cb_data);
+ return for_each_fullref_with_seek(filter, cb, cb_data, 0);
}
if (filter->ignore_case) {
@@ -2714,14 +2748,12 @@ static int for_each_fullref_in_pattern(struct ref_filter *filter,
* so just return everything and let the caller
* sort it out.
*/
- return refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "", NULL, cb, cb_data);
+ return for_each_fullref_with_seek(filter, cb, cb_data, 0);
}
if (!filter->name_patterns[0]) {
/* no patterns; we have to look at everything */
- return refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "", filter->exclude.v, cb, cb_data);
+ return for_each_fullref_with_seek(filter, cb, cb_data, 0);
}
return refs_for_each_fullref_in_prefixes(get_main_ref_store(the_repository),
@@ -3189,6 +3221,7 @@ void filter_is_base(struct repository *r,
static int do_filter_refs(struct ref_filter *filter, unsigned int type, each_ref_fn fn, void *cb_data)
{
+ const char *prefix = NULL;
int ret = 0;
filter->kind = type & FILTER_REFS_KIND_MASK;
@@ -3199,38 +3232,48 @@ static int do_filter_refs(struct ref_filter *filter, unsigned int type, each_ref
/* Simple per-ref filtering */
if (!filter->kind)
die("filter_refs: invalid type");
- else {
- /*
- * For common cases where we need only branches or remotes or tags,
- * we only iterate through those refs. If a mix of refs is needed,
- * we iterate over all refs and filter out required refs with the help
- * of filter_ref_kind().
- */
- if (filter->kind == FILTER_REFS_BRANCHES)
- ret = refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "refs/heads/", NULL,
- fn, cb_data);
- else if (filter->kind == FILTER_REFS_REMOTES)
- ret = refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "refs/remotes/", NULL,
- fn, cb_data);
- else if (filter->kind == FILTER_REFS_TAGS)
- ret = refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "refs/tags/", NULL, fn,
- cb_data);
- else if (filter->kind & FILTER_REFS_REGULAR)
- ret = for_each_fullref_in_pattern(filter, fn, cb_data);
- /*
- * When printing all ref types, HEAD is already included,
- * so we don't want to print HEAD again.
- */
- if (!ret && !(filter->kind & FILTER_REFS_ROOT_REFS) &&
- (filter->kind & FILTER_REFS_DETACHED_HEAD))
- refs_head_ref(get_main_ref_store(the_repository), fn,
- cb_data);
+ /*
+ * For common cases where we need only branches or remotes or tags,
+ * we only iterate through those refs. If a mix of refs is needed,
+ * we iterate over all refs and filter out required refs with the help
+ * of filter_ref_kind().
+ */
+ if (filter->kind == FILTER_REFS_BRANCHES)
+ prefix = "refs/heads/";
+ else if (filter->kind == FILTER_REFS_REMOTES)
+ prefix = "refs/remotes/";
+ else if (filter->kind == FILTER_REFS_TAGS)
+ prefix = "refs/tags/";
+
+ if (prefix) {
+ struct ref_iterator *iter;
+
+ iter = refs_ref_iterator_begin(get_main_ref_store(the_repository),
+ "", NULL, 0, 0);
+
+ if (filter->start_after)
+ ret = start_ref_iterator_after(iter, filter->start_after);
+ else
+ ret = ref_iterator_seek(iter, prefix,
+ REF_ITERATOR_SEEK_SET_PREFIX);
+
+ if (!ret)
+ ret = do_for_each_ref_iterator(iter, fn, cb_data);
+ } else if (filter->kind & FILTER_REFS_REGULAR) {
+ ret = for_each_fullref_in_pattern(filter, fn, cb_data);
}
+ /*
+ * When printing all ref types, HEAD is already included,
+ * so we don't want to print HEAD again.
+ */
+ if (!ret && !(filter->kind & FILTER_REFS_ROOT_REFS) &&
+ (filter->kind & FILTER_REFS_DETACHED_HEAD))
+ refs_head_ref(get_main_ref_store(the_repository), fn,
+ cb_data);
+
+
clear_contains_cache(&filter->internal.contains_cache);
clear_contains_cache(&filter->internal.no_contains_cache);
diff --git a/ref-filter.h b/ref-filter.h
index c98c4fb..f22ca94 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -64,6 +64,7 @@ struct ref_array {
struct ref_filter {
const char **name_patterns;
+ const char *start_after;
struct strvec exclude;
struct oid_array points_at;
struct commit_list *with_commit;
diff --git a/reflog.c b/reflog.c
index 15d81eb..b267369 100644
--- a/reflog.c
+++ b/reflog.c
@@ -3,9 +3,10 @@
#include "git-compat-util.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
-#include "object-store.h"
+#include "odb.h"
#include "reflog.h"
#include "refs.h"
#include "revision.h"
@@ -81,6 +82,20 @@ int reflog_expire_config(const char *var, const char *value,
return 0;
}
+void reflog_clear_expire_config(struct reflog_expire_options *opts)
+{
+ struct reflog_expire_entry_option *ent = opts->entries, *tmp;
+
+ while (ent) {
+ tmp = ent;
+ ent = ent->next;
+ free(tmp);
+ }
+
+ opts->entries = NULL;
+ opts->entries_tail = NULL;
+}
+
void reflog_expire_options_set_refname(struct reflog_expire_options *cb,
const char *ref)
{
@@ -140,8 +155,8 @@ static int tree_is_complete(const struct object_id *oid)
if (!tree->buffer) {
enum object_type type;
unsigned long size;
- void *data = repo_read_object_file(the_repository, oid, &type,
- &size);
+ void *data = odb_read_object(the_repository->objects, oid,
+ &type, &size);
if (!data) {
tree->object.flags |= INCOMPLETE;
return 0;
@@ -152,7 +167,7 @@ static int tree_is_complete(const struct object_id *oid)
init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);
complete = 1;
while (tree_entry(&desc, &entry)) {
- if (!has_object(the_repository, &entry.oid,
+ if (!odb_has_object(the_repository->objects, &entry.oid,
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) ||
(S_ISDIR(entry.mode) && !tree_is_complete(&entry.oid))) {
tree->object.flags |= INCOMPLETE;
diff --git a/reflog.h b/reflog.h
index 63bb562..74b3f3c 100644
--- a/reflog.h
+++ b/reflog.h
@@ -34,6 +34,8 @@ struct reflog_expire_options {
int reflog_expire_config(const char *var, const char *value,
const struct config_context *ctx, void *cb);
+void reflog_clear_expire_config(struct reflog_expire_options *opts);
+
/*
* Adapt the options so that they apply to the given refname. This applies any
* per-reference reflog expiry configuration that may exist to the options.
diff --git a/refs.c b/refs.c
index dce5c49..bfdbe71 100644
--- a/refs.c
+++ b/refs.c
@@ -19,7 +19,7 @@
#include "run-command.h"
#include "hook.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "object.h"
#include "path.h"
#include "submodule.h"
@@ -376,7 +376,8 @@ int ref_resolves_to_object(const char *refname,
{
if (flags & REF_ISBROKEN)
return 0;
- if (!has_object(repo, oid, HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ if (!odb_has_object(repo->objects, oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
error(_("%s does not point to a valid object!"), refname);
return 0;
}
@@ -438,9 +439,9 @@ static int for_each_filter_refs(const char *refname, const char *referent,
struct warn_if_dangling_data {
struct ref_store *refs;
FILE *fp;
- const char *refname;
const struct string_list *refnames;
- const char *msg_fmt;
+ const char *indent;
+ int dry_run;
};
static int warn_if_dangling_symref(const char *refname, const char *referent UNUSED,
@@ -448,44 +449,34 @@ static int warn_if_dangling_symref(const char *refname, const char *referent UNU
int flags, void *cb_data)
{
struct warn_if_dangling_data *d = cb_data;
- const char *resolves_to;
+ const char *resolves_to, *msg;
if (!(flags & REF_ISSYMREF))
return 0;
resolves_to = refs_resolve_ref_unsafe(d->refs, refname, 0, NULL, NULL);
if (!resolves_to
- || (d->refname
- ? strcmp(resolves_to, d->refname)
- : !string_list_has_string(d->refnames, resolves_to))) {
+ || !string_list_has_string(d->refnames, resolves_to)) {
return 0;
}
- fprintf(d->fp, d->msg_fmt, refname);
- fputc('\n', d->fp);
+ msg = d->dry_run
+ ? _("%s%s will become dangling after %s is deleted\n")
+ : _("%s%s has become dangling after %s was deleted\n");
+ fprintf(d->fp, msg, d->indent, refname, resolves_to);
return 0;
}
-void refs_warn_dangling_symref(struct ref_store *refs, FILE *fp,
- const char *msg_fmt, const char *refname)
-{
- struct warn_if_dangling_data data = {
- .refs = refs,
- .fp = fp,
- .refname = refname,
- .msg_fmt = msg_fmt,
- };
- refs_for_each_rawref(refs, warn_if_dangling_symref, &data);
-}
-
void refs_warn_dangling_symrefs(struct ref_store *refs, FILE *fp,
- const char *msg_fmt, const struct string_list *refnames)
+ const char *indent, int dry_run,
+ const struct string_list *refnames)
{
struct warn_if_dangling_data data = {
.refs = refs,
.fp = fp,
.refnames = refnames,
- .msg_fmt = msg_fmt,
+ .indent = indent,
+ .dry_run = dry_run,
};
refs_for_each_rawref(refs, warn_if_dangling_symref, &data);
}
@@ -954,7 +945,7 @@ long get_files_ref_lock_timeout_ms(void)
static int timeout_ms = 100;
if (!configured) {
- git_config_get_int("core.filesreflocktimeout", &timeout_ms);
+ repo_config_get_int(the_repository, "core.filesreflocktimeout", &timeout_ms);
configured = 1;
}
@@ -2477,7 +2468,7 @@ int ref_transaction_prepare(struct ref_transaction *transaction,
break;
}
- if (refs->repo->objects->odb->disable_ref_updates) {
+ if (refs->repo->objects->sources->disable_ref_updates) {
strbuf_addstr(err,
_("ref updates forbidden inside quarantine environment"));
return -1;
@@ -2666,12 +2657,12 @@ enum ref_transaction_error refs_verify_refnames_available(struct ref_store *refs
if (!initial_transaction) {
int ok;
- if (!iter) {
+ if (!iter)
iter = refs_ref_iterator_begin(refs, dirname.buf, NULL, 0,
DO_FOR_EACH_INCLUDE_BROKEN);
- } else if (ref_iterator_seek(iter, dirname.buf) < 0) {
+ else if (ref_iterator_seek(iter, dirname.buf,
+ REF_ITERATOR_SEEK_SET_PREFIX) < 0)
goto cleanup;
- }
while ((ok = ref_iterator_advance(iter)) == ITER_OK) {
if (skip &&
@@ -3314,3 +3305,23 @@ int ref_update_expects_existing_old_ref(struct ref_update *update)
return (update->flags & REF_HAVE_OLD) &&
(!is_null_oid(&update->old_oid) || update->old_target);
}
+
+const char *ref_transaction_error_msg(enum ref_transaction_error err)
+{
+ switch (err) {
+ case REF_TRANSACTION_ERROR_NAME_CONFLICT:
+ return "refname conflict";
+ case REF_TRANSACTION_ERROR_CREATE_EXISTS:
+ return "reference already exists";
+ case REF_TRANSACTION_ERROR_NONEXISTENT_REF:
+ return "reference does not exist";
+ case REF_TRANSACTION_ERROR_INCORRECT_OLD_VALUE:
+ return "incorrect old value provided";
+ case REF_TRANSACTION_ERROR_INVALID_NEW_VALUE:
+ return "invalid new value provided";
+ case REF_TRANSACTION_ERROR_EXPECTED_SYMREF:
+ return "expected symref but found regular ref";
+ default:
+ return "unknown failure";
+ }
+}
diff --git a/refs.h b/refs.h
index 46a6008..eedbb59 100644
--- a/refs.h
+++ b/refs.h
@@ -452,10 +452,9 @@ static inline const char *has_glob_specials(const char *pattern)
return strpbrk(pattern, "?*[");
}
-void refs_warn_dangling_symref(struct ref_store *refs, FILE *fp,
- const char *msg_fmt, const char *refname);
void refs_warn_dangling_symrefs(struct ref_store *refs, FILE *fp,
- const char *msg_fmt, const struct string_list *refnames);
+ const char *indent, int dry_run,
+ const struct string_list *refnames);
/*
* Flags for controlling behaviour of pack_refs()
@@ -908,6 +907,11 @@ void ref_transaction_for_each_rejected_update(struct ref_transaction *transactio
void *cb_data);
/*
+ * Translate errors to human readable error messages.
+ */
+const char *ref_transaction_error_msg(enum ref_transaction_error err);
+
+/*
* Free `*transaction` and all associated data.
*/
void ref_transaction_free(struct ref_transaction *transaction);
@@ -1190,4 +1194,159 @@ int repo_migrate_ref_storage_format(struct repository *repo,
unsigned int flags,
struct strbuf *err);
+/*
+ * Reference iterators
+ *
+ * A reference iterator encapsulates the state of an in-progress
+ * iteration over references. Create an instance of `struct
+ * ref_iterator` via one of the functions in this module.
+ *
+ * A freshly-created ref_iterator doesn't yet point at a reference. To
+ * advance the iterator, call ref_iterator_advance(). If successful,
+ * this sets the iterator's refname, oid, and flags fields to describe
+ * the next reference and returns ITER_OK. The data pointed at by
+ * refname and oid belong to the iterator; if you want to retain them
+ * after calling ref_iterator_advance() again or calling
+ * ref_iterator_free(), you must make a copy. When the iteration has
+ * been exhausted, ref_iterator_advance() releases any resources
+ * associated with the iteration, frees the ref_iterator object, and
+ * returns ITER_DONE. If you want to abort the iteration early, call
+ * ref_iterator_free(), which also frees the ref_iterator object and
+ * any associated resources. If there was an internal error advancing
+ * to the next entry, ref_iterator_advance() aborts the iteration,
+ * frees the ref_iterator, and returns ITER_ERROR.
+ *
+ * The reference currently being looked at can be peeled by calling
+ * ref_iterator_peel(). This function is often faster than peel_ref(),
+ * so it should be preferred when iterating over references.
+ *
+ * Putting it all together, a typical iteration looks like this:
+ *
+ * int ok;
+ * struct ref_iterator *iter = ...;
+ *
+ * while ((ok = ref_iterator_advance(iter)) == ITER_OK) {
+ * if (want_to_stop_iteration()) {
+ * ok = ITER_DONE;
+ * break;
+ * }
+ *
+ * // Access information about the current reference:
+ * if (!(iter->flags & REF_ISSYMREF))
+ * printf("%s is %s\n", iter->refname, oid_to_hex(iter->oid));
+ *
+ * // If you need to peel the reference:
+ * ref_iterator_peel(iter, &oid);
+ * }
+ *
+ * if (ok != ITER_DONE)
+ * handle_error();
+ * ref_iterator_free(iter);
+ */
+struct ref_iterator;
+
+/*
+ * These flags are passed to refs_ref_iterator_begin() (and do_for_each_ref(),
+ * which feeds it).
+ */
+enum do_for_each_ref_flags {
+ /*
+ * Include broken references in a do_for_each_ref*() iteration, which
+ * would normally be omitted. This includes both refs that point to
+ * missing objects (a true repository corruption), ones with illegal
+ * names (which we prefer not to expose to callers), as well as
+ * dangling symbolic refs (i.e., those that point to a non-existent
+ * ref; this is not a corruption, but as they have no valid oid, we
+ * omit them from normal iteration results).
+ */
+ DO_FOR_EACH_INCLUDE_BROKEN = (1 << 0),
+
+ /*
+ * Only include per-worktree refs in a do_for_each_ref*() iteration.
+ * Normally this will be used with a files ref_store, since that's
+ * where all reference backends will presumably store their
+ * per-worktree refs.
+ */
+ DO_FOR_EACH_PER_WORKTREE_ONLY = (1 << 1),
+
+ /*
+ * Omit dangling symrefs from output; this only has an effect with
+ * INCLUDE_BROKEN, since they are otherwise not included at all.
+ */
+ DO_FOR_EACH_OMIT_DANGLING_SYMREFS = (1 << 2),
+
+ /*
+ * Include root refs i.e. HEAD and pseudorefs along with the regular
+ * refs.
+ */
+ DO_FOR_EACH_INCLUDE_ROOT_REFS = (1 << 3),
+};
+
+/*
+ * Return an iterator that goes over each reference in `refs` for
+ * which the refname begins with prefix. If trim is non-zero, then
+ * trim that many characters off the beginning of each refname.
+ * The output is ordered by refname.
+ */
+struct ref_iterator *refs_ref_iterator_begin(
+ struct ref_store *refs,
+ const char *prefix, const char **exclude_patterns,
+ int trim, enum do_for_each_ref_flags flags);
+
+/*
+ * Advance the iterator to the first or next item and return ITER_OK.
+ * If the iteration is exhausted, free the resources associated with
+ * the ref_iterator and return ITER_DONE. On errors, free the iterator
+ * resources and return ITER_ERROR. It is a bug to use ref_iterator or
+ * call this function again after it has returned ITER_DONE or
+ * ITER_ERROR.
+ */
+int ref_iterator_advance(struct ref_iterator *ref_iterator);
+
+enum ref_iterator_seek_flag {
+ /*
+ * When the REF_ITERATOR_SEEK_SET_PREFIX flag is set, the iterator's prefix is
+ * updated to match the provided string, affecting all subsequent iterations. If
+ * not, the iterator seeks to the specified reference and clears any previously
+ * set prefix.
+ */
+ REF_ITERATOR_SEEK_SET_PREFIX = (1 << 0),
+};
+
+/*
+ * Seek the iterator to the first reference matching the given seek string.
+ * The seek string is matched as a literal string, without regard for path
+ * separators. If seek is NULL or the empty string, seek the iterator to the
+ * first reference again.
+ *
+ * This function is expected to behave as if a new ref iterator has been
+ * created, but allows reuse of existing iterators for optimization.
+ *
+ * Returns 0 on success, a negative error code otherwise.
+ */
+int ref_iterator_seek(struct ref_iterator *ref_iterator, const char *refname,
+ unsigned int flags);
+
+/*
+ * If possible, peel the reference currently being viewed by the
+ * iterator. Return 0 on success.
+ */
+int ref_iterator_peel(struct ref_iterator *ref_iterator,
+ struct object_id *peeled);
+
+/* Free the reference iterator and any associated resources. */
+void ref_iterator_free(struct ref_iterator *ref_iterator);
+
+/*
+ * The common backend for the for_each_*ref* functions. Call fn for
+ * each reference in iter. If the iterator itself ever returns
+ * ITER_ERROR, return -1. If fn ever returns a non-zero value, stop
+ * the iteration and return that value. Otherwise, return 0. In any
+ * case, free the iterator when done. This function is basically an
+ * adapter between the callback style of reference iteration and the
+ * iterator style.
+ */
+int do_for_each_ref_iterator(struct ref_iterator *iter,
+ each_ref_fn fn, void *cb_data);
+
#endif /* REFS_H */
diff --git a/refs/debug.c b/refs/debug.c
index 485e307..da300ef 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -170,12 +170,13 @@ static int debug_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int debug_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct debug_ref_iterator *diter =
(struct debug_ref_iterator *)ref_iterator;
- int res = diter->iter->vtable->seek(diter->iter, prefix);
- trace_printf_key(&trace_refs, "iterator_seek: %s: %d\n", prefix ? prefix : "", res);
+ int res = diter->iter->vtable->seek(diter->iter, refname, flags);
+ trace_printf_key(&trace_refs, "iterator_seek: %s flags: %d: %d\n",
+ refname ? refname : "", flags, res);
return res;
}
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bf6f89b..088b52c 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -929,11 +929,11 @@ static int files_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int files_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct files_ref_iterator *iter =
(struct files_ref_iterator *)ref_iterator;
- return ref_iterator_seek(iter->iter0, prefix);
+ return ref_iterator_seek(iter->iter0, refname, flags);
}
static int files_ref_iterator_peel(struct ref_iterator *ref_iterator,
@@ -2316,7 +2316,8 @@ static int files_reflog_iterator_advance(struct ref_iterator *ref_iterator)
}
static int files_reflog_iterator_seek(struct ref_iterator *ref_iterator UNUSED,
- const char *prefix UNUSED)
+ const char *refname UNUSED,
+ unsigned int flags UNUSED)
{
BUG("ref_iterator_seek() called for reflog_iterator");
}
@@ -2760,6 +2761,8 @@ static void files_transaction_cleanup(struct files_ref_store *refs,
if (lock) {
unlock_ref(lock);
+ try_remove_empty_parents(refs, update->refname,
+ REMOVE_EMPTY_PARENTS_REF);
update->backend_data = NULL;
}
}
@@ -3208,6 +3211,10 @@ static int files_transaction_finish(struct ref_store *ref_store,
*/
for (i = 0; i < transaction->nr; i++) {
struct ref_update *update = transaction->updates[i];
+
+ if (update->rejection_err)
+ continue;
+
if (update->flags & REF_DELETING &&
!(update->flags & REF_LOG_ONLY) &&
!(update->flags & REF_IS_PRUNING)) {
@@ -3239,6 +3246,9 @@ static int files_transaction_finish(struct ref_store *ref_store,
struct ref_update *update = transaction->updates[i];
struct ref_lock *lock = update->backend_data;
+ if (update->rejection_err)
+ continue;
+
if (update->flags & REF_DELETING &&
!(update->flags & REF_LOG_ONLY)) {
update->flags |= REF_DELETED_RMDIR;
diff --git a/refs/iterator.c b/refs/iterator.c
index 766d96e..17ef841 100644
--- a/refs/iterator.c
+++ b/refs/iterator.c
@@ -15,10 +15,10 @@ int ref_iterator_advance(struct ref_iterator *ref_iterator)
return ref_iterator->vtable->advance(ref_iterator);
}
-int ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+int ref_iterator_seek(struct ref_iterator *ref_iterator, const char *refname,
+ unsigned int flags)
{
- return ref_iterator->vtable->seek(ref_iterator, prefix);
+ return ref_iterator->vtable->seek(ref_iterator, refname, flags);
}
int ref_iterator_peel(struct ref_iterator *ref_iterator,
@@ -57,7 +57,8 @@ static int empty_ref_iterator_advance(struct ref_iterator *ref_iterator UNUSED)
}
static int empty_ref_iterator_seek(struct ref_iterator *ref_iterator UNUSED,
- const char *prefix UNUSED)
+ const char *refname UNUSED,
+ unsigned int flags UNUSED)
{
return 0;
}
@@ -224,7 +225,7 @@ static int merge_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int merge_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct merge_ref_iterator *iter =
(struct merge_ref_iterator *)ref_iterator;
@@ -234,11 +235,11 @@ static int merge_ref_iterator_seek(struct ref_iterator *ref_iterator,
iter->iter0 = iter->iter0_owned;
iter->iter1 = iter->iter1_owned;
- ret = ref_iterator_seek(iter->iter0, prefix);
+ ret = ref_iterator_seek(iter->iter0, refname, flags);
if (ret < 0)
return ret;
- ret = ref_iterator_seek(iter->iter1, prefix);
+ ret = ref_iterator_seek(iter->iter1, refname, flags);
if (ret < 0)
return ret;
@@ -407,13 +408,16 @@ static int prefix_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int prefix_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct prefix_ref_iterator *iter =
(struct prefix_ref_iterator *)ref_iterator;
- free(iter->prefix);
- iter->prefix = xstrdup_or_null(prefix);
- return ref_iterator_seek(iter->iter0, prefix);
+
+ if (flags & REF_ITERATOR_SEEK_SET_PREFIX) {
+ free(iter->prefix);
+ iter->prefix = xstrdup_or_null(refname);
+ }
+ return ref_iterator_seek(iter->iter0, refname, flags);
}
static int prefix_ref_iterator_peel(struct ref_iterator *ref_iterator,
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 7fd73a0..a8c22a0 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -1004,19 +1004,23 @@ static int packed_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int packed_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct packed_ref_iterator *iter =
(struct packed_ref_iterator *)ref_iterator;
const char *start;
- if (prefix && *prefix)
- start = find_reference_location(iter->snapshot, prefix, 0);
+ if (refname && *refname)
+ start = find_reference_location(iter->snapshot, refname, 0);
else
start = iter->snapshot->start;
- free(iter->prefix);
- iter->prefix = xstrdup_or_null(prefix);
+ /* Unset any previously set prefix */
+ FREE_AND_NULL(iter->prefix);
+
+ if (flags & REF_ITERATOR_SEEK_SET_PREFIX)
+ iter->prefix = xstrdup_or_null(refname);
+
iter->pos = start;
iter->eof = iter->snapshot->eof;
@@ -1194,7 +1198,8 @@ static struct ref_iterator *packed_ref_iterator_begin(
iter->repo = ref_store->repo;
iter->flags = flags;
- if (packed_ref_iterator_seek(&iter->base, prefix) < 0) {
+ if (packed_ref_iterator_seek(&iter->base, prefix,
+ REF_ITERATOR_SEEK_SET_PREFIX) < 0) {
ref_iterator_free(&iter->base);
return NULL;
}
@@ -1228,7 +1233,7 @@ int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err)
static int timeout_value = 1000;
if (!timeout_configured) {
- git_config_get_int("core.packedrefstimeout", &timeout_value);
+ repo_config_get_int(the_repository, "core.packedrefstimeout", &timeout_value);
timeout_configured = 1;
}
diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index c1f1bab..c180e0a 100644
--- a/refs/ref-cache.c
+++ b/refs/ref-cache.c
@@ -194,20 +194,6 @@ static struct ref_dir *find_containing_dir(struct ref_dir *dir,
return dir;
}
-struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname)
-{
- int entry_index;
- struct ref_entry *entry;
- dir = find_containing_dir(dir, refname);
- if (!dir)
- return NULL;
- entry_index = search_ref_dir(dir, refname, strlen(refname));
- if (entry_index == -1)
- return NULL;
- entry = dir->entries[entry_index];
- return (entry->flag & REF_DIR) ? NULL : entry;
-}
-
/*
* Emit a warning and return true iff ref1 and ref2 have the same name
* and the same oid. Die if they have the same name but different
@@ -448,11 +434,9 @@ static int cache_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
}
-static int cache_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+static int cache_ref_iterator_set_prefix(struct cache_ref_iterator *iter,
+ const char *prefix)
{
- struct cache_ref_iterator *iter =
- (struct cache_ref_iterator *)ref_iterator;
struct cache_ref_iterator_level *level;
struct ref_dir *dir;
@@ -483,6 +467,84 @@ static int cache_ref_iterator_seek(struct ref_iterator *ref_iterator,
return 0;
}
+static int cache_ref_iterator_seek(struct ref_iterator *ref_iterator,
+ const char *refname, unsigned int flags)
+{
+ struct cache_ref_iterator *iter =
+ (struct cache_ref_iterator *)ref_iterator;
+
+ if (flags & REF_ITERATOR_SEEK_SET_PREFIX) {
+ return cache_ref_iterator_set_prefix(iter, refname);
+ } else if (refname && *refname) {
+ struct cache_ref_iterator_level *level;
+ const char *slash = refname;
+ struct ref_dir *dir;
+
+ dir = get_ref_dir(iter->cache->root);
+
+ if (iter->prime_dir)
+ prime_ref_dir(dir, refname);
+
+ iter->levels_nr = 1;
+ level = &iter->levels[0];
+ level->index = -1;
+ level->dir = dir;
+
+ /* Unset any previously set prefix */
+ FREE_AND_NULL(iter->prefix);
+
+ /*
+ * Breakdown the provided seek path and assign the correct
+ * indexing to each level as needed.
+ */
+ do {
+ int idx;
+ size_t len;
+ int cmp = 0;
+
+ sort_ref_dir(dir);
+
+ slash = strchr(slash, '/');
+ len = slash ? (size_t)(slash - refname) : strlen(refname);
+
+ for (idx = 0; idx < dir->nr; idx++) {
+ cmp = strncmp(refname, dir->entries[idx]->name, len);
+ if (cmp <= 0)
+ break;
+ }
+ /* don't overflow the index */
+ idx = idx >= dir->nr ? dir->nr - 1 : idx;
+
+ if (slash)
+ slash = slash + 1;
+
+ level->index = idx;
+ if (dir->entries[idx]->flag & REF_DIR) {
+ /* push down a level */
+ dir = get_ref_dir(dir->entries[idx]);
+
+ ALLOC_GROW(iter->levels, iter->levels_nr + 1,
+ iter->levels_alloc);
+ level = &iter->levels[iter->levels_nr++];
+ level->dir = dir;
+ level->index = -1;
+ level->prefix_state = PREFIX_CONTAINS_DIR;
+ } else {
+ /* reduce the index so the leaf node is iterated over */
+ if (cmp <= 0 && !slash)
+ level->index = idx - 1;
+ /*
+ * while the seek path may not be exhausted, our
+ * match is exhausted at a leaf node.
+ */
+ break;
+ }
+ } while (slash);
+ }
+
+ return 0;
+}
+
static int cache_ref_iterator_peel(struct ref_iterator *ref_iterator,
struct object_id *peeled)
{
@@ -523,7 +585,8 @@ struct ref_iterator *cache_ref_iterator_begin(struct ref_cache *cache,
iter->cache = cache;
iter->prime_dir = prime_dir;
- if (cache_ref_iterator_seek(&iter->base, prefix) < 0) {
+ if (cache_ref_iterator_seek(&iter->base, prefix,
+ REF_ITERATOR_SEEK_SET_PREFIX) < 0) {
ref_iterator_free(&iter->base);
return NULL;
}
diff --git a/refs/ref-cache.h b/refs/ref-cache.h
index 5f04e51..f635d2d 100644
--- a/refs/ref-cache.h
+++ b/refs/ref-cache.h
@@ -202,13 +202,6 @@ void free_ref_cache(struct ref_cache *cache);
void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
/*
- * Find the value entry with the given name in dir, sorting ref_dirs
- * and recursing into subdirectories as necessary. If the name is not
- * found or it corresponds to a directory entry, return NULL.
- */
-struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname);
-
-/*
* Start iterating over references in `cache`. If `prefix` is
* specified, only include references whose names start with that
* prefix. If `prime_dir` is true, then fill any incomplete
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index f868870..40c1c0f 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -244,90 +244,8 @@ const char *find_descendant_ref(const char *dirname,
#define SYMREF_MAXDEPTH 5
/*
- * These flags are passed to refs_ref_iterator_begin() (and do_for_each_ref(),
- * which feeds it).
- */
-enum do_for_each_ref_flags {
- /*
- * Include broken references in a do_for_each_ref*() iteration, which
- * would normally be omitted. This includes both refs that point to
- * missing objects (a true repository corruption), ones with illegal
- * names (which we prefer not to expose to callers), as well as
- * dangling symbolic refs (i.e., those that point to a non-existent
- * ref; this is not a corruption, but as they have no valid oid, we
- * omit them from normal iteration results).
- */
- DO_FOR_EACH_INCLUDE_BROKEN = (1 << 0),
-
- /*
- * Only include per-worktree refs in a do_for_each_ref*() iteration.
- * Normally this will be used with a files ref_store, since that's
- * where all reference backends will presumably store their
- * per-worktree refs.
- */
- DO_FOR_EACH_PER_WORKTREE_ONLY = (1 << 1),
-
- /*
- * Omit dangling symrefs from output; this only has an effect with
- * INCLUDE_BROKEN, since they are otherwise not included at all.
- */
- DO_FOR_EACH_OMIT_DANGLING_SYMREFS = (1 << 2),
-
- /*
- * Include root refs i.e. HEAD and pseudorefs along with the regular
- * refs.
- */
- DO_FOR_EACH_INCLUDE_ROOT_REFS = (1 << 3),
-};
-
-/*
- * Reference iterators
- *
- * A reference iterator encapsulates the state of an in-progress
- * iteration over references. Create an instance of `struct
- * ref_iterator` via one of the functions in this module.
- *
- * A freshly-created ref_iterator doesn't yet point at a reference. To
- * advance the iterator, call ref_iterator_advance(). If successful,
- * this sets the iterator's refname, oid, and flags fields to describe
- * the next reference and returns ITER_OK. The data pointed at by
- * refname and oid belong to the iterator; if you want to retain them
- * after calling ref_iterator_advance() again or calling
- * ref_iterator_free(), you must make a copy. When the iteration has
- * been exhausted, ref_iterator_advance() releases any resources
- * associated with the iteration, frees the ref_iterator object, and
- * returns ITER_DONE. If you want to abort the iteration early, call
- * ref_iterator_free(), which also frees the ref_iterator object and
- * any associated resources. If there was an internal error advancing
- * to the next entry, ref_iterator_advance() aborts the iteration,
- * frees the ref_iterator, and returns ITER_ERROR.
- *
- * The reference currently being looked at can be peeled by calling
- * ref_iterator_peel(). This function is often faster than peel_ref(),
- * so it should be preferred when iterating over references.
- *
- * Putting it all together, a typical iteration looks like this:
- *
- * int ok;
- * struct ref_iterator *iter = ...;
- *
- * while ((ok = ref_iterator_advance(iter)) == ITER_OK) {
- * if (want_to_stop_iteration()) {
- * ok = ITER_DONE;
- * break;
- * }
- *
- * // Access information about the current reference:
- * if (!(iter->flags & REF_ISSYMREF))
- * printf("%s is %s\n", iter->refname, oid_to_hex(iter->oid));
- *
- * // If you need to peel the reference:
- * ref_iterator_peel(iter, &oid);
- * }
- *
- * if (ok != ITER_DONE)
- * handle_error();
- * ref_iterator_free(iter);
+ * Data structure for holding a reference iterator. See refs.h for
+ * more details and usage instructions.
*/
struct ref_iterator {
struct ref_iterator_vtable *vtable;
@@ -338,42 +256,6 @@ struct ref_iterator {
};
/*
- * Advance the iterator to the first or next item and return ITER_OK.
- * If the iteration is exhausted, free the resources associated with
- * the ref_iterator and return ITER_DONE. On errors, free the iterator
- * resources and return ITER_ERROR. It is a bug to use ref_iterator or
- * call this function again after it has returned ITER_DONE or
- * ITER_ERROR.
- */
-int ref_iterator_advance(struct ref_iterator *ref_iterator);
-
-/*
- * Seek the iterator to the first reference with the given prefix.
- * The prefix is matched as a literal string, without regard for path
- * separators. If prefix is NULL or the empty string, seek the iterator to the
- * first reference again.
- *
- * This function is expected to behave as if a new ref iterator with the same
- * prefix had been created, but allows reuse of iterators and thus may allow
- * the backend to optimize. Parameters other than the prefix that have been
- * passed when creating the iterator will remain unchanged.
- *
- * Returns 0 on success, a negative error code otherwise.
- */
-int ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix);
-
-/*
- * If possible, peel the reference currently being viewed by the
- * iterator. Return 0 on success.
- */
-int ref_iterator_peel(struct ref_iterator *ref_iterator,
- struct object_id *peeled);
-
-/* Free the reference iterator and any associated resources. */
-void ref_iterator_free(struct ref_iterator *ref_iterator);
-
-/*
* An iterator over nothing (its first ref_iterator_advance() call
* returns ITER_DONE).
*/
@@ -385,17 +267,6 @@ struct ref_iterator *empty_ref_iterator_begin(void);
int is_empty_ref_iterator(struct ref_iterator *ref_iterator);
/*
- * Return an iterator that goes over each reference in `refs` for
- * which the refname begins with prefix. If trim is non-zero, then
- * trim that many characters off the beginning of each refname.
- * The output is ordered by refname.
- */
-struct ref_iterator *refs_ref_iterator_begin(
- struct ref_store *refs,
- const char *prefix, const char **exclude_patterns,
- int trim, enum do_for_each_ref_flags flags);
-
-/*
* A callback function used to instruct merge_ref_iterator how to
* interleave the entries from iter0 and iter1. The function should
* return one of the constants defined in enum iterator_selection. It
@@ -482,11 +353,12 @@ void base_ref_iterator_init(struct ref_iterator *iter,
typedef int ref_iterator_advance_fn(struct ref_iterator *ref_iterator);
/*
- * Seek the iterator to the first reference matching the given prefix. Should
- * behave the same as if a new iterator was created with the same prefix.
+ * Seek the iterator to the first matching reference. If the
+ * REF_ITERATOR_SEEK_SET_PREFIX flag is set, it would behave the same as if a
+ * new iterator was created with the provided refname as prefix.
*/
typedef int ref_iterator_seek_fn(struct ref_iterator *ref_iterator,
- const char *prefix);
+ const char *refname, unsigned int flags);
/*
* Peels the current ref, returning 0 for success or -1 for failure.
@@ -520,18 +392,6 @@ struct ref_iterator_vtable {
*/
extern struct ref_iterator *current_ref_iter;
-/*
- * The common backend for the for_each_*ref* functions. Call fn for
- * each reference in iter. If the iterator itself ever returns
- * ITER_ERROR, return -1. If fn ever returns a non-zero value, stop
- * the iteration and return that value. Otherwise, return 0. In any
- * case, free the iterator when done. This function is basically an
- * adapter between the callback style of reference iteration and the
- * iterator style.
- */
-int do_for_each_ref_iterator(struct ref_iterator *iter,
- each_ref_fn fn, void *cb_data);
-
struct ref_store;
/* refs backends */
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index 4c3817f..8dae1e1 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -386,7 +386,7 @@ static struct ref_store *reftable_be_init(struct repository *repo,
refs->write_options.lock_timeout_ms = 100;
refs->write_options.fsync = reftable_be_fsync;
- git_config(reftable_be_config, &refs->write_options);
+ repo_config(the_repository, reftable_be_config, &refs->write_options);
/*
* It is somewhat unfortunate that we have to mirror the default block
@@ -719,15 +719,20 @@ static int reftable_ref_iterator_advance(struct ref_iterator *ref_iterator)
}
static int reftable_ref_iterator_seek(struct ref_iterator *ref_iterator,
- const char *prefix)
+ const char *refname, unsigned int flags)
{
struct reftable_ref_iterator *iter =
(struct reftable_ref_iterator *)ref_iterator;
- free(iter->prefix);
- iter->prefix = xstrdup_or_null(prefix);
- iter->prefix_len = prefix ? strlen(prefix) : 0;
- iter->err = reftable_iterator_seek_ref(&iter->iter, prefix);
+ /* Unset any previously set prefix */
+ FREE_AND_NULL(iter->prefix);
+ iter->prefix_len = 0;
+
+ if (flags & REF_ITERATOR_SEEK_SET_PREFIX) {
+ iter->prefix = xstrdup_or_null(refname);
+ iter->prefix_len = refname ? strlen(refname) : 0;
+ }
+ iter->err = reftable_iterator_seek_ref(&iter->iter, refname);
return iter->err;
}
@@ -839,7 +844,8 @@ static struct reftable_ref_iterator *ref_iterator_for_stack(struct reftable_ref_
if (ret)
goto done;
- ret = reftable_ref_iterator_seek(&iter->base, prefix);
+ ret = reftable_ref_iterator_seek(&iter->base, prefix,
+ REF_ITERATOR_SEEK_SET_PREFIX);
if (ret)
goto done;
@@ -2042,7 +2048,8 @@ static int reftable_reflog_iterator_advance(struct ref_iterator *ref_iterator)
}
static int reftable_reflog_iterator_seek(struct ref_iterator *ref_iterator UNUSED,
- const char *prefix UNUSED)
+ const char *refname UNUSED,
+ unsigned int flags UNUSED)
{
BUG("reftable reflog iterator cannot be seeked");
return -1;
diff --git a/remote-curl.c b/remote-curl.c
index 590b228..84f4694 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -285,7 +285,7 @@ static const struct git_hash_algo *detect_hash_algo(struct discovery *heads)
* back to SHA1, which may or may not be correct.
*/
if (!p)
- return &hash_algos[GIT_HASH_SHA1];
+ return &hash_algos[GIT_HASH_SHA1_LEGACY];
algo = hash_algo_by_length((p - heads->buf) / 2);
if (algo == GIT_HASH_UNKNOWN)
@@ -877,12 +877,12 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
headers = curl_slist_append(headers, rpc->hdr_content_type);
headers = curl_slist_append(headers, rpc->hdr_accept);
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
- curl_easy_setopt(slot->curl, CURLOPT_POST, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
+ curl_easy_setopt(slot->curl, CURLOPT_POST, 1L);
curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url);
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, NULL);
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, "0000");
- curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4);
+ curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4L);
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &buf);
@@ -970,8 +970,8 @@ static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_rece
slot = get_active_slot();
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
- curl_easy_setopt(slot->curl, CURLOPT_POST, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
+ curl_easy_setopt(slot->curl, CURLOPT_POST, 1L);
curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url);
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
@@ -1058,7 +1058,7 @@ static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_rece
rpc_in_data.check_pktline = stateless_connect;
memset(&rpc_in_data.pktline_state, 0, sizeof(rpc_in_data.pktline_state));
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &rpc_in_data);
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L);
rpc->any_written = 0;
diff --git a/remote.c b/remote.c
index 4099183..88f9917 100644
--- a/remote.c
+++ b/remote.c
@@ -12,7 +12,7 @@
#include "refs.h"
#include "refspec.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "commit.h"
#include "diff.h"
@@ -165,6 +165,9 @@ static void remote_clear(struct remote *remote)
strvec_clear(&remote->url);
strvec_clear(&remote->pushurl);
+ refspec_clear(&remote->push);
+ refspec_clear(&remote->fetch);
+
free((char *)remote->receivepack);
free((char *)remote->uploadpack);
FREE_AND_NULL(remote->http_proxy);
@@ -174,9 +177,15 @@ static void remote_clear(struct remote *remote)
static void add_merge(struct branch *branch, const char *name)
{
- ALLOC_GROW(branch->merge_name, branch->merge_nr + 1,
+ struct refspec_item *merge;
+
+ ALLOC_GROW(branch->merge, branch->merge_nr + 1,
branch->merge_alloc);
- branch->merge_name[branch->merge_nr++] = name;
+
+ merge = xcalloc(1, sizeof(*merge));
+ merge->src = xstrdup(name);
+
+ branch->merge[branch->merge_nr++] = merge;
}
struct branches_hash_key {
@@ -247,15 +256,23 @@ static struct branch *make_branch(struct remote_state *remote_state,
return ret;
}
+static void merge_clear(struct branch *branch)
+{
+ for (int i = 0; i < branch->merge_nr; i++) {
+ refspec_item_clear(branch->merge[i]);
+ free(branch->merge[i]);
+ }
+ FREE_AND_NULL(branch->merge);
+ branch->merge_nr = 0;
+}
+
static void branch_release(struct branch *branch)
{
free((char *)branch->name);
free((char *)branch->refname);
free(branch->remote_name);
free(branch->pushremote_name);
- for (int i = 0; i < branch->merge_nr; i++)
- refspec_item_clear(branch->merge[i]);
- free(branch->merge);
+ merge_clear(branch);
}
static struct rewrite *make_rewrite(struct rewrites *r,
@@ -317,11 +334,10 @@ static void warn_about_deprecated_remote_type(const char *type,
type, remote->name, remote->name, remote->name);
}
-static void read_remotes_file(struct remote_state *remote_state,
- struct remote *remote)
+static void read_remotes_file(struct repository *repo, struct remote *remote)
{
struct strbuf buf = STRBUF_INIT;
- FILE *f = fopen_or_warn(repo_git_path_append(the_repository, &buf,
+ FILE *f = fopen_or_warn(repo_git_path_append(repo, &buf,
"remotes/%s", remote->name), "r");
if (!f)
@@ -337,7 +353,7 @@ static void read_remotes_file(struct remote_state *remote_state,
strbuf_rtrim(&buf);
if (skip_prefix(buf.buf, "URL:", &v))
- add_url_alias(remote_state, remote,
+ add_url_alias(repo->remote_state, remote,
skip_spaces(v));
else if (skip_prefix(buf.buf, "Push:", &v))
refspec_append(&remote->push, skip_spaces(v));
@@ -350,12 +366,11 @@ static void read_remotes_file(struct remote_state *remote_state,
strbuf_release(&buf);
}
-static void read_branches_file(struct remote_state *remote_state,
- struct remote *remote)
+static void read_branches_file(struct repository *repo, struct remote *remote)
{
char *frag, *to_free = NULL;
struct strbuf buf = STRBUF_INIT;
- FILE *f = fopen_or_warn(repo_git_path_append(the_repository, &buf,
+ FILE *f = fopen_or_warn(repo_git_path_append(repo, &buf,
"branches/%s", remote->name), "r");
if (!f)
@@ -382,9 +397,9 @@ static void read_branches_file(struct remote_state *remote_state,
if (frag)
*(frag++) = '\0';
else
- frag = to_free = repo_default_branch_name(the_repository, 0);
+ frag = to_free = repo_default_branch_name(repo, 0);
- add_url_alias(remote_state, remote, buf.buf);
+ add_url_alias(repo->remote_state, remote, buf.buf);
refspec_appendf(&remote->fetch, "refs/heads/%s:refs/heads/%s",
frag, remote->name);
@@ -429,7 +444,7 @@ static int handle_config(const char *key, const char *value,
} else if (!strcmp(subkey, "merge")) {
if (!value)
return config_error_nonbool(key);
- add_merge(branch, xstrdup(value));
+ add_merge(branch, value);
}
return 0;
}
@@ -681,7 +696,7 @@ const char *pushremote_for_branch(struct branch *branch, int *explicit)
branch, explicit);
}
-static struct remote *remotes_remote_get(struct remote_state *remote_state,
+static struct remote *remotes_remote_get(struct repository *repo,
const char *name);
char *remote_ref_for_branch(struct branch *branch, int for_push)
@@ -692,7 +707,7 @@ char *remote_ref_for_branch(struct branch *branch, int for_push)
if (branch) {
if (!for_push) {
if (branch->merge_nr) {
- return xstrdup(branch->merge_name[0]);
+ return xstrdup(branch->merge[0]->src);
}
} else {
char *dst;
@@ -700,7 +715,7 @@ char *remote_ref_for_branch(struct branch *branch, int for_push)
the_repository->remote_state, branch,
NULL);
struct remote *remote = remotes_remote_get(
- the_repository->remote_state, remote_name);
+ the_repository, remote_name);
if (remote && remote->push.nr &&
(dst = apply_refspecs(&remote->push,
@@ -719,7 +734,7 @@ static void validate_remote_url(struct remote *remote)
struct strbuf redacted = STRBUF_INIT;
int warn_not_die;
- if (git_config_get_string_tmp("transfer.credentialsinurl", &value))
+ if (repo_config_get_string_tmp(the_repository, "transfer.credentialsinurl", &value))
return;
if (!strcmp("warn", value))
@@ -757,10 +772,11 @@ static void validate_remote_url(struct remote *remote)
}
static struct remote *
-remotes_remote_get_1(struct remote_state *remote_state, const char *name,
+remotes_remote_get_1(struct repository *repo, const char *name,
const char *(*get_default)(struct remote_state *,
struct branch *, int *))
{
+ struct remote_state *remote_state = repo->remote_state;
struct remote *ret;
int name_given = 0;
@@ -774,9 +790,9 @@ remotes_remote_get_1(struct remote_state *remote_state, const char *name,
#ifndef WITH_BREAKING_CHANGES
if (valid_remote_nick(name) && have_git_dir()) {
if (!valid_remote(ret))
- read_remotes_file(remote_state, ret);
+ read_remotes_file(repo, ret);
if (!valid_remote(ret))
- read_branches_file(remote_state, ret);
+ read_branches_file(repo, ret);
}
#endif /* WITH_BREAKING_CHANGES */
if (name_given && !valid_remote(ret))
@@ -790,35 +806,33 @@ remotes_remote_get_1(struct remote_state *remote_state, const char *name,
}
static inline struct remote *
-remotes_remote_get(struct remote_state *remote_state, const char *name)
+remotes_remote_get(struct repository *repo, const char *name)
{
- return remotes_remote_get_1(remote_state, name,
- remotes_remote_for_branch);
+ return remotes_remote_get_1(repo, name, remotes_remote_for_branch);
}
struct remote *remote_get(const char *name)
{
read_config(the_repository, 0);
- return remotes_remote_get(the_repository->remote_state, name);
+ return remotes_remote_get(the_repository, name);
}
struct remote *remote_get_early(const char *name)
{
read_config(the_repository, 1);
- return remotes_remote_get(the_repository->remote_state, name);
+ return remotes_remote_get(the_repository, name);
}
static inline struct remote *
-remotes_pushremote_get(struct remote_state *remote_state, const char *name)
+remotes_pushremote_get(struct repository *repo, const char *name)
{
- return remotes_remote_get_1(remote_state, name,
- remotes_pushremote_for_branch);
+ return remotes_remote_get_1(repo, name, remotes_pushremote_for_branch);
}
struct remote *pushremote_get(const char *name)
{
read_config(the_repository, 0);
- return remotes_pushremote_get(the_repository->remote_state, name);
+ return remotes_pushremote_get(the_repository, name);
}
int remote_is_configured(struct remote *remote, int in_repo)
@@ -1182,7 +1196,7 @@ static void show_push_unqualified_ref_name_error(const char *dst_value,
BUG("'%s' is not a valid object, "
"match_explicit_lhs() should catch this!",
matched_src_name);
- type = oid_object_info(the_repository, &oid, NULL);
+ type = odb_read_object_info(the_repository->objects, &oid, NULL);
if (type == OBJ_COMMIT) {
advise(_("The <src> part of the refspec is a commit object.\n"
"Did you mean to create a new branch by pushing to\n"
@@ -1412,7 +1426,8 @@ static void add_missing_tags(struct ref *src, struct ref **dst, struct ref ***ds
continue; /* not a tag */
if (string_list_has_string(&dst_tag, ref->name))
continue; /* they already have it */
- if (oid_object_info(the_repository, &ref->new_oid, NULL) != OBJ_TAG)
+ if (odb_read_object_info(the_repository->objects,
+ &ref->new_oid, NULL) != OBJ_TAG)
continue; /* be conservative */
item = string_list_append(&src_tag, ref->name);
item->util = ref;
@@ -1702,7 +1717,7 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
if (!reject_reason && !ref->deletion && !is_null_oid(&ref->old_oid)) {
if (starts_with(ref->name, "refs/tags/"))
reject_reason = REF_STATUS_REJECT_ALREADY_EXISTS;
- else if (!has_object(the_repository, &ref->old_oid, HAS_OBJECT_RECHECK_PACKED))
+ else if (!odb_has_object(the_repository->objects, &ref->old_oid, HAS_OBJECT_RECHECK_PACKED))
reject_reason = REF_STATUS_REJECT_FETCH_FIRST;
else if (!lookup_commit_reference_gently(the_repository, &ref->old_oid, 1) ||
!lookup_commit_reference_gently(the_repository, &ref->new_oid, 1))
@@ -1722,7 +1737,7 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
}
}
-static void set_merge(struct remote_state *remote_state, struct branch *ret)
+static void set_merge(struct repository *repo, struct branch *ret)
{
struct remote *remote;
char *ref;
@@ -1731,52 +1746,80 @@ static void set_merge(struct remote_state *remote_state, struct branch *ret)
if (!ret)
return; /* no branch */
- if (ret->merge)
+ if (ret->set_merge)
return; /* already run */
if (!ret->remote_name || !ret->merge_nr) {
/*
* no merge config; let's make sure we don't confuse callers
* with a non-zero merge_nr but a NULL merge
*/
- ret->merge_nr = 0;
+ merge_clear(ret);
return;
}
+ ret->set_merge = 1;
- remote = remotes_remote_get(remote_state, ret->remote_name);
+ remote = remotes_remote_get(repo, ret->remote_name);
- CALLOC_ARRAY(ret->merge, ret->merge_nr);
for (i = 0; i < ret->merge_nr; i++) {
- ret->merge[i] = xcalloc(1, sizeof(**ret->merge));
- ret->merge[i]->src = xstrdup(ret->merge_name[i]);
if (!remote_find_tracking(remote, ret->merge[i]) ||
strcmp(ret->remote_name, "."))
continue;
- if (repo_dwim_ref(the_repository, ret->merge_name[i],
- strlen(ret->merge_name[i]), &oid, &ref,
+ if (repo_dwim_ref(repo, ret->merge[i]->src,
+ strlen(ret->merge[i]->src), &oid, &ref,
0) == 1)
ret->merge[i]->dst = ref;
else
- ret->merge[i]->dst = xstrdup(ret->merge_name[i]);
+ ret->merge[i]->dst = xstrdup(ret->merge[i]->src);
}
}
+static struct branch *repo_branch_get(struct repository *repo, const char *name)
+{
+ struct branch *ret;
+
+ read_config(repo, 0);
+ if (!name || !*name || !strcmp(name, "HEAD"))
+ ret = repo->remote_state->current_branch;
+ else
+ ret = make_branch(repo->remote_state, name,
+ strlen(name));
+ set_merge(repo, ret);
+ return ret;
+}
+
struct branch *branch_get(const char *name)
{
- struct branch *ret;
+ return repo_branch_get(the_repository, name);
+}
- read_config(the_repository, 0);
- if (!name || !*name || !strcmp(name, "HEAD"))
- ret = the_repository->remote_state->current_branch;
- else
- ret = make_branch(the_repository->remote_state, name,
- strlen(name));
- set_merge(the_repository->remote_state, ret);
- return ret;
+const char *repo_default_remote(struct repository *repo)
+{
+ struct branch *branch;
+
+ read_config(repo, 0);
+ branch = repo_branch_get(repo, "HEAD");
+
+ return remotes_remote_for_branch(repo->remote_state, branch, NULL);
+}
+
+const char *repo_remote_from_url(struct repository *repo, const char *url)
+{
+ read_config(repo, 0);
+
+ for (int i = 0; i < repo->remote_state->remotes_nr; i++) {
+ struct remote *remote = repo->remote_state->remotes[i];
+ if (!remote)
+ continue;
+
+ if (remote_has_url(remote, url))
+ return remote->name;
+ }
+ return NULL;
}
int branch_has_merge_config(struct branch *branch)
{
- return branch && !!branch->merge;
+ return branch && branch->set_merge;
}
int branch_merge_matches(struct branch *branch,
@@ -1841,13 +1884,14 @@ static const char *tracking_for_push_dest(struct remote *remote,
return ret;
}
-static const char *branch_get_push_1(struct remote_state *remote_state,
+static const char *branch_get_push_1(struct repository *repo,
struct branch *branch, struct strbuf *err)
{
+ struct remote_state *remote_state = repo->remote_state;
struct remote *remote;
remote = remotes_remote_get(
- remote_state,
+ repo,
remotes_pushremote_for_branch(remote_state, branch, NULL));
if (!remote)
return error_buf(err,
@@ -1914,7 +1958,7 @@ const char *branch_get_push(struct branch *branch, struct strbuf *err)
if (!branch->push_tracking_ref)
branch->push_tracking_ref = branch_get_push_1(
- the_repository->remote_state, branch, err);
+ the_repository, branch, err);
return branch->push_tracking_ref;
}
diff --git a/remote.h b/remote.h
index 7e4943a..0ca399e 100644
--- a/remote.h
+++ b/remote.h
@@ -9,6 +9,7 @@
struct option;
struct transport_ls_refs_options;
+struct repository;
/**
* The API gives access to the configuration related to remotes. It handles
@@ -315,8 +316,8 @@ struct branch {
char *pushremote_name;
- /* An array of the "merge" lines in the configuration. */
- const char **merge_name;
+ /* True if set_merge() has been called to finalize the merge array */
+ int set_merge;
/**
* An array of the struct refspecs used for the merge lines. That is,
@@ -338,6 +339,9 @@ const char *remote_for_branch(struct branch *branch, int *explicit);
const char *pushremote_for_branch(struct branch *branch, int *explicit);
char *remote_ref_for_branch(struct branch *branch, int for_push);
+const char *repo_default_remote(struct repository *repo);
+const char *repo_remote_from_url(struct repository *repo, const char *url);
+
/* returns true if the given branch has merge configuration given. */
int branch_has_merge_config(struct branch *branch);
diff --git a/replace-object.c b/replace-object.c
index f8c5f68..3eae051 100644
--- a/replace-object.c
+++ b/replace-object.c
@@ -2,7 +2,7 @@
#include "gettext.h"
#include "hex.h"
#include "oidmap.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "refs.h"
#include "repository.h"
diff --git a/replace-object.h b/replace-object.h
index 3052e96..4c9f2a2 100644
--- a/replace-object.h
+++ b/replace-object.h
@@ -3,7 +3,7 @@
#include "oidmap.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
struct replace_object {
struct oidmap_entry original;
diff --git a/repo-settings.c b/repo-settings.c
index 4129f8f..195c24e 100644
--- a/repo-settings.c
+++ b/repo-settings.c
@@ -54,11 +54,13 @@ void prepare_repo_settings(struct repository *r)
r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING;
r->settings.pack_use_bitmap_boundary_traversal = 1;
r->settings.pack_use_multi_pack_reuse = 1;
+ r->settings.pack_use_path_walk = 1;
}
if (manyfiles) {
r->settings.index_version = 4;
r->settings.index_skip_hash = 1;
r->settings.core_untracked_cache = UNTRACKED_CACHE_WRITE;
+ r->settings.pack_use_path_walk = 1;
}
/* Commit graph config or default, does not cascade (simple) */
@@ -73,6 +75,7 @@ void prepare_repo_settings(struct repository *r)
/* Boolean config or default, does not cascade (simple) */
repo_cfg_bool(r, "pack.usesparse", &r->settings.pack_use_sparse, 1);
+ repo_cfg_bool(r, "pack.usepathwalk", &r->settings.pack_use_path_walk, 0);
repo_cfg_bool(r, "core.multipackindex", &r->settings.core_multi_pack_index, 1);
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 0);
repo_cfg_bool(r, "index.skiphash", &r->settings.index_skip_hash, r->settings.index_skip_hash);
diff --git a/repo-settings.h b/repo-settings.h
index 2bf24b2..d477885 100644
--- a/repo-settings.h
+++ b/repo-settings.h
@@ -56,6 +56,7 @@ struct repo_settings {
enum untracked_cache_setting core_untracked_cache;
int pack_use_sparse;
+ int pack_use_path_walk;
enum fetch_negotiation_setting fetch_negotiation_algorithm;
int core_multi_pack_index;
diff --git a/repository.c b/repository.c
index 9b3d666..ecd6911 100644
--- a/repository.c
+++ b/repository.c
@@ -1,7 +1,7 @@
#include "git-compat-util.h"
#include "abspath.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "config.h"
#include "object.h"
#include "lockfile.h"
@@ -52,7 +52,7 @@ static void set_default_hash_algo(struct repository *repo)
void initialize_repository(struct repository *repo)
{
- repo->objects = raw_object_store_new();
+ repo->objects = odb_new(repo);
repo->remote_state = remote_state_new();
repo->parsed_objects = parsed_object_pool_new(repo);
ALLOC_ARRAY(repo->index, 1);
@@ -107,9 +107,9 @@ const char *repo_get_common_dir(struct repository *repo)
const char *repo_get_object_directory(struct repository *repo)
{
- if (!repo->objects->odb)
+ if (!repo->objects->sources)
BUG("repository hasn't been set up");
- return repo->objects->odb->path;
+ return repo->objects->sources->path;
}
const char *repo_get_index_file(struct repository *repo)
@@ -165,14 +165,15 @@ void repo_set_gitdir(struct repository *repo,
repo_set_commondir(repo, o->commondir);
- if (!repo->objects->odb) {
- CALLOC_ARRAY(repo->objects->odb, 1);
- repo->objects->odb_tail = &repo->objects->odb->next;
+ if (!repo->objects->sources) {
+ CALLOC_ARRAY(repo->objects->sources, 1);
+ repo->objects->sources->odb = repo->objects;
+ repo->objects->sources_tail = &repo->objects->sources->next;
}
- expand_base_dir(&repo->objects->odb->path, o->object_dir,
+ expand_base_dir(&repo->objects->sources->path, o->object_dir,
repo->commondir, "objects");
- repo->objects->odb->disable_ref_updates = o->disable_ref_updates;
+ repo->objects->sources->disable_ref_updates = o->disable_ref_updates;
free(repo->objects->alternate_db);
repo->objects->alternate_db = xstrdup_or_null(o->alternate_db);
@@ -284,6 +285,7 @@ int repo_init(struct repository *repo,
repo_set_ref_storage_format(repo, format.ref_storage_format);
repo->repository_format_worktree_config = format.worktree_config;
repo->repository_format_relative_worktrees = format.relative_worktrees;
+ repo->repository_format_precious_objects = format.precious_objects;
/* take ownership of format.partial_clone */
repo->repository_format_partial_clone = format.partial_clone;
@@ -374,7 +376,7 @@ void repo_clear(struct repository *repo)
FREE_AND_NULL(repo->worktree);
FREE_AND_NULL(repo->submodule_prefix);
- raw_object_store_clear(repo->objects);
+ odb_clear(repo->objects);
FREE_AND_NULL(repo->objects);
parsed_object_pool_clear(repo->parsed_objects);
diff --git a/repository.h b/repository.h
index c4c92b2..042dc93 100644
--- a/repository.h
+++ b/repository.h
@@ -9,7 +9,7 @@ struct git_hash_algo;
struct index_state;
struct lock_file;
struct pathspec;
-struct raw_object_store;
+struct object_database;
struct submodule_cache;
struct promisor_remote_config;
struct remote_state;
@@ -20,6 +20,12 @@ enum ref_storage_format {
REF_STORAGE_FORMAT_REFTABLE,
};
+#ifdef WITH_BREAKING_CHANGES /* Git 3.0 */
+# define REF_STORAGE_FORMAT_DEFAULT REF_STORAGE_FORMAT_REFTABLE
+#else
+# define REF_STORAGE_FORMAT_DEFAULT REF_STORAGE_FORMAT_FILES
+#endif
+
struct repo_path_cache {
char *squash_msg;
char *merge_msg;
@@ -47,7 +53,7 @@ struct repository {
/*
* Holds any information related to accessing the raw object content.
*/
- struct raw_object_store *objects;
+ struct object_database *objects;
/*
* All objects in this repository that have been parsed. This structure
@@ -151,6 +157,7 @@ struct repository {
/* Configurations */
int repository_format_worktree_config;
int repository_format_relative_worktrees;
+ int repository_format_precious_objects;
/* Indicate if a repository has a different 'commondir' from 'gitdir' */
unsigned different_commondir:1;
diff --git a/rerere.c b/rerere.c
index 3cd37c5..6ec5596 100644
--- a/rerere.c
+++ b/rerere.c
@@ -5,6 +5,7 @@
#include "abspath.h"
#include "config.h"
#include "copy.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
@@ -18,7 +19,7 @@
#include "path.h"
#include "pathspec.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "strmap.h"
#define RESOLVED 0
@@ -877,9 +878,9 @@ static int do_plain_rerere(struct repository *r,
static void git_rerere_config(void)
{
- git_config_get_bool("rerere.enabled", &rerere_enabled);
- git_config_get_bool("rerere.autoupdate", &rerere_autoupdate);
- git_config(git_default_config, NULL);
+ repo_config_get_bool(the_repository, "rerere.enabled", &rerere_enabled);
+ repo_config_get_bool(the_repository, "rerere.autoupdate", &rerere_autoupdate);
+ repo_config(the_repository, git_default_config, NULL);
}
static GIT_PATH_FUNC(git_path_rr_cache, "rr-cache")
@@ -1000,9 +1001,8 @@ static int handle_cache(struct index_state *istate,
break;
i = ce_stage(ce) - 1;
if (!mmfile[i].ptr) {
- mmfile[i].ptr = repo_read_object_file(the_repository,
- &ce->oid, &type,
- &size);
+ mmfile[i].ptr = odb_read_object(the_repository->objects,
+ &ce->oid, &type, &size);
if (!mmfile[i].ptr)
die(_("unable to read %s"),
oid_to_hex(&ce->oid));
@@ -1248,7 +1248,7 @@ void rerere_gc(struct repository *r, struct string_list *rr)
&cutoff_resolve, now);
repo_config_get_expiry_in_days(the_repository, "gc.rerereunresolved",
&cutoff_noresolve, now);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
dir = opendir(repo_git_path_replace(the_repository, &buf, "rr-cache"));
if (!dir)
die_errno(_("unable to open rr-cache directory"));
diff --git a/revision.c b/revision.c
index 2c36a9c..18f300d 100644
--- a/revision.c
+++ b/revision.c
@@ -8,7 +8,7 @@
#include "hex.h"
#include "object-name.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "oidset.h"
#include "tag.h"
#include "blob.h"
@@ -50,8 +50,6 @@
#include "parse-options.h"
#include "wildmatch.h"
-volatile show_early_output_fn_t show_early_output;
-
static char *term_bad;
static char *term_good;
@@ -675,24 +673,48 @@ static int forbid_bloom_filters(struct pathspec *spec)
{
if (spec->has_wildcard)
return 1;
- if (spec->nr > 1)
- return 1;
if (spec->magic & ~PATHSPEC_LITERAL)
return 1;
- if (spec->nr && (spec->items[0].magic & ~PATHSPEC_LITERAL))
- return 1;
+ for (size_t nr = 0; nr < spec->nr; nr++)
+ if (spec->items[nr].magic & ~PATHSPEC_LITERAL)
+ return 1;
return 0;
}
+static void release_revisions_bloom_keyvecs(struct rev_info *revs);
+
+static int convert_pathspec_to_bloom_keyvec(struct bloom_keyvec **out,
+ const struct pathspec_item *pi,
+ const struct bloom_filter_settings *settings)
+{
+ char *path_alloc = NULL;
+ const char *path;
+ size_t len;
+ int res = 0;
+
+ /* remove single trailing slash from path, if needed */
+ if (pi->len > 0 && pi->match[pi->len - 1] == '/') {
+ path_alloc = xmemdupz(pi->match, pi->len - 1);
+ path = path_alloc;
+ } else
+ path = pi->match;
+
+ len = strlen(path);
+ if (!len) {
+ res = -1;
+ goto cleanup;
+ }
+
+ *out = bloom_keyvec_new(path, len, settings);
+
+cleanup:
+ free(path_alloc);
+ return res;
+}
+
static void prepare_to_use_bloom_filter(struct rev_info *revs)
{
- struct pathspec_item *pi;
- char *path_alloc = NULL;
- const char *path, *p;
- size_t len;
- int path_component_nr = 1;
-
if (!revs->commits)
return;
@@ -708,48 +730,14 @@ static void prepare_to_use_bloom_filter(struct rev_info *revs)
if (!revs->pruning.pathspec.nr)
return;
- pi = &revs->pruning.pathspec.items[0];
+ revs->bloom_keyvecs_nr = revs->pruning.pathspec.nr;
+ CALLOC_ARRAY(revs->bloom_keyvecs, revs->bloom_keyvecs_nr);
- /* remove single trailing slash from path, if needed */
- if (pi->len > 0 && pi->match[pi->len - 1] == '/') {
- path_alloc = xmemdupz(pi->match, pi->len - 1);
- path = path_alloc;
- } else
- path = pi->match;
-
- len = strlen(path);
- if (!len) {
- revs->bloom_filter_settings = NULL;
- free(path_alloc);
- return;
- }
-
- p = path;
- while (*p) {
- /*
- * At this point, the path is normalized to use Unix-style
- * path separators. This is required due to how the
- * changed-path Bloom filters store the paths.
- */
- if (*p == '/')
- path_component_nr++;
- p++;
- }
-
- revs->bloom_keys_nr = path_component_nr;
- ALLOC_ARRAY(revs->bloom_keys, revs->bloom_keys_nr);
-
- fill_bloom_key(path, len, &revs->bloom_keys[0],
- revs->bloom_filter_settings);
- path_component_nr = 1;
-
- p = path + len - 1;
- while (p > path) {
- if (*p == '/')
- fill_bloom_key(path, p - path,
- &revs->bloom_keys[path_component_nr++],
- revs->bloom_filter_settings);
- p--;
+ for (int i = 0; i < revs->pruning.pathspec.nr; i++) {
+ if (convert_pathspec_to_bloom_keyvec(&revs->bloom_keyvecs[i],
+ &revs->pruning.pathspec.items[i],
+ revs->bloom_filter_settings))
+ goto fail;
}
if (trace2_is_enabled() && !bloom_filter_atexit_registered) {
@@ -757,14 +745,18 @@ static void prepare_to_use_bloom_filter(struct rev_info *revs)
bloom_filter_atexit_registered = 1;
}
- free(path_alloc);
+ return;
+
+fail:
+ revs->bloom_filter_settings = NULL;
+ release_revisions_bloom_keyvecs(revs);
}
static int check_maybe_different_in_bloom_filter(struct rev_info *revs,
struct commit *commit)
{
struct bloom_filter *filter;
- int result = 1, j;
+ int result = 0;
if (!revs->repo->objects->commit_graph)
return -1;
@@ -779,10 +771,10 @@ static int check_maybe_different_in_bloom_filter(struct rev_info *revs,
return -1;
}
- for (j = 0; result && j < revs->bloom_keys_nr; j++) {
- result = bloom_filter_contains(filter,
- &revs->bloom_keys[j],
- revs->bloom_filter_settings);
+ for (size_t nr = 0; !result && nr < revs->bloom_keyvecs_nr; nr++) {
+ result = bloom_filter_contains_vec(filter,
+ revs->bloom_keyvecs[nr],
+ revs->bloom_filter_settings);
}
if (result)
@@ -823,7 +815,7 @@ static int rev_compare_tree(struct rev_info *revs,
return REV_TREE_SAME;
}
- if (revs->bloom_keys_nr && !nth_parent) {
+ if (revs->bloom_keyvecs_nr && !nth_parent) {
bloom_ret = check_maybe_different_in_bloom_filter(revs, commit);
if (bloom_ret == 0)
@@ -850,7 +842,7 @@ static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit,
if (!t1)
return 0;
- if (!nth_parent && revs->bloom_keys_nr) {
+ if (!nth_parent && revs->bloom_keyvecs_nr) {
bloom_ret = check_maybe_different_in_bloom_filter(revs, commit);
if (!bloom_ret)
return 1;
@@ -1479,7 +1471,6 @@ static int limit_list(struct rev_info *revs)
while (original_list) {
struct commit *commit = pop_commit(&original_list);
struct object *obj = &commit->object;
- show_early_output_fn_t show;
if (commit == interesting_cache)
interesting_cache = NULL;
@@ -1503,13 +1494,6 @@ static int limit_list(struct rev_info *revs)
continue;
date = commit->date;
p = &commit_list_insert(commit, p)->next;
-
- show = show_early_output;
- if (!show)
- continue;
-
- show(revs, newlist);
- show_early_output = NULL;
}
if (revs->cherry_pick || revs->cherry_mark)
cherry_pick_list(newlist, revs);
@@ -1636,7 +1620,7 @@ void exclude_hidden_refs(struct ref_exclusions *exclusions, const char *section)
cb.exclusions = exclusions;
cb.section = section;
- git_config(hide_refs_config, &cb);
+ repo_config(the_repository, hide_refs_config, &cb);
}
struct all_refs_cb {
@@ -1907,7 +1891,8 @@ static void add_alternate_refs_to_pending(struct rev_info *revs,
struct add_alternate_refs_data data;
data.revs = revs;
data.flags = flags;
- for_each_alternate_ref(add_one_alternate_ref, &data);
+ odb_for_each_alternate_ref(the_repository->objects,
+ add_one_alternate_ref, &data);
}
static int add_parents_only(struct rev_info *revs, const char *arg_, int flags,
@@ -2060,6 +2045,7 @@ static void prepare_show_merge(struct rev_info *revs)
parse_pathspec(&revs->prune_data, PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL,
PATHSPEC_PREFER_FULL | PATHSPEC_LITERAL_PATH, "", prune);
revs->limited = 1;
+ free(prune);
}
static int dotdot_missing(const char *arg, char *dotdot,
@@ -2441,13 +2427,6 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--author-date-order")) {
revs->sort_order = REV_SORT_BY_AUTHOR_DATE;
revs->topo_order = 1;
- } else if (!strcmp(arg, "--early-output")) {
- revs->early_output = 100;
- revs->topo_order = 1;
- } else if (skip_prefix(arg, "--early-output=", &optarg)) {
- if (strtoul_ui(optarg, 10, &revs->early_output) < 0)
- die("'%s': not a non-negative integer", optarg);
- revs->topo_order = 1;
} else if (!strcmp(arg, "--parents")) {
revs->rewrite_parents = 1;
revs->print_parents = 1;
@@ -3111,7 +3090,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
/* Pickaxe, diff-filter and rename following need diffs */
if ((revs->diffopt.pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) ||
- revs->diffopt.filter ||
+ revs->diffopt.filter || revs->diffopt.filter_not ||
revs->diffopt.flags.follow_renames)
revs->diff = 1;
@@ -3200,6 +3179,14 @@ static void release_revisions_mailmap(struct string_list *mailmap)
static void release_revisions_topo_walk_info(struct topo_walk_info *info);
+static void release_revisions_bloom_keyvecs(struct rev_info *revs)
+{
+ for (size_t nr = 0; nr < revs->bloom_keyvecs_nr; nr++)
+ bloom_keyvec_free(revs->bloom_keyvecs[nr]);
+ FREE_AND_NULL(revs->bloom_keyvecs);
+ revs->bloom_keyvecs_nr = 0;
+}
+
static void free_void_commit_list(void *list)
{
free_commit_list(list);
@@ -3228,11 +3215,7 @@ void release_revisions(struct rev_info *revs)
clear_decoration(&revs->treesame, free);
line_log_free(revs);
oidset_clear(&revs->missing_commits);
-
- for (int i = 0; i < revs->bloom_keys_nr; i++)
- clear_bloom_key(&revs->bloom_keys[i]);
- FREE_AND_NULL(revs->bloom_keys);
- revs->bloom_keys_nr = 0;
+ release_revisions_bloom_keyvecs(revs);
}
static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child)
diff --git a/revision.h b/revision.h
index 6d369cd..21e288c 100644
--- a/revision.h
+++ b/revision.h
@@ -62,7 +62,7 @@ struct repository;
struct rev_info;
struct string_list;
struct saved_parents;
-struct bloom_key;
+struct bloom_keyvec;
struct bloom_filter_settings;
struct option;
struct parse_opt_ctx_t;
@@ -160,8 +160,6 @@ struct rev_info {
/* topo-sort */
enum rev_sort_order sort_order;
- unsigned int early_output;
-
unsigned int ignore_missing:1,
ignore_missing_links:1;
@@ -360,8 +358,8 @@ struct rev_info {
/* Commit graph bloom filter fields */
/* The bloom filter key(s) for the pathspec */
- struct bloom_key *bloom_keys;
- int bloom_keys_nr;
+ struct bloom_keyvec **bloom_keyvecs;
+ int bloom_keyvecs_nr;
/*
* The bloom filter settings used to generate the key.
@@ -553,10 +551,4 @@ int rewrite_parents(struct rev_info *revs,
*/
struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit);
-/**
- * Global for the (undocumented) "--early-output" flag for "git log".
- */
-typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
-extern volatile show_early_output_fn_t show_early_output;
-
#endif
diff --git a/run-command.c b/run-command.c
index 8833b23..ed9575b 100644
--- a/run-command.c
+++ b/run-command.c
@@ -1817,7 +1817,7 @@ int prepare_auto_maintenance(int quiet, struct child_process *maint)
{
int enabled, auto_detach;
- if (!git_config_get_bool("maintenance.auto", &enabled) &&
+ if (!repo_config_get_bool(the_repository, "maintenance.auto", &enabled) &&
!enabled)
return 0;
@@ -1826,8 +1826,8 @@ int prepare_auto_maintenance(int quiet, struct child_process *maint)
* honoring `gc.autoDetach`. This is somewhat weird, but required to
* retain behaviour from when we used to run git-gc(1) here.
*/
- if (git_config_get_bool("maintenance.autodetach", &auto_detach) &&
- git_config_get_bool("gc.autodetach", &auto_detach))
+ if (repo_config_get_bool(the_repository, "maintenance.autodetach", &auto_detach) &&
+ repo_config_get_bool(the_repository, "gc.autodetach", &auto_detach))
auto_detach = 1;
maint->git_cmd = 1;
diff --git a/sane-ctype.h b/sane-ctype.h
index cbea1b2..4f476c4 100644
--- a/sane-ctype.h
+++ b/sane-ctype.h
@@ -1,6 +1,15 @@
#ifndef SANE_CTYPE_H
#define SANE_CTYPE_H
+/*
+ * Explicitly include <ctype.h> so that its header guards kick in from here on.
+ * This ensures that the file won't get included after "sane-ctype.h", as that
+ * would otherwise lead to a compiler error because the function declarations
+ * for `int isascii(int c)` et al would be mangled by our macros with the same
+ * name.
+ */
+#include <ctype.h>
+
/* Sane ctype - no locale, and works with signed chars */
#undef isascii
#undef isspace
diff --git a/scalar.c b/scalar.c
index 355baf7..4a373c1 100644
--- a/scalar.c
+++ b/scalar.c
@@ -101,9 +101,9 @@ static int set_scalar_config(const struct scalar_config *config, int reconfigure
int res;
if ((reconfigure && config->overwrite_on_reconfigure) ||
- git_config_get_string(config->key, &value)) {
+ repo_config_get_string(the_repository, config->key, &value)) {
trace2_data_string("scalar", the_repository, config->key, "created");
- res = git_config_set_gently(config->key, config->value);
+ res = repo_config_set_gently(the_repository, config->key, config->value);
} else {
trace2_data_string("scalar", the_repository, config->key, "exists");
res = 0;
@@ -170,6 +170,7 @@ static int set_recommended_config(int reconfigure)
{ "core.autoCRLF", "false" },
{ "core.safeCRLF", "false" },
{ "fetch.showForcedUpdates", "false" },
+ { "pack.usePathWalk", "true" },
{ NULL, NULL },
};
int i;
@@ -192,12 +193,12 @@ static int set_recommended_config(int reconfigure)
* The `log.excludeDecoration` setting is special because it allows
* for multiple values.
*/
- if (git_config_get_string("log.excludeDecoration", &value)) {
+ if (repo_config_get_string(the_repository, "log.excludeDecoration", &value)) {
trace2_data_string("scalar", the_repository,
"log.excludeDecoration", "created");
- if (git_config_set_multivar_gently("log.excludeDecoration",
- "refs/prefetch/*",
- CONFIG_REGEX_NONE, 0))
+ if (repo_config_set_multivar_gently(the_repository, "log.excludeDecoration",
+ "refs/prefetch/*",
+ CONFIG_REGEX_NONE, 0))
return error(_("could not configure "
"log.excludeDecoration"));
} else {
@@ -321,7 +322,7 @@ static int set_config(const char *fmt, ...)
value = strchr(buf.buf, '=');
if (value)
*(value++) = '\0';
- res = git_config_set_gently(buf.buf, value);
+ res = repo_config_set_gently(the_repository, buf.buf, value);
strbuf_release(&buf);
return res;
@@ -712,7 +713,7 @@ static int cmd_reconfigure(int argc, const char **argv)
maintenance_str);
}
- git_config(get_scalar_repos, &scalar_repos);
+ repo_config(the_repository, get_scalar_repos, &scalar_repos);
for (size_t i = 0; i < scalar_repos.nr; i++) {
int succeeded = 0;
@@ -762,7 +763,7 @@ static int cmd_reconfigure(int argc, const char **argv)
break;
}
- git_config_clear();
+ repo_config_clear(the_repository);
if (repo_init(&r, gitdir.buf, commondir.buf))
goto loop_end;
diff --git a/send-pack.c b/send-pack.c
index 86592ce..67d6987 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -4,7 +4,7 @@
#include "date.h"
#include "gettext.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "pkt-line.h"
#include "sideband.h"
#include "run-command.h"
@@ -45,7 +45,7 @@ int option_parse_push_signed(const struct option *opt,
static void feed_object(struct repository *r,
const struct object_id *oid, FILE *fh, int negative)
{
- if (negative && !has_object(r, oid, 0))
+ if (negative && !odb_has_object(r->objects, oid, 0))
return;
if (negative)
@@ -257,6 +257,13 @@ static int receive_status(struct repository *r,
refname);
continue;
}
+
+ /*
+ * Clients sending duplicate refs can cause the same value
+ * to be overridden, causing a memory leak.
+ */
+ free(hint->remote_status);
+
if (!strcmp(head, "ng")) {
hint->status = REF_STATUS_REMOTE_REJECT;
if (p)
diff --git a/sequencer.c b/sequencer.c
index 1ee0abb..aaf2e4d 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -13,7 +13,7 @@
#include "dir.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "object.h"
#include "pager.h"
#include "commit.h"
@@ -327,7 +327,7 @@ static int git_sequencer_config(const char *k, const char *v,
void sequencer_init_config(struct replay_opts *opts)
{
opts->default_msg_cleanup = COMMIT_MSG_CLEANUP_NONE;
- git_config(git_sequencer_config, opts);
+ repo_config(the_repository, git_sequencer_config, opts);
}
static inline int is_rebase_i(const struct replay_opts *opts)
@@ -2067,6 +2067,9 @@ static int update_squash_messages(struct repository *r,
const char *message, *body;
const char *encoding = get_commit_output_encoding();
+ if (!is_fixup(command))
+ BUG("not a FIXUP or SQUASH %d", command);
+
if (ctx->current_fixup_count > 0) {
struct strbuf header = STRBUF_INIT;
char *eol;
@@ -2134,8 +2137,7 @@ static int update_squash_messages(struct repository *r,
strbuf_addstr(&buf, "\n\n");
strbuf_add_commented_lines(&buf, body, strlen(body),
comment_line_str);
- } else
- return error(_("unknown command: %d"), command);
+ }
repo_unuse_commit_buffer(r, commit, message);
if (!res)
@@ -3648,57 +3650,57 @@ static int save_opts(struct replay_opts *opts)
int res = 0;
if (opts->no_commit)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.no-commit", NULL, "true");
if (opts->edit >= 0)
- res |= git_config_set_in_file_gently(opts_file, "options.edit", NULL,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file, "options.edit", NULL,
opts->edit ? "true" : "false");
if (opts->allow_empty)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.allow-empty", NULL, "true");
if (opts->allow_empty_message)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.allow-empty-message", NULL, "true");
if (opts->drop_redundant_commits)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.drop-redundant-commits", NULL, "true");
if (opts->keep_redundant_commits)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.keep-redundant-commits", NULL, "true");
if (opts->signoff)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.signoff", NULL, "true");
if (opts->record_origin)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.record-origin", NULL, "true");
if (opts->allow_ff)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.allow-ff", NULL, "true");
if (opts->mainline) {
struct strbuf buf = STRBUF_INIT;
strbuf_addf(&buf, "%d", opts->mainline);
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.mainline", NULL, buf.buf);
strbuf_release(&buf);
}
if (opts->strategy)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.strategy", NULL, opts->strategy);
if (opts->gpg_sign)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.gpg-sign", NULL, opts->gpg_sign);
for (size_t i = 0; i < opts->xopts.nr; i++)
- res |= git_config_set_multivar_in_file_gently(opts_file,
+ res |= repo_config_set_multivar_in_file_gently(the_repository, opts_file,
"options.strategy-option",
opts->xopts.v[i], "^$", NULL, 0);
if (opts->allow_rerere_auto)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.allow-rerere-auto", NULL,
opts->allow_rerere_auto == RERERE_AUTOUPDATE ?
"true" : "false");
if (opts->explicit_cleanup)
- res |= git_config_set_in_file_gently(opts_file,
+ res |= repo_config_set_in_file_gently(the_repository, opts_file,
"options.default-msg-cleanup", NULL,
describe_cleanup_mode(opts->default_msg_cleanup));
return res;
@@ -5503,9 +5505,8 @@ int sequencer_pick_revisions(struct repository *r,
if (!repo_get_oid(r, name, &oid)) {
if (!lookup_commit_reference_gently(r, &oid, 1)) {
- enum object_type type = oid_object_info(r,
- &oid,
- NULL);
+ enum object_type type = odb_read_object_info(r->objects,
+ &oid, NULL);
res = error(_("%s: can't cherry-pick a %s"),
name, type_name(type));
goto out;
@@ -5833,7 +5834,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
*cmd_reset = abbr ? "t" : "reset",
*cmd_merge = abbr ? "m" : "merge";
- git_config_get_int("rebase.maxlabellength", &state.max_label_length);
+ repo_config_get_int(the_repository, "rebase.maxlabellength", &state.max_label_length);
oidmap_init(&commit2todo, 0);
oidmap_init(&state.commit2label, 0);
@@ -6088,7 +6089,7 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
revs.topo_order = 1;
revs.pretty_given = 1;
- git_config_get_string("rebase.instructionFormat", &format);
+ repo_config_get_string(the_repository, "rebase.instructionFormat", &format);
if (!format || !*format) {
free(format);
format = xstrdup("# %s");
diff --git a/serve.c b/serve.c
index e3ccf15..53ecab3 100644
--- a/serve.c
+++ b/serve.c
@@ -14,7 +14,7 @@
static int advertise_sid = -1;
static int advertise_object_info = -1;
-static int client_hash_algo = GIT_HASH_SHA1;
+static int client_hash_algo = GIT_HASH_SHA1_LEGACY;
static int always_advertise(struct repository *r UNUSED,
struct strbuf *value UNUSED)
diff --git a/server-info.c b/server-info.c
index d6cd20a..9bb30d9 100644
--- a/server-info.c
+++ b/server-info.c
@@ -11,7 +11,7 @@
#include "packfile.h"
#include "path.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "server-info.h"
#include "strbuf.h"
#include "tempfile.h"
diff --git a/setup.c b/setup.c
index f93bd6a..98ddbf3 100644
--- a/setup.c
+++ b/setup.c
@@ -753,7 +753,8 @@ static int check_repository_format_gently(const char *gitdir, struct repository_
die("%s", err.buf);
}
- repository_format_precious_objects = candidate->precious_objects;
+ the_repository->repository_format_precious_objects = candidate->precious_objects;
+
string_list_clear(&candidate->unknown_extensions, 0);
string_list_clear(&candidate->v1_only_extensions, 0);
@@ -814,7 +815,7 @@ int upgrade_repository_format(int target_version)
}
strbuf_addf(&repo_version, "%d", target_version);
- git_config_set("core.repositoryformatversion", repo_version.buf);
+ repo_config_set(the_repository, "core.repositoryformatversion", repo_version.buf);
ret = 1;
@@ -835,9 +836,12 @@ static void init_repository_format(struct repository_format *format)
int read_repository_format(struct repository_format *format, const char *path)
{
clear_repository_format(format);
+ format->hash_algo = GIT_HASH_SHA1_LEGACY;
git_config_from_file(check_repo_format, path, format);
- if (format->version == -1)
+ if (format->version == -1) {
clear_repository_format(format);
+ format->hash_algo = GIT_HASH_SHA1_LEGACY;
+ }
return format->version;
}
@@ -1737,7 +1741,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
* configuration (including the per-repo config file that we
* ignored previously).
*/
- git_config_clear();
+ repo_config_clear(the_repository);
/*
* Let's assume that we are in a git repository.
@@ -1864,6 +1868,8 @@ const char *setup_git_directory_gently(int *nongit_ok)
the_repository->repository_format_partial_clone =
repo_fmt.partial_clone;
repo_fmt.partial_clone = NULL;
+ the_repository->repository_format_precious_objects =
+ repo_fmt.precious_objects;
}
}
/*
@@ -1871,7 +1877,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
* the core.precomposeunicode configuration, this
* has to happen after the above block that finds
* out where the repository is, i.e. a preparation
- * for calling git_config_get_bool().
+ * for calling repo_config_get_bool().
*/
if (prefix) {
prefix = precompose_string_if_needed(prefix);
@@ -2222,21 +2228,21 @@ void initialize_repository_version(int hash_algo,
* version will get adjusted by git-clone(1) once it has learned about
* the remote repository's format.
*/
- if (hash_algo != GIT_HASH_SHA1 ||
+ if (hash_algo != GIT_HASH_SHA1_LEGACY ||
ref_storage_format != REF_STORAGE_FORMAT_FILES)
target_version = GIT_REPO_VERSION_READ;
- if (hash_algo != GIT_HASH_SHA1 && hash_algo != GIT_HASH_UNKNOWN)
- git_config_set("extensions.objectformat",
- hash_algos[hash_algo].name);
+ if (hash_algo != GIT_HASH_SHA1_LEGACY && hash_algo != GIT_HASH_UNKNOWN)
+ repo_config_set(the_repository, "extensions.objectformat",
+ hash_algos[hash_algo].name);
else if (reinit)
- git_config_set_gently("extensions.objectformat", NULL);
+ repo_config_set_gently(the_repository, "extensions.objectformat", NULL);
if (ref_storage_format != REF_STORAGE_FORMAT_FILES)
- git_config_set("extensions.refstorage",
- ref_storage_format_to_name(ref_storage_format));
+ repo_config_set(the_repository, "extensions.refstorage",
+ ref_storage_format_to_name(ref_storage_format));
else if (reinit)
- git_config_set_gently("extensions.refstorage", NULL);
+ repo_config_set_gently(the_repository, "extensions.refstorage", NULL);
if (reinit) {
struct strbuf config = STRBUF_INIT;
@@ -2253,7 +2259,7 @@ void initialize_repository_version(int hash_algo,
}
strbuf_addf(&repo_version, "%d", target_version);
- git_config_set("core.repositoryformatversion", repo_version.buf);
+ repo_config_set(the_repository, "core.repositoryformatversion", repo_version.buf);
strbuf_release(&repo_version);
}
@@ -2331,9 +2337,9 @@ static int create_default_files(const char *template_path,
* disk).
*/
copy_templates(template_path);
- git_config_clear();
+ repo_config_clear(the_repository);
repo_settings_reset_shared_repository(the_repository);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
reinit = is_reinit();
@@ -2369,17 +2375,17 @@ static int create_default_files(const char *template_path,
if (filemode && !reinit && (st1.st_mode & S_IXUSR))
filemode = 0;
}
- git_config_set("core.filemode", filemode ? "true" : "false");
+ repo_config_set(the_repository, "core.filemode", filemode ? "true" : "false");
if (is_bare_repository())
- git_config_set("core.bare", "true");
+ repo_config_set(the_repository, "core.bare", "true");
else {
- git_config_set("core.bare", "false");
+ repo_config_set(the_repository, "core.bare", "false");
/* allow template config file to override the default */
if (repo_settings_get_log_all_ref_updates(the_repository) == LOG_REFS_UNSET)
- git_config_set("core.logallrefupdates", "true");
+ repo_config_set(the_repository, "core.logallrefupdates", "true");
if (needs_work_tree_config(original_git_dir, work_tree))
- git_config_set("core.worktree", work_tree);
+ repo_config_set(the_repository, "core.worktree", work_tree);
}
if (!reinit) {
@@ -2392,12 +2398,12 @@ static int create_default_files(const char *template_path,
S_ISLNK(st1.st_mode))
unlink(path.buf); /* good */
else
- git_config_set("core.symlinks", "false");
+ repo_config_set(the_repository, "core.symlinks", "false");
/* Check if the filesystem is case-insensitive */
repo_git_path_replace(the_repository, &path, "CoNfIg");
if (!access(path.buf, F_OK))
- git_config_set("core.ignorecase", "true");
+ repo_config_set(the_repository, "core.ignorecase", "true");
probe_utf8_pathname_composition();
}
@@ -2481,6 +2487,18 @@ static int read_default_format_config(const char *key, const char *value,
goto out;
}
+ /*
+ * Enable the reftable format when "features.experimental" is enabled.
+ * "init.defaultRefFormat" takes precedence over this setting.
+ */
+ if (!strcmp(key, "feature.experimental") &&
+ cfg->ref_format == REF_STORAGE_FORMAT_UNKNOWN &&
+ git_config_bool(key, value)) {
+ cfg->ref_format = REF_STORAGE_FORMAT_REFTABLE;
+ ret = 0;
+ goto out;
+ }
+
ret = 0;
out:
free(str);
@@ -2541,6 +2559,8 @@ static void repository_format_configure(struct repository_format *repo_fmt,
repo_fmt->ref_storage_format = ref_format;
} else if (cfg.ref_format != REF_STORAGE_FORMAT_UNKNOWN) {
repo_fmt->ref_storage_format = cfg.ref_format;
+ } else {
+ repo_fmt->ref_storage_format = REF_STORAGE_FORMAT_DEFAULT;
}
repo_set_ref_storage_format(the_repository, repo_fmt->ref_storage_format);
}
@@ -2590,7 +2610,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
* have set up the repository format such that we can evaluate
* includeIf conditions correctly in the case of re-initialization.
*/
- git_config(platform_core_config, NULL);
+ repo_config(the_repository, platform_core_config, NULL);
safe_create_dir(the_repository, git_dir, 0);
@@ -2619,8 +2639,8 @@ int init_db(const char *git_dir, const char *real_git_dir,
xsnprintf(buf, sizeof(buf), "%d", OLD_PERM_EVERYBODY);
else
BUG("invalid value for shared_repository");
- git_config_set("core.sharedrepository", buf);
- git_config_set("receive.denyNonFastforwards", "true");
+ repo_config_set(the_repository, "core.sharedrepository", buf);
+ repo_config_set(the_repository, "receive.denyNonFastforwards", "true");
}
if (!(flags & INIT_DB_QUIET)) {
diff --git a/setup.h b/setup.h
index 18dc3b7..8522fa8 100644
--- a/setup.h
+++ b/setup.h
@@ -149,7 +149,7 @@ struct repository_format {
{ \
.version = -1, \
.is_bare = -1, \
- .hash_algo = GIT_HASH_SHA1, \
+ .hash_algo = GIT_HASH_DEFAULT, \
.ref_storage_format = REF_STORAGE_FORMAT_FILES, \
.unknown_extensions = STRING_LIST_INIT_DUP, \
.v1_only_extensions = STRING_LIST_INIT_DUP, \
diff --git a/shallow.c b/shallow.c
index faeeeb4..ef3adb6 100644
--- a/shallow.c
+++ b/shallow.c
@@ -5,7 +5,7 @@
#include "repository.h"
#include "tempfile.h"
#include "lockfile.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "tag.h"
#include "pkt-line.h"
@@ -310,8 +310,8 @@ static int write_one_shallow(const struct commit_graft *graft, void *cb_data)
if (graft->nr_parent != -1)
return 0;
if (data->flags & QUICK) {
- if (!has_object(the_repository, &graft->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (!odb_has_object(the_repository->objects, &graft->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
return 0;
} else if (data->flags & SEEN_ONLY) {
struct commit *c = lookup_commit(the_repository, &graft->oid);
@@ -477,8 +477,8 @@ void prepare_shallow_info(struct shallow_info *info, struct oid_array *sa)
ALLOC_ARRAY(info->ours, sa->nr);
ALLOC_ARRAY(info->theirs, sa->nr);
for (size_t i = 0; i < sa->nr; i++) {
- if (has_object(the_repository, sa->oid + i,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ if (odb_has_object(the_repository->objects, sa->oid + i,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
struct commit_graft *graft;
graft = lookup_commit_graft(the_repository,
&sa->oid[i]);
@@ -515,8 +515,8 @@ void remove_nonexistent_theirs_shallow(struct shallow_info *info)
for (i = dst = 0; i < info->nr_theirs; i++) {
if (i != dst)
info->theirs[dst] = info->theirs[i];
- if (has_object(the_repository, oid + info->theirs[i],
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, oid + info->theirs[i],
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
dst++;
}
info->nr_theirs = dst;
diff --git a/sideband.c b/sideband.c
index 251e961..8f15b98 100644
--- a/sideband.c
+++ b/sideband.c
@@ -39,9 +39,9 @@ static int use_sideband_colors(void)
if (use_sideband_colors_cached >= 0)
return use_sideband_colors_cached;
- if (!git_config_get_string_tmp(key, &value))
+ if (!repo_config_get_string_tmp(the_repository, key, &value))
use_sideband_colors_cached = git_config_colorbool(key, value);
- else if (!git_config_get_string_tmp("color.ui", &value))
+ else if (!repo_config_get_string_tmp(the_repository, "color.ui", &value))
use_sideband_colors_cached = git_config_colorbool("color.ui", value);
else
use_sideband_colors_cached = GIT_COLOR_AUTO;
@@ -49,7 +49,7 @@ static int use_sideband_colors(void)
for (i = 0; i < ARRAY_SIZE(keywords); i++) {
strbuf_reset(&sb);
strbuf_addf(&sb, "%s.%s", key, keywords[i].keyword);
- if (git_config_get_string_tmp(sb.buf, &value))
+ if (repo_config_get_string_tmp(the_repository, sb.buf, &value))
continue;
color_parse(value, keywords[i].color);
}
diff --git a/strbuf.c b/strbuf.c
index f30fdc6..6c3851a 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -8,55 +8,55 @@
#include "utf8.h"
#include "date.h"
-int starts_with(const char *str, const char *prefix)
+bool starts_with(const char *str, const char *prefix)
{
for (; ; str++, prefix++)
if (!*prefix)
- return 1;
+ return true;
else if (*str != *prefix)
- return 0;
+ return false;
}
-int istarts_with(const char *str, const char *prefix)
+bool istarts_with(const char *str, const char *prefix)
{
for (; ; str++, prefix++)
if (!*prefix)
- return 1;
+ return true;
else if (tolower(*str) != tolower(*prefix))
- return 0;
+ return false;
}
-int starts_with_mem(const char *str, size_t len, const char *prefix)
+bool starts_with_mem(const char *str, size_t len, const char *prefix)
{
const char *end = str + len;
for (; ; str++, prefix++) {
if (!*prefix)
- return 1;
+ return true;
else if (str == end || *str != *prefix)
- return 0;
+ return false;
}
}
-int skip_to_optional_arg_default(const char *str, const char *prefix,
+bool skip_to_optional_arg_default(const char *str, const char *prefix,
const char **arg, const char *def)
{
const char *p;
if (!skip_prefix(str, prefix, &p))
- return 0;
+ return false;
if (!*p) {
if (arg)
*arg = def;
- return 1;
+ return true;
}
if (*p != '=')
- return 0;
+ return false;
if (arg)
*arg = p + 1;
- return 1;
+ return true;
}
/*
diff --git a/strbuf.h b/strbuf.h
index 6362777..a580ac6 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -660,9 +660,9 @@ char *xstrvfmt(const char *fmt, va_list ap);
__attribute__((format (printf, 1, 2)))
char *xstrfmt(const char *fmt, ...);
-int starts_with(const char *str, const char *prefix);
-int istarts_with(const char *str, const char *prefix);
-int starts_with_mem(const char *str, size_t len, const char *prefix);
+bool starts_with(const char *str, const char *prefix);
+bool istarts_with(const char *str, const char *prefix);
+bool starts_with_mem(const char *str, size_t len, const char *prefix);
/*
* If the string "str" is the same as the string in "prefix", then the "arg"
@@ -678,16 +678,16 @@ int starts_with_mem(const char *str, size_t len, const char *prefix);
* can be used instead of !strcmp(arg, "--key") and then
* skip_prefix(arg, "--key=", &arg) to parse such an option.
*/
-int skip_to_optional_arg_default(const char *str, const char *prefix,
+bool skip_to_optional_arg_default(const char *str, const char *prefix,
const char **arg, const char *def);
-static inline int skip_to_optional_arg(const char *str, const char *prefix,
+static inline bool skip_to_optional_arg(const char *str, const char *prefix,
const char **arg)
{
return skip_to_optional_arg_default(str, prefix, arg, "");
}
-static inline int ends_with(const char *str, const char *suffix)
+static inline bool ends_with(const char *str, const char *suffix)
{
size_t len;
return strip_suffix(str, suffix, &len);
diff --git a/streaming.c b/streaming.c
index 6d6512e..4b13827 100644
--- a/streaming.c
+++ b/streaming.c
@@ -10,7 +10,7 @@
#include "streaming.h"
#include "repository.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "replace-object.h"
#include "packfile.h"
@@ -44,7 +44,7 @@ struct git_istream {
union {
struct {
- char *buf; /* from oid_object_info_extended() */
+ char *buf; /* from odb_read_object_info_extended() */
unsigned long read_ptr;
} incore;
@@ -403,8 +403,8 @@ static int open_istream_incore(struct git_istream *st, struct repository *r,
oi.typep = type;
oi.sizep = &st->size;
oi.contentp = (void **)&st->u.incore.buf;
- return oid_object_info_extended(r, oid, &oi,
- OBJECT_INFO_DIE_IF_CORRUPT);
+ return odb_read_object_info_extended(r->objects, oid, &oi,
+ OBJECT_INFO_DIE_IF_CORRUPT);
}
/*****************************************************************************
@@ -422,7 +422,7 @@ static int istream_source(struct git_istream *st,
oi.typep = type;
oi.sizep = &size;
- status = oid_object_info_extended(r, oid, &oi, 0);
+ status = odb_read_object_info_extended(r->objects, oid, &oi, 0);
if (status < 0)
return status;
diff --git a/string-list.c b/string-list.c
index bf061fe..53faaa8 100644
--- a/string-list.c
+++ b/string-list.c
@@ -1,5 +1,3 @@
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
#include "git-compat-util.h"
#include "string-list.h"
@@ -17,19 +15,19 @@ void string_list_init_dup(struct string_list *list)
/* if there is no exact match, point to the index where the entry could be
* inserted */
-static int get_entry_index(const struct string_list *list, const char *string,
- int *exact_match)
+static size_t get_entry_index(const struct string_list *list, const char *string,
+ int *exact_match)
{
- int left = -1, right = list->nr;
+ size_t left = 0, right = list->nr;
compare_strings_fn cmp = list->cmp ? list->cmp : strcmp;
- while (left + 1 < right) {
- int middle = left + (right - left) / 2;
+ while (left < right) {
+ size_t middle = left + (right - left) / 2;
int compare = cmp(string, list->items[middle].string);
if (compare < 0)
right = middle;
else if (compare > 0)
- left = middle;
+ left = middle + 1;
else {
*exact_match = 1;
return middle;
@@ -40,14 +38,13 @@ static int get_entry_index(const struct string_list *list, const char *string,
return right;
}
-/* returns -1-index if already exists */
-static int add_entry(int insert_at, struct string_list *list, const char *string)
+static size_t add_entry(struct string_list *list, const char *string)
{
int exact_match = 0;
- int index = insert_at != -1 ? insert_at : get_entry_index(list, string, &exact_match);
+ size_t index = get_entry_index(list, string, &exact_match);
if (exact_match)
- return -1 - index;
+ return index;
ALLOC_GROW(list->items, list->nr+1, list->alloc);
if (index < list->nr)
@@ -63,10 +60,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
{
- int index = add_entry(-1, list, string);
-
- if (index < 0)
- index = -1 - index;
+ size_t index = add_entry(list, string);
return list->items + index;
}
@@ -116,9 +110,9 @@ struct string_list_item *string_list_lookup(struct string_list *list, const char
void string_list_remove_duplicates(struct string_list *list, int free_util)
{
if (list->nr > 1) {
- int src, dst;
+ size_t dst = 1;
compare_strings_fn cmp = list->cmp ? list->cmp : strcmp;
- for (src = dst = 1; src < list->nr; src++) {
+ for (size_t src = 1; src < list->nr; src++) {
if (!cmp(list->items[dst - 1].string, list->items[src].string)) {
if (list->strdup_strings)
free(list->items[src].string);
@@ -134,8 +128,8 @@ void string_list_remove_duplicates(struct string_list *list, int free_util)
int for_each_string_list(struct string_list *list,
string_list_each_func_t fn, void *cb_data)
{
- int i, ret = 0;
- for (i = 0; i < list->nr; i++)
+ int ret = 0;
+ for (size_t i = 0; i < list->nr; i++)
if ((ret = fn(&list->items[i], cb_data)))
break;
return ret;
@@ -144,8 +138,8 @@ int for_each_string_list(struct string_list *list,
void filter_string_list(struct string_list *list, int free_util,
string_list_each_func_t want, void *cb_data)
{
- int src, dst = 0;
- for (src = 0; src < list->nr; src++) {
+ size_t dst = 0;
+ for (size_t src = 0; src < list->nr; src++) {
if (want(&list->items[src], cb_data)) {
list->items[dst++] = list->items[src];
} else {
@@ -171,13 +165,12 @@ void string_list_remove_empty_items(struct string_list *list, int free_util)
void string_list_clear(struct string_list *list, int free_util)
{
if (list->items) {
- int i;
if (list->strdup_strings) {
- for (i = 0; i < list->nr; i++)
+ for (size_t i = 0; i < list->nr; i++)
free(list->items[i].string);
}
if (free_util) {
- for (i = 0; i < list->nr; i++)
+ for (size_t i = 0; i < list->nr; i++)
free(list->items[i].util);
}
free(list->items);
@@ -189,13 +182,12 @@ void string_list_clear(struct string_list *list, int free_util)
void string_list_clear_func(struct string_list *list, string_list_clear_func_t clearfunc)
{
if (list->items) {
- int i;
if (clearfunc) {
- for (i = 0; i < list->nr; i++)
+ for (size_t i = 0; i < list->nr; i++)
clearfunc(list->items[i].util, list->items[i].string);
}
if (list->strdup_strings) {
- for (i = 0; i < list->nr; i++)
+ for (size_t i = 0; i < list->nr; i++)
free(list->items[i].string);
}
free(list->items);
diff --git a/sub-process.h b/sub-process.h
index 6a61638..bfc3959 100644
--- a/sub-process.h
+++ b/sub-process.h
@@ -73,7 +73,7 @@ static inline struct child_process *subprocess_get_child_process(
/*
* Perform the version and capability negotiation as described in the
- * "Handshake" section of long-running-process-protocol.txt using the
+ * "Handshake" section of long-running-process-protocol.adoc using the
* given requested versions and capabilities. The "versions" and "capabilities"
* parameters are arrays terminated by a 0 or blank struct.
*
diff --git a/submodule-config.c b/submodule-config.c
index 8630e27..1f19fe2 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -13,7 +13,7 @@
#include "submodule.h"
#include "strbuf.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "parse-options.h"
#include "thread-utils.h"
#include "tree-walk.h"
@@ -235,18 +235,6 @@ int check_submodule_name(const char *name)
return 0;
}
-static int starts_with_dot_slash(const char *const path)
-{
- return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_SLASH |
- PATH_MATCH_XPLATFORM);
-}
-
-static int starts_with_dot_dot_slash(const char *const path)
-{
- return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_DOT_SLASH |
- PATH_MATCH_XPLATFORM);
-}
-
static int submodule_url_is_relative(const char *url)
{
return starts_with_dot_slash(url) || starts_with_dot_dot_slash(url);
@@ -743,8 +731,8 @@ static const struct submodule *config_from(struct submodule_cache *cache,
if (submodule)
goto out;
- config = repo_read_object_file(the_repository, &oid, &type,
- &config_size);
+ config = odb_read_object(the_repository->objects, &oid,
+ &type, &config_size);
if (!config || type != OBJ_BLOB)
goto out;
@@ -810,7 +798,8 @@ static void config_from_gitmodules(config_fn_t fn, struct repository *repo, void
repo_get_oid(repo, GITMODULES_HEAD, &oid) >= 0) {
config_source.blob = oidstr = xstrdup(oid_to_hex(&oid));
if (repo != the_repository)
- add_submodule_odb_by_path(repo->objects->odb->path);
+ odb_add_submodule_source_by_path(the_repository->objects,
+ repo->objects->sources->path);
} else {
goto out;
}
@@ -994,7 +983,7 @@ int config_set_in_gitmodules_file_gently(const char *key, const char *value)
{
int ret;
- ret = git_config_set_in_file_gently(GITMODULES_FILE, key, NULL, value);
+ ret = repo_config_set_in_file_gently(the_repository, GITMODULES_FILE, key, NULL, value);
if (ret < 0)
/* Maybe the user already did that, don't error out here */
warning(_("Could not update .gitmodules entry %s"), key);
diff --git a/submodule.c b/submodule.c
index ead3fb5..fff3c75 100644
--- a/submodule.c
+++ b/submodule.c
@@ -27,11 +27,10 @@
#include "parse-options.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit-reach.h"
#include "read-cache-ll.h"
#include "setup.h"
-#include "trace2.h"
static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF;
static int initialized_fetch_ref_tips;
@@ -176,30 +175,6 @@ void stage_updated_gitmodules(struct index_state *istate)
die(_("staging updated .gitmodules failed"));
}
-static struct string_list added_submodule_odb_paths = STRING_LIST_INIT_DUP;
-
-void add_submodule_odb_by_path(const char *path)
-{
- string_list_insert(&added_submodule_odb_paths, path);
-}
-
-int register_all_submodule_odb_as_alternates(void)
-{
- int i;
- int ret = added_submodule_odb_paths.nr;
-
- for (i = 0; i < added_submodule_odb_paths.nr; i++)
- add_to_alternates_memory(added_submodule_odb_paths.items[i].string);
- if (ret) {
- string_list_clear(&added_submodule_odb_paths, 0);
- trace2_data_intmax("submodule", the_repository,
- "register_all_submodule_odb_as_alternates/registered", ret);
- if (git_env_bool("GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB", 0))
- BUG("register_all_submodule_odb_as_alternates() called");
- }
- return ret;
-}
-
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path)
{
@@ -993,7 +968,7 @@ static int check_has_commit(const struct object_id *oid, void *data)
return 0;
}
- type = oid_object_info(&subrepo, oid, NULL);
+ type = odb_read_object_info(subrepo.objects, oid, NULL);
switch (type) {
case OBJ_COMMIT:
@@ -1777,8 +1752,7 @@ static int fetch_start_failure(struct strbuf *err UNUSED,
static int commit_missing_in_sub(const struct object_id *oid, void *data)
{
struct repository *subrepo = data;
-
- enum object_type type = oid_object_info(subrepo, oid, NULL);
+ enum object_type type = odb_read_object_info(subrepo->objects, oid, NULL);
return type != OBJ_COMMIT;
}
@@ -2084,7 +2058,7 @@ void submodule_unset_core_worktree(const struct submodule *sub)
submodule_name_to_gitdir(&config_path, the_repository, sub->name);
strbuf_addstr(&config_path, "/config");
- if (git_config_set_in_file_gently(config_path.buf, "core.worktree", NULL, NULL))
+ if (repo_config_set_in_file_gently(the_repository, config_path.buf, "core.worktree", NULL, NULL))
warning(_("Could not unset core.worktree setting in submodule '%s'"),
sub->path);
diff --git a/submodule.h b/submodule.h
index db980c1..b10e16e 100644
--- a/submodule.h
+++ b/submodule.h
@@ -105,15 +105,6 @@ int submodule_uses_gitfile(const char *path);
int bad_to_remove_submodule(const char *path, unsigned flags);
/*
- * Call add_submodule_odb_by_path() to add the submodule at the given
- * path to a list. When register_all_submodule_odb_as_alternates() is
- * called, the object stores of all submodules in that list will be
- * added as alternates in the_repository.
- */
-void add_submodule_odb_by_path(const char *path);
-int register_all_submodule_odb_as_alternates(void);
-
-/*
* Checks if there are submodule changes in a..b. If a is the null OID,
* checks b and all its ancestors instead.
*/
diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap
index 2e0427d..0e9292f 100644
--- a/subprojects/expat.wrap
+++ b/subprojects/expat.wrap
@@ -1,13 +1,13 @@
[wrap-file]
-directory = expat-2.6.3
-source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz
-source_filename = expat-2.6.3.tar.bz2
-source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc
-patch_filename = expat_2.6.3-1_patch.zip
-patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch
-patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1
-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2
-wrapdb_version = 2.6.3-1
+directory = expat-2.7.1
+source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz
+source_filename = expat-2.7.1.tar.bz2
+source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30
+patch_filename = expat_2.7.1-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch
+patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2
+wrapdb_version = 2.7.1-1
[provide]
expat = expat_dep
diff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap
index 7e18447..f45c968 100644
--- a/subprojects/pcre2.wrap
+++ b/subprojects/pcre2.wrap
@@ -1,13 +1,13 @@
[wrap-file]
-directory = pcre2-10.44
-source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2
-source_filename = pcre2-10.44.tar.bz2
-source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96
-patch_filename = pcre2_10.44-2_patch.zip
-patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch
-patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009
-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2
-wrapdb_version = 10.44-2
+directory = pcre2-10.45
+source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2
+source_filename = pcre2-10.45.tar.bz2
+source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4
+patch_filename = pcre2_10.45-2_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch
+patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2
+wrapdb_version = 10.45-2
[provide]
libpcre2-8 = libpcre2_8
diff --git a/t/Makefile b/t/Makefile
index 791e0a0..757674e 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -125,7 +125,6 @@
@mkdir -p mesontmp && \
printf "%s\n" \
"integration_tests t[0-9][0-9][0-9][0-9]-*.sh" \
- "unit_test_programs unit-tests/t-*.c" \
"clar_test_suites unit-tests/u-*.c" | \
while read -r variable pattern; do \
awk "/^$$variable = \[\$$/ {flag=1 ; next } /^]$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047,\$$/, \"\"); print }" meson.build >mesontmp/meson.txt && \
diff --git a/t/README b/t/README
index e9ffd9a..adbbd9a 100644
--- a/t/README
+++ b/t/README
@@ -415,6 +415,10 @@
builtin to use the non-sparse object walk. This can still be overridden by
the --sparse command-line argument.
+GIT_TEST_PACK_PATH_WALK=<boolean> if enabled will default the pack-objects
+builtin to use the path-walk API for the object walk. This can still be
+overridden by the --no-path-walk command-line argument.
+
GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
by overriding the minimum number of cache entries required per thread.
diff --git a/t/helper/test-advise.c b/t/helper/test-advise.c
index 6967c8e..81ed93a 100644
--- a/t/helper/test-advise.c
+++ b/t/helper/test-advise.c
@@ -3,6 +3,7 @@
#include "test-tool.h"
#include "advice.h"
#include "config.h"
+#include "environment.h"
#include "setup.h"
int cmd__advise_if_enabled(int argc, const char **argv)
@@ -11,7 +12,7 @@ int cmd__advise_if_enabled(int argc, const char **argv)
die("usage: %s <advice>", argv[0]);
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
/*
* Any advice type can be used for testing, but NESTED_TAG was
diff --git a/t/helper/test-bitmap.c b/t/helper/test-bitmap.c
index 3f23f21..16a0166 100644
--- a/t/helper/test-bitmap.c
+++ b/t/helper/test-bitmap.c
@@ -10,6 +10,11 @@ static int bitmap_list_commits(void)
return test_bitmap_commits(the_repository);
}
+static int bitmap_list_commits_with_offset(void)
+{
+ return test_bitmap_commits_with_offset(the_repository);
+}
+
static int bitmap_dump_hashes(void)
{
return test_bitmap_hashes(the_repository);
@@ -36,6 +41,8 @@ int cmd__bitmap(int argc, const char **argv)
if (argc == 2 && !strcmp(argv[1], "list-commits"))
return bitmap_list_commits();
+ if (argc == 2 && !strcmp(argv[1], "list-commits-with-offset"))
+ return bitmap_list_commits_with_offset();
if (argc == 2 && !strcmp(argv[1], "dump-hashes"))
return bitmap_dump_hashes();
if (argc == 2 && !strcmp(argv[1], "dump-pseudo-merges"))
@@ -46,6 +53,7 @@ int cmd__bitmap(int argc, const char **argv)
return bitmap_dump_pseudo_merge_objects(atoi(argv[2]));
usage("\ttest-tool bitmap list-commits\n"
+ "\ttest-tool bitmap list-commits-with-offset\n"
"\ttest-tool bitmap dump-hashes\n"
"\ttest-tool bitmap dump-pseudo-merges\n"
"\ttest-tool bitmap dump-pseudo-merge-commits <n>\n"
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c
index 9aa2c5a..3283544 100644
--- a/t/helper/test-bloom.c
+++ b/t/helper/test-bloom.c
@@ -12,13 +12,13 @@ static struct bloom_filter_settings settings = DEFAULT_BLOOM_FILTER_SETTINGS;
static void add_string_to_filter(const char *data, struct bloom_filter *filter) {
struct bloom_key key;
- fill_bloom_key(data, strlen(data), &key, &settings);
+ bloom_key_fill(&key, data, strlen(data), &settings);
printf("Hashes:");
for (size_t i = 0; i < settings.num_hashes; i++)
printf("0x%08x|", key.hashes[i]);
printf("\n");
add_key_to_filter(&key, filter, &settings);
- clear_bloom_key(&key);
+ bloom_key_clear(&key);
}
static void print_bloom_filter(struct bloom_filter *filter) {
@@ -61,13 +61,13 @@ int cmd__bloom(int argc, const char **argv)
uint32_t hashed;
if (argc < 3)
usage(bloom_usage);
- hashed = murmur3_seeded_v2(0, argv[2], strlen(argv[2]));
+ hashed = test_bloom_murmur3_seeded(0, argv[2], strlen(argv[2]), 2);
printf("Murmur3 Hash with seed=0:0x%08x\n", hashed);
}
if (!strcmp(argv[1], "get_murmur3_seven_highbit")) {
uint32_t hashed;
- hashed = murmur3_seeded_v2(0, "\x99\xaa\xbb\xcc\xdd\xee\xff", 7);
+ hashed = test_bloom_murmur3_seeded(0, "\x99\xaa\xbb\xcc\xdd\xee\xff", 7, 2);
printf("Murmur3 Hash with seed=0:0x%08x\n", hashed);
}
diff --git a/t/helper/test-config.c b/t/helper/test-config.c
index 75e028a..9f8cca7 100644
--- a/t/helper/test-config.c
+++ b/t/helper/test-config.c
@@ -32,10 +32,10 @@
* ascending order of priority from a config_set
* constructed from files entered as arguments.
*
- * iterate -> iterate over all values using git_config(), and print some
+ * iterate -> iterate over all values using repo_config(), and print some
* data for each
*
- * git_config_int -> iterate over all values using git_config() and print the
+ * git_config_int -> iterate over all values using repo_config() and print the
* integer value for the entered key or die
*
* Examples:
@@ -110,7 +110,7 @@ int cmd__config(int argc, const char **argv)
fprintf(stderr, "Please, provide a command name on the command-line\n");
goto exit1;
} else if (argc == 3 && !strcmp(argv[1], "get_value")) {
- if (!git_config_get_value(argv[2], &v)) {
+ if (!repo_config_get_value(the_repository, argv[2], &v)) {
if (!v)
printf("(NULL)\n");
else
@@ -121,7 +121,7 @@ int cmd__config(int argc, const char **argv)
goto exit1;
}
} else if (argc == 3 && !strcmp(argv[1], "get_value_multi")) {
- if (!git_config_get_value_multi(argv[2], &strptr)) {
+ if (!repo_config_get_value_multi(the_repository, argv[2], &strptr)) {
for (i = 0; i < strptr->nr; i++) {
v = strptr->items[i].string;
if (!v)
@@ -137,7 +137,7 @@ int cmd__config(int argc, const char **argv)
} else if (argc == 3 && !strcmp(argv[1], "get")) {
int ret;
- if (!(ret = git_config_get(argv[2])))
+ if (!(ret = repo_config_get(the_repository, argv[2])))
goto exit0;
else if (ret == 1)
printf("Value not found for \"%s\"\n", argv[2]);
@@ -155,7 +155,7 @@ int cmd__config(int argc, const char **argv)
BUG("Key \"%s\" has unknown return %d", argv[2], ret);
goto exit1;
} else if (argc == 3 && !strcmp(argv[1], "get_int")) {
- if (!git_config_get_int(argv[2], &val)) {
+ if (!repo_config_get_int(the_repository, argv[2], &val)) {
printf("%d\n", val);
goto exit0;
} else {
@@ -163,7 +163,7 @@ int cmd__config(int argc, const char **argv)
goto exit1;
}
} else if (argc == 3 && !strcmp(argv[1], "get_bool")) {
- if (!git_config_get_bool(argv[2], &val)) {
+ if (!repo_config_get_bool(the_repository, argv[2], &val)) {
printf("%d\n", val);
goto exit0;
} else {
@@ -171,7 +171,7 @@ int cmd__config(int argc, const char **argv)
goto exit1;
}
} else if (argc == 3 && !strcmp(argv[1], "get_string")) {
- if (!git_config_get_string_tmp(argv[2], &v)) {
+ if (!repo_config_get_string_tmp(the_repository, argv[2], &v)) {
printf("%s\n", v);
goto exit0;
} else {
@@ -218,10 +218,10 @@ int cmd__config(int argc, const char **argv)
goto exit1;
}
} else if (!strcmp(argv[1], "iterate")) {
- git_config(iterate_cb, NULL);
+ repo_config(the_repository, iterate_cb, NULL);
goto exit0;
} else if (argc == 3 && !strcmp(argv[1], "git_config_int")) {
- git_config(parse_int_cb, (void *) argv[2]);
+ repo_config(the_repository, parse_int_cb, (void *) argv[2]);
goto exit0;
}
diff --git a/t/helper/test-delta.c b/t/helper/test-delta.c
index 6bc787a..52ea00c 100644
--- a/t/helper/test-delta.c
+++ b/t/helper/test-delta.c
@@ -11,6 +11,7 @@
#include "test-tool.h"
#include "git-compat-util.h"
#include "delta.h"
+#include "strbuf.h"
static const char usage_str[] =
"test-tool delta (-d|-p) <from_file> <data_file> <out_file>";
@@ -18,68 +19,38 @@ static const char usage_str[] =
int cmd__delta(int argc, const char **argv)
{
int fd;
- struct stat st;
- void *from_buf = NULL, *data_buf = NULL, *out_buf = NULL;
- unsigned long from_size, data_size, out_size;
- int ret = 1;
+ struct strbuf from = STRBUF_INIT, data = STRBUF_INIT;
+ char *out_buf;
+ unsigned long out_size;
- if (argc != 5 || (strcmp(argv[1], "-d") && strcmp(argv[1], "-p"))) {
- fprintf(stderr, "usage: %s\n", usage_str);
- return 1;
- }
+ if (argc != 5 || (strcmp(argv[1], "-d") && strcmp(argv[1], "-p")))
+ usage(usage_str);
- fd = open(argv[2], O_RDONLY);
- if (fd < 0 || fstat(fd, &st)) {
- perror(argv[2]);
- return 1;
- }
- from_size = st.st_size;
- from_buf = xmalloc(from_size);
- if (read_in_full(fd, from_buf, from_size) < 0) {
- perror(argv[2]);
- close(fd);
- goto cleanup;
- }
- close(fd);
-
- fd = open(argv[3], O_RDONLY);
- if (fd < 0 || fstat(fd, &st)) {
- perror(argv[3]);
- goto cleanup;
- }
- data_size = st.st_size;
- data_buf = xmalloc(data_size);
- if (read_in_full(fd, data_buf, data_size) < 0) {
- perror(argv[3]);
- close(fd);
- goto cleanup;
- }
- close(fd);
+ if (strbuf_read_file(&from, argv[2], 0) < 0)
+ die_errno("unable to read '%s'", argv[2]);
+ if (strbuf_read_file(&data, argv[3], 0) < 0)
+ die_errno("unable to read '%s'", argv[3]);
if (argv[1][1] == 'd')
- out_buf = diff_delta(from_buf, from_size,
- data_buf, data_size,
+ out_buf = diff_delta(from.buf, from.len,
+ data.buf, data.len,
&out_size, 0);
else
- out_buf = patch_delta(from_buf, from_size,
- data_buf, data_size,
+ out_buf = patch_delta(from.buf, from.len,
+ data.buf, data.len,
&out_size);
- if (!out_buf) {
- fprintf(stderr, "delta operation failed (returned NULL)\n");
- goto cleanup;
- }
+ if (!out_buf)
+ die("delta operation failed (returned NULL)");
- fd = open (argv[4], O_WRONLY|O_CREAT|O_TRUNC, 0666);
- if (fd < 0 || write_in_full(fd, out_buf, out_size) < 0) {
- perror(argv[4]);
- goto cleanup;
- }
+ fd = xopen(argv[4], O_WRONLY|O_CREAT|O_TRUNC, 0666);
+ if (write_in_full(fd, out_buf, out_size) < 0)
+ die_errno("write(%s)", argv[4]);
+ if (close(fd) < 0)
+ die_errno("close(%s)", argv[4]);
- ret = 0;
-cleanup:
- free(from_buf);
- free(data_buf);
+ strbuf_release(&from);
+ strbuf_release(&data);
free(out_buf);
- return ret;
+ return 0;
}
diff --git a/t/helper/test-find-pack.c b/t/helper/test-find-pack.c
index 76c2f4e..611a13a 100644
--- a/t/helper/test-find-pack.c
+++ b/t/helper/test-find-pack.c
@@ -2,7 +2,7 @@
#include "test-tool.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "parse-options.h"
#include "setup.h"
diff --git a/t/helper/test-hashmap.c b/t/helper/test-hashmap.c
index 7782ae5..16a3145 100644
--- a/t/helper/test-hashmap.c
+++ b/t/helper/test-hashmap.c
@@ -137,6 +137,11 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
* Read stdin line by line and print result of commands to stdout:
*
* perfhashmap method rounds -> test hashmap.[ch] performance
+ *
+ * NOTE: this is not used by any of our mechanized build & test
+ * procedure, after 3469a236 (t: port helper/test-hashmap.c to
+ * unit-tests/t-hashmap.c, 2024-08-03). See the log message of that
+ * commit for the reason why this is still here.
*/
int cmd__hashmap(int argc UNUSED, const char **argv UNUSED)
{
diff --git a/t/helper/test-pack-mtimes.c b/t/helper/test-pack-mtimes.c
index fdf1b13..d51aaa3 100644
--- a/t/helper/test-pack-mtimes.c
+++ b/t/helper/test-pack-mtimes.c
@@ -3,7 +3,7 @@
#include "test-tool.h"
#include "hex.h"
#include "strbuf.h"
-#include "object-store.h"
+#include "odb.h"
#include "packfile.h"
#include "pack-mtimes.h"
#include "setup.h"
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c
index f2663dd..68579d8 100644
--- a/t/helper/test-parse-options.c
+++ b/t/helper/test-parse-options.c
@@ -131,6 +131,7 @@ int cmd__parse_options(int argc, const char **argv)
.short_name = 'B',
.long_name = "no-fear",
.value = &boolean,
+ .precision = sizeof(boolean),
.help = "be brave",
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = 1,
@@ -148,9 +149,16 @@ int cmd__parse_options(int argc, const char **argv)
OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23),
OPT_CMDMODE(0, "mode1", &integer, "set integer to 1 (cmdmode option)", 1),
OPT_CMDMODE(0, "mode2", &integer, "set integer to 2 (cmdmode option)", 2),
- OPT_CALLBACK_F(0, "mode34", &integer, "(3|4)",
- "set integer to 3 or 4 (cmdmode option)",
- PARSE_OPT_CMDMODE, mode34_callback),
+ {
+ .type = OPTION_CALLBACK,
+ .long_name = "mode34",
+ .value = &integer,
+ .precision = sizeof(integer),
+ .argh = "(3|4)",
+ .help = "set integer to 3 or 4 (cmdmode option)",
+ .flags = PARSE_OPT_CMDMODE,
+ .callback = mode34_callback,
+ },
OPT_CALLBACK('L', "length", &integer, "str",
"get length of <str>", length_callback),
OPT_FILENAME('F', "file", &file, "set file to <file>"),
@@ -170,6 +178,7 @@ int cmd__parse_options(int argc, const char **argv)
.type = OPTION_COUNTUP,
.short_name = '+',
.value = &boolean,
+ .precision = sizeof(boolean),
.help = "same as -b",
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH,
},
@@ -177,6 +186,7 @@ int cmd__parse_options(int argc, const char **argv)
.type = OPTION_COUNTUP,
.long_name = "ambiguous",
.value = &ambiguous,
+ .precision = sizeof(ambiguous),
.help = "positive ambiguity",
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
},
@@ -184,6 +194,7 @@ int cmd__parse_options(int argc, const char **argv)
.type = OPTION_COUNTUP,
.long_name = "no-ambiguous",
.value = &ambiguous,
+ .precision = sizeof(ambiguous),
.help = "negative ambiguity",
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
},
diff --git a/t/helper/test-partial-clone.c b/t/helper/test-partial-clone.c
index 34f1aee..d848800 100644
--- a/t/helper/test-partial-clone.c
+++ b/t/helper/test-partial-clone.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "hex.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "setup.h"
/*
@@ -23,7 +23,7 @@ static void object_info(const char *gitdir, const char *oid_hex)
die("could not init repo");
if (parse_oid_hex_algop(oid_hex, &oid, &p, r.hash_algo))
die("could not parse oid");
- if (oid_object_info_extended(&r, &oid, &oi, 0))
+ if (odb_read_object_info_extended(r.objects, &oid, &oi, 0))
die("could not obtain object info");
printf("%d\n", (int) size);
diff --git a/t/helper/test-path-walk.c b/t/helper/test-path-walk.c
index 61e845e..fe63002 100644
--- a/t/helper/test-path-walk.c
+++ b/t/helper/test-path-walk.c
@@ -82,6 +82,8 @@ int cmd__path_walk(int argc, const char **argv)
N_("toggle inclusion of tree objects")),
OPT_BOOL(0, "prune", &info.prune_all_uninteresting,
N_("toggle pruning of uninteresting paths")),
+ OPT_BOOL(0, "edge-aggressive", &info.edge_aggressive,
+ N_("toggle aggressive edge walk")),
OPT_BOOL(0, "stdin-pl", &stdin_pl,
N_("read a pattern list over stdin")),
OPT_END(),
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index e277dde..9ae71ce 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c
@@ -2,6 +2,7 @@
#include "test-tool.h"
#include "config.h"
+#include "environment.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
@@ -19,7 +20,7 @@ int cmd__read_cache(int argc, const char **argv)
if (argc == 2)
cnt = strtol(argv[1], NULL, 0);
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
for (i = 0; i < cnt; i++) {
repo_read_index(the_repository);
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index 8b413b6..ef5339b 100644
--- a/t/helper/test-read-graph.c
+++ b/t/helper/test-read-graph.c
@@ -3,7 +3,7 @@
#include "test-tool.h"
#include "commit-graph.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "bloom.h"
#include "setup.h"
@@ -73,15 +73,15 @@ static void dump_graph_bloom_filters(struct commit_graph *graph)
int cmd__read_graph(int argc, const char **argv)
{
struct commit_graph *graph = NULL;
- struct object_directory *odb;
+ struct odb_source *source;
int ret = 0;
setup_git_directory();
- odb = the_repository->objects->odb;
+ source = the_repository->objects->sources;
prepare_repo_settings(the_repository);
- graph = read_commit_graph_one(the_repository, odb);
+ graph = read_commit_graph_one(the_repository, source);
if (!graph) {
ret = 1;
goto done;
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index ac81390..da2aa03 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -4,7 +4,7 @@
#include "hex.h"
#include "midx.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "pack-bitmap.h"
#include "packfile.h"
#include "setup.h"
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 4cfc7c9..8d9a271 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -5,7 +5,7 @@
#include "refs.h"
#include "setup.h"
#include "worktree.h"
-#include "object-store.h"
+#include "odb.h"
#include "path.h"
#include "repository.h"
#include "strbuf.h"
@@ -79,7 +79,7 @@ static const char **get_store(const char **argv, struct ref_store **refs)
if (!repo_submodule_path_append(the_repository,
&sb, gitdir, "objects/"))
die("computing submodule path failed");
- add_to_alternates_memory(sb.buf);
+ odb_add_to_alternates_memory(the_repository->objects, sb.buf);
strbuf_release(&sb);
*refs = repo_get_submodule_ref_store(the_repository, gitdir);
diff --git a/t/helper/test-string-list.c b/t/helper/test-string-list.c
index 6f10c5a..6be0cdb 100644
--- a/t/helper/test-string-list.c
+++ b/t/helper/test-string-list.c
@@ -1,105 +1,9 @@
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
#include "test-tool.h"
#include "strbuf.h"
#include "string-list.h"
-/*
- * Parse an argument into a string list. arg should either be a
- * ':'-separated list of strings, or "-" to indicate an empty string
- * list (as opposed to "", which indicates a string list containing a
- * single empty string). list->strdup_strings must be set.
- */
-static void parse_string_list(struct string_list *list, const char *arg)
-{
- if (!strcmp(arg, "-"))
- return;
-
- (void)string_list_split(list, arg, ':', -1);
-}
-
-static void write_list(const struct string_list *list)
-{
- int i;
- for (i = 0; i < list->nr; i++)
- printf("[%d]: \"%s\"\n", i, list->items[i].string);
-}
-
-static void write_list_compact(const struct string_list *list)
-{
- int i;
- if (!list->nr)
- printf("-\n");
- else {
- printf("%s", list->items[0].string);
- for (i = 1; i < list->nr; i++)
- printf(":%s", list->items[i].string);
- printf("\n");
- }
-}
-
-static int prefix_cb(struct string_list_item *item, void *cb_data)
-{
- const char *prefix = (const char *)cb_data;
- return starts_with(item->string, prefix);
-}
-
int cmd__string_list(int argc, const char **argv)
{
- if (argc == 5 && !strcmp(argv[1], "split")) {
- struct string_list list = STRING_LIST_INIT_DUP;
- int i;
- const char *s = argv[2];
- int delim = *argv[3];
- int maxsplit = atoi(argv[4]);
-
- i = string_list_split(&list, s, delim, maxsplit);
- printf("%d\n", i);
- write_list(&list);
- string_list_clear(&list, 0);
- return 0;
- }
-
- if (argc == 5 && !strcmp(argv[1], "split_in_place")) {
- struct string_list list = STRING_LIST_INIT_NODUP;
- int i;
- char *s = xstrdup(argv[2]);
- const char *delim = argv[3];
- int maxsplit = atoi(argv[4]);
-
- i = string_list_split_in_place(&list, s, delim, maxsplit);
- printf("%d\n", i);
- write_list(&list);
- string_list_clear(&list, 0);
- free(s);
- return 0;
- }
-
- if (argc == 4 && !strcmp(argv[1], "filter")) {
- /*
- * Retain only the items that have the specified prefix.
- * Arguments: list|- prefix
- */
- struct string_list list = STRING_LIST_INIT_DUP;
- const char *prefix = argv[3];
-
- parse_string_list(&list, argv[2]);
- filter_string_list(&list, 0, prefix_cb, (void *)prefix);
- write_list_compact(&list);
- string_list_clear(&list, 0);
- return 0;
- }
-
- if (argc == 3 && !strcmp(argv[1], "remove_duplicates")) {
- struct string_list list = STRING_LIST_INIT_DUP;
-
- parse_string_list(&list, argv[2]);
- string_list_remove_duplicates(&list, 0);
- write_list_compact(&list);
- string_list_clear(&list, 0);
- return 0;
- }
-
if (argc == 2 && !strcmp(argv[1], "sort")) {
struct string_list list = STRING_LIST_INIT_NODUP;
struct strbuf sb = STRBUF_INIT;
diff --git a/t/helper/test-truncate.c b/t/helper/test-truncate.c
index 3931dea..2820cc7 100644
--- a/t/helper/test-truncate.c
+++ b/t/helper/test-truncate.c
@@ -21,5 +21,8 @@ int cmd__truncate(int argc, const char **argv)
if (ftruncate(fd, (off_t) sz) < 0)
die_errno("failed to truncate file");
+
+ close(fd);
+
return 0;
}
diff --git a/t/helper/test-userdiff.c b/t/helper/test-userdiff.c
index 94c48ab..aa3a989 100644
--- a/t/helper/test-userdiff.c
+++ b/t/helper/test-userdiff.c
@@ -41,7 +41,7 @@ int cmd__userdiff(int argc, const char **argv)
if (want & USERDIFF_DRIVER_TYPE_CUSTOM) {
setup_git_directory();
- git_config(cmd__userdiff_config, NULL);
+ repo_config(the_repository, cmd__userdiff_config, NULL);
}
for_each_userdiff_driver(driver_cb, &want);
diff --git a/t/meson.build b/t/meson.build
index d052fc3..bbeba1a 100644
--- a/t/meson.build
+++ b/t/meson.build
@@ -8,9 +8,18 @@
'unit-tests/u-oidmap.c',
'unit-tests/u-oidtree.c',
'unit-tests/u-prio-queue.c',
+ 'unit-tests/u-reftable-basics.c',
+ 'unit-tests/u-reftable-block.c',
+ 'unit-tests/u-reftable-merged.c',
+ 'unit-tests/u-reftable-pq.c',
+ 'unit-tests/u-reftable-readwrite.c',
+ 'unit-tests/u-reftable-record.c',
+ 'unit-tests/u-reftable-stack.c',
+ 'unit-tests/u-reftable-table.c',
'unit-tests/u-reftable-tree.c',
'unit-tests/u-strbuf.c',
'unit-tests/u-strcmp-offset.c',
+ 'unit-tests/u-string-list.c',
'unit-tests/u-strvec.c',
'unit-tests/u-trailer.c',
'unit-tests/u-urlmatch-normalization.c',
@@ -19,7 +28,8 @@
clar_sources = [
'unit-tests/clar/clar.c',
'unit-tests/unit-test.c',
- 'unit-tests/lib-oid.c'
+ 'unit-tests/lib-oid.c',
+ 'unit-tests/lib-reftable.c'
]
clar_decls_h = custom_target(
@@ -49,36 +59,12 @@
clar_unit_tests = executable('unit-tests',
sources: clar_sources + clar_test_suites,
+ c_args: [
+ '-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"',
+ ],
dependencies: [libgit_commonmain],
)
-test('unit-tests', clar_unit_tests)
-
-unit_test_programs = [
- 'unit-tests/t-reftable-basics.c',
- 'unit-tests/t-reftable-block.c',
- 'unit-tests/t-reftable-merged.c',
- 'unit-tests/t-reftable-pq.c',
- 'unit-tests/t-reftable-readwrite.c',
- 'unit-tests/t-reftable-record.c',
- 'unit-tests/t-reftable-stack.c',
- 'unit-tests/t-reftable-table.c',
-]
-
-foreach unit_test_program : unit_test_programs
- unit_test_name = fs.stem(unit_test_program)
- unit_test = executable(unit_test_name,
- sources: [
- 'unit-tests/test-lib.c',
- 'unit-tests/lib-reftable.c',
- unit_test_program,
- ],
- dependencies: [libgit_commonmain],
- )
- test(unit_test_name, unit_test,
- workdir: meson.current_source_dir(),
- timeout: 0,
- )
-endforeach
+test('unit-tests', clar_unit_tests, kwargs: test_kwargs)
subdir('helper')
@@ -123,7 +109,6 @@
't0060-path-utils.sh',
't0061-run-command.sh',
't0062-revision-walking.sh',
- 't0063-string-list.sh',
't0066-dir-iterator.sh',
't0067-parse_pathspec_file.sh',
't0068-for-each-repo.sh',
@@ -178,7 +163,6 @@
't1015-read-index-unmerged.sh',
't1016-compatObjectFormat.sh',
't1020-subdirectory.sh',
- 't1021-rerere-in-workdir.sh',
't1022-read-tree-partial-clone.sh',
't1050-large.sh',
't1051-large-conversion.sh',
@@ -1117,6 +1101,7 @@
'perf/p1450-fsck.sh',
'perf/p1451-fsck-skip-list.sh',
'perf/p1500-graph-walks.sh',
+ 'perf/p1501-rev-parse-oneline.sh',
'perf/p2000-sparse-operations.sh',
'perf/p3400-rebase.sh',
'perf/p3404-rebase-interactive.sh',
@@ -1163,8 +1148,6 @@
# sufficient to catch missing test suites in our CI though.
foreach glob, tests : {
't[0-9][0-9][0-9][0-9]-*.sh': integration_tests,
- 'perf/p[0-9][0-9][0-9][0-9]-*.sh': benchmarks,
- 'unit-tests/t-*.c': unit_test_programs,
'unit-tests/u-*.c': clar_test_suites,
}
actual_tests = run_command(shell, '-c', 'ls ' + glob,
@@ -1212,7 +1195,7 @@
workdir: meson.current_source_dir(),
env: test_environment,
depends: test_dependencies + bin_wrappers,
- timeout: 0,
+ kwargs: test_kwargs,
)
endforeach
@@ -1231,4 +1214,4 @@
timeout: 0,
)
endforeach
-endif
+endif
\ No newline at end of file
diff --git a/t/perf/p1501-rev-parse-oneline.sh b/t/perf/p1501-rev-parse-oneline.sh
new file mode 100755
index 0000000..538fa9c
--- /dev/null
+++ b/t/perf/p1501-rev-parse-oneline.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+test_description='Test :/ object name notation'
+
+. ./perf-lib.sh
+
+test_perf_fresh_repo
+
+#
+# Creates lots of merges to make history traversal costly. In
+# particular it creates 2^($max_level-1)-1 2-way merges on top of
+# 2^($max_level-1) root commits. E.g., the commit history looks like
+# this for a $max_level of 3:
+#
+# _1_
+# / \
+# 2 3
+# / \ / \
+# 4 5 6 7
+#
+# The numbers are the fast-import marks, which also are the commit
+# messages. 1 is the HEAD commit and a merge, 2 and 3 are also merges,
+# 4-7 are the root commits.
+#
+build_history () {
+ local max_level="$1" &&
+ local level="${2:-1}" &&
+ local mark="${3:-1}" &&
+ if test $level -eq $max_level
+ then
+ echo "reset refs/heads/master" &&
+ echo "from $ZERO_OID" &&
+ echo "commit refs/heads/master" &&
+ echo "mark :$mark" &&
+ echo "committer C <c@example.com> 1234567890 +0000" &&
+ echo "data <<EOF" &&
+ echo "$mark" &&
+ echo "EOF"
+ else
+ local level1=$((level+1)) &&
+ local mark1=$((2*mark)) &&
+ local mark2=$((2*mark+1)) &&
+ build_history $max_level $level1 $mark1 &&
+ build_history $max_level $level1 $mark2 &&
+ echo "commit refs/heads/master" &&
+ echo "mark :$mark" &&
+ echo "committer C <c@example.com> 1234567890 +0000" &&
+ echo "data <<EOF" &&
+ echo "$mark" &&
+ echo "EOF" &&
+ echo "from :$mark1" &&
+ echo "merge :$mark2"
+ fi
+}
+
+test_expect_success 'setup' '
+ build_history 16 | git fast-import &&
+ git log --format="%H %s" --reverse >commits &&
+ sed -n -e "s/ .*$//p" -e "q" <commits >expect &&
+ sed -n -e "s/^.* //p" -e "q" <commits >needle
+'
+
+test_perf "rev-parse :/$(cat needle)" '
+ git rev-parse :/$(cat needle) >actual
+'
+
+test_expect_success 'verify result' '
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/perf/p5313-pack-objects.sh b/t/perf/p5313-pack-objects.sh
index 786a2c1..46a6cd3 100755
--- a/t/perf/p5313-pack-objects.sh
+++ b/t/perf/p5313-pack-objects.sh
@@ -22,46 +22,53 @@
EOF
'
-for version in 1 2
-do
- export version
+test_all_with_args () {
+ parameter=$1
+ export parameter
- test_perf "thin pack with version $version" '
+ test_perf "thin pack with $parameter" '
git pack-objects --thin --stdout --revs --sparse \
- --name-hash-version=$version <in-thin >out
+ $parameter <in-thin >out
'
- test_size "thin pack size with version $version" '
+ test_size "thin pack size with $parameter" '
test_file_size out
'
- test_perf "big pack with version $version" '
+ test_perf "big pack with $parameter" '
git pack-objects --stdout --revs --sparse \
- --name-hash-version=$version <in-big >out
+ $parameter <in-big >out
'
- test_size "big pack size with version $version" '
+ test_size "big pack size with $parameter" '
test_file_size out
'
- test_perf "shallow fetch pack with version $version" '
+ test_perf "shallow fetch pack with $parameter" '
git pack-objects --stdout --revs --sparse --shallow \
- --name-hash-version=$version <in-shallow >out
+ $parameter <in-shallow >out
'
- test_size "shallow pack size with version $version" '
+ test_size "shallow pack size with $parameter" '
test_file_size out
'
- test_perf "repack with version $version" '
- git repack -adf --name-hash-version=$version
+ test_perf "repack with $parameter" '
+ git repack -adf $parameter
'
- test_size "repack size with version $version" '
+ test_size "repack size with $parameter" '
gitdir=$(git rev-parse --git-dir) &&
pack=$(ls $gitdir/objects/pack/pack-*.pack) &&
test_file_size "$pack"
'
+}
+
+for version in 1 2
+do
+ test_all_with_args --name-hash-version=$version
done
+test_all_with_args --path-walk
+
test_done
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 35c5c2b..2b63e1c 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -130,7 +130,7 @@
'
test_expect_success 'subtest: a passing TODO test' '
- write_and_run_sub_test_lib_test passing-todo <<-\EOF &&
+ write_and_run_sub_test_lib_test_err passing-todo <<-\EOF &&
test_expect_failure "pretend we have fixed a known breakage" "true"
test_done
EOF
@@ -142,7 +142,7 @@
'
test_expect_success 'subtest: 2 TODO tests, one passin' '
- write_and_run_sub_test_lib_test partially-passing-todos <<-\EOF &&
+ write_and_run_sub_test_lib_test_err partially-passing-todos <<-\EOF &&
test_expect_failure "pretend we have a known breakage" "false"
test_expect_success "pretend we have a passing test" "true"
test_expect_failure "pretend we have fixed another known breakage" "true"
@@ -219,41 +219,44 @@
test_expect_success "failing test" false
test_done
EOF
- mv t1234-verbose/out t1234-verbose/out+ &&
- grep -v "^Initialized empty" t1234-verbose/out+ >t1234-verbose/out &&
- check_sub_test_lib_test t1234-verbose <<-\EOF
- > expecting success of 1234.1 '\''passing test'\'': true
+ mv t1234-verbose/err t1234-verbose/err+ &&
+ grep -v "^Initialized empty" t1234-verbose/err+ >t1234-verbose/err &&
+ check_sub_test_lib_test_err t1234-verbose \
+ <<-\EOF_OUT 3<<-\EOF_ERR
> ok 1 - passing test
+ > ok 2 - test with output
+ > not ok 3 - failing test
+ > # false
+ > # failed 1 among 3 test(s)
+ > 1..3
+ EOF_OUT
+ > expecting success of 1234.1 '\''passing test'\'': true
> Z
> expecting success of 1234.2 '\''test with output'\'': echo foo
> foo
- > ok 2 - test with output
> Z
> expecting success of 1234.3 '\''failing test'\'': false
- > not ok 3 - failing test
- > # false
> Z
- > # failed 1 among 3 test(s)
- > 1..3
- EOF
+ EOF_ERR
'
test_expect_success 'subtest: --verbose-only option' '
run_sub_test_lib_test_err \
t1234-verbose \
--verbose-only=2 &&
- check_sub_test_lib_test t1234-verbose <<-\EOF
+ check_sub_test_lib_test_err t1234-verbose <<-\EOF_OUT 3<<-\EOF_ERR
> ok 1 - passing test
- > Z
- > expecting success of 1234.2 '\''test with output'\'': echo foo
- > foo
> ok 2 - test with output
- > Z
> not ok 3 - failing test
> # false
> # failed 1 among 3 test(s)
> 1..3
- EOF
+ EOF_OUT
+ > Z
+ > expecting success of 1234.2 '\''test with output'\'': echo foo
+ > foo
+ > Z
+ EOF_ERR
'
test_expect_success 'subtest: skip one with GIT_SKIP_TESTS' '
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f11a408..f593c53 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -658,6 +658,17 @@
test_cmp expected actual
'
+test_expect_success 'default ref format' '
+ test_when_finished "rm -rf refformat" &&
+ (
+ sane_unset GIT_DEFAULT_REF_FORMAT &&
+ git init refformat
+ ) &&
+ git version --build-options | sed -ne "s/^default-ref-format: //p" >expect &&
+ git -C refformat rev-parse --show-ref-format >actual &&
+ test_cmp expect actual
+'
+
backends="files reftable"
for format in $backends
do
@@ -738,6 +749,40 @@
test_cmp expect actual
'
+test_expect_success "init with feature.experimental=true" '
+ test_when_finished "rm -rf refformat" &&
+ test_config_global feature.experimental true &&
+ (
+ sane_unset GIT_DEFAULT_REF_FORMAT &&
+ git init refformat
+ ) &&
+ echo reftable >expect &&
+ git -C refformat rev-parse --show-ref-format >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success "init.defaultRefFormat overrides feature.experimental=true" '
+ test_when_finished "rm -rf refformat" &&
+ test_config_global feature.experimental true &&
+ test_config_global init.defaultRefFormat files &&
+ (
+ sane_unset GIT_DEFAULT_REF_FORMAT &&
+ git init refformat
+ ) &&
+ echo files >expect &&
+ git -C refformat rev-parse --show-ref-format >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success "GIT_DEFAULT_REF_FORMAT= overrides feature.experimental=true" '
+ test_when_finished "rm -rf refformat" &&
+ test_config_global feature.experimental true &&
+ GIT_DEFAULT_REF_FORMAT=files git init refformat &&
+ echo files >expect &&
+ git -C refformat rev-parse --show-ref-format >actual &&
+ test_cmp expect actual
+'
+
for from_format in $backends
do
test_expect_success "re-init with same format ($from_format)" '
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index bf10d25..f0d50d7 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -281,7 +281,7 @@
test_expect_success 'filtering large input to small output should use little memory' '
test_config filter.devnull.clean "cat >/dev/null" &&
test_config filter.devnull.required true &&
- for i in $(test_seq 1 30); do printf "%1048576d" 1 || return 1; done >30MB &&
+ test_seq -f "%1048576d" 1 30 >30MB &&
echo "30MB filter=devnull" >.gitattributes &&
GIT_MMAP_LIMIT=1m GIT_ALLOC_LIMIT=1m git add 30MB
'
@@ -299,7 +299,7 @@
test_expect_success EXPENSIVE 'filter large file' '
test_config filter.largefile.smudge cat &&
test_config filter.largefile.clean cat &&
- for i in $(test_seq 1 2048); do printf "%1048576d" 1 || return 1; done >2GB &&
+ test_seq -f "%1048576d" 1 2048 >2GB &&
echo "2GB filter=largefile" >.gitattributes &&
git add 2GB 2>err &&
test_must_be_empty err &&
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 5c9dc90..ca85680 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -10,53 +10,35 @@
auml=$(printf '\303\244')
aumlcdiar=$(printf '\141\314\210')
-if test_have_prereq CASE_INSENSITIVE_FS
-then
- say "will test on a case insensitive filesystem"
- test_case=test_expect_failure
-else
- test_case=test_expect_success
-fi
-
if test_have_prereq UTF8_NFD_TO_NFC
then
- say "will test on a unicode corrupting filesystem"
test_unicode=test_expect_failure
else
test_unicode=test_expect_success
fi
-test_have_prereq SYMLINKS ||
- say "will test on a filesystem lacking symbolic links"
-
-if test_have_prereq CASE_INSENSITIVE_FS
-then
-test_expect_success "detection of case insensitive filesystem during repo init" '
+test_expect_success CASE_INSENSITIVE_FS "detection of case insensitive filesystem during repo init" '
test $(git config --bool core.ignorecase) = true
'
-else
-test_expect_success "detection of case insensitive filesystem during repo init" '
+
+test_expect_success !CASE_INSENSITIVE_FS "detection of case insensitive filesystem during repo init" '
{
test_must_fail git config --bool core.ignorecase >/dev/null ||
test $(git config --bool core.ignorecase) = false
}
'
-fi
-if test_have_prereq SYMLINKS
-then
-test_expect_success "detection of filesystem w/o symlink support during repo init" '
+test_expect_success SYMLINKS "detection of filesystem w/o symlink support during repo init" '
{
test_must_fail git config --bool core.symlinks ||
test "$(git config --bool core.symlinks)" = true
}
'
-else
-test_expect_success "detection of filesystem w/o symlink support during repo init" '
+
+test_expect_success !SYMLINKS "detection of filesystem w/o symlink support during repo init" '
v=$(git config --bool core.symlinks) &&
test "$v" = false
'
-fi
test_expect_success "setup case tests" '
git config core.ignorecase true &&
diff --git a/t/t0063-string-list.sh b/t/t0063-string-list.sh
deleted file mode 100755
index aac63ba..0000000
--- a/t/t0063-string-list.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2012 Michael Haggerty
-#
-
-test_description='Test string list functionality'
-
-. ./test-lib.sh
-
-test_split () {
- cat >expected &&
- test_expect_success "split $1 at $2, max $3" "
- test-tool string-list split '$1' '$2' '$3' >actual &&
- test_cmp expected actual &&
- test-tool string-list split_in_place '$1' '$2' '$3' >actual &&
- test_cmp expected actual
- "
-}
-
-test_split_in_place() {
- cat >expected &&
- test_expect_success "split (in place) $1 at $2, max $3" "
- test-tool string-list split_in_place '$1' '$2' '$3' >actual &&
- test_cmp expected actual
- "
-}
-
-test_split "foo:bar:baz" ":" "-1" <<EOF
-3
-[0]: "foo"
-[1]: "bar"
-[2]: "baz"
-EOF
-
-test_split "foo:bar:baz" ":" "0" <<EOF
-1
-[0]: "foo:bar:baz"
-EOF
-
-test_split "foo:bar:baz" ":" "1" <<EOF
-2
-[0]: "foo"
-[1]: "bar:baz"
-EOF
-
-test_split "foo:bar:baz" ":" "2" <<EOF
-3
-[0]: "foo"
-[1]: "bar"
-[2]: "baz"
-EOF
-
-test_split "foo:bar:" ":" "-1" <<EOF
-3
-[0]: "foo"
-[1]: "bar"
-[2]: ""
-EOF
-
-test_split "" ":" "-1" <<EOF
-1
-[0]: ""
-EOF
-
-test_split ":" ":" "-1" <<EOF
-2
-[0]: ""
-[1]: ""
-EOF
-
-test_split_in_place "foo:;:bar:;:baz:;:" ":;" "-1" <<EOF
-10
-[0]: "foo"
-[1]: ""
-[2]: ""
-[3]: "bar"
-[4]: ""
-[5]: ""
-[6]: "baz"
-[7]: ""
-[8]: ""
-[9]: ""
-EOF
-
-test_split_in_place "foo:;:bar:;:baz" ":;" "0" <<EOF
-1
-[0]: "foo:;:bar:;:baz"
-EOF
-
-test_split_in_place "foo:;:bar:;:baz" ":;" "1" <<EOF
-2
-[0]: "foo"
-[1]: ";:bar:;:baz"
-EOF
-
-test_split_in_place "foo:;:bar:;:baz" ":;" "2" <<EOF
-3
-[0]: "foo"
-[1]: ""
-[2]: ":bar:;:baz"
-EOF
-
-test_split_in_place "foo:;:bar:;:" ":;" "-1" <<EOF
-7
-[0]: "foo"
-[1]: ""
-[2]: ""
-[3]: "bar"
-[4]: ""
-[5]: ""
-[6]: ""
-EOF
-
-test_expect_success "test filter_string_list" '
- test "x-" = "x$(test-tool string-list filter - y)" &&
- test "x-" = "x$(test-tool string-list filter no y)" &&
- test yes = "$(test-tool string-list filter yes y)" &&
- test yes = "$(test-tool string-list filter no:yes y)" &&
- test yes = "$(test-tool string-list filter yes:no y)" &&
- test y1:y2 = "$(test-tool string-list filter y1:y2 y)" &&
- test y2:y1 = "$(test-tool string-list filter y2:y1 y)" &&
- test "x-" = "x$(test-tool string-list filter x1:x2 y)"
-'
-
-test_expect_success "test remove_duplicates" '
- test "x-" = "x$(test-tool string-list remove_duplicates -)" &&
- test "x" = "x$(test-tool string-list remove_duplicates "")" &&
- test a = "$(test-tool string-list remove_duplicates a)" &&
- test a = "$(test-tool string-list remove_duplicates a:a)" &&
- test a = "$(test-tool string-list remove_duplicates a:a:a:a:a)" &&
- test a:b = "$(test-tool string-list remove_duplicates a:b)" &&
- test a:b = "$(test-tool string-list remove_duplicates a:a:b)" &&
- test a:b = "$(test-tool string-list remove_duplicates a:b:b)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:b:c)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:c)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:b:b:c)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:b:c:c)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:b:c:c)" &&
- test a:b:c = "$(test-tool string-list remove_duplicates a:a:a:b:b:b:c:c:c)"
-'
-
-test_done
diff --git a/t/t0411-clone-from-partial.sh b/t/t0411-clone-from-partial.sh
index 196fc61..9e6bca5 100755
--- a/t/t0411-clone-from-partial.sh
+++ b/t/t0411-clone-from-partial.sh
@@ -59,6 +59,12 @@
test_expect_success 'clone from promisor remote does not lazy-fetch by default' '
rm -f script-executed &&
+
+ # The --path-walk feature of "git pack-objects" is not
+ # compatible with this kind of fetch from an incomplete repo.
+ GIT_TEST_PACK_PATH_WALK=0 &&
+ export GIT_TEST_PACK_PATH_WALK &&
+
test_must_fail git clone evil no-lazy 2>err &&
test_grep "lazy fetching disabled" err &&
test_path_is_missing script-executed
diff --git a/t/t0450/adoc-help-mismatches b/t/t0450/adoc-help-mismatches
index c4a15fd..06b469b 100644
--- a/t/t0450/adoc-help-mismatches
+++ b/t/t0450/adoc-help-mismatches
@@ -38,7 +38,6 @@
multi-pack-index
name-rev
notes
-pack-objects
push
range-diff
rebase
diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh
index 1be534a..3ea5d51 100755
--- a/t/t0610-reftable-basics.sh
+++ b/t/t0610-reftable-basics.sh
@@ -477,11 +477,7 @@
test_commit --no-tag initial &&
head=$(git rev-parse HEAD) &&
- for i in $(test_seq 100)
- do
- printf "%s commit\trefs/heads/branch-%s\n" "$head" "$i" ||
- return 1
- done >expect &&
+ test_seq -f "$head commit\trefs/heads/branch-%d" 100 >expect &&
printf "%s commit\trefs/heads/main\n" "$head" >>expect &&
for i in $(test_seq 100)
diff --git a/t/t0612-reftable-jgit-compatibility.sh b/t/t0612-reftable-jgit-compatibility.sh
index d0d7e80..7df2ad5 100755
--- a/t/t0612-reftable-jgit-compatibility.sh
+++ b/t/t0612-reftable-jgit-compatibility.sh
@@ -112,14 +112,11 @@
cd repo &&
test_commit A &&
- awk "
- BEGIN {
- print \"start\";
- for (i = 0; i < 10000; i++)
- printf \"create refs/heads/branch-%d HEAD\n\", i;
- print \"commit\";
- }
- " >input &&
+ {
+ echo start &&
+ test_seq -f "create refs/heads/branch-%d HEAD" 10000 &&
+ echo commit
+ } >input &&
git update-ref --stdin <input &&
test_same_refs &&
diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh
index 6447920..d77e601 100755
--- a/t/t0613-reftable-write-options.sh
+++ b/t/t0613-reftable-write-options.sh
@@ -66,11 +66,7 @@
(
cd repo &&
test_commit initial &&
- for i in $(test_seq 200)
- do
- printf "update refs/heads/branch-%d HEAD\n" "$i" ||
- return 1
- done >input &&
+ test_seq -f "update refs/heads/branch-%d HEAD" 200 >input &&
git update-ref --stdin <input &&
git pack-refs &&
@@ -180,11 +176,7 @@
(
cd repo &&
test_commit initial &&
- for i in $(test_seq 10)
- do
- printf "update refs/heads/branch-%d HEAD\n" "$i" ||
- return 1
- done >input &&
+ test_seq -f "update refs/heads/branch-%d HEAD" 10 >input &&
git update-ref --stdin <input &&
git -c reftable.restartInterval=1 pack-refs &&
@@ -224,11 +216,7 @@
(
cd repo &&
test_commit initial &&
- for i in $(test_seq 5)
- do
- printf "update refs/heads/branch-%d HEAD\n" "$i" ||
- return 1
- done >input &&
+ test_seq -f "update refs/heads/branch-%d HEAD" 5 >input &&
git update-ref --stdin <input &&
git -c reftable.blockSize=100 pack-refs &&
@@ -263,11 +251,7 @@
(
cd repo &&
test_commit initial &&
- for i in $(test_seq 5)
- do
- printf "update refs/heads/branch-%d HEAD\n" "$i" ||
- return 1
- done >input &&
+ test_seq -f "update refs/heads/branch-%d HEAD" 5 >input &&
git update-ref --stdin <input &&
git -c reftable.blockSize=100 -c reftable.indexObjects=false pack-refs &&
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
index 317da68..1f61b66 100755
--- a/t/t1006-cat-file.sh
+++ b/t/t1006-cat-file.sh
@@ -113,53 +113,55 @@
run_tests () {
type=$1
- oid=$2
- size=$3
- content=$4
- pretty_content=$5
+ object_name="$2"
+ mode=$3
+ size=$4
+ content=$5
+ pretty_content=$6
+ oid=${7:-"$object_name"}
batch_output="$oid $type $size
$content"
test_expect_success "$type exists" '
- git cat-file -e $oid
+ git cat-file -e "$object_name"
'
test_expect_success "Type of $type is correct" '
echo $type >expect &&
- git cat-file -t $oid >actual &&
+ git cat-file -t "$object_name" >actual &&
test_cmp expect actual
'
test_expect_success "Size of $type is correct" '
echo $size >expect &&
- git cat-file -s $oid >actual &&
+ git cat-file -s "$object_name" >actual &&
test_cmp expect actual
'
test -z "$content" ||
test_expect_success "Content of $type is correct" '
echo_without_newline "$content" >expect &&
- git cat-file $type $oid >actual &&
+ git cat-file $type "$object_name" >actual &&
test_cmp expect actual
'
test_expect_success "Pretty content of $type is correct" '
echo_without_newline "$pretty_content" >expect &&
- git cat-file -p $oid >actual &&
+ git cat-file -p "$object_name" >actual &&
test_cmp expect actual
'
test -z "$content" ||
test_expect_success "--batch output of $type is correct" '
echo "$batch_output" >expect &&
- echo $oid | git cat-file --batch >actual &&
+ echo "$object_name" | git cat-file --batch >actual &&
test_cmp expect actual
'
test_expect_success "--batch-check output of $type is correct" '
echo "$oid $type $size" >expect &&
- echo_without_newline $oid | git cat-file --batch-check >actual &&
+ echo_without_newline "$object_name" | git cat-file --batch-check >actual &&
test_cmp expect actual
'
@@ -168,13 +170,13 @@
test -z "$content" ||
test_expect_success "--batch-command $opt output of $type content is correct" '
echo "$batch_output" >expect &&
- test_write_lines "contents $oid" | git cat-file --batch-command $opt >actual &&
+ test_write_lines "contents $object_name" | git cat-file --batch-command $opt >actual &&
test_cmp expect actual
'
test_expect_success "--batch-command $opt output of $type info is correct" '
echo "$oid $type $size" >expect &&
- test_write_lines "info $oid" |
+ test_write_lines "info $object_name" |
git cat-file --batch-command $opt >actual &&
test_cmp expect actual
'
@@ -182,30 +184,45 @@
test_expect_success "custom --batch-check format" '
echo "$type $oid" >expect &&
- echo $oid | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
+ echo "$object_name" | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
'
test_expect_success "custom --batch-command format" '
echo "$type $oid" >expect &&
- echo "info $oid" | git cat-file --batch-command="%(objecttype) %(objectname)" >actual &&
+ echo "info $object_name" | git cat-file --batch-command="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
'
- test_expect_success '--batch-check with %(rest)' '
+ # FIXME: %(rest) is incompatible with object names that include whitespace,
+ # e.g. HEAD:path/to/a/file with spaces. Use the resolved OID as input to
+ # test this instead of the raw object name.
+ if echo "$object_name" | grep -q " "; then
+ test_rest=test_expect_failure
+ else
+ test_rest=test_expect_success
+ fi
+
+ $test_rest '--batch-check with %(rest)' '
echo "$type this is some extra content" >expect &&
- echo "$oid this is some extra content" |
+ echo "$object_name this is some extra content" |
git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
test_cmp expect actual
'
+ test_expect_success '--batch-check with %(objectmode)' '
+ echo "$mode $oid" >expect &&
+ echo $object_name | git cat-file --batch-check="%(objectmode) %(objectname)" >actual &&
+ test_cmp expect actual
+ '
+
test -z "$content" ||
test_expect_success "--batch without type ($type)" '
{
echo "$size" &&
echo "$content"
} >expect &&
- echo $oid | git cat-file --batch="%(objectsize)" >actual &&
+ echo "$object_name" | git cat-file --batch="%(objectsize)" >actual &&
test_cmp expect actual
'
@@ -215,7 +232,7 @@
echo "$type" &&
echo "$content"
} >expect &&
- echo $oid | git cat-file --batch="%(objecttype)" >actual &&
+ echo "$object_name" | git cat-file --batch="%(objecttype)" >actual &&
test_cmp expect actual
'
}
@@ -230,13 +247,14 @@
git config extensions.compatobjectformat $test_compat_hash_algo &&
echo_without_newline "$hello_content" > hello &&
git update-index --add hello &&
+ echo_without_newline "$hello_content" > "path with spaces" &&
+ git update-index --add --chmod=+x "path with spaces" &&
git commit -m "add hello file"
'
run_blob_tests () {
oid=$1
-
- run_tests 'blob' $oid $hello_size "$hello_content" "$hello_content"
+ run_tests 'blob' $oid "" $hello_size "$hello_content" "$hello_content"
test_expect_success '--batch-command --buffer with flush for blob info' '
echo "$oid blob $hello_size" >expect &&
@@ -269,13 +287,17 @@
tree_oid=$(git write-tree)
tree_compat_oid=$(git rev-parse --output-object-format=$test_compat_hash_algo $tree_oid)
-tree_size=$(($(test_oid rawsz) + 13))
-tree_compat_size=$(($(test_oid --hash=compat rawsz) + 13))
-tree_pretty_content="100644 blob $hello_oid hello${LF}"
-tree_compat_pretty_content="100644 blob $hello_compat_oid hello${LF}"
+tree_size=$((2 * $(test_oid rawsz) + 13 + 24))
+tree_compat_size=$((2 * $(test_oid --hash=compat rawsz) + 13 + 24))
+tree_pretty_content="100644 blob $hello_oid hello${LF}100755 blob $hello_oid path with spaces${LF}"
+tree_compat_pretty_content="100644 blob $hello_compat_oid hello${LF}100755 blob $hello_compat_oid path with spaces${LF}"
-run_tests 'tree' $tree_oid $tree_size "" "$tree_pretty_content"
-run_tests 'tree' $tree_compat_oid $tree_compat_size "" "$tree_compat_pretty_content"
+run_tests 'tree' $tree_oid "" $tree_size "" "$tree_pretty_content"
+run_tests 'tree' $tree_compat_oid "" $tree_compat_size "" "$tree_compat_pretty_content"
+run_tests 'blob' "$tree_oid:hello" "100644" $hello_size "" "$hello_content" $hello_oid
+run_tests 'blob' "$tree_compat_oid:hello" "100644" $hello_size "" "$hello_content" $hello_compat_oid
+run_tests 'blob' "$tree_oid:path with spaces" "100755" $hello_size "" "$hello_content" $hello_oid
+run_tests 'blob' "$tree_compat_oid:path with spaces" "100755" $hello_size "" "$hello_content" $hello_compat_oid
commit_message="Initial commit"
commit_oid=$(echo_without_newline "$commit_message" | git commit-tree $tree_oid)
@@ -294,8 +316,8 @@
$commit_message"
-run_tests 'commit' $commit_oid $commit_size "$commit_content" "$commit_content"
-run_tests 'commit' $commit_compat_oid $commit_compat_size "$commit_compat_content" "$commit_compat_content"
+run_tests 'commit' $commit_oid "" $commit_size "$commit_content" "$commit_content"
+run_tests 'commit' $commit_compat_oid "" $commit_compat_size "$commit_compat_content" "$commit_compat_content"
tag_header_without_oid="type blob
tag hellotag
@@ -318,8 +340,8 @@
tag_compat_oid=$(git rev-parse --output-object-format=$test_compat_hash_algo $tag_oid)
tag_compat_size=$(strlen "$tag_compat_content")
-run_tests 'tag' $tag_oid $tag_size "$tag_content" "$tag_content"
-run_tests 'tag' $tag_compat_oid $tag_compat_size "$tag_compat_content" "$tag_compat_content"
+run_tests 'tag' $tag_oid "" $tag_size "$tag_content" "$tag_content"
+run_tests 'tag' $tag_compat_oid "" $tag_compat_size "$tag_compat_content" "$tag_compat_content"
test_expect_success "Reach a blob from a tag pointing to it" '
echo_without_newline "$hello_content" >expect &&
@@ -1198,6 +1220,31 @@
test_cmp expect actual
'
+test_expect_success 'batch-check with a submodule' '
+ # FIXME: this call to mktree is incompatible with compatObjectFormat
+ # because the submodule OID cannot be mapped to the compat hash algo.
+ test_unconfig extensions.compatobjectformat &&
+ printf "160000 commit $(test_oid deadbeef)\tsub\n" >tree-with-sub &&
+ tree=$(git mktree <tree-with-sub) &&
+ test_config extensions.compatobjectformat $test_compat_hash_algo &&
+
+ git cat-file --batch-check >actual <<-EOF &&
+ $tree:sub
+ EOF
+ printf "$(test_oid deadbeef) submodule\n" >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'batch-check with a submodule, object exists' '
+ printf "160000 commit $commit_oid\tsub\n" >tree-with-sub &&
+ tree=$(git mktree <tree-with-sub) &&
+ git cat-file --batch-check >actual <<-EOF &&
+ $tree:sub
+ EOF
+ printf "$commit_oid commit $commit_size\n" >expect &&
+ test_cmp expect actual
+'
+
# Pull the entry for object with oid "$1" out of the output of
# "cat-file --batch", including its object content (which requires
# parsing and reading a set amount of bytes, hence perl).
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index dbbe9fb..de07629 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -30,7 +30,7 @@
test_repo=test
push_repo() {
- test_create_repo $test_repo
+ git init --quiet $test_repo
cd $test_repo
setup_repo
@@ -252,9 +252,9 @@
test_must_fail git hash-object -t bogus --literally --stdin
'
-test_expect_success '--stdin outside of repository (uses SHA-1)' '
+test_expect_success '--stdin outside of repository (uses default hash)' '
nongit git hash-object --stdin <hello >actual &&
- echo "$(test_oid --hash=sha1 hello)" >expect &&
+ echo "$(test_oid --hash=builtin hello)" >expect &&
test_cmp expect actual
'
diff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh
deleted file mode 100755
index 0b89289..0000000
--- a/t/t1021-rerere-in-workdir.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-test_description='rerere run in a workdir'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
-. ./test-lib.sh
-
-test_expect_success SYMLINKS setup '
- git config rerere.enabled true &&
- >world &&
- git add world &&
- test_tick &&
- git commit -m initial &&
-
- echo hello >world &&
- test_tick &&
- git commit -a -m hello &&
-
- git checkout -b side HEAD^ &&
- echo goodbye >world &&
- test_tick &&
- git commit -a -m goodbye &&
-
- git checkout main
-'
-
-test_expect_success SYMLINKS 'rerere in workdir' '
- rm -rf .git/rr-cache &&
- "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . work &&
- (
- cd work &&
- test_must_fail git merge side &&
- git rerere status >actual &&
- echo world >expect &&
- test_cmp expect actual
- )
-'
-
-# This fails because we don't resolve relative symlink in mkdir_in_gitdir()
-# For the purpose of helping contrib/workdir/git-new-workdir users, we do not
-# have to support relative symlinks, but it might be nicer to make this work
-# with a relative symbolic link someday.
-test_expect_failure SYMLINKS 'rerere in workdir (relative)' '
- rm -rf .git/rr-cache &&
- "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . krow &&
- (
- cd krow &&
- rm -f .git/rr-cache &&
- ln -s ../.git/rr-cache .git/rr-cache &&
- test_must_fail git merge side &&
- git rerere status >actual &&
- echo world >expect &&
- test_cmp expect actual
- )
-'
-
-test_done
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 51a85e8..f856821 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -2851,4 +2851,15 @@
done
+test_expect_success 'writing value with trailing CR not stripped on read' '
+ test_when_finished "rm -rf cr-test" &&
+
+ printf "bar\r\n" >expect &&
+ git init cr-test &&
+ git -C cr-test config set core.foo $(printf "bar\r") &&
+ git -C cr-test config get core.foo >actual &&
+
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index d29d23c..96648a6 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1380,10 +1380,7 @@
test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction creating branches does not burst open file limit' '
(
- for i in $(test_seq 33)
- do
- echo "create refs/heads/$i HEAD" || exit 1
- done >large_input &&
+ test_seq -f "create refs/heads/%d HEAD" 33 >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
git rev-parse --verify -q refs/heads/33
)
@@ -1391,10 +1388,7 @@
test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction deleting branches does not burst open file limit' '
(
- for i in $(test_seq 33)
- do
- echo "delete refs/heads/$i HEAD" || exit 1
- done >large_input &&
+ test_seq -f "delete refs/heads/%d HEAD" 33 >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
test_must_fail git rev-parse --verify -q refs/heads/33
)
@@ -2299,6 +2293,51 @@
test_grep -q "refname conflict" stdout
)
'
+
+ test_expect_success "stdin $type batch-updates delete incorrect symbolic ref" '
+ git init repo &&
+ test_when_finished "rm -fr repo" &&
+ (
+ cd repo &&
+ test_commit c1 &&
+ head=$(git rev-parse HEAD) &&
+ git symbolic-ref refs/heads/symbolic refs/heads/non-existent &&
+
+ format_command $type "delete refs/heads/symbolic" "$head" >stdin &&
+ git update-ref $type --stdin --batch-updates <stdin >stdout &&
+ test_grep "reference does not exist" stdout
+ )
+ '
+
+ test_expect_success "stdin $type batch-updates delete with incorrect old_oid" '
+ git init repo &&
+ test_when_finished "rm -fr repo" &&
+ (
+ cd repo &&
+ test_commit c1 &&
+ git branch new-branch &&
+ test_commit c2 &&
+ head=$(git rev-parse HEAD) &&
+
+ format_command $type "delete refs/heads/new-branch" "$head" >stdin &&
+ git update-ref $type --stdin --batch-updates <stdin >stdout &&
+ test_grep "incorrect old value provided" stdout
+ )
+ '
+
+ test_expect_success "stdin $type batch-updates delete non-existent ref" '
+ git init repo &&
+ test_when_finished "rm -fr repo" &&
+ (
+ cd repo &&
+ test_commit commit &&
+ head=$(git rev-parse HEAD) &&
+
+ format_command $type "delete refs/heads/non-existent" "$head" >stdin &&
+ git update-ref $type --stdin --batch-updates <stdin >stdout &&
+ test_grep "reference does not exist" stdout
+ )
+ '
done
test_expect_success 'update-ref should also create reflog for HEAD' '
@@ -2310,4 +2349,23 @@
test_cmp expect actual
'
+test_expect_success REFFILES 'empty directories are pruned when aborting a transaction' '
+ test_path_is_missing .git/refs/heads/nested &&
+ git update-ref --stdin <<-EOF &&
+ create refs/heads/nested/something HEAD
+ prepare
+ abort
+ EOF
+ test_path_is_missing .git/refs/heads/nested
+'
+
+test_expect_success REFFILES 'empty directories are pruned when not committing' '
+ test_path_is_missing .git/refs/heads/nested &&
+ git update-ref --stdin <<-EOF &&
+ create refs/heads/nested/something HEAD
+ prepare
+ EOF
+ test_path_is_missing .git/refs/heads/nested
+'
+
test_done
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 42b501f..e30f87a 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -673,4 +673,32 @@
)
'
+test_expect_success 'expire with pattern config' '
+ # Split refs/heads/ into two roots so we can apply config to each. Make
+ # two branches per root to verify that config is applied correctly
+ # multiple times.
+ git branch root1/branch1 &&
+ git branch root1/branch2 &&
+ git branch root2/branch1 &&
+ git branch root2/branch2 &&
+
+ test_config "gc.reflogexpire" "never" &&
+ test_config "gc.refs/heads/root2/*.reflogExpire" "now" &&
+ git reflog expire \
+ root1/branch1 root1/branch2 \
+ root2/branch1 root2/branch2 &&
+
+ cat >expect <<-\EOF &&
+ root1/branch1@{0}
+ root1/branch2@{0}
+ EOF
+ git log -g --branches="root*" --format=%gD >actual.raw &&
+ # The sole reflog entry of each branch points to the same commit, so
+ # the order in which they are shown is nondeterministic. We just care
+ # about the what was expired (and what was not), so sort to get a known
+ # order.
+ sort <actual.raw >actual.sorted &&
+ test_cmp expect actual.sorted
+'
+
test_done
diff --git a/t/t1416-ref-transaction-hooks.sh b/t/t1416-ref-transaction-hooks.sh
index 8c777f7..d91dd3a 100755
--- a/t/t1416-ref-transaction-hooks.sh
+++ b/t/t1416-ref-transaction-hooks.sh
@@ -120,8 +120,6 @@
cat >expect <<-EOF &&
hooks/update refs/tags/PRE $ZERO_OID $PRE_OID
- hooks/reference-transaction prepared
- hooks/reference-transaction committed
hooks/update refs/tags/POST $ZERO_OID $POST_OID
hooks/reference-transaction prepared
hooks/reference-transaction committed
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 6824581..8f59b86 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -114,4 +114,11 @@
test_grep "[Uu]sage: git update-server-info " usage
'
+test_expect_success 'prune does not crash with -h' '
+ test_expect_code 129 git prune -h >usage &&
+ test_grep "[Uu]sage: git prune " usage &&
+ test_expect_code 129 nongit git prune -h >usage &&
+ test_grep "[Uu]sage: git prune " usage
+'
+
test_done
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 90638fa..023e130 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -42,8 +42,8 @@
test_expect_success '"add" refuses to checkout locked branch' '
test_must_fail git worktree add zere main &&
- ! test -d zere &&
- ! test -d .git/worktrees/zere
+ test_path_is_missing zere &&
+ test_path_is_missing .git/worktrees/zere
'
test_expect_success 'checking out paths not complaining about linked checkouts' '
@@ -70,14 +70,14 @@
test_expect_success '"add" worktree with lock' '
git worktree add --detach --lock here-with-lock main &&
test_when_finished "git worktree unlock here-with-lock || :" &&
- test -f .git/worktrees/here-with-lock/locked
+ test_path_is_file .git/worktrees/here-with-lock/locked
'
test_expect_success '"add" worktree with lock and reason' '
lock_reason="why not" &&
git worktree add --detach --lock --reason "$lock_reason" here-with-lock-reason main &&
test_when_finished "git worktree unlock here-with-lock-reason || :" &&
- test -f .git/worktrees/here-with-lock-reason/locked &&
+ test_path_is_file .git/worktrees/here-with-lock-reason/locked &&
echo "$lock_reason" >expect &&
test_cmp expect .git/worktrees/here-with-lock-reason/locked
'
@@ -412,14 +412,14 @@
test_expect_success '"add" worktree with orphan branch and lock' '
git worktree add --lock --orphan -b orphanbr orphan-with-lock &&
test_when_finished "git worktree unlock orphan-with-lock || :" &&
- test -f .git/worktrees/orphan-with-lock/locked
+ test_path_is_file .git/worktrees/orphan-with-lock/locked
'
test_expect_success '"add" worktree with orphan branch, lock, and reason' '
lock_reason="why not" &&
git worktree add --detach --lock --reason "$lock_reason" orphan-with-lock-reason main &&
test_when_finished "git worktree unlock orphan-with-lock-reason || :" &&
- test -f .git/worktrees/orphan-with-lock-reason/locked &&
+ test_path_is_file .git/worktrees/orphan-with-lock-reason/locked &&
echo "$lock_reason" >expect &&
test_cmp expect .git/worktrees/orphan-with-lock-reason/locked
'
@@ -474,7 +474,7 @@
test_expect_success '"add" worktree with --no-checkout' '
git worktree add --no-checkout -b swamp swamp &&
- ! test -e swamp/init.t &&
+ test_path_is_missing swamp/init.t &&
git -C swamp reset --hard &&
test_cmp init.t swamp/init.t
'
@@ -497,7 +497,7 @@
test_expect_success 'add a worktree, checking out a rebased branch' '
test_must_fail git worktree add new-rebase under-rebase &&
- ! test -d new-rebase
+ test_path_is_missing new-rebase
'
test_expect_success 'checking out a rebased branch from another worktree' '
@@ -535,7 +535,7 @@
git worktree list >actual &&
grep "under-bisect.*detached HEAD" actual &&
test_must_fail git worktree add new-bisect under-bisect &&
- ! test -d new-bisect
+ test_path_is_missing new-bisect
)
'
@@ -1165,7 +1165,7 @@
test_expect_success FUNNYNAMES 'sanitize generated worktree name' '
git worktree add --detach ". weird*..?.lock.lock" &&
- test -d .git/worktrees/---weird-.-
+ test_path_is_dir .git/worktrees/---weird-.-
'
test_expect_success '"add" should not fail because of another bad worktree' '
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 13f66fd..b41e7f0 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -73,25 +73,6 @@
test_cmp expected1 output
'
-test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
- git init super &&
- git init sub &&
- (
- cd sub &&
- >a &&
- git add a &&
- git commit -m sub &&
- git pack-refs --all
- ) &&
- (
- cd super &&
- "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub &&
- git ls-files --others --exclude-standard >../actual
- ) &&
- echo sub/ >expect &&
- test_cmp expect actual
-'
-
test_expect_success 'setup nested pathspec search' '
test_create_repo nested &&
(
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 26b42a5..5d093e3 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -394,6 +394,16 @@
)
'
+test_expect_success 'autosquash with invalid custom instructionFormat' '
+ git reset --hard base &&
+ test_commit invalid-instructionFormat-test &&
+ (
+ test_must_fail git -c rebase.instructionFormat=blah \
+ rebase --autosquash --force-rebase -i HEAD^ &&
+ test_path_is_missing .git/rebase-merge
+ )
+'
+
set_backup_editor () {
write_script backup-editor.sh <<-\EOF
cp "$1" .git/backup-"$(basename "$1")"
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 127216f..b8a8dd7 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -328,6 +328,19 @@
test_expect_code 129 git rebase --edit-todo --no-reschedule-failed-exec
'
+test_expect_success 'no change in comment character due to conflicts markers with core.commentChar=auto' '
+ git checkout -b branch-a &&
+ test_commit A F1 &&
+ git checkout -b branch-b HEAD^ &&
+ test_commit B F1 &&
+ test_must_fail git rebase branch-a &&
+ printf "B\nA\n" >F1 &&
+ git add F1 &&
+ GIT_EDITOR="cat >actual" git -c core.commentChar=auto rebase --continue &&
+ # Check that "#" is still the comment character.
+ test_grep "^# Changes to be committed" actual
+'
+
test_orig_head_helper () {
test_when_finished 'git rebase --abort &&
git checkout topic &&
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 98259e2..1f16e6b 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -17,11 +17,6 @@
git commit -m "add normal files"
'
-if test_have_prereq !FUNNYNAMES
-then
- say 'Your filesystem does not allow tabs in filenames.'
-fi
-
test_expect_success FUNNYNAMES 'add files with funny names' '
touch -- "tab embedded" "newline${LF}embedded" &&
git add -- "tab embedded" "newline${LF}embedded" &&
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index b8a05d9..04d2a19 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -63,7 +63,7 @@
'
test_expect_success 'status works (initial)' '
git add -i </dev/null >output &&
- grep "+1/-0 *+2/-0 file" output
+ test_grep "+1/-0 *+2/-0 file" output
'
test_expect_success 'setup expected' '
@@ -86,7 +86,7 @@
git add file &&
test_write_lines r 1 | git add -i &&
git ls-files >output &&
- ! grep . output
+ test_grep ! . output
'
test_expect_success 'add untracked (multiple)' '
@@ -109,7 +109,7 @@
'
test_expect_success 'status works (commit)' '
git add -i </dev/null >output &&
- grep "+1/-0 *+2/-0 file" output
+ test_grep "+1/-0 *+2/-0 file" output
'
test_expect_success 'update can stage deletions' '
@@ -141,7 +141,7 @@
git add file &&
test_write_lines r 1 | git add -i &&
git add -i </dev/null >output &&
- grep "unchanged *+3/-0 file" output
+ test_grep "unchanged *+3/-0 file" output
'
test_expect_success 'reject multi-key input' '
@@ -185,7 +185,7 @@
test_expect_success 'bad edit rejected' '
git reset &&
test_write_lines e n d | git add -p >output &&
- grep "hunk does not apply" output
+ test_grep "hunk does not apply" output
'
test_expect_success 'setup patch' '
@@ -198,7 +198,7 @@
test_expect_success 'garbage edit rejected' '
git reset &&
test_write_lines e n d | git add -p >output &&
- grep "hunk does not apply" output
+ test_grep "hunk does not apply" output
'
test_expect_success 'setup patch' '
@@ -313,8 +313,8 @@
chmod +x file &&
printf "y\\ny\\n" | git add -p &&
git diff --cached file >out &&
- grep "new mode" out &&
- grep "+content" out &&
+ test_grep "new mode" out &&
+ test_grep "+content" out &&
git diff file >out &&
test_must_be_empty out
'
@@ -636,7 +636,7 @@
printf "%s\n" s e q n q q |
EDITOR=: git add -p &&
git diff >actual &&
- ! grep "^+15" actual
+ test_grep ! "^+15" actual
'
test_expect_success 'split hunk "add -p (no, yes, edit)"' '
@@ -648,7 +648,7 @@
EDITOR=: git add -p 2>error &&
test_must_be_empty error &&
git diff >actual &&
- ! grep "^+31" actual
+ test_grep ! "^+31" actual
'
test_expect_success 'split hunk with incomplete line at end' '
@@ -682,7 +682,7 @@
EDITOR=./fake_editor.sh git add -p 2>error &&
test_must_be_empty error &&
git diff --cached >actual &&
- grep "^+22" actual
+ test_grep "^+22" actual
'
test_expect_success 'patch mode ignores unmerged entries' '
@@ -696,7 +696,7 @@
test_must_fail git merge side &&
echo changed >non-conflict.t &&
echo y | git add -p >output &&
- ! grep a/conflict.t output &&
+ test_grep ! a/conflict.t output &&
cat >expected <<-\EOF &&
* Unmerged path conflict.t
diff --git a/non-conflict.t b/non-conflict.t
@@ -728,7 +728,7 @@
# We do not want to depend on the exact coloring scheme
# git uses for diffs, so just check that we saw some kind of color.
- grep "$(printf "\\033")" output
+ test_grep "$(printf "\\033")" output
'
test_expect_success 'colors can be overridden' '
@@ -743,7 +743,7 @@
-c color.interactive.error=blue \
add -i 2>err.raw <input &&
test_decode_color <err.raw >err &&
- grep "<BLUE>Huh (trigger)?<RESET>" err &&
+ test_grep "<BLUE>Huh (trigger)?<RESET>" err &&
test_write_lines help quit >input &&
force_color git \
@@ -863,7 +863,7 @@
printf y >y &&
force_color git -c diff.wsErrorHighlight=all add -p >output.raw 2>&1 <y &&
test_decode_color <output.raw >output &&
- grep "old<" output
+ test_grep "old<" output
'
test_expect_success 'diffFilter filters diff' '
@@ -876,7 +876,7 @@
# avoid depending on the exact coloring or content of the prompts,
# and just make sure we saw our diff prefixed
- grep foo:.*content output
+ test_grep foo:.*content output
'
test_expect_success 'detect bogus diffFilter output' '
@@ -886,7 +886,7 @@
test_config interactive.diffFilter "sed 6d" &&
printf y >y &&
force_color test_must_fail git add -p <y >output 2>&1 &&
- grep "mismatched output" output
+ test_grep "mismatched output" output
'
test_expect_success 'handle iffy colored hunk headers' '
@@ -896,7 +896,7 @@
printf n >n &&
force_color git -c interactive.diffFilter="sed s/.*@@.*/XX/" \
add -p >output 2>&1 <n &&
- grep "^XX$" output
+ test_grep "^XX$" output
'
test_expect_success 'handle very large filtered diff' '
@@ -1002,7 +1002,7 @@
# update it, but we want to be sure that our "." pathspec
# was not expanded into the argument list of any command.
# So look only for "not-changed".
- ! grep -E "^trace: (built-in|exec|run_command): .*not-changed" trace.out
+ test_grep ! -E "^trace: (built-in|exec|run_command): .*not-changed" trace.out
'
test_expect_success 'hunk-editing handles custom comment char' '
@@ -1072,21 +1072,21 @@
test_expect_success 'status ignores dirty submodules (except HEAD)' '
git -C for-submodules add -i </dev/null >output &&
- grep dirty-head output &&
- grep dirty-both-ways output &&
- ! grep dirty-otherwise output
+ test_grep dirty-head output &&
+ test_grep dirty-both-ways output &&
+ test_grep ! dirty-otherwise output
'
test_expect_success 'handle submodules' '
echo 123 >>for-submodules/dirty-otherwise/initial.t &&
force_color git -C for-submodules add -p dirty-otherwise >output 2>&1 &&
- grep "No changes" output &&
+ test_grep "No changes" output &&
force_color git -C for-submodules add -p dirty-head >output 2>&1 <y &&
git -C for-submodules ls-files --stage dirty-head >actual &&
rev="$(git -C for-submodules/dirty-head rev-parse HEAD)" &&
- grep "$rev" actual
+ test_grep "$rev" actual
'
test_expect_success 'set up pathological context' '
@@ -1230,4 +1230,75 @@
test_cmp expect actual
'
+test_expect_success 'add -p respects diff.context' '
+ test_write_lines a b c d e f g h i j k l m >file &&
+ git add file &&
+ test_write_lines a b c d e f G h i j k l m >file &&
+ echo y | git -c diff.context=5 add -p >actual &&
+ test_grep "@@ -2,11 +2,11 @@" actual
+'
+
+test_expect_success 'add -p respects diff.interHunkContext' '
+ test_write_lines a b c d e f g h i j k l m n o p q r s >file &&
+ git add file &&
+ test_write_lines a b c d E f g i i j k l m N o p q r s >file &&
+ echo y | git -c diff.interhunkcontext=2 add -p >actual &&
+ test_grep "@@ -2,16 +2,16 @@" actual
+'
+
+test_expect_success 'add -p rejects negative diff.context' '
+ test_config diff.context -1 &&
+ test_must_fail git add -p 2>output &&
+ test_grep "diff.context cannot be negative" output
+'
+
+for cmd in add checkout restore 'commit -m file'
+do
+ test_expect_success "${cmd%% *} accepts -U and --inter-hunk-context" '
+ test_write_lines a b c d e f g h i j k l m n o p q r s t u v >file &&
+ git add file &&
+ test_write_lines a b c d e F g h i j k l m n o p Q r s t u v >file &&
+ echo y | git -c diff.context=5 -c diff.interhunkcontext=1 \
+ $cmd -p -U 4 --inter-hunk-context 2 >actual &&
+ test_grep "@@ -2,20 +2,20 @@" actual
+ '
+done
+
+test_expect_success 'reset accepts -U and --inter-hunk-context' '
+ test_write_lines a b c d e f g h i j k l m n o p q r s t u v >file &&
+ git commit -m file file &&
+ test_write_lines a b c d e F g h i j k l m n o p Q r s t u v >file &&
+ git add file &&
+ echo y | git -c diff.context=5 -c diff.interhunkcontext=1 \
+ reset -p -U 4 --inter-hunk-context 2 >actual &&
+ test_grep "@@ -2,20 +2,20 @@" actual
+'
+
+test_expect_success 'stash accepts -U and --inter-hunk-context' '
+ test_write_lines a b c d e F g h i j k l m n o p Q r s t u v >file &&
+ git commit -m file file &&
+ test_write_lines a b c d e f g h i j k l m n o p q r s t u v >file &&
+ echo y | git -c diff.context=5 -c diff.interhunkcontext=1 \
+ stash -p -U 4 --inter-hunk-context 2 >actual &&
+ test_grep "@@ -2,20 +2,20 @@" actual
+'
+
+for cmd in add checkout commit reset restore "stash save" "stash push"
+do
+ test_expect_success "$cmd rejects invalid context options" '
+ test_must_fail git $cmd -p -U -3 2>actual &&
+ cat actual | echo &&
+ test_grep -e ".--unified. cannot be negative" actual &&
+
+ test_must_fail git $cmd -p --inter-hunk-context -3 2>actual &&
+ test_grep -e ".--inter-hunk-context. cannot be negative" actual &&
+
+ test_must_fail git $cmd -U 7 2>actual &&
+ test_grep -E ".--unified. requires .(--interactive/)?--patch." actual &&
+
+ test_must_fail git $cmd --inter-hunk-context 2 2>actual &&
+ test_grep -E ".--inter-hunk-context. requires .(--interactive/)?--patch." actual
+ '
+done
+
test_done
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 74666ff..0bb4648 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -11,6 +11,13 @@
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-unique-files.sh
+test_expect_success 'setup' '
+ test_oid_cache <<-EOF
+ export_base sha1:73c9bab443d1f88ac61aa533d2eeaaa15451239c
+ export_base sha256:f210fa6346e3e2ce047bdb570426b17075980c1ac01fec8fc4b75bd3ab4bcfe4
+ EOF
+'
+
test_expect_success 'usage on cmd and subcommand invalid option' '
test_expect_code 129 git stash --invalid-option 2>usage &&
grep "or: git stash" usage &&
@@ -1177,6 +1184,28 @@
test_path_is_file bar
'
+test_expect_success 'stash --patch <pathspec> stash and restores the file' '
+ test_write_lines b c >file &&
+ git commit -m "add a few lines" file &&
+ test_write_lines a b c d >file &&
+ test_write_lines b c d >expect-file &&
+ echo changed-other-file >other-file &&
+ test_write_lines s y n | git stash -m "stash bar" --patch file &&
+ test_cmp expect-file file &&
+ echo changed-other-file >expect &&
+ test_cmp expect other-file &&
+ git checkout HEAD -- file &&
+ git stash pop &&
+ test_cmp expect other-file &&
+ test_write_lines a b c >expect &&
+ test_cmp expect file
+'
+
+test_expect_success 'stash <pathspec> -p is rejected' '
+ test_must_fail git stash file -p 2>err &&
+ test_grep "subcommand wasn${SQ}t specified; ${SQ}push${SQ} can${SQ}t be assumed due to unexpected token ${SQ}file${SQ}" err
+'
+
test_expect_success 'stash -- <pathspec> stashes in subdirectory' '
mkdir sub &&
>foo &&
@@ -1412,6 +1441,100 @@
)
'
+test_expect_success 'stash export and import round-trip stashes' '
+ git reset &&
+ >untracked &&
+ >tracked1 &&
+ >tracked2 &&
+ git add tracked* &&
+ git stash -- &&
+ >subdir/untracked &&
+ >subdir/tracked1 &&
+ >subdir/tracked2 &&
+ git add subdir/tracked* &&
+ git stash --include-untracked -- subdir/ &&
+ git tag t-stash0 stash@{0} &&
+ git tag t-stash1 stash@{1} &&
+ simple=$(git stash export --print) &&
+ git stash clear &&
+ git stash import "$simple" &&
+ test_cmp_rev stash@{0} t-stash0 &&
+ test_cmp_rev stash@{1} t-stash1 &&
+ git stash export --to-ref refs/heads/foo &&
+ test_cmp_rev "$(test_oid empty_tree)" foo: &&
+ test_cmp_rev "$(test_oid empty_tree)" foo^: &&
+ test_cmp_rev t-stash0 foo^2 &&
+ test_cmp_rev t-stash1 foo^^2 &&
+ git log --first-parent --format="%s" refs/heads/foo >log &&
+ grep "^git stash: " log >log2 &&
+ test_line_count = 13 log2 &&
+ git stash clear &&
+ git stash import foo &&
+ test_cmp_rev stash@{0} t-stash0 &&
+ test_cmp_rev stash@{1} t-stash1
+'
+
+test_expect_success 'stash import appends commits' '
+ git log --format=oneline -g refs/stash >out &&
+ cat out out >out2 &&
+ git stash import refs/heads/foo &&
+ git log --format=oneline -g refs/stash >actual &&
+ test_line_count = $(wc -l <out2) actual
+'
+
+test_expect_success 'stash export can accept specified stashes' '
+ git stash clear &&
+ git stash import foo &&
+ git stash export --to-ref refs/heads/bar stash@{1} stash@{0} &&
+ git stash clear &&
+ git stash import refs/heads/bar &&
+ test_cmp_rev stash@{1} t-stash0 &&
+ test_cmp_rev stash@{0} t-stash1 &&
+ git log --format=oneline -g refs/stash >actual &&
+ test_line_count = 2 actual
+'
+
+test_expect_success 'stash export rejects invalid arguments' '
+ test_must_fail git stash export --print --to-ref refs/heads/invalid 2>err &&
+ grep "exactly one of --print and --to-ref is required" err &&
+ test_must_fail git stash export 2>err2 &&
+ grep "exactly one of --print and --to-ref is required" err2
+'
+
+test_expect_success 'stash can import and export zero stashes' '
+ git stash clear &&
+ git stash export --to-ref refs/heads/baz &&
+ test_cmp_rev "$(test_oid empty_tree)" baz: &&
+ test_cmp_rev "$(test_oid export_base)" baz &&
+ test_must_fail git rev-parse baz^1 &&
+ git stash import baz &&
+ test_must_fail git rev-parse refs/stash
+'
+
+test_expect_success 'stash rejects invalid attempts to import commits' '
+ git stash import foo &&
+ test_must_fail git stash import HEAD 2>output &&
+ oid=$(git rev-parse HEAD) &&
+ grep "$oid is not a valid exported stash commit" output &&
+ test_cmp_rev stash@{0} t-stash0 &&
+
+ git checkout --orphan orphan &&
+ git commit-tree $(test_oid empty_tree) -p "$oid" -p "$oid^" -m "" >fake-commit &&
+ git update-ref refs/heads/orphan "$(cat fake-commit)" &&
+ oid=$(git rev-parse HEAD) &&
+ test_must_fail git stash import orphan 2>output &&
+ grep "found stash commit $oid without expected prefix" output &&
+ test_cmp_rev stash@{0} t-stash0 &&
+
+ git checkout --orphan orphan2 &&
+ git commit-tree $(test_oid empty_tree) -m "" >fake-commit &&
+ git update-ref refs/heads/orphan2 "$(cat fake-commit)" &&
+ oid=$(git rev-parse HEAD) &&
+ test_must_fail git stash import orphan2 2>output &&
+ grep "found root commit $oid with invalid data" output &&
+ test_cmp_rev stash@{0} t-stash0
+'
+
test_expect_success 'stash apply should succeed with unmodified file' '
echo base >file &&
git add file &&
@@ -1549,11 +1672,9 @@
echo change >A.file &&
touch .git/index.lock &&
- cat >expect <<-EOF &&
- error: could not write index
- EOF
test_must_fail git stash create 2>err &&
- test_cmp expect err
+ test_grep "error: could not write index" err &&
+ test_grep "error: Unable to create '.*index.lock'" err
)
'
@@ -1566,11 +1687,9 @@
echo change >A.file &&
touch .git/index.lock &&
- cat >expect <<-EOF &&
- error: could not write index
- EOF
test_must_fail git stash push 2>err &&
- test_cmp expect err
+ test_grep "error: could not write index" err &&
+ test_grep "error: Unable to create '.*index.lock'" err
)
'
@@ -1584,11 +1703,41 @@
git stash push &&
touch .git/index.lock &&
- cat >expect <<-EOF &&
- error: could not write index
- EOF
test_must_fail git stash apply 2>err &&
- test_cmp expect err
+ test_grep "error: could not write index" err &&
+ test_grep "error: Unable to create '.*index.lock'" err
+ )
+'
+
+test_expect_success 'submodules does not affect the branch recorded in stash message' '
+ git init sub_project &&
+ (
+ cd sub_project &&
+ echo "Initial content in sub_project" >sub_file.txt &&
+ git add sub_file.txt &&
+ git commit -m "Initial commit in sub_project"
+ ) &&
+
+ git init main_project &&
+ (
+ cd main_project &&
+ echo "Initial content in main_project" >main_file.txt &&
+ git add main_file.txt &&
+ git commit -m "Initial commit in main_project" &&
+
+ git -c protocol.file.allow=always submodule add ../sub_project sub &&
+ git commit -m "Added submodule sub_project" &&
+
+ git checkout -b feature_main &&
+ git -C sub checkout -b feature_sub &&
+
+ git checkout -b work_branch &&
+ echo "Important work to be stashed" >work_item.txt &&
+ git add work_item.txt &&
+ git stash push -m "custom stash for work_branch" &&
+
+ git stash list >../actual_stash_list.txt &&
+ grep "On work_branch: custom stash for work_branch" ../actual_stash_list.txt
)
'
diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh
index a51f881..32b14e3 100755
--- a/t/t4000-diff-format.sh
+++ b/t/t4000-diff-format.sh
@@ -36,7 +36,7 @@
# that's as far as it comes
if [ "$(git config --get core.filemode)" = false ]
then
- say 'filemode disabled on the filesystem'
+ skip_all='filemode disabled on the filesystem'
test_done
fi
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 782d97f..8ebd170 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -206,14 +206,30 @@
expect="$TEST_DIRECTORY/t4013/diff.$test"
actual="$pfx-diff.$test"
- test_expect_success "git $cmd # magic is ${magic:-(not used)}" '
+ case "$cmd" in
+ whatchanged | whatchanged" "*)
+ prereq=!WITH_BREAKING_CHANGES
+ ;;
+ *)
+ prereq=;;
+ esac
+
+ test_expect_success $prereq "git $cmd # magic is ${magic:-(not used)}" '
{
echo "$ git $cmd"
+
+ case "$cmd" in
+ whatchanged | whatchanged" "*)
+ run="whatchanged --i-still-use-this"
+ run="$run ${cmd#whatchanged}" ;;
+ *)
+ run=$cmd ;;
+ esac &&
case "$magic" in
"")
- GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
+ GIT_PRINT_SHA1_ELLIPSIS=yes git $run ;;
noellipses)
- git $cmd ;;
+ git $run ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
@@ -460,6 +476,11 @@
diff-tree -R --stat --compact-summary initial mode
EOF
+test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' '
+ test_must_fail git whatchanged >message 2>&1 &&
+ test_grep "nominated for removal" message
+'
+
test_expect_success 'log -m matches pure log' '
git log master >result &&
process_diffs result >expected &&
diff --git a/t/t4018/r-indent b/t/t4018/r-indent
new file mode 100644
index 0000000..9df440f
--- /dev/null
+++ b/t/t4018/r-indent
@@ -0,0 +1,6 @@
+RIGHT <- function(a, b) {
+ c = mean(a, b)
+ d = c + 2
+ ChangeMe()
+ return (d)
+}
diff --git a/t/t4018/r-indent-nested b/t/t4018/r-indent-nested
new file mode 100644
index 0000000..30412e6
--- /dev/null
+++ b/t/t4018/r-indent-nested
@@ -0,0 +1,10 @@
+LEFT = function(a, b) {
+ c = mean(a, b)
+ RIGHT = function(d, e) {
+ f = var(d, e)
+ g = f + 1
+ ChangeMe()
+ return (g)
+ }
+ return (RIGHT(2, 3))
+}
diff --git a/t/t4018/r-noindent b/t/t4018/r-noindent
new file mode 100644
index 0000000..6d9b01f
--- /dev/null
+++ b/t/t4018/r-noindent
@@ -0,0 +1,6 @@
+RIGHT <- function(a, b) {
+c = mean(a, b)
+d = c + 2
+ChangeMe()
+return (c)
+}
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index 28f9d83..4d4aa16 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -48,11 +48,12 @@
git commit "$@" -m "Commit $*" >/dev/null
}
-test_create_repo sm1 &&
-add_file . foo >/dev/null
-
-head1=$(add_file sm1 foo1 foo2)
-fullhead1=$(cd sm1; git rev-parse --verify HEAD)
+test_expect_success 'setup submodule' '
+ git init sm1 &&
+ add_file . foo &&
+ head1=$(add_file sm1 foo1 foo2) &&
+ fullhead1=$(cd sm1 && git rev-parse --verify HEAD)
+'
test_expect_success 'added submodule' '
git add sm1 &&
@@ -235,10 +236,13 @@
test_cmp expected actual
'
-rm -f sm1 &&
-test_create_repo sm1 &&
-head6=$(add_file sm1 foo6 foo7)
-fullhead6=$(cd sm1; git rev-parse --verify HEAD)
+test_expect_success 'setup submodule anew' '
+ rm -f sm1 &&
+ git init sm1 &&
+ head6=$(add_file sm1 foo6 foo7) &&
+ fullhead6=$(cd sm1 && git rev-parse --verify HEAD)
+'
+
test_expect_success 'nonexistent commit' '
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/t/t4042-diff-textconv-caching.sh b/t/t4042-diff-textconv-caching.sh
index ff0e735..31018ce 100755
--- a/t/t4042-diff-textconv-caching.sh
+++ b/t/t4042-diff-textconv-caching.sh
@@ -120,6 +120,14 @@
'
test_expect_success 'caching is silently ignored outside repo' '
+ test_oid_cache <<-\EOM &&
+ oid1 sha1:5626abf
+ oid1 sha256:a4ed1f3
+ oid2 sha1:f719efd
+ oid2 sha256:aa9e7dc
+ EOM
+ oid1=$(test_oid --hash=builtin oid1) &&
+ oid2=$(test_oid --hash=builtin oid2) &&
mkdir -p non-repo &&
echo one >non-repo/one &&
echo two >non-repo/two &&
@@ -129,9 +137,9 @@
-c diff.test.textconv="tr a-z A-Z <" \
-c diff.test.cachetextconv=true \
diff --no-index one two >actual &&
- cat >expect <<-\EOF &&
+ cat >expect <<-EOF &&
diff --git a/one b/two
- index 5626abf..f719efd 100644
+ index $oid1..$oid2 100644
--- a/one
+++ b/two
@@ -1 +1 @@
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh
index 5e5bad6..01db924 100755
--- a/t/t4053-diff-no-index.sh
+++ b/t/t4053-diff-no-index.sh
@@ -295,4 +295,79 @@
test_cmp expect actual
'
+test_expect_success 'diff --no-index F F rejects pathspecs' '
+ test_must_fail git diff --no-index -- a/1 a/2 a 2>actual.err &&
+ test_grep "usage: git diff --no-index" actual.err
+'
+
+test_expect_success 'diff --no-index D F rejects pathspecs' '
+ test_must_fail git diff --no-index -- a a/2 a 2>actual.err &&
+ test_grep "usage: git diff --no-index" actual.err
+'
+
+test_expect_success 'diff --no-index F D rejects pathspecs' '
+ test_must_fail git diff --no-index -- a/1 b b 2>actual.err &&
+ test_grep "usage: git diff --no-index" actual.err
+'
+
+test_expect_success 'diff --no-index rejects absolute pathspec' '
+ test_must_fail git diff --no-index -- a b $(pwd)/a/1
+'
+
+test_expect_success 'diff --no-index with pathspec' '
+ test_expect_code 1 git diff --name-status --no-index a b 1 >actual &&
+ cat >expect <<-EOF &&
+ D a/1
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'diff --no-index with pathspec no matches' '
+ test_expect_code 0 git diff --name-status --no-index a b missing
+'
+
+test_expect_success 'diff --no-index with negative pathspec' '
+ test_expect_code 1 git diff --name-status --no-index a b ":!2" >actual &&
+ cat >expect <<-EOF &&
+ D a/1
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'setup nested' '
+ mkdir -p c/1/2 &&
+ mkdir -p d/1/2 &&
+ echo 1 >c/1/2/a &&
+ echo 2 >c/1/2/b
+'
+
+test_expect_success 'diff --no-index with pathspec nested negative pathspec' '
+ test_expect_code 0 git diff --no-index c d ":!1"
+'
+
+test_expect_success 'diff --no-index with pathspec nested pathspec' '
+ test_expect_code 1 git diff --name-status --no-index c d 1/2 >actual &&
+ cat >expect <<-EOF &&
+ D c/1/2/a
+ D c/1/2/b
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'diff --no-index with pathspec glob' '
+ test_expect_code 1 git diff --name-status --no-index c d ":(glob)**/a" >actual &&
+ cat >expect <<-EOF &&
+ D c/1/2/a
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'diff --no-index with pathspec glob and exclude' '
+ test_expect_code 1 git diff --name-status --no-index c d ":(glob,exclude)**/a" >actual &&
+ cat >expect <<-EOF &&
+ D c/1/2/b
+ EOF
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t4055-diff-context.sh b/t/t4055-diff-context.sh
index ec2804e..1384a81 100755
--- a/t/t4055-diff-context.sh
+++ b/t/t4055-diff-context.sh
@@ -38,55 +38,55 @@
test_expect_success 'the default number of context lines is 3' '
git diff >output &&
- ! grep "^ d" output &&
- grep "^ e" output &&
- grep "^ j" output &&
- ! grep "^ k" output
+ test_grep ! "^ d" output &&
+ test_grep "^ e" output &&
+ test_grep "^ j" output &&
+ test_grep ! "^ k" output
'
test_expect_success 'diff.context honored by "log"' '
git log -1 -p >output &&
- ! grep firstline output &&
- git config diff.context 8 &&
+ test_grep ! firstline output &&
+ test_config diff.context 8 &&
git log -1 -p >output &&
- grep "^ firstline" output
+ test_grep "^ firstline" output
'
test_expect_success 'The -U option overrides diff.context' '
- git config diff.context 8 &&
+ test_config diff.context 8 &&
git log -U4 -1 >output &&
- ! grep "^ firstline" output
+ test_grep ! "^ firstline" output
'
test_expect_success 'diff.context honored by "diff"' '
- git config diff.context 8 &&
+ test_config diff.context 8 &&
git diff >output &&
- grep "^ firstline" output
+ test_grep "^ firstline" output
'
test_expect_success 'plumbing not affected' '
- git config diff.context 8 &&
+ test_config diff.context 8 &&
git diff-files -p >output &&
- ! grep "^ firstline" output
+ test_grep ! "^ firstline" output
'
test_expect_success 'non-integer config parsing' '
- git config diff.context no &&
+ test_config diff.context no &&
test_must_fail git diff 2>output &&
test_grep "bad numeric config value" output
'
test_expect_success 'negative integer config parsing' '
- git config diff.context -1 &&
+ test_config diff.context -1 &&
test_must_fail git diff 2>output &&
test_grep "bad config variable" output
'
test_expect_success '-U0 is valid, so is diff.context=0' '
- git config diff.context 0 &&
+ test_config diff.context 0 &&
git diff >output &&
- grep "^-ADDED" output &&
- grep "^+MODIFIED" output
+ test_grep "^-ADDED" output &&
+ test_grep "^+MODIFIED" output
'
test_expect_success '-U2147483647 works' '
@@ -94,9 +94,9 @@
test_line_count = 16 x &&
git diff -U2147483647 >output &&
test_line_count = 22 output &&
- grep "^-ADDED" output &&
- grep "^+MODIFIED" output &&
- grep "^+APPENDED" output
+ test_grep "^-ADDED" output &&
+ test_grep "^+MODIFIED" output &&
+ test_grep "^+APPENDED" output
'
test_done
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh
index 76b8310..dbfeb74 100755
--- a/t/t4060-diff-submodule-option-diff-format.sh
+++ b/t/t4060-diff-submodule-option-diff-format.sh
@@ -363,9 +363,12 @@
diff_cmp expected actual
'
-rm -f sm1 &&
-test_create_repo sm1 &&
-head6=$(add_file sm1 foo6 foo7)
+test_expect_success 'setup' '
+ rm -f sm1 &&
+ git init sm1 &&
+ head6=$(add_file sm1 foo6 foo7)
+'
+
test_expect_success 'nonexistent commit' '
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/t/t4140-apply-ita.sh b/t/t4140-apply-ita.sh
index c614eaf..0b11a8a 100755
--- a/t/t4140-apply-ita.sh
+++ b/t/t4140-apply-ita.sh
@@ -7,6 +7,10 @@
test_expect_success setup '
test_write_lines 1 2 3 4 5 >blueprint &&
+ cat blueprint >committed-file &&
+ git add committed-file &&
+ git commit -m "commit" &&
+
cat blueprint >test-file &&
git add -N test-file &&
git diff >creation-patch &&
@@ -14,7 +18,14 @@
rm -f test-file &&
git diff >deletion-patch &&
- grep "deleted file mode 100644" deletion-patch
+ grep "deleted file mode 100644" deletion-patch &&
+
+ git rm -f test-file &&
+ test_write_lines 6 >>committed-file &&
+ cat blueprint >test-file &&
+ git add -N test-file &&
+ git diff >complex-patch &&
+ git restore committed-file
'
test_expect_success 'apply creation patch to ita path (--cached)' '
@@ -53,4 +64,22 @@
git ls-files --stage --error-unmatch test-file
'
+test_expect_success 'apply creation patch to existing index with -N' '
+ git rm -f test-file &&
+ cat blueprint >index-file &&
+ git add index-file &&
+ git apply -N creation-patch &&
+
+ git ls-files --stage --error-unmatch index-file &&
+ git ls-files --stage --error-unmatch test-file
+'
+
+test_expect_success 'apply complex patch with -N' '
+ git rm -f test-file index-file &&
+ git apply -N complex-patch &&
+
+ git ls-files --stage --error-unmatch test-file &&
+ git diff | grep "a/committed-file"
+'
+
test_done
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 2ae93d3..699a81a 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -1086,7 +1086,7 @@
# bump from, date, and subject down to in-body header
awk "
/^From:/{
- print \"From: x <x\@example.com>\";
+ print \"From: x <x@example.com>\";
print \"Date: Sat, 1 Jan 2000 00:00:00 +0000\";
print \"Subject: x\n\";
}; 1
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 51f7beb..05cee9e 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -134,6 +134,12 @@
'
+test_expect_success 'all-negative filter' '
+ git log --no-renames --format=%s --diff-filter=d HEAD >actual &&
+ printf "%s\n" fifth fourth third second initial >expect &&
+ test_cmp expect actual
+'
+
test_expect_success 'diff-filter=R' '
git log -M --pretty="format:%s" --diff-filter=R HEAD >actual &&
@@ -486,10 +492,16 @@
)
'
-for cmd in show whatchanged reflog format-patch
+cmds="show reflog format-patch"
+if test_have_prereq !WITH_BREAKING_CHANGES
+then
+ cmds="$cmds whatchanged"
+fi
+for cmd in $cmds
do
case "$cmd" in
format-patch) myarg="HEAD~.." ;;
+ whatchanged) myarg=--i-still-use-this ;;
*) myarg= ;;
esac
@@ -1201,20 +1213,27 @@
test_cmp expect actual
'
-test_expect_success 'whatchanged is expected format' '
+test_expect_success !WITH_BREAKING_CHANGES 'whatchanged is expected format' '
+ whatchanged="whatchanged --i-still-use-this" &&
git log --no-merges --raw >expect &&
- git whatchanged >actual &&
+ git $whatchanged >actual &&
test_cmp expect actual
'
test_expect_success 'log.abbrevCommit configuration' '
+ whatchanged="whatchanged --i-still-use-this" &&
+
git log --abbrev-commit >expect.log.abbrev &&
git log --no-abbrev-commit >expect.log.full &&
git log --pretty=raw >expect.log.raw &&
git reflog --abbrev-commit >expect.reflog.abbrev &&
git reflog --no-abbrev-commit >expect.reflog.full &&
- git whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
- git whatchanged --no-abbrev-commit >expect.whatchanged.full &&
+
+ if test_have_prereq !WITH_BREAKING_CHANGES
+ then
+ git $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
+ git $whatchanged --no-abbrev-commit >expect.whatchanged.full
+ fi &&
test_config log.abbrevCommit true &&
@@ -1231,10 +1250,13 @@
git reflog --no-abbrev-commit >actual &&
test_cmp expect.reflog.full actual &&
- git whatchanged >actual &&
- test_cmp expect.whatchanged.abbrev actual &&
- git whatchanged --no-abbrev-commit >actual &&
- test_cmp expect.whatchanged.full actual
+ if test_have_prereq !WITH_BREAKING_CHANGES
+ then
+ git $whatchanged >actual &&
+ test_cmp expect.whatchanged.abbrev actual &&
+ git $whatchanged --no-abbrev-commit >actual &&
+ test_cmp expect.whatchanged.full actual
+ fi
'
test_expect_success '--abbrev-commit with core.abbrev=false' '
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 4a6242f..74b7ddc 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -1133,4 +1133,37 @@
test_cmp expect actual
'
+test_expect_success 'git cat-file --mailmap works with different author and committer' '
+ test_when_finished "rm .mailmap" &&
+ cat >.mailmap <<-\EOF &&
+ Mailmapped User <mailmapped-user@gitlab.com> C O Mitter <committer@example.com>
+ EOF
+ git commit --allow-empty -m "different author/committer" \
+ --author="Different Author <different@example.com>" &&
+ cat >expect <<-\EOF &&
+ author Different Author <different@example.com>
+ committer Mailmapped User <mailmapped-user@gitlab.com>
+ EOF
+ git cat-file --mailmap commit HEAD >log &&
+ sed -n -e "/^author /s/>.*/>/p" -e "/^committer /s/>.*/>/p" log >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'git cat-file --mailmap maps both author and committer when both need mapping' '
+ test_when_finished "rm .mailmap" &&
+ cat >.mailmap <<-\EOF &&
+ Mapped Author <mapped-author@example.com> <different@example.com>
+ Mapped Committer <mapped-committer@example.com> C O Mitter <committer@example.com>
+ EOF
+ git commit --allow-empty -m "both author and committer mapped" \
+ --author="Different Author <different@example.com>" &&
+ cat >expect <<-\EOF &&
+ author Mapped Author <mapped-author@example.com>
+ committer Mapped Committer <mapped-committer@example.com>
+ EOF
+ git cat-file --mailmap commit HEAD >log &&
+ sed -n -e "/^author /s/>.*/>/p" -e "/^committer /s/>.*/>/p" log >actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh
index 8910d53..639868a 100755
--- a/t/t4216-log-bloom.sh
+++ b/t/t4216-log-bloom.sh
@@ -66,8 +66,9 @@
setup () {
rm -f "$TRASH_DIRECTORY/trace.perf" &&
- git -c core.commitGraph=false log --pretty="format:%s" $1 >log_wo_bloom &&
- GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace.perf" git -c core.commitGraph=true log --pretty="format:%s" $1 >log_w_bloom
+ eval git -c core.commitGraph=false log --pretty="format:%s" "$1" >log_wo_bloom &&
+ eval "GIT_TRACE2_PERF=\"$TRASH_DIRECTORY/trace.perf\"" \
+ git -c core.commitGraph=true log --pretty="format:%s" "$1" >log_w_bloom
}
test_bloom_filters_used () {
@@ -138,10 +139,6 @@
test_bloom_filters_not_used "--walk-reflogs -- A"
'
-test_expect_success 'git log -- multiple path specs does not use Bloom filters' '
- test_bloom_filters_not_used "-- file4 A/file1"
-'
-
test_expect_success 'git log -- "." pathspec at root does not use Bloom filters' '
test_bloom_filters_not_used "-- ."
'
@@ -151,9 +148,17 @@
test_bloom_filters_used "-- *renamed"
'
-test_expect_success 'git log with wildcard that resolves to a multiple paths does not uses Bloom filters' '
- test_bloom_filters_not_used "-- *" &&
- test_bloom_filters_not_used "-- file*"
+test_expect_success 'git log with multiple literal paths uses Bloom filter' '
+ test_bloom_filters_used "-- file4 A/file1" &&
+ test_bloom_filters_used "-- *" &&
+ test_bloom_filters_used "-- file*"
+'
+
+test_expect_success 'git log with path contains a wildcard does not use Bloom filter' '
+ test_bloom_filters_not_used "-- file\*" &&
+ test_bloom_filters_not_used "-- A/\* file4" &&
+ test_bloom_filters_not_used "-- file4 A/\*" &&
+ test_bloom_filters_not_used "-- * A/\*"
'
test_expect_success 'setup - add commit-graph to the chain without Bloom filters' '
diff --git a/t/t4256/1/mailinfo.c b/t/t4256/1/mailinfo.c
index b395adb..39caeba 100644
--- a/t/t4256/1/mailinfo.c
+++ b/t/t4256/1/mailinfo.c
@@ -1214,7 +1214,7 @@ void setup_mailinfo(struct mailinfo *mi)
mi->header_stage = 1;
mi->use_inbody_headers = 1;
mi->content_top = mi->content;
- git_config(git_mailinfo_config, mi);
+ repo_config(the_repository, git_mailinfo_config, mi);
}
void clear_mailinfo(struct mailinfo *mi)
diff --git a/t/t4256/1/mailinfo.c.orig b/t/t4256/1/mailinfo.c.orig
index 3281a37..b76eb86 100644
--- a/t/t4256/1/mailinfo.c.orig
+++ b/t/t4256/1/mailinfo.c.orig
@@ -1154,7 +1154,7 @@
mi->header_stage = 1;
mi->use_inbody_headers = 1;
mi->content_top = mi->content;
- git_config(git_mailinfo_config, mi);
+ repo_config(the_repository, git_mailinfo_config, mi);
}
void clear_mailinfo(struct mailinfo *mi)
diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh
index 5174995..027dedd 100755
--- a/t/t5004-archive-corner-cases.sh
+++ b/t/t5004-archive-corner-cases.sh
@@ -176,10 +176,7 @@
blob=$(echo $s | git hash-object -w --stdin) &&
# create tree containing 65500 entries of that blob
- for i in $(test_seq 1 65500)
- do
- echo "100644 blob $blob $i" || return 1
- done >tree &&
+ test_seq -f "100644 blob $blob\t%d" 1 65500 >tree &&
tree=$(git mktree <tree) &&
# zip it, creating an archive a bit bigger than 4GB
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index a5932b6..7344578 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -525,7 +525,7 @@
test_path_is_file foo.idx
'
-test_expect_success SHA1 'show-index works OK outside a repository' '
+test_expect_success DEFAULT_HASH_ALGORITHM 'show-index works OK outside a repository' '
nongit git show-index <foo.idx
'
@@ -658,7 +658,7 @@
test_commit -C repo initial &&
git -C repo repack -ad &&
git -C repo verify-pack "$(pwd)"/repo/.git/objects/pack/*.idx &&
- if test $hash = sha1
+ if test $hash = $GIT_TEST_BUILTIN_HASH
then
nongit git verify-pack "$(pwd)"/repo/.git/objects/pack/*.idx
else
@@ -676,7 +676,7 @@
test_commit -C repo initial &&
git -C repo repack -ad &&
git -C repo index-pack --verify "$(pwd)"/repo/.git/objects/pack/*.pack &&
- if test $hash = sha1
+ if test $hash = $GIT_TEST_BUILTIN_HASH
then
nongit git index-pack --verify "$(pwd)"/repo/.git/objects/pack/*.pack
else
@@ -723,4 +723,23 @@
! test_grep "currently, --write-bitmap-index requires --name-hash-version=1" err
'
+test_expect_success '--path-walk pack everything' '
+ git -C server rev-parse HEAD >in &&
+ GIT_PROGRESS_DELAY=0 git -C server pack-objects \
+ --stdout --revs --path-walk --progress <in >out.pack 2>err &&
+ grep "Compressing objects by path" err &&
+ git -C server index-pack --stdin <out.pack
+'
+
+test_expect_success '--path-walk thin pack' '
+ cat >in <<-EOF &&
+ $(git -C server rev-parse HEAD)
+ ^$(git -C server rev-parse HEAD~2)
+ EOF
+ GIT_PROGRESS_DELAY=0 git -C server pack-objects \
+ --thin --stdout --revs --path-walk --progress <in >out.pack 2>err &&
+ grep "Compressing objects by path" err &&
+ git -C server index-pack --fix-thin --stdin <out.pack
+'
+
test_done
diff --git a/t/t5306-pack-nobase.sh b/t/t5306-pack-nobase.sh
index 805d60f..609399d 100755
--- a/t/t5306-pack-nobase.sh
+++ b/t/t5306-pack-nobase.sh
@@ -59,6 +59,11 @@
git pull ../.git &&
test $(git rev-parse HEAD) = $B &&
+ # The --path-walk feature of "git pack-objects" is not
+ # compatible with this kind of fetch from an incomplete repo.
+ GIT_TEST_PACK_PATH_WALK=0 &&
+ export GIT_TEST_PACK_PATH_WALK &&
+
git pull ../patch_clone/.git &&
test $(git rev-parse HEAD) = $C
)
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index a62b463..6718fb9 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -158,8 +158,9 @@
ls .git/objects/pack/ | grep bitmap >output &&
test_line_count = 1 output &&
# verify equivalent packs are generated with/without using bitmap index
- packasha1=$(git pack-objects --no-use-bitmap-index --all packa </dev/null) &&
- packbsha1=$(git pack-objects --use-bitmap-index --all packb </dev/null) &&
+ # Be careful to not use the path-walk option in either case.
+ packasha1=$(git pack-objects --no-use-bitmap-index --no-path-walk --all packa </dev/null) &&
+ packbsha1=$(git pack-objects --use-bitmap-index --no-path-walk --all packb </dev/null) &&
list_packed_objects packa-$packasha1.idx >packa.objects &&
list_packed_objects packb-$packbsha1.idx >packb.objects &&
test_cmp packa.objects packb.objects
@@ -388,6 +389,14 @@
git init --bare client.git &&
(
cd client.git &&
+
+ # This test relies on reusing a delta, but if the
+ # path-walk machinery is engaged, the base object
+ # is considered too small to use during the
+ # dynamic computation, so is not used.
+ GIT_TEST_PACK_PATH_WALK=0 &&
+ export GIT_TEST_PACK_PATH_WALK &&
+
git config transfer.unpackLimit 1 &&
git fetch .. delta-reuse-old:delta-reuse-old &&
git fetch .. delta-reuse-new:delta-reuse-new &&
@@ -486,6 +495,36 @@
grep "ignoring extra bitmap" trace2.txt
)
'
+
+ test_expect_success 'load corrupt bitmap' '
+ rm -fr repo &&
+ git init repo &&
+ test_when_finished "rm -fr repo" &&
+ (
+ cd repo &&
+ git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
+
+ test_commit base &&
+
+ git repack -adb &&
+ bitmap="$(ls .git/objects/pack/pack-*.bitmap)" &&
+ chmod +w $bitmap &&
+
+ test-tool bitmap list-commits-with-offset >offsets &&
+ xor_off=$(head -n1 offsets | awk "{print \$3}") &&
+ printf '\161' |
+ dd of=$bitmap count=1 bs=1 conv=notrunc seek=$xor_off &&
+
+ git rev-list --objects --no-object-names HEAD >expect.raw &&
+ git rev-list --objects --use-bitmap-index --no-object-names HEAD \
+ >actual.raw &&
+
+ sort expect.raw >expect &&
+ sort actual.raw >actual &&
+
+ test_cmp expect actual
+ )
+ '
}
test_bitmap_cases
diff --git a/t/t5316-pack-delta-depth.sh b/t/t5316-pack-delta-depth.sh
index defaa06d..03dfb7a 100755
--- a/t/t5316-pack-delta-depth.sh
+++ b/t/t5316-pack-delta-depth.sh
@@ -89,15 +89,18 @@
# adjusted (or scrapped if the heuristics have become too unreliable)
test_expect_success 'packing produces a long delta' '
# Use --window=0 to make sure we are seeing reused deltas,
- # not computing a new long chain.
- pack=$(git pack-objects --all --window=0 </dev/null pack) &&
+ # not computing a new long chain. (Also avoid the --path-walk
+ # option as it may break delta chains.)
+ pack=$(git pack-objects --all --window=0 --no-path-walk </dev/null pack) &&
echo 9 >expect &&
max_chain pack-$pack.pack >actual &&
test_cmp expect actual
'
test_expect_success '--depth limits depth' '
- pack=$(git pack-objects --all --depth=5 </dev/null pack) &&
+ # Avoid --path-walk to avoid breaking delta chains across path
+ # boundaries.
+ pack=$(git pack-objects --all --depth=5 --no-path-walk </dev/null pack) &&
echo 5 >expect &&
max_chain pack-$pack.pack >actual &&
test_cmp expect actual
diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh
index bc30bc9..2d96afd 100755
--- a/t/t5323-pack-redundant.sh
+++ b/t/t5323-pack-redundant.sh
@@ -45,6 +45,11 @@
main_repo=main.git
shared_repo=shared.git
+test_expect_success 'pack-redundant needs --i-still-use-this' '
+ test_must_fail git pack-redundant >message 2>&1 &&
+ test_grep "nominated for removal" message
+'
+
git_pack_redundant='git pack-redundant --i-still-use-this'
# Create commits in <repo> and assign each commit's oid to shell variables
diff --git a/t/t5331-pack-objects-stdin.sh b/t/t5331-pack-objects-stdin.sh
index b48c0cb..4a8df5a 100755
--- a/t/t5331-pack-objects-stdin.sh
+++ b/t/t5331-pack-objects-stdin.sh
@@ -64,7 +64,7 @@
cd stdin-packs &&
test_must_fail git pack-objects --stdin-packs --stdout \
--filter=blob:none </dev/null 2>err &&
- test_grep "cannot use --filter with --stdin-packs" err
+ test_grep "options .--stdin-packs. and .--filter. cannot be used together" err
)
'
@@ -236,4 +236,124 @@
test_cmp expected-objects actual-objects
'
+objdir=.git/objects
+packdir=$objdir/pack
+
+objects_in_packs () {
+ for p in "$@"
+ do
+ git show-index <"$packdir/pack-$p.idx" || return 1
+ done >objects.raw &&
+
+ cut -d' ' -f2 objects.raw | sort &&
+ rm -f objects.raw
+}
+
+test_expect_success '--stdin-packs=follow walks into unknown packs' '
+ test_when_finished "rm -fr repo" &&
+
+ git init repo &&
+ (
+ cd repo &&
+
+ for c in A B C D
+ do
+ test_commit "$c" || return 1
+ done &&
+
+ A="$(echo A | git pack-objects --revs $packdir/pack)" &&
+ B="$(echo A..B | git pack-objects --revs $packdir/pack)" &&
+ C="$(echo B..C | git pack-objects --revs $packdir/pack)" &&
+ D="$(echo C..D | git pack-objects --revs $packdir/pack)" &&
+ test_commit E &&
+
+ git prune-packed &&
+
+ cat >in <<-EOF &&
+ pack-$B.pack
+ ^pack-$C.pack
+ pack-$D.pack
+ EOF
+
+ # With just --stdin-packs, pack "A" is unknown to us, so
+ # only objects from packs "B" and "D" are included in
+ # the output pack.
+ P=$(git pack-objects --stdin-packs $packdir/pack <in) &&
+ objects_in_packs $B $D >expect &&
+ objects_in_packs $P >actual &&
+ test_cmp expect actual &&
+
+ # But with --stdin-packs=follow, objects from both
+ # included packs reach objects from the unknown pack, so
+ # objects from pack "A" is included in the output pack
+ # in addition to the above.
+ P=$(git pack-objects --stdin-packs=follow $packdir/pack <in) &&
+ objects_in_packs $A $B $D >expect &&
+ objects_in_packs $P >actual &&
+ test_cmp expect actual &&
+
+ # And with --unpacked, we will pick up objects from unknown
+ # packs that are reachable from loose objects. Loose object E
+ # reaches objects in pack A, but there are three excluded packs
+ # in between.
+ #
+ # The resulting pack should include objects reachable from E
+ # that are not present in packs B, C, or D, along with those
+ # present in pack A.
+ cat >in <<-EOF &&
+ ^pack-$B.pack
+ ^pack-$C.pack
+ ^pack-$D.pack
+ EOF
+
+ P=$(git pack-objects --stdin-packs=follow --unpacked \
+ $packdir/pack <in) &&
+
+ {
+ objects_in_packs $A &&
+ git rev-list --objects --no-object-names D..E
+ }>expect.raw &&
+ sort expect.raw >expect &&
+ objects_in_packs $P >actual &&
+ test_cmp expect actual
+ )
+'
+
+stdin_packs__follow_with_only () {
+ rm -fr stdin_packs__follow_with_only &&
+ git init stdin_packs__follow_with_only &&
+ (
+ cd stdin_packs__follow_with_only &&
+
+ test_commit A &&
+ test_commit B &&
+
+ git rev-parse "$@" >B.objects &&
+
+ echo A | git pack-objects --revs $packdir/pack &&
+ B="$(git pack-objects $packdir/pack <B.objects)" &&
+
+ git cat-file --batch-check="%(objectname)" --batch-all-objects >objs &&
+ for obj in $(cat objs)
+ do
+ rm -f $objdir/$(test_oid_to_path $obj) || return 1
+ done &&
+
+ ( cd $packdir && ls pack-*.pack ) >in &&
+ git pack-objects --stdin-packs=follow --stdout >/dev/null <in
+ )
+}
+
+test_expect_success '--stdin-packs=follow tolerates missing blobs' '
+ stdin_packs__follow_with_only HEAD HEAD^{tree}
+'
+
+test_expect_success '--stdin-packs=follow tolerates missing trees' '
+ stdin_packs__follow_with_only HEAD HEAD:B.t
+'
+
+test_expect_success '--stdin-packs=follow tolerates missing commits' '
+ stdin_packs__follow_with_only HEAD HEAD^{tree}
+'
+
test_done
diff --git a/t/t5332-multi-pack-reuse.sh b/t/t5332-multi-pack-reuse.sh
index 57cad77..395d094 100755
--- a/t/t5332-multi-pack-reuse.sh
+++ b/t/t5332-multi-pack-reuse.sh
@@ -7,6 +7,13 @@
GIT_TEST_MULTI_PACK_INDEX=0
GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=0
+
+# The --path-walk option does not consider the preferred pack
+# at all for reusing deltas, so this variable changes the
+# behavior of this test, if enabled.
+GIT_TEST_PACK_PATH_WALK=0
+export GIT_TEST_PACK_PATH_WALK
+
objdir=.git/objects
packdir=$objdir/pack
diff --git a/t/t5333-pseudo-merge-bitmaps.sh b/t/t5333-pseudo-merge-bitmaps.sh
index 56674db..1f7a5d8 100755
--- a/t/t5333-pseudo-merge-bitmaps.sh
+++ b/t/t5333-pseudo-merge-bitmaps.sh
@@ -234,8 +234,8 @@
test_commit_bulk 16 &&
git rev-list HEAD~16.. >in &&
- sed "s|\(.*\)|create refs/remotes/$r/tags/\1 \1" in |
- git update-ref --stdin || return 1
+ sed "s|\(.*\)|create refs/remotes/$r/tags/\1 \1|" in >refs &&
+ git update-ref --stdin <refs || return 1
done &&
git \
@@ -445,4 +445,21 @@
)
'
+test_expect_success 'use pseudo-merge in boundary traversal' '
+ git init pseudo-merge-boundary-traversal &&
+ (
+ cd pseudo-merge-boundary-traversal &&
+
+ git config bitmapPseudoMerge.test.pattern refs/ &&
+ git config pack.useBitmapBoundaryTraversal true &&
+
+ test_commit A &&
+ git repack -adb &&
+ test_commit B &&
+
+ nr=$(git rev-list --count --use-bitmap-index HEAD~1..HEAD) &&
+ test 1 -eq "$nr"
+ )
+'
+
test_done
diff --git a/t/t5408-send-pack-stdin.sh b/t/t5408-send-pack-stdin.sh
index 526a675..ec33976 100755
--- a/t/t5408-send-pack-stdin.sh
+++ b/t/t5408-send-pack-stdin.sh
@@ -69,15 +69,24 @@
test_expect_success 'cmdline refs written in order' '
clear_remote &&
- test_must_fail git send-pack remote.git A:foo B:foo &&
- verify_push A foo
+ test_must_fail git send-pack remote.git A:foo B:foo 2>err &&
+ test_grep "multiple updates for ref ${SQ}refs/heads/foo${SQ} not allowed" err &&
+ test_must_fail git --git-dir=remote.git rev-parse foo
+'
+
+test_expect_success 'cmdline refs with multiple duplicates' '
+ clear_remote &&
+ test_must_fail git send-pack remote.git A:foo B:foo C:foo 2>err &&
+ test_grep "multiple updates for ref ${SQ}refs/heads/foo${SQ} not allowed" err &&
+ test_must_fail git --git-dir=remote.git rev-parse foo
'
test_expect_success '--stdin refs come after cmdline' '
clear_remote &&
echo A:foo >input &&
test_must_fail git send-pack remote.git --stdin B:foo <input &&
- verify_push B foo
+ test_grep "multiple updates for ref ${SQ}refs/heads/foo${SQ} not allowed" err &&
+ test_must_fail git --git-dir=remote.git rev-parse foo
'
test_expect_success 'refspecs and --mirror do not mix (cmdline)' '
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index bef0250..2701eef 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -1644,4 +1644,18 @@
test_cmp expect actual
'
+test_expect_success 'forbid adding subset of existing remote' '
+ test_when_finished "git remote rm outer" &&
+ git remote add outer url &&
+ test_must_fail git remote add outer/inner url 2>err &&
+ test_grep ".outer/inner. is a subset of existing remote .outer." err
+'
+
+test_expect_success 'forbid adding superset of existing remote' '
+ test_when_finished "git remote rm outer/inner" &&
+ git remote add outer/inner url &&
+ test_must_fail git remote add outer url 2>err &&
+ test_grep ".outer. is a superset of existing remote .outer/inner." err
+'
+
test_done
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index dabcc5f..4e9c27b 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -744,8 +744,8 @@
EOF
cat >update.expect <<-EOF &&
- refs/heads/main $orgmain $newmain
refs/heads/next $orgnext $newnext
+ refs/heads/main $orgmain $newmain
EOF
cat >post-receive.expect <<-EOF &&
@@ -808,8 +808,8 @@
EOF
cat >update.expect <<-EOF &&
- refs/heads/main $orgmain $newmain
refs/heads/nonexistent $ZERO_OID $ZERO_OID
+ refs/heads/main $orgmain $newmain
EOF
cat >post-receive.expect <<-EOF &&
@@ -868,10 +868,10 @@
EOF
cat >update.expect <<-EOF &&
- refs/heads/main $orgmain $newmain
refs/heads/next $orgnext $newnext
- refs/heads/seen $orgseen $newseen
refs/heads/nonexistent $ZERO_OID $ZERO_OID
+ refs/heads/main $orgmain $newmain
+ refs/heads/seen $orgseen $newseen
EOF
cat >post-receive.expect <<-EOF &&
@@ -1909,4 +1909,23 @@
--thin --delta-base-offset -q --no-use-bitmap-index <false
'
+test_expect_success 'push with config pack.usePathWalk=true' '
+ mk_test testrepo heads/main &&
+ git checkout main &&
+ test_config pack.usePathWalk true &&
+ GIT_TRACE2_EVENT="$(pwd)/path-walk.txt" \
+ git push --quiet testrepo main:test &&
+
+ test_region pack-objects path-walk path-walk.txt
+'
+
+test_expect_success 'push with F/D conflict with deletion and creation' '
+ test_when_finished "git branch -D branch" &&
+ git branch branch/conflict &&
+ mk_test testrepo heads/branch/conflict &&
+ git branch -D branch/conflict &&
+ git branch branch &&
+ git push testrepo :refs/heads/branch/conflict refs/heads/branch
+'
+
test_done
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 63c9a8f..0e00193 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -472,6 +472,66 @@
test_pull_autostash_fail --no-autostash --no-rebase
'
+test_expect_success 'pull succeeds with dirty working directory and pull.autostash=true' '
+ test_config pull.autostash true &&
+ test_pull_autostash 1 --rebase &&
+ test_pull_autostash 2 --no-rebase &&
+ test_pull_autostash 1 --autostash --rebase &&
+ test_pull_autostash 2 --autostash --no-rebase
+'
+
+test_expect_success 'pull fails with dirty working directory and pull.autostash=false' '
+ test_config pull.autostash false &&
+ test_pull_autostash_fail --rebase &&
+ test_pull_autostash_fail --no-rebase &&
+ test_pull_autostash_fail --no-autostash --rebase &&
+ test_pull_autostash_fail --no-autostash --no-rebase
+'
+
+test_expect_success 'pull --autostash overrides pull.autostash=false' '
+ test_config pull.autostash false &&
+ test_pull_autostash 1 --autostash --rebase &&
+ test_pull_autostash 2 --autostash --no-rebase
+'
+
+test_expect_success 'pull --no-autostash overrides pull.autostash=true' '
+ test_config pull.autostash true &&
+ test_pull_autostash_fail --no-autostash --rebase &&
+ test_pull_autostash_fail --no-autostash --no-rebase
+'
+
+test_expect_success 'pull.autostash=true overrides rebase.autostash' '
+ test_config pull.autostash true &&
+ test_config rebase.autostash true &&
+ test_pull_autostash 1 --rebase &&
+ test_config rebase.autostash false &&
+ test_pull_autostash 1 --rebase
+'
+
+test_expect_success 'pull.autostash=false overrides rebase.autostash' '
+ test_config pull.autostash false &&
+ test_config rebase.autostash true &&
+ test_pull_autostash_fail --rebase &&
+ test_config rebase.autostash false &&
+ test_pull_autostash_fail --rebase
+'
+
+test_expect_success 'pull.autostash=true overrides merge.autostash' '
+ test_config pull.autostash true &&
+ test_config merge.autostash true &&
+ test_pull_autostash 2 --no-rebase &&
+ test_config merge.autostash false &&
+ test_pull_autostash 2 --no-rebase
+'
+
+test_expect_success 'pull.autostash=false overrides merge.autostash' '
+ test_config pull.autostash false &&
+ test_config merge.autostash true &&
+ test_pull_autostash_fail --no-rebase &&
+ test_config merge.autostash false &&
+ test_pull_autostash_fail --no-rebase
+'
+
test_expect_success 'pull.rebase' '
git reset --hard before-rebase &&
test_config pull.rebase true &&
diff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh
index e91fcc1..dc0e972 100755
--- a/t/t5538-push-shallow.sh
+++ b/t/t5538-push-shallow.sh
@@ -123,4 +123,45 @@
git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
)
'
+
+test_expect_success 'push new commit from shallow clone has correct object count' '
+ git init origin &&
+ test_commit -C origin a &&
+ test_commit -C origin b &&
+
+ git clone --depth=1 "file://$(pwd)/origin" client &&
+ git -C client checkout -b topic &&
+ git -C client commit --allow-empty -m "empty" &&
+ GIT_PROGRESS_DELAY=0 git -C client push --progress origin topic 2>err &&
+ test_grep "Enumerating objects: 1, done." err
+'
+
+test_expect_success 'push new commit from shallow clone has good deltas' '
+ git init base &&
+ test_seq 1 999 >base/a &&
+ test_commit -C base initial &&
+ git -C base add a &&
+ git -C base commit -m "big a" &&
+
+ git clone --depth=1 "file://$(pwd)/base" deltas &&
+ git -C deltas checkout -b deltas &&
+ test_seq 1 1000 >deltas/a &&
+ git -C deltas commit -a -m "bigger a" &&
+ GIT_PROGRESS_DELAY=0 git -C deltas push --progress origin deltas 2>err &&
+
+ test_grep "Enumerating objects: 5, done" err &&
+
+ # If the delta base is found, then this message uses "bytes".
+ # If the delta base is not found, then this message uses "KiB".
+ test_grep "Writing objects: .* bytes" err &&
+
+ git -C deltas commit --amend -m "changed message" &&
+ GIT_TRACE2_EVENT="$(pwd)/config-push.txt" \
+ GIT_PROGRESS_DELAY=0 git -C deltas -c pack.usePathWalk=true \
+ push --progress -f origin deltas 2>err &&
+
+ test_grep "Enumerating objects: 1, done" err &&
+ test_region pack-objects path-walk config-push.txt
+'
+
test_done
diff --git a/t/t5558-clone-bundle-uri.sh b/t/t5558-clone-bundle-uri.sh
index 9b211a6..7a0943b 100755
--- a/t/t5558-clone-bundle-uri.sh
+++ b/t/t5558-clone-bundle-uri.sh
@@ -1279,6 +1279,29 @@
trace-mult.txt >bundle-fetches &&
test_line_count = 1 bundle-fetches
'
+
+test_expect_success 'bundles with space in URI are rejected' '
+ test_when_finished "rm -rf busted repo" &&
+ mkdir -p "$HOME/busted/ /$HOME/repo/.git/objects/bundles" &&
+ git clone --bundle-uri="$HTTPD_URL/bogus $HOME/busted/" "$HTTPD_URL/smart/fetch.git" repo 2>err &&
+ test_grep "error: bundle-uri: URI is malformed: " err &&
+ find busted -type f >files &&
+ test_must_be_empty files
+'
+
+test_expect_success 'bundles with newline in URI are rejected' '
+ test_when_finished "rm -rf busted repo" &&
+ git clone --bundle-uri="$HTTPD_URL/bogus\nget $HTTPD_URL/bogus $HOME/busted" "$HTTPD_URL/smart/fetch.git" repo 2>err &&
+ test_grep "error: bundle-uri: URI is malformed: " err &&
+ test_path_is_missing "$HOME/busted"
+'
+
+test_expect_success 'bundles with newline in target path are rejected' '
+ git clone --bundle-uri="$HTTPD_URL/bogus" "$HTTPD_URL/smart/fetch.git" "$(printf "escape\nget $HTTPD_URL/bogus .")" 2>err &&
+ test_grep "error: bundle-uri: filename is malformed: " err &&
+ test_path_is_missing escape
+'
+
# Do not add tests here unless they use the HTTP server, as they will
# not run unless the HTTP dependencies exist.
diff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh
index bb02b86..9b80ea1 100755
--- a/t/t6302-for-each-ref-filter.sh
+++ b/t/t6302-for-each-ref-filter.sh
@@ -541,4 +541,217 @@
test_cmp expect actual
'
+test_expect_success 'start after with empty value' '
+ cat >expect <<-\EOF &&
+ refs/heads/main
+ refs/heads/main_worktree
+ refs/heads/side
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after="" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after a specific reference' '
+ cat >expect <<-\EOF &&
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/spot >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after a specific reference with partial match' '
+ cat >expect <<-\EOF &&
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/sp >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, just behind a specific reference' '
+ cat >expect <<-\EOF &&
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/parrot >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after with specific directory match' '
+ cat >expect <<-\EOF &&
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after with specific directory and trailing slash' '
+ cat >expect <<-\EOF &&
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/ >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, just behind a specific directory' '
+ cat >expect <<-\EOF &&
+ refs/odd/spot
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/lost >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, overflow specific reference length' '
+ cat >expect <<-\EOF &&
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/spotnew >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, overflow specific reference path' '
+ cat >expect <<-\EOF &&
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/spot/new >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, with exclude pattern' '
+ cat >expect <<-\EOF &&
+ refs/tags/annotated-tag
+ refs/tags/doubly-annotated-tag
+ refs/tags/doubly-signed-tag
+ refs/tags/foo1.10
+ refs/tags/foo1.3
+ refs/tags/foo1.6
+ refs/tags/four
+ refs/tags/one
+ refs/tags/signed-tag
+ refs/tags/three
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/odd/spot \
+ --exclude=refs/tags/foo >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after, last reference' '
+ cat >expect <<-\EOF &&
+ EOF
+ git for-each-ref --format="%(refname)" --start-after=refs/tags/two >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after used with a pattern' '
+ cat >expect <<-\EOF &&
+ fatal: cannot use --start-after with patterns
+ EOF
+ test_must_fail git for-each-ref --format="%(refname)" --start-after=refs/odd/spot refs/tags 2>actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'start after used with custom sort order' '
+ cat >expect <<-\EOF &&
+ fatal: cannot use --start-after with custom sort options
+ EOF
+ test_must_fail git for-each-ref --format="%(refname)" --start-after=refs/odd/spot --sort=author 2>actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
index 9cbe7ca..f14c0fb 100755
--- a/t/t6422-merge-rename-corner-cases.sh
+++ b/t/t6422-merge-rename-corner-cases.sh
@@ -1146,10 +1146,7 @@
cd simple_${sideL}_${sideR} &&
# Create some related files now
- for i in $(test_seq 1 10)
- do
- echo Random base content line $i
- done >file_v1 &&
+ test_seq -f "Random base content line %d" 1 10 >file_v1 &&
cp file_v1 file_v2 &&
echo modification >>file_v2 &&
@@ -1293,10 +1290,7 @@
cd nested_conflicts_from_rename_rename &&
# Create some related files now
- for i in $(test_seq 1 10)
- do
- echo Random base content line $i
- done >file_v1 &&
+ test_seq -f "Random base content line %d" 1 10 >file_v1 &&
cp file_v1 file_v2 &&
cp file_v1 file_v3 &&
diff --git a/t/t6601-path-walk.sh b/t/t6601-path-walk.sh
index 8d187f7..56bd1e3 100755
--- a/t/t6601-path-walk.sh
+++ b/t/t6601-path-walk.sh
@@ -376,6 +376,26 @@
test_cmp_sorted expect out
'
+test_expect_success 'topic, not base, --edge-aggressive with pruning' '
+ test-tool path-walk --prune --edge-aggressive -- topic --not base >out &&
+
+ cat >expect <<-EOF &&
+ 0:commit::$(git rev-parse topic)
+ 1:tree::$(git rev-parse topic^{tree})
+ 1:tree::$(git rev-parse base^{tree}):UNINTERESTING
+ 2:tree:right/:$(git rev-parse topic:right)
+ 2:tree:right/:$(git rev-parse base:right):UNINTERESTING
+ 3:blob:right/c:$(git rev-parse base:right/c):UNINTERESTING
+ 3:blob:right/c:$(git rev-parse topic:right/c)
+ blobs:2
+ commits:1
+ tags:0
+ trees:4
+ EOF
+
+ test_cmp_sorted expect out
+'
+
test_expect_success 'trees are reported exactly once' '
test_when_finished "rm -rf unique-trees" &&
test_create_repo unique-trees &&
diff --git a/t/t7007-show.sh b/t/t7007-show.sh
index d6cc69e..2d322b5 100755
--- a/t/t7007-show.sh
+++ b/t/t7007-show.sh
@@ -167,4 +167,28 @@
test_must_fail git show --graph HEAD
'
+test_expect_success 'show unmerged index' '
+ git reset --hard &&
+
+ git switch -C base &&
+ echo "base" >conflicting &&
+ git add conflicting &&
+ git commit -m "base" &&
+
+ git branch hello &&
+ git branch goodbye &&
+
+ git switch hello &&
+ echo "hello" >conflicting &&
+ git commit -am "hello" &&
+
+ git switch goodbye &&
+ echo "goodbye" >conflicting &&
+ git commit -am "goodbye" &&
+
+ git switch hello &&
+ test_must_fail git merge goodbye &&
+ git show --merge HEAD
+'
+
test_done
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index d6a501d..fd3e7e3 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -1482,4 +1482,27 @@
)
'
+test_expect_success 'submodule add fails when name is reused' '
+ git init test-submodule &&
+ (
+ cd test-submodule &&
+ git commit --allow-empty -m init &&
+
+ git init ../child-origin &&
+ git -C ../child-origin commit --allow-empty -m init &&
+
+ git submodule add ../child-origin child &&
+ git commit -m "Add submodule child" &&
+
+ git mv child child_old &&
+ git commit -m "Move child to child_old" &&
+
+ # Now adding a *new* repo at the old name must fail
+ git init ../child2-origin &&
+ git -C ../child2-origin commit --allow-empty -m init &&
+ test_must_fail git submodule add ../child2-origin child 2>err &&
+ test_grep "already used for" err
+ )
+'
+
test_done
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 9c3cc4c..66c3ec2 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -38,10 +38,11 @@
git commit "$@" -m "Commit $*" >/dev/null
}
-test_create_repo sm1 &&
-add_file . foo >/dev/null
-
-head1=$(add_file sm1 foo1 foo2)
+test_expect_success 'setup submodule' '
+ git init sm1 &&
+ add_file . foo &&
+ head1=$(add_file sm1 foo1 foo2)
+'
test_expect_success 'added submodule' "
git add sm1 &&
@@ -214,9 +215,12 @@
test_cmp expected actual
"
-rm -f sm1 &&
-test_create_repo sm1 &&
-head6=$(add_file sm1 foo6 foo7)
+test_expect_success 'setup submodule' '
+ rm -f sm1 &&
+ git init sm1 &&
+ head6=$(add_file sm1 foo6 foo7)
+'
+
test_expect_success 'nonexistent commit' "
git submodule summary >actual &&
cat >expected <<-EOF &&
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index c562bad..3adab12 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -1095,12 +1095,15 @@
(cd super5 &&
# This test var can mess with the stderr output checked in this test.
GIT_TEST_NAME_HASH_VERSION=1 \
+ GIT_TEST_PACK_PATH_WALK=0 \
git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&
test_must_be_empty out &&
test_must_be_empty err
) &&
git clone super4 super6 &&
(cd super6 &&
+ # This test variable will create a "warning" message to stderr
+ GIT_TEST_PACK_PATH_WALK=0 \
git submodule update --init --depth=1 submodule3 >out 2>err &&
test_file_not_empty out &&
test_file_not_empty err
@@ -1134,6 +1137,67 @@
git clone --recurse-submodules top top-clean
'
+test_expect_success 'submodule update with multiple remotes' '
+ test_when_finished "rm -fr top-cloned" &&
+ cp -r top-clean top-cloned &&
+
+ # Create a commit in each repo, starting with bottom
+ test_commit -C bottom multiple_remote_commit &&
+ # Create middle commit
+ git -C middle/bottom fetch &&
+ git -C middle/bottom checkout -f FETCH_HEAD &&
+ git -C middle add bottom &&
+ git -C middle commit -m "multiple_remote_commit" &&
+ # Create top commit
+ git -C top/middle fetch &&
+ git -C top/middle checkout -f FETCH_HEAD &&
+ git -C top add middle &&
+ git -C top commit -m "multiple_remote_commit" &&
+
+ # rename the submodule remote
+ git -C top-cloned/middle remote rename origin upstream &&
+
+ # Add another remote
+ git -C top-cloned/middle remote add other bogus &&
+
+ # Make the update of "middle" a no-op, otherwise we error out
+ # because of its unmerged state
+ test_config -C top-cloned submodule.middle.update !true &&
+ git -C top-cloned submodule update --recursive 2>actual.err &&
+ cat >expect.err <<-\EOF &&
+ EOF
+ test_cmp expect.err actual.err
+'
+
+test_expect_success 'submodule update with renamed remote' '
+ test_when_finished "rm -fr top-cloned" &&
+ cp -r top-clean top-cloned &&
+
+ # Create a commit in each repo, starting with bottom
+ test_commit -C bottom rename_commit &&
+ # Create middle commit
+ git -C middle/bottom fetch &&
+ git -C middle/bottom checkout -f FETCH_HEAD &&
+ git -C middle add bottom &&
+ git -C middle commit -m "rename_commit" &&
+ # Create top commit
+ git -C top/middle fetch &&
+ git -C top/middle checkout -f FETCH_HEAD &&
+ git -C top add middle &&
+ git -C top commit -m "rename_commit" &&
+
+ # rename the submodule remote
+ git -C top-cloned/middle remote rename origin upstream &&
+
+ # Make the update of "middle" a no-op, otherwise we error out
+ # because of its unmerged state
+ test_config -C top-cloned submodule.middle.update !true &&
+ git -C top-cloned submodule update --recursive 2>actual.err &&
+ cat >expect.err <<-\EOF &&
+ EOF
+ test_cmp expect.err actual.err
+'
+
test_expect_success 'submodule update should skip unmerged submodules' '
test_when_finished "rm -fr top-cloned" &&
cp -r top-clean top-cloned &&
diff --git a/t/t7413-submodule-is-active.sh b/t/t7413-submodule-is-active.sh
index 9509dc1..6fd3b87 100755
--- a/t/t7413-submodule-is-active.sh
+++ b/t/t7413-submodule-is-active.sh
@@ -124,4 +124,19 @@
git -C super2 config --get submodule.mod.active
'
+test_expect_success 'submodule add skips redundant active entry' '
+ git init repo &&
+ (
+ cd repo &&
+ git config submodule.active "lib/*" &&
+ git commit --allow-empty -m init &&
+
+ git init ../lib-origin &&
+ git -C ../lib-origin commit --allow-empty -m init &&
+
+ git submodule add ../lib-origin lib/foo &&
+ test_must_fail git config --get submodule.lib/foo.active
+ )
+'
+
test_done
diff --git a/t/t7422-submodule-output.sh b/t/t7422-submodule-output.sh
index 023a5cb..aea1ddf 100755
--- a/t/t7422-submodule-output.sh
+++ b/t/t7422-submodule-output.sh
@@ -180,17 +180,14 @@
COMMIT=$(git rev-parse HEAD) &&
for i in $(test_seq 2000)
do
- printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n" "$i" ||
+ echo "[submodule \"sm-$i\"]" &&
+ echo "path = recursive-submodule-path-$i" ||
return 1
done >gitmodules &&
BLOB=$(git hash-object -w --stdin <gitmodules) &&
printf "100644 blob $BLOB\t.gitmodules\n" >tree &&
- for i in $(test_seq 2000)
- do
- printf "160000 commit $COMMIT\trecursive-submodule-path-%d\n" "$i" ||
- return 1
- done >>tree &&
+ test_seq -f "160000 commit $COMMIT\trecursive-submodule-path-%d" 2000 >>tree &&
TREE=$(git mktree <tree) &&
COMMIT=$(git commit-tree "$TREE") &&
diff --git a/t/t7450-bad-git-dotfiles.sh b/t/t7450-bad-git-dotfiles.sh
index 9367794..f512eed 100755
--- a/t/t7450-bad-git-dotfiles.sh
+++ b/t/t7450-bad-git-dotfiles.sh
@@ -372,4 +372,37 @@
test_path_is_missing nested_checkout/thing2/.git
'
+test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into different directory' '
+ test_when_finished "rm -rf sub repo bad-clone" &&
+
+ git init sub &&
+ write_script sub/post-checkout <<-\EOF &&
+ touch "$PWD/foo"
+ EOF
+ git -C sub add post-checkout &&
+ git -C sub commit -m hook &&
+
+ git init repo &&
+ git -C repo -c protocol.file.allow=always submodule add "$PWD/sub" sub &&
+ git -C repo mv sub $(printf "sub\r") &&
+
+ # Ensure config values containing CR are wrapped in quotes.
+ git config unset -f repo/.gitmodules submodule.sub.path &&
+ printf "\tpath = \"sub\r\"\n" >>repo/.gitmodules &&
+
+ git config unset -f repo/.git/modules/sub/config core.worktree &&
+ {
+ printf "[core]\n" &&
+ printf "\tworktree = \"../../../sub\r\"\n"
+ } >>repo/.git/modules/sub/config &&
+
+ ln -s .git/modules/sub/hooks repo/sub &&
+ git -C repo add -A &&
+ git -C repo commit -m submodule &&
+
+ git -c protocol.file.allow=always clone --recurse-submodules repo bad-clone &&
+ ! test -f "$PWD/bad-clone/sub/foo" &&
+ test -f $(printf "bad-clone/sub\r/post-checkout")
+'
+
test_done
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 39677e8..1201c85 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -449,7 +449,17 @@
test_must_fail env LET_GPG_PROGRAM_FAIL=1 \
git commit -S --allow-empty -m must-fail 2>err &&
- grep zOMG err
+ grep zOMG err &&
+
+ # `gpg.program` starts with `~`, the path should be interpreted to be relative to `$HOME`
+ test_config gpg.program "~/fake-gpg" &&
+ env HOME="$(pwd)" \
+ git commit -S --allow-empty -m signed-commit &&
+
+ # `gpg.program` does not specify an absolute path, it should find a program in `$PATH`
+ test_config gpg.program "fake-gpg" &&
+ env PATH="$PWD:$PATH" \
+ git commit -S --allow-empty -m signed-commit
'
test_done
diff --git a/t/t7528-signed-commit-ssh.sh b/t/t7528-signed-commit-ssh.sh
index 065f780..0f887a3 100755
--- a/t/t7528-signed-commit-ssh.sh
+++ b/t/t7528-signed-commit-ssh.sh
@@ -84,18 +84,26 @@
test_config gpg.format ssh &&
eval $(ssh-agent) &&
test_when_finished "kill ${SSH_AGENT_PID}" &&
- ssh-add "${GPGSSH_KEY_PRIMARY}" &&
- echo 1 >file && git add file &&
- git commit -a -m rsa-inline -S"$(cat "${GPGSSH_KEY_PRIMARY}.pub")" &&
- echo 2 >file &&
- test_config user.signingkey "$(cat "${GPGSSH_KEY_PRIMARY}.pub")" &&
- git commit -a -m rsa-config -S &&
- ssh-add "${GPGSSH_KEY_ECDSA}" &&
- echo 3 >file &&
- git commit -a -m ecdsa-inline -S"key::$(cat "${GPGSSH_KEY_ECDSA}.pub")" &&
- echo 4 >file &&
- test_config user.signingkey "key::$(cat "${GPGSSH_KEY_ECDSA}.pub")" &&
- git commit -a -m ecdsa-config -S
+ test_when_finished "test_unconfig user.signingkey" &&
+ mkdir tmpdir &&
+ TMPDIR="$(pwd)/tmpdir" &&
+ (
+ export TMPDIR &&
+ ssh-add "${GPGSSH_KEY_PRIMARY}" &&
+ echo 1 >file && git add file &&
+ git commit -a -m rsa-inline -S"$(cat "${GPGSSH_KEY_PRIMARY}.pub")" &&
+ echo 2 >file &&
+ git config user.signingkey "$(cat "${GPGSSH_KEY_PRIMARY}.pub")" &&
+ git commit -a -m rsa-config -S &&
+ ssh-add "${GPGSSH_KEY_ECDSA}" &&
+ echo 3 >file &&
+ git commit -a -m ecdsa-inline -S"key::$(cat "${GPGSSH_KEY_ECDSA}.pub")" &&
+ echo 4 >file &&
+ git config user.signingkey "key::$(cat "${GPGSSH_KEY_ECDSA}.pub")" &&
+ git commit -a -m ecdsa-config -S
+ ) &&
+ find tmpdir -type f >tmpfiles &&
+ test_must_be_empty tmpfiles
'
test_expect_success GPGSSH,GPGSSH_VERIFYTIME 'create signed commits with keys having defined lifetimes' '
diff --git a/t/t7704-repack-cruft.sh b/t/t7704-repack-cruft.sh
index 8aebfb4..aa2e2e6 100755
--- a/t/t7704-repack-cruft.sh
+++ b/t/t7704-repack-cruft.sh
@@ -724,4 +724,149 @@
)
'
+setup_cruft_exclude_tests() {
+ git init "$1" &&
+ (
+ cd "$1" &&
+
+ git config repack.midxMustContainCruft false &&
+
+ test_commit one &&
+
+ test_commit --no-tag two &&
+ two="$(git rev-parse HEAD)" &&
+ test_commit --no-tag three &&
+ three="$(git rev-parse HEAD)" &&
+ git reset --hard one &&
+ git reflog expire --all --expire=all &&
+
+ GIT_TEST_MULTI_PACK_INDEX=0 git repack --cruft -d &&
+
+ git merge $two &&
+ test_commit four
+ )
+}
+
+test_expect_success 'repack --write-midx excludes cruft where possible' '
+ setup_cruft_exclude_tests exclude-cruft-when-possible &&
+ (
+ cd exclude-cruft-when-possible &&
+
+ GIT_TEST_MULTI_PACK_INDEX=0 \
+ git repack -d --geometric=2 --write-midx --write-bitmap-index &&
+
+ test-tool read-midx --show-objects $objdir >midx &&
+ cruft="$(ls $packdir/*.mtimes)" &&
+ test_grep ! "$(basename "$cruft" .mtimes).idx" midx &&
+
+ git rev-list --all --objects --no-object-names >reachable.raw &&
+ sort reachable.raw >reachable.objects &&
+ awk "/\.pack$/ { print \$1 }" <midx | sort >midx.objects &&
+
+ test_cmp reachable.objects midx.objects
+ )
+'
+
+test_expect_success 'repack --write-midx includes cruft when instructed' '
+ setup_cruft_exclude_tests exclude-cruft-when-instructed &&
+ (
+ cd exclude-cruft-when-instructed &&
+
+ GIT_TEST_MULTI_PACK_INDEX=0 \
+ git -c repack.midxMustContainCruft=true repack \
+ -d --geometric=2 --write-midx --write-bitmap-index &&
+
+ test-tool read-midx --show-objects $objdir >midx &&
+ cruft="$(ls $packdir/*.mtimes)" &&
+ test_grep "$(basename "$cruft" .mtimes).idx" midx &&
+
+ git cat-file --batch-check="%(objectname)" --batch-all-objects \
+ >all.objects &&
+ awk "/\.pack$/ { print \$1 }" <midx | sort >midx.objects &&
+
+ test_cmp all.objects midx.objects
+ )
+'
+
+test_expect_success 'repack --write-midx includes cruft when necessary' '
+ setup_cruft_exclude_tests exclude-cruft-when-necessary &&
+ (
+ cd exclude-cruft-when-necessary &&
+
+ test_path_is_file $(ls $packdir/pack-*.mtimes) &&
+ ( cd $packdir && ls pack-*.idx ) | sort >packs.all &&
+ git multi-pack-index write --stdin-packs --bitmap <packs.all &&
+
+ test_commit five &&
+ GIT_TEST_MULTI_PACK_INDEX=0 \
+ git repack -d --geometric=2 --write-midx --write-bitmap-index &&
+
+ test-tool read-midx --show-objects $objdir >midx &&
+ awk "/\.pack$/ { print \$1 }" <midx | sort >midx.objects &&
+ git cat-file --batch-all-objects --batch-check="%(objectname)" \
+ >expect.objects &&
+ test_cmp expect.objects midx.objects &&
+
+ grep "^pack-" midx >midx.packs &&
+ test_line_count = "$(($(wc -l <packs.all) + 1))" midx.packs
+ )
+'
+
+test_expect_success 'repack --write-midx includes cruft when already geometric' '
+ git init repack--write-midx-geometric-noop &&
+ (
+ cd repack--write-midx-geometric-noop &&
+
+ git branch -M main &&
+ test_commit A &&
+ test_commit B &&
+
+ git checkout -B side &&
+ test_commit --no-tag C &&
+ C="$(git rev-parse HEAD)" &&
+
+ git checkout main &&
+ git branch -D side &&
+ git reflog expire --all --expire=all &&
+
+ # At this point we have two packs: one containing the
+ # objects belonging to commits A and B, and another
+ # (cruft) pack containing the objects belonging to
+ # commit C.
+ git repack --cruft -d &&
+
+ # Create a third pack which contains a merge commit
+ # making commit C reachable again.
+ #
+ # --no-ff is important here, as it ensures that we
+ # actually write a new object and subsequently a new
+ # pack to contain it.
+ git merge --no-ff $C &&
+ git repack -d &&
+
+ ls $packdir/pack-*.idx | sort >packs.all &&
+ cruft="$(ls $packdir/pack-*.mtimes)" &&
+ cruft="${cruft%.mtimes}.idx" &&
+
+ for idx in $(grep -v $cruft <packs.all)
+ do
+ git show-index <$idx >out &&
+ wc -l <out || return 1
+ done >sizes.raw &&
+
+ # Make sure that there are two non-cruft packs, and
+ # that one of them contains at least twice as many
+ # objects as the other, ensuring that they are already
+ # in a geometric progression.
+ sort -n sizes.raw >sizes &&
+ test_line_count = 2 sizes &&
+ s1=$(head -n 1 sizes) &&
+ s2=$(tail -n 1 sizes) &&
+ test "$s2" -gt "$((2 * $s1))" &&
+
+ git -c repack.midxMustContainCruft=false repack --geometric=2 \
+ --write-midx --write-bitmap-index
+ )
+'
+
test_done
diff --git a/t/t7815-grep-binary.sh b/t/t7815-grep-binary.sh
index b7d83f9..55d5e6d 100755
--- a/t/t7815-grep-binary.sh
+++ b/t/t7815-grep-binary.sh
@@ -63,7 +63,7 @@
git grep ile a
'
-test_expect_failure !CYGWIN 'git grep .fi a' '
+test_expect_failure !CYGWIN,!MACOS 'git grep .fi a' '
git grep .fi a
'
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 8cf89e2..ddd273d 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -49,9 +49,9 @@
git maintenance run --auto 2>/dev/null &&
GIT_TRACE2_EVENT="$(pwd)/run-no-quiet.txt" \
git maintenance run --no-quiet 2>/dev/null &&
- test_subcommand git gc --quiet --no-detach <run-no-auto.txt &&
- test_subcommand ! git gc --auto --quiet --no-detach <run-auto.txt &&
- test_subcommand git gc --no-quiet --no-detach <run-no-quiet.txt
+ test_subcommand git gc --quiet --no-detach --skip-foreground-tasks <run-no-auto.txt &&
+ test_subcommand ! git gc --auto --quiet --no-detach --skip-foreground-tasks <run-auto.txt &&
+ test_subcommand git gc --no-quiet --no-detach --skip-foreground-tasks <run-no-quiet.txt
'
test_expect_success 'maintenance.auto config option' '
@@ -154,9 +154,9 @@
git maintenance run --task=commit-graph 2>/dev/null &&
GIT_TRACE2_EVENT="$(pwd)/run-both.txt" \
git maintenance run --task=commit-graph --task=gc 2>/dev/null &&
- test_subcommand ! git gc --quiet --no-detach <run-commit-graph.txt &&
- test_subcommand git gc --quiet --no-detach <run-gc.txt &&
- test_subcommand git gc --quiet --no-detach <run-both.txt &&
+ test_subcommand ! git gc --quiet --no-detach --skip-foreground-tasks <run-commit-graph.txt &&
+ test_subcommand git gc --quiet --no-detach --skip-foreground-tasks <run-gc.txt &&
+ test_subcommand git gc --quiet --no-detach --skip-foreground-tasks <run-both.txt &&
test_subcommand git commit-graph write --split --reachable --no-progress <run-commit-graph.txt &&
test_subcommand ! git commit-graph write --split --reachable --no-progress <run-gc.txt &&
test_subcommand git commit-graph write --split --reachable --no-progress <run-both.txt
@@ -610,7 +610,12 @@
test_expect_success '--auto and --schedule incompatible' '
test_must_fail git maintenance run --auto --schedule=daily 2>err &&
- test_grep "at most one" err
+ test_grep "cannot be used together" err
+'
+
+test_expect_success '--task and --schedule incompatible' '
+ test_must_fail git maintenance run --task=pack-refs --schedule=daily 2>err &&
+ test_grep "cannot be used together" err
'
test_expect_success 'invalid --schedule value' '
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 0c1af43..e56e0c8 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -201,6 +201,13 @@
test_cmp expected-cc commandline1
'
+test_expect_failure $PREREQ 'invalid smtp server port value' '
+ clean_fake_sendmail &&
+ git send-email -1 --to=recipient@example.com \
+ --smtp-server-port=bogus-symbolic-name \
+ --smtp-server="$(pwd)/fake.sendmail"
+'
+
test_expect_success $PREREQ 'setup expect' "
cat >expected-show-all-headers <<\EOF
0001-Second.patch
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index b258dbf..4dc3d64 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -120,7 +120,7 @@
INPUT_END
git fast-import --export-marks=marks.out <input &&
- git whatchanged main
+ git log --raw main
'
test_expect_success 'A: verify pack' '
@@ -279,7 +279,7 @@
INPUT_END
git fast-import --import-marks=marks.out <input &&
- git whatchanged verify--import-marks
+ git log --raw verify--import-marks
'
test_expect_success 'A: verify pack' '
@@ -652,7 +652,7 @@
INPUT_END
git fast-import <input &&
- git whatchanged branch
+ git log --raw branch
'
test_expect_success 'C: verify pack' '
@@ -715,7 +715,7 @@
INPUT_END
git fast-import <input &&
- git whatchanged branch
+ git log --raw branch
'
test_expect_success 'D: verify pack' '
@@ -882,7 +882,7 @@
INPUT_END
git fast-import <input &&
- git whatchanged H
+ git log --raw H
'
test_expect_success 'H: verify pack' '
@@ -2066,7 +2066,7 @@
INPUT_END
git fast-import <input &&
- git whatchanged notes-test
+ git log --raw notes-test
'
test_expect_success 'Q: verify pack' '
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh
index 1ae4d7c..e62173c 100755
--- a/t/t9301-fast-import-notes.sh
+++ b/t/t9301-fast-import-notes.sh
@@ -76,7 +76,7 @@
test_expect_success 'set up main branch' '
git fast-import <input &&
- git whatchanged main
+ git log --raw main
'
commit4=$(git rev-parse refs/heads/main)
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 7661976..8f85c69 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -48,12 +48,11 @@
mkdir new &&
git --git-dir=new/.git init &&
git fast-export --all >actual &&
- (cd new &&
- git fast-import &&
- test $MAIN = $(git rev-parse --verify refs/heads/main) &&
- test $REIN = $(git rev-parse --verify refs/tags/rein) &&
- test $WER = $(git rev-parse --verify refs/heads/wer) &&
- test $MUSS = $(git rev-parse --verify refs/tags/muss)) <actual
+ git -C new fast-import <actual &&
+ test $MAIN = $(git -C new rev-parse --verify refs/heads/main) &&
+ test $REIN = $(git -C new rev-parse --verify refs/tags/rein) &&
+ test $WER = $(git -C new rev-parse --verify refs/heads/wer) &&
+ test $MUSS = $(git -C new rev-parse --verify refs/tags/muss)
'
@@ -87,13 +86,11 @@
test_expect_success 'fast-export main~2..main' '
git fast-export main~2..main >actual &&
- sed "s/main/partial/" actual |
- (cd new &&
- git fast-import &&
- test $MAIN != $(git rev-parse --verify refs/heads/partial) &&
- git diff --exit-code main partial &&
- git diff --exit-code main^ partial^ &&
- test_must_fail git rev-parse partial~2)
+ sed "s/main/partial/" actual | git -C new fast-import &&
+ test $MAIN != $(git -C new rev-parse --verify refs/heads/partial) &&
+ git -C new diff --exit-code main partial &&
+ git -C new diff --exit-code main^ partial^ &&
+ test_must_fail git -C new rev-parse partial~2
'
@@ -102,10 +99,8 @@
git fast-export --reference-excluded-parents main~2..main >actual &&
grep commit.refs/heads/main actual >commit-count &&
test_line_count = 2 commit-count &&
- sed "s/main/rewrite/" actual |
- (cd new &&
- git fast-import &&
- test $MAIN = $(git rev-parse --verify refs/heads/rewrite))
+ sed "s/main/rewrite/" actual | git -C new fast-import &&
+ test $MAIN = $(git -C new rev-parse --verify refs/heads/rewrite)
'
test_expect_success 'fast-export --show-original-ids' '
@@ -133,20 +128,19 @@
echo rosten >file &&
git commit -s -F "$TEST_DIRECTORY/t9350/simple-iso-8859-7-commit-message.txt" file &&
git fast-export --reencode=yes wer^..wer >iso-8859-7.fi &&
- sed "s/wer/i18n/" iso-8859-7.fi |
- (cd new &&
- git fast-import &&
- # The commit object, if not re-encoded, would be 200 bytes plus hash.
- # Removing the "encoding iso-8859-7\n" header drops 20 bytes.
- # Re-encoding the Pi character from \xF0 (\360) in iso-8859-7
- # to \xCF\x80 (\317\200) in UTF-8 adds a byte. Check for
- # the expected size.
- test $(($(test_oid hexsz) + 181)) -eq "$(git cat-file -s i18n)" &&
- # ...and for the expected translation of bytes.
- git cat-file commit i18n >actual &&
- grep $(printf "\317\200") actual &&
- # Also make sure the commit does not have the "encoding" header
- ! grep ^encoding actual)
+ sed "s/wer/i18n/" iso-8859-7.fi | git -C new fast-import &&
+
+ # The commit object, if not re-encoded, would be 200 bytes plus hash.
+ # Removing the "encoding iso-8859-7\n" header drops 20 bytes.
+ # Re-encoding the Pi character from \xF0 (\360) in iso-8859-7
+ # to \xCF\x80 (\317\200) in UTF-8 adds a byte. Check for
+ # the expected size.
+ test $(($(test_oid hexsz) + 181)) -eq "$(git -C new cat-file -s i18n)" &&
+ # ...and for the expected translation of bytes.
+ git -C new cat-file commit i18n >actual &&
+ grep $(printf "\317\200") actual &&
+ # Also make sure the commit does not have the "encoding" header
+ ! grep ^encoding actual
'
test_expect_success 'aborting on iso-8859-7' '
@@ -165,20 +159,19 @@
echo rosten >file &&
git commit -s -F "$TEST_DIRECTORY/t9350/simple-iso-8859-7-commit-message.txt" file &&
git fast-export --reencode=no wer^..wer >iso-8859-7.fi &&
- sed "s/wer/i18n-no-recoding/" iso-8859-7.fi |
- (cd new &&
- git fast-import &&
- # The commit object, if not re-encoded, is 200 bytes plus hash.
- # Removing the "encoding iso-8859-7\n" header would drops 20
- # bytes. Re-encoding the Pi character from \xF0 (\360) in
- # iso-8859-7 to \xCF\x80 (\317\200) in UTF-8 adds a byte.
- # Check for the expected size...
- test $(($(test_oid hexsz) + 200)) -eq "$(git cat-file -s i18n-no-recoding)" &&
- # ...as well as the expected byte.
- git cat-file commit i18n-no-recoding >actual &&
- grep $(printf "\360") actual &&
- # Also make sure the commit has the "encoding" header
- grep ^encoding actual)
+ sed "s/wer/i18n-no-recoding/" iso-8859-7.fi | git -C new fast-import &&
+
+ # The commit object, if not re-encoded, is 200 bytes plus hash.
+ # Removing the "encoding iso-8859-7\n" header would drops 20
+ # bytes. Re-encoding the Pi character from \xF0 (\360) in
+ # iso-8859-7 to \xCF\x80 (\317\200) in UTF-8 adds a byte.
+ # Check for the expected size...
+ test $(($(test_oid hexsz) + 200)) -eq "$(git -C new cat-file -s i18n-no-recoding)" &&
+ # ...as well as the expected byte.
+ git -C new cat-file commit i18n-no-recoding >actual &&
+ grep $(printf "\360") actual &&
+ # Also make sure the commit has the "encoding" header
+ grep ^encoding actual
'
test_expect_success 'encoding preserved if reencoding fails' '
@@ -188,18 +181,17 @@
echo rosten >file &&
git commit -s -F "$TEST_DIRECTORY/t9350/broken-iso-8859-7-commit-message.txt" file &&
git fast-export --reencode=yes wer^..wer >iso-8859-7.fi &&
- sed "s/wer/i18n-invalid/" iso-8859-7.fi |
- (cd new &&
- git fast-import &&
- git cat-file commit i18n-invalid >actual &&
- # Make sure the commit still has the encoding header
- grep ^encoding actual &&
- # Verify that the commit has the expected size; i.e.
- # that no bytes were re-encoded to a different encoding.
- test $(($(test_oid hexsz) + 212)) -eq "$(git cat-file -s i18n-invalid)" &&
- # ...and check for the original special bytes
- grep $(printf "\360") actual &&
- grep $(printf "\377") actual)
+ sed "s/wer/i18n-invalid/" iso-8859-7.fi | git -C new fast-import &&
+ git -C new cat-file commit i18n-invalid >actual &&
+
+ # Make sure the commit still has the encoding header
+ grep ^encoding actual &&
+ # Verify that the commit has the expected size; i.e.
+ # that no bytes were re-encoded to a different encoding.
+ test $(($(test_oid hexsz) + 212)) -eq "$(git -C new cat-file -s i18n-invalid)" &&
+ # ...and check for the original special bytes
+ grep $(printf "\360") actual &&
+ grep $(printf "\377") actual
'
test_expect_success 'import/export-marks' '
@@ -314,29 +306,23 @@
test_expect_success GPG 'signed-commits=verbatim' '
git fast-export --signed-commits=verbatim --reencode=no commit-signing >output &&
- grep "^gpgsig sha" output &&
+ test_grep -E "^gpgsig $GIT_DEFAULT_HASH openpgp" output &&
grep "encoding ISO-8859-1" output &&
- (
- cd new &&
- git fast-import &&
- STRIPPED=$(git rev-parse --verify refs/heads/commit-signing) &&
- test $COMMIT_SIGNING = $STRIPPED
- ) <output
+ git -C new fast-import <output &&
+ STRIPPED=$(git -C new rev-parse --verify refs/heads/commit-signing) &&
+ test $COMMIT_SIGNING = $STRIPPED
'
test_expect_success GPG 'signed-commits=warn-verbatim' '
git fast-export --signed-commits=warn-verbatim --reencode=no commit-signing >output 2>err &&
- grep "^gpgsig sha" output &&
+ test_grep -E "^gpgsig $GIT_DEFAULT_HASH openpgp" output &&
grep "encoding ISO-8859-1" output &&
test -s err &&
- (
- cd new &&
- git fast-import &&
- STRIPPED=$(git rev-parse --verify refs/heads/commit-signing) &&
- test $COMMIT_SIGNING = $STRIPPED
- ) <output
+ git -C new fast-import <output &&
+ STRIPPED=$(git -C new rev-parse --verify refs/heads/commit-signing) &&
+ test $COMMIT_SIGNING = $STRIPPED
'
@@ -345,12 +331,9 @@
git fast-export --signed-commits=strip --reencode=no commit-signing >output &&
! grep ^gpgsig output &&
grep "^encoding ISO-8859-1" output &&
- sed "s/commit-signing/commit-strip-signing/" output | (
- cd new &&
- git fast-import &&
- STRIPPED=$(git rev-parse --verify refs/heads/commit-strip-signing) &&
- test $COMMIT_SIGNING != $STRIPPED
- )
+ sed "s/commit-signing/commit-strip-signing/" output | git -C new fast-import &&
+ STRIPPED=$(git -C new rev-parse --verify refs/heads/commit-strip-signing) &&
+ test $COMMIT_SIGNING != $STRIPPED
'
@@ -360,12 +343,59 @@
! grep ^gpgsig output &&
grep "^encoding ISO-8859-1" output &&
test -s err &&
- sed "s/commit-signing/commit-strip-signing/" output | (
- cd new &&
- git fast-import &&
- STRIPPED=$(git rev-parse --verify refs/heads/commit-strip-signing) &&
- test $COMMIT_SIGNING != $STRIPPED
- )
+ sed "s/commit-signing/commit-strip-signing/" output | git -C new fast-import &&
+ STRIPPED=$(git -C new rev-parse --verify refs/heads/commit-strip-signing) &&
+ test $COMMIT_SIGNING != $STRIPPED
+
+'
+
+test_expect_success GPGSM 'setup X.509 signed commit' '
+
+ git checkout -b x509-signing main &&
+ test_config gpg.format x509 &&
+ test_config user.signingkey $GIT_COMMITTER_EMAIL &&
+ echo "X.509 content" >file &&
+ git add file &&
+ git commit -S -m "X.509 signed commit" &&
+ X509_COMMIT=$(git rev-parse HEAD) &&
+ git checkout main
+
+'
+
+test_expect_success GPGSM 'round-trip X.509 signed commit' '
+
+ git fast-export --signed-commits=verbatim x509-signing >output &&
+ test_grep -E "^gpgsig $GIT_DEFAULT_HASH x509" output &&
+ git -C new fast-import <output &&
+ git -C new cat-file commit refs/heads/x509-signing >actual &&
+ grep "^gpgsig" actual &&
+ IMPORTED=$(git -C new rev-parse refs/heads/x509-signing) &&
+ test $X509_COMMIT = $IMPORTED
+
+'
+
+test_expect_success GPGSSH 'setup SSH signed commit' '
+
+ git checkout -b ssh-signing main &&
+ test_config gpg.format ssh &&
+ test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
+ echo "SSH content" >file &&
+ git add file &&
+ git commit -S -m "SSH signed commit" &&
+ SSH_COMMIT=$(git rev-parse HEAD) &&
+ git checkout main
+
+'
+
+test_expect_success GPGSSH 'round-trip SSH signed commit' '
+
+ git fast-export --signed-commits=verbatim ssh-signing >output &&
+ test_grep -E "^gpgsig $GIT_DEFAULT_HASH ssh" output &&
+ git -C new fast-import <output &&
+ git -C new cat-file commit refs/heads/ssh-signing >actual &&
+ grep "^gpgsig" actual &&
+ IMPORTED=$(git -C new rev-parse refs/heads/ssh-signing) &&
+ test $SSH_COMMIT = $IMPORTED
'
@@ -405,14 +435,13 @@
mkdir new &&
git --git-dir=new/.git init &&
git fast-export --signed-tags=strip --all >actual &&
- (cd new &&
- git fast-import &&
- test "$SUBENT1" = "$(git ls-tree refs/heads/main^ sub)" &&
- test "$SUBENT2" = "$(git ls-tree refs/heads/main sub)" &&
- git checkout main &&
- git submodule init &&
- git submodule update &&
- cmp sub/file ../sub/file) <actual
+ git -C new fast-import <actual &&
+ test "$SUBENT1" = "$(git -C new ls-tree refs/heads/main^ sub)" &&
+ test "$SUBENT2" = "$(git -C new ls-tree refs/heads/main sub)" &&
+ git -C new checkout main &&
+ git -C new submodule init &&
+ git -C new submodule update &&
+ cmp new/sub/file sub/file
'
@@ -454,10 +483,8 @@
git --git-dir=new/.git init &&
git fast-export -C -C --signed-tags=strip --all > output &&
grep "^C file2 file4\$" output &&
- cat output |
- (cd new &&
- git fast-import &&
- test $ENTRY = $(git rev-parse --verify refs/heads/copy))
+ git -C new fast-import <output &&
+ test $ENTRY = $(git -C new rev-parse --verify refs/heads/copy)
'
@@ -905,4 +932,42 @@
test_cmp expect actual
'
+test_expect_success GPG 'setup a commit with dual signatures on its SHA-1 and SHA-256 formats' '
+ # Create a signed SHA-256 commit
+ git init --object-format=sha256 explicit-sha256 &&
+ git -C explicit-sha256 config extensions.compatObjectFormat sha1 &&
+ git -C explicit-sha256 checkout -b dual-signed &&
+ test_commit -C explicit-sha256 A &&
+ echo B >explicit-sha256/B &&
+ git -C explicit-sha256 add B &&
+ test_tick &&
+ git -C explicit-sha256 commit -S -m "signed" B &&
+ SHA256_B=$(git -C explicit-sha256 rev-parse dual-signed) &&
+
+ # Create the corresponding SHA-1 commit
+ SHA1_B=$(git -C explicit-sha256 rev-parse --output-object-format=sha1 dual-signed) &&
+
+ # Check that the resulting SHA-1 commit has both signatures
+ echo $SHA1_B | git -C explicit-sha256 cat-file --batch >out &&
+ test_grep -E "^gpgsig " out &&
+ test_grep -E "^gpgsig-sha256 " out
+'
+
+test_expect_success GPG 'export and import of doubly signed commit' '
+ git -C explicit-sha256 fast-export --signed-commits=verbatim dual-signed >output &&
+ test_grep -E "^gpgsig sha1 openpgp" output &&
+ test_grep -E "^gpgsig sha256 openpgp" output &&
+ git -C new fast-import <output &&
+ git -C new cat-file commit refs/heads/dual-signed >actual &&
+ test_grep -E "^gpgsig " actual &&
+ test_grep -E "^gpgsig-sha256 " actual &&
+ IMPORTED=$(git -C new rev-parse refs/heads/dual-signed) &&
+ if test "$GIT_DEFAULT_HASH" = "sha1"
+ then
+ test $SHA1_B = $IMPORTED
+ else
+ test $SHA256_B = $IMPORTED
+ fi
+'
+
test_done
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 7679780..578d6c8 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -700,19 +700,17 @@
# ----------------------------------------------------------------------
# syntax highlighting
+test_lazy_prereq HIGHLIGHT '
+ highlight_version=$(highlight --version </dev/null 2>/dev/null) &&
+ test -n "$highlight_version"
+'
-highlight_version=$(highlight --version </dev/null 2>/dev/null)
-if [ $? -eq 127 ]; then
- say "Skipping syntax highlighting tests: 'highlight' not found"
-elif test -z "$highlight_version"; then
- say "Skipping syntax highlighting tests: incorrect 'highlight' found"
-else
- test_set_prereq HIGHLIGHT
+test_expect_success HIGHLIGHT '
cat >>gitweb_config.perl <<-\EOF
our $highlight_bin = "highlight";
- $feature{'highlight'}{'override'} = 1;
+ $feature{"highlight"}{"override"} = 1;
EOF
-fi
+'
test_expect_success HIGHLIGHT \
'syntax highlighting (no highlight, unknown syntax)' \
diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index 572d395..e6e07fa 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,12 +7,17 @@
UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
-ISO8859="$(printf "$ISO8859_ESCAPED")" &&
-echo content123 >"$ISO8859" &&
-rm "$ISO8859" || {
+test_lazy_prereq FS_ACCEPTS_ISO_8859_1 '
+ ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+ echo content123 >"$ISO8859" &&
+ rm "$ISO8859"
+'
+
+if ! test_have_prereq FS_ACCEPTS_ISO_8859_1
+then
skip_all="fs does not accept ISO-8859-1 filenames"
test_done
-}
+fi
test_expect_success 'start p4d' '
start_p4d
diff --git a/t/t9835-git-p4-metadata-encoding-python2.sh b/t/t9835-git-p4-metadata-encoding-python2.sh
index 6116f80..b969c7e 100755
--- a/t/t9835-git-p4-metadata-encoding-python2.sh
+++ b/t/t9835-git-p4-metadata-encoding-python2.sh
@@ -12,23 +12,25 @@
## SECTION REPEATED IN t9836 ##
###############################
+EXTRA_PATH="$(pwd)/temp_python"
+mkdir "$EXTRA_PATH"
+PATH="$EXTRA_PATH:$PATH"
+export PATH
+
# These tests are specific to Python 2. Write a custom script that executes
# git-p4 directly with the Python 2 interpreter to ensure that we use that
# version even if Git was compiled with Python 3.
-python_target_binary=$(which python2)
-if test -n "$python_target_binary"
-then
- mkdir temp_python
- PATH="$(pwd)/temp_python:$PATH"
- export PATH
-
- write_script temp_python/git-p4-python2 <<-EOF
+test_lazy_prereq P4_PYTHON2 '
+ python_target_binary=$(which python2) &&
+ test -n "$python_target_binary" &&
+ write_script "$EXTRA_PATH"/git-p4-python2 <<-EOF &&
exec "$python_target_binary" "$(git --exec-path)/git-p4" "\$@"
EOF
-fi
+ ( git p4-python2 || true ) >err &&
+ test_grep "valid commands" err
+'
-git p4-python2 >err
-if ! grep 'valid commands' err
+if ! test_have_prereq P4_PYTHON2
then
skip_all="skipping python2 git p4 tests; python2 not available"
test_done
diff --git a/t/t9836-git-p4-metadata-encoding-python3.sh b/t/t9836-git-p4-metadata-encoding-python3.sh
index 5e5217a..da6669b 100755
--- a/t/t9836-git-p4-metadata-encoding-python3.sh
+++ b/t/t9836-git-p4-metadata-encoding-python3.sh
@@ -12,23 +12,25 @@
## SECTION REPEATED IN t9835 ##
###############################
+EXTRA_PATH="$(pwd)/temp_python"
+mkdir "$EXTRA_PATH"
+PATH="$EXTRA_PATH:$PATH"
+export PATH
+
# These tests are specific to Python 3. Write a custom script that executes
# git-p4 directly with the Python 3 interpreter to ensure that we use that
# version even if Git was compiled with Python 2.
-python_target_binary=$(which python3)
-if test -n "$python_target_binary"
-then
- mkdir temp_python
- PATH="$(pwd)/temp_python:$PATH"
- export PATH
-
- write_script temp_python/git-p4-python3 <<-EOF
+test_lazy_prereq P4_PYTHON3 '
+ python_target_binary=$(which python3) &&
+ test -n "$python_target_binary" &&
+ write_script "$EXTRA_PATH"/git-p4-python3 <<-EOF &&
exec "$python_target_binary" "$(git --exec-path)/git-p4" "\$@"
EOF
-fi
+ ( git p4-python3 || true ) >err &&
+ test_grep "valid commands" err
+'
-git p4-python3 >err
-if ! grep 'valid commands' err
+if ! test_have_prereq P4_PYTHON3
then
skip_all="skipping python3 git p4 tests; python3 not available"
test_done
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 343b8cd..6650d33 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -2596,6 +2596,8 @@
--merge Z
--conflict=Z
--patch Z
+ --unified=Z
+ --inter-hunk-context=Z
--ignore-skip-worktree-bits Z
--ignore-other-worktrees Z
--recurse-submodules Z
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index d667dda..637a6f1 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -66,10 +66,6 @@
test_cmp expected "$actual"
'
-if test_have_prereq !FUNNYNAMES; then
- say 'Your filesystem does not allow newlines in filenames.'
-fi
-
test_expect_success FUNNYNAMES 'prompt - with newline in path' '
repo_with_newline="repo
with
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index bee4a2c..a28de7b 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -1451,9 +1451,21 @@
# test_seq 1 5 -- outputs 1 2 3 4 5 one line at a time
#
# or with one argument (end), in which case it starts counting
-# from 1.
+# from 1. In addition to the start/end arguments, you can pass an optional
+# printf format. For example:
+#
+# test_seq -f "line %d" 1 5
+#
+# would print 5 lines, "line 1" through "line 5".
test_seq () {
+ local fmt="%d"
+ case "$1" in
+ -f)
+ fmt="$2"
+ shift 2
+ ;;
+ esac
case $# in
1) set 1 "$@" ;;
2) ;;
@@ -1462,7 +1474,7 @@
test_seq_counter__=$1
while test "$test_seq_counter__" -le "$2"
do
- echo "$test_seq_counter__"
+ printf "$fmt\n" "$test_seq_counter__"
test_seq_counter__=$(( $test_seq_counter__ + 1 ))
done
}
@@ -1695,7 +1707,7 @@
# Detect the hash algorithm in use.
test_detect_hash () {
- case "$GIT_TEST_DEFAULT_HASH" in
+ case "${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}" in
"sha256")
test_hash_algo=sha256
test_compat_hash_algo=sha1
@@ -1767,6 +1779,9 @@
--hash=compat)
algo="$test_compat_hash_algo" &&
shift;;
+ --hash=builtin)
+ algo="$GIT_TEST_BUILTIN_HASH" &&
+ shift;;
--hash=*)
algo="${1#--hash=}" &&
shift;;
diff --git a/t/test-lib.sh b/t/test-lib.sh
index af722d3..621cd31 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -134,7 +134,8 @@
################################################################
# It appears that people try to run tests without building...
-"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null
+GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X"
+"$GIT_BINARY" >/dev/null
if test $? != 1
then
if test -n "$GIT_TEST_INSTALLED"
@@ -470,7 +471,7 @@
then
: Executed by a Bash version supporting BASH_XTRACEFD. Good.
else
- echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
+ echo >&2 "# warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
trace=
fi
fi
@@ -536,7 +537,8 @@
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
export EDITOR
-GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-sha1}"
+GIT_TEST_BUILTIN_HASH=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-hash: //p')
+GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}"
export GIT_DEFAULT_HASH
GIT_DEFAULT_REF_FORMAT="${GIT_TEST_DEFAULT_REF_FORMAT:-files}"
export GIT_DEFAULT_REF_FORMAT
@@ -707,7 +709,7 @@
exec 3>>"$GIT_TEST_TEE_OUTPUT_FILE" 4>&3
elif test "$verbose" = "t"
then
- exec 4>&2 3>&1
+ exec 4>&2 3>&2
else
exec 4>/dev/null 3>/dev/null
fi
@@ -949,7 +951,7 @@
test -z "$verbose_only" && return
if match_pattern_list $test_count "$verbose_only"
then
- exec 4>&2 3>&1
+ exec 4>&2 3>&2
# Emit a delimiting blank line when going from
# non-verbose to verbose. Within verbose mode the
# delimiter is printed by test_expect_*. The choice
@@ -1272,7 +1274,14 @@
check_test_results_san_file_ "$test_failure"
- if test -z "$skip_all" && test -n "$invert_exit_code"
+ if test "$test_fixed" != 0
+ then
+ if test -z "$invert_exit_code"
+ then
+ GIT_EXIT_OK=t
+ exit 1
+ fi
+ elif test -z "$skip_all" && test -n "$invert_exit_code"
then
say_color warn "# faking up non-zero exit with --invert-exit-code"
GIT_EXIT_OK=t
@@ -1577,6 +1586,8 @@
# Use -P to resolve symlinks in our working directory so that the cwd
# in subprocesses like git equals our $PWD (for pathname comparisons).
cd -P "$TRASH_DIRECTORY" || BAIL_OUT "cannot cd -P to \"$TRASH_DIRECTORY\""
+TRASH_DIRECTORY=$(pwd)
+HOME="$TRASH_DIRECTORY"
start_test_output "$0"
@@ -1636,6 +1647,12 @@
# Fix some commands on Windows, and other OS-specific things
uname_s=$(uname -s)
case $uname_s in
+Darwin)
+ test_set_prereq MACOS
+ test_set_prereq POSIXPERM
+ test_set_prereq BSLASHPSPEC
+ test_set_prereq EXECKEEPSPID
+ ;;
*MINGW*)
# Windows has its own (incompatible) sort and find
sort () {
@@ -1893,6 +1910,10 @@
esac
'
+test_lazy_prereq DEFAULT_HASH_ALGORITHM '
+ test "$GIT_TEST_BUILTIN_HASH" = "$GIT_DEFAULT_HASH"
+'
+
test_lazy_prereq DEFAULT_REPO_FORMAT '
test_have_prereq SHA1,REFFILES
'
diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c
index d54e455..03a3aa8 100644
--- a/t/unit-tests/clar/clar.c
+++ b/t/unit-tests/clar/clar.c
@@ -350,7 +350,7 @@ static void
clar_run_suite(const struct clar_suite *suite, const char *filter)
{
const struct clar_func *test = suite->tests;
- size_t i, matchlen;
+ size_t i, matchlen = 0;
struct clar_report *report;
int exact = 0;
diff --git a/t/unit-tests/lib-reftable.c b/t/unit-tests/lib-reftable.c
index 8a69612..fdb5b11 100644
--- a/t/unit-tests/lib-reftable.c
+++ b/t/unit-tests/lib-reftable.c
@@ -1,12 +1,14 @@
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
+#include "unit-test.h"
#include "lib-reftable.h"
-#include "test-lib.h"
+#include "hex.h"
+#include "parse-options.h"
#include "reftable/constants.h"
#include "reftable/writer.h"
#include "strbuf.h"
+#include "string-list.h"
+#include "strvec.h"
-void t_reftable_set_hash(uint8_t *p, int i, enum reftable_hash id)
+void cl_reftable_set_hash(uint8_t *p, int i, enum reftable_hash id)
{
memset(p, (uint8_t)i, hash_size(id));
}
@@ -22,17 +24,17 @@ static int strbuf_writer_flush(void *arg UNUSED)
return 0;
}
-struct reftable_writer *t_reftable_strbuf_writer(struct reftable_buf *buf,
+struct reftable_writer *cl_reftable_strbuf_writer(struct reftable_buf *buf,
struct reftable_write_options *opts)
{
struct reftable_writer *writer;
int ret = reftable_writer_new(&writer, &strbuf_writer_write, &strbuf_writer_flush,
buf, opts);
- check(!ret);
+ cl_assert(!ret);
return writer;
}
-void t_reftable_write_to_buf(struct reftable_buf *buf,
+void cl_reftable_write_to_buf(struct reftable_buf *buf,
struct reftable_ref_record *refs,
size_t nrefs,
struct reftable_log_record *logs,
@@ -64,35 +66,36 @@ void t_reftable_write_to_buf(struct reftable_buf *buf,
min = ui;
}
- writer = t_reftable_strbuf_writer(buf, &opts);
- reftable_writer_set_limits(writer, min, max);
+ writer = cl_reftable_strbuf_writer(buf, &opts);
+ ret = reftable_writer_set_limits(writer, min, max);
+ cl_assert(!ret);
if (nrefs) {
ret = reftable_writer_add_refs(writer, refs, nrefs);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
if (nlogs) {
ret = reftable_writer_add_logs(writer, logs, nlogs);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
ret = reftable_writer_close(writer);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
stats = reftable_writer_stats(writer);
- for (size_t i = 0; i < stats->ref_stats.blocks; i++) {
+ for (size_t i = 0; i < (size_t)stats->ref_stats.blocks; i++) {
size_t off = i * (opts.block_size ? opts.block_size
: DEFAULT_BLOCK_SIZE);
if (!off)
off = header_size(opts.hash_id == REFTABLE_HASH_SHA256 ? 2 : 1);
- check_char(buf->buf[off], ==, 'r');
+ cl_assert(buf->buf[off] == 'r');
}
if (nrefs)
- check_int(stats->ref_stats.blocks, >, 0);
+ cl_assert(stats->ref_stats.blocks > 0);
if (nlogs)
- check_int(stats->log_stats.blocks, >, 0);
+ cl_assert(stats->log_stats.blocks > 0);
reftable_writer_free(writer);
}
diff --git a/t/unit-tests/lib-reftable.h b/t/unit-tests/lib-reftable.h
index e4c360f..d7e6d31 100644
--- a/t/unit-tests/lib-reftable.h
+++ b/t/unit-tests/lib-reftable.h
@@ -1,21 +1,20 @@
-#ifndef LIB_REFTABLE_H
-#define LIB_REFTABLE_H
-
+#include "git-compat-util.h"
+#include "clar/clar.h"
+#include "clar-decls.h"
#include "git-compat-util.h"
#include "reftable/reftable-writer.h"
+#include "strbuf.h"
struct reftable_buf;
-void t_reftable_set_hash(uint8_t *p, int i, enum reftable_hash id);
+void cl_reftable_set_hash(uint8_t *p, int i, enum reftable_hash id);
-struct reftable_writer *t_reftable_strbuf_writer(struct reftable_buf *buf,
+struct reftable_writer *cl_reftable_strbuf_writer(struct reftable_buf *buf,
struct reftable_write_options *opts);
-void t_reftable_write_to_buf(struct reftable_buf *buf,
+void cl_reftable_write_to_buf(struct reftable_buf *buf,
struct reftable_ref_record *refs,
size_t nrecords,
struct reftable_log_record *logs,
size_t nlogs,
struct reftable_write_options *opts);
-
-#endif
diff --git a/t/unit-tests/t-reftable-basics.c b/t/unit-tests/t-reftable-basics.c
deleted file mode 100644
index c9e751e..0000000
--- a/t/unit-tests/t-reftable-basics.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-Copyright 2020 Google LLC
-
-Use of this source code is governed by a BSD-style
-license that can be found in the LICENSE file or at
-https://developers.google.com/open-source/licenses/bsd
-*/
-
-#include "test-lib.h"
-#include "reftable/basics.h"
-
-struct integer_needle_lesseq_args {
- int needle;
- int *haystack;
-};
-
-static int integer_needle_lesseq(size_t i, void *_args)
-{
- struct integer_needle_lesseq_args *args = _args;
- return args->needle <= args->haystack[i];
-}
-
-static void *realloc_stub(void *p UNUSED, size_t size UNUSED)
-{
- return NULL;
-}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- if_test ("binary search with binsearch works") {
- int haystack[] = { 2, 4, 6, 8, 10 };
- struct {
- int needle;
- size_t expected_idx;
- } testcases[] = {
- {-9000, 0},
- {-1, 0},
- {0, 0},
- {2, 0},
- {3, 1},
- {4, 1},
- {7, 3},
- {9, 4},
- {10, 4},
- {11, 5},
- {9000, 5},
- };
-
- for (size_t i = 0; i < ARRAY_SIZE(testcases); i++) {
- struct integer_needle_lesseq_args args = {
- .haystack = haystack,
- .needle = testcases[i].needle,
- };
- size_t idx;
-
- idx = binsearch(ARRAY_SIZE(haystack),
- &integer_needle_lesseq, &args);
- check_int(idx, ==, testcases[i].expected_idx);
- }
- }
-
- if_test ("names_length returns size of a NULL-terminated string array") {
- const char *a[] = { "a", "b", NULL };
- check_int(names_length(a), ==, 2);
- }
-
- if_test ("names_equal compares NULL-terminated string arrays") {
- const char *a[] = { "a", "b", "c", NULL };
- const char *b[] = { "a", "b", "d", NULL };
- const char *c[] = { "a", "b", NULL };
-
- check(names_equal(a, a));
- check(!names_equal(a, b));
- check(!names_equal(a, c));
- }
-
- if_test ("parse_names works for basic input") {
- char in1[] = "line\n";
- char in2[] = "a\nb\nc";
- char **out = parse_names(in1, strlen(in1));
- check(out != NULL);
- check_str(out[0], "line");
- check(!out[1]);
- free_names(out);
-
- out = parse_names(in2, strlen(in2));
- check(out != NULL);
- check_str(out[0], "a");
- check_str(out[1], "b");
- check_str(out[2], "c");
- check(!out[3]);
- free_names(out);
- }
-
- if_test ("parse_names drops empty string") {
- char in[] = "a\n\nb\n";
- char **out = parse_names(in, strlen(in));
- check(out != NULL);
- check_str(out[0], "a");
- /* simply '\n' should be dropped as empty string */
- check_str(out[1], "b");
- check(!out[2]);
- free_names(out);
- }
-
- if_test ("common_prefix_size works") {
- struct reftable_buf a = REFTABLE_BUF_INIT;
- struct reftable_buf b = REFTABLE_BUF_INIT;
- struct {
- const char *a, *b;
- int want;
- } cases[] = {
- {"abcdef", "abc", 3},
- { "abc", "ab", 2 },
- { "", "abc", 0 },
- { "abc", "abd", 2 },
- { "abc", "pqr", 0 },
- };
-
- for (size_t i = 0; i < ARRAY_SIZE(cases); i++) {
- check(!reftable_buf_addstr(&a, cases[i].a));
- check(!reftable_buf_addstr(&b, cases[i].b));
- check_uint(common_prefix_size(&a, &b), ==, cases[i].want);
- reftable_buf_reset(&a);
- reftable_buf_reset(&b);
- }
- reftable_buf_release(&a);
- reftable_buf_release(&b);
- }
-
- if_test ("reftable_put_be64 and reftable_get_be64 work") {
- uint64_t in = 0x1122334455667788;
- uint8_t dest[8];
- uint64_t out;
- reftable_put_be64(dest, in);
- out = reftable_get_be64(dest);
- check_int(in, ==, out);
- }
-
- if_test ("reftable_put_be32 and reftable_get_be32 work") {
- uint32_t in = 0x11223344;
- uint8_t dest[4];
- uint32_t out;
- reftable_put_be32(dest, in);
- out = reftable_get_be32(dest);
- check_int(in, ==, out);
- }
-
- if_test ("reftable_put_be24 and reftable_get_be24 work") {
- uint32_t in = 0x112233;
- uint8_t dest[3];
- uint32_t out;
- reftable_put_be24(dest, in);
- out = reftable_get_be24(dest);
- check_int(in, ==, out);
- }
-
- if_test ("put_be16 and get_be16 work") {
- uint32_t in = 0xfef1;
- uint8_t dest[3];
- uint32_t out;
- reftable_put_be16(dest, in);
- out = reftable_get_be16(dest);
- check_int(in, ==, out);
- }
-
- if_test ("REFTABLE_ALLOC_GROW works") {
- int *arr = NULL, *old_arr;
- size_t alloc = 0, old_alloc;
-
- check(!REFTABLE_ALLOC_GROW(arr, 1, alloc));
- check(arr != NULL);
- check_uint(alloc, >=, 1);
- arr[0] = 42;
-
- old_alloc = alloc;
- old_arr = arr;
- reftable_set_alloc(NULL, realloc_stub, NULL);
- check(REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
- check(arr == old_arr);
- check_uint(alloc, ==, old_alloc);
-
- old_alloc = alloc;
- reftable_set_alloc(NULL, NULL, NULL);
- check(!REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
- check(arr != NULL);
- check_uint(alloc, >, old_alloc);
- arr[alloc - 1] = 42;
-
- reftable_free(arr);
- }
-
- if_test ("REFTABLE_ALLOC_GROW_OR_NULL works") {
- int *arr = NULL;
- size_t alloc = 0, old_alloc;
-
- REFTABLE_ALLOC_GROW_OR_NULL(arr, 1, alloc);
- check(arr != NULL);
- check_uint(alloc, >=, 1);
- arr[0] = 42;
-
- old_alloc = alloc;
- REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
- check(arr != NULL);
- check_uint(alloc, >, old_alloc);
- arr[alloc - 1] = 42;
-
- old_alloc = alloc;
- reftable_set_alloc(NULL, realloc_stub, NULL);
- REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
- check(arr == NULL);
- check_uint(alloc, ==, 0);
- reftable_set_alloc(NULL, NULL, NULL);
-
- reftable_free(arr);
- }
-
- return test_done();
-}
diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c
deleted file mode 100644
index 2f49c97..0000000
--- a/t/unit-tests/t-reftable-stack.c
+++ /dev/null
@@ -1,1451 +0,0 @@
-/*
-Copyright 2020 Google LLC
-
-Use of this source code is governed by a BSD-style
-license that can be found in the LICENSE file or at
-https://developers.google.com/open-source/licenses/bsd
-*/
-
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
-#include "test-lib.h"
-#include "lib-reftable.h"
-#include "dir.h"
-#include "reftable/merged.h"
-#include "reftable/reftable-error.h"
-#include "reftable/stack.h"
-#include "reftable/table.h"
-#include "strbuf.h"
-#include "tempfile.h"
-#include <dirent.h>
-
-static void clear_dir(const char *dirname)
-{
- struct strbuf path = REFTABLE_BUF_INIT;
- strbuf_addstr(&path, dirname);
- remove_dir_recursively(&path, 0);
- strbuf_release(&path);
-}
-
-static int count_dir_entries(const char *dirname)
-{
- DIR *dir = opendir(dirname);
- int len = 0;
- struct dirent *d;
- if (!dir)
- return 0;
-
- while ((d = readdir(dir))) {
- /*
- * Besides skipping over "." and "..", we also need to
- * skip over other files that have a leading ".". This
- * is due to behaviour of NFS, which will rename files
- * to ".nfs*" to emulate delete-on-last-close.
- *
- * In any case this should be fine as the reftable
- * library will never write files with leading dots
- * anyway.
- */
- if (starts_with(d->d_name, "."))
- continue;
- len++;
- }
- closedir(dir);
- return len;
-}
-
-/*
- * Work linenumber into the tempdir, so we can see which tests forget to
- * cleanup.
- */
-static char *get_tmp_template(int linenumber)
-{
- const char *tmp = getenv("TMPDIR");
- static char template[1024];
- snprintf(template, sizeof(template) - 1, "%s/stack_test-%d.XXXXXX",
- tmp ? tmp : "/tmp", linenumber);
- return template;
-}
-
-static char *get_tmp_dir(int linenumber)
-{
- char *dir = get_tmp_template(linenumber);
- check(mkdtemp(dir) != NULL);
- return dir;
-}
-
-static void t_read_file(void)
-{
- char *fn = get_tmp_template(__LINE__);
- struct tempfile *tmp = mks_tempfile(fn);
- int fd = get_tempfile_fd(tmp);
- char out[1024] = "line1\n\nline2\nline3";
- int n, err;
- char **names = NULL;
- const char *want[] = { "line1", "line2", "line3" };
-
- check_int(fd, >, 0);
- n = write_in_full(fd, out, strlen(out));
- check_int(n, ==, strlen(out));
- err = close(fd);
- check_int(err, >=, 0);
-
- err = read_lines(fn, &names);
- check(!err);
-
- for (size_t i = 0; names[i]; i++)
- check_str(want[i], names[i]);
- free_names(names);
- (void) remove(fn);
- delete_tempfile(&tmp);
-}
-
-static int write_test_ref(struct reftable_writer *wr, void *arg)
-{
- struct reftable_ref_record *ref = arg;
- check(!reftable_writer_set_limits(wr, ref->update_index,
- ref->update_index));
- return reftable_writer_add_ref(wr, ref);
-}
-
-static void write_n_ref_tables(struct reftable_stack *st,
- size_t n)
-{
- int disable_auto_compact;
- int err;
-
- disable_auto_compact = st->opts.disable_auto_compact;
- st->opts.disable_auto_compact = 1;
-
- for (size_t i = 0; i < n; i++) {
- struct reftable_ref_record ref = {
- .update_index = reftable_stack_next_update_index(st),
- .value_type = REFTABLE_REF_VAL1,
- };
- char buf[128];
-
- snprintf(buf, sizeof(buf), "refs/heads/branch-%04"PRIuMAX, (uintmax_t)i);
- ref.refname = buf;
- t_reftable_set_hash(ref.value.val1, i, REFTABLE_HASH_SHA1);
-
- err = reftable_stack_add(st, &write_test_ref, &ref);
- check(!err);
- }
-
- st->opts.disable_auto_compact = disable_auto_compact;
-}
-
-struct write_log_arg {
- struct reftable_log_record *log;
- uint64_t update_index;
-};
-
-static int write_test_log(struct reftable_writer *wr, void *arg)
-{
- struct write_log_arg *wla = arg;
-
- check(!reftable_writer_set_limits(wr, wla->update_index,
- wla->update_index));
- return reftable_writer_add_log(wr, wla->log);
-}
-
-static void t_reftable_stack_add_one(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_buf scratch = REFTABLE_BUF_INIT;
- int mask = umask(002);
- struct reftable_write_options opts = {
- .default_permissions = 0660,
- };
- struct reftable_stack *st = NULL;
- int err;
- struct reftable_ref_record ref = {
- .refname = (char *) "HEAD",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- struct reftable_ref_record dest = { 0 };
- struct stat stat_result = { 0 };
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
-
- err = reftable_stack_read_ref(st, ref.refname, &dest);
- check(!err);
- check(reftable_ref_record_equal(&ref, &dest, REFTABLE_HASH_SIZE_SHA1));
- check_int(st->tables_len, >, 0);
-
-#ifndef GIT_WINDOWS_NATIVE
- check(!reftable_buf_addstr(&scratch, dir));
- check(!reftable_buf_addstr(&scratch, "/tables.list"));
- err = stat(scratch.buf, &stat_result);
- check(!err);
- check_int((stat_result.st_mode & 0777), ==, opts.default_permissions);
-
- reftable_buf_reset(&scratch);
- check(!reftable_buf_addstr(&scratch, dir));
- check(!reftable_buf_addstr(&scratch, "/"));
- /* do not try at home; not an external API for reftable. */
- check(!reftable_buf_addstr(&scratch, st->tables[0]->name));
- err = stat(scratch.buf, &stat_result);
- check(!err);
- check_int((stat_result.st_mode & 0777), ==, opts.default_permissions);
-#else
- (void) stat_result;
-#endif
-
- reftable_ref_record_release(&dest);
- reftable_stack_destroy(st);
- reftable_buf_release(&scratch);
- clear_dir(dir);
- umask(mask);
-}
-
-static void t_reftable_stack_uptodate(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st1 = NULL;
- struct reftable_stack *st2 = NULL;
- char *dir = get_tmp_dir(__LINE__);
-
- int err;
- struct reftable_ref_record ref1 = {
- .refname = (char *) "HEAD",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- struct reftable_ref_record ref2 = {
- .refname = (char *) "branch2",
- .update_index = 2,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
-
-
- /* simulate multi-process access to the same stack
- by creating two stacks for the same directory.
- */
- err = reftable_new_stack(&st1, dir, &opts);
- check(!err);
-
- err = reftable_new_stack(&st2, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st1, write_test_ref, &ref1);
- check(!err);
-
- err = reftable_stack_add(st2, write_test_ref, &ref2);
- check_int(err, ==, REFTABLE_OUTDATED_ERROR);
-
- err = reftable_stack_reload(st2);
- check(!err);
-
- err = reftable_stack_add(st2, write_test_ref, &ref2);
- check(!err);
- reftable_stack_destroy(st1);
- reftable_stack_destroy(st2);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_transaction_api(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err;
- struct reftable_addition *add = NULL;
-
- struct reftable_ref_record ref = {
- .refname = (char *) "HEAD",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- struct reftable_ref_record dest = { 0 };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- reftable_addition_destroy(add);
-
- err = reftable_stack_new_addition(&add, st, 0);
- check(!err);
-
- err = reftable_addition_add(add, write_test_ref, &ref);
- check(!err);
-
- err = reftable_addition_commit(add);
- check(!err);
-
- reftable_addition_destroy(add);
-
- err = reftable_stack_read_ref(st, ref.refname, &dest);
- check(!err);
- check_int(REFTABLE_REF_SYMREF, ==, dest.value_type);
- check(reftable_ref_record_equal(&ref, &dest, REFTABLE_HASH_SIZE_SHA1));
-
- reftable_ref_record_release(&dest);
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_transaction_with_reload(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_stack *st1 = NULL, *st2 = NULL;
- int err;
- struct reftable_addition *add = NULL;
- struct reftable_ref_record refs[2] = {
- {
- .refname = (char *) "refs/heads/a",
- .update_index = 1,
- .value_type = REFTABLE_REF_VAL1,
- .value.val1 = { '1' },
- },
- {
- .refname = (char *) "refs/heads/b",
- .update_index = 2,
- .value_type = REFTABLE_REF_VAL1,
- .value.val1 = { '1' },
- },
- };
- struct reftable_ref_record ref = { 0 };
-
- err = reftable_new_stack(&st1, dir, NULL);
- check(!err);
- err = reftable_new_stack(&st2, dir, NULL);
- check(!err);
-
- err = reftable_stack_new_addition(&add, st1, 0);
- check(!err);
- err = reftable_addition_add(add, write_test_ref, &refs[0]);
- check(!err);
- err = reftable_addition_commit(add);
- check(!err);
- reftable_addition_destroy(add);
-
- /*
- * The second stack is now outdated, which we should notice. We do not
- * create the addition and lock the stack by default, but allow the
- * reload to happen when REFTABLE_STACK_NEW_ADDITION_RELOAD is set.
- */
- err = reftable_stack_new_addition(&add, st2, 0);
- check_int(err, ==, REFTABLE_OUTDATED_ERROR);
- err = reftable_stack_new_addition(&add, st2, REFTABLE_STACK_NEW_ADDITION_RELOAD);
- check(!err);
- err = reftable_addition_add(add, write_test_ref, &refs[1]);
- check(!err);
- err = reftable_addition_commit(add);
- check(!err);
- reftable_addition_destroy(add);
-
- for (size_t i = 0; i < ARRAY_SIZE(refs); i++) {
- err = reftable_stack_read_ref(st2, refs[i].refname, &ref);
- check(!err);
- check(reftable_ref_record_equal(&refs[i], &ref, REFTABLE_HASH_SIZE_SHA1));
- }
-
- reftable_ref_record_release(&ref);
- reftable_stack_destroy(st1);
- reftable_stack_destroy(st2);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_transaction_api_performs_auto_compaction(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = {0};
- struct reftable_addition *add = NULL;
- struct reftable_stack *st = NULL;
- size_t n = 20;
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (size_t i = 0; i <= n; i++) {
- struct reftable_ref_record ref = {
- .update_index = reftable_stack_next_update_index(st),
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- char name[100];
-
- snprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
- ref.refname = name;
-
- /*
- * Disable auto-compaction for all but the last runs. Like this
- * we can ensure that we indeed honor this setting and have
- * better control over when exactly auto compaction runs.
- */
- st->opts.disable_auto_compact = i != n;
-
- err = reftable_stack_new_addition(&add, st, 0);
- check(!err);
-
- err = reftable_addition_add(add, write_test_ref, &ref);
- check(!err);
-
- err = reftable_addition_commit(add);
- check(!err);
-
- reftable_addition_destroy(add);
-
- /*
- * The stack length should grow continuously for all runs where
- * auto compaction is disabled. When enabled, we should merge
- * all tables in the stack.
- */
- if (i != n)
- check_int(st->merged->tables_len, ==, i + 1);
- else
- check_int(st->merged->tables_len, ==, 1);
- }
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_auto_compaction_fails_gracefully(void)
-{
- struct reftable_ref_record ref = {
- .refname = (char *) "refs/heads/master",
- .update_index = 1,
- .value_type = REFTABLE_REF_VAL1,
- .value.val1 = {0x01},
- };
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st;
- struct reftable_buf table_path = REFTABLE_BUF_INIT;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
- check_int(st->merged->tables_len, ==, 1);
- check_int(st->stats.attempts, ==, 0);
- check_int(st->stats.failures, ==, 0);
-
- /*
- * Lock the newly written table such that it cannot be compacted.
- * Adding a new table to the stack should not be impacted by this, even
- * though auto-compaction will now fail.
- */
- check(!reftable_buf_addstr(&table_path, dir));
- check(!reftable_buf_addstr(&table_path, "/"));
- check(!reftable_buf_addstr(&table_path, st->tables[0]->name));
- check(!reftable_buf_addstr(&table_path, ".lock"));
- write_file_buf(table_path.buf, "", 0);
-
- ref.update_index = 2;
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
- check_int(st->merged->tables_len, ==, 2);
- check_int(st->stats.attempts, ==, 1);
- check_int(st->stats.failures, ==, 1);
-
- reftable_stack_destroy(st);
- reftable_buf_release(&table_path);
- clear_dir(dir);
-}
-
-static int write_error(struct reftable_writer *wr UNUSED, void *arg)
-{
- return *((int *)arg);
-}
-
-static void t_reftable_stack_update_index_check(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err;
- struct reftable_ref_record ref1 = {
- .refname = (char *) "name1",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- struct reftable_ref_record ref2 = {
- .refname = (char *) "name2",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st, write_test_ref, &ref1);
- check(!err);
-
- err = reftable_stack_add(st, write_test_ref, &ref2);
- check_int(err, ==, REFTABLE_API_ERROR);
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_lock_failure(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err, i;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
- for (i = -1; i != REFTABLE_EMPTY_TABLE_ERROR; i--) {
- err = reftable_stack_add(st, write_error, &i);
- check_int(err, ==, i);
- }
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_add(void)
-{
- int err = 0;
- struct reftable_write_options opts = {
- .exact_log_message = 1,
- .default_permissions = 0660,
- .disable_auto_compact = 1,
- };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_ref_record refs[2] = { 0 };
- struct reftable_log_record logs[2] = { 0 };
- struct reftable_buf path = REFTABLE_BUF_INIT;
- struct stat stat_result;
- size_t i, N = ARRAY_SIZE(refs);
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (i = 0; i < N; i++) {
- char buf[256];
- snprintf(buf, sizeof(buf), "branch%02"PRIuMAX, (uintmax_t)i);
- refs[i].refname = xstrdup(buf);
- refs[i].update_index = i + 1;
- refs[i].value_type = REFTABLE_REF_VAL1;
- t_reftable_set_hash(refs[i].value.val1, i, REFTABLE_HASH_SHA1);
-
- logs[i].refname = xstrdup(buf);
- logs[i].update_index = N + i + 1;
- logs[i].value_type = REFTABLE_LOG_UPDATE;
- logs[i].value.update.email = xstrdup("identity@invalid");
- t_reftable_set_hash(logs[i].value.update.new_hash, i, REFTABLE_HASH_SHA1);
- }
-
- for (i = 0; i < N; i++) {
- int err = reftable_stack_add(st, write_test_ref, &refs[i]);
- check(!err);
- }
-
- for (i = 0; i < N; i++) {
- struct write_log_arg arg = {
- .log = &logs[i],
- .update_index = reftable_stack_next_update_index(st),
- };
- int err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
- }
-
- err = reftable_stack_compact_all(st, NULL);
- check(!err);
-
- for (i = 0; i < N; i++) {
- struct reftable_ref_record dest = { 0 };
-
- int err = reftable_stack_read_ref(st, refs[i].refname, &dest);
- check(!err);
- check(reftable_ref_record_equal(&dest, refs + i,
- REFTABLE_HASH_SIZE_SHA1));
- reftable_ref_record_release(&dest);
- }
-
- for (i = 0; i < N; i++) {
- struct reftable_log_record dest = { 0 };
- int err = reftable_stack_read_log(st, refs[i].refname, &dest);
- check(!err);
- check(reftable_log_record_equal(&dest, logs + i,
- REFTABLE_HASH_SIZE_SHA1));
- reftable_log_record_release(&dest);
- }
-
-#ifndef GIT_WINDOWS_NATIVE
- check(!reftable_buf_addstr(&path, dir));
- check(!reftable_buf_addstr(&path, "/tables.list"));
- err = stat(path.buf, &stat_result);
- check(!err);
- check_int((stat_result.st_mode & 0777), ==, opts.default_permissions);
-
- reftable_buf_reset(&path);
- check(!reftable_buf_addstr(&path, dir));
- check(!reftable_buf_addstr(&path, "/"));
- /* do not try at home; not an external API for reftable. */
- check(!reftable_buf_addstr(&path, st->tables[0]->name));
- err = stat(path.buf, &stat_result);
- check(!err);
- check_int((stat_result.st_mode & 0777), ==, opts.default_permissions);
-#else
- (void) stat_result;
-#endif
-
- /* cleanup */
- reftable_stack_destroy(st);
- for (i = 0; i < N; i++) {
- reftable_ref_record_release(&refs[i]);
- reftable_log_record_release(&logs[i]);
- }
- reftable_buf_release(&path);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_iterator(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_ref_record refs[10] = { 0 };
- struct reftable_log_record logs[10] = { 0 };
- struct reftable_iterator it = { 0 };
- size_t N = ARRAY_SIZE(refs), i;
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (i = 0; i < N; i++) {
- refs[i].refname = xstrfmt("branch%02"PRIuMAX, (uintmax_t)i);
- refs[i].update_index = i + 1;
- refs[i].value_type = REFTABLE_REF_VAL1;
- t_reftable_set_hash(refs[i].value.val1, i, REFTABLE_HASH_SHA1);
-
- logs[i].refname = xstrfmt("branch%02"PRIuMAX, (uintmax_t)i);
- logs[i].update_index = i + 1;
- logs[i].value_type = REFTABLE_LOG_UPDATE;
- logs[i].value.update.email = xstrdup("johndoe@invalid");
- logs[i].value.update.message = xstrdup("commit\n");
- t_reftable_set_hash(logs[i].value.update.new_hash, i, REFTABLE_HASH_SHA1);
- }
-
- for (i = 0; i < N; i++) {
- err = reftable_stack_add(st, write_test_ref, &refs[i]);
- check(!err);
- }
-
- for (i = 0; i < N; i++) {
- struct write_log_arg arg = {
- .log = &logs[i],
- .update_index = reftable_stack_next_update_index(st),
- };
-
- err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
- }
-
- reftable_stack_init_ref_iterator(st, &it);
- reftable_iterator_seek_ref(&it, refs[0].refname);
- for (i = 0; ; i++) {
- struct reftable_ref_record ref = { 0 };
-
- err = reftable_iterator_next_ref(&it, &ref);
- if (err > 0)
- break;
- check(!err);
- check(reftable_ref_record_equal(&ref, &refs[i], REFTABLE_HASH_SIZE_SHA1));
- reftable_ref_record_release(&ref);
- }
- check_int(i, ==, N);
-
- reftable_iterator_destroy(&it);
-
- err = reftable_stack_init_log_iterator(st, &it);
- check(!err);
-
- reftable_iterator_seek_log(&it, logs[0].refname);
- for (i = 0; ; i++) {
- struct reftable_log_record log = { 0 };
-
- err = reftable_iterator_next_log(&it, &log);
- if (err > 0)
- break;
- check(!err);
- check(reftable_log_record_equal(&log, &logs[i], REFTABLE_HASH_SIZE_SHA1));
- reftable_log_record_release(&log);
- }
- check_int(i, ==, N);
-
- reftable_stack_destroy(st);
- reftable_iterator_destroy(&it);
- for (i = 0; i < N; i++) {
- reftable_ref_record_release(&refs[i]);
- reftable_log_record_release(&logs[i]);
- }
- clear_dir(dir);
-}
-
-static void t_reftable_stack_log_normalize(void)
-{
- int err = 0;
- struct reftable_write_options opts = {
- 0,
- };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_log_record input = {
- .refname = (char *) "branch",
- .update_index = 1,
- .value_type = REFTABLE_LOG_UPDATE,
- .value = {
- .update = {
- .new_hash = { 1 },
- .old_hash = { 2 },
- },
- },
- };
- struct reftable_log_record dest = {
- .update_index = 0,
- };
- struct write_log_arg arg = {
- .log = &input,
- .update_index = 1,
- };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- input.value.update.message = (char *) "one\ntwo";
- err = reftable_stack_add(st, write_test_log, &arg);
- check_int(err, ==, REFTABLE_API_ERROR);
-
- input.value.update.message = (char *) "one";
- err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
-
- err = reftable_stack_read_log(st, input.refname, &dest);
- check(!err);
- check_str(dest.value.update.message, "one\n");
-
- input.value.update.message = (char *) "two\n";
- arg.update_index = 2;
- err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
- err = reftable_stack_read_log(st, input.refname, &dest);
- check(!err);
- check_str(dest.value.update.message, "two\n");
-
- /* cleanup */
- reftable_stack_destroy(st);
- reftable_log_record_release(&dest);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_tombstone(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err;
- struct reftable_ref_record refs[2] = { 0 };
- struct reftable_log_record logs[2] = { 0 };
- size_t i, N = ARRAY_SIZE(refs);
- struct reftable_ref_record dest = { 0 };
- struct reftable_log_record log_dest = { 0 };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- /* even entries add the refs, odd entries delete them. */
- for (i = 0; i < N; i++) {
- const char *buf = "branch";
- refs[i].refname = xstrdup(buf);
- refs[i].update_index = i + 1;
- if (i % 2 == 0) {
- refs[i].value_type = REFTABLE_REF_VAL1;
- t_reftable_set_hash(refs[i].value.val1, i,
- REFTABLE_HASH_SHA1);
- }
-
- logs[i].refname = xstrdup(buf);
- /*
- * update_index is part of the key so should be constant.
- * The value itself should be less than the writer's upper
- * limit.
- */
- logs[i].update_index = 1;
- if (i % 2 == 0) {
- logs[i].value_type = REFTABLE_LOG_UPDATE;
- t_reftable_set_hash(logs[i].value.update.new_hash, i,
- REFTABLE_HASH_SHA1);
- logs[i].value.update.email =
- xstrdup("identity@invalid");
- }
- }
- for (i = 0; i < N; i++) {
- int err = reftable_stack_add(st, write_test_ref, &refs[i]);
- check(!err);
- }
-
- for (i = 0; i < N; i++) {
- struct write_log_arg arg = {
- .log = &logs[i],
- .update_index = reftable_stack_next_update_index(st),
- };
- int err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
- }
-
- err = reftable_stack_read_ref(st, "branch", &dest);
- check_int(err, ==, 1);
- reftable_ref_record_release(&dest);
-
- err = reftable_stack_read_log(st, "branch", &log_dest);
- check_int(err, ==, 1);
- reftable_log_record_release(&log_dest);
-
- err = reftable_stack_compact_all(st, NULL);
- check(!err);
-
- err = reftable_stack_read_ref(st, "branch", &dest);
- check_int(err, ==, 1);
-
- err = reftable_stack_read_log(st, "branch", &log_dest);
- check_int(err, ==, 1);
- reftable_ref_record_release(&dest);
- reftable_log_record_release(&log_dest);
-
- /* cleanup */
- reftable_stack_destroy(st);
- for (i = 0; i < N; i++) {
- reftable_ref_record_release(&refs[i]);
- reftable_log_record_release(&logs[i]);
- }
- clear_dir(dir);
-}
-
-static void t_reftable_stack_hash_id(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err;
-
- struct reftable_ref_record ref = {
- .refname = (char *) "master",
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "target",
- .update_index = 1,
- };
- struct reftable_write_options opts32 = { .hash_id = REFTABLE_HASH_SHA256 };
- struct reftable_stack *st32 = NULL;
- struct reftable_write_options opts_default = { 0 };
- struct reftable_stack *st_default = NULL;
- struct reftable_ref_record dest = { 0 };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
-
- /* can't read it with the wrong hash ID. */
- err = reftable_new_stack(&st32, dir, &opts32);
- check_int(err, ==, REFTABLE_FORMAT_ERROR);
-
- /* check that we can read it back with default opts too. */
- err = reftable_new_stack(&st_default, dir, &opts_default);
- check(!err);
-
- err = reftable_stack_read_ref(st_default, "master", &dest);
- check(!err);
-
- check(reftable_ref_record_equal(&ref, &dest, REFTABLE_HASH_SIZE_SHA1));
- reftable_ref_record_release(&dest);
- reftable_stack_destroy(st);
- reftable_stack_destroy(st_default);
- clear_dir(dir);
-}
-
-static void t_suggest_compaction_segment(void)
-{
- uint64_t sizes[] = { 512, 64, 17, 16, 9, 9, 9, 16, 2, 16 };
- struct segment min =
- suggest_compaction_segment(sizes, ARRAY_SIZE(sizes), 2);
- check_int(min.start, ==, 1);
- check_int(min.end, ==, 10);
-}
-
-static void t_suggest_compaction_segment_nothing(void)
-{
- uint64_t sizes[] = { 64, 32, 16, 8, 4, 2 };
- struct segment result =
- suggest_compaction_segment(sizes, ARRAY_SIZE(sizes), 2);
- check_int(result.start, ==, result.end);
-}
-
-static void t_reflog_expire(void)
-{
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- struct reftable_log_record logs[20] = { 0 };
- size_t i, N = ARRAY_SIZE(logs) - 1;
- int err;
- struct reftable_log_expiry_config expiry = {
- .time = 10,
- };
- struct reftable_log_record log = { 0 };
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (i = 1; i <= N; i++) {
- char buf[256];
- snprintf(buf, sizeof(buf), "branch%02"PRIuMAX, (uintmax_t)i);
-
- logs[i].refname = xstrdup(buf);
- logs[i].update_index = i;
- logs[i].value_type = REFTABLE_LOG_UPDATE;
- logs[i].value.update.time = i;
- logs[i].value.update.email = xstrdup("identity@invalid");
- t_reftable_set_hash(logs[i].value.update.new_hash, i,
- REFTABLE_HASH_SHA1);
- }
-
- for (i = 1; i <= N; i++) {
- struct write_log_arg arg = {
- .log = &logs[i],
- .update_index = reftable_stack_next_update_index(st),
- };
- int err = reftable_stack_add(st, write_test_log, &arg);
- check(!err);
- }
-
- err = reftable_stack_compact_all(st, NULL);
- check(!err);
-
- err = reftable_stack_compact_all(st, &expiry);
- check(!err);
-
- err = reftable_stack_read_log(st, logs[9].refname, &log);
- check_int(err, ==, 1);
-
- err = reftable_stack_read_log(st, logs[11].refname, &log);
- check(!err);
-
- expiry.min_update_index = 15;
- err = reftable_stack_compact_all(st, &expiry);
- check(!err);
-
- err = reftable_stack_read_log(st, logs[14].refname, &log);
- check_int(err, ==, 1);
-
- err = reftable_stack_read_log(st, logs[16].refname, &log);
- check(!err);
-
- /* cleanup */
- reftable_stack_destroy(st);
- for (i = 0; i <= N; i++)
- reftable_log_record_release(&logs[i]);
- clear_dir(dir);
- reftable_log_record_release(&log);
-}
-
-static int write_nothing(struct reftable_writer *wr, void *arg UNUSED)
-{
- check(!reftable_writer_set_limits(wr, 1, 1));
- return 0;
-}
-
-static void t_empty_add(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- int err;
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_stack *st2 = NULL;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- err = reftable_stack_add(st, write_nothing, NULL);
- check(!err);
-
- err = reftable_new_stack(&st2, dir, &opts);
- check(!err);
- clear_dir(dir);
- reftable_stack_destroy(st);
- reftable_stack_destroy(st2);
-}
-
-static int fastlogN(uint64_t sz, uint64_t N)
-{
- int l = 0;
- if (sz == 0)
- return 0;
- for (; sz; sz /= N)
- l++;
- return l - 1;
-}
-
-static void t_reftable_stack_auto_compaction(void)
-{
- struct reftable_write_options opts = {
- .disable_auto_compact = 1,
- };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- int err;
- size_t i, N = 100;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (i = 0; i < N; i++) {
- char name[100];
- struct reftable_ref_record ref = {
- .refname = name,
- .update_index = reftable_stack_next_update_index(st),
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- snprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
-
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
-
- err = reftable_stack_auto_compact(st);
- check(!err);
- check(i < 2 || st->merged->tables_len < 2 * fastlogN(i, 2));
- }
-
- check_int(reftable_stack_compaction_stats(st)->entries_written, <,
- (uint64_t)(N * fastlogN(N, 2)));
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_auto_compaction_factor(void)
-{
- struct reftable_write_options opts = {
- .auto_compaction_factor = 5,
- };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- int err;
- size_t N = 100;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (size_t i = 0; i < N; i++) {
- char name[20];
- struct reftable_ref_record ref = {
- .refname = name,
- .update_index = reftable_stack_next_update_index(st),
- .value_type = REFTABLE_REF_VAL1,
- };
- xsnprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
-
- err = reftable_stack_add(st, &write_test_ref, &ref);
- check(!err);
-
- check(i < 5 || st->merged->tables_len < 5 * fastlogN(i, 5));
- }
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_auto_compaction_with_locked_tables(void)
-{
- struct reftable_write_options opts = {
- .disable_auto_compact = 1,
- };
- struct reftable_stack *st = NULL;
- struct reftable_buf buf = REFTABLE_BUF_INIT;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- write_n_ref_tables(st, 5);
- check_int(st->merged->tables_len, ==, 5);
-
- /*
- * Given that all tables we have written should be roughly the same
- * size, we expect that auto-compaction will want to compact all of the
- * tables. Locking any of the tables will keep it from doing so.
- */
- check(!reftable_buf_addstr(&buf, dir));
- check(!reftable_buf_addstr(&buf, "/"));
- check(!reftable_buf_addstr(&buf, st->tables[2]->name));
- check(!reftable_buf_addstr(&buf, ".lock"));
- write_file_buf(buf.buf, "", 0);
-
- /*
- * When parts of the stack are locked, then auto-compaction does a best
- * effort compaction of those tables which aren't locked. So while this
- * would in theory compact all tables, due to the preexisting lock we
- * only compact the newest two tables.
- */
- err = reftable_stack_auto_compact(st);
- check(!err);
- check_int(st->stats.failures, ==, 0);
- check_int(st->merged->tables_len, ==, 4);
-
- reftable_stack_destroy(st);
- reftable_buf_release(&buf);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_add_performs_auto_compaction(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- char *dir = get_tmp_dir(__LINE__);
- int err;
- size_t i, n = 20;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- for (i = 0; i <= n; i++) {
- struct reftable_ref_record ref = {
- .update_index = reftable_stack_next_update_index(st),
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- char buf[128];
-
- /*
- * Disable auto-compaction for all but the last runs. Like this
- * we can ensure that we indeed honor this setting and have
- * better control over when exactly auto compaction runs.
- */
- st->opts.disable_auto_compact = i != n;
-
- snprintf(buf, sizeof(buf), "branch-%04"PRIuMAX, (uintmax_t)i);
- ref.refname = buf;
-
- err = reftable_stack_add(st, write_test_ref, &ref);
- check(!err);
-
- /*
- * The stack length should grow continuously for all runs where
- * auto compaction is disabled. When enabled, we should merge
- * all tables in the stack.
- */
- if (i != n)
- check_int(st->merged->tables_len, ==, i + 1);
- else
- check_int(st->merged->tables_len, ==, 1);
- }
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_compaction_with_locked_tables(void)
-{
- struct reftable_write_options opts = {
- .disable_auto_compact = 1,
- };
- struct reftable_stack *st = NULL;
- struct reftable_buf buf = REFTABLE_BUF_INIT;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- write_n_ref_tables(st, 3);
- check_int(st->merged->tables_len, ==, 3);
-
- /* Lock one of the tables that we're about to compact. */
- check(!reftable_buf_addstr(&buf, dir));
- check(!reftable_buf_addstr(&buf, "/"));
- check(!reftable_buf_addstr(&buf, st->tables[1]->name));
- check(!reftable_buf_addstr(&buf, ".lock"));
- write_file_buf(buf.buf, "", 0);
-
- /*
- * Compaction is expected to fail given that we were not able to
- * compact all tables.
- */
- err = reftable_stack_compact_all(st, NULL);
- check_int(err, ==, REFTABLE_LOCK_ERROR);
- check_int(st->stats.failures, ==, 1);
- check_int(st->merged->tables_len, ==, 3);
-
- reftable_stack_destroy(st);
- reftable_buf_release(&buf);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_compaction_concurrent(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st1 = NULL, *st2 = NULL;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- err = reftable_new_stack(&st1, dir, &opts);
- check(!err);
- write_n_ref_tables(st1, 3);
-
- err = reftable_new_stack(&st2, dir, &opts);
- check(!err);
-
- err = reftable_stack_compact_all(st1, NULL);
- check(!err);
-
- reftable_stack_destroy(st1);
- reftable_stack_destroy(st2);
-
- check_int(count_dir_entries(dir), ==, 2);
- clear_dir(dir);
-}
-
-static void unclean_stack_close(struct reftable_stack *st)
-{
- /* break abstraction boundary to simulate unclean shutdown. */
- for (size_t i = 0; i < st->tables_len; i++)
- reftable_table_decref(st->tables[i]);
- st->tables_len = 0;
- REFTABLE_FREE_AND_NULL(st->tables);
-}
-
-static void t_reftable_stack_compaction_concurrent_clean(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st1 = NULL, *st2 = NULL, *st3 = NULL;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- err = reftable_new_stack(&st1, dir, &opts);
- check(!err);
- write_n_ref_tables(st1, 3);
-
- err = reftable_new_stack(&st2, dir, &opts);
- check(!err);
-
- err = reftable_stack_compact_all(st1, NULL);
- check(!err);
-
- unclean_stack_close(st1);
- unclean_stack_close(st2);
-
- err = reftable_new_stack(&st3, dir, &opts);
- check(!err);
-
- err = reftable_stack_clean(st3);
- check(!err);
- check_int(count_dir_entries(dir), ==, 2);
-
- reftable_stack_destroy(st1);
- reftable_stack_destroy(st2);
- reftable_stack_destroy(st3);
-
- clear_dir(dir);
-}
-
-static void t_reftable_stack_read_across_reload(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st1 = NULL, *st2 = NULL;
- struct reftable_ref_record rec = { 0 };
- struct reftable_iterator it = { 0 };
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- /* Create a first stack and set up an iterator for it. */
- err = reftable_new_stack(&st1, dir, &opts);
- check(!err);
- write_n_ref_tables(st1, 2);
- check_int(st1->merged->tables_len, ==, 2);
- reftable_stack_init_ref_iterator(st1, &it);
- err = reftable_iterator_seek_ref(&it, "");
- check(!err);
-
- /* Set up a second stack for the same directory and compact it. */
- err = reftable_new_stack(&st2, dir, &opts);
- check(!err);
- check_int(st2->merged->tables_len, ==, 2);
- err = reftable_stack_compact_all(st2, NULL);
- check(!err);
- check_int(st2->merged->tables_len, ==, 1);
-
- /*
- * Verify that we can continue to use the old iterator even after we
- * have reloaded its stack.
- */
- err = reftable_stack_reload(st1);
- check(!err);
- check_int(st1->merged->tables_len, ==, 1);
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- check_str(rec.refname, "refs/heads/branch-0000");
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- check_str(rec.refname, "refs/heads/branch-0001");
- err = reftable_iterator_next_ref(&it, &rec);
- check_int(err, >, 0);
-
- reftable_ref_record_release(&rec);
- reftable_iterator_destroy(&it);
- reftable_stack_destroy(st1);
- reftable_stack_destroy(st2);
- clear_dir(dir);
-}
-
-static void t_reftable_stack_reload_with_missing_table(void)
-{
- struct reftable_write_options opts = { 0 };
- struct reftable_stack *st = NULL;
- struct reftable_ref_record rec = { 0 };
- struct reftable_iterator it = { 0 };
- struct reftable_buf table_path = REFTABLE_BUF_INIT, content = REFTABLE_BUF_INIT;
- char *dir = get_tmp_dir(__LINE__);
- int err;
-
- /* Create a first stack and set up an iterator for it. */
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
- write_n_ref_tables(st, 2);
- check_int(st->merged->tables_len, ==, 2);
- reftable_stack_init_ref_iterator(st, &it);
- err = reftable_iterator_seek_ref(&it, "");
- check(!err);
-
- /*
- * Update the tables.list file with some garbage data, while reusing
- * our old tables. This should trigger a partial reload of the stack,
- * where we try to reuse our old tables.
- */
- check(!reftable_buf_addstr(&content, st->tables[0]->name));
- check(!reftable_buf_addstr(&content, "\n"));
- check(!reftable_buf_addstr(&content, st->tables[1]->name));
- check(!reftable_buf_addstr(&content, "\n"));
- check(!reftable_buf_addstr(&content, "garbage\n"));
- check(!reftable_buf_addstr(&table_path, st->list_file));
- check(!reftable_buf_addstr(&table_path, ".lock"));
- write_file_buf(table_path.buf, content.buf, content.len);
- err = rename(table_path.buf, st->list_file);
- check(!err);
-
- err = reftable_stack_reload(st);
- check_int(err, ==, -4);
- check_int(st->merged->tables_len, ==, 2);
-
- /*
- * Even though the reload has failed, we should be able to continue
- * using the iterator.
- */
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- check_str(rec.refname, "refs/heads/branch-0000");
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- check_str(rec.refname, "refs/heads/branch-0001");
- err = reftable_iterator_next_ref(&it, &rec);
- check_int(err, >, 0);
-
- reftable_ref_record_release(&rec);
- reftable_iterator_destroy(&it);
- reftable_stack_destroy(st);
- reftable_buf_release(&table_path);
- reftable_buf_release(&content);
- clear_dir(dir);
-}
-
-static int write_limits_after_ref(struct reftable_writer *wr, void *arg)
-{
- struct reftable_ref_record *ref = arg;
- check(!reftable_writer_set_limits(wr, ref->update_index, ref->update_index));
- check(!reftable_writer_add_ref(wr, ref));
- return reftable_writer_set_limits(wr, ref->update_index, ref->update_index);
-}
-
-static void t_reftable_invalid_limit_updates(void)
-{
- struct reftable_ref_record ref = {
- .refname = (char *) "HEAD",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = (char *) "master",
- };
- struct reftable_write_options opts = {
- .default_permissions = 0660,
- };
- struct reftable_addition *add = NULL;
- char *dir = get_tmp_dir(__LINE__);
- struct reftable_stack *st = NULL;
- int err;
-
- err = reftable_new_stack(&st, dir, &opts);
- check(!err);
-
- reftable_addition_destroy(add);
-
- err = reftable_stack_new_addition(&add, st, 0);
- check(!err);
-
- /*
- * write_limits_after_ref also updates the update indexes after adding
- * the record. This should cause an err to be returned, since the limits
- * must be set at the start.
- */
- err = reftable_addition_add(add, write_limits_after_ref, &ref);
- check_int(err, ==, REFTABLE_API_ERROR);
-
- reftable_addition_destroy(add);
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_empty_add(), "empty addition to stack");
- TEST(t_read_file(), "read_lines works");
- TEST(t_reflog_expire(), "expire reflog entries");
- TEST(t_reftable_invalid_limit_updates(), "prevent limit updates after adding records");
- TEST(t_reftable_stack_add(), "add multiple refs and logs to stack");
- TEST(t_reftable_stack_add_one(), "add a single ref record to stack");
- TEST(t_reftable_stack_add_performs_auto_compaction(), "addition to stack triggers auto-compaction");
- TEST(t_reftable_stack_auto_compaction(), "stack must form geometric sequence after compaction");
- TEST(t_reftable_stack_auto_compaction_factor(), "auto-compaction with non-default geometric factor");
- TEST(t_reftable_stack_auto_compaction_fails_gracefully(), "failure on auto-compaction");
- TEST(t_reftable_stack_auto_compaction_with_locked_tables(), "auto compaction with locked tables");
- TEST(t_reftable_stack_compaction_concurrent(), "compaction with concurrent stack");
- TEST(t_reftable_stack_compaction_concurrent_clean(), "compaction with unclean stack shutdown");
- TEST(t_reftable_stack_compaction_with_locked_tables(), "compaction with locked tables");
- TEST(t_reftable_stack_hash_id(), "read stack with wrong hash ID");
- TEST(t_reftable_stack_iterator(), "log and ref iterator for reftable stack");
- TEST(t_reftable_stack_lock_failure(), "stack addition with lockfile failure");
- TEST(t_reftable_stack_log_normalize(), "log messages should be normalized");
- TEST(t_reftable_stack_read_across_reload(), "stack iterators work across reloads");
- TEST(t_reftable_stack_reload_with_missing_table(), "stack iteration with garbage tables");
- TEST(t_reftable_stack_tombstone(), "'tombstone' refs in stack");
- TEST(t_reftable_stack_transaction_api(), "update transaction to stack");
- TEST(t_reftable_stack_transaction_with_reload(), "transaction with reload");
- TEST(t_reftable_stack_transaction_api_performs_auto_compaction(), "update transaction triggers auto-compaction");
- TEST(t_reftable_stack_update_index_check(), "update transactions with equal update indices");
- TEST(t_reftable_stack_uptodate(), "stack must be reloaded before ref update");
- TEST(t_suggest_compaction_segment(), "suggest_compaction_segment with basic input");
- TEST(t_suggest_compaction_segment_nothing(), "suggest_compaction_segment with pre-compacted input");
-
- return test_done();
-}
diff --git a/t/unit-tests/u-prio-queue.c b/t/unit-tests/u-prio-queue.c
index 145e689..63e5811 100644
--- a/t/unit-tests/u-prio-queue.c
+++ b/t/unit-tests/u-prio-queue.c
@@ -13,6 +13,7 @@ static int intcmp(const void *va, const void *vb, void *data UNUSED)
#define STACK -3
#define GET -4
#define REVERSE -5
+#define REPLACE -6
static int show(int *v)
{
@@ -51,6 +52,15 @@ static void test_prio_queue(int *input, size_t input_size,
case REVERSE:
prio_queue_reverse(&pq);
break;
+ case REPLACE:
+ peek = prio_queue_peek(&pq);
+ cl_assert(i + 1 < input_size);
+ cl_assert(input[i + 1] >= 0);
+ cl_assert(j < result_size);
+ cl_assert_equal_i(result[j], show(peek));
+ j++;
+ prio_queue_replace(&pq, &input[++i]);
+ break;
default:
prio_queue_put(&pq, &input[i]);
break;
@@ -81,6 +91,13 @@ void test_prio_queue__empty(void)
((int []){ 1, 2, MISSING, 1, 2, MISSING }));
}
+void test_prio_queue__replace(void)
+{
+ TEST_INPUT(((int []){ REPLACE, 6, 2, 4, REPLACE, 5, 7, GET,
+ REPLACE, 1, DUMP }),
+ ((int []){ MISSING, 2, 4, 5, 1, 6, 7 }));
+}
+
void test_prio_queue__stack(void)
{
TEST_INPUT(((int []){ STACK, 8, 1, 5, 4, 6, 2, 3, DUMP }),
@@ -92,3 +109,9 @@ void test_prio_queue__reverse_stack(void)
TEST_INPUT(((int []){ STACK, 1, 2, 3, 4, 5, 6, REVERSE, DUMP }),
((int []){ 1, 2, 3, 4, 5, 6 }));
}
+
+void test_prio_queue__replace_stack(void)
+{
+ TEST_INPUT(((int []){ STACK, 8, 1, 5, REPLACE, 4, 6, 2, 3, DUMP }),
+ ((int []){ 5, 3, 2, 6, 4, 1, 8 }));
+}
diff --git a/t/unit-tests/u-reftable-basics.c b/t/unit-tests/u-reftable-basics.c
new file mode 100644
index 0000000..a047108
--- /dev/null
+++ b/t/unit-tests/u-reftable-basics.c
@@ -0,0 +1,227 @@
+/*
+Copyright 2020 Google LLC
+
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file or at
+https://developers.google.com/open-source/licenses/bsd
+*/
+
+#include "unit-test.h"
+#include "lib-reftable.h"
+#include "reftable/basics.h"
+
+struct integer_needle_lesseq_args {
+ int needle;
+ int *haystack;
+};
+
+static int integer_needle_lesseq(size_t i, void *_args)
+{
+ struct integer_needle_lesseq_args *args = _args;
+ return args->needle <= args->haystack[i];
+}
+
+static void *realloc_stub(void *p UNUSED, size_t size UNUSED)
+{
+ return NULL;
+}
+
+void test_reftable_basics__binsearch(void)
+{
+ int haystack[] = { 2, 4, 6, 8, 10 };
+ struct {
+ int needle;
+ size_t expected_idx;
+ } testcases[] = {
+ {-9000, 0},
+ {-1, 0},
+ {0, 0},
+ {2, 0},
+ {3, 1},
+ {4, 1},
+ {7, 3},
+ {9, 4},
+ {10, 4},
+ {11, 5},
+ {9000, 5},
+ };
+
+ for (size_t i = 0; i < ARRAY_SIZE(testcases); i++) {
+ struct integer_needle_lesseq_args args = {
+ .haystack = haystack,
+ .needle = testcases[i].needle,
+ };
+ size_t idx;
+
+ idx = binsearch(ARRAY_SIZE(haystack),
+ &integer_needle_lesseq, &args);
+ cl_assert_equal_i(idx, testcases[i].expected_idx);
+ }
+}
+
+void test_reftable_basics__names_length(void)
+{
+ const char *a[] = { "a", "b", NULL };
+ cl_assert_equal_i(names_length(a), 2);
+}
+
+void test_reftable_basics__names_equal(void)
+{
+ const char *a[] = { "a", "b", "c", NULL };
+ const char *b[] = { "a", "b", "d", NULL };
+ const char *c[] = { "a", "b", NULL };
+
+ cl_assert(names_equal(a, a));
+ cl_assert(!names_equal(a, b));
+ cl_assert(!names_equal(a, c));
+}
+
+void test_reftable_basics__parse_names(void)
+{
+ char in1[] = "line\n";
+ char in2[] = "a\nb\nc";
+ char **out = parse_names(in1, strlen(in1));
+ cl_assert(out != NULL);
+ cl_assert_equal_s(out[0], "line");
+ cl_assert(!out[1]);
+ free_names(out);
+
+ out = parse_names(in2, strlen(in2));
+ cl_assert(out != NULL);
+ cl_assert_equal_s(out[0], "a");
+ cl_assert_equal_s(out[1], "b");
+ cl_assert_equal_s(out[2], "c");
+ cl_assert(!out[3]);
+ free_names(out);
+}
+
+void test_reftable_basics__parse_names_drop_empty_string(void)
+{
+ char in[] = "a\n\nb\n";
+ char **out = parse_names(in, strlen(in));
+ cl_assert(out != NULL);
+ cl_assert_equal_s(out[0], "a");
+ /* simply '\n' should be dropped as empty string */
+ cl_assert_equal_s(out[1], "b");
+ cl_assert(out[2] == NULL);
+ free_names(out);
+}
+
+void test_reftable_basics__common_prefix_size(void)
+{
+ struct reftable_buf a = REFTABLE_BUF_INIT;
+ struct reftable_buf b = REFTABLE_BUF_INIT;
+ struct {
+ const char *a, *b;
+ int want;
+ } cases[] = {
+ {"abcdef", "abc", 3},
+ { "abc", "ab", 2 },
+ { "", "abc", 0 },
+ { "abc", "abd", 2 },
+ { "abc", "pqr", 0 },
+ };
+
+ for (size_t i = 0; i < ARRAY_SIZE(cases); i++) {
+ cl_assert_equal_i(reftable_buf_addstr(&a, cases[i].a), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&b, cases[i].b), 0);
+ cl_assert_equal_i(common_prefix_size(&a, &b), cases[i].want);
+ reftable_buf_reset(&a);
+ reftable_buf_reset(&b);
+ }
+ reftable_buf_release(&a);
+ reftable_buf_release(&b);
+}
+
+void test_reftable_basics__put_get_be64(void)
+{
+ uint64_t in = 0x1122334455667788;
+ uint8_t dest[8];
+ uint64_t out;
+ reftable_put_be64(dest, in);
+ out = reftable_get_be64(dest);
+ cl_assert(in == out);
+}
+
+void test_reftable_basics__put_get_be32(void)
+{
+ uint32_t in = 0x11223344;
+ uint8_t dest[4];
+ uint32_t out;
+ reftable_put_be32(dest, in);
+ out = reftable_get_be32(dest);
+ cl_assert_equal_i(in, out);
+}
+
+void test_reftable_basics__put_get_be24(void)
+{
+ uint32_t in = 0x112233;
+ uint8_t dest[3];
+ uint32_t out;
+ reftable_put_be24(dest, in);
+ out = reftable_get_be24(dest);
+ cl_assert_equal_i(in, out);
+}
+
+void test_reftable_basics__put_get_be16(void)
+{
+ uint32_t in = 0xfef1;
+ uint8_t dest[3];
+ uint32_t out;
+ reftable_put_be16(dest, in);
+ out = reftable_get_be16(dest);
+ cl_assert_equal_i(in, out);
+}
+
+void test_reftable_basics__alloc_grow(void)
+{
+ int *arr = NULL, *old_arr;
+ size_t alloc = 0, old_alloc;
+
+ cl_assert_equal_i(REFTABLE_ALLOC_GROW(arr, 1, alloc), 0);
+ cl_assert(arr != NULL);
+ cl_assert(alloc >= 1);
+ arr[0] = 42;
+
+ old_alloc = alloc;
+ old_arr = arr;
+ reftable_set_alloc(NULL, realloc_stub, NULL);
+ cl_assert(REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
+ cl_assert(arr == old_arr);
+ cl_assert_equal_i(alloc, old_alloc);
+
+ old_alloc = alloc;
+ reftable_set_alloc(NULL, NULL, NULL);
+ cl_assert_equal_i(REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc), 0);
+ cl_assert(arr != NULL);
+ cl_assert(alloc > old_alloc);
+ arr[alloc - 1] = 42;
+
+ reftable_free(arr);
+}
+
+void test_reftable_basics__alloc_grow_or_null(void)
+{
+ int *arr = NULL;
+ size_t alloc = 0, old_alloc;
+
+ REFTABLE_ALLOC_GROW_OR_NULL(arr, 1, alloc);
+ cl_assert(arr != NULL);
+ cl_assert(alloc >= 1);
+ arr[0] = 42;
+
+ old_alloc = alloc;
+ REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
+ cl_assert(arr != NULL);
+ cl_assert(alloc > old_alloc);
+ arr[alloc - 1] = 42;
+
+ old_alloc = alloc;
+ reftable_set_alloc(NULL, realloc_stub, NULL);
+ REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
+ cl_assert(arr == NULL);
+ cl_assert_equal_i(alloc, 0);
+ reftable_set_alloc(NULL, NULL, NULL);
+
+ reftable_free(arr);
+}
diff --git a/t/unit-tests/t-reftable-block.c b/t/unit-tests/u-reftable-block.c
similarity index 74%
rename from t/unit-tests/t-reftable-block.c
rename to t/unit-tests/u-reftable-block.c
index 52f1dae..f4bded7 100644
--- a/t/unit-tests/t-reftable-block.c
+++ b/t/unit-tests/u-reftable-block.c
@@ -6,14 +6,15 @@ license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/
-#include "test-lib.h"
+#include "unit-test.h"
+#include "lib-reftable.h"
#include "reftable/block.h"
#include "reftable/blocksource.h"
#include "reftable/constants.h"
#include "reftable/reftable-error.h"
#include "strbuf.h"
-static void t_ref_block_read_write(void)
+void test_reftable_block__read_write(void)
{
const int header_off = 21; /* random */
struct reftable_record recs[30];
@@ -34,17 +35,18 @@ static void t_ref_block_read_write(void)
struct reftable_buf block_data = REFTABLE_BUF_INIT;
REFTABLE_CALLOC_ARRAY(block_data.buf, block_size);
- check(block_data.buf != NULL);
+ cl_assert(block_data.buf != NULL);
block_data.len = block_size;
- ret = block_writer_init(&bw, REFTABLE_BLOCK_TYPE_REF, (uint8_t *) block_data.buf, block_size,
+ ret = block_writer_init(&bw, REFTABLE_BLOCK_TYPE_REF,
+ (uint8_t *) block_data.buf, block_size,
header_off, hash_size(REFTABLE_HASH_SHA1));
- check(!ret);
+ cl_assert(!ret);
rec.u.ref.refname = (char *) "";
rec.u.ref.value_type = REFTABLE_REF_DELETION;
ret = block_writer_add(&bw, &rec);
- check_int(ret, ==, REFTABLE_API_ERROR);
+ cl_assert_equal_i(ret, REFTABLE_API_ERROR);
for (i = 0; i < N; i++) {
rec.u.ref.refname = xstrfmt("branch%02"PRIuMAX, (uintmax_t)i);
@@ -55,11 +57,11 @@ static void t_ref_block_read_write(void)
ret = block_writer_add(&bw, &rec);
rec.u.ref.refname = NULL;
rec.u.ref.value_type = REFTABLE_REF_DELETION;
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
ret = block_writer_finish(&bw);
- check_int(ret, >, 0);
+ cl_assert(ret > 0);
block_writer_release(&bw);
@@ -71,32 +73,32 @@ static void t_ref_block_read_write(void)
for (i = 0; ; i++) {
ret = block_iter_next(&it, &rec);
- check_int(ret, >=, 0);
+ cl_assert(ret >= 0);
if (ret > 0) {
- check_int(i, ==, N);
+ cl_assert_equal_i(i, N);
break;
}
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
for (i = 0; i < N; i++) {
reftable_record_key(&recs[i], &want);
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
want.len--;
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
- check(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(ret, 0);
+ cl_assert_equal_i(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
reftable_block_release(&block);
@@ -108,7 +110,7 @@ static void t_ref_block_read_write(void)
reftable_record_release(&recs[i]);
}
-static void t_log_block_read_write(void)
+void test_reftable_block__log_read_write(void)
{
const int header_off = 21;
struct reftable_record recs[30];
@@ -129,12 +131,12 @@ static void t_log_block_read_write(void)
struct reftable_buf block_data = REFTABLE_BUF_INIT;
REFTABLE_CALLOC_ARRAY(block_data.buf, block_size);
- check(block_data.buf != NULL);
+ cl_assert(block_data.buf != NULL);
block_data.len = block_size;
ret = block_writer_init(&bw, REFTABLE_BLOCK_TYPE_LOG, (uint8_t *) block_data.buf, block_size,
header_off, hash_size(REFTABLE_HASH_SHA1));
- check(!ret);
+ cl_assert(!ret);
for (i = 0; i < N; i++) {
rec.u.log.refname = xstrfmt("branch%02"PRIuMAX , (uintmax_t)i);
@@ -145,11 +147,11 @@ static void t_log_block_read_write(void)
ret = block_writer_add(&bw, &rec);
rec.u.log.refname = NULL;
rec.u.log.value_type = REFTABLE_LOG_DELETION;
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
ret = block_writer_finish(&bw);
- check_int(ret, >, 0);
+ cl_assert(ret > 0);
block_writer_release(&bw);
@@ -161,33 +163,33 @@ static void t_log_block_read_write(void)
for (i = 0; ; i++) {
ret = block_iter_next(&it, &rec);
- check_int(ret, >=, 0);
+ cl_assert(ret >= 0);
if (ret > 0) {
- check_int(i, ==, N);
+ cl_assert_equal_i(i, N);
break;
}
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
for (i = 0; i < N; i++) {
reftable_buf_reset(&want);
- check(!reftable_buf_addstr(&want, recs[i].u.log.refname));
+ cl_assert(reftable_buf_addstr(&want, recs[i].u.log.refname) == 0);
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
want.len--;
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
- check(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(ret, 0);
+ cl_assert_equal_i(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
reftable_block_release(&block);
@@ -199,7 +201,7 @@ static void t_log_block_read_write(void)
reftable_record_release(&recs[i]);
}
-static void t_obj_block_read_write(void)
+void test_reftable_block__obj_read_write(void)
{
const int header_off = 21;
struct reftable_record recs[30];
@@ -220,12 +222,12 @@ static void t_obj_block_read_write(void)
struct reftable_buf block_data = REFTABLE_BUF_INIT;
REFTABLE_CALLOC_ARRAY(block_data.buf, block_size);
- check(block_data.buf != NULL);
+ cl_assert(block_data.buf != NULL);
block_data.len = block_size;
ret = block_writer_init(&bw, REFTABLE_BLOCK_TYPE_OBJ, (uint8_t *) block_data.buf, block_size,
header_off, hash_size(REFTABLE_HASH_SHA1));
- check(!ret);
+ cl_assert(!ret);
for (i = 0; i < N; i++) {
uint8_t bytes[] = { i, i + 1, i + 2, i + 3, i + 5 }, *allocated;
@@ -238,11 +240,11 @@ static void t_obj_block_read_write(void)
ret = block_writer_add(&bw, &rec);
rec.u.obj.hash_prefix = NULL;
rec.u.obj.hash_prefix_len = 0;
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
ret = block_writer_finish(&bw);
- check_int(ret, >, 0);
+ cl_assert(ret > 0);
block_writer_release(&bw);
@@ -254,24 +256,24 @@ static void t_obj_block_read_write(void)
for (i = 0; ; i++) {
ret = block_iter_next(&it, &rec);
- check_int(ret, >=, 0);
+ cl_assert(ret >= 0);
if (ret > 0) {
- check_int(i, ==, N);
+ cl_assert_equal_i(i, N);
break;
}
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
for (i = 0; i < N; i++) {
reftable_record_key(&recs[i], &want);
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
reftable_block_release(&block);
@@ -283,7 +285,7 @@ static void t_obj_block_read_write(void)
reftable_record_release(&recs[i]);
}
-static void t_index_block_read_write(void)
+void test_reftable_block__ref_read_write(void)
{
const int header_off = 21;
struct reftable_record recs[30];
@@ -305,12 +307,12 @@ static void t_index_block_read_write(void)
struct reftable_buf block_data = REFTABLE_BUF_INIT;
REFTABLE_CALLOC_ARRAY(block_data.buf, block_size);
- check(block_data.buf != NULL);
+ cl_assert(block_data.buf != NULL);
block_data.len = block_size;
ret = block_writer_init(&bw, REFTABLE_BLOCK_TYPE_INDEX, (uint8_t *) block_data.buf, block_size,
header_off, hash_size(REFTABLE_HASH_SHA1));
- check(!ret);
+ cl_assert(!ret);
for (i = 0; i < N; i++) {
char buf[128];
@@ -319,15 +321,15 @@ static void t_index_block_read_write(void)
reftable_buf_init(&recs[i].u.idx.last_key);
recs[i].type = REFTABLE_BLOCK_TYPE_INDEX;
- check(!reftable_buf_addstr(&recs[i].u.idx.last_key, buf));
+ cl_assert(!reftable_buf_addstr(&recs[i].u.idx.last_key, buf));
recs[i].u.idx.offset = i;
ret = block_writer_add(&bw, &recs[i]);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
}
ret = block_writer_finish(&bw);
- check_int(ret, >, 0);
+ cl_assert(ret > 0);
block_writer_release(&bw);
@@ -339,32 +341,32 @@ static void t_index_block_read_write(void)
for (i = 0; ; i++) {
ret = block_iter_next(&it, &rec);
- check_int(ret, >=, 0);
+ cl_assert(ret >= 0);
if (ret > 0) {
- check_int(i, ==, N);
+ cl_assert_equal_i(i, N);
break;
}
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
for (i = 0; i < N; i++) {
reftable_record_key(&recs[i], &want);
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
- check(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(reftable_record_equal(&recs[i], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
want.len--;
ret = block_iter_seek_key(&it, &want);
- check_int(ret, ==, 0);
+ cl_assert_equal_i(ret, 0);
ret = block_iter_next(&it, &rec);
- check_int(ret, ==, 0);
- check(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(ret, 0);
+ cl_assert_equal_i(reftable_record_equal(&recs[10 * (i / 10)], &rec, REFTABLE_HASH_SIZE_SHA1), 1);
}
reftable_block_release(&block);
@@ -376,7 +378,7 @@ static void t_index_block_read_write(void)
reftable_record_release(&recs[i]);
}
-static void t_block_iterator(void)
+void test_reftable_block__iterator(void)
{
struct reftable_block_source source = { 0 };
struct block_writer writer = {
@@ -391,11 +393,12 @@ static void t_block_iterator(void)
data.len = 1024;
REFTABLE_CALLOC_ARRAY(data.buf, data.len);
- check(data.buf != NULL);
+ cl_assert(data.buf != NULL);
- err = block_writer_init(&writer, REFTABLE_BLOCK_TYPE_REF, (uint8_t *) data.buf, data.len,
+ err = block_writer_init(&writer, REFTABLE_BLOCK_TYPE_REF,
+ (uint8_t *) data.buf, data.len,
0, hash_size(REFTABLE_HASH_SHA1));
- check(!err);
+ cl_assert(!err);
for (size_t i = 0; i < ARRAY_SIZE(expected_refs); i++) {
expected_refs[i] = (struct reftable_record) {
@@ -408,42 +411,42 @@ static void t_block_iterator(void)
memset(expected_refs[i].u.ref.value.val1, i, REFTABLE_HASH_SIZE_SHA1);
err = block_writer_add(&writer, &expected_refs[i]);
- check_int(err, ==, 0);
+ cl_assert_equal_i(err, 0);
}
err = block_writer_finish(&writer);
- check_int(err, >, 0);
+ cl_assert(err > 0);
block_source_from_buf(&source, &data);
reftable_block_init(&block, &source, 0, 0, data.len,
REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_REF);
err = reftable_block_init_iterator(&block, &it);
- check_int(err, ==, 0);
+ cl_assert_equal_i(err, 0);
for (size_t i = 0; ; i++) {
err = reftable_iterator_next_ref(&it, &ref);
if (err > 0) {
- check_int(i, ==, ARRAY_SIZE(expected_refs));
+ cl_assert_equal_i(i, ARRAY_SIZE(expected_refs));
break;
}
- check_int(err, ==, 0);
+ cl_assert_equal_i(err, 0);
- check(reftable_ref_record_equal(&ref, &expected_refs[i].u.ref,
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_ref_record_equal(&ref,
+ &expected_refs[i].u.ref, REFTABLE_HASH_SIZE_SHA1));
}
err = reftable_iterator_seek_ref(&it, "refs/heads/does-not-exist");
- check_int(err, ==, 0);
+ cl_assert_equal_i(err, 0);
err = reftable_iterator_next_ref(&it, &ref);
- check_int(err, ==, 1);
+ cl_assert_equal_i(err, 1);
err = reftable_iterator_seek_ref(&it, "refs/heads/branch-13");
- check_int(err, ==, 0);
+ cl_assert_equal_i(err, 0);
err = reftable_iterator_next_ref(&it, &ref);
- check_int(err, ==, 0);
- check(reftable_ref_record_equal(&ref, &expected_refs[13].u.ref,
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert_equal_i(err, 0);
+ cl_assert(reftable_ref_record_equal(&ref,
+ &expected_refs[13].u.ref,REFTABLE_HASH_SIZE_SHA1));
for (size_t i = 0; i < ARRAY_SIZE(expected_refs); i++)
reftable_free(expected_refs[i].u.ref.refname);
@@ -453,14 +456,3 @@ static void t_block_iterator(void)
block_writer_release(&writer);
reftable_buf_release(&data);
}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_index_block_read_write(), "read-write operations on index blocks work");
- TEST(t_log_block_read_write(), "read-write operations on log blocks work");
- TEST(t_obj_block_read_write(), "read-write operations on obj blocks work");
- TEST(t_ref_block_read_write(), "read-write operations on ref blocks work");
- TEST(t_block_iterator(), "block iterator works");
-
- return test_done();
-}
diff --git a/t/unit-tests/t-reftable-merged.c b/t/unit-tests/u-reftable-merged.c
similarity index 77%
rename from t/unit-tests/t-reftable-merged.c
rename to t/unit-tests/u-reftable-merged.c
index 18c3251..54cb7fc 100644
--- a/t/unit-tests/t-reftable-merged.c
+++ b/t/unit-tests/u-reftable-merged.c
@@ -6,7 +6,7 @@ license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/
-#include "test-lib.h"
+#include "unit-test.h"
#include "lib-reftable.h"
#include "reftable/blocksource.h"
#include "reftable/constants.h"
@@ -29,21 +29,21 @@ merged_table_from_records(struct reftable_ref_record **refs,
int err;
REFTABLE_CALLOC_ARRAY(*tables, n);
- check(*tables != NULL);
+ cl_assert(*tables != NULL);
REFTABLE_CALLOC_ARRAY(*source, n);
- check(*source != NULL);
+ cl_assert(*source != NULL);
for (size_t i = 0; i < n; i++) {
- t_reftable_write_to_buf(&buf[i], refs[i], sizes[i], NULL, 0, &opts);
+ cl_reftable_write_to_buf(&buf[i], refs[i], sizes[i], NULL, 0, &opts);
block_source_from_buf(&(*source)[i], &buf[i]);
err = reftable_table_new(&(*tables)[i], &(*source)[i],
"name");
- check(!err);
+ cl_assert(!err);
}
err = reftable_merged_table_new(&mt, *tables, n, REFTABLE_HASH_SHA1);
- check(!err);
+ cl_assert(!err);
return mt;
}
@@ -54,7 +54,7 @@ static void tables_destroy(struct reftable_table **tables, const size_t n)
reftable_free(tables);
}
-static void t_merged_single_record(void)
+void test_reftable_merged__single_record(void)
{
struct reftable_ref_record r1[] = { {
.refname = (char *) "b",
@@ -85,13 +85,14 @@ static void t_merged_single_record(void)
int err;
err = merged_table_init_iter(mt, &it, REFTABLE_BLOCK_TYPE_REF);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "a");
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_next_ref(&it, &ref);
- check(!err);
- check(reftable_ref_record_equal(&r2[0], &ref, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(!err);
+ cl_assert(reftable_ref_record_equal(&r2[0], &ref,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_ref_record_release(&ref);
reftable_iterator_destroy(&it);
tables_destroy(tables, 3);
@@ -101,7 +102,7 @@ static void t_merged_single_record(void)
reftable_free(bs);
}
-static void t_merged_refs(void)
+void test_reftable_merged__refs(void)
{
struct reftable_ref_record r1[] = {
{
@@ -165,12 +166,12 @@ static void t_merged_refs(void)
size_t i;
err = merged_table_init_iter(mt, &it, REFTABLE_BLOCK_TYPE_REF);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "a");
- check(!err);
- check_int(reftable_merged_table_hash_id(mt), ==, REFTABLE_HASH_SHA1);
- check_int(reftable_merged_table_min_update_index(mt), ==, 1);
- check_int(reftable_merged_table_max_update_index(mt), ==, 3);
+ cl_assert(err == 0);
+ cl_assert_equal_i(reftable_merged_table_hash_id(mt), REFTABLE_HASH_SHA1);
+ cl_assert_equal_i(reftable_merged_table_min_update_index(mt), 1);
+ cl_assert_equal_i(reftable_merged_table_max_update_index(mt), 3);
while (len < 100) { /* cap loops/recursion. */
struct reftable_ref_record ref = { 0 };
@@ -178,15 +179,15 @@ static void t_merged_refs(void)
if (err > 0)
break;
- check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
+ cl_assert(REFTABLE_ALLOC_GROW(out, len + 1, cap) == 0);
out[len++] = ref;
}
reftable_iterator_destroy(&it);
- check_int(ARRAY_SIZE(want), ==, len);
+ cl_assert_equal_i(ARRAY_SIZE(want), len);
for (i = 0; i < len; i++)
- check(reftable_ref_record_equal(want[i], &out[i],
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_ref_record_equal(want[i], &out[i],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
for (i = 0; i < len; i++)
reftable_ref_record_release(&out[i]);
reftable_free(out);
@@ -198,7 +199,7 @@ static void t_merged_refs(void)
reftable_free(bs);
}
-static void t_merged_seek_multiple_times(void)
+void test_reftable_merged__seek_multiple_times(void)
{
struct reftable_ref_record r1[] = {
{
@@ -248,20 +249,17 @@ static void t_merged_seek_multiple_times(void)
for (size_t i = 0; i < 5; i++) {
int err = reftable_iterator_seek_ref(&it, "c");
- check(!err);
+ cl_assert(!err);
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- err = reftable_ref_record_equal(&rec, &r1[1], REFTABLE_HASH_SIZE_SHA1);
- check(err == 1);
+ cl_assert(reftable_iterator_next_ref(&it, &rec) == 0);
+ cl_assert_equal_i(reftable_ref_record_equal(&rec, &r1[1],
+ REFTABLE_HASH_SIZE_SHA1), 1);
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- err = reftable_ref_record_equal(&rec, &r2[1], REFTABLE_HASH_SIZE_SHA1);
- check(err == 1);
+ cl_assert(reftable_iterator_next_ref(&it, &rec) == 0);
+ cl_assert_equal_i(reftable_ref_record_equal(&rec, &r2[1],
+ REFTABLE_HASH_SIZE_SHA1), 1);
- err = reftable_iterator_next_ref(&it, &rec);
- check(err > 0);
+ cl_assert(reftable_iterator_next_ref(&it, &rec) > 0);
}
for (size_t i = 0; i < ARRAY_SIZE(bufs); i++)
@@ -273,7 +271,7 @@ static void t_merged_seek_multiple_times(void)
reftable_free(sources);
}
-static void t_merged_seek_multiple_times_without_draining(void)
+void test_reftable_merged__seek_multiple_times_no_drain(void)
{
struct reftable_ref_record r1[] = {
{
@@ -317,24 +315,19 @@ static void t_merged_seek_multiple_times_without_draining(void)
struct reftable_ref_record rec = { 0 };
struct reftable_iterator it = { 0 };
struct reftable_merged_table *mt;
- int err;
mt = merged_table_from_records(refs, &sources, &tables, sizes, bufs, 2);
merged_table_init_iter(mt, &it, REFTABLE_BLOCK_TYPE_REF);
- err = reftable_iterator_seek_ref(&it, "b");
- check(!err);
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- err = reftable_ref_record_equal(&rec, &r2[0], REFTABLE_HASH_SIZE_SHA1);
- check(err == 1);
+ cl_assert(reftable_iterator_seek_ref(&it, "b") == 0);
+ cl_assert(reftable_iterator_next_ref(&it, &rec) == 0);
+ cl_assert_equal_i(reftable_ref_record_equal(&rec, &r2[0],
+ REFTABLE_HASH_SIZE_SHA1), 1);
- err = reftable_iterator_seek_ref(&it, "a");
- check(!err);
- err = reftable_iterator_next_ref(&it, &rec);
- check(!err);
- err = reftable_ref_record_equal(&rec, &r1[0], REFTABLE_HASH_SIZE_SHA1);
- check(err == 1);
+ cl_assert(reftable_iterator_seek_ref(&it, "a") == 0);
+ cl_assert(reftable_iterator_next_ref(&it, &rec) == 0);
+ cl_assert_equal_i(reftable_ref_record_equal(&rec, &r1[0],
+ REFTABLE_HASH_SIZE_SHA1), 1);
for (size_t i = 0; i < ARRAY_SIZE(bufs); i++)
reftable_buf_release(&bufs[i]);
@@ -359,25 +352,25 @@ merged_table_from_log_records(struct reftable_log_record **logs,
int err;
REFTABLE_CALLOC_ARRAY(*tables, n);
- check(*tables != NULL);
+ cl_assert(*tables != NULL);
REFTABLE_CALLOC_ARRAY(*source, n);
- check(*source != NULL);
+ cl_assert(*source != NULL);
for (size_t i = 0; i < n; i++) {
- t_reftable_write_to_buf(&buf[i], NULL, 0, logs[i], sizes[i], &opts);
+ cl_reftable_write_to_buf(&buf[i], NULL, 0, logs[i], sizes[i], &opts);
block_source_from_buf(&(*source)[i], &buf[i]);
err = reftable_table_new(&(*tables)[i], &(*source)[i],
"name");
- check(!err);
+ cl_assert(!err);
}
err = reftable_merged_table_new(&mt, *tables, n, REFTABLE_HASH_SHA1);
- check(!err);
+ cl_assert(!err);
return mt;
}
-static void t_merged_logs(void)
+void test_reftable_merged__logs(void)
{
struct reftable_log_record r1[] = {
{
@@ -439,19 +432,19 @@ static void t_merged_logs(void)
struct reftable_merged_table *mt = merged_table_from_log_records(
logs, &bs, &tables, sizes, bufs, 3);
struct reftable_iterator it = { 0 };
- int err;
struct reftable_log_record *out = NULL;
size_t len = 0;
size_t cap = 0;
size_t i;
+ int err;
err = merged_table_init_iter(mt, &it, REFTABLE_BLOCK_TYPE_LOG);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_log(&it, "a");
- check(!err);
- check_int(reftable_merged_table_hash_id(mt), ==, REFTABLE_HASH_SHA1);
- check_int(reftable_merged_table_min_update_index(mt), ==, 1);
- check_int(reftable_merged_table_max_update_index(mt), ==, 3);
+ cl_assert(!err);
+ cl_assert_equal_i(reftable_merged_table_hash_id(mt), REFTABLE_HASH_SHA1);
+ cl_assert_equal_i(reftable_merged_table_min_update_index(mt), 1);
+ cl_assert_equal_i(reftable_merged_table_max_update_index(mt), 3);
while (len < 100) { /* cap loops/recursion. */
struct reftable_log_record log = { 0 };
@@ -459,24 +452,24 @@ static void t_merged_logs(void)
if (err > 0)
break;
- check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
+ cl_assert(REFTABLE_ALLOC_GROW(out, len + 1, cap) == 0);
out[len++] = log;
}
reftable_iterator_destroy(&it);
- check_int(ARRAY_SIZE(want), ==, len);
+ cl_assert_equal_i(ARRAY_SIZE(want), len);
for (i = 0; i < len; i++)
- check(reftable_log_record_equal(want[i], &out[i],
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_log_record_equal(want[i], &out[i],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
err = merged_table_init_iter(mt, &it, REFTABLE_BLOCK_TYPE_LOG);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_log_at(&it, "a", 2);
- check(!err);
+ cl_assert(!err);
reftable_log_record_release(&out[0]);
- err = reftable_iterator_next_log(&it, &out[0]);
- check(!err);
- check(reftable_log_record_equal(&out[0], &r3[0], REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_iterator_next_log(&it, &out[0]) == 0);
+ cl_assert(reftable_log_record_equal(&out[0], &r3[0],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_iterator_destroy(&it);
for (i = 0; i < len; i++)
@@ -490,11 +483,11 @@ static void t_merged_logs(void)
reftable_free(bs);
}
-static void t_default_write_opts(void)
+void test_reftable_merged__default_write_opts(void)
{
struct reftable_write_options opts = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_ref_record rec = {
.refname = (char *) "master",
.update_index = 1,
@@ -507,40 +500,25 @@ static void t_default_write_opts(void)
reftable_writer_set_limits(w, 1, 1);
- err = reftable_writer_add_ref(w, &rec);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &rec), 0);
- err = reftable_writer_close(w);
- check(!err);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
reftable_writer_free(w);
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "filename");
- check(!err);
+ cl_assert(!err);
hash_id = reftable_table_hash_id(table);
- check_int(hash_id, ==, REFTABLE_HASH_SHA1);
+ cl_assert_equal_i(hash_id, REFTABLE_HASH_SHA1);
err = reftable_merged_table_new(&merged, &table, 1, REFTABLE_HASH_SHA256);
- check_int(err, ==, REFTABLE_FORMAT_ERROR);
+ cl_assert_equal_i(err, REFTABLE_FORMAT_ERROR);
err = reftable_merged_table_new(&merged, &table, 1, REFTABLE_HASH_SHA1);
- check(!err);
+ cl_assert(!err);
reftable_table_decref(table);
reftable_merged_table_free(merged);
reftable_buf_release(&buf);
}
-
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_default_write_opts(), "merged table with default write opts");
- TEST(t_merged_logs(), "merged table with multiple log updates for same ref");
- TEST(t_merged_refs(), "merged table with multiple updates to same ref");
- TEST(t_merged_seek_multiple_times(), "merged table can seek multiple times");
- TEST(t_merged_seek_multiple_times_without_draining(), "merged table can seek multiple times without draining");
- TEST(t_merged_single_record(), "ref occurring in only one record can be fetched");
-
- return test_done();
-}
diff --git a/t/unit-tests/t-reftable-pq.c b/t/unit-tests/u-reftable-pq.c
similarity index 65%
rename from t/unit-tests/t-reftable-pq.c
rename to t/unit-tests/u-reftable-pq.c
index fb5a4eb..f8a28f6 100644
--- a/t/unit-tests/t-reftable-pq.c
+++ b/t/unit-tests/u-reftable-pq.c
@@ -6,7 +6,8 @@ license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/
-#include "test-lib.h"
+#include "unit-test.h"
+#include "lib-reftable.h"
#include "reftable/constants.h"
#include "reftable/pq.h"
#include "strbuf.h"
@@ -15,18 +16,18 @@ static void merged_iter_pqueue_check(const struct merged_iter_pqueue *pq)
{
for (size_t i = 1; i < pq->len; i++) {
size_t parent = (i - 1) / 2;
- check(pq_less(&pq->heap[parent], &pq->heap[i]));
+ cl_assert(pq_less(&pq->heap[parent], &pq->heap[i]) != 0);
}
}
static int pq_entry_equal(struct pq_entry *a, struct pq_entry *b)
{
int cmp;
- check(!reftable_record_cmp(a->rec, b->rec, &cmp));
+ cl_assert_equal_i(reftable_record_cmp(a->rec, b->rec, &cmp), 0);
return !cmp && (a->index == b->index);
}
-static void t_pq_record(void)
+void test_reftable_pq__record(void)
{
struct merged_iter_pqueue pq = { 0 };
struct reftable_record recs[54];
@@ -34,7 +35,8 @@ static void t_pq_record(void)
char *last = NULL;
for (i = 0; i < N; i++) {
- check(!reftable_record_init(&recs[i], REFTABLE_BLOCK_TYPE_REF));
+ cl_assert(!reftable_record_init(&recs[i],
+ REFTABLE_BLOCK_TYPE_REF));
recs[i].u.ref.refname = xstrfmt("%02"PRIuMAX, (uintmax_t)i);
}
@@ -53,13 +55,13 @@ static void t_pq_record(void)
struct pq_entry top = merged_iter_pqueue_top(pq);
struct pq_entry e;
- check(!merged_iter_pqueue_remove(&pq, &e));
+ cl_assert_equal_i(merged_iter_pqueue_remove(&pq, &e), 0);
merged_iter_pqueue_check(&pq);
- check(pq_entry_equal(&top, &e));
- check(reftable_record_type(e.rec) == REFTABLE_BLOCK_TYPE_REF);
+ cl_assert(pq_entry_equal(&top, &e));
+ cl_assert(reftable_record_type(e.rec) == REFTABLE_BLOCK_TYPE_REF);
if (last)
- check_int(strcmp(last, e.rec->u.ref.refname), <, 0);
+ cl_assert(strcmp(last, e.rec->u.ref.refname) < 0);
last = e.rec->u.ref.refname;
}
@@ -68,7 +70,7 @@ static void t_pq_record(void)
merged_iter_pqueue_release(&pq);
}
-static void t_pq_index(void)
+void test_reftable_pq__index(void)
{
struct merged_iter_pqueue pq = { 0 };
struct reftable_record recs[13];
@@ -76,7 +78,8 @@ static void t_pq_index(void)
size_t N = ARRAY_SIZE(recs), i;
for (i = 0; i < N; i++) {
- check(!reftable_record_init(&recs[i], REFTABLE_BLOCK_TYPE_REF));
+ cl_assert(!reftable_record_init(&recs[i],
+ REFTABLE_BLOCK_TYPE_REF));
recs[i].u.ref.refname = (char *) "refs/heads/master";
}
@@ -96,28 +99,29 @@ static void t_pq_index(void)
struct pq_entry top = merged_iter_pqueue_top(pq);
struct pq_entry e;
- check(!merged_iter_pqueue_remove(&pq, &e));
+ cl_assert_equal_i(merged_iter_pqueue_remove(&pq, &e), 0);
merged_iter_pqueue_check(&pq);
- check(pq_entry_equal(&top, &e));
- check(reftable_record_type(e.rec) == REFTABLE_BLOCK_TYPE_REF);
- check_int(e.index, ==, i);
+ cl_assert(pq_entry_equal(&top, &e));
+ cl_assert(reftable_record_type(e.rec) == REFTABLE_BLOCK_TYPE_REF);
+ cl_assert_equal_i(e.index, i);
if (last)
- check_str(last, e.rec->u.ref.refname);
+ cl_assert_equal_s(last, e.rec->u.ref.refname);
last = e.rec->u.ref.refname;
}
merged_iter_pqueue_release(&pq);
}
-static void t_merged_iter_pqueue_top(void)
+void test_reftable_pq__merged_iter_pqueue_top(void)
{
struct merged_iter_pqueue pq = { 0 };
struct reftable_record recs[13];
size_t N = ARRAY_SIZE(recs), i;
for (i = 0; i < N; i++) {
- check(!reftable_record_init(&recs[i], REFTABLE_BLOCK_TYPE_REF));
+ cl_assert(!reftable_record_init(&recs[i],
+ REFTABLE_BLOCK_TYPE_REF));
recs[i].u.ref.refname = (char *) "refs/heads/master";
}
@@ -137,25 +141,16 @@ static void t_merged_iter_pqueue_top(void)
struct pq_entry top = merged_iter_pqueue_top(pq);
struct pq_entry e;
- check(!merged_iter_pqueue_remove(&pq, &e));
+ cl_assert_equal_i(merged_iter_pqueue_remove(&pq, &e), 0);
merged_iter_pqueue_check(&pq);
- check(pq_entry_equal(&top, &e));
- check(reftable_record_equal(top.rec, &recs[i], REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(pq_entry_equal(&top, &e) != 0);
+ cl_assert(reftable_record_equal(top.rec, &recs[i], REFTABLE_HASH_SIZE_SHA1) != 0);
for (size_t j = 0; i < pq.len; j++) {
- check(pq_less(&top, &pq.heap[j]));
- check_int(top.index, >, j);
+ cl_assert(pq_less(&top, &pq.heap[j]) != 0);
+ cl_assert(top.index > j);
}
}
merged_iter_pqueue_release(&pq);
}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_pq_record(), "pq works with record-based comparison");
- TEST(t_pq_index(), "pq works with index-based comparison");
- TEST(t_merged_iter_pqueue_top(), "merged_iter_pqueue_top works");
-
- return test_done();
-}
diff --git a/t/unit-tests/t-reftable-readwrite.c b/t/unit-tests/u-reftable-readwrite.c
similarity index 68%
rename from t/unit-tests/t-reftable-readwrite.c
rename to t/unit-tests/u-reftable-readwrite.c
index 4c49129..4d8c4be 100644
--- a/t/unit-tests/t-reftable-readwrite.c
+++ b/t/unit-tests/u-reftable-readwrite.c
@@ -8,7 +8,7 @@ license that can be found in the LICENSE file or at
#define DISABLE_SIGN_COMPARE_WARNINGS
-#include "test-lib.h"
+#include "unit-test.h"
#include "lib-reftable.h"
#include "reftable/basics.h"
#include "reftable/blocksource.h"
@@ -19,24 +19,24 @@ license that can be found in the LICENSE file or at
static const int update_index = 5;
-static void t_buffer(void)
+void test_reftable_readwrite__buffer(void)
{
struct reftable_buf buf = REFTABLE_BUF_INIT;
struct reftable_block_source source = { 0 };
struct reftable_block_data out = { 0 };
int n;
uint8_t in[] = "hello";
- check(!reftable_buf_add(&buf, in, sizeof(in)));
+ cl_assert_equal_i(reftable_buf_add(&buf, in, sizeof(in)), 0);
block_source_from_buf(&source, &buf);
- check_int(block_source_size(&source), ==, 6);
+ cl_assert_equal_i(block_source_size(&source), 6);
n = block_source_read_data(&source, &out, 0, sizeof(in));
- check_int(n, ==, sizeof(in));
- check(!memcmp(in, out.data, n));
+ cl_assert_equal_i(n, sizeof(in));
+ cl_assert(!memcmp(in, out.data, n));
block_source_release_data(&out);
n = block_source_read_data(&source, &out, 1, 2);
- check_int(n, ==, 2);
- check(!memcmp(out.data, "el", 2));
+ cl_assert_equal_i(n, 2);
+ cl_assert(!memcmp(out.data, "el", 2));
block_source_release_data(&out);
block_source_close(&source);
@@ -55,41 +55,41 @@ static void write_table(char ***names, struct reftable_buf *buf, int N,
int i;
REFTABLE_CALLOC_ARRAY(*names, N + 1);
- check(*names != NULL);
+ cl_assert(*names != NULL);
REFTABLE_CALLOC_ARRAY(refs, N);
- check(refs != NULL);
+ cl_assert(refs != NULL);
REFTABLE_CALLOC_ARRAY(logs, N);
- check(logs != NULL);
+ cl_assert(logs != NULL);
for (i = 0; i < N; i++) {
refs[i].refname = (*names)[i] = xstrfmt("refs/heads/branch%02d", i);
refs[i].update_index = update_index;
refs[i].value_type = REFTABLE_REF_VAL1;
- t_reftable_set_hash(refs[i].value.val1, i, REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(refs[i].value.val1, i,
+ REFTABLE_HASH_SHA1);
}
for (i = 0; i < N; i++) {
logs[i].refname = (*names)[i];
logs[i].update_index = update_index;
logs[i].value_type = REFTABLE_LOG_UPDATE;
- t_reftable_set_hash(logs[i].value.update.new_hash, i,
- REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(logs[i].value.update.new_hash, i,
+ REFTABLE_HASH_SHA1);
logs[i].value.update.message = (char *) "message";
}
- t_reftable_write_to_buf(buf, refs, N, logs, N, &opts);
+ cl_reftable_write_to_buf(buf, refs, N, logs, N, &opts);
reftable_free(refs);
reftable_free(logs);
}
-static void t_log_buffer_size(void)
+void test_reftable_readwrite__log_buffer_size(void)
{
struct reftable_buf buf = REFTABLE_BUF_INIT;
struct reftable_write_options opts = {
.block_size = 4096,
};
- int err;
int i;
struct reftable_log_record
log = { .refname = (char *) "refs/heads/master",
@@ -102,7 +102,8 @@ static void t_log_buffer_size(void)
.time = 0x5e430672,
.message = (char *) "commit: 9\n",
} } };
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf,
+ &opts);
/* This tests buffer extension for log compression. Must use a random
hash, to ensure that the compressed part is larger than the original.
@@ -112,22 +113,19 @@ static void t_log_buffer_size(void)
log.value.update.new_hash[i] = (uint8_t)(git_rand(0) % 256);
}
reftable_writer_set_limits(w, update_index, update_index);
- err = reftable_writer_add_log(w, &log);
- check(!err);
- err = reftable_writer_close(w);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), 0);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_log_overflow(void)
+void test_reftable_readwrite__log_overflow(void)
{
struct reftable_buf buf = REFTABLE_BUF_INIT;
char msg[256] = { 0 };
struct reftable_write_options opts = {
.block_size = ARRAY_SIZE(msg),
};
- int err;
struct reftable_log_record log = {
.refname = (char *) "refs/heads/master",
.update_index = update_index,
@@ -144,21 +142,22 @@ static void t_log_overflow(void)
},
},
};
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf,
+ &opts);
memset(msg, 'x', sizeof(msg) - 1);
reftable_writer_set_limits(w, update_index, update_index);
- err = reftable_writer_add_log(w, &log);
- check_int(err, ==, REFTABLE_ENTRY_TOO_BIG_ERROR);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), REFTABLE_ENTRY_TOO_BIG_ERROR);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_log_write_limits(void)
+void test_reftable_readwrite__log_write_limits(void)
{
struct reftable_write_options opts = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf,
+ &opts);
struct reftable_log_record log = {
.refname = (char *)"refs/head/master",
.update_index = 0,
@@ -174,29 +173,25 @@ static void t_log_write_limits(void)
},
},
};
- int err;
reftable_writer_set_limits(w, 1, 1);
/* write with update_index (0) below set limits (1, 1) */
- err = reftable_writer_add_log(w, &log);
- check_int(err, ==, 0);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), 0);
/* write with update_index (1) in the set limits (1, 1) */
log.update_index = 1;
- err = reftable_writer_add_log(w, &log);
- check_int(err, ==, 0);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), 0);
/* write with update_index (3) above set limits (1, 1) */
log.update_index = 3;
- err = reftable_writer_add_log(w, &log);
- check_int(err, ==, REFTABLE_API_ERROR);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), REFTABLE_API_ERROR);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_log_write_read(void)
+void test_reftable_readwrite__log_write_read(void)
{
struct reftable_write_options opts = {
.block_size = 256,
@@ -207,13 +202,14 @@ static void t_log_write_read(void)
struct reftable_table *table;
struct reftable_block_source source = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
const struct reftable_stats *stats = NULL;
- int N = 2, err, i, n;
+ int N = 2, i;
char **names;
+ int err;
names = reftable_calloc(N + 1, sizeof(*names));
- check(names != NULL);
+ cl_assert(names != NULL);
reftable_writer_set_limits(w, 0, N);
@@ -225,8 +221,7 @@ static void t_log_write_read(void)
ref.refname = name;
ref.update_index = i;
- err = reftable_writer_add_ref(w, &ref);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &ref), 0);
}
for (i = 0; i < N; i++) {
@@ -235,60 +230,57 @@ static void t_log_write_read(void)
log.refname = names[i];
log.update_index = i;
log.value_type = REFTABLE_LOG_UPDATE;
- t_reftable_set_hash(log.value.update.old_hash, i,
- REFTABLE_HASH_SHA1);
- t_reftable_set_hash(log.value.update.new_hash, i + 1,
- REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(log.value.update.old_hash, i,
+ REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(log.value.update.new_hash, i + 1,
+ REFTABLE_HASH_SHA1);
- err = reftable_writer_add_log(w, &log);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), 0);
}
- n = reftable_writer_close(w);
- check_int(n, ==, 0);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
stats = reftable_writer_stats(w);
- check_int(stats->log_stats.blocks, >, 0);
+ cl_assert(stats->log_stats.blocks > 0);
reftable_writer_free(w);
w = NULL;
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.log");
- check(!err);
+ cl_assert(!err);
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, names[N - 1]);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_next_ref(&it, &ref);
- check(!err);
+ cl_assert(!err);
/* end of iteration. */
- err = reftable_iterator_next_ref(&it, &ref);
- check_int(err, >, 0);
+ cl_assert(reftable_iterator_next_ref(&it, &ref) > 0);
reftable_iterator_destroy(&it);
reftable_ref_record_release(&ref);
err = reftable_table_init_log_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_log(&it, "");
- check(!err);
+ cl_assert(!err);
for (i = 0; ; i++) {
int err = reftable_iterator_next_log(&it, &log);
if (err > 0)
break;
- check(!err);
- check_str(names[i], log.refname);
- check_int(i, ==, log.update_index);
+ cl_assert(!err);
+ cl_assert_equal_s(names[i], log.refname);
+ cl_assert_equal_i(i, log.update_index);
reftable_log_record_release(&log);
}
- check_int(i, ==, N);
+ cl_assert_equal_i(i, N);
reftable_iterator_destroy(&it);
/* cleanup. */
@@ -297,7 +289,7 @@ static void t_log_write_read(void)
reftable_table_decref(table);
}
-static void t_log_zlib_corruption(void)
+void test_reftable_readwrite__log_zlib_corruption(void)
{
struct reftable_write_options opts = {
.block_size = 256,
@@ -306,10 +298,12 @@ static void t_log_zlib_corruption(void)
struct reftable_table *table;
struct reftable_block_source source = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf,
+ &opts);
const struct reftable_stats *stats = NULL;
char message[100] = { 0 };
- int err, i, n;
+ int i;
+ int err;
struct reftable_log_record log = {
.refname = (char *) "refname",
.value_type = REFTABLE_LOG_UPDATE,
@@ -329,14 +323,11 @@ static void t_log_zlib_corruption(void)
reftable_writer_set_limits(w, 1, 1);
- err = reftable_writer_add_log(w, &log);
- check(!err);
-
- n = reftable_writer_close(w);
- check_int(n, ==, 0);
+ cl_assert_equal_i(reftable_writer_add_log(w, &log), 0);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
stats = reftable_writer_stats(w);
- check_int(stats->log_stats.blocks, >, 0);
+ cl_assert(stats->log_stats.blocks > 0);
reftable_writer_free(w);
w = NULL;
@@ -346,12 +337,12 @@ static void t_log_zlib_corruption(void)
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.log");
- check(!err);
+ cl_assert(!err);
err = reftable_table_init_log_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_log(&it, "refname");
- check_int(err, ==, REFTABLE_ZLIB_ERROR);
+ cl_assert_equal_i(err, REFTABLE_ZLIB_ERROR);
reftable_iterator_destroy(&it);
@@ -360,7 +351,7 @@ static void t_log_zlib_corruption(void)
reftable_buf_release(&buf);
}
-static void t_table_read_write_sequential(void)
+void test_reftable_readwrite__table_read_write_sequential(void)
{
char **names;
struct reftable_buf buf = REFTABLE_BUF_INIT;
@@ -376,24 +367,24 @@ static void t_table_read_write_sequential(void)
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.ref");
- check(!err);
+ cl_assert(!err);
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "");
- check(!err);
+ cl_assert(!err);
for (j = 0; ; j++) {
struct reftable_ref_record ref = { 0 };
int r = reftable_iterator_next_ref(&it, &ref);
- check_int(r, >=, 0);
+ cl_assert(r >= 0);
if (r > 0)
break;
- check_str(names[j], ref.refname);
- check_int(update_index, ==, ref.update_index);
+ cl_assert_equal_s(names[j], ref.refname);
+ cl_assert_equal_i(update_index, ref.update_index);
reftable_ref_record_release(&ref);
}
- check_int(j, ==, N);
+ cl_assert_equal_i(j, N);
reftable_iterator_destroy(&it);
reftable_table_decref(table);
@@ -401,42 +392,42 @@ static void t_table_read_write_sequential(void)
free_names(names);
}
-static void t_table_write_small_table(void)
+void test_reftable_readwrite__table_write_small_table(void)
{
char **names;
struct reftable_buf buf = REFTABLE_BUF_INIT;
int N = 1;
write_table(&names, &buf, N, 4096, REFTABLE_HASH_SHA1);
- check_int(buf.len, <, 200);
+ cl_assert(buf.len < 200);
reftable_buf_release(&buf);
free_names(names);
}
-static void t_table_read_api(void)
+void test_reftable_readwrite__table_read_api(void)
{
char **names;
struct reftable_buf buf = REFTABLE_BUF_INIT;
int N = 50;
struct reftable_table *table;
struct reftable_block_source source = { 0 };
- int err;
struct reftable_log_record log = { 0 };
struct reftable_iterator it = { 0 };
+ int err;
write_table(&names, &buf, N, 256, REFTABLE_HASH_SHA1);
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.ref");
- check(!err);
+ cl_assert(!err);
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, names[0]);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_next_log(&it, &log);
- check_int(err, ==, REFTABLE_API_ERROR);
+ cl_assert_equal_i(err, REFTABLE_API_ERROR);
reftable_buf_release(&buf);
free_names(names);
@@ -464,42 +455,43 @@ static void t_table_read_write_seek(int index, enum reftable_hash hash_id)
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.ref");
- check(!err);
- check_int(hash_id, ==, reftable_table_hash_id(table));
+ cl_assert(!err);
+ cl_assert_equal_i(hash_id, reftable_table_hash_id(table));
if (!index) {
table->ref_offsets.index_offset = 0;
} else {
- check_int(table->ref_offsets.index_offset, >, 0);
+ cl_assert(table->ref_offsets.index_offset > 0);
}
for (i = 1; i < N; i++) {
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, names[i]);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_next_ref(&it, &ref);
- check(!err);
- check_str(names[i], ref.refname);
- check_int(REFTABLE_REF_VAL1, ==, ref.value_type);
- check_int(i, ==, ref.value.val1[0]);
+ cl_assert(!err);
+ cl_assert_equal_s(names[i], ref.refname);
+ cl_assert_equal_i(REFTABLE_REF_VAL1, ref.value_type);
+ cl_assert_equal_i(i, ref.value.val1[0]);
reftable_ref_record_release(&ref);
reftable_iterator_destroy(&it);
}
- check(!reftable_buf_addstr(&pastLast, names[N - 1]));
- check(!reftable_buf_addstr(&pastLast, "/"));
+ cl_assert_equal_i(reftable_buf_addstr(&pastLast, names[N - 1]),
+ 0);
+ cl_assert_equal_i(reftable_buf_addstr(&pastLast, "/"), 0);
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, pastLast.buf);
if (err == 0) {
struct reftable_ref_record ref = { 0 };
int err = reftable_iterator_next_ref(&it, &ref);
- check_int(err, >, 0);
+ cl_assert(err > 0);
} else {
- check_int(err, >, 0);
+ cl_assert(err > 0);
}
reftable_buf_release(&pastLast);
@@ -510,17 +502,17 @@ static void t_table_read_write_seek(int index, enum reftable_hash hash_id)
reftable_table_decref(table);
}
-static void t_table_read_write_seek_linear(void)
+void test_reftable_readwrite__table_read_write_seek_linear(void)
{
t_table_read_write_seek(0, REFTABLE_HASH_SHA1);
}
-static void t_table_read_write_seek_linear_sha256(void)
+void test_reftable_readwrite__table_read_write_seek_linear_sha256(void)
{
t_table_read_write_seek(0, REFTABLE_HASH_SHA256);
}
-static void t_table_read_write_seek_index(void)
+void test_reftable_readwrite__table_read_write_seek_index(void)
{
t_table_read_write_seek(1, REFTABLE_HASH_SHA1);
}
@@ -538,14 +530,16 @@ static void t_table_refs_for(int indexed)
struct reftable_table *table;
struct reftable_block_source source = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf,
+ &opts);
struct reftable_iterator it = { 0 };
- int N = 50, n, j, err, i;
+ int N = 50, j, i;
+ int err;
want_names = reftable_calloc(N + 1, sizeof(*want_names));
- check(want_names != NULL);
+ cl_assert(want_names != NULL);
- t_reftable_set_hash(want_hash, 4, REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(want_hash, 4, REFTABLE_HASH_SHA1);
for (i = 0; i < N; i++) {
uint8_t hash[REFTABLE_HASH_SIZE_SHA1];
@@ -561,24 +555,22 @@ static void t_table_refs_for(int indexed)
ref.refname = name;
ref.value_type = REFTABLE_REF_VAL2;
- t_reftable_set_hash(ref.value.val2.value, i / 4,
- REFTABLE_HASH_SHA1);
- t_reftable_set_hash(ref.value.val2.target_value, 3 + i / 4,
- REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(ref.value.val2.value, i / 4,
+ REFTABLE_HASH_SHA1);
+ cl_reftable_set_hash(ref.value.val2.target_value,
+ 3 + i / 4, REFTABLE_HASH_SHA1);
/* 80 bytes / entry, so 3 entries per block. Yields 17
*/
/* blocks. */
- n = reftable_writer_add_ref(w, &ref);
- check_int(n, ==, 0);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &ref), 0);
if (!memcmp(ref.value.val2.value, want_hash, REFTABLE_HASH_SIZE_SHA1) ||
!memcmp(ref.value.val2.target_value, want_hash, REFTABLE_HASH_SIZE_SHA1))
want_names[want_names_len++] = xstrdup(name);
}
- n = reftable_writer_close(w);
- check_int(n, ==, 0);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
reftable_writer_free(w);
w = NULL;
@@ -586,29 +578,29 @@ static void t_table_refs_for(int indexed)
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.ref");
- check(!err);
+ cl_assert(!err);
if (!indexed)
table->obj_offsets.is_present = 0;
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "");
- check(!err);
+ cl_assert(!err);
reftable_iterator_destroy(&it);
err = reftable_table_refs_for(table, &it, want_hash);
- check(!err);
+ cl_assert(!err);
for (j = 0; ; j++) {
int err = reftable_iterator_next_ref(&it, &ref);
- check_int(err, >=, 0);
+ cl_assert(err >= 0);
if (err > 0)
break;
- check_int(j, <, want_names_len);
- check_str(ref.refname, want_names[j]);
+ cl_assert(j < want_names_len);
+ cl_assert_equal_s(ref.refname, want_names[j]);
reftable_ref_record_release(&ref);
}
- check_int(j, ==, want_names_len);
+ cl_assert_equal_i(j, want_names_len);
reftable_buf_release(&buf);
free_names(want_names);
@@ -616,21 +608,21 @@ static void t_table_refs_for(int indexed)
reftable_table_decref(table);
}
-static void t_table_refs_for_no_index(void)
+void test_reftable_readwrite__table_refs_for_no_index(void)
{
t_table_refs_for(0);
}
-static void t_table_refs_for_obj_index(void)
+void test_reftable_readwrite__table_refs_for_obj_index(void)
{
t_table_refs_for(1);
}
-static void t_write_empty_table(void)
+void test_reftable_readwrite__write_empty_table(void)
{
struct reftable_write_options opts = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_block_source source = { 0 };
struct reftable_table *table = NULL;
struct reftable_ref_record rec = { 0 };
@@ -639,43 +631,41 @@ static void t_write_empty_table(void)
reftable_writer_set_limits(w, 1, 1);
- err = reftable_writer_close(w);
- check_int(err, ==, REFTABLE_EMPTY_TABLE_ERROR);
+ cl_assert_equal_i(reftable_writer_close(w), REFTABLE_EMPTY_TABLE_ERROR);
reftable_writer_free(w);
- check_uint(buf.len, ==, header_size(1) + footer_size(1));
+ cl_assert_equal_i(buf.len, header_size(1) + footer_size(1));
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "filename");
- check(!err);
+ cl_assert(!err);
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "");
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_next_ref(&it, &rec);
- check_int(err, >, 0);
+ cl_assert(err > 0);
reftable_iterator_destroy(&it);
reftable_table_decref(table);
reftable_buf_release(&buf);
}
-static void t_write_object_id_min_length(void)
+void test_reftable_readwrite__write_object_id_min_length(void)
{
struct reftable_write_options opts = {
.block_size = 75,
};
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_ref_record ref = {
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = {42},
};
- int err;
int i;
reftable_writer_set_limits(w, 1, 1);
@@ -686,30 +676,27 @@ static void t_write_object_id_min_length(void)
char name[256];
snprintf(name, sizeof(name), "ref%05d", i);
ref.refname = name;
- err = reftable_writer_add_ref(w, &ref);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &ref), 0);
}
- err = reftable_writer_close(w);
- check(!err);
- check_int(reftable_writer_stats(w)->object_id_len, ==, 2);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
+ cl_assert_equal_i(reftable_writer_stats(w)->object_id_len, 2);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_write_object_id_length(void)
+void test_reftable_readwrite__write_object_id_length(void)
{
struct reftable_write_options opts = {
.block_size = 75,
};
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_ref_record ref = {
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = {42},
};
- int err;
int i;
reftable_writer_set_limits(w, 1, 1);
@@ -721,44 +708,39 @@ static void t_write_object_id_length(void)
snprintf(name, sizeof(name), "ref%05d", i);
ref.refname = name;
ref.value.val1[15] = i;
- err = reftable_writer_add_ref(w, &ref);
- check(!err);
+ cl_assert(reftable_writer_add_ref(w, &ref) == 0);
}
- err = reftable_writer_close(w);
- check(!err);
- check_int(reftable_writer_stats(w)->object_id_len, ==, 16);
+ cl_assert_equal_i(reftable_writer_close(w), 0);
+ cl_assert_equal_i(reftable_writer_stats(w)->object_id_len, 16);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_write_empty_key(void)
+void test_reftable_readwrite__write_empty_key(void)
{
struct reftable_write_options opts = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_ref_record ref = {
.refname = (char *) "",
.update_index = 1,
.value_type = REFTABLE_REF_DELETION,
};
- int err;
reftable_writer_set_limits(w, 1, 1);
- err = reftable_writer_add_ref(w, &ref);
- check_int(err, ==, REFTABLE_API_ERROR);
-
- err = reftable_writer_close(w);
- check_int(err, ==, REFTABLE_EMPTY_TABLE_ERROR);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &ref), REFTABLE_API_ERROR);
+ cl_assert_equal_i(reftable_writer_close(w),
+ REFTABLE_EMPTY_TABLE_ERROR);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_write_key_order(void)
+void test_reftable_readwrite__write_key_order(void)
{
struct reftable_write_options opts = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
- struct reftable_writer *w = t_reftable_strbuf_writer(&buf, &opts);
+ struct reftable_writer *w = cl_reftable_strbuf_writer(&buf, &opts);
struct reftable_ref_record refs[2] = {
{
.refname = (char *) "b",
@@ -776,24 +758,21 @@ static void t_write_key_order(void)
},
}
};
- int err;
reftable_writer_set_limits(w, 1, 1);
- err = reftable_writer_add_ref(w, &refs[0]);
- check(!err);
- err = reftable_writer_add_ref(w, &refs[1]);
- check_int(err, ==, REFTABLE_API_ERROR);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &refs[0]), 0);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &refs[1]),
+ REFTABLE_API_ERROR);
refs[0].update_index = 2;
- err = reftable_writer_add_ref(w, &refs[0]);
- check_int(err, ==, REFTABLE_API_ERROR);
+ cl_assert_equal_i(reftable_writer_add_ref(w, &refs[0]), REFTABLE_API_ERROR);
reftable_writer_close(w);
reftable_writer_free(w);
reftable_buf_release(&buf);
}
-static void t_write_multiple_indices(void)
+void test_reftable_readwrite__write_multiple_indices(void)
{
struct reftable_write_options opts = {
.block_size = 100,
@@ -805,9 +784,10 @@ static void t_write_multiple_indices(void)
struct reftable_writer *writer;
struct reftable_table *table;
char buf[128];
- int err, i;
+ int i;
+ int err;
- writer = t_reftable_strbuf_writer(&writer_buf, &opts);
+ writer = cl_reftable_strbuf_writer(&writer_buf, &opts);
reftable_writer_set_limits(writer, 1, 1);
for (i = 0; i < 100; i++) {
struct reftable_ref_record ref = {
@@ -819,8 +799,7 @@ static void t_write_multiple_indices(void)
snprintf(buf, sizeof(buf), "refs/heads/%04d", i);
ref.refname = buf;
- err = reftable_writer_add_ref(writer, &ref);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_ref(writer, &ref), 0);
}
for (i = 0; i < 100; i++) {
@@ -836,8 +815,7 @@ static void t_write_multiple_indices(void)
snprintf(buf, sizeof(buf), "refs/heads/%04d", i);
log.refname = buf;
- err = reftable_writer_add_log(writer, &log);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_log(writer, &log), 0);
}
reftable_writer_close(writer);
@@ -847,22 +825,22 @@ static void t_write_multiple_indices(void)
* for each of the block types.
*/
stats = reftable_writer_stats(writer);
- check_int(stats->ref_stats.index_offset, >, 0);
- check_int(stats->obj_stats.index_offset, >, 0);
- check_int(stats->log_stats.index_offset, >, 0);
+ cl_assert(stats->ref_stats.index_offset > 0);
+ cl_assert(stats->obj_stats.index_offset > 0);
+ cl_assert(stats->log_stats.index_offset > 0);
block_source_from_buf(&source, &writer_buf);
err = reftable_table_new(&table, &source, "filename");
- check(!err);
+ cl_assert(!err);
/*
* Seeking the log uses the log index now. In case there is any
* confusion regarding indices we would notice here.
*/
err = reftable_table_init_log_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_log(&it, "");
- check(!err);
+ cl_assert(!err);
reftable_iterator_destroy(&it);
reftable_writer_free(writer);
@@ -870,7 +848,7 @@ static void t_write_multiple_indices(void)
reftable_buf_release(&writer_buf);
}
-static void t_write_multi_level_index(void)
+void test_reftable_readwrite__write_multi_level_index(void)
{
struct reftable_write_options opts = {
.block_size = 100,
@@ -883,7 +861,7 @@ static void t_write_multi_level_index(void)
struct reftable_table *table;
int err;
- writer = t_reftable_strbuf_writer(&writer_buf, &opts);
+ writer = cl_reftable_strbuf_writer(&writer_buf, &opts);
reftable_writer_set_limits(writer, 1, 1);
for (size_t i = 0; i < 200; i++) {
struct reftable_ref_record ref = {
@@ -896,8 +874,7 @@ static void t_write_multi_level_index(void)
snprintf(buf, sizeof(buf), "refs/heads/%03" PRIuMAX, (uintmax_t)i);
ref.refname = buf;
- err = reftable_writer_add_ref(writer, &ref);
- check(!err);
+ cl_assert_equal_i(reftable_writer_add_ref(writer, &ref), 0);
}
reftable_writer_close(writer);
@@ -906,19 +883,19 @@ static void t_write_multi_level_index(void)
* multi-level index.
*/
stats = reftable_writer_stats(writer);
- check_int(stats->ref_stats.max_index_level, ==, 2);
+ cl_assert_equal_i(stats->ref_stats.max_index_level, 2);
block_source_from_buf(&source, &writer_buf);
err = reftable_table_new(&table, &source, "filename");
- check(!err);
+ cl_assert(!err);
/*
* Seeking the last ref should work as expected.
*/
err = reftable_table_init_ref_iterator(table, &it);
- check(!err);
+ cl_assert(!err);
err = reftable_iterator_seek_ref(&it, "refs/heads/199");
- check(!err);
+ cl_assert(!err);
reftable_iterator_destroy(&it);
reftable_writer_free(writer);
@@ -927,7 +904,7 @@ static void t_write_multi_level_index(void)
reftable_buf_release(&buf);
}
-static void t_corrupt_table_empty(void)
+void test_reftable_readwrite__corrupt_table_empty(void)
{
struct reftable_buf buf = REFTABLE_BUF_INIT;
struct reftable_block_source source = { 0 };
@@ -936,50 +913,22 @@ static void t_corrupt_table_empty(void)
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.log");
- check_int(err, ==, REFTABLE_FORMAT_ERROR);
+ cl_assert_equal_i(err, REFTABLE_FORMAT_ERROR);
}
-static void t_corrupt_table(void)
+void test_reftable_readwrite__corrupt_table(void)
{
uint8_t zeros[1024] = { 0 };
struct reftable_buf buf = REFTABLE_BUF_INIT;
struct reftable_block_source source = { 0 };
struct reftable_table *table;
int err;
- check(!reftable_buf_add(&buf, zeros, sizeof(zeros)));
+
+ cl_assert(!reftable_buf_add(&buf, zeros, sizeof(zeros)));
block_source_from_buf(&source, &buf);
err = reftable_table_new(&table, &source, "file.log");
- check_int(err, ==, REFTABLE_FORMAT_ERROR);
+ cl_assert_equal_i(err, REFTABLE_FORMAT_ERROR);
reftable_buf_release(&buf);
}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_buffer(), "strbuf works as blocksource");
- TEST(t_corrupt_table(), "read-write on corrupted table");
- TEST(t_corrupt_table_empty(), "read-write on an empty table");
- TEST(t_log_buffer_size(), "buffer extension for log compression");
- TEST(t_log_overflow(), "log overflow returns expected error");
- TEST(t_log_write_limits(), "writer limits for writing log records");
- TEST(t_log_write_read(), "read-write on log records");
- TEST(t_log_zlib_corruption(), "reading corrupted log record returns expected error");
- TEST(t_table_read_api(), "read on a table");
- TEST(t_table_read_write_seek_index(), "read-write on a table with index");
- TEST(t_table_read_write_seek_linear(), "read-write on a table without index (SHA1)");
- TEST(t_table_read_write_seek_linear_sha256(), "read-write on a table without index (SHA256)");
- TEST(t_table_read_write_sequential(), "sequential read-write on a table");
- TEST(t_table_refs_for_no_index(), "refs-only table with no index");
- TEST(t_table_refs_for_obj_index(), "refs-only table with index");
- TEST(t_table_write_small_table(), "write_table works");
- TEST(t_write_empty_key(), "write on refs with empty keys");
- TEST(t_write_empty_table(), "read-write on empty tables");
- TEST(t_write_key_order(), "refs must be written in increasing order");
- TEST(t_write_multi_level_index(), "table with multi-level index");
- TEST(t_write_multiple_indices(), "table with indices for multiple block types");
- TEST(t_write_object_id_length(), "prefix compression on writing refs");
- TEST(t_write_object_id_min_length(), "prefix compression on writing refs");
-
- return test_done();
-}
diff --git a/t/unit-tests/t-reftable-record.c b/t/unit-tests/u-reftable-record.c
similarity index 63%
rename from t/unit-tests/t-reftable-record.c
rename to t/unit-tests/u-reftable-record.c
index 553a007..6c8c0d5 100644
--- a/t/unit-tests/t-reftable-record.c
+++ b/t/unit-tests/u-reftable-record.c
@@ -6,7 +6,8 @@
https://developers.google.com/open-source/licenses/bsd
*/
-#include "test-lib.h"
+#include "unit-test.h"
+#include "lib-reftable.h"
#include "reftable/basics.h"
#include "reftable/constants.h"
#include "reftable/record.h"
@@ -17,16 +18,17 @@ static void t_copy(struct reftable_record *rec)
uint8_t typ;
typ = reftable_record_type(rec);
- check(!reftable_record_init(©, typ));
+ cl_assert_equal_i(reftable_record_init(©, typ), 0);
reftable_record_copy_from(©, rec, REFTABLE_HASH_SIZE_SHA1);
/* do it twice to catch memory leaks */
reftable_record_copy_from(©, rec, REFTABLE_HASH_SIZE_SHA1);
- check(reftable_record_equal(rec, ©, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_record_equal(rec, ©,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_record_release(©);
}
-static void t_varint_roundtrip(void)
+void test_reftable_record__varint_roundtrip(void)
{
uint64_t inputs[] = { 0,
1,
@@ -49,16 +51,16 @@ static void t_varint_roundtrip(void)
int n = put_var_int(&out, in);
uint64_t got = 0;
- check_int(n, >, 0);
+ cl_assert(n > 0);
out.len = n;
n = get_var_int(&got, &out);
- check_int(n, >, 0);
+ cl_assert(n > 0);
- check_int(got, ==, in);
+ cl_assert_equal_i(got, in);
}
}
-static void t_varint_overflow(void)
+void test_reftable_record__varint_overflow(void)
{
unsigned char buf[] = {
0xFF, 0xFF, 0xFF, 0xFF,
@@ -70,8 +72,7 @@ static void t_varint_overflow(void)
.len = sizeof(buf),
};
uint64_t value;
- int err = get_var_int(&value, &view);
- check_int(err, ==, -1);
+ cl_assert_equal_i(get_var_int(&value, &view), -1);
}
static void set_hash(uint8_t *h, int j)
@@ -80,7 +81,7 @@ static void set_hash(uint8_t *h, int j)
h[i] = (j >> i) & 0xff;
}
-static void t_reftable_ref_record_comparison(void)
+void test_reftable_record__ref_record_comparison(void)
{
struct reftable_record in[3] = {
{
@@ -102,21 +103,23 @@ static void t_reftable_ref_record_comparison(void)
};
int cmp;
- check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1) == 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
- check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[1], &in[2], &cmp));
- check_int(cmp, >, 0);
+ cl_assert(reftable_record_equal(&in[1], &in[2],
+ REFTABLE_HASH_SIZE_SHA1) == 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[1], &in[2], &cmp), 0);
+ cl_assert(cmp > 0);
in[1].u.ref.value_type = in[0].u.ref.value_type;
- check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
}
-static void t_reftable_ref_record_compare_name(void)
+void test_reftable_record__ref_record_compare_name(void)
{
struct reftable_ref_record recs[3] = {
{
@@ -130,12 +133,15 @@ static void t_reftable_ref_record_compare_name(void)
},
};
- check_int(reftable_ref_record_compare_name(&recs[0], &recs[1]), <, 0);
- check_int(reftable_ref_record_compare_name(&recs[1], &recs[0]), >, 0);
- check_int(reftable_ref_record_compare_name(&recs[0], &recs[2]), ==, 0);
+ cl_assert(reftable_ref_record_compare_name(&recs[0],
+ &recs[1]) < 0);
+ cl_assert(reftable_ref_record_compare_name(&recs[1],
+ &recs[0]) > 0);
+ cl_assert_equal_i(reftable_ref_record_compare_name(&recs[0],
+ &recs[2]), 0);
}
-static void t_reftable_ref_record_roundtrip(void)
+void test_reftable_record__ref_record_roundtrip(void)
{
struct reftable_buf scratch = REFTABLE_BUF_INIT;
@@ -172,19 +178,21 @@ static void t_reftable_ref_record_roundtrip(void)
t_copy(&in);
- check_int(reftable_record_val_type(&in), ==, i);
- check_int(reftable_record_is_deletion(&in), ==, i == REFTABLE_REF_DELETION);
+ cl_assert_equal_i(reftable_record_val_type(&in), i);
+ cl_assert_equal_i(reftable_record_is_deletion(&in),
+ i == REFTABLE_REF_DELETION);
reftable_record_key(&in, &key);
n = reftable_record_encode(&in, dest, REFTABLE_HASH_SIZE_SHA1);
- check_int(n, >, 0);
+ cl_assert(n > 0);
/* decode into a non-zero reftable_record to test for leaks. */
m = reftable_record_decode(&out, key, i, dest, REFTABLE_HASH_SIZE_SHA1, &scratch);
- check_int(n, ==, m);
+ cl_assert_equal_i(n, m);
- check(reftable_ref_record_equal(&in.u.ref, &out.u.ref,
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_ref_record_equal(&in.u.ref,
+ &out.u.ref,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_record_release(&in);
reftable_buf_release(&key);
@@ -194,7 +202,7 @@ static void t_reftable_ref_record_roundtrip(void)
reftable_buf_release(&scratch);
}
-static void t_reftable_log_record_comparison(void)
+void test_reftable_record__log_record_comparison(void)
{
struct reftable_record in[3] = {
{
@@ -215,21 +223,24 @@ static void t_reftable_log_record_comparison(void)
};
int cmp;
- check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[1], &in[2], &cmp));
- check_int(cmp, >, 0);
+ cl_assert_equal_i(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_equal(&in[1], &in[2],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[1], &in[2], &cmp), 0);
+ cl_assert(cmp > 0);
/* comparison should be reversed for equal keys, because
* comparison is now performed on the basis of update indices */
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check_int(cmp, <, 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(cmp < 0);
in[1].u.log.update_index = in[0].u.log.update_index;
- check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+ cl_assert(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
}
-static void t_reftable_log_record_compare_key(void)
+void test_reftable_record__log_record_compare_key(void)
{
struct reftable_log_record logs[3] = {
{
@@ -246,19 +257,24 @@ static void t_reftable_log_record_compare_key(void)
},
};
- check_int(reftable_log_record_compare_key(&logs[0], &logs[1]), <, 0);
- check_int(reftable_log_record_compare_key(&logs[1], &logs[0]), >, 0);
+ cl_assert(reftable_log_record_compare_key(&logs[0],
+ &logs[1]) < 0);
+ cl_assert(reftable_log_record_compare_key(&logs[1],
+ &logs[0]) > 0);
logs[1].update_index = logs[0].update_index;
- check_int(reftable_log_record_compare_key(&logs[0], &logs[1]), <, 0);
+ cl_assert(reftable_log_record_compare_key(&logs[0],
+ &logs[1]) < 0);
- check_int(reftable_log_record_compare_key(&logs[0], &logs[2]), >, 0);
- check_int(reftable_log_record_compare_key(&logs[2], &logs[0]), <, 0);
+ cl_assert(reftable_log_record_compare_key(&logs[0],
+ &logs[2]) > 0);
+ cl_assert(reftable_log_record_compare_key(&logs[2],
+ &logs[0]) < 0);
logs[2].update_index = logs[0].update_index;
- check_int(reftable_log_record_compare_key(&logs[0], &logs[2]), ==, 0);
+ cl_assert_equal_i(reftable_log_record_compare_key(&logs[0], &logs[2]), 0);
}
-static void t_reftable_log_record_roundtrip(void)
+void test_reftable_record__log_record_roundtrip(void)
{
struct reftable_log_record in[] = {
{
@@ -292,9 +308,9 @@ static void t_reftable_log_record_roundtrip(void)
set_hash(in[2].value.update.new_hash, 3);
set_hash(in[2].value.update.old_hash, 4);
- check(!reftable_log_record_is_deletion(&in[0]));
- check(reftable_log_record_is_deletion(&in[1]));
- check(!reftable_log_record_is_deletion(&in[2]));
+ cl_assert_equal_i(reftable_log_record_is_deletion(&in[0]), 0);
+ cl_assert(reftable_log_record_is_deletion(&in[1]) != 0);
+ cl_assert_equal_i(reftable_log_record_is_deletion(&in[2]), 0);
for (size_t i = 0; i < ARRAY_SIZE(in); i++) {
struct reftable_record rec = { .type = REFTABLE_BLOCK_TYPE_LOG };
@@ -328,14 +344,14 @@ static void t_reftable_log_record_roundtrip(void)
reftable_record_key(&rec, &key);
n = reftable_record_encode(&rec, dest, REFTABLE_HASH_SIZE_SHA1);
- check_int(n, >=, 0);
+ cl_assert(n >= 0);
valtype = reftable_record_val_type(&rec);
m = reftable_record_decode(&out, key, valtype, dest,
REFTABLE_HASH_SIZE_SHA1, &scratch);
- check_int(n, ==, m);
+ cl_assert_equal_i(n, m);
- check(reftable_log_record_equal(&in[i], &out.u.log,
- REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_log_record_equal(&in[i], &out.u.log,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_log_record_release(&in[i]);
reftable_buf_release(&key);
reftable_record_release(&out);
@@ -344,7 +360,7 @@ static void t_reftable_log_record_roundtrip(void)
reftable_buf_release(&scratch);
}
-static void t_key_roundtrip(void)
+void test_reftable_record__key_roundtrip(void)
{
uint8_t buffer[1024] = { 0 };
struct string_view dest = {
@@ -359,25 +375,28 @@ static void t_key_roundtrip(void)
int n, m;
uint8_t rt_extra;
- check(!reftable_buf_addstr(&last_key, "refs/heads/master"));
- check(!reftable_buf_addstr(&key, "refs/tags/bla"));
+ cl_assert_equal_i(reftable_buf_addstr(&last_key,
+ "refs/heads/master"), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&key,
+ "refs/tags/bla"), 0);
extra = 6;
n = reftable_encode_key(&restart, dest, last_key, key, extra);
- check(!restart);
- check_int(n, >, 0);
+ cl_assert(!restart);
+ cl_assert(n > 0);
- check(!reftable_buf_addstr(&roundtrip, "refs/heads/master"));
+ cl_assert_equal_i(reftable_buf_addstr(&roundtrip,
+ "refs/heads/master"), 0);
m = reftable_decode_key(&roundtrip, &rt_extra, dest);
- check_int(n, ==, m);
- check(!reftable_buf_cmp(&key, &roundtrip));
- check_int(rt_extra, ==, extra);
+ cl_assert_equal_i(n, m);
+ cl_assert_equal_i(reftable_buf_cmp(&key, &roundtrip), 0);
+ cl_assert_equal_i(rt_extra, extra);
reftable_buf_release(&last_key);
reftable_buf_release(&key);
reftable_buf_release(&roundtrip);
}
-static void t_reftable_obj_record_comparison(void)
+void test_reftable_record__obj_record_comparison(void)
{
uint8_t id_bytes[] = { 0, 1, 2, 3, 4, 5, 6 };
@@ -405,21 +424,23 @@ static void t_reftable_obj_record_comparison(void)
};
int cmp;
- check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert_equal_i(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
- check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[1], &in[2], &cmp));
- check_int(cmp, >, 0);
+ cl_assert_equal_i(reftable_record_equal(&in[1], &in[2],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[1], &in[2], &cmp), 0);
+ cl_assert(cmp > 0);
in[1].u.obj.offset_len = in[0].u.obj.offset_len;
- check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1) != 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
}
-static void t_reftable_obj_record_roundtrip(void)
+void test_reftable_record__obj_record_roundtrip(void)
{
uint8_t testHash1[REFTABLE_HASH_SIZE_SHA1] = { 1, 2, 3, 4, 0 };
uint64_t till9[] = { 1, 2, 3, 4, 500, 600, 700, 800, 9000 };
@@ -460,17 +481,18 @@ static void t_reftable_obj_record_roundtrip(void)
int n, m;
uint8_t extra;
- check(!reftable_record_is_deletion(&in));
+ cl_assert_equal_i(reftable_record_is_deletion(&in), 0);
t_copy(&in);
reftable_record_key(&in, &key);
n = reftable_record_encode(&in, dest, REFTABLE_HASH_SIZE_SHA1);
- check_int(n, >, 0);
+ cl_assert(n > 0);
extra = reftable_record_val_type(&in);
m = reftable_record_decode(&out, key, extra, dest,
REFTABLE_HASH_SIZE_SHA1, &scratch);
- check_int(n, ==, m);
+ cl_assert_equal_i(n, m);
- check(reftable_record_equal(&in, &out, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_record_equal(&in, &out,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_buf_release(&key);
reftable_record_release(&out);
}
@@ -478,7 +500,7 @@ static void t_reftable_obj_record_roundtrip(void)
reftable_buf_release(&scratch);
}
-static void t_reftable_index_record_comparison(void)
+void test_reftable_record__index_record_comparison(void)
{
struct reftable_record in[3] = {
{
@@ -499,28 +521,33 @@ static void t_reftable_index_record_comparison(void)
};
int cmp;
- check(!reftable_buf_addstr(&in[0].u.idx.last_key, "refs/heads/master"));
- check(!reftable_buf_addstr(&in[1].u.idx.last_key, "refs/heads/master"));
- check(!reftable_buf_addstr(&in[2].u.idx.last_key, "refs/heads/branch"));
+ cl_assert_equal_i(reftable_buf_addstr(&in[0].u.idx.last_key,
+ "refs/heads/master"), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&in[1].u.idx.last_key, "refs/heads/master"), 0);
+ cl_assert(reftable_buf_addstr(&in[2].u.idx.last_key,
+ "refs/heads/branch") == 0);
- check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert_equal_i(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
- check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[1], &in[2], &cmp));
- check_int(cmp, >, 0);
+ cl_assert_equal_i(reftable_record_equal(&in[1], &in[2],
+ REFTABLE_HASH_SIZE_SHA1), 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[1], &in[2], &cmp), 0);
+ cl_assert(cmp > 0);
in[1].u.idx.offset = in[0].u.idx.offset;
- check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
- check(!reftable_record_cmp(&in[0], &in[1], &cmp));
- check(!cmp);
+ cl_assert(reftable_record_equal(&in[0], &in[1],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ cl_assert_equal_i(reftable_record_cmp(&in[0], &in[1], &cmp), 0);
+ cl_assert(!cmp);
for (size_t i = 0; i < ARRAY_SIZE(in); i++)
reftable_record_release(&in[i]);
}
-static void t_reftable_index_record_roundtrip(void)
+void test_reftable_record__index_record_roundtrip(void)
{
struct reftable_record in = {
.type = REFTABLE_BLOCK_TYPE_INDEX,
@@ -543,43 +570,26 @@ static void t_reftable_index_record_roundtrip(void)
int n, m;
uint8_t extra;
- check(!reftable_buf_addstr(&in.u.idx.last_key, "refs/heads/master"));
+ cl_assert_equal_i(reftable_buf_addstr(&in.u.idx.last_key,
+ "refs/heads/master"), 0);
reftable_record_key(&in, &key);
t_copy(&in);
- check(!reftable_record_is_deletion(&in));
- check(!reftable_buf_cmp(&key, &in.u.idx.last_key));
+ cl_assert_equal_i(reftable_record_is_deletion(&in), 0);
+ cl_assert_equal_i(reftable_buf_cmp(&key, &in.u.idx.last_key), 0);
n = reftable_record_encode(&in, dest, REFTABLE_HASH_SIZE_SHA1);
- check_int(n, >, 0);
+ cl_assert(n > 0);
extra = reftable_record_val_type(&in);
- m = reftable_record_decode(&out, key, extra, dest, REFTABLE_HASH_SIZE_SHA1,
- &scratch);
- check_int(m, ==, n);
+ m = reftable_record_decode(&out, key, extra, dest,
+ REFTABLE_HASH_SIZE_SHA1, &scratch);
+ cl_assert_equal_i(m, n);
- check(reftable_record_equal(&in, &out, REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(reftable_record_equal(&in, &out,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
reftable_record_release(&out);
reftable_buf_release(&key);
reftable_buf_release(&scratch);
reftable_buf_release(&in.u.idx.last_key);
}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_reftable_ref_record_comparison(), "comparison operations work on ref record");
- TEST(t_reftable_log_record_comparison(), "comparison operations work on log record");
- TEST(t_reftable_index_record_comparison(), "comparison operations work on index record");
- TEST(t_reftable_obj_record_comparison(), "comparison operations work on obj record");
- TEST(t_reftable_ref_record_compare_name(), "reftable_ref_record_compare_name works");
- TEST(t_reftable_log_record_compare_key(), "reftable_log_record_compare_key works");
- TEST(t_reftable_log_record_roundtrip(), "record operations work on log record");
- TEST(t_reftable_ref_record_roundtrip(), "record operations work on ref record");
- TEST(t_varint_roundtrip(), "put_var_int and get_var_int work");
- TEST(t_varint_overflow(), "get_var_int notices an integer overflow");
- TEST(t_key_roundtrip(), "reftable_encode_key and reftable_decode_key work");
- TEST(t_reftable_obj_record_roundtrip(), "record operations work on obj record");
- TEST(t_reftable_index_record_roundtrip(), "record operations work on index record");
-
- return test_done();
-}
diff --git a/t/unit-tests/u-reftable-stack.c b/t/unit-tests/u-reftable-stack.c
new file mode 100644
index 0000000..e4ea571
--- /dev/null
+++ b/t/unit-tests/u-reftable-stack.c
@@ -0,0 +1,1331 @@
+/*
+Copyright 2020 Google LLC
+
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file or at
+https://developers.google.com/open-source/licenses/bsd
+*/
+
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
+#include "unit-test.h"
+#include "dir.h"
+#include "lib-reftable.h"
+#include "reftable/merged.h"
+#include "reftable/reftable-error.h"
+#include "reftable/stack.h"
+#include "reftable/table.h"
+#include "strbuf.h"
+#include "tempfile.h"
+#include <dirent.h>
+
+static void clear_dir(const char *dirname)
+{
+ struct strbuf path = REFTABLE_BUF_INIT;
+ strbuf_addstr(&path, dirname);
+ remove_dir_recursively(&path, 0);
+ strbuf_release(&path);
+}
+
+static int count_dir_entries(const char *dirname)
+{
+ DIR *dir = opendir(dirname);
+ int len = 0;
+ struct dirent *d;
+ if (!dir)
+ return 0;
+
+ while ((d = readdir(dir))) {
+ /*
+ * Besides skipping over "." and "..", we also need to
+ * skip over other files that have a leading ".". This
+ * is due to behaviour of NFS, which will rename files
+ * to ".nfs*" to emulate delete-on-last-close.
+ *
+ * In any case this should be fine as the reftable
+ * library will never write files with leading dots
+ * anyway.
+ */
+ if (starts_with(d->d_name, "."))
+ continue;
+ len++;
+ }
+ closedir(dir);
+ return len;
+}
+
+/*
+ * Work linenumber into the tempdir, so we can see which tests forget to
+ * cleanup.
+ */
+static char *get_tmp_template(int linenumber)
+{
+ const char *tmp = getenv("TMPDIR");
+ static char template[1024];
+ snprintf(template, sizeof(template) - 1, "%s/stack_test-%d.XXXXXX",
+ tmp ? tmp : "/tmp", linenumber);
+ return template;
+}
+
+static char *get_tmp_dir(int linenumber)
+{
+ char *dir = get_tmp_template(linenumber);
+ cl_assert(mkdtemp(dir) != NULL);
+ return dir;
+}
+
+void test_reftable_stack__read_file(void)
+{
+ char *fn = get_tmp_template(__LINE__);
+ struct tempfile *tmp = mks_tempfile(fn);
+ int fd = get_tempfile_fd(tmp);
+ char out[1024] = "line1\n\nline2\nline3";
+ int n, err;
+ char **names = NULL;
+ const char *want[] = { "line1", "line2", "line3" };
+
+ cl_assert(fd > 0);
+ n = write_in_full(fd, out, strlen(out));
+ cl_assert_equal_i(n, strlen(out));
+ err = close(fd);
+ cl_assert(err >= 0);
+
+ err = read_lines(fn, &names);
+ cl_assert(!err);
+
+ for (size_t i = 0; names[i]; i++)
+ cl_assert_equal_s(want[i], names[i]);
+ free_names(names);
+ (void) remove(fn);
+ delete_tempfile(&tmp);
+}
+
+static int write_test_ref(struct reftable_writer *wr, void *arg)
+{
+ struct reftable_ref_record *ref = arg;
+ cl_assert_equal_i(reftable_writer_set_limits(wr,
+ ref->update_index, ref->update_index), 0);
+ return reftable_writer_add_ref(wr, ref);
+}
+
+static void write_n_ref_tables(struct reftable_stack *st,
+ size_t n)
+{
+ int disable_auto_compact;
+
+ disable_auto_compact = st->opts.disable_auto_compact;
+ st->opts.disable_auto_compact = 1;
+
+ for (size_t i = 0; i < n; i++) {
+ struct reftable_ref_record ref = {
+ .update_index = reftable_stack_next_update_index(st),
+ .value_type = REFTABLE_REF_VAL1,
+ };
+ char buf[128];
+
+ snprintf(buf, sizeof(buf), "refs/heads/branch-%04"PRIuMAX, (uintmax_t)i);
+ ref.refname = buf;
+ cl_reftable_set_hash(ref.value.val1, i, REFTABLE_HASH_SHA1);
+
+ cl_assert_equal_i(reftable_stack_add(st,
+ &write_test_ref, &ref), 0);
+ }
+
+ st->opts.disable_auto_compact = disable_auto_compact;
+}
+
+struct write_log_arg {
+ struct reftable_log_record *log;
+ uint64_t update_index;
+};
+
+static int write_test_log(struct reftable_writer *wr, void *arg)
+{
+ struct write_log_arg *wla = arg;
+
+ cl_assert_equal_i(reftable_writer_set_limits(wr,
+ wla->update_index,
+ wla->update_index), 0);
+ return reftable_writer_add_log(wr, wla->log);
+}
+
+void test_reftable_stack__add_one(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_buf scratch = REFTABLE_BUF_INIT;
+ int mask = umask(002);
+ struct reftable_write_options opts = {
+ .default_permissions = 0660,
+ };
+ struct reftable_stack *st = NULL;
+ struct reftable_ref_record ref = {
+ .refname = (char *) "HEAD",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ struct reftable_ref_record dest = { 0 };
+ struct stat stat_result = { 0 };
+ int err;
+
+ err = reftable_new_stack(&st, dir, &opts);
+ cl_assert(!err);
+
+ err = reftable_stack_add(st, write_test_ref, &ref);
+ cl_assert(!err);
+
+ err = reftable_stack_read_ref(st, ref.refname, &dest);
+ cl_assert(!err);
+ cl_assert(reftable_ref_record_equal(&ref, &dest,
+ REFTABLE_HASH_SIZE_SHA1));
+ cl_assert(st->tables_len > 0);
+
+#ifndef GIT_WINDOWS_NATIVE
+ cl_assert_equal_i(reftable_buf_addstr(&scratch, dir), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&scratch,
+ "/tables.list"), 0);
+ cl_assert_equal_i(stat(scratch.buf, &stat_result), 0);
+ cl_assert_equal_i((stat_result.st_mode & 0777),
+ opts.default_permissions);
+
+ reftable_buf_reset(&scratch);
+ cl_assert_equal_i(reftable_buf_addstr(&scratch, dir), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&scratch, "/"), 0);
+ /* do not try at home; not an external API for reftable. */
+ cl_assert(!reftable_buf_addstr(&scratch, st->tables[0]->name));
+ err = stat(scratch.buf, &stat_result);
+ cl_assert(!err);
+ cl_assert_equal_i((stat_result.st_mode & 0777),
+ opts.default_permissions);
+#else
+ (void) stat_result;
+#endif
+
+ reftable_ref_record_release(&dest);
+ reftable_stack_destroy(st);
+ reftable_buf_release(&scratch);
+ clear_dir(dir);
+ umask(mask);
+}
+
+void test_reftable_stack__uptodate(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st1 = NULL;
+ struct reftable_stack *st2 = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+
+ struct reftable_ref_record ref1 = {
+ .refname = (char *) "HEAD",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ struct reftable_ref_record ref2 = {
+ .refname = (char *) "branch2",
+ .update_index = 2,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+
+
+ /* simulate multi-process access to the same stack
+ by creating two stacks for the same directory.
+ */
+ cl_assert_equal_i(reftable_new_stack(&st1, dir, &opts), 0);
+ cl_assert_equal_i(reftable_new_stack(&st2, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_add(st1, write_test_ref,
+ &ref1), 0);
+ cl_assert_equal_i(reftable_stack_add(st2, write_test_ref,
+ &ref2), REFTABLE_OUTDATED_ERROR);
+ cl_assert_equal_i(reftable_stack_reload(st2), 0);
+ cl_assert_equal_i(reftable_stack_add(st2, write_test_ref,
+ &ref2), 0);
+ reftable_stack_destroy(st1);
+ reftable_stack_destroy(st2);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__transaction_api(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ struct reftable_addition *add = NULL;
+
+ struct reftable_ref_record ref = {
+ .refname = (char *) "HEAD",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ struct reftable_ref_record dest = { 0 };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ reftable_addition_destroy(add);
+
+ cl_assert_equal_i(reftable_stack_new_addition(&add, st, 0), 0);
+ cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
+ &ref), 0);
+ cl_assert_equal_i(reftable_addition_commit(add), 0);
+
+ reftable_addition_destroy(add);
+
+ cl_assert_equal_i(reftable_stack_read_ref(st, ref.refname,
+ &dest), 0);
+ cl_assert_equal_i(REFTABLE_REF_SYMREF, dest.value_type);
+ cl_assert(reftable_ref_record_equal(&ref, &dest,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+
+ reftable_ref_record_release(&dest);
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__transaction_with_reload(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_stack *st1 = NULL, *st2 = NULL;
+ struct reftable_addition *add = NULL;
+ struct reftable_ref_record refs[2] = {
+ {
+ .refname = (char *) "refs/heads/a",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_VAL1,
+ .value.val1 = { '1' },
+ },
+ {
+ .refname = (char *) "refs/heads/b",
+ .update_index = 2,
+ .value_type = REFTABLE_REF_VAL1,
+ .value.val1 = { '1' },
+ },
+ };
+ struct reftable_ref_record ref = { 0 };
+
+ cl_assert_equal_i(reftable_new_stack(&st1, dir, NULL), 0);
+ cl_assert_equal_i(reftable_new_stack(&st2, dir, NULL), 0);
+ cl_assert_equal_i(reftable_stack_new_addition(&add, st1, 0), 0);
+ cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
+ &refs[0]), 0);
+ cl_assert_equal_i(reftable_addition_commit(add), 0);
+ reftable_addition_destroy(add);
+
+ /*
+ * The second stack is now outdated, which we should notice. We do not
+ * create the addition and lock the stack by default, but allow the
+ * reload to happen when REFTABLE_STACK_NEW_ADDITION_RELOAD is set.
+ */
+ cl_assert_equal_i(reftable_stack_new_addition(&add, st2, 0),
+ REFTABLE_OUTDATED_ERROR);
+ cl_assert_equal_i(reftable_stack_new_addition(&add, st2,
+ REFTABLE_STACK_NEW_ADDITION_RELOAD), 0);
+ cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
+ &refs[1]), 0);
+ cl_assert_equal_i(reftable_addition_commit(add), 0);
+ reftable_addition_destroy(add);
+
+ for (size_t i = 0; i < ARRAY_SIZE(refs); i++) {
+ cl_assert_equal_i(reftable_stack_read_ref(st2,
+ refs[i].refname, &ref) , 0);
+ cl_assert(reftable_ref_record_equal(&refs[i], &ref,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ }
+
+ reftable_ref_record_release(&ref);
+ reftable_stack_destroy(st1);
+ reftable_stack_destroy(st2);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__transaction_api_performs_auto_compaction(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = {0};
+ struct reftable_addition *add = NULL;
+ struct reftable_stack *st = NULL;
+ size_t n = 20;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (size_t i = 0; i <= n; i++) {
+ struct reftable_ref_record ref = {
+ .update_index = reftable_stack_next_update_index(st),
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ char name[100];
+
+ snprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
+ ref.refname = name;
+
+ /*
+ * Disable auto-compaction for all but the last runs. Like this
+ * we can ensure that we indeed honor this setting and have
+ * better control over when exactly auto compaction runs.
+ */
+ st->opts.disable_auto_compact = i != n;
+
+ cl_assert_equal_i(reftable_stack_new_addition(&add,
+ st, 0), 0);
+ cl_assert_equal_i(reftable_addition_add(add,
+ write_test_ref, &ref), 0);
+ cl_assert_equal_i(reftable_addition_commit(add), 0);
+
+ reftable_addition_destroy(add);
+
+ /*
+ * The stack length should grow continuously for all runs where
+ * auto compaction is disabled. When enabled, we should merge
+ * all tables in the stack.
+ */
+ if (i != n)
+ cl_assert_equal_i(st->merged->tables_len, i + 1);
+ else
+ cl_assert_equal_i(st->merged->tables_len, 1);
+ }
+
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__auto_compaction_fails_gracefully(void)
+{
+ struct reftable_ref_record ref = {
+ .refname = (char *) "refs/heads/master",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_VAL1,
+ .value.val1 = {0x01},
+ };
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st;
+ struct reftable_buf table_path = REFTABLE_BUF_INIT;
+ char *dir = get_tmp_dir(__LINE__);
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref,
+ &ref), 0);
+ cl_assert_equal_i(st->merged->tables_len, 1);
+ cl_assert_equal_i(st->stats.attempts, 0);
+ cl_assert_equal_i(st->stats.failures, 0);
+
+ /*
+ * Lock the newly written table such that it cannot be compacted.
+ * Adding a new table to the stack should not be impacted by this, even
+ * though auto-compaction will now fail.
+ */
+ cl_assert(!reftable_buf_addstr(&table_path, dir));
+ cl_assert(!reftable_buf_addstr(&table_path, "/"));
+ cl_assert(!reftable_buf_addstr(&table_path,
+ st->tables[0]->name));
+ cl_assert(!reftable_buf_addstr(&table_path, ".lock"));
+ write_file_buf(table_path.buf, "", 0);
+
+ ref.update_index = 2;
+ err = reftable_stack_add(st, write_test_ref, &ref);
+ cl_assert(!err);
+ cl_assert_equal_i(st->merged->tables_len, 2);
+ cl_assert_equal_i(st->stats.attempts, 1);
+ cl_assert_equal_i(st->stats.failures, 1);
+
+ reftable_stack_destroy(st);
+ reftable_buf_release(&table_path);
+ clear_dir(dir);
+}
+
+static int write_error(struct reftable_writer *wr UNUSED, void *arg)
+{
+ return *((int *)arg);
+}
+
+void test_reftable_stack__update_index_check(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ struct reftable_ref_record ref1 = {
+ .refname = (char *) "name1",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ struct reftable_ref_record ref2 = {
+ .refname = (char *) "name2",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref,
+ &ref1), 0);
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref,
+ &ref2), REFTABLE_API_ERROR);
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__lock_failure(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ int i;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ for (i = -1; i != REFTABLE_EMPTY_TABLE_ERROR; i--)
+ cl_assert_equal_i(reftable_stack_add(st, write_error,
+ &i), i);
+
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__add(void)
+{
+ struct reftable_write_options opts = {
+ .exact_log_message = 1,
+ .default_permissions = 0660,
+ .disable_auto_compact = 1,
+ };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_ref_record refs[2] = { 0 };
+ struct reftable_log_record logs[2] = { 0 };
+ struct reftable_buf path = REFTABLE_BUF_INIT;
+ struct stat stat_result;
+ size_t i, N = ARRAY_SIZE(refs);
+ int err = 0;
+
+ err = reftable_new_stack(&st, dir, &opts);
+ cl_assert(!err);
+
+ for (i = 0; i < N; i++) {
+ char buf[256];
+ snprintf(buf, sizeof(buf), "branch%02"PRIuMAX, (uintmax_t)i);
+ refs[i].refname = xstrdup(buf);
+ refs[i].update_index = i + 1;
+ refs[i].value_type = REFTABLE_REF_VAL1;
+ cl_reftable_set_hash(refs[i].value.val1, i,
+ REFTABLE_HASH_SHA1);
+
+ logs[i].refname = xstrdup(buf);
+ logs[i].update_index = N + i + 1;
+ logs[i].value_type = REFTABLE_LOG_UPDATE;
+ logs[i].value.update.email = xstrdup("identity@invalid");
+ cl_reftable_set_hash(logs[i].value.update.new_hash, i,
+ REFTABLE_HASH_SHA1);
+ }
+
+ for (i = 0; i < N; i++)
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref,
+ &refs[i]), 0);
+
+ for (i = 0; i < N; i++) {
+ struct write_log_arg arg = {
+ .log = &logs[i],
+ .update_index = reftable_stack_next_update_index(st),
+ };
+ cl_assert_equal_i(reftable_stack_add(st, write_test_log,
+ &arg), 0);
+ }
+
+ cl_assert_equal_i(reftable_stack_compact_all(st, NULL), 0);
+
+ for (i = 0; i < N; i++) {
+ struct reftable_ref_record dest = { 0 };
+
+ cl_assert_equal_i(reftable_stack_read_ref(st,
+ refs[i].refname, &dest), 0);
+ cl_assert(reftable_ref_record_equal(&dest, refs + i,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ reftable_ref_record_release(&dest);
+ }
+
+ for (i = 0; i < N; i++) {
+ struct reftable_log_record dest = { 0 };
+ cl_assert_equal_i(reftable_stack_read_log(st,
+ refs[i].refname, &dest), 0);
+ cl_assert(reftable_log_record_equal(&dest, logs + i,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ reftable_log_record_release(&dest);
+ }
+
+#ifndef GIT_WINDOWS_NATIVE
+ cl_assert_equal_i(reftable_buf_addstr(&path, dir), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&path, "/tables.list"), 0);
+ cl_assert_equal_i(stat(path.buf, &stat_result), 0);
+ cl_assert_equal_i((stat_result.st_mode & 0777), opts.default_permissions);
+
+ reftable_buf_reset(&path);
+ cl_assert_equal_i(reftable_buf_addstr(&path, dir), 0);
+ cl_assert_equal_i(reftable_buf_addstr(&path, "/"), 0);
+ /* do not try at home; not an external API for reftable. */
+ cl_assert(!reftable_buf_addstr(&path, st->tables[0]->name));
+ err = stat(path.buf, &stat_result);
+ cl_assert(!err);
+ cl_assert_equal_i((stat_result.st_mode & 0777),
+ opts.default_permissions);
+#else
+ (void) stat_result;
+#endif
+
+ /* cleanup */
+ reftable_stack_destroy(st);
+ for (i = 0; i < N; i++) {
+ reftable_ref_record_release(&refs[i]);
+ reftable_log_record_release(&logs[i]);
+ }
+ reftable_buf_release(&path);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__iterator(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_ref_record refs[10] = { 0 };
+ struct reftable_log_record logs[10] = { 0 };
+ struct reftable_iterator it = { 0 };
+ size_t N = ARRAY_SIZE(refs), i;
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (i = 0; i < N; i++) {
+ refs[i].refname = xstrfmt("branch%02"PRIuMAX, (uintmax_t)i);
+ refs[i].update_index = i + 1;
+ refs[i].value_type = REFTABLE_REF_VAL1;
+ cl_reftable_set_hash(refs[i].value.val1, i,
+ REFTABLE_HASH_SHA1);
+
+ logs[i].refname = xstrfmt("branch%02"PRIuMAX, (uintmax_t)i);
+ logs[i].update_index = i + 1;
+ logs[i].value_type = REFTABLE_LOG_UPDATE;
+ logs[i].value.update.email = xstrdup("johndoe@invalid");
+ logs[i].value.update.message = xstrdup("commit\n");
+ cl_reftable_set_hash(logs[i].value.update.new_hash, i,
+ REFTABLE_HASH_SHA1);
+ }
+
+ for (i = 0; i < N; i++)
+ cl_assert_equal_i(reftable_stack_add(st,
+ write_test_ref, &refs[i]), 0);
+
+ for (i = 0; i < N; i++) {
+ struct write_log_arg arg = {
+ .log = &logs[i],
+ .update_index = reftable_stack_next_update_index(st),
+ };
+
+ cl_assert_equal_i(reftable_stack_add(st,
+ write_test_log, &arg), 0);
+ }
+
+ reftable_stack_init_ref_iterator(st, &it);
+ reftable_iterator_seek_ref(&it, refs[0].refname);
+ for (i = 0; ; i++) {
+ struct reftable_ref_record ref = { 0 };
+
+ err = reftable_iterator_next_ref(&it, &ref);
+ if (err > 0)
+ break;
+ cl_assert(!err);
+ cl_assert(reftable_ref_record_equal(&ref, &refs[i],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ reftable_ref_record_release(&ref);
+ }
+ cl_assert_equal_i(i, N);
+
+ reftable_iterator_destroy(&it);
+
+ cl_assert_equal_i(reftable_stack_init_log_iterator(st, &it), 0);
+
+ reftable_iterator_seek_log(&it, logs[0].refname);
+ for (i = 0; ; i++) {
+ struct reftable_log_record log = { 0 };
+
+ err = reftable_iterator_next_log(&it, &log);
+ if (err > 0)
+ break;
+ cl_assert(!err);
+ cl_assert(reftable_log_record_equal(&log, &logs[i],
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ reftable_log_record_release(&log);
+ }
+ cl_assert_equal_i(i, N);
+
+ reftable_stack_destroy(st);
+ reftable_iterator_destroy(&it);
+ for (i = 0; i < N; i++) {
+ reftable_ref_record_release(&refs[i]);
+ reftable_log_record_release(&logs[i]);
+ }
+ clear_dir(dir);
+}
+
+void test_reftable_stack__log_normalize(void)
+{
+ struct reftable_write_options opts = {
+ 0,
+ };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_log_record input = {
+ .refname = (char *) "branch",
+ .update_index = 1,
+ .value_type = REFTABLE_LOG_UPDATE,
+ .value = {
+ .update = {
+ .new_hash = { 1 },
+ .old_hash = { 2 },
+ },
+ },
+ };
+ struct reftable_log_record dest = {
+ .update_index = 0,
+ };
+ struct write_log_arg arg = {
+ .log = &input,
+ .update_index = 1,
+ };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ input.value.update.message = (char *) "one\ntwo";
+ cl_assert_equal_i(reftable_stack_add(st, write_test_log,
+ &arg), REFTABLE_API_ERROR);
+
+ input.value.update.message = (char *) "one";
+ cl_assert_equal_i(reftable_stack_add(st, write_test_log,
+ &arg), 0);
+ cl_assert_equal_i(reftable_stack_read_log(st, input.refname,
+ &dest), 0);
+ cl_assert_equal_s(dest.value.update.message, "one\n");
+
+ input.value.update.message = (char *) "two\n";
+ arg.update_index = 2;
+ cl_assert_equal_i(reftable_stack_add(st, write_test_log,
+ &arg), 0);
+ cl_assert_equal_i(reftable_stack_read_log(st, input.refname,
+ &dest), 0);
+ cl_assert_equal_s(dest.value.update.message, "two\n");
+
+ /* cleanup */
+ reftable_stack_destroy(st);
+ reftable_log_record_release(&dest);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__tombstone(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ struct reftable_ref_record refs[2] = { 0 };
+ struct reftable_log_record logs[2] = { 0 };
+ size_t i, N = ARRAY_SIZE(refs);
+ struct reftable_ref_record dest = { 0 };
+ struct reftable_log_record log_dest = { 0 };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ /* even entries add the refs, odd entries delete them. */
+ for (i = 0; i < N; i++) {
+ const char *buf = "branch";
+ refs[i].refname = xstrdup(buf);
+ refs[i].update_index = i + 1;
+ if (i % 2 == 0) {
+ refs[i].value_type = REFTABLE_REF_VAL1;
+ cl_reftable_set_hash(refs[i].value.val1, i,
+ REFTABLE_HASH_SHA1);
+ }
+
+ logs[i].refname = xstrdup(buf);
+ /*
+ * update_index is part of the key so should be constant.
+ * The value itself should be less than the writer's upper
+ * limit.
+ */
+ logs[i].update_index = 1;
+ if (i % 2 == 0) {
+ logs[i].value_type = REFTABLE_LOG_UPDATE;
+ cl_reftable_set_hash(logs[i].value.update.new_hash, i, REFTABLE_HASH_SHA1);
+ logs[i].value.update.email =
+ xstrdup("identity@invalid");
+ }
+ }
+ for (i = 0; i < N; i++)
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref, &refs[i]), 0);
+
+ for (i = 0; i < N; i++) {
+ struct write_log_arg arg = {
+ .log = &logs[i],
+ .update_index = reftable_stack_next_update_index(st),
+ };
+ cl_assert_equal_i(reftable_stack_add(st,
+ write_test_log, &arg), 0);
+ }
+
+ cl_assert_equal_i(reftable_stack_read_ref(st, "branch",
+ &dest), 1);
+ reftable_ref_record_release(&dest);
+
+ cl_assert_equal_i(reftable_stack_read_log(st, "branch",
+ &log_dest), 1);
+ reftable_log_record_release(&log_dest);
+
+ cl_assert_equal_i(reftable_stack_compact_all(st, NULL), 0);
+ cl_assert_equal_i(reftable_stack_read_ref(st, "branch",
+ &dest), 1);
+ cl_assert_equal_i(reftable_stack_read_log(st, "branch",
+ &log_dest), 1);
+ reftable_ref_record_release(&dest);
+ reftable_log_record_release(&log_dest);
+
+ /* cleanup */
+ reftable_stack_destroy(st);
+ for (i = 0; i < N; i++) {
+ reftable_ref_record_release(&refs[i]);
+ reftable_log_record_release(&logs[i]);
+ }
+ clear_dir(dir);
+}
+
+void test_reftable_stack__hash_id(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+
+ struct reftable_ref_record ref = {
+ .refname = (char *) "master",
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "target",
+ .update_index = 1,
+ };
+ struct reftable_write_options opts32 = { .hash_id = REFTABLE_HASH_SHA256 };
+ struct reftable_stack *st32 = NULL;
+ struct reftable_write_options opts_default = { 0 };
+ struct reftable_stack *st_default = NULL;
+ struct reftable_ref_record dest = { 0 };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_add(st, write_test_ref,
+ &ref), 0);
+
+ /* can't read it with the wrong hash ID. */
+ cl_assert_equal_i(reftable_new_stack(&st32, dir,
+ &opts32), REFTABLE_FORMAT_ERROR);
+
+ /* check that we can read it back with default opts too. */
+ cl_assert_equal_i(reftable_new_stack(&st_default, dir,
+ &opts_default), 0);
+ cl_assert_equal_i(reftable_stack_read_ref(st_default, "master",
+ &dest), 0);
+ cl_assert(reftable_ref_record_equal(&ref, &dest,
+ REFTABLE_HASH_SIZE_SHA1) != 0);
+ reftable_ref_record_release(&dest);
+ reftable_stack_destroy(st);
+ reftable_stack_destroy(st_default);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__suggest_compaction_segment(void)
+{
+ uint64_t sizes[] = { 512, 64, 17, 16, 9, 9, 9, 16, 2, 16 };
+ struct segment min =
+ suggest_compaction_segment(sizes, ARRAY_SIZE(sizes), 2);
+ cl_assert_equal_i(min.start, 1);
+ cl_assert_equal_i(min.end, 10);
+}
+
+void test_reftable_stack__suggest_compaction_segment_nothing(void)
+{
+ uint64_t sizes[] = { 64, 32, 16, 8, 4, 2 };
+ struct segment result =
+ suggest_compaction_segment(sizes, ARRAY_SIZE(sizes), 2);
+ cl_assert_equal_i(result.start, result.end);
+}
+
+void test_reftable_stack__reflog_expire(void)
+{
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ struct reftable_log_record logs[20] = { 0 };
+ size_t i, N = ARRAY_SIZE(logs) - 1;
+ struct reftable_log_expiry_config expiry = {
+ .time = 10,
+ };
+ struct reftable_log_record log = { 0 };
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (i = 1; i <= N; i++) {
+ char buf[256];
+ snprintf(buf, sizeof(buf), "branch%02"PRIuMAX, (uintmax_t)i);
+
+ logs[i].refname = xstrdup(buf);
+ logs[i].update_index = i;
+ logs[i].value_type = REFTABLE_LOG_UPDATE;
+ logs[i].value.update.time = i;
+ logs[i].value.update.email = xstrdup("identity@invalid");
+ cl_reftable_set_hash(logs[i].value.update.new_hash, i,
+ REFTABLE_HASH_SHA1);
+ }
+
+ for (i = 1; i <= N; i++) {
+ struct write_log_arg arg = {
+ .log = &logs[i],
+ .update_index = reftable_stack_next_update_index(st),
+ };
+ cl_assert_equal_i(reftable_stack_add(st, write_test_log,
+ &arg), 0);
+ }
+
+ cl_assert_equal_i(reftable_stack_compact_all(st, NULL), 0);
+ cl_assert_equal_i(reftable_stack_compact_all(st, &expiry), 0);
+ cl_assert_equal_i(reftable_stack_read_log(st, logs[9].refname,
+ &log), 1);
+ cl_assert_equal_i(reftable_stack_read_log(st, logs[11].refname,
+ &log), 0);
+
+ expiry.min_update_index = 15;
+ cl_assert_equal_i(reftable_stack_compact_all(st, &expiry), 0);
+ cl_assert_equal_i(reftable_stack_read_log(st, logs[14].refname,
+ &log), 1);
+ cl_assert_equal_i(reftable_stack_read_log(st, logs[16].refname,
+ &log), 0);
+
+ /* cleanup */
+ reftable_stack_destroy(st);
+ for (i = 0; i <= N; i++)
+ reftable_log_record_release(&logs[i]);
+ clear_dir(dir);
+ reftable_log_record_release(&log);
+}
+
+static int write_nothing(struct reftable_writer *wr, void *arg UNUSED)
+{
+ cl_assert_equal_i(reftable_writer_set_limits(wr, 1, 1), 0);
+ return 0;
+}
+
+void test_reftable_stack__empty_add(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_stack *st2 = NULL;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_add(st, write_nothing,
+ NULL), 0);
+ cl_assert_equal_i(reftable_new_stack(&st2, dir, &opts), 0);
+ clear_dir(dir);
+ reftable_stack_destroy(st);
+ reftable_stack_destroy(st2);
+}
+
+static int fastlogN(uint64_t sz, uint64_t N)
+{
+ int l = 0;
+ if (sz == 0)
+ return 0;
+ for (; sz; sz /= N)
+ l++;
+ return l - 1;
+}
+
+void test_reftable_stack__auto_compaction(void)
+{
+ struct reftable_write_options opts = {
+ .disable_auto_compact = 1,
+ };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ size_t i, N = 100;
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (i = 0; i < N; i++) {
+ char name[100];
+ struct reftable_ref_record ref = {
+ .refname = name,
+ .update_index = reftable_stack_next_update_index(st),
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ snprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
+
+ err = reftable_stack_add(st, write_test_ref, &ref);
+ cl_assert(!err);
+
+ err = reftable_stack_auto_compact(st);
+ cl_assert(!err);
+ cl_assert(i < 2 || st->merged->tables_len < 2 * fastlogN(i, 2));
+ }
+
+ cl_assert(reftable_stack_compaction_stats(st)->entries_written <
+ (uint64_t)(N * fastlogN(N, 2)));
+
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__auto_compaction_factor(void)
+{
+ struct reftable_write_options opts = {
+ .auto_compaction_factor = 5,
+ };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ size_t N = 100;
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (size_t i = 0; i < N; i++) {
+ char name[20];
+ struct reftable_ref_record ref = {
+ .refname = name,
+ .update_index = reftable_stack_next_update_index(st),
+ .value_type = REFTABLE_REF_VAL1,
+ };
+ xsnprintf(name, sizeof(name), "branch%04"PRIuMAX, (uintmax_t)i);
+
+ err = reftable_stack_add(st, &write_test_ref, &ref);
+ cl_assert(!err);
+
+ cl_assert(i < 5 || st->merged->tables_len < 5 * fastlogN(i, 5));
+ }
+
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__auto_compaction_with_locked_tables(void)
+{
+ struct reftable_write_options opts = {
+ .disable_auto_compact = 1,
+ };
+ struct reftable_stack *st = NULL;
+ struct reftable_buf buf = REFTABLE_BUF_INIT;
+ char *dir = get_tmp_dir(__LINE__);
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ write_n_ref_tables(st, 5);
+ cl_assert_equal_i(st->merged->tables_len, 5);
+
+ /*
+ * Given that all tables we have written should be roughly the same
+ * size, we expect that auto-compaction will want to compact all of the
+ * tables. Locking any of the tables will keep it from doing so.
+ */
+ cl_assert(!reftable_buf_addstr(&buf, dir));
+ cl_assert(!reftable_buf_addstr(&buf, "/"));
+ cl_assert(!reftable_buf_addstr(&buf, st->tables[2]->name));
+ cl_assert(!reftable_buf_addstr(&buf, ".lock"));
+ write_file_buf(buf.buf, "", 0);
+
+ /*
+ * When parts of the stack are locked, then auto-compaction does a best
+ * effort compaction of those tables which aren't locked. So while this
+ * would in theory compact all tables, due to the preexisting lock we
+ * only compact the newest two tables.
+ */
+ err = reftable_stack_auto_compact(st);
+ cl_assert(!err);
+ cl_assert_equal_i(st->stats.failures, 0);
+ cl_assert_equal_i(st->merged->tables_len, 4);
+
+ reftable_stack_destroy(st);
+ reftable_buf_release(&buf);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__add_performs_auto_compaction(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ size_t i, n = 20;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ for (i = 0; i <= n; i++) {
+ struct reftable_ref_record ref = {
+ .update_index = reftable_stack_next_update_index(st),
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ char buf[128];
+
+ /*
+ * Disable auto-compaction for all but the last runs. Like this
+ * we can ensure that we indeed honor this setting and have
+ * better control over when exactly auto compaction runs.
+ */
+ st->opts.disable_auto_compact = i != n;
+
+ snprintf(buf, sizeof(buf), "branch-%04"PRIuMAX, (uintmax_t)i);
+ ref.refname = buf;
+
+ cl_assert_equal_i(reftable_stack_add(st,
+ write_test_ref, &ref), 0);
+
+ /*
+ * The stack length should grow continuously for all runs where
+ * auto compaction is disabled. When enabled, we should merge
+ * all tables in the stack.
+ */
+ if (i != n)
+ cl_assert_equal_i(st->merged->tables_len, i + 1);
+ else
+ cl_assert_equal_i(st->merged->tables_len, 1);
+ }
+
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__compaction_with_locked_tables(void)
+{
+ struct reftable_write_options opts = {
+ .disable_auto_compact = 1,
+ };
+ struct reftable_stack *st = NULL;
+ struct reftable_buf buf = REFTABLE_BUF_INIT;
+ char *dir = get_tmp_dir(__LINE__);
+ int err;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ write_n_ref_tables(st, 3);
+ cl_assert_equal_i(st->merged->tables_len, 3);
+
+ /* Lock one of the tables that we're about to compact. */
+ cl_assert(!reftable_buf_addstr(&buf, dir));
+ cl_assert(!reftable_buf_addstr(&buf, "/"));
+ cl_assert(!reftable_buf_addstr(&buf, st->tables[1]->name));
+ cl_assert(!reftable_buf_addstr(&buf, ".lock"));
+ write_file_buf(buf.buf, "", 0);
+
+ /*
+ * Compaction is expected to fail given that we were not able to
+ * compact all tables.
+ */
+ err = reftable_stack_compact_all(st, NULL);
+ cl_assert_equal_i(err, REFTABLE_LOCK_ERROR);
+ cl_assert_equal_i(st->stats.failures, 1);
+ cl_assert_equal_i(st->merged->tables_len, 3);
+
+ reftable_stack_destroy(st);
+ reftable_buf_release(&buf);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__compaction_concurrent(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st1 = NULL, *st2 = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+
+ cl_assert_equal_i(reftable_new_stack(&st1, dir, &opts), 0);
+ write_n_ref_tables(st1, 3);
+
+ cl_assert_equal_i(reftable_new_stack(&st2, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_compact_all(st1, NULL), 0);
+
+ reftable_stack_destroy(st1);
+ reftable_stack_destroy(st2);
+
+ cl_assert_equal_i(count_dir_entries(dir), 2);
+ clear_dir(dir);
+}
+
+static void unclean_stack_close(struct reftable_stack *st)
+{
+ /* break abstraction boundary to simulate unclean shutdown. */
+ for (size_t i = 0; i < st->tables_len; i++)
+ reftable_table_decref(st->tables[i]);
+ st->tables_len = 0;
+ REFTABLE_FREE_AND_NULL(st->tables);
+}
+
+void test_reftable_stack__compaction_concurrent_clean(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st1 = NULL, *st2 = NULL, *st3 = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+
+ cl_assert_equal_i(reftable_new_stack(&st1, dir, &opts), 0);
+ write_n_ref_tables(st1, 3);
+
+ cl_assert_equal_i(reftable_new_stack(&st2, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_compact_all(st1, NULL), 0);
+
+ unclean_stack_close(st1);
+ unclean_stack_close(st2);
+
+ cl_assert_equal_i(reftable_new_stack(&st3, dir, &opts), 0);
+ cl_assert_equal_i(reftable_stack_clean(st3), 0);
+ cl_assert_equal_i(count_dir_entries(dir), 2);
+
+ reftable_stack_destroy(st1);
+ reftable_stack_destroy(st2);
+ reftable_stack_destroy(st3);
+
+ clear_dir(dir);
+}
+
+void test_reftable_stack__read_across_reload(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st1 = NULL, *st2 = NULL;
+ struct reftable_ref_record rec = { 0 };
+ struct reftable_iterator it = { 0 };
+ char *dir = get_tmp_dir(__LINE__);
+ int err;
+
+ /* Create a first stack and set up an iterator for it. */
+ cl_assert_equal_i(reftable_new_stack(&st1, dir, &opts), 0);
+ write_n_ref_tables(st1, 2);
+ cl_assert_equal_i(st1->merged->tables_len, 2);
+ reftable_stack_init_ref_iterator(st1, &it);
+ cl_assert_equal_i(reftable_iterator_seek_ref(&it, ""), 0);
+
+ /* Set up a second stack for the same directory and compact it. */
+ err = reftable_new_stack(&st2, dir, &opts);
+ cl_assert(!err);
+ cl_assert_equal_i(st2->merged->tables_len, 2);
+ err = reftable_stack_compact_all(st2, NULL);
+ cl_assert(!err);
+ cl_assert_equal_i(st2->merged->tables_len, 1);
+
+ /*
+ * Verify that we can continue to use the old iterator even after we
+ * have reloaded its stack.
+ */
+ err = reftable_stack_reload(st1);
+ cl_assert(!err);
+ cl_assert_equal_i(st1->merged->tables_len, 1);
+ err = reftable_iterator_next_ref(&it, &rec);
+ cl_assert(!err);
+ cl_assert_equal_s(rec.refname, "refs/heads/branch-0000");
+ err = reftable_iterator_next_ref(&it, &rec);
+ cl_assert(!err);
+ cl_assert_equal_s(rec.refname, "refs/heads/branch-0001");
+ err = reftable_iterator_next_ref(&it, &rec);
+ cl_assert(err > 0);
+
+ reftable_ref_record_release(&rec);
+ reftable_iterator_destroy(&it);
+ reftable_stack_destroy(st1);
+ reftable_stack_destroy(st2);
+ clear_dir(dir);
+}
+
+void test_reftable_stack__reload_with_missing_table(void)
+{
+ struct reftable_write_options opts = { 0 };
+ struct reftable_stack *st = NULL;
+ struct reftable_ref_record rec = { 0 };
+ struct reftable_iterator it = { 0 };
+ struct reftable_buf table_path = REFTABLE_BUF_INIT, content = REFTABLE_BUF_INIT;
+ char *dir = get_tmp_dir(__LINE__);
+ int err;
+
+ /* Create a first stack and set up an iterator for it. */
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+ write_n_ref_tables(st, 2);
+ cl_assert_equal_i(st->merged->tables_len, 2);
+ reftable_stack_init_ref_iterator(st, &it);
+ cl_assert_equal_i(reftable_iterator_seek_ref(&it, ""), 0);
+
+ /*
+ * Update the tables.list file with some garbage data, while reusing
+ * our old tables. This should trigger a partial reload of the stack,
+ * where we try to reuse our old tables.
+ */
+ cl_assert(!reftable_buf_addstr(&content, st->tables[0]->name));
+ cl_assert(!reftable_buf_addstr(&content, "\n"));
+ cl_assert(!reftable_buf_addstr(&content, st->tables[1]->name));
+ cl_assert(!reftable_buf_addstr(&content, "\n"));
+ cl_assert(!reftable_buf_addstr(&content, "garbage\n"));
+ cl_assert(!reftable_buf_addstr(&table_path, st->list_file));
+ cl_assert(!reftable_buf_addstr(&table_path, ".lock"));
+ write_file_buf(table_path.buf, content.buf, content.len);
+ cl_assert_equal_i(rename(table_path.buf, st->list_file), 0);
+
+ err = reftable_stack_reload(st);
+ cl_assert_equal_i(err, -4);
+ cl_assert_equal_i(st->merged->tables_len, 2);
+
+ /*
+ * Even though the reload has failed, we should be able to continue
+ * using the iterator.
+ */
+ cl_assert_equal_i(reftable_iterator_next_ref(&it, &rec), 0);
+ cl_assert_equal_s(rec.refname, "refs/heads/branch-0000");
+ cl_assert_equal_i(reftable_iterator_next_ref(&it, &rec), 0);
+ cl_assert_equal_s(rec.refname, "refs/heads/branch-0001");
+ cl_assert(reftable_iterator_next_ref(&it, &rec) > 0);
+
+ reftable_ref_record_release(&rec);
+ reftable_iterator_destroy(&it);
+ reftable_stack_destroy(st);
+ reftable_buf_release(&table_path);
+ reftable_buf_release(&content);
+ clear_dir(dir);
+}
+
+static int write_limits_after_ref(struct reftable_writer *wr, void *arg)
+{
+ struct reftable_ref_record *ref = arg;
+ cl_assert_equal_i(reftable_writer_set_limits(wr,
+ ref->update_index, ref->update_index), 0);
+ cl_assert_equal_i(reftable_writer_add_ref(wr, ref), 0);
+ return reftable_writer_set_limits(wr, ref->update_index, ref->update_index);
+}
+
+void test_reftable_stack__invalid_limit_updates(void)
+{
+ struct reftable_ref_record ref = {
+ .refname = (char *) "HEAD",
+ .update_index = 1,
+ .value_type = REFTABLE_REF_SYMREF,
+ .value.symref = (char *) "master",
+ };
+ struct reftable_write_options opts = {
+ .default_permissions = 0660,
+ };
+ struct reftable_addition *add = NULL;
+ char *dir = get_tmp_dir(__LINE__);
+ struct reftable_stack *st = NULL;
+
+ cl_assert_equal_i(reftable_new_stack(&st, dir, &opts), 0);
+
+ reftable_addition_destroy(add);
+
+ cl_assert_equal_i(reftable_stack_new_addition(&add, st, 0), 0);
+
+ /*
+ * write_limits_after_ref also updates the update indexes after adding
+ * the record. This should cause an err to be returned, since the limits
+ * must be set at the start.
+ */
+ cl_assert_equal_i(reftable_addition_add(add,
+ write_limits_after_ref, &ref), REFTABLE_API_ERROR);
+
+ reftable_addition_destroy(add);
+ reftable_stack_destroy(st);
+ clear_dir(dir);
+}
diff --git a/t/unit-tests/t-reftable-table.c b/t/unit-tests/u-reftable-table.c
similarity index 76%
rename from t/unit-tests/t-reftable-table.c
rename to t/unit-tests/u-reftable-table.c
index 7e1eb53..14fae8b 100644
--- a/t/unit-tests/t-reftable-table.c
+++ b/t/unit-tests/u-reftable-table.c
@@ -1,4 +1,4 @@
-#include "test-lib.h"
+#include "unit-test.h"
#include "lib-reftable.h"
#include "reftable/blocksource.h"
#include "reftable/constants.h"
@@ -6,7 +6,7 @@
#include "reftable/table.h"
#include "strbuf.h"
-static int t_table_seek_once(void)
+void test_reftable_table__seek_once(void)
{
struct reftable_ref_record records[] = {
{
@@ -22,32 +22,32 @@ static int t_table_seek_once(void)
struct reftable_buf buf = REFTABLE_BUF_INIT;
int ret;
- t_reftable_write_to_buf(&buf, records, ARRAY_SIZE(records), NULL, 0, NULL);
+ cl_reftable_write_to_buf(&buf, records, ARRAY_SIZE(records), NULL, 0, NULL);
block_source_from_buf(&source, &buf);
ret = reftable_table_new(&table, &source, "name");
- check(!ret);
+ cl_assert(!ret);
reftable_table_init_ref_iterator(table, &it);
ret = reftable_iterator_seek_ref(&it, "");
- check(!ret);
+ cl_assert(!ret);
ret = reftable_iterator_next_ref(&it, &ref);
- check(!ret);
+ cl_assert(!ret);
- ret = reftable_ref_record_equal(&ref, &records[0], REFTABLE_HASH_SIZE_SHA1);
- check_int(ret, ==, 1);
+ ret = reftable_ref_record_equal(&ref, &records[0],
+ REFTABLE_HASH_SIZE_SHA1);
+ cl_assert_equal_i(ret, 1);
ret = reftable_iterator_next_ref(&it, &ref);
- check_int(ret, ==, 1);
+ cl_assert_equal_i(ret, 1);
reftable_ref_record_release(&ref);
reftable_iterator_destroy(&it);
reftable_table_decref(table);
reftable_buf_release(&buf);
- return 0;
}
-static int t_table_reseek(void)
+void test_reftable_table__reseek(void)
{
struct reftable_ref_record records[] = {
{
@@ -63,35 +63,35 @@ static int t_table_reseek(void)
struct reftable_buf buf = REFTABLE_BUF_INIT;
int ret;
- t_reftable_write_to_buf(&buf, records, ARRAY_SIZE(records), NULL, 0, NULL);
+ cl_reftable_write_to_buf(&buf, records, ARRAY_SIZE(records),
+ NULL, 0, NULL);
block_source_from_buf(&source, &buf);
ret = reftable_table_new(&table, &source, "name");
- check(!ret);
+ cl_assert(!ret);
reftable_table_init_ref_iterator(table, &it);
for (size_t i = 0; i < 5; i++) {
ret = reftable_iterator_seek_ref(&it, "");
- check(!ret);
+ cl_assert(!ret);
ret = reftable_iterator_next_ref(&it, &ref);
- check(!ret);
+ cl_assert(!ret);
ret = reftable_ref_record_equal(&ref, &records[0], REFTABLE_HASH_SIZE_SHA1);
- check_int(ret, ==, 1);
+ cl_assert_equal_i(ret, 1);
ret = reftable_iterator_next_ref(&it, &ref);
- check_int(ret, ==, 1);
+ cl_assert_equal_i(ret, 1);
}
reftable_ref_record_release(&ref);
reftable_iterator_destroy(&it);
reftable_table_decref(table);
reftable_buf_release(&buf);
- return 0;
}
-static int t_table_block_iterator(void)
+void test_reftable_table__block_iterator(void)
{
struct reftable_block_source source = { 0 };
struct reftable_table_iterator it = { 0 };
@@ -147,14 +147,14 @@ static int t_table_block_iterator(void)
(uintmax_t) i);
}
- t_reftable_write_to_buf(&buf, records, nrecords, NULL, 0, NULL);
+ cl_reftable_write_to_buf(&buf, records, nrecords, NULL, 0, NULL);
block_source_from_buf(&source, &buf);
ret = reftable_table_new(&table, &source, "name");
- check(!ret);
+ cl_assert(!ret);
ret = reftable_table_iterator_init(&it, table);
- check(!ret);
+ cl_assert(!ret);
for (size_t i = 0; i < ARRAY_SIZE(expected_blocks); i++) {
struct reftable_iterator record_it = { 0 };
@@ -163,22 +163,26 @@ static int t_table_block_iterator(void)
};
ret = reftable_table_iterator_next(&it, &block);
- check(!ret);
+ cl_assert(!ret);
- check_int(block->block_type, ==, expected_blocks[i].block_type);
- check_int(block->header_off, ==, expected_blocks[i].header_off);
- check_int(block->restart_count, ==, expected_blocks[i].restart_count);
+ cl_assert_equal_i(block->block_type,
+ expected_blocks[i].block_type);
+ cl_assert_equal_i(block->header_off,
+ expected_blocks[i].header_off);
+ cl_assert_equal_i(block->restart_count,
+ expected_blocks[i].restart_count);
ret = reftable_block_init_iterator(block, &record_it);
- check(!ret);
+ cl_assert(!ret);
for (size_t j = 0; ; j++) {
ret = iterator_next(&record_it, &record);
if (ret > 0) {
- check_int(j, ==, expected_blocks[i].record_count);
+ cl_assert_equal_i(j,
+ expected_blocks[i].record_count);
break;
}
- check(!ret);
+ cl_assert(!ret);
}
reftable_iterator_destroy(&record_it);
@@ -186,7 +190,7 @@ static int t_table_block_iterator(void)
}
ret = reftable_table_iterator_next(&it, &block);
- check_int(ret, ==, 1);
+ cl_assert_equal_i(ret, 1);
for (size_t i = 0; i < nrecords; i++)
reftable_free(records[i].refname);
@@ -194,13 +198,4 @@ static int t_table_block_iterator(void)
reftable_table_decref(table);
reftable_buf_release(&buf);
reftable_free(records);
- return 0;
-}
-
-int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
-{
- TEST(t_table_seek_once(), "table can seek once");
- TEST(t_table_reseek(), "table can reseek multiple times");
- TEST(t_table_block_iterator(), "table can iterate through blocks");
- return test_done();
}
diff --git a/t/unit-tests/u-string-list.c b/t/unit-tests/u-string-list.c
new file mode 100644
index 0000000..d4ba5f9
--- /dev/null
+++ b/t/unit-tests/u-string-list.c
@@ -0,0 +1,227 @@
+#include "unit-test.h"
+#include "string-list.h"
+
+static void t_vcreate_string_list_dup(struct string_list *list,
+ int free_util, va_list ap)
+{
+ const char *arg;
+
+ cl_assert(list->strdup_strings);
+
+ string_list_clear(list, free_util);
+ while ((arg = va_arg(ap, const char *)))
+ string_list_append(list, arg);
+}
+
+static void t_create_string_list_dup(struct string_list *list, int free_util, ...)
+{
+ va_list ap;
+
+ cl_assert(list->strdup_strings);
+
+ string_list_clear(list, free_util);
+ va_start(ap, free_util);
+ t_vcreate_string_list_dup(list, free_util, ap);
+ va_end(ap);
+}
+
+static void t_string_list_clear(struct string_list *list, int free_util)
+{
+ string_list_clear(list, free_util);
+ cl_assert_equal_p(list->items, NULL);
+ cl_assert_equal_i(list->nr, 0);
+ cl_assert_equal_i(list->alloc, 0);
+}
+
+static void t_string_list_equal(struct string_list *list,
+ struct string_list *expected_strings)
+{
+ cl_assert_equal_i(list->nr, expected_strings->nr);
+ cl_assert(list->nr <= list->alloc);
+ for (size_t i = 0; i < expected_strings->nr; i++)
+ cl_assert_equal_s(list->items[i].string,
+ expected_strings->items[i].string);
+}
+
+static void t_string_list_split(const char *data, int delim, int maxsplit, ...)
+{
+ struct string_list expected_strings = STRING_LIST_INIT_DUP;
+ struct string_list list = STRING_LIST_INIT_DUP;
+ va_list ap;
+ int len;
+
+ va_start(ap, maxsplit);
+ t_vcreate_string_list_dup(&expected_strings, 0, ap);
+ va_end(ap);
+
+ string_list_clear(&list, 0);
+ len = string_list_split(&list, data, delim, maxsplit);
+ cl_assert_equal_i(len, expected_strings.nr);
+ t_string_list_equal(&list, &expected_strings);
+
+ string_list_clear(&expected_strings, 0);
+ string_list_clear(&list, 0);
+}
+
+void test_string_list__split(void)
+{
+ t_string_list_split("foo:bar:baz", ':', -1, "foo", "bar", "baz", NULL);
+ t_string_list_split("foo:bar:baz", ':', 0, "foo:bar:baz", NULL);
+ t_string_list_split("foo:bar:baz", ':', 1, "foo", "bar:baz", NULL);
+ t_string_list_split("foo:bar:baz", ':', 2, "foo", "bar", "baz", NULL);
+ t_string_list_split("foo:bar:", ':', -1, "foo", "bar", "", NULL);
+ t_string_list_split("", ':', -1, "", NULL);
+ t_string_list_split(":", ':', -1, "", "", NULL);
+}
+
+static void t_string_list_split_in_place(const char *data, const char *delim,
+ int maxsplit, ...)
+{
+ struct string_list expected_strings = STRING_LIST_INIT_DUP;
+ struct string_list list = STRING_LIST_INIT_NODUP;
+ char *string = xstrdup(data);
+ va_list ap;
+ int len;
+
+ va_start(ap, maxsplit);
+ t_vcreate_string_list_dup(&expected_strings, 0, ap);
+ va_end(ap);
+
+ string_list_clear(&list, 0);
+ len = string_list_split_in_place(&list, string, delim, maxsplit);
+ cl_assert_equal_i(len, expected_strings.nr);
+ t_string_list_equal(&list, &expected_strings);
+
+ free(string);
+ string_list_clear(&expected_strings, 0);
+ string_list_clear(&list, 0);
+}
+
+void test_string_list__split_in_place(void)
+{
+ t_string_list_split_in_place("foo:;:bar:;:baz:;:", ":;", -1,
+ "foo", "", "", "bar", "", "", "baz", "", "", "", NULL);
+ t_string_list_split_in_place("foo:;:bar:;:baz", ":;", 0,
+ "foo:;:bar:;:baz", NULL);
+ t_string_list_split_in_place("foo:;:bar:;:baz", ":;", 1,
+ "foo", ";:bar:;:baz", NULL);
+ t_string_list_split_in_place("foo:;:bar:;:baz", ":;", 2,
+ "foo", "", ":bar:;:baz", NULL);
+ t_string_list_split_in_place("foo:;:bar:;:", ":;", -1,
+ "foo", "", "", "bar", "", "", "", NULL);
+}
+
+static int prefix_cb(struct string_list_item *item, void *cb_data)
+{
+ const char *prefix = (const char *)cb_data;
+ return starts_with(item->string, prefix);
+}
+
+static void t_string_list_filter(struct string_list *list, ...)
+{
+ struct string_list expected_strings = STRING_LIST_INIT_DUP;
+ const char *prefix = "y";
+ va_list ap;
+
+ va_start(ap, list);
+ t_vcreate_string_list_dup(&expected_strings, 0, ap);
+ va_end(ap);
+
+ filter_string_list(list, 0, prefix_cb, (void *)prefix);
+ t_string_list_equal(list, &expected_strings);
+
+ string_list_clear(&expected_strings, 0);
+}
+
+void test_string_list__filter(void)
+{
+ struct string_list list = STRING_LIST_INIT_DUP;
+
+ t_create_string_list_dup(&list, 0, NULL);
+ t_string_list_filter(&list, NULL);
+
+ t_create_string_list_dup(&list, 0, "no", NULL);
+ t_string_list_filter(&list, NULL);
+
+ t_create_string_list_dup(&list, 0, "yes", NULL);
+ t_string_list_filter(&list, "yes", NULL);
+
+ t_create_string_list_dup(&list, 0, "no", "yes", NULL);
+ t_string_list_filter(&list, "yes", NULL);
+
+ t_create_string_list_dup(&list, 0, "yes", "no", NULL);
+ t_string_list_filter(&list, "yes", NULL);
+
+ t_create_string_list_dup(&list, 0, "y1", "y2", NULL);
+ t_string_list_filter(&list, "y1", "y2", NULL);
+
+ t_create_string_list_dup(&list, 0, "y2", "y1", NULL);
+ t_string_list_filter(&list, "y2", "y1", NULL);
+
+ t_create_string_list_dup(&list, 0, "x1", "x2", NULL);
+ t_string_list_filter(&list, NULL);
+
+ t_string_list_clear(&list, 0);
+}
+
+static void t_string_list_remove_duplicates(struct string_list *list, ...)
+{
+ struct string_list expected_strings = STRING_LIST_INIT_DUP;
+ va_list ap;
+
+ va_start(ap, list);
+ t_vcreate_string_list_dup(&expected_strings, 0, ap);
+ va_end(ap);
+
+ string_list_remove_duplicates(list, 0);
+ t_string_list_equal(list, &expected_strings);
+
+ string_list_clear(&expected_strings, 0);
+}
+
+void test_string_list__remove_duplicates(void)
+{
+ struct string_list list = STRING_LIST_INIT_DUP;
+
+ t_create_string_list_dup(&list, 0, NULL);
+ t_string_list_remove_duplicates(&list, NULL);
+
+ t_create_string_list_dup(&list, 0, "", NULL);
+ t_string_list_remove_duplicates(&list, "", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", NULL);
+ t_string_list_remove_duplicates(&list, "a", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", NULL);
+ t_string_list_remove_duplicates(&list, "a", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", "a", NULL);
+ t_string_list_remove_duplicates(&list, "a", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", "b", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "b", "b", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "b", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", "b", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "b", "b", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "b", "c", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", "b", "b", "c", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_create_string_list_dup(&list, 0, "a", "a", "a", "b", "b", "b",
+ "c", "c", "c", NULL);
+ t_string_list_remove_duplicates(&list, "a", "b", "c", NULL);
+
+ t_string_list_clear(&list, 0);
+}
diff --git a/t/unit-tests/unit-test.h b/t/unit-tests/unit-test.h
index 85e5d6a..39a0b72 100644
--- a/t/unit-tests/unit-test.h
+++ b/t/unit-tests/unit-test.h
@@ -1,8 +1,13 @@
#include "git-compat-util.h"
#include "clar/clar.h"
-#include "clar-decls.h"
#include "strbuf.h"
+#ifndef GIT_CLAR_DECLS_H
+# include "clar-decls.h"
+#else
+# include GIT_CLAR_DECLS_H
+#endif
+
#define cl_failf(fmt, ...) do { \
char desc[4096]; \
snprintf(desc, sizeof(desc), fmt, __VA_ARGS__); \
diff --git a/tag.c b/tag.c
index 05be390..1d52686 100644
--- a/tag.c
+++ b/tag.c
@@ -5,7 +5,7 @@
#include "environment.h"
#include "tag.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "tree.h"
#include "blob.h"
@@ -52,7 +52,7 @@ int gpg_verify_tag(const struct object_id *oid, const char *name_to_report,
unsigned long size;
int ret;
- type = oid_object_info(the_repository, oid, NULL);
+ type = odb_read_object_info(the_repository->objects, oid, NULL);
if (type != OBJ_TAG)
return error("%s: cannot verify a non-tag object of type %s.",
name_to_report ?
@@ -60,7 +60,7 @@ int gpg_verify_tag(const struct object_id *oid, const char *name_to_report,
repo_find_unique_abbrev(the_repository, oid, DEFAULT_ABBREV),
type_name(type));
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf)
return error("%s: unable to read file.",
name_to_report ?
@@ -222,8 +222,8 @@ int parse_tag(struct tag *item)
if (item->object.parsed)
return 0;
- data = repo_read_object_file(the_repository, &item->object.oid, &type,
- &size);
+ data = odb_read_object(the_repository->objects, &item->object.oid,
+ &type, &size);
if (!data)
return error("Could not read %s",
oid_to_hex(&item->object.oid));
diff --git a/tmp-objdir.c b/tmp-objdir.c
index c38fbeb..9f5a178 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -10,14 +10,14 @@
#include "strbuf.h"
#include "strvec.h"
#include "quote.h"
-#include "object-store.h"
+#include "odb.h"
#include "repository.h"
struct tmp_objdir {
struct repository *repo;
struct strbuf path;
struct strvec env;
- struct object_directory *prev_odb;
+ struct odb_source *prev_source;
int will_destroy;
};
@@ -46,8 +46,8 @@ int tmp_objdir_destroy(struct tmp_objdir *t)
if (t == the_tmp_objdir)
the_tmp_objdir = NULL;
- if (t->prev_odb)
- restore_primary_odb(t->prev_odb, t->path.buf);
+ if (t->prev_source)
+ odb_restore_primary_source(t->repo->objects, t->prev_source, t->path.buf);
err = remove_dir_recursively(&t->path, 0);
@@ -227,7 +227,7 @@ static int migrate_one(struct tmp_objdir *t,
return -1;
return migrate_paths(t, src, dst, flags);
}
- return finalize_object_file_flags(src->buf, dst->buf, flags);
+ return finalize_object_file_flags(t->repo, src->buf, dst->buf, flags);
}
static int is_loose_object_shard(const char *name)
@@ -276,11 +276,11 @@ int tmp_objdir_migrate(struct tmp_objdir *t)
if (!t)
return 0;
- if (t->prev_odb) {
- if (t->repo->objects->odb->will_destroy)
+ if (t->prev_source) {
+ if (t->repo->objects->sources->will_destroy)
BUG("migrating an ODB that was marked for destruction");
- restore_primary_odb(t->prev_odb, t->path.buf);
- t->prev_odb = NULL;
+ odb_restore_primary_source(t->repo->objects, t->prev_source, t->path.buf);
+ t->prev_source = NULL;
}
strbuf_addbuf(&src, &t->path);
@@ -304,24 +304,26 @@ const char **tmp_objdir_env(const struct tmp_objdir *t)
void tmp_objdir_add_as_alternate(const struct tmp_objdir *t)
{
- add_to_alternates_memory(t->path.buf);
+ odb_add_to_alternates_memory(t->repo->objects, t->path.buf);
}
void tmp_objdir_replace_primary_odb(struct tmp_objdir *t, int will_destroy)
{
- if (t->prev_odb)
+ if (t->prev_source)
BUG("the primary object database is already replaced");
- t->prev_odb = set_temporary_primary_odb(t->path.buf, will_destroy);
+ t->prev_source = odb_set_temporary_primary_source(t->repo->objects,
+ t->path.buf, will_destroy);
t->will_destroy = will_destroy;
}
struct tmp_objdir *tmp_objdir_unapply_primary_odb(void)
{
- if (!the_tmp_objdir || !the_tmp_objdir->prev_odb)
+ if (!the_tmp_objdir || !the_tmp_objdir->prev_source)
return NULL;
- restore_primary_odb(the_tmp_objdir->prev_odb, the_tmp_objdir->path.buf);
- the_tmp_objdir->prev_odb = NULL;
+ odb_restore_primary_source(the_tmp_objdir->repo->objects,
+ the_tmp_objdir->prev_source, the_tmp_objdir->path.buf);
+ the_tmp_objdir->prev_source = NULL;
return the_tmp_objdir;
}
diff --git a/trailer.c b/trailer.c
index 310cf58..911a81e 100644
--- a/trailer.c
+++ b/trailer.c
@@ -595,8 +595,8 @@ void trailer_config_init(void)
default_conf_info.where = WHERE_END;
default_conf_info.if_exists = EXISTS_ADD_IF_DIFFERENT_NEIGHBOR;
default_conf_info.if_missing = MISSING_ADD;
- git_config(git_trailer_default_config, NULL);
- git_config(git_trailer_config, NULL);
+ repo_config(the_repository, git_trailer_default_config, NULL);
+ repo_config(the_repository, git_trailer_config, NULL);
configured = 1;
}
diff --git a/transport.c b/transport.c
index 6c2801b..e305d6b 100644
--- a/transport.c
+++ b/transport.c
@@ -54,14 +54,14 @@ static int transport_color_config(void)
return 0;
initialized = 1;
- if (!git_config_get_string(key, &value))
+ if (!repo_config_get_string(the_repository, key, &value))
transport_use_color = git_config_colorbool(key, value);
if (!want_color_stderr(transport_use_color))
return 0;
for (size_t i = 0; i < ARRAY_SIZE(keys); i++)
- if (!git_config_get_string(keys[i], &value)) {
+ if (!repo_config_get_string(the_repository, keys[i], &value)) {
if (!value)
return config_error_nonbool(keys[i]);
if (color_parse(value, transport_colors[i]) < 0)
@@ -202,7 +202,7 @@ static int fetch_refs_from_bundle(struct transport *transport,
if (!data->get_refs_from_bundle_called)
get_refs_from_bundle_inner(transport);
- git_config(fetch_fsck_config_cb, &msg_types);
+ repo_config(the_repository, fetch_fsck_config_cb, &msg_types);
opts.fsck_msg_types = msg_types.buf;
ret = unbundle(the_repository, &data->header, data->fd,
@@ -1078,7 +1078,7 @@ static enum protocol_allow_config get_protocol_config(const char *type)
char *value;
/* first check the per-protocol config */
- if (!git_config_get_string(key, &value)) {
+ if (!repo_config_get_string(the_repository, key, &value)) {
enum protocol_allow_config ret =
parse_protocol_config(key, value);
free(key);
@@ -1088,7 +1088,7 @@ static enum protocol_allow_config get_protocol_config(const char *type)
free(key);
/* if defined, fallback to user-defined default for unknown protocols */
- if (!git_config_get_string("protocol.allow", &value)) {
+ if (!repo_config_get_string(the_repository, "protocol.allow", &value)) {
enum protocol_allow_config ret =
parse_protocol_config("protocol.allow", value);
free(value);
@@ -1243,7 +1243,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
ret->smart_options->receivepack = remote->receivepack;
}
- ret->hash_algo = &hash_algos[GIT_HASH_SHA1];
+ ret->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
return ret;
}
@@ -1602,7 +1602,7 @@ int transport_get_remote_bundle_uri(struct transport *transport)
* Don't request bundle-uri from the server unless configured to
* do so by the transfer.bundleURI=true config option.
*/
- if (git_config_get_bool("transfer.bundleuri", &value) || !value)
+ if (repo_config_get_bool(the_repository, "transfer.bundleuri", &value) || !value)
return 0;
if (!transport->bundles->baseURI)
diff --git a/tree-walk.c b/tree-walk.c
index 90655d5..e449a13 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -6,7 +6,7 @@
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "trace2.h"
#include "tree.h"
#include "pathspec.h"
@@ -90,7 +90,7 @@ void *fill_tree_descriptor(struct repository *r,
void *buf = NULL;
if (oid) {
- buf = read_object_with_reference(r, oid, OBJ_TREE, &size, NULL);
+ buf = odb_read_object_peeled(r->objects, oid, OBJ_TREE, &size, NULL);
if (!buf)
die(_("unable to read tree (%s)"), oid_to_hex(oid));
}
@@ -611,7 +611,7 @@ int get_tree_entry(struct repository *r,
unsigned long size;
struct object_id root;
- tree = read_object_with_reference(r, tree_oid, OBJ_TREE, &size, &root);
+ tree = odb_read_object_peeled(r->objects, tree_oid, OBJ_TREE, &size, &root);
if (!tree)
return -1;
@@ -681,10 +681,8 @@ enum get_oid_result get_tree_entry_follow_symlinks(struct repository *r,
void *tree;
struct object_id root;
unsigned long size;
- tree = read_object_with_reference(r,
- ¤t_tree_oid,
- OBJ_TREE, &size,
- &root);
+ tree = odb_read_object_peeled(r->objects, ¤t_tree_oid,
+ OBJ_TREE, &size, &root);
if (!tree)
goto done;
@@ -795,9 +793,9 @@ enum get_oid_result get_tree_entry_follow_symlinks(struct repository *r,
*/
retval = DANGLING_SYMLINK;
- contents = repo_read_object_file(r,
- ¤t_tree_oid, &type,
- &link_len);
+ contents = odb_read_object(r->objects,
+ ¤t_tree_oid, &type,
+ &link_len);
if (!contents)
goto done;
diff --git a/tree.c b/tree.c
index b85f562..1ef743d 100644
--- a/tree.c
+++ b/tree.c
@@ -4,7 +4,7 @@
#include "hex.h"
#include "tree.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "alloc.h"
#include "tree-walk.h"
@@ -193,8 +193,8 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)
if (item->object.parsed)
return 0;
- buffer = repo_read_object_file(the_repository, &item->object.oid,
- &type, &size);
+ buffer = odb_read_object(the_repository->objects, &item->object.oid,
+ &type, &size);
if (!buffer)
return quiet_on_missing ? -1 :
error("Could not read %s",
diff --git a/unpack-trees.c b/unpack-trees.c
index 471837f..f38c761 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -26,7 +26,7 @@
#include "symlinks.h"
#include "trace2.h"
#include "fsmonitor.h"
-#include "object-store.h"
+#include "odb.h"
#include "promisor-remote.h"
#include "entry.h"
#include "parallel-checkout.h"
diff --git a/upload-pack.c b/upload-pack.c
index 26f29b8..4f26f6a 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -10,7 +10,7 @@
#include "pkt-line.h"
#include "sideband.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "oid-array.h"
#include "object.h"
#include "commit.h"
@@ -509,7 +509,7 @@ static int got_oid(struct upload_pack_data *data,
{
if (get_oid_hex(hex, oid))
die("git upload-pack: expected SHA1 object, got '%s'", hex);
- if (!has_object(the_repository, oid, 0))
+ if (!odb_has_object(the_repository->objects, oid, 0))
return -1;
return do_got_oid(data, oid);
}
diff --git a/usage.c b/usage.c
index 38b46bb..8191323 100644
--- a/usage.c
+++ b/usage.c
@@ -67,6 +67,8 @@ static NORETURN void usage_builtin(const char *err, va_list params)
static void die_message_builtin(const char *err, va_list params)
{
+ if (!err)
+ return;
trace2_cmd_error_va(err, params);
vreportf(_("fatal: "), err, params);
}
@@ -372,3 +374,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
trace2_cmd_error_va(fmt, ap);
va_end(ap);
}
+
+NORETURN void you_still_use_that(const char *command_name)
+{
+ fprintf(stderr,
+ _("'%s' is nominated for removal.\n"
+ "If you still use this command, please add an extra\n"
+ "option, '--i-still-use-this', on the command line\n"
+ "and let us know you still use it by sending an e-mail\n"
+ "to <git@vger.kernel.org>. Thanks.\n"),
+ command_name);
+ die(_("refusing to run without --i-still-use-this"));
+}
diff --git a/userdiff.c b/userdiff.c
index 05776cc..fe710a6 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -327,6 +327,10 @@ PATTERNS("python",
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
"|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?"),
/* -- */
+PATTERNS("r",
+ "^[ \t]*([a-zA-z][a-zA-Z0-9_.]*[ \t]*(<-|=)[ \t]*function.*)$",
+ /* -- */
+ "[^ \t]+"),
PATTERNS("ruby",
"^[ \t]*((class|module|def)[ \t].*)$",
/* -- */
diff --git a/versioncmp.c b/versioncmp.c
index b6eebdb..3a81b17 100644
--- a/versioncmp.c
+++ b/versioncmp.c
@@ -167,8 +167,8 @@ int versioncmp(const char *s1, const char *s2)
const char *const oldk = "versionsort.prereleasesuffix";
const struct string_list *newl;
const struct string_list *oldl;
- int new = git_config_get_string_multi(newk, &newl);
- int old = git_config_get_string_multi(oldk, &oldl);
+ int new = repo_config_get_string_multi(the_repository, newk, &newl);
+ int old = repo_config_get_string_multi(the_repository, oldk, &oldl);
if (!new && !old)
warning("ignoring %s because %s is set", oldk, newk);
diff --git a/walker.c b/walker.c
index b470d43..8073754 100644
--- a/walker.c
+++ b/walker.c
@@ -5,7 +5,7 @@
#include "hex.h"
#include "walker.h"
#include "repository.h"
-#include "object-store.h"
+#include "odb.h"
#include "commit.h"
#include "strbuf.h"
#include "tree.h"
@@ -14,6 +14,7 @@
#include "blob.h"
#include "refs.h"
#include "progress.h"
+#include "prio-queue.h"
static struct object_id current_commit_oid;
@@ -78,7 +79,7 @@ static int process_tree(struct walker *walker, struct tree *tree)
#define SEEN (1U << 1)
#define TO_SCAN (1U << 2)
-static struct commit_list *complete = NULL;
+static struct prio_queue complete = { compare_commits_by_commit_date };
static int process_commit(struct walker *walker, struct commit *commit)
{
@@ -87,7 +88,10 @@ static int process_commit(struct walker *walker, struct commit *commit)
if (repo_parse_commit(the_repository, commit))
return -1;
- while (complete && complete->item->date >= commit->date) {
+ while (complete.nr) {
+ struct commit *item = prio_queue_peek(&complete);
+ if (item->date < commit->date)
+ break;
pop_most_recent_commit(&complete, COMPLETE);
}
@@ -150,8 +154,8 @@ static int process(struct walker *walker, struct object *obj)
return 0;
obj->flags |= SEEN;
- if (has_object(the_repository, &obj->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ if (odb_has_object(the_repository->objects, &obj->oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
/* We already have it, so we should scan it now. */
obj->flags |= TO_SCAN;
}
@@ -233,7 +237,7 @@ static int mark_complete(const char *path UNUSED,
if (commit) {
commit->object.flags |= COMPLETE;
- commit_list_insert(commit, &complete);
+ prio_queue_put(&complete, commit);
}
return 0;
}
@@ -302,7 +306,6 @@ int walker_fetch(struct walker *walker, int targets, char **target,
if (!walker->get_recover) {
refs_for_each_ref(get_main_ref_store(the_repository),
mark_complete, NULL);
- commit_list_sort_by_date(&complete);
}
for (i = 0; i < targets; i++) {
diff --git a/worktree.c b/worktree.c
index c34b9eb..a2a5f51 100644
--- a/worktree.c
+++ b/worktree.c
@@ -991,9 +991,9 @@ int should_prune_worktree(const char *id, struct strbuf *reason, char **wtpath,
static int move_config_setting(const char *key, const char *value,
const char *from_file, const char *to_file)
{
- if (git_config_set_in_file_gently(to_file, key, NULL, value))
+ if (repo_config_set_in_file_gently(the_repository, to_file, key, NULL, value))
return error(_("unable to set %s in '%s'"), key, to_file);
- if (git_config_set_in_file_gently(from_file, key, NULL, NULL))
+ if (repo_config_set_in_file_gently(the_repository, from_file, key, NULL, NULL))
return error(_("unable to unset %s in '%s'"), key, from_file);
return 0;
}
@@ -1013,7 +1013,7 @@ int init_worktree_config(struct repository *r)
*/
if (r->repository_format_worktree_config)
return 0;
- if ((res = git_config_set_gently("extensions.worktreeConfig", "true")))
+ if ((res = repo_config_set_gently(the_repository, "extensions.worktreeConfig", "true")))
return error(_("failed to set extensions.worktreeConfig setting"));
common_config_file = xstrfmt("%s/config", r->commondir);
@@ -1077,7 +1077,7 @@ void write_worktree_linking_files(struct strbuf dotgit, struct strbuf gitdir,
if (use_relative_paths && !the_repository->repository_format_relative_worktrees) {
if (upgrade_repository_format(1) < 0)
die(_("unable to upgrade repository format to support relative worktrees"));
- if (git_config_set_gently("extensions.relativeWorktrees", "true"))
+ if (repo_config_set_gently(the_repository, "extensions.relativeWorktrees", "true"))
die(_("unable to set extensions.relativeWorktrees setting"));
the_repository->repository_format_relative_worktrees = 1;
}
diff --git a/xdiff-interface.c b/xdiff-interface.c
index 1edcd31..4971f72 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -2,10 +2,11 @@
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
+#include "environment.h"
#include "gettext.h"
#include "config.h"
#include "hex.h"
-#include "object-store.h"
+#include "odb.h"
#include "strbuf.h"
#include "xdiff-interface.h"
#include "xdiff/xtypes.h"
@@ -187,7 +188,7 @@ void read_mmblob(mmfile_t *ptr, const struct object_id *oid)
return;
}
- ptr->ptr = repo_read_object_file(the_repository, oid, &type, &size);
+ ptr->ptr = odb_read_object(the_repository->objects, oid, &type, &size);
if (!ptr->ptr || type != OBJ_BLOB)
die("unable to read blob object %s", oid_to_hex(oid));
ptr->size = size;