author | Junio C Hamano <gitster@pobox.com> | |
Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800) |
* tr/diff-words-test:
t4034 (diff --word-diff): add a minimum Perl drier test vector
t4034 (diff --word-diff): style suggestions
userdiff: simplify word-diff safeguard
t4034: bulk verify builtin word regex sanity
t4034 (diff --word-diff): add a minimum Perl drier test vector
t4034 (diff --word-diff): style suggestions
userdiff: simplify word-diff safeguard
t4034: bulk verify builtin word regex sanity
194 files changed:
diff --git a/.gitignore b/.gitignore
index 3dd6ef7d259d8fe2811f68525b5309e97c79f4cc..9ee7b5a6b4efbd1e0548ad20568f4213194a06a8 100644 (file)
--- a/.gitignore
+++ b/.gitignore
/git-quiltimport
/git-read-tree
/git-rebase
+/git-rebase--am
/git-rebase--interactive
+/git-rebase--merge
/git-receive-pack
/git-reflog
/git-relink
/git-rm
/git-send-email
/git-send-pack
+/git-sh-i18n
/git-sh-setup
/git-shell
/git-shortlog
/git-show-branch
/git-show-index
/git-show-ref
+/git-skew
/git-stage
/git-stash
/git-status
*.pdb
/Debug/
/Release/
+/share/
index ba2006d892ec09d606f8846588c7727396b1ee28..2ed2329834a8fceeb03b6d3243e73f463bb0e956 100644 (file)
are ERE elements not BRE (note that \? and \+ are not even part
of BRE -- making them accessible from BRE is a GNU extension).
+ - Use Git's gettext wrappers in git-sh-i18n to make the user
+ interface translatable. See "Marking strings for translation" in
+ po/README.
+
For C programs:
- We use tabs to indent, and interpret tabs as taking up to
- When we pass <string, length> pair to functions, we should try to
pass them in that order.
+ - Use Git's gettext wrappers to make the user interface
+ translatable. See "Marking strings for translation" in po/README.
+
Writing Documentation:
Every user-visible change should be reflected in the documentation.
index 84d0e1dc13ca59a6bb0ab300dd91abdc210ffbe6..d5bca731b589dde2b8a1edad2977e9376e0ec433 100644 (file)
-Git v1.7.4 Release Notes (draft)
-================================
+Git v1.7.4 Release Notes
+========================
Updates since v1.7.3
--------------------
objects unnecessarily.
* "git diff" and "git grep" learned what functions and subroutines
- in Fortran and Perl look like.
+ in Fortran, Pascal and Perl look like.
* "git fetch" learned the "--recurse-submodules" option.
* "git push --progress" shows progress indicators now.
+ * "git rebase -i" showed a confusing error message when given a
+ branch name that does not exist.
+
* "git repack" places its temporary packs under $GIT_OBJECT_DIRECTORY/pack
instead of $GIT_OBJECT_DIRECTORY/ to avoid cross directory renames.
* "git submodule update --recursive --other-flags" passes flags down
to its subinvocations.
-
----
-exec >/var/tmp/1
-O=v1.7.4-rc2
-echo O=$(git describe master)
-git shortlog --no-merges ^maint ^$O master
index ff7c225467b5da3263b6e8f8924adefeea404a8a..312293799d3731f488547b7904398b2bb16de81d 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
= true).
core.worktree::
- Set the path to the working tree. The value will not be
- used in combination with repositories found automatically in
- a .git directory (i.e. $GIT_DIR is not set).
+ Set the path to the root of the working tree.
This can be overridden by the GIT_WORK_TREE environment
- variable and the '--work-tree' command line option. It can be
- an absolute path or relative path to the directory specified by
- --git-dir or GIT_DIR.
- Note: If --git-dir or GIT_DIR are specified but none of
+ variable and the '--work-tree' command line option.
+ The value can an absolute path or relative to the path to
+ the .git directory, which is either specified by --git-dir
+ or GIT_DIR, or automatically discovered.
+ If --git-dir or GIT_DIR is specified but none of
--work-tree, GIT_WORK_TREE and core.worktree is specified,
- the current working directory is regarded as the top directory
+ the current working directory is regarded as the top level
of your working tree.
++
+Note that this variable is honored even when set in a configuration
+file in a ".git" subdirectory of a directory and its value differs
+from the latter directory (e.g. "/path/to/.git/config" has
+core.worktree set to "/different/path"), which is most likely a
+misconfiguration. Running git commands in the "/path/to" directory will
+still use "/different/path" as the root of the work tree and can cause
+confusion unless you know what you are doing (e.g. you are creating a
+read-only snapshot of the same index to a location different from the
+repository's usual working tree).
core.logAllRefUpdates::
Enable the reflog. Updates to a ref <ref> is logged to the file
(see linkgit:gitattributes[5]). Path expansions are made the same
way as for `core.excludesfile`.
+core.ignoredareprecious::
+ By default ignored (i.e. trashable) untracked files are
+ automatically removed from the working tree when they get in
+ the way of merge or switching between branches. This option
+ declares that such files are precious instead, and prevents
+ merges and checkouts from succeeding.
+
core.editor::
Commands such as `commit` and `tag` that lets you edit
messages by launching an editor uses the value of this
index 73008705ebe304c8d2a2d089e9328be369c50fc6..749d68a72bf720d82260fe175be0824f7ad069eb 100644 (file)
cherry-pick'ed commit, then a fast forward to this commit will
be performed.
+--strategy=<strategy>::
+ Use the given merge strategy. Should only be used once.
+ See the MERGE STRATEGIES section in linkgit:git-merge[1]
+ for details.
+
+-X<option>::
+--strategy-option=<option>::
+ Pass the merge strategy-specific option through to the
+ merge strategy. See linkgit:git-merge[1] for details.
+
EXAMPLES
--------
git cherry-pick master::
so the result can be inspected and made into a single new
commit if suitable.
+The following sequence attempts to backport a patch, bails out because
+the code the patch applies to has changed too much, and then tries
+again, this time exercising more care about matching up context lines.
+
+------------
+$ git cherry-pick topic^ <1>
+$ git diff <2>
+$ git reset --merge ORIG_HEAD <3>
+$ git cherry-pick -Xpatience topic^ <4>
+------------
+<1> apply the change that would be shown by `git show topic^`.
+In this example, the patch does not apply cleanly, so
+information about the conflict is written to the index and
+working tree and no new commit results.
+<2> summarize changes to be reconciled
+<3> cancel the cherry-pick. In other words, return to the
+pre-cherry-pick state, preserving any local modifications you had in
+the working tree.
+<4> try to apply the change introduced by `topic^` again,
+spending extra time to avoid mistakes based on incorrectly matching
+context lines.
+
Author
------
Written by Junio C Hamano <gitster@pobox.com>
index f56dfcabb96d1510abfd61a13c36135f3824b744..faa31400b70e50ca9d6b4dcdd41b572fc46c0c57 100644 (file)
set of marks. If a mark is defined to different values,
the last file wins.
+--import-marks-if-exists=<file>::
+ Like --import-marks but instead of erroring out, silently
+ skips the file if it does not exist.
+
--relative-marks::
After specifying --relative-marks= the paths specified
with --import-marks= and --export-marks= are relative
If an `LF` or double quote must be encoded into `<path>` shell-style
quoting should be used, e.g. `"path/with\n and \" in it"`.
-Additionally, in `040000` mode, `<path>` may also be an empty string
-(`""`) to specify the root of the tree.
-
The value of `<path>` must be in canonical form. That is it must not:
* contain an empty directory component (e.g. `foo//bar` is invalid),
* contain the special component `.` or `..` (e.g. `foo/./bar` and
`foo/../bar` are invalid).
+The root of the tree can be represented by an empty string as `<path>`.
+
It is recommended that `<path>` always be encoded using UTF-8.
`filedelete`
set previously or a full 40-byte SHA-1 of a Git blob, preexisting or
ready to be written.
-output uses the same format as `git cat-file --batch`:
+Output uses the same format as `git cat-file --batch`:
====
<sha1> SP 'blob' SP <size> LF
index fd72976371cee0fcd25e3419138eb13382dc6ab8..927ecee2f26cdf0bd30457d5016b654c01a23a14 100644 (file)
but carries forward unmerged index entries.
--keep::
- Resets the index, updates files in the working tree that are
- different between <commit> and HEAD, but keeps those
- which are different between HEAD and the working tree (i.e.
- which have local changes).
+ Resets index entries and updates files in the working tree that are
+ different between <commit> and HEAD.
If a file that is different between <commit> and HEAD has local changes,
reset is aborted.
-+
-In other words, --keep does a 2-way merge between <commit> and HEAD followed by
-'git reset --mixed <commit>'.
--
If you want to undo a commit other than the latest on a branch,
index 752fc88e768e4b8e1afddad4bdd7833cf20978c7..45be851750c2ce81500765f6dfbd23578c68abda 100644 (file)
--signoff::
Add Signed-off-by line at the end of the commit message.
+--strategy=<strategy>::
+ Use the given merge strategy. Should only be used once.
+ See the MERGE STRATEGIES section in linkgit:git-merge[1]
+ for details.
+
+-X<option>::
+--strategy-option=<option>::
+ Pass the merge strategy-specific option through to the
+ merge strategy. See linkgit:git-merge[1] for details.
+
EXAMPLES
--------
git revert HEAD~3::
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 4e5fe4d4b53f3706be2f7daa72beb20f376de603..e968ed4aa09705d98530add23135e76141ec75c2 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
branch of the `git.git` repository.
Documentation for older releases are available here:
+* link:v1.7.4/git.html[documentation for release 1.7.4]
+
+* release notes for
+ link:RelNotes/1.7.4.txt[1.7.4].
+
* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
* release notes for
path or relative path to current working directory.
--work-tree=<path>::
- Set the path to the working tree. The value will not be
- used in combination with repositories found automatically in
- a .git directory (i.e. $GIT_DIR is not set).
+ Set the path to the working tree. It can be an absolute path
+ or a path relative to the current working directory.
This can also be controlled by setting the GIT_WORK_TREE
environment variable and the core.worktree configuration
- variable. It can be an absolute path or relative path to
- current working directory.
- Note: If --git-dir or GIT_DIR are specified but none of
- --work-tree, GIT_WORK_TREE and core.worktree is specified,
- the current working directory is regarded as the top directory
- of your working tree.
+ variable (see core.worktree in linkgit:git-config[1] for a
+ more detailed discussion).
--bare::
Treat the repository as a bare repository. If GIT_DIR
index f04b48ef0d482f03f186d749768da246aabcd1db..33716a31d0c60093c14f894ef07a87bee73fafc9 100644 (file)
<<def_pack,pack>>, to assist in efficiently accessing the contents of a
pack.
+[[def_pathspec]]pathspec::
+ Pattern used to specify paths.
++
+Pathspecs are used on the command line of "git ls-files", "git
+ls-tree", "git grep", "git checkout", and many other commands to
+limit the scope of operations to some subset of the tree or
+worktree. See the documentation of each command for whether
+paths are relative to the current directory or toplevel. The
+pathspec syntax is as follows:
+
+* any path matches itself
+* the pathspec up to the last slash represents a
+ directory prefix. The scope of that pathspec is
+ limited to that subtree.
+* the rest of the pathspec is a pattern for the remainder
+ of the pathname. Paths relative to the directory
+ prefix will be matched against that pattern using fnmatch(3);
+ in particular, '*' and '?' _can_ match directory separators.
++
+For example, Documentation/*.jpg will match all .jpg files
+in the Documentation subtree,
+including Documentation/chapter_1/figure_1.jpg.
+
[[def_parent]]parent::
A <<def_commit_object,commit object>> contains a (possibly empty) list
of the logical predecessor(s) in the line of development, i.e. its
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
--- /dev/null
@@ -0,0 +1,144 @@
+GIT index format
+================
+
+= The git index file has the following format
+
+ All binary numbers are in network byte order. Version 2 is described
+ here unless stated otherwise.
+
+ - A 12-byte header consisting of
+
+ 4-byte signature:
+ The signature is { 'D', 'I', 'R', 'C' }
+
+ 4-byte version number:
+ The current supported versions are 2 and 3.
+
+ 32-bit number of index entries.
+
+ - A number of sorted index entries
+
+ - Extensions
+
+ Extensions are identified by signature. Optional extensions can
+ be ignored if GIT does not understand them.
+
+ GIT currently supports tree cache and resolve undo extensions.
+
+ 4-byte extension signature. If the first byte is 'A'..'Z' the
+ extension is optional and can be ignored.
+
+ 32-bit size of the extension
+
+ Extension data
+
+ - 160-bit SHA-1 over the content of the index file before this
+ checksum.
+
+== Index entry
+
+ Index entries are sorted in ascending order on the name field,
+ interpreted as a string of unsigned bytes. Entries with the same
+ name are sorted by their stage field.
+
+ 32-bit ctime seconds, the last time a file's metadata changed
+ this is stat(2) data
+
+ 32-bit ctime nanosecond fractions
+ this is stat(2) data
+
+ 32-bit mtime seconds, the last time a file's data changed
+ this is stat(2) data
+
+ 32-bit mtime nanosecond fractions
+ this is stat(2) data
+
+ 32-bit dev
+ this is stat(2) data
+
+ 32-bit ino
+ this is stat(2) data
+
+ 32-bit mode, split into (high to low bits)
+
+ 4-bit object type
+ valid values in binary are 1000 (blob), 1010 (symbolic link)
+ and 1110 (gitlink)
+
+ 3-bit unused
+
+ 9-bit unix permission (only 0755 and 0644 are valid)
+
+ 32-bit uid
+ this is stat(2) data
+
+ 32-bit gid
+ this is stat(2) data
+
+ 32-bit file size
+ This is the on-disk size from stat(2)
+
+ 160-bit SHA-1 for the represented object
+
+ A 16-bit field split into (high to low bits)
+
+ 1-bit assume-valid flag
+
+ 1-bit extended flag (must be zero in version 2)
+
+ 2-bit stage (during merge)
+
+ 12-bit name length if the length is less than 0x0FFF
+
+ (Version 3) A 16-bit field, only applicable if the "extended flag"
+ above is 1, split into (high to low bits).
+
+ 1-bit reserved for future
+
+ 1-bit skip-worktree flag (used by sparse checkout)
+
+ 1-bit intent-to-add flag (used by "git add -N")
+
+ 13-bit unused, must be zero
+
+ Entry path name (variable length) relative to top level directory
+ (without leading slash). '/' is used as path separator. The special
+ paths ".", ".." and ".git" (without quotes) are disallowed.
+ Trailing slash is also disallowed.
+
+ The exact encoding is undefined, but the '.' and '/' characters
+ are encoded in 7-bit ASCII and the encoding cannot contain a nul
+ byte. Generally a superset of ASCII.
+
+ 1-8 nul bytes as necessary to pad the entry to a multiple of eight bytes
+ while keeping the name NUL-terminated.
+
+== Extensions
+
+=== Tree cache
+
+ Tree cache extension contains pre-computes hashes for all trees that
+ can be derived from the index
+
+ - Extension tag { 'T', 'R', 'E', 'E' }
+
+ - 32-bit size
+
+ - A number of entries
+
+ NUL-terminated tree name
+
+ Blank-terminated ASCII decimal number of entries in this tree
+
+ Newline-terminated position of this tree in the parent tree. 0 for
+ the root tree
+
+ 160-bit SHA-1 for this tree and it's children
+
+=== Resolve undo
+
+ TODO
+
+ - Extension tag { 'R', 'E', 'U', 'C' }
+
+ - 32-bit size
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index ccfc298b18439f6463d0c709819402edcec04102..92fe7a59dbf81b0a055280f9351811641ce7044a 100755 (executable)
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.7.4-rc2
+DEF_VER=v1.7.4
LF='
'
index 16e45f114f18d5d6964ab9fa39eee617dfa59bfc..94a18722d5bacfd0894841d5e7cc8c1ccfeb5608 100644 (file)
--- a/INSTALL
+++ b/INSTALL
history graphically, and in git-gui. If you don't want gitk or
git-gui, you can use NO_TCLTK.
+ - A gettext library is used by default for localizing Git. The
+ primary target is GNU libintl, but the Solaris gettext
+ implementation also works.
+
+ We need a gettext.h on the system for C code, gettext.sh (or
+ Solaris gettext(1)) for shell scripts, and libintl-perl for Perl
+ programs.
+
+ Set NO_GETTEXT to disable localization support and make Git only
+ use English. Under autoconf the configure script will do this
+ automatically if it can't find libintl on the system.
+
- Some platform specific issues are dealt with Makefile rules,
but depending on your specific installation, you may not
have all the libraries/tools needed, or you may have
diff --git a/Makefile b/Makefile
index 775ee838c332c7311df34a98448fc3723c6bd95e..efd7b3a0c11d44e7992d972e3e147da9f3ec39e8 100644 (file)
--- a/Makefile
+++ b/Makefile
# Define NO_EXPAT if you do not have expat installed. git-http-push is
# not built, and you cannot push using http:// and https:// transports.
#
+# Define NO_GETTEXT if you don't want to build with Git with gettext
+# support. Building it requires GNU libintl or another gettext
+# implementation, and additionally libintl-perl at runtime.
+#
+# Define NEEDS_LIBINTL if you haven't set NO_GETTEXT and your system
+# needs to be explicitly linked to -lintl. It's defined automatically
+# on platforms where we don't expect glibc (Linux, Hurd,
+# GNU/kFreeBSD), which includes libintl.
+#
+# Define HAVE_LIBCHARSET_H if you haven't set NO_GETTEXT and you can't
+# trust the langinfo.h's nl_langinfo(CODESET) function to return the
+# current character set. GNU and Solaris have a nl_langinfo(CODESET),
+# FreeBSD can use either, but MinGW and some others need to use
+# libcharset.h's locale_charset() instead.
+#
+# Define GNU_GETTEXT if you're using the GNU implementation of
+# libintl. We define this everywhere except on Solaris, which has its
+# own gettext implementation. If GNU_GETTEXT is set we'll use GNU
+# extensions like `msgfmt --check'.
+#
+# Define GETTEXT_POISON to turn all strings that use gettext into
+# gibberish. This option should only be used by the Git developers to
+# check that the Git gettext implementation itself is sane.
+#
# Define EXPATDIR=/foo/bar if your expat header and library files are in
# /foo/bar/include and /foo/bar/lib directories.
#
gitexecdir = libexec/git-core
sharedir = $(prefix)/share
gitwebdir = $(sharedir)/gitweb
+localedir = $(sharedir)/locale
template_dir = share/git-core/templates
htmldir = share/doc/git-doc
ifeq ($(prefix),/usr)
# DESTDIR=
pathsep = :
-export prefix bindir sharedir sysconfdir gitwebdir
+export prefix bindir sharedir sysconfdir gitwebdir localedir
CC = gcc
AR = ar
PTHREAD_LIBS = -lpthread
PTHREAD_CFLAGS =
GCOV = gcov
+XGETTEXT = xgettext
+MSGFMT = msgfmt
export TCL_PATH TCLTK_PATH
SCRIPT_SH += git-mergetool.sh
SCRIPT_SH += git-pull.sh
SCRIPT_SH += git-quiltimport.sh
+SCRIPT_SH += git-rebase--am.sh
SCRIPT_SH += git-rebase--interactive.sh
+SCRIPT_SH += git-rebase--merge.sh
SCRIPT_SH += git-rebase.sh
SCRIPT_SH += git-repack.sh
SCRIPT_SH += git-request-pull.sh
SCRIPT_LIB += git-mergetool--lib
SCRIPT_LIB += git-parse-remote
SCRIPT_LIB += git-sh-setup
+SCRIPT_LIB += git-sh-i18n
SCRIPT_PERL += git-add--interactive.perl
SCRIPT_PERL += git-difftool.perl
TEST_PROGRAMS_NEED_X += test-svn-fe
TEST_PROGRAMS_NEED_X += test-treap
TEST_PROGRAMS_NEED_X += test-index-version
+TEST_PROGRAMS_NEED_X += test-mktemp
TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
LIB_H += utf8.h
LIB_H += xdiff-interface.h
LIB_H += xdiff/xdiff.h
+LIB_H += gettext.h
LIB_OBJS += abspath.o
LIB_OBJS += advice.o
LIB_OBJS += environment.o
LIB_OBJS += exec_cmd.o
LIB_OBJS += fsck.o
+ifndef NO_GETTEXT
+LIB_OBJS += gettext.o
+endif
LIB_OBJS += graph.o
LIB_OBJS += grep.o
LIB_OBJS += hash.o
BUILTIN_OBJS += builtin/shortlog.o
BUILTIN_OBJS += builtin/show-branch.o
BUILTIN_OBJS += builtin/show-ref.o
+BUILTIN_OBJS += builtin/skew.o
BUILTIN_OBJS += builtin/stripspace.o
BUILTIN_OBJS += builtin/symbolic-ref.o
BUILTIN_OBJS += builtin/tag.o
# Platform specific tweaks
#
+# Platform specific defaults. Where we'd only like some feature on the
+# minority of systems, e.g. if linking to a library isn't needed
+# because its features are included in the GNU C library.
+ifndef NO_GETTEXT
+ # Systems that use GNU gettext and glibc are the exception
+ NEEDS_LIBINTL = YesPlease
+
+ # Systems that don't use GNU gettext are the exception. Only
+ # Solaris has a mature non-GNU gettext implementation.
+ GNU_GETTEXT = YesPlease
+
+ # Since we assume a GNU gettext by default we also assume a
+ # GNU-like langinfo.h by default
+ HAVE_LIBCHARSET_H =
+endif
+
# We choose to avoid "if .. else if .. else .. endif endif"
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
NO_STRLCPY = YesPlease
NO_MKSTEMPS = YesPlease
HAVE_PATHS_H = YesPlease
+ NEEDS_LIBINTL =
endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
NO_MKSTEMPS = YesPlease
HAVE_PATHS_H = YesPlease
+ NEEDS_LIBINTL =
endif
ifeq ($(uname_S),UnixWare)
CC = cc
NO_MKSTEMPS = YesPlease
NO_REGEX = YesPlease
NO_FNMATCH_CASEFOLD = YesPlease
+ifndef NO_GETTEXT
+ GNU_GETTEXT =
+endif
ifeq ($(uname_R),5.6)
SOCKLEN_T = int
NO_HSTRERROR = YesPlease
NO_STRLCPY=YesPlease
NO_MKSTEMPS = YesPlease
HAVE_PATHS_H = YesPlease
+ NEEDS_LIBINTL =
endif
ifeq ($(uname_S),IRIX)
NO_SETENV = YesPlease
EXTLIBS += /mingw/lib/libz.a
NO_R_TO_GCC_LINKER = YesPlease
INTERNAL_QSORT = YesPlease
+ifndef NO_GETTEXT
+ HAVE_LIBCHARSET_H = YesPlease
+endif
else
NO_CURL = YesPlease
endif
export GIT_TEST_CMP_USE_COPIED_CONTEXT
endif
+ifdef NO_GETTEXT
+ COMPAT_CFLAGS += -DNO_GETTEXT
+endif
+
+ifdef NEEDS_LIBINTL
+ EXTLIBS += -lintl
+endif
+
+ifdef GNU_GETTEXT
+ MSGFMT += --check
+endif
+
+ifdef GETTEXT_POISON
+ COMPAT_CFLAGS += -DGETTEXT_POISON
+endif
+
ifeq ($(TCLTK_PATH),)
NO_TCLTK=NoThanks
endif
QUIET_GEN = @echo ' ' GEN $@;
QUIET_LNCP = @echo ' ' LN/CP $@;
QUIET_GCOV = @echo ' ' GCOV $@;
+ QUIET_MSGFMT = @echo ' ' MSGFMT $@;
QUIET_SUBDIR0 = +@subdir=
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
$(MAKE) $(PRINT_DIR) -C $$subdir
htmldir_SQ = $(subst ','\'',$(htmldir))
prefix_SQ = $(subst ','\'',$(prefix))
gitwebdir_SQ = $(subst ','\'',$(gitwebdir))
+sharedir_SQ = $(subst ','\'',$(sharedir))
+LOCALEDIR_SQ = $(subst ','\'',$(localedir))
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
$(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
endif
ifndef NO_PERL
- $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
+ $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all
endif
ifndef NO_PYTHON
$(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@@DIFF@@|$(DIFF_SQ)|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's|@@LOCALEDIR@@|$(LOCALEDIR_SQ)|g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
-e $(BROKEN_PATH_FIX) \
$@.sh >$@+
@@ -1985,6 +2066,10 @@ attr.s attr.o: EXTRA_CPPFLAGS = -DETC_GITATTRIBUTES='"$(ETC_GITATTRIBUTES_SQ)"'
http.s http.o: EXTRA_CPPFLAGS = -DGIT_HTTP_USER_AGENT='"git/$(GIT_VERSION)"'
+ifdef HAVE_LIBCHARSET_H
+gettext.s gettext.o: EXTRA_CPPFLAGS = -DHAVE_LIBCHARSET_H
+endif
+
ifdef NO_EXPAT
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
$(RM) cscope*
$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+XGETTEXT_OPTIONS = \
+ --add-comments \
+ --msgid-bugs-address="Git Mailing List <git@vger.kernel.org>" \
+ --from-code=UTF-8 \
+ --output=po/git.pot
+
+XGETTEXT_OPTIONS_C = $(XGETTEXT_OPTIONS) --keyword=_ --keyword=N_ --language=C
+XGETTEXT_OPTIONS_SH = $(XGETTEXT_OPTIONS) --language=Shell
+XGETTEXT_OPTIONS_PERL = $(XGETTEXT_OPTIONS) --keyword=__ --language=Perl
+
+LOCALIZED_C = $(C_OBJ:o=c)
+LOCALIZED_SH = $(SCRIPT_SH)
+LOCALIZED_PERL = $(SCRIPT_PERL)
+
+ifdef XGETTEXT_INCLUDE_TESTS
+LOCALIZED_C += t/t0200/test.c
+LOCALIZED_SH += t/t0200/test.sh
+LOCALIZED_PERL += t/t0200/test.perl
+endif
+
+pot:
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_C) $(LOCALIZED_C)
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_SH) --join-existing $(LOCALIZED_SH)
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_PERL) --join-existing $(LOCALIZED_PERL)
+
+POFILES := $(wildcard po/*.po)
+MOFILES := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/git.mo,$(POFILES))
+MODIRS := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/,$(POFILES))
+ifndef NO_GETTEXT
+all:: $(MOFILES)
+endif
+share/locale/%/LC_MESSAGES/git.mo: po/%.po
+ @mkdir -p $(dir $@)
+ $(QUIET_MSGFMT)$(MSGFMT) -o $@ $<
+
### Detect prefix changes
TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
@echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@
endif
+ @echo NO_GETTEXT=\''$(subst ','\'',$(subst ','\'',$(NO_GETTEXT)))'\' >>$@
+ @echo GETTEXT_POISON=\''$(subst ','\'',$(subst ','\'',$(GETTEXT_POISON)))'\' >>$@
### Detect Tck/Tk interpreter path changes
ifndef NO_TCLTK
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
+ifndef NO_GETTEXT
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sharedir_SQ)/locale'
+ (cd share && tar cf - locale) | \
+ (cd '$(DESTDIR_SQ)$(sharedir_SQ)' && umask 022 && tar xof -)
+endif
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
ifndef NO_PERL
$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
$(MAKE) -C git-gui clean
endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
+ifndef NO_GETTEXT
+ $(RM) po/git.pot
+ $(RM) -r share/
+endif
.PHONY: all install clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
diff --git a/branch.c b/branch.c
index 93dc866f8c09a2da2308c4fd677178b043f2d4d5..19310e4e88cf8276b418b7f20c95e1faa97f6020 100644 (file)
--- a/branch.c
+++ b/branch.c
break;
case 1:
/* Unique completion -- good, only if it is a real ref */
- if (explicit_tracking && !strcmp(real_ref, "HEAD"))
- die("Cannot setup tracking information; starting point is not a branch.");
+ if (!strcmp(real_ref, "HEAD")) {
+ if (explicit_tracking)
+ die("Cannot setup tracking information; starting point is not a branch.");
+ else
+ real_ref = NULL;
+ }
break;
default:
die("Ambiguous object name: '%s'.", start_name);
diff --git a/builtin.h b/builtin.h
index 904e067a88f242b42f16b715d2b67b45a101e468..9321816204fc703800202c508edd7918a493d024 100644 (file)
--- a/builtin.h
+++ b/builtin.h
#include "cache.h"
#include "commit.h"
#include "notes.h"
+#include "gettext.h"
#define DEFAULT_MERGE_LOG_LEN 20
extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
extern int cmd_replace(int argc, const char **argv, const char *prefix);
+extern int cmd_skew(int argc, const char **argv, const char *prefix);
#endif
diff --git a/builtin/add.c b/builtin/add.c
index 12b964e642b91863776f161a7b2aab2ec216efcb..ac9a5b4a40b08fb3ac81ec088d03df1de8d219eb 100644 (file)
--- a/builtin/add.c
+++ b/builtin/add.c
const char *path = p->one->path;
switch (p->status) {
default:
- die("unexpected diff status %c", p->status);
+ die(_("unexpected diff status %c"), p->status);
case DIFF_STATUS_UNMERGED:
/*
* ADD_CACHE_IGNORE_REMOVAL is unset if "git
case DIFF_STATUS_TYPE_CHANGED:
if (add_file_to_index(&the_index, path, data->flags)) {
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
- die("updating files failed");
+ die(_("updating files failed"));
data->add_errors++;
}
break;
if (!(data->flags & ADD_CACHE_PRETEND))
remove_file_from_index(&the_index, path);
if (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))
- printf("remove '%s'\n", path);
+ printf(_("remove '%s'\n"), path);
break;
}
}
struct rev_info rev;
init_revisions(&rev, prefix);
setup_revisions(0, NULL, &rev, NULL);
- rev.prune_data = pathspec;
+ init_pathspec(&rev.prune_data, pathspec);
rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
rev.diffopt.format_callback = update_callback;
data.flags = flags;
/* strip trailing slash */
pathspec[j] = xstrndup(ce->name, len);
else
- die ("Path '%s' is in submodule '%.*s'",
+ die (_("Path '%s' is in submodule '%.*s'"),
pathspec[j], len, ce->name);
}
}
/* nothing */;
seen = xcalloc(specs, 1);
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
- pathspec, seen, "Unstaged changes after refreshing the index:");
+ pathspec, seen, _("Unstaged changes after refreshing the index:"));
for (i = 0; i < specs; i++) {
if (!seen[i])
- die("pathspec '%s' did not match any files", pathspec[i]);
+ die(_("pathspec '%s' did not match any files"), pathspec[i]);
}
free(seen);
}
@@ -205,7 +205,7 @@ static const char **validate_pathspec(int argc, const char **argv, const char *p
for (p = pathspec; *p; p++) {
if (has_symlink_leading_path(*p, strlen(*p))) {
int len = prefix ? strlen(prefix) : 0;
- die("'%s' is beyond a symbolic link", *p + len);
+ die(_("'%s' is beyond a symbolic link"), *p + len);
}
}
}
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
if (read_cache() < 0)
- die ("Could not read the index");
+ die (_("Could not read the index"));
init_revisions(&rev, prefix);
rev.diffopt.context = 7;
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
out = open(file, O_CREAT | O_WRONLY, 0644);
if (out < 0)
- die ("Could not open '%s' for writing.", file);
+ die (_("Could not open '%s' for writing."), file);
rev.diffopt.file = xfdopen(out, "w");
rev.diffopt.close_file = 1;
if (run_diff_files(&rev, 0))
- die ("Could not write patch");
+ die (_("Could not write patch"));
launch_editor(file, NULL, NULL);
if (stat(file, &st))
- die_errno("Could not stat '%s'", file);
+ die_errno(_("Could not stat '%s'"), file);
if (!st.st_size)
- die("Empty patch. Aborted.");
+ die(_("Empty patch. Aborted."));
memset(&child, 0, sizeof(child));
child.git_cmd = 1;
child.argv = apply_argv;
if (run_command(&child))
- die ("Could not apply '%s'", file);
+ die (_("Could not apply '%s'"), file);
unlink(file);
return 0;
fprintf(stderr, ignore_error);
for (i = 0; i < dir->ignored_nr; i++)
fprintf(stderr, "%s\n", dir->ignored[i]->name);
- fprintf(stderr, "Use -f if you really want to add them.\n");
- die("no files added");
+ fprintf(stderr, _("Use -f if you really want to add them.\n"));
+ die(_("no files added"));
}
for (i = 0; i < dir->nr; i++)
if (add_file_to_cache(dir->entries[i]->name, flags)) {
if (!ignore_add_errors)
- die("adding files failed");
+ die(_("adding files failed"));
exit_status = 1;
}
return exit_status;
argv++;
if (addremove && take_worktree_changes)
- die("-A and -u are mutually incompatible");
+ die(_("-A and -u are mutually incompatible"));
if (!show_only && ignore_missing)
- die("Option --ignore-missing can only be used together with --dry-run");
+ die(_("Option --ignore-missing can only be used together with --dry-run"));
if ((addremove || take_worktree_changes) && !argc) {
static const char *here[2] = { ".", NULL };
argc = 1;
? ADD_CACHE_IGNORE_REMOVAL : 0));
if (require_pathspec && argc == 0) {
- fprintf(stderr, "Nothing specified, nothing added.\n");
- fprintf(stderr, "Maybe you wanted to say 'git add .'?\n");
+ fprintf(stderr, _("Nothing specified, nothing added.\n"));
+ fprintf(stderr, _("Maybe you wanted to say 'git add .'?\n"));
return 0;
}
pathspec = validate_pathspec(argc, argv, prefix);
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
treat_gitlinks(pathspec);
if (add_new_files) {
if (excluded(&dir, pathspec[i], &dtype))
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
} else
- die("pathspec '%s' did not match any files",
+ die(_("pathspec '%s' did not match any files"),
pathspec[i]);
}
}
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
- die("Unable to write new index file");
+ die(_("Unable to write new index file"));
}
return exit_status;
diff --git a/builtin/archive.c b/builtin/archive.c
index 6a887f5a9d785d23f1be76fd86fc17896b2b48d7..b14eaba1594bad060e0c881326368b9b2be3b158 100644 (file)
--- a/builtin/archive.c
+++ b/builtin/archive.c
{
int output_fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
if (output_fd < 0)
- die_errno("could not create archive file '%s'", output_file);
+ die_errno(_("could not create archive file '%s'"), output_file);
if (output_fd != 1) {
if (dup2(output_fd, 1) < 0)
- die_errno("could not redirect output");
+ die_errno(_("could not redirect output"));
else
close(output_fd);
}
_remote = remote_get(remote);
if (!_remote->url[0])
- die("git archive: Remote with no URL");
+ die(_("git archive: Remote with no URL"));
transport = transport_get(_remote, _remote->url[0]);
transport_connect(transport, "git-upload-archive", exec, fd);
len = packet_read_line(fd[0], buf, sizeof(buf));
if (!len)
- die("git archive: expected ACK/NAK, got EOF");
+ die(_("git archive: expected ACK/NAK, got EOF"));
if (buf[len-1] == '\n')
buf[--len] = 0;
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
- die("git archive: NACK %s", buf + 5);
- die("git archive: protocol error");
+ die(_("git archive: NACK %s"), buf + 5);
+ die(_("git archive: protocol error"));
}
len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
- die("git archive: expected a flush");
+ die(_("git archive: expected a flush"));
/* Now, start reading from fd[0] and spit it out to stdout */
rv = recv_sideband("archive", fd[0], 1);
diff --git a/builtin/branch.c b/builtin/branch.c
index 9e546e4a83d07dd6dd4d4b0cb7d23a02c82747fb..244589e73657bf1f2eaa1450c36f59869c0a44d6 100644 (file)
--- a/builtin/branch.c
+++ b/builtin/branch.c
if ((head_rev != reference_rev) &&
in_merge_bases(rev, &head_rev, 1) != merged) {
if (merged)
- warning("deleting branch '%s' that has been merged to\n"
- " '%s', but it is not yet merged to HEAD.",
+ warning(_("deleting branch '%s' that has been merged to\n"
+ " '%s', but it is not yet merged to HEAD."),
name, reference_name);
else
- warning("not deleting branch '%s' that is not yet merged to\n"
- " '%s', even though it is merged to HEAD.",
+ warning(_("not deleting branch '%s' that is not yet merged to\n"
+ " '%s', even though it is merged to HEAD."),
name, reference_name);
}
return merged;
switch (kinds) {
case REF_REMOTE_BRANCH:
fmt = "refs/remotes/%s";
- remote = "remote ";
+ /* TRANSLATORS: This is "remote " in "remote branch '%s' not found" */
+ remote = _("remote ");
force = 1;
break;
case REF_LOCAL_BRANCH:
remote = "";
break;
default:
- die("cannot use -a with -d");
+ die(_("cannot use -a with -d"));
}
if (!force) {
head_rev = lookup_commit_reference(head_sha1);
if (!head_rev)
- die("Couldn't look up commit object for HEAD");
+ die(_("Couldn't look up commit object for HEAD"));
}
for (i = 0; i < argc; i++, strbuf_release(&bname)) {
strbuf_branchname(&bname, argv[i]);
if (kinds == REF_LOCAL_BRANCH && !strcmp(head, bname.buf)) {
- error("Cannot delete the branch '%s' "
- "which you are currently on.", bname.buf);
+ error(_("Cannot delete the branch '%s' "
+ "which you are currently on."), bname.buf);
ret = 1;
continue;
}
name = xstrdup(mkpath(fmt, bname.buf));
if (!resolve_ref(name, sha1, 1, NULL)) {
- error("%sbranch '%s' not found.",
+ error(_("%sbranch '%s' not found."),
remote, bname.buf);
ret = 1;
continue;
rev = lookup_commit_reference(sha1);
if (!rev) {
- error("Couldn't look up commit object for '%s'", name);
+ error(_("Couldn't look up commit object for '%s'"), name);
ret = 1;
continue;
}
if (!force && !branch_merged(kinds, bname.buf, rev, head_rev)) {
- error("The branch '%s' is not fully merged.\n"
+ error(_("The branch '%s' is not fully merged.\n"
"If you are sure you want to delete it, "
- "run 'git branch -D %s'.", bname.buf, bname.buf);
+ "run 'git branch -D %s'."), bname.buf, bname.buf);
ret = 1;
continue;
}
if (delete_ref(name, sha1, 0)) {
- error("Error deleting %sbranch '%s'", remote,
+ error(_("Error deleting %sbranch '%s'"), remote,
bname.buf);
ret = 1;
} else {
struct strbuf buf = STRBUF_INIT;
- printf("Deleted %sbranch %s (was %s).\n", remote,
+ printf(_("Deleted %sbranch %s (was %s).\n"), remote,
bname.buf,
find_unique_abbrev(sha1, DEFAULT_ABBREV));
strbuf_addf(&buf, "branch.%s", bname.buf);
if (git_config_rename_section(buf.buf, NULL) < 0)
- warning("Update of config-file failed");
+ warning(_("Update of config-file failed"));
strbuf_release(&buf);
}
}
@@ -300,7 +301,7 @@ static int append_ref(const char *refname, const unsigned char *sha1, int flags,
if (ref_list->verbose || ref_list->with_commit || merge_filter != NO_FILTER) {
commit = lookup_commit_reference_gently(sha1, 1);
if (!commit) {
- cb->ret = error("branch '%s' does not point at a commit", refname);
+ cb->ret = error(_("branch '%s' does not point at a commit"), refname);
return 0;
}
strbuf_addf(stat, "%s: ",
shorten_unambiguous_ref(branch->merge[0]->dst, 0));
if (!ours)
- strbuf_addf(stat, "behind %d] ", theirs);
+ strbuf_addf(stat, _("behind %d] "), theirs);
else if (!theirs)
- strbuf_addf(stat, "ahead %d] ", ours);
+ strbuf_addf(stat, _("ahead %d] "), ours);
else
- strbuf_addf(stat, "ahead %d, behind %d] ", ours, theirs);
+ strbuf_addf(stat, _("ahead %d, behind %d] "), ours, theirs);
}
static int matches_merge_filter(struct commit *commit)
if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
struct ref_item item;
- item.name = xstrdup("(no branch)");
+ item.name = xstrdup(_("(no branch)"));
item.len = strlen(item.name);
item.kind = REF_LOCAL_BRANCH;
item.dest = NULL;
@@ -535,7 +536,7 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
free_ref_list(&ref_list);
if (cb.ret)
- error("some refs could not be read");
+ error(_("some refs could not be read"));
return cb.ret;
}
int recovery = 0;
if (!oldname)
- die("cannot rename the current branch while not on any.");
+ die(_("cannot rename the current branch while not on any."));
if (strbuf_check_branch_ref(&oldref, oldname)) {
/*
@@ -558,35 +559,35 @@ static void rename_branch(const char *oldname, const char *newname, int force)
if (resolve_ref(oldref.buf, sha1, 1, NULL))
recovery = 1;
else
- die("Invalid branch name: '%s'", oldname);
+ die(_("Invalid branch name: '%s'"), oldname);
}
if (strbuf_check_branch_ref(&newref, newname))
- die("Invalid branch name: '%s'", newname);
+ die(_("Invalid branch name: '%s'"), newname);
if (resolve_ref(newref.buf, sha1, 1, NULL) && !force)
- die("A branch named '%s' already exists.", newref.buf + 11);
+ die(_("A branch named '%s' already exists."), newref.buf + 11);
strbuf_addf(&logmsg, "Branch: renamed %s to %s",
oldref.buf, newref.buf);
if (rename_ref(oldref.buf, newref.buf, logmsg.buf))
- die("Branch rename failed");
+ die(_("Branch rename failed"));
strbuf_release(&logmsg);
if (recovery)
- warning("Renamed a misnamed branch '%s' away", oldref.buf + 11);
+ warning(_("Renamed a misnamed branch '%s' away"), oldref.buf + 11);
/* no need to pass logmsg here as HEAD didn't really move */
if (!strcmp(oldname, head) && create_symref("HEAD", newref.buf, NULL))
- die("Branch renamed to %s, but HEAD is not updated!", newname);
+ die(_("Branch renamed to %s, but HEAD is not updated!"), newname);
strbuf_addf(&oldsection, "branch.%s", oldref.buf + 11);
strbuf_release(&oldref);
strbuf_addf(&newsection, "branch.%s", newref.buf + 11);
strbuf_release(&newref);
if (git_config_rename_section(oldsection.buf, newsection.buf) < 0)
- die("Branch is renamed, but update of config-file failed");
+ die(_("Branch is renamed, but update of config-file failed"));
strbuf_release(&oldsection);
strbuf_release(&newsection);
}
@@ -601,7 +602,7 @@ static int opt_parse_merge_filter(const struct option *opt, const char *arg, int
if (!arg)
arg = "HEAD";
if (get_sha1(arg, merge_filter_ref))
- die("malformed object name %s", arg);
+ die(_("malformed object name %s"), arg);
return 0;
}
head = resolve_ref("HEAD", head_sha1, 0, NULL);
if (!head)
- die("Failed to resolve HEAD as a valid ref.");
+ die(_("Failed to resolve HEAD as a valid ref."));
head = xstrdup(head);
if (!strcmp(head, "HEAD")) {
detached = 1;
} else {
if (prefixcmp(head, "refs/heads/"))
- die("HEAD not found below refs/heads!");
+ die(_("HEAD not found below refs/heads!"));
head += 11;
}
hashcpy(merge_filter_ref, head_sha1);
rename_branch(argv[0], argv[1], rename > 1);
else if (argc <= 2) {
if (kinds != REF_LOCAL_BRANCH)
- die("-a and -r options to 'git branch' do not make sense with a branch name");
+ die(_("-a and -r options to 'git branch' do not make sense with a branch name"));
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
force_create, reflog, track);
} else
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 9b87fb9ac2505e746ae34db34740cdfb3cfde127..81046a9cb870aab59a56492e175a51c032ad96ce 100644 (file)
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
close(bundle_fd);
if (verify_bundle(&header, 1))
return 1;
- fprintf(stderr, "%s is okay\n", bundle_file);
+ fprintf(stderr, _("%s is okay\n"), bundle_file);
return 0;
}
if (!strcmp(cmd, "list-heads")) {
}
if (!strcmp(cmd, "create")) {
if (!startup_info->have_repository)
- die("Need a repository to create a bundle.");
+ die(_("Need a repository to create a bundle."));
return !!create_bundle(&header, bundle_file, argc, argv);
} else if (!strcmp(cmd, "unbundle")) {
if (!startup_info->have_repository)
- die("Need a repository to unbundle.");
+ die(_("Need a repository to unbundle."));
return !!unbundle(&header, bundle_fd) ||
list_bundle_refs(&header, argc, argv);
} else
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 757f9a08ddbaf102726a781b06d7294a4638984e..054f363417c24e41271963f8339673b302bb41a6 100644 (file)
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
return 0;
pos++;
}
- return error("path '%s' does not have %s version",
- ce->name,
- (stage == 2) ? "our" : "their");
+ if (stage == 2)
+ return error(_("path '%s' does not have our version"), ce->name);
+ else
+ return error(_("path '%s' does not have their version"), ce->name);
}
static int check_all_stages(struct cache_entry *ce, int pos)
ce_stage(active_cache[pos+1]) != 2 ||
strcmp(active_cache[pos+2]->name, ce->name) ||
ce_stage(active_cache[pos+2]) != 3)
- return error("path '%s' does not have all three versions",
+ return error(_("path '%s' does not have all three versions"),
ce->name);
return 0;
}
return checkout_entry(active_cache[pos], state, NULL);
pos++;
}
- return error("path '%s' does not have %s version",
- ce->name,
- (stage == 2) ? "our" : "their");
+ if (stage == 2)
+ return error(_("path '%s' does not have our version"), ce->name);
+ else
+ return error(_("path '%s' does not have their version"), ce->name);
}
static int checkout_merged(int pos, struct checkout *state)
ce_stage(active_cache[pos+1]) != 2 ||
strcmp(active_cache[pos+2]->name, path) ||
ce_stage(active_cache[pos+2]) != 3)
- return error("path '%s' does not have all 3 versions", path);
+ return error(_("path '%s' does not have all 3 versions"), path);
read_mmblob(&ancestor, active_cache[pos]->sha1);
read_mmblob(&ours, active_cache[pos+1]->sha1);
free(theirs.ptr);
if (status < 0 || !result_buf.ptr) {
free(result_buf.ptr);
- return error("path '%s': cannot merge", path);
+ return error(_("path '%s': cannot merge"), path);
}
/*
*/
if (write_sha1_file(result_buf.ptr, result_buf.size,
blob_type, sha1))
- die("Unable to add merge result for '%s'", path);
+ die(_("Unable to add merge result for '%s'"), path);
ce = make_cache_entry(create_ce_mode(active_cache[pos+1]->ce_mode),
sha1,
path, 2, 0);
if (!ce)
- die("make_cache_entry failed for path '%s'", path);
+ die(_("make_cache_entry failed for path '%s'"), path);
status = checkout_entry(ce, state, NULL);
return status;
}
newfd = hold_locked_index(lock_file, 1);
if (read_cache_preload(pathspec) < 0)
- return error("corrupt index file");
+ return error(_("corrupt index file"));
if (source_tree)
read_tree_some(source_tree, pathspec);
if (!ce_stage(ce))
continue;
if (opts->force) {
- warning("path '%s' is unmerged", ce->name);
+ warning(_("path '%s' is unmerged"), ce->name);
} else if (stage) {
errs |= check_stage(stage, ce, pos);
} else if (opts->merge) {
errs |= check_all_stages(ce, pos);
} else {
errs = 1;
- error("path '%s' is unmerged", ce->name);
+ error(_("path '%s' is unmerged"), ce->name);
}
pos = skip_same_name(ce, pos) - 1;
}
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock_file))
- die("unable to write new index file");
+ die(_("unable to write new index file"));
resolve_ref("HEAD", rev, 0, &flag);
head = lookup_commit_reference_gently(rev, 1);
rev.diffopt.flags = opts->flags;
rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
if (diff_setup_done(&rev.diffopt) < 0)
- die("diff_setup_done failed");
+ die(_("diff_setup_done failed"));
add_pending_object(&rev, head, NULL);
run_diff_index(&rev, 0);
}
int newfd = hold_locked_index(lock_file, 1);
if (read_cache_preload(NULL) < 0)
- return error("corrupt index file");
+ return error(_("corrupt index file"));
resolve_undo_clear();
if (opts->force) {
refresh_cache(REFRESH_QUIET);
if (unmerged_cache()) {
- error("you need to resolve your current index first");
+ error(_("you need to resolve your current index first"));
return 1;
}
topts.gently = opts->merge && old->commit;
topts.verbose_update = !opts->quiet;
topts.fn = twoway_merge;
- topts.dir = xcalloc(1, sizeof(*topts.dir));
- topts.dir->flags |= DIR_SHOW_IGNORED;
- topts.dir->exclude_per_dir = ".gitignore";
+ if (!ignored_are_precious) {
+ topts.dir = xcalloc(1, sizeof(*topts.dir));
+ topts.dir->flags |= DIR_SHOW_IGNORED;
+ topts.dir->exclude_per_dir = ".gitignore";
+ }
tree = parse_tree_indirect(old->commit ?
old->commit->object.sha1 :
(unsigned char *)EMPTY_TREE_SHA1_BIN);
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock_file))
- die("unable to write new index file");
+ die(_("unable to write new index file"));
if (!opts->force && !opts->quiet)
show_local_changes(&new->commit->object, &opts->diff_options);
temp = log_all_ref_updates;
log_all_ref_updates = 1;
if (log_ref_setup(ref_name, log_file, sizeof(log_file))) {
- fprintf(stderr, "Can not do reflog for '%s'\n",
+ fprintf(stderr, _("Can not do reflog for '%s'\n"),
opts->new_orphan_branch);
log_all_ref_updates = temp;
return;
create_symref("HEAD", new->path, msg.buf);
if (!opts->quiet) {
if (old->path && !strcmp(new->path, old->path))
- fprintf(stderr, "Already on '%s'\n",
+ fprintf(stderr, _("Already on '%s'\n"),
new->name);
else if (opts->new_branch)
- fprintf(stderr, "Switched to%s branch '%s'\n",
- opts->branch_exists ? " and reset" : " a new",
- new->name);
+ if (opts->branch_exists)
+ fprintf(stderr, _("Switched to and reset branch '%s'\n"), new->name);
+ else
+ fprintf(stderr, _("Switched to a new branch '%s'\n"), new->name);
else
- fprintf(stderr, "Switched to branch '%s'\n",
+ fprintf(stderr, _("Switched to branch '%s'\n"),
new->name);
}
if (old->path && old->name) {
if (!opts->quiet) {
if (old->path && advice_detached_head)
detach_advice(old->path, new->name);
- describe_detached_head("HEAD is now at", new->commit);
+ describe_detached_head(_("HEAD is now at"), new->commit);
}
}
remove_branch_state();
new->name = "HEAD";
new->commit = old.commit;
if (!new->commit)
- die("You are on a branch yet to be born");
+ die(_("You are on a branch yet to be born"));
parse_commit(new->commit);
}
* to remind the user that it might be lost.
*/
if (!opts->quiet && !old.path && old.commit && new->commit != old.commit)
- describe_detached_head("Previous HEAD position was", old.commit);
+ describe_detached_head(_("Previous HEAD position was"), old.commit);
update_refs_for_switch(opts, &old, new);
int cmd_checkout(int argc, const char **argv, const char *prefix)
{
struct checkout_opts opts;
- unsigned char rev[20];
+ unsigned char rev[20], branch_rev[20];
const char *arg;
struct branch_info new;
struct tree *source_tree = NULL;
OPT_SET_INT('3', "theirs", &opts.writeout_stage, "checkout their version for unmerged files",
3),
OPT__FORCE(&opts.force, "force checkout (throw away local modifications)"),
+ OPT_BOOLEAN('i', "ignored-are-precious", &ignored_are_precious,
+ "fail when an ignored file needs to be overwritten"),
OPT_BOOLEAN('m', "merge", &opts.merge, "perform a 3-way merge with the new branch"),
OPT_STRING(0, "conflict", &conflict_style, "style",
"conflict style (merge or diff3)"),
/* we can assume from now on new_branch = !new_branch_force */
if (opts.new_branch && opts.new_branch_force)
- die("-B cannot be used with -b");
+ die(_("-B cannot be used with -b"));
/* copy -B over to -b, so that we can just check the latter */
if (opts.new_branch_force)
if (patch_mode && (opts.track > 0 || opts.new_branch
|| opts.new_branch_log || opts.merge || opts.force))
- die ("--patch is incompatible with all other options");
+ die (_("--patch is incompatible with all other options"));
/* --track without -b should DWIM */
if (0 < opts.track && !opts.new_branch) {
const char *argv0 = argv[0];
if (!argc || !strcmp(argv0, "--"))
- die ("--track needs a branch name");
+ die (_("--track needs a branch name"));
if (!prefixcmp(argv0, "refs/"))
argv0 += 5;
if (!prefixcmp(argv0, "remotes/"))
argv0 += 8;
argv0 = strchr(argv0, '/');
if (!argv0 || !argv0[1])
- die ("Missing branch name; try -b");
+ die (_("Missing branch name; try -b"));
opts.new_branch = argv0 + 1;
}
if (opts.new_orphan_branch) {
if (opts.new_branch)
- die("--orphan and -b|-B are mutually exclusive");
+ die(_("--orphan and -b|-B are mutually exclusive"));
if (opts.track > 0)
- die("--orphan cannot be used with -t");
+ die(_("--orphan cannot be used with -t"));
opts.new_branch = opts.new_orphan_branch;
}
}
if (opts.force && opts.merge)
- die("git checkout: -f and -m are incompatible");
+ die(_("git checkout: -f and -m are incompatible"));
/*
* case 1: git checkout <ref> -- [<paths>]
if (get_sha1_mb(arg, rev)) {
if (has_dash_dash) /* case (1) */
- die("invalid reference: %s", arg);
+ die(_("invalid reference: %s"), arg);
if (!patch_mode &&
dwim_new_local_branch &&
opts.track == BRANCH_TRACK_UNSPECIFIED &&
argc--;
new.name = arg;
- if ((new.commit = lookup_commit_reference_gently(rev, 1))) {
- setup_branch_path(&new);
+ setup_branch_path(&new);
- if ((check_ref_format(new.path) == CHECK_REF_FORMAT_OK) &&
- resolve_ref(new.path, rev, 1, NULL))
- ;
- else
- new.path = NULL;
+ if (check_ref_format(new.path) == CHECK_REF_FORMAT_OK &&
+ resolve_ref(new.path, branch_rev, 1, NULL))
+ hashcpy(rev, branch_rev);
+ else
+ new.path = NULL; /* not an existing branch */
+
+ if (!(new.commit = lookup_commit_reference_gently(rev, 1))) {
+ /* not a commit */
+ source_tree = parse_tree_indirect(rev);
+ } else {
parse_commit(new.commit);
source_tree = new.commit->tree;
- } else
- source_tree = parse_tree_indirect(rev);
+ }
if (!source_tree) /* case (1): want a tree */
- die("reference is not a tree: %s", arg);
+ die(_("reference is not a tree: %s"), arg);
if (!has_dash_dash) {/* case (3 -> 1) */
/*
* Do not complain the most common case
const char **pathspec = get_pathspec(prefix, argv);
if (!pathspec)
- die("invalid path specification");
+ die(_("invalid path specification"));
if (patch_mode)
return interactive_checkout(new.name, pathspec, &opts);
/* Checkout paths */
if (opts.new_branch) {
if (argc == 1) {
- die("git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout '%s' which can not be resolved as commit?", argv[0]);
+ die(_("git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout '%s' which can not be resolved as commit?"), argv[0]);
} else {
- die("git checkout: updating paths is incompatible with switching branches.");
+ die(_("git checkout: updating paths is incompatible with switching branches."));
}
}
if (1 < !!opts.writeout_stage + !!opts.force + !!opts.merge)
- die("git checkout: --ours/--theirs, --force and --merge are incompatible when\nchecking out of the index.");
+ die(_("git checkout: --ours/--theirs, --force and --merge are incompatible when\nchecking out of the index."));
return checkout_paths(source_tree, pathspec, &opts);
}
if (opts.new_branch) {
struct strbuf buf = STRBUF_INIT;
if (strbuf_check_branch_ref(&buf, opts.new_branch))
- die("git checkout: we do not like '%s' as a branch name.",
+ die(_("git checkout: we do not like '%s' as a branch name."),
opts.new_branch);
if (!get_sha1(buf.buf, rev)) {
opts.branch_exists = 1;
if (!opts.new_branch_force)
- die("git checkout: branch %s already exists",
+ die(_("git checkout: branch %s already exists"),
opts.new_branch);
}
strbuf_release(&buf);
}
if (new.name && !new.commit) {
- die("Cannot switch branch to a non-commit.");
+ die(_("Cannot switch branch to a non-commit."));
}
if (opts.writeout_stage)
- die("--ours/--theirs is incompatible with switching branches.");
+ die(_("--ours/--theirs is incompatible with switching branches."));
return switch_branches(&opts, &new);
}
diff --git a/builtin/clean.c b/builtin/clean.c
index 4a312abc6b3ecef5f174b2786ad31385ba058b44..75697f711116e42df1e21e608c21829f49549b08 100644 (file)
--- a/builtin/clean.c
+++ b/builtin/clean.c
dir.flags |= DIR_SHOW_IGNORED;
if (ignored && ignored_only)
- die("-x and -X cannot be used together");
-
- if (!show_only && !force)
- die("clean.requireForce %s to true and neither -n nor -f given; "
- "refusing to clean", config_set ? "set" : "defaults");
+ die(_("-x and -X cannot be used together"));
+
+ if (!show_only && !force) {
+ if (config_set)
+ die(_("clean.requireForce set to true and neither -n nor -f given; "
+ "refusing to clean"));
+ else
+ die(_("clean.requireForce defaults to true and neither -n nor -f given; "
+ "refusing to clean"));
+ }
if (force > 1)
rm_flags = 0;
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
if (!ignored)
setup_standard_excludes(&dir);
qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
if (show_only && (remove_directories ||
(matches == MATCHED_EXACTLY))) {
- printf("Would remove %s\n", qname);
+ printf(_("Would remove %s\n"), qname);
} else if (remove_directories ||
(matches == MATCHED_EXACTLY)) {
if (!quiet)
- printf("Removing %s\n", qname);
+ printf(_("Removing %s\n"), qname);
if (remove_dir_recursively(&directory,
rm_flags) != 0) {
- warning("failed to remove %s", qname);
+ warning(_("failed to remove %s"), qname);
errors++;
}
} else if (show_only) {
- printf("Would not remove %s\n", qname);
+ printf(_("Would not remove %s\n"), qname);
} else {
- printf("Not removing %s\n", qname);
+ printf(_("Not removing %s\n"), qname);
}
strbuf_reset(&directory);
} else {
continue;
qname = quote_path_relative(ent->name, -1, &buf, prefix);
if (show_only) {
- printf("Would remove %s\n", qname);
+ printf(_("Would remove %s\n"), qname);
continue;
} else if (!quiet) {
- printf("Removing %s\n", qname);
+ printf(_("Removing %s\n"), qname);
}
if (unlink(ent->name) != 0) {
- warning("failed to remove %s", qname);
+ warning(_("failed to remove %s"), qname);
errors++;
}
}
diff --git a/builtin/clone.c b/builtin/clone.c
index 61e0989b5ab8fffb16ec28e64c38b4fa236cb3ed..5385728a4ed5f70f77946994c19de90cc621005a 100644 (file)
--- a/builtin/clone.c
+++ b/builtin/clone.c
* Clone a repository into a different directory that does not yet exist.
*/
-#include "cache.h"
+#include "builtin.h"
#include "parse-options.h"
#include "fetch-pack.h"
#include "refs.h"
#include "tree-walk.h"
#include "unpack-trees.h"
#include "transport.h"
-#include "strbuf.h"
#include "dir.h"
#include "pack-refs.h"
#include "sigchain.h"
if (is_directory(mkpath("%s/.git/objects", ref_git)))
ref_git = mkpath("%s/.git", ref_git);
else if (!is_directory(mkpath("%s/objects", ref_git)))
- die("reference repository '%s' is not a local directory.",
+ die(_("reference repository '%s' is not a local directory."),
option_reference);
ref_git_copy = xstrdup(ref_git);
dir = opendir(src->buf);
if (!dir)
- die_errno("failed to open '%s'", src->buf);
+ die_errno(_("failed to open '%s'"), src->buf);
if (mkdir(dest->buf, 0777)) {
if (errno != EEXIST)
- die_errno("failed to create directory '%s'", dest->buf);
+ die_errno(_("failed to create directory '%s'"), dest->buf);
else if (stat(dest->buf, &buf))
- die_errno("failed to stat '%s'", dest->buf);
+ die_errno(_("failed to stat '%s'"), dest->buf);
else if (!S_ISDIR(buf.st_mode))
- die("%s exists and is not a directory", dest->buf);
+ die(_("%s exists and is not a directory"), dest->buf);
}
strbuf_addch(src, '/');
strbuf_setlen(dest, dest_len);
strbuf_addstr(dest, de->d_name);
if (stat(src->buf, &buf)) {
- warning ("failed to stat %s\n", src->buf);
+ warning (_("failed to stat %s\n"), src->buf);
continue;
}
if (S_ISDIR(buf.st_mode)) {
}
if (unlink(dest->buf) && errno != ENOENT)
- die_errno("failed to unlink '%s'", dest->buf);
+ die_errno(_("failed to unlink '%s'"), dest->buf);
if (!option_no_hardlinks) {
if (!link(src->buf, dest->buf))
continue;
if (option_local)
- die_errno("failed to create link '%s'", dest->buf);
+ die_errno(_("failed to create link '%s'"), dest->buf);
option_no_hardlinks = 1;
}
if (copy_file_with_time(dest->buf, src->buf, 0666))
- die_errno("failed to copy file to '%s'", dest->buf);
+ die_errno(_("failed to copy file to '%s'"), dest->buf);
}
closedir(dir);
}
ret = transport_get_remote_refs(transport);
transport_disconnect(transport);
if (0 <= option_verbosity)
- printf("done.\n");
+ printf(_("done.\n"));
return ret;
}
builtin_clone_usage, 0);
if (argc > 2)
- usage_msg_opt("Too many arguments.",
+ usage_msg_opt(_("Too many arguments."),
builtin_clone_usage, builtin_clone_options);
if (argc == 0)
- usage_msg_opt("You must specify a repository to clone.",
+ usage_msg_opt(_("You must specify a repository to clone."),
builtin_clone_usage, builtin_clone_options);
if (option_mirror)
if (option_bare) {
if (option_origin)
- die("--bare and --origin %s options are incompatible.",
+ die(_("--bare and --origin %s options are incompatible."),
option_origin);
option_no_checkout = 1;
}
dest_exists = !stat(dir, &buf);
if (dest_exists && !is_empty_dir(dir))
- die("destination path '%s' already exists and is not "
- "an empty directory.", dir);
+ die(_("destination path '%s' already exists and is not "
+ "an empty directory."), dir);
strbuf_addf(&reflog_msg, "clone: from %s", repo);
else {
work_tree = getenv("GIT_WORK_TREE");
if (work_tree && !stat(work_tree, &buf))
- die("working tree '%s' already exists.", work_tree);
+ die(_("working tree '%s' already exists."), work_tree);
}
if (option_bare || work_tree)
if (!option_bare) {
junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
- die_errno("could not create leading directories of '%s'",
+ die_errno(_("could not create leading directories of '%s'"),
work_tree);
if (!dest_exists && mkdir(work_tree, 0755))
- die_errno("could not create work tree dir '%s'.",
+ die_errno(_("could not create work tree dir '%s'."),
work_tree);
set_git_work_tree(work_tree);
}
setenv(CONFIG_ENVIRONMENT, mkpath("%s/config", git_dir), 1);
if (safe_create_leading_directories_const(git_dir) < 0)
- die("could not create leading directories of '%s'", git_dir);
+ die(_("could not create leading directories of '%s'"), git_dir);
set_git_dir(make_absolute_path(git_dir));
- if (0 <= option_verbosity)
- printf("Cloning into %s%s...\n",
- option_bare ? "bare repository " : "", dir);
+ if (0 <= option_verbosity) {
+ if (option_bare)
+ printf(_("Cloning into bare repository %s\n"), dir);
+ else
+ printf(_("Cloning into %s\n"), dir);
+ }
init_db(option_template, INIT_DB_QUIET);
/*
transport = transport_get(remote, remote->url[0]);
if (!transport->get_refs_list || !transport->fetch)
- die("Don't know how to clone %s", transport->url);
+ die(_("Don't know how to clone %s"), transport->url);
transport_set_option(transport, TRANS_OPT_KEEP, "yes");
strbuf_release(&head);
if (!our_head_points_at) {
- warning("Remote branch %s not found in "
- "upstream %s, using HEAD instead",
+ warning(_("Remote branch %s not found in "
+ "upstream %s, using HEAD instead"),
option_branch, option_origin);
our_head_points_at = remote_head_points_at;
}
our_head_points_at = remote_head_points_at;
}
else {
- warning("You appear to have cloned an empty repository.");
+ warning(_("You appear to have cloned an empty repository."));
our_head_points_at = NULL;
remote_head_points_at = NULL;
remote_head = NULL;
} else {
/* Nothing to checkout out */
if (!option_no_checkout)
- warning("remote HEAD refers to nonexistent ref, "
- "unable to checkout.\n");
+ warning(_("remote HEAD refers to nonexistent ref, "
+ "unable to checkout.\n"));
option_no_checkout = 1;
}
if (write_cache(fd, active_cache, active_nr) ||
commit_locked_index(lock_file))
- die("unable to write new index file");
+ die(_("unable to write new index file"));
err |= run_hook(NULL, "post-checkout", sha1_to_hex(null_sha1),
sha1_to_hex(our_head_points_at->old_sha1), "1",
diff --git a/builtin/commit.c b/builtin/commit.c
index 03cff5af631fec975442c528b1ffba264b879c8e..b6f9b679fd5721d488d862ee6813e3c7a211b1f8 100644 (file)
--- a/builtin/commit.c
+++ b/builtin/commit.c
};
static const char implicit_ident_advice[] =
-"Your name and email address were configured automatically based\n"
+N_("Your name and email address were configured automatically based\n"
"on your username and hostname. Please check that they are accurate.\n"
"You can suppress this message by setting them explicitly:\n"
"\n"
"\n"
"After doing this, you may fix the identity used for this commit with:\n"
"\n"
-" git commit --amend --reset-author\n";
+" git commit --amend --reset-author\n");
static const char empty_amend_advice[] =
-"You asked to amend the most recent commit, but doing so would make\n"
+N_("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";
+"remove the commit entirely with \"git reset HEAD^\".\n");
static unsigned char head_sha1[20];
if (!lstat(p->string, &st)) {
if (add_to_cache(p->string, &st, 0))
- die("updating files failed");
+ die(_("updating files failed"));
} else
remove_file_from_cache(p->string);
}
opts.fn = oneway_merge;
tree = parse_tree_indirect(head_sha1);
if (!tree)
- die("failed to unpack HEAD tree object");
+ die(_("failed to unpack HEAD tree object"));
parse_tree(tree);
init_tree_desc(&t, tree->buffer, tree->size);
if (unpack_trees(1, &t, &opts))
refresh_flags |= REFRESH_UNMERGED;
if (interactive) {
if (interactive_add(argc, argv, prefix) != 0)
- die("interactive add failed");
+ die(_("interactive add failed"));
if (read_cache_preload(NULL) < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
commit_style = COMMIT_AS_IS;
return get_index_file();
}
pathspec = get_pathspec(prefix, argv);
if (read_cache_preload(pathspec) < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
/*
* Non partial, non as-is commit.
refresh_cache_or_die(refresh_flags);
if (write_cache(fd, active_cache, active_nr) ||
close_lock_file(&index_lock))
- die("unable to write new_index file");
+ die(_("unable to write new_index file"));
commit_style = COMMIT_NORMAL;
return index_lock.filename;
}
if (active_cache_changed) {
if (write_cache(fd, active_cache, active_nr) ||
commit_locked_index(&index_lock))
- die("unable to write new_index file");
+ die(_("unable to write new_index file"));
} else {
rollback_lock_file(&index_lock);
}
commit_style = COMMIT_PARTIAL;
if (in_merge)
- die("cannot do a partial commit during a merge.");
+ die(_("cannot do a partial commit during a merge."));
memset(&partial, 0, sizeof(partial));
partial.strdup_strings = 1;
@@ -388,14 +388,14 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int
discard_cache();
if (read_cache() < 0)
- die("cannot read the index");
+ die(_("cannot read the index"));
fd = hold_locked_index(&index_lock, 1);
add_remove_files(&partial);
refresh_cache(REFRESH_QUIET);
if (write_cache(fd, active_cache, active_nr) ||
close_lock_file(&index_lock))
- die("unable to write new_index file");
+ die(_("unable to write new_index file"));
fd = hold_lock_file_for_update(&false_lock,
git_path("next-index-%"PRIuMAX,
if (write_cache(fd, active_cache, active_nr) ||
close_lock_file(&false_lock))
- die("unable to write temporary index file");
+ die(_("unable to write temporary index file"));
discard_cache();
read_cache_from(false_lock.filename);
{
struct commit *commit = lookup_commit(sha1);
if (!commit || parse_commit(commit))
- die("could not parse HEAD commit");
+ die(_("could not parse HEAD commit"));
return !!(commit->parents && commit->parents->next);
}
a = strstr(use_message_buffer, "\nauthor ");
if (!a)
- die("invalid commit: %s", use_message);
+ die(_("invalid commit: %s"), use_message);
lb = strchrnul(a + strlen("\nauthor "), '<');
rb = strchrnul(lb, '>');
eol = strchrnul(rb, '\n');
if (!*lb || !*rb || !*eol)
- die("invalid commit: %s", use_message);
+ die(_("invalid commit: %s"), use_message);
if (lb == a + strlen("\nauthor "))
/* \nauthor <foo@example.com> */
const char *rb = strchr(force_author, '>');
if (!lb || !rb)
- die("malformed --author parameter");
+ die(_("malformed --author parameter"));
name = xstrndup(force_author, lb - force_author);
email = xstrndup(lb + 2, rb - (lb + 2));
}
hook_arg1 = "message";
} else if (logfile && !strcmp(logfile, "-")) {
if (isatty(0))
- fprintf(stderr, "(reading log message from standard input)\n");
+ fprintf(stderr, _("(reading log message from standard input)\n"));
if (strbuf_read(&sb, 0, 0) < 0)
- die_errno("could not read log from standard input");
+ die_errno(_("could not read log from standard input"));
hook_arg1 = "message";
} else if (logfile) {
if (strbuf_read_file(&sb, logfile, 0) < 0)
- die_errno("could not read log file '%s'",
+ die_errno(_("could not read log file '%s'"),
logfile);
hook_arg1 = "message";
} else if (use_message) {
buffer = strstr(use_message_buffer, "\n\n");
if (!buffer || buffer[2] == '\0')
- die("commit has empty message");
+ die(_("commit has empty message"));
strbuf_add(&sb, buffer + 2, strlen(buffer + 2));
hook_arg1 = "commit";
hook_arg2 = use_message;
hook_arg1 = "message";
} else if (!stat(git_path("MERGE_MSG"), &statbuf)) {
if (strbuf_read_file(&sb, git_path("MERGE_MSG"), 0) < 0)
- die_errno("could not read MERGE_MSG");
+ die_errno(_("could not read MERGE_MSG"));
hook_arg1 = "merge";
} else if (!stat(git_path("SQUASH_MSG"), &statbuf)) {
if (strbuf_read_file(&sb, git_path("SQUASH_MSG"), 0) < 0)
- die_errno("could not read SQUASH_MSG");
+ die_errno(_("could not read SQUASH_MSG"));
hook_arg1 = "squash";
} else if (template_file && !stat(template_file, &statbuf)) {
if (strbuf_read_file(&sb, template_file, 0) < 0)
- die_errno("could not read '%s'", template_file);
+ die_errno(_("could not read '%s'"), template_file);
hook_arg1 = "template";
}
fp = fopen(git_path(commit_editmsg), "w");
if (fp == NULL)
- die_errno("could not open '%s'", git_path(commit_editmsg));
+ die_errno(_("could not open '%s'"), git_path(commit_editmsg));
if (cleanup_mode != CLEANUP_NONE)
stripspace(&sb, 0);
}
if (fwrite(sb.buf, 1, sb.len, fp) < sb.len)
- die_errno("could not write commit template");
+ die_errno(_("could not write commit template"));
strbuf_release(&sb);
char *ai_tmp, *ci_tmp;
if (in_merge)
fprintf(fp,
- "#\n"
+ _("#\n"
"# It looks like you may be committing a MERGE.\n"
"# If this is not correct, please remove the file\n"
"# %s\n"
"# and try again.\n"
- "#\n",
+ "#\n"),
git_path("MERGE_HEAD"));
fprintf(fp,
- "\n"
- "# Please enter the commit message for your changes.");
+ _("\n"
+ "# Please enter the commit message for your changes."));
if (cleanup_mode == CLEANUP_ALL)
fprintf(fp,
- " Lines starting\n"
+ _(" Lines starting\n"
"# with '#' will be ignored, and an empty"
- " message aborts the commit.\n");
+ " message aborts the commit.\n"));
else /* CLEANUP_SPACE, that is. */
fprintf(fp,
- " Lines starting\n"
+ _(" Lines starting\n"
"# with '#' will be kept; you may remove them"
" yourself if you want to.\n"
- "# An empty message aborts the commit.\n");
+ "# An empty message aborts the commit.\n"));
if (only_include_assumed)
fprintf(fp, "# %s\n", only_include_assumed);
ci_tmp = cut_ident_timestamp_part(committer_ident.buf);
if (strcmp(author_ident->buf, committer_ident.buf))
fprintf(fp,
- "%s"
- "# Author: %s\n",
+ _("%s"
+ "# Author: %s\n"),
ident_shown++ ? "" : "#\n",
author_ident->buf);
if (!user_ident_sufficiently_given())
fprintf(fp,
- "%s"
- "# Committer: %s\n",
+ _("%s"
+ "# Committer: %s\n"),
ident_shown++ ? "" : "#\n",
committer_ident.buf);
const char *parent = "HEAD";
if (!active_nr && read_cache() < 0)
- die("Cannot read index");
+ die(_("Cannot read index"));
if (amend)
parent = "HEAD^1";
!(amend && is_a_merge(head_sha1))) {
run_status(stdout, index_file, prefix, 0, s);
if (amend)
- fputs(empty_amend_advice, stderr);
+ fputs(_(empty_amend_advice), stderr);
return 0;
}
active_cache_tree = cache_tree();
if (cache_tree_update(active_cache_tree,
active_cache, active_nr, 0, 0) < 0) {
- error("Error building trees");
+ error(_("Error building trees"));
return 0;
}
snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file);
if (launch_editor(git_path(commit_editmsg), NULL, env)) {
fprintf(stderr,
- "Please supply the message using either -m or -F option.\n");
+ _("Please supply the message using either -m or -F option.\n"));
exit(1);
}
}
format_commit_message(commit, "%an <%ae>", &buf, &ctx);
return strbuf_detach(&buf, NULL);
}
- die("No existing author found with '%s'", name);
+ die(_("No existing author found with '%s'"), name);
}
else if (!strcmp(untracked_files_arg, "all"))
s->show_untracked_files = SHOW_ALL_UNTRACKED_FILES;
else
- die("Invalid untracked files mode '%s'", untracked_files_arg);
+ die(_("Invalid untracked files mode '%s'"), untracked_files_arg);
}
static int parse_and_validate_options(int argc, const char *argv[],
force_author = find_author_by_nickname(force_author);
if (force_author && renew_authorship)
- die("Using both --reset-author and --author does not make sense");
+ die(_("Using both --reset-author and --author does not make sense"));
if (logfile || message.len || use_message || fixup_message)
use_editor = 0;
/* Sanity check options */
if (amend && initial_commit)
- die("You have nothing to amend.");
+ die(_("You have nothing to amend."));
if (amend && in_merge)
- die("You are in the middle of a merge -- cannot amend.");
+ die(_("You are in the middle of a merge -- cannot amend."));
if (fixup_message && squash_message)
- die("Options --squash and --fixup cannot be used together");
+ die(_("Options --squash and --fixup cannot be used together"));
if (use_message)
f++;
if (edit_message)
if (logfile)
f++;
if (f > 1)
- die("Only one of -c/-C/-F/--fixup can be used.");
+ die(_("Only one of -c/-C/-F/--fixup can be used."));
if (message.len && f > 0)
- die("Option -m cannot be combined with -c/-C/-F/--fixup.");
+ die(_("Option -m cannot be combined with -c/-C/-F/--fixup."));
if (edit_message)
use_message = edit_message;
if (amend && !use_message && !fixup_message)
use_message = "HEAD";
if (!use_message && renew_authorship)
- die("--reset-author can be used only with -C, -c or --amend.");
+ die(_("--reset-author can be used only with -C, -c or --amend."));
if (use_message) {
const char *out_enc;
struct commit *commit;
commit = lookup_commit_reference_by_name(use_message);
if (!commit)
- die("could not lookup commit %s", use_message);
+ die(_("could not lookup commit %s"), use_message);
out_enc = get_commit_output_encoding();
use_message_buffer = logmsg_reencode(commit, out_enc);
}
if (!!also + !!only + !!all + !!interactive > 1)
- die("Only one of --include/--only/--all/--interactive can be used.");
+ die(_("Only one of --include/--only/--all/--interactive can be used."));
if (argc == 0 && (also || (only && !amend)))
- die("No paths with --include/--only does not make sense.");
+ die(_("No paths with --include/--only does not make sense."));
if (argc == 0 && only && amend)
- only_include_assumed = "Clever... amending the last one with dirty index.";
+ only_include_assumed = _("Clever... amending the last one with dirty index.");
if (argc > 0 && !also && !only)
- only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths...";
+ only_include_assumed = _("Explicit paths specified without -i nor -o; assuming --only paths...");
if (!cleanup_arg || !strcmp(cleanup_arg, "default"))
cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE;
else if (!strcmp(cleanup_arg, "verbatim"))
else if (!strcmp(cleanup_arg, "strip"))
cleanup_mode = CLEANUP_ALL;
else
- die("Invalid cleanup mode %s", cleanup_arg);
+ die(_("Invalid cleanup mode %s"), cleanup_arg);
handle_untracked_files_arg(s);
if (all && argc > 0)
- die("Paths with -a does not make sense.");
+ die(_("Paths with -a does not make sense."));
else if (interactive && argc > 0)
- die("Paths with --interactive does not make sense.");
+ die(_("Paths with --interactive does not make sense."));
if (null_termination && status_format == STATUS_FORMAT_LONG)
status_format = STATUS_FORMAT_PORCELAIN;
else if (!strcmp(v, "all"))
s->show_untracked_files = SHOW_ALL_UNTRACKED_FILES;
else
- return error("Invalid untracked files mode '%s'", v);
+ return error(_("Invalid untracked files mode '%s'"), v);
return 0;
}
return git_diff_ui_config(k, v, NULL);
commit = lookup_commit(sha1);
if (!commit)
- die("couldn't look up newly created commit");
+ die(_("couldn't look up newly created commit"));
if (!commit || parse_commit(commit))
- die("could not parse newly created commit");
+ die(_("could not parse newly created commit"));
strbuf_addstr(&format, "format:%h] %s");
strbuf_addbuf_percentquote(&format, &committer_ident);
if (advice_implicit_identity) {
strbuf_addch(&format, '\n');
- strbuf_addstr(&format, implicit_ident_advice);
+ strbuf_addstr(&format, _(implicit_ident_advice));
}
}
strbuf_release(&author_ident);
!prefixcmp(head, "refs/heads/") ?
head + 11 :
!strcmp(head, "HEAD") ?
- "detached HEAD" :
+ _("detached HEAD") :
head,
- initial_commit ? " (root-commit)" : "");
+ initial_commit ? _(" (root-commit)") : "");
if (!log_tree_commit(&rev, commit)) {
rev.always_show_header = 1;
reflog_msg = "commit (amend)";
commit = lookup_commit(head_sha1);
if (!commit || parse_commit(commit))
- die("could not parse HEAD commit");
+ die(_("could not parse HEAD commit"));
for (c = commit->parents; c; c = c->next)
pptr = &commit_list_insert(c->item, pptr)->next;
pptr = &commit_list_insert(lookup_commit(head_sha1), pptr)->next;
fp = fopen(git_path("MERGE_HEAD"), "r");
if (fp == NULL)
- die_errno("could not open '%s' for reading",
+ die_errno(_("could not open '%s' for reading"),
git_path("MERGE_HEAD"));
while (strbuf_getline(&m, fp, '\n') != EOF) {
unsigned char sha1[20];
if (get_sha1_hex(m.buf, sha1) < 0)
- die("Corrupt MERGE_HEAD file (%s)", m.buf);
+ die(_("Corrupt MERGE_HEAD file (%s)"), m.buf);
pptr = &commit_list_insert(lookup_commit(sha1), pptr)->next;
}
fclose(fp);
strbuf_release(&m);
if (!stat(git_path("MERGE_MODE"), &statbuf)) {
if (strbuf_read_file(&sb, git_path("MERGE_MODE"), 0) < 0)
- die_errno("could not read MERGE_MODE");
+ die_errno(_("could not read MERGE_MODE"));
if (!strcmp(sb.buf, "no-ff"))
allow_fast_forward = 0;
}
if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0) {
int saved_errno = errno;
rollback_index_files();
- die("could not read commit message: %s", strerror(saved_errno));
+ die(_("could not read commit message: %s"), strerror(saved_errno));
}
/* Truncate the message just before the diff, if any. */
stripspace(&sb, cleanup_mode == CLEANUP_ALL);
if (message_is_empty(&sb) && !allow_empty_message) {
rollback_index_files();
- fprintf(stderr, "Aborting commit due to empty commit message.\n");
+ fprintf(stderr, _("Aborting commit due to empty commit message.\n"));
exit(1);
}
if (commit_tree(sb.buf, active_cache_tree->sha1, parents, commit_sha1,
author_ident.buf)) {
rollback_index_files();
- die("failed to write commit object");
+ die(_("failed to write commit object"));
}
strbuf_release(&author_ident);
if (!ref_lock) {
rollback_index_files();
- die("cannot lock HEAD ref");
+ die(_("cannot lock HEAD ref"));
}
if (write_ref_sha1(ref_lock, commit_sha1, sb.buf) < 0) {
rollback_index_files();
- die("cannot update HEAD ref");
+ die(_("cannot update HEAD ref"));
}
unlink(git_path("MERGE_HEAD"));
unlink(git_path("SQUASH_MSG"));
if (commit_index_files())
- die ("Repository has been updated, but unable to write\n"
+ die (_("Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
- "not exceeded, and then \"git reset HEAD\" to recover.");
+ "not exceeded, and then \"git reset HEAD\" to recover."));
rerere(0);
run_hook(get_index_file(), "post-commit", NULL);
diff --git a/builtin/describe.c b/builtin/describe.c
index 342129fdbdc534bdf9277de710f8e7b7ba11c5c4..037691e3d30ef2c6b80b23fa0fbcad67759560e2 100644 (file)
--- a/builtin/describe.c
+++ b/builtin/describe.c
if (n->prio == 2 && !n->tag) {
n->tag = lookup_tag(n->sha1);
if (!n->tag || parse_tag(n->tag))
- die("annotated tag %s not available", n->path);
+ die(_("annotated tag %s not available"), n->path);
}
if (n->tag && !n->name_checked) {
if (!n->tag->tag)
- die("annotated tag %s has no embedded name", n->path);
+ die(_("annotated tag %s has no embedded name"), n->path);
if (strcmp(n->tag->tag, all ? n->path + 5 : n->path))
- warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
+ warning(_("tag '%s' is really '%s' here"), n->tag->tag, n->path);
n->name_checked = 1;
}
unsigned int unannotated_cnt = 0;
if (get_sha1(arg, sha1))
- die("Not a valid object name %s", arg);
+ die(_("Not a valid object name %s"), arg);
cmit = lookup_commit_reference(sha1);
if (!cmit)
- die("%s is not a valid '%s' object", arg, commit_type);
+ die(_("%s is not a valid '%s' object"), arg, commit_type);
n = find_commit_name(cmit->object.sha1);
if (n && (tags || all || n->prio == 2)) {
}
if (!max_candidates)
- die("no tag exactly matches '%s'", sha1_to_hex(cmit->object.sha1));
+ die(_("no tag exactly matches '%s'"), sha1_to_hex(cmit->object.sha1));
if (debug)
- fprintf(stderr, "searching to describe %s\n", arg);
+ fprintf(stderr, _("searching to describe %s\n"), arg);
if (!have_util) {
for_each_hash(&names, set_util);
}
if (annotated_cnt && !list) {
if (debug)
- fprintf(stderr, "finished search at %s\n",
+ fprintf(stderr, _("finished search at %s\n"),
sha1_to_hex(c->object.sha1));
break;
}
return;
}
if (unannotated_cnt)
- die("No annotated tags can describe '%s'.\n"
- "However, there were unannotated tags: try --tags.",
+ die(_("No annotated tags can describe '%s'.\n"
+ "However, there were unannotated tags: try --tags."),
sha1_to_hex(sha1));
else
- die("No tags can describe '%s'.\n"
- "Try --always, or create some tags.",
+ die(_("No tags can describe '%s'.\n"
+ "Try --always, or create some tags."),
sha1_to_hex(sha1));
}
prio_names[t->name->prio],
t->depth, t->name->path);
}
- fprintf(stderr, "traversed %lu commits\n", seen_commits);
+ fprintf(stderr, _("traversed %lu commits\n"), seen_commits);
if (gave_up_on) {
fprintf(stderr,
- "more than %i tags found; listed %i most recent\n"
- "gave up search at %s\n",
+ _("more than %i tags found; listed %i most recent\n"
+ "gave up search at %s\n"),
max_candidates, max_candidates,
sha1_to_hex(gave_up_on->object.sha1));
}
save_commit_buffer = 0;
if (longformat && abbrev == 0)
- die("--long is incompatible with --abbrev=0");
+ die(_("--long is incompatible with --abbrev=0"));
if (contains) {
const char **args = xmalloc((7 + argc) * sizeof(char *));
init_hash(&names);
for_each_rawref(get_name, NULL);
if (!names.nr && !always)
- die("No names found, cannot describe anything.");
+ die(_("No names found, cannot describe anything."));
if (argc == 0) {
if (dirty && !cmd_diff_index(ARRAY_SIZE(diff_index_args) - 1, diff_index_args, prefix))
dirty = NULL;
describe("HEAD", 1);
} else if (dirty) {
- die("--dirty is incompatible with committishes");
+ die(_("--dirty is incompatible with committishes"));
} else {
while (argc-- > 0) {
describe(*argv++, argc == 0);
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 951c7c8994704543fc1784c87a17a1aa47ede257..46085f862f937b005493319cea25b93bcb10c999 100644 (file)
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
(rev.diffopt.output_format & DIFF_FORMAT_PATCH))
rev.combine_merges = rev.dense_combined_merges = 1;
- if (read_cache_preload(rev.diffopt.paths) < 0) {
+ if (read_cache_preload(rev.diffopt.pathspec.raw) < 0) {
perror("read_cache_preload");
return -1;
}
diff --git a/builtin/diff.c b/builtin/diff.c
index 945e7583a8294f0612682f3228687498e5c61822..3cefb872e970e6f362550b9ad2485be508725f4a 100644 (file)
--- a/builtin/diff.c
+++ b/builtin/diff.c
usage(builtin_diff_usage);
if (lstat(path, &st))
- die_errno("failed to stat '%s'", path);
+ die_errno(_("failed to stat '%s'"), path);
if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))
- die("'%s': not a regular file or symlink", path);
+ die(_("'%s': not a regular file or symlink"), path);
diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/");
revs->max_count != -1 || revs->min_age != -1 ||
revs->max_age != -1)
usage(builtin_diff_usage);
- if (read_cache_preload(revs->diffopt.paths) < 0) {
+ if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
perror("read_cache_preload");
return -1;
}
@@ -222,7 +222,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
else if (!strcmp(argv[1], "-h"))
usage(builtin_diff_usage);
else
- return error("invalid option: %s", argv[1]);
+ return error(_("invalid option: %s"), argv[1]);
argv++; argc--;
}
@@ -237,7 +237,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
revs->combine_merges = revs->dense_combined_merges = 1;
setup_work_tree();
- if (read_cache_preload(revs->diffopt.paths) < 0) {
+ if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
perror("read_cache_preload");
return -1;
}
DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
if (nongit)
- die("Not a git repository");
+ die(_("Not a git repository"));
argc = setup_revisions(argc, argv, &rev, NULL);
if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
if (diff_setup_done(&rev.diffopt) < 0)
- die("diff_setup_done failed");
+ die(_("diff_setup_done failed"));
}
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
!strcmp(arg, "--staged")) {
add_head_to_pending(&rev);
if (!rev.pending.nr)
- die("No HEAD commit to compare with (yet)");
+ die(_("No HEAD commit to compare with (yet)"));
break;
}
}
obj = parse_object(obj->sha1);
obj = deref_tag(obj, NULL, 0);
if (!obj)
- die("invalid object '%s' given.", name);
+ die(_("invalid object '%s' given."), name);
if (obj->type == OBJ_COMMIT)
obj = &((struct commit *)obj)->tree->object;
if (obj->type == OBJ_TREE) {
if (ARRAY_SIZE(ent) <= ents)
- die("more than %d trees given: '%s'",
+ die(_("more than %d trees given: '%s'"),
(int) ARRAY_SIZE(ent), name);
obj->flags |= flags;
ent[ents].item = obj;
}
if (obj->type == OBJ_BLOB) {
if (2 <= blobs)
- die("more than two blobs given: '%s'", name);
+ die(_("more than two blobs given: '%s'"), name);
hashcpy(blob[blobs].sha1, obj->sha1);
blob[blobs].name = name;
blob[blobs].mode = list->mode;
continue;
}
- die("unhandled object '%s' given.", name);
+ die(_("unhandled object '%s' given."), name);
}
- if (rev.prune_data) {
- const char **pathspec = rev.prune_data;
- while (*pathspec) {
- if (!path)
- path = *pathspec;
- paths++;
- pathspec++;
- }
+ if (rev.prune_data.nr) {
+ if (!path)
+ path = rev.prune_data.items[0].match;
+ paths += rev.prune_data.nr;
}
/*
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index c8fd46b872780b27b09ad70316fa164d855f3220..ba57457cc54812ba935c5259277e12d72463f63f 100644 (file)
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
if (import_filename)
import_marks(import_filename);
- if (import_filename && revs.prune_data)
+ if (import_filename && revs.prune_data.nr)
full_tree = 1;
get_tags_and_duplicates(&revs.pending, &extra_refs);
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index b9994139345834a58b08a5ce57cf59c124e21760..e002418ab2c2edf0576e61e9593fef6fcde628ab 100644 (file)
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
-#include "cache.h"
+#include "builtin.h"
#include "refs.h"
#include "pkt-line.h"
#include "commit.h"
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 357f3cdbbfd601e2ce3f1261a4d6b30c1257cda4..ee2c5f50ac2aaae60b3faedbaf7946d696cbb13b 100644 (file)
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
} else {
ref_map = get_remote_ref(remote_refs, "HEAD");
if (!ref_map)
- die("Couldn't find remote ref HEAD");
+ die(_("Couldn't find remote ref HEAD"));
ref_map->merge = 1;
tail = &ref_map->next;
}
*display = 0;
type = sha1_object_info(ref->new_sha1, NULL);
if (type < 0)
- die("object %s not found", sha1_to_hex(ref->new_sha1));
+ die(_("object %s not found"), sha1_to_hex(ref->new_sha1));
if (!hashcmp(ref->old_sha1, ref->new_sha1)) {
if (verbosity > 0)
sprintf(display, "= %-*s %-*s -> %s", TRANSPORT_SUMMARY_WIDTH,
- "[up to date]", REFCOL_WIDTH, remote,
+ _("[up to date]"), REFCOL_WIDTH, remote,
pretty_ref);
return 0;
}
* If this is the head, and it's not okay to update
* the head, and the old value of the head isn't empty...
*/
- sprintf(display, "! %-*s %-*s -> %s (can't fetch in current branch)",
- TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
+ sprintf(display, _("! %-*s %-*s -> %s (can't fetch in current branch)"),
+ TRANSPORT_SUMMARY_WIDTH, _("[rejected]"), REFCOL_WIDTH, remote,
pretty_ref);
return 1;
}
int r;
r = s_update_ref("updating tag", ref, 0);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '-',
- TRANSPORT_SUMMARY_WIDTH, "[tag update]", REFCOL_WIDTH, remote,
- pretty_ref, r ? " (unable to update local ref)" : "");
+ TRANSPORT_SUMMARY_WIDTH, _("[tag update]"), REFCOL_WIDTH, remote,
+ pretty_ref, r ? _(" (unable to update local ref)") : "");
return r;
}
int r;
if (!strncmp(ref->name, "refs/tags/", 10)) {
msg = "storing tag";
- what = "[new tag]";
+ what = _("[new tag]");
}
else {
msg = "storing head";
- what = "[new branch]";
+ what = _("[new branch]");
}
r = s_update_ref(msg, ref, 0);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '*',
TRANSPORT_SUMMARY_WIDTH, what, REFCOL_WIDTH, remote, pretty_ref,
- r ? " (unable to update local ref)" : "");
+ r ? _(" (unable to update local ref)") : "");
return r;
}
r = s_update_ref("fast-forward", ref, 1);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : ' ',
TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
- pretty_ref, r ? " (unable to update local ref)" : "");
+ pretty_ref, r ? _(" (unable to update local ref)") : "");
return r;
} else if (force || ref->force) {
char quickref[84];
sprintf(display, "%c %-*s %-*s -> %s (%s)", r ? '!' : '+',
TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
pretty_ref,
- r ? "unable to update local ref" : "forced update");
+ r ? _("unable to update local ref") : _("forced update"));
return r;
} else {
- sprintf(display, "! %-*s %-*s -> %s (non-fast-forward)",
- TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
- pretty_ref);
+ sprintf(display, "! %-*s %-*s -> %s %s",
+ TRANSPORT_SUMMARY_WIDTH, _("[rejected]"), REFCOL_WIDTH, remote,
+ pretty_ref, _("(non-fast-forward)"));
return 1;
}
}
fp = fopen(filename, "a");
if (!fp)
- return error("cannot open %s: %s\n", filename, strerror(errno));
+ return error(_("cannot open %s: %s\n"), filename, strerror(errno));
if (raw_url)
url = transport_anonymize_url(raw_url);
REFCOL_WIDTH, *what ? what : "HEAD");
if (*note) {
if (verbosity >= 0 && !shown_url) {
- fprintf(stderr, "From %.*s\n",
+ fprintf(stderr, _("From %.*s\n"),
url_len, url);
shown_url = 1;
}
free(url);
fclose(fp);
if (rc & STORE_REF_ERROR_DF_CONFLICT)
- error("some local refs could not be updated; try running\n"
+ error(_("some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting "
- "branches", remote_name);
+ "branches"), remote_name);
return rc;
}
err = start_command(&revlist);
if (err) {
- error("could not run rev-list");
+ error(_("could not run rev-list"));
return err;
}
if (write_in_full(revlist.in, sha1_to_hex(ref->old_sha1), 40) < 0 ||
write_str_in_full(revlist.in, "\n") < 0) {
if (errno != EPIPE && errno != EINVAL)
- error("failed write to rev-list: %s", strerror(errno));
+ error(_("failed write to rev-list: %s"), strerror(errno));
err = -1;
break;
}
}
if (close(revlist.in)) {
- error("failed to close rev-list's stdin: %s", strerror(errno));
+ error(_("failed to close rev-list's stdin: %s"), strerror(errno));
err = -1;
}
int result = 0;
struct ref *ref, *stale_refs = get_stale_heads(transport->remote, ref_map);
const char *dangling_msg = dry_run
- ? " (%s will become dangling)\n"
- : " (%s has become dangling)\n";
+ ? _(" (%s will become dangling)\n")
+ : _(" (%s has become dangling)\n");
for (ref = stale_refs; ref; ref = ref->next) {
if (!dry_run)
result |= delete_ref(ref->name, NULL, 0);
if (verbosity >= 0) {
fprintf(stderr, " x %-*s %-*s -> %s\n",
- TRANSPORT_SUMMARY_WIDTH, "[deleted]",
- REFCOL_WIDTH, "(none)", prettify_refname(ref->name));
+ TRANSPORT_SUMMARY_WIDTH, _("[deleted]"),
+ REFCOL_WIDTH, _("(none)"), prettify_refname(ref->name));
warn_dangling_symref(stderr, dangling_msg, ref->name);
}
}
for (; ref_map; ref_map = ref_map->next)
if (ref_map->peer_ref && !strcmp(current_branch->refname,
ref_map->peer_ref->name))
- die("Refusing to fetch into current branch %s "
- "of non-bare repository", current_branch->refname);
+ die(_("Refusing to fetch into current branch %s "
+ "of non-bare repository"), current_branch->refname);
}
static int truncate_fetch_head(void)
FILE *fp = fopen(filename, "w");
if (!fp)
- return error("cannot open %s: %s\n", filename, strerror(errno));
+ return error(_("cannot open %s: %s\n"), filename, strerror(errno));
fclose(fp);
return 0;
}
}
if (!transport->get_refs_list || !transport->fetch)
- die("Don't know how to fetch from %s", transport->url);
+ die(_("Don't know how to fetch from %s"), transport->url);
/* if not appending, truncate FETCH_HEAD */
if (!append && !dry_run) {
{
int r = transport_set_option(transport, name, value);
if (r < 0)
- die("Option \"%s\" value \"%s\" is not valid for %s",
+ die(_("Option \"%s\" value \"%s\" is not valid for %s"),
name, value, transport->url);
if (r > 0)
- warning("Option \"%s\" is ignored for %s\n",
+ warning(_("Option \"%s\" is ignored for %s\n"),
name, transport->url);
}
argv[argc] = name;
argv[argc + 1] = NULL;
if (verbosity >= 0)
- printf("Fetching %s\n", name);
+ printf(_("Fetching %s\n"), name);
if (run_command_v_opt(argv, RUN_GIT_CMD)) {
- error("Could not fetch %s", name);
+ error(_("Could not fetch %s"), name);
result = 1;
}
}
int exit_code;
if (!remote)
- die("No remote repository specified. Please, specify either a URL or a\n"
- "remote name from which new revisions should be fetched.");
+ die(_("No remote repository specified. Please, specify either a URL or a\n"
+ "remote name from which new revisions should be fetched."));
transport = transport_get(remote, NULL);
transport_set_verbosity(transport, verbosity, progress);
char *ref;
i++;
if (i >= argc)
- die("You need to specify a tag name.");
+ die(_("You need to specify a tag name."));
ref = xmalloc(strlen(argv[i]) * 2 + 22);
strcpy(ref, "refs/tags/");
strcat(ref, argv[i]);
if (all) {
if (argc == 1)
- die("fetch --all does not take a repository argument");
+ die(_("fetch --all does not take a repository argument"));
else if (argc > 1)
- die("fetch --all does not make sense with refspecs");
+ die(_("fetch --all does not make sense with refspecs"));
(void) for_each_remote(get_one_remote_for_fetch, &list);
result = fetch_multiple(&list);
} else if (argc == 0) {
/* All arguments are assumed to be remotes or groups */
for (i = 0; i < argc; i++)
if (!add_remote_or_group(argv[i], &list))
- die("No such remote or remote group: %s", argv[i]);
+ die(_("No such remote or remote group: %s"), argv[i]);
result = fetch_multiple(&list);
} else {
/* Single remote or group */
if (list.nr > 1) {
/* More than one remote */
if (argc > 1)
- die("Fetching a group and specifying refspecs does not make sense");
+ die(_("Fetching a group and specifying refspecs does not make sense"));
result = fetch_multiple(&list);
} else {
/* Zero or one remotes */
diff --git a/builtin/gc.c b/builtin/gc.c
index 1a80702b3d1c86b55af24be3b3396f17e9d4a21c..ff5f73ba87b23fc7e361a1751c2d9a64e0267163 100644 (file)
--- a/builtin/gc.c
+++ b/builtin/gc.c
if (value && strcmp(value, "now")) {
unsigned long now = approxidate("now");
if (approxidate(value) >= now)
- return error("Invalid %s: '%s'", var, value);
+ return error(_("Invalid %s: '%s'"), var, value);
}
return git_config_string(&prune_expire, var, value);
}
;
if (i + 2 >= max_length)
- die("Too many options specified");
+ die(_("Too many options specified"));
cmd[i++] = opt;
cmd[i] = NULL;
}
return 0;
if (sizeof(path) <= snprintf(path, sizeof(path), "%s/17", objdir)) {
- warning("insanely long object directory %.*s", 50, objdir);
+ warning(_("insanely long object directory %.*s"), 50, objdir);
return 0;
}
dir = opendir(path);
*/
if (!need_to_gc())
return 0;
- fprintf(stderr,
- "Auto packing the repository for optimum performance.%s\n",
- quiet
- ? ""
- : (" You may also\n"
- "run \"git gc\" manually. See "
- "\"git help gc\" for more information."));
+ if (quiet)
+ fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
+ else
+ fprintf(stderr,
+ _("Auto packing the repository for optimum performance. You may also\n"
+ "run \"git gc\" manually. See "
+ "\"git help gc\" for more information."));
} else
append_option(argv_repack,
prune_expire && !strcmp(prune_expire, "now")
return error(FAILED_RUN, argv_rerere[0]);
if (auto_gc && too_many_loose_objects())
- warning("There are too many unreachable loose objects; "
- "run 'git prune' to remove them.");
+ warning(_("There are too many unreachable loose objects; "
+ "run 'git prune' to remove them."));
return 0;
}
diff --git a/builtin/grep.c b/builtin/grep.c
index fdf7131efd25618250f382dff178ca38f9b42c77..dcbc7a936d6ddc96f4d074b87d19d4e5b936ca41 100644 (file)
--- a/builtin/grep.c
+++ b/builtin/grep.c
err = pthread_create(&threads[i], NULL, run, o);
if (err)
- die("grep: failed to create thread: %s",
+ die(_("grep: failed to create thread: %s"),
strerror(err));
}
}
return 0;
}
-/*
- * Return non-zero if max_depth is negative or path has no more then max_depth
- * slashes.
- */
-static int accept_subdir(const char *path, int max_depth)
-{
- if (max_depth < 0)
- return 1;
-
- while ((path = strchr(path, '/')) != NULL) {
- max_depth--;
- if (max_depth < 0)
- return 0;
- path++;
- }
- return 1;
-}
-
-/*
- * Return non-zero if name is a subdirectory of match and is not too deep.
- */
-static int is_subdir(const char *name, int namelen,
- const char *match, int matchlen, int max_depth)
-{
- if (matchlen > namelen || strncmp(name, match, matchlen))
- return 0;
-
- if (name[matchlen] == '\0') /* exact match */
- return 1;
-
- if (!matchlen || match[matchlen-1] == '/' || name[matchlen] == '/')
- return accept_subdir(name + matchlen + 1, max_depth);
-
- return 0;
-}
-
-/*
- * git grep pathspecs are somewhat different from diff-tree pathspecs;
- * pathname wildcards are allowed.
- */
-static int pathspec_matches(const char **paths, const char *name, int max_depth)
-{
- int namelen, i;
- if (!paths || !*paths)
- return accept_subdir(name, max_depth);
- namelen = strlen(name);
- for (i = 0; paths[i]; i++) {
- const char *match = paths[i];
- int matchlen = strlen(match);
- const char *cp, *meta;
-
- if (is_subdir(name, namelen, match, matchlen, max_depth))
- return 1;
- if (!fnmatch(match, name, 0))
- return 1;
- if (name[namelen-1] != '/')
- continue;
-
- /* We are being asked if the directory ("name") is worth
- * descending into.
- *
- * Find the longest leading directory name that does
- * not have metacharacter in the pathspec; the name
- * we are looking at must overlap with that directory.
- */
- for (cp = match, meta = NULL; cp - match < matchlen; cp++) {
- char ch = *cp;
- if (ch == '*' || ch == '[' || ch == '?') {
- meta = cp;
- break;
- }
- }
- if (!meta)
- meta = cp; /* fully literal */
-
- if (namelen <= meta - match) {
- /* Looking at "Documentation/" and
- * the pattern says "Documentation/howto/", or
- * "Documentation/diff*.txt". The name we
- * have should match prefix.
- */
- if (!memcmp(match, name, namelen))
- return 1;
- continue;
- }
-
- if (meta - match < namelen) {
- /* Looking at "Documentation/howto/" and
- * the pattern says "Documentation/h*";
- * match up to "Do.../h"; this avoids descending
- * into "Documentation/technical/".
- */
- if (!memcmp(match, name, meta - match))
- return 1;
- continue;
- }
- }
- return 0;
-}
-
static void *lock_and_read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size)
{
void *data;
void *data = lock_and_read_sha1_file(sha1, &type, size);
if (!data)
- error("'%s': unable to read %s", name, sha1_to_hex(sha1));
+ error(_("'%s': unable to read %s"), name, sha1_to_hex(sha1));
return data;
}
if (lstat(filename, &st) < 0) {
err_ret:
if (errno != ENOENT)
- error("'%s': %s", filename, strerror(errno));
+ error(_("'%s': %s"), filename, strerror(errno));
return 0;
}
if (!S_ISREG(st.st_mode))
goto err_ret;
data = xmalloc(*sz + 1);
if (st.st_size != read_in_full(i, data, *sz)) {
- error("'%s': short read %s", filename, strerror(errno));
+ error(_("'%s': short read %s"), filename, strerror(errno));
close(i);
free(data);
return 0;
argv[path_list->nr] = NULL;
if (prefix && chdir(prefix))
- die("Failed to chdir: %s", prefix);
+ die(_("Failed to chdir: %s"), prefix);
status = run_command_v_opt(argv, RUN_USING_SHELL);
if (status)
exit(status);
free(argv);
}
-static int grep_cache(struct grep_opt *opt, const char **paths, int cached)
+static int grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int cached)
{
int hit = 0;
int nr;
struct cache_entry *ce = active_cache[nr];
if (!S_ISREG(ce->ce_mode))
continue;
- if (!pathspec_matches(paths, ce->name, opt->max_depth))
+ if (!match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, NULL))
continue;
/*
* If CE_VALID is on, we assume worktree file and its cache entry
return hit;
}
-static int grep_tree(struct grep_opt *opt, const char **paths,
- struct tree_desc *tree,
- const char *tree_name, const char *base)
+static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,
+ struct tree_desc *tree, struct strbuf *base, int tn_len)
{
- int len;
- int hit = 0;
+ int hit = 0, matched = 0;
struct name_entry entry;
- char *down;
- int tn_len = strlen(tree_name);
- struct strbuf pathbuf;
-
- strbuf_init(&pathbuf, PATH_MAX + tn_len);
-
- if (tn_len) {
- strbuf_add(&pathbuf, tree_name, tn_len);
- strbuf_addch(&pathbuf, ':');
- tn_len = pathbuf.len;
- }
- strbuf_addstr(&pathbuf, base);
- len = pathbuf.len;
+ int old_baselen = base->len;
while (tree_entry(tree, &entry)) {
int te_len = tree_entry_len(entry.path, entry.sha1);
- pathbuf.len = len;
- strbuf_add(&pathbuf, entry.path, te_len);
-
- if (S_ISDIR(entry.mode))
- /* Match "abc/" against pathspec to
- * decide if we want to descend into "abc"
- * directory.
- */
- strbuf_addch(&pathbuf, '/');
-
- down = pathbuf.buf + tn_len;
- if (!pathspec_matches(paths, down, opt->max_depth))
- ;
- else if (S_ISREG(entry.mode))
- hit |= grep_sha1(opt, entry.sha1, pathbuf.buf, tn_len);
+
+ if (matched != 2) {
+ matched = tree_entry_interesting(&entry, base, tn_len, pathspec);
+ if (matched == -1)
+ break; /* no more matches */
+ if (!matched)
+ continue;
+ }
+
+ strbuf_add(base, entry.path, te_len);
+
+ if (S_ISREG(entry.mode)) {
+ hit |= grep_sha1(opt, entry.sha1, base->buf, tn_len);
+ }
else if (S_ISDIR(entry.mode)) {
enum object_type type;
struct tree_desc sub;
data = lock_and_read_sha1_file(entry.sha1, &type, &size);
if (!data)
- die("unable to read tree (%s)",
+ die(_("unable to read tree (%s)"),
sha1_to_hex(entry.sha1));
+
+ strbuf_addch(base, '/');
init_tree_desc(&sub, data, size);
- hit |= grep_tree(opt, paths, &sub, tree_name, down);
+ hit |= grep_tree(opt, pathspec, &sub, base, tn_len);
free(data);
}
+ strbuf_setlen(base, old_baselen);
+
if (hit && opt->status_only)
break;
}
- strbuf_release(&pathbuf);
return hit;
}
-static int grep_object(struct grep_opt *opt, const char **paths,
+static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
struct object *obj, const char *name)
{
if (obj->type == OBJ_BLOB)
struct tree_desc tree;
void *data;
unsigned long size;
- int hit;
+ struct strbuf base;
+ int hit, len;
+
data = read_object_with_reference(obj->sha1, tree_type,
&size, NULL);
if (!data)
- die("unable to read tree (%s)", sha1_to_hex(obj->sha1));
+ die(_("unable to read tree (%s)"), sha1_to_hex(obj->sha1));
+
+ len = name ? strlen(name) : 0;
+ strbuf_init(&base, PATH_MAX + len + 1);
+ if (len) {
+ strbuf_add(&base, name, len);
+ strbuf_addch(&base, ':');
+ }
init_tree_desc(&tree, data, size);
- hit = grep_tree(opt, paths, &tree, name, "");
+ hit = grep_tree(opt, pathspec, &tree, &base, base.len);
+ strbuf_release(&base);
free(data);
return hit;
}
- die("unable to grep from object of type %s", typename(obj->type));
+ die(_("unable to grep from object of type %s"), typename(obj->type));
}
-static int grep_objects(struct grep_opt *opt, const char **paths,
+static int grep_objects(struct grep_opt *opt, const struct pathspec *pathspec,
const struct object_array *list)
{
unsigned int i;
for (i = 0; i < nr; i++) {
struct object *real_obj;
real_obj = deref_tag(list->objects[i].item, NULL, 0);
- if (grep_object(opt, paths, real_obj, list->objects[i].name)) {
+ if (grep_object(opt, pathspec, real_obj, list->objects[i].name)) {
hit = 1;
if (opt->status_only)
break;
return hit;
}
-static int grep_directory(struct grep_opt *opt, const char **paths)
+static int grep_directory(struct grep_opt *opt, const struct pathspec *pathspec)
{
struct dir_struct dir;
int i, hit = 0;
memset(&dir, 0, sizeof(dir));
setup_standard_excludes(&dir);
- fill_directory(&dir, paths);
+ fill_directory(&dir, pathspec->raw);
for (i = 0; i < dir.nr; i++) {
hit |= grep_file(opt, dir.entries[i]->name);
if (hit && opt->status_only)
}
value = strtol(arg, (char **)&endp, 10);
if (*endp) {
- return error("switch `%c' expects a numerical value",
+ return error(_("switch `%c' expects a numerical value"),
opt->short_name);
}
grep_opt->pre_context = grep_opt->post_context = value;
patterns = fopen(arg, "r");
if (!patterns)
- die_errno("cannot open '%s'", arg);
+ die_errno(_("cannot open '%s'"), arg);
while (strbuf_getline(&sb, patterns, '\n') == 0) {
char *s;
size_t len;
struct grep_opt opt;
struct object_array list = OBJECT_ARRAY_INIT;
const char **paths = NULL;
+ struct pathspec pathspec;
struct string_list path_list = STRING_LIST_INIT_NODUP;
int i;
int dummy;
}
if (!opt.pattern_list)
- die("no pattern given.");
+ die(_("no pattern given."));
if (!opt.fixed && opt.ignore_case)
opt.regflags |= REG_ICASE;
if ((opt.regflags != REG_NEWLINE) && opt.fixed)
- die("cannot mix --fixed-strings and regexp");
+ die(_("cannot mix --fixed-strings and regexp"));
#ifndef NO_PTHREADS
if (online_cpus() == 1 || !grep_threads_ok(&opt))
if (!get_sha1(arg, sha1)) {
struct object *object = parse_object(sha1);
if (!object)
- die("bad object %s", arg);
+ die(_("bad object %s"), arg);
add_object_array(object, arg, &list);
continue;
}
paths[0] = prefix;
paths[1] = NULL;
}
+ init_pathspec(&pathspec, paths);
+ pathspec.max_depth = opt.max_depth;
+ pathspec.recursive = 1;
if (show_in_pager && (cached || list.nr))
- die("--open-files-in-pager only works on the worktree");
+ die(_("--open-files-in-pager only works on the worktree"));
if (show_in_pager && opt.pattern_list && !opt.pattern_list->next) {
const char *pager = path_list.items[0].string;
if (!use_index) {
if (cached)
- die("--cached cannot be used with --no-index.");
+ die(_("--cached cannot be used with --no-index."));
if (list.nr)
- die("--no-index cannot be used with revs.");
- hit = grep_directory(&opt, paths);
+ die(_("--no-index cannot be used with revs."));
+ hit = grep_directory(&opt, &pathspec);
} else if (!list.nr) {
if (!cached)
setup_work_tree();
- hit = grep_cache(&opt, paths, cached);
+ hit = grep_cache(&opt, &pathspec, cached);
} else {
if (cached)
- die("both --cached and trees are given.");
- hit = grep_objects(&opt, paths, &list);
+ die(_("both --cached and trees are given."));
+ hit = grep_objects(&opt, &pathspec, &list);
}
if (use_threads)
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 080af1a01b8155680faf6c04101217b60ae7b919..8a5670f8f9fac8b0a0162f24b77ee3dc2b842fec 100644 (file)
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
* Copyright (C) Linus Torvalds, 2005
* Copyright (C) Junio C Hamano, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 8dc5c0b5410d4bb57607bab690126f22d954dd7a..8d1af0630938320ffbf6b0331d46b561c3379e64 100644 (file)
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
-#include "cache.h"
+#include "builtin.h"
#include "delta.h"
#include "pack.h"
#include "csum-file.h"
diff --git a/builtin/init-db.c b/builtin/init-db.c
index e3af9eaa877089639d6ba4f47d7155a0c1ee106e..95387b70f715937c35010ac5028df8f5be8e500a 100644 (file)
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
}
}
else if (share && adjust_shared_perm(dir))
- die("Could not make %s writable by group", dir);
+ die(_("Could not make %s writable by group"), dir);
}
static void copy_templates_1(char *path, int baselen,
namelen = strlen(de->d_name);
if ((PATH_MAX <= baselen + namelen) ||
(PATH_MAX <= template_baselen + namelen))
- die("insanely long template name %s", de->d_name);
+ die(_("insanely long template name %s"), de->d_name);
memcpy(path + baselen, de->d_name, namelen+1);
memcpy(template + template_baselen, de->d_name, namelen+1);
if (lstat(path, &st_git)) {
if (errno != ENOENT)
- die_errno("cannot stat '%s'", path);
+ die_errno(_("cannot stat '%s'"), path);
}
else
exists = 1;
if (lstat(template, &st_template))
- die_errno("cannot stat template '%s'", template);
+ die_errno(_("cannot stat template '%s'"), template);
if (S_ISDIR(st_template.st_mode)) {
DIR *subdir = opendir(template);
int baselen_sub = baselen + namelen;
int template_baselen_sub = template_baselen + namelen;
if (!subdir)
- die_errno("cannot opendir '%s'", template);
+ die_errno(_("cannot opendir '%s'"), template);
path[baselen_sub++] =
template[template_baselen_sub++] = '/';
path[baselen_sub] =
int len;
len = readlink(template, lnk, sizeof(lnk));
if (len < 0)
- die_errno("cannot readlink '%s'", template);
+ die_errno(_("cannot readlink '%s'"), template);
if (sizeof(lnk) <= len)
- die("insanely long symlink %s", template);
+ die(_("insanely long symlink %s"), template);
lnk[len] = 0;
if (symlink(lnk, path))
- die_errno("cannot symlink '%s' '%s'", lnk, path);
+ die_errno(_("cannot symlink '%s' '%s'"), lnk, path);
}
else if (S_ISREG(st_template.st_mode)) {
if (copy_file(path, template, st_template.st_mode))
- die_errno("cannot copy '%s' to '%s'", template,
+ die_errno(_("cannot copy '%s' to '%s'"), template,
path);
}
else
- error("ignoring template %s", template);
+ error(_("ignoring template %s"), template);
}
}
return;
template_len = strlen(template_dir);
if (PATH_MAX <= (template_len+strlen("/config")))
- die("insanely long template path %s", template_dir);
+ die(_("insanely long template path %s"), template_dir);
strcpy(template_path, template_dir);
if (template_path[template_len-1] != '/') {
template_path[template_len++] = '/';
}
dir = opendir(template_path);
if (!dir) {
- warning("templates not found %s", template_dir);
+ warning(_("templates not found %s"), template_dir);
return;
}
if (repository_format_version &&
repository_format_version != GIT_REPO_VERSION) {
- warning("not copying templates of "
- "a wrong format version %d from '%s'",
+ warning(_("not copying templates of "
+ "a wrong format version %d from '%s'"),
repository_format_version,
template_dir);
closedir(dir);
int filemode;
if (len > sizeof(path)-50)
- die("insane git directory %s", git_dir);
+ die(_("insane git directory %s"), git_dir);
memcpy(path, git_dir, len);
if (len && path[len-1] != '/')
if (!(flags & INIT_DB_QUIET)) {
const char *git_dir = get_git_dir();
int len = strlen(git_dir);
- printf("%s%s Git repository in %s%s\n",
- reinit ? "Reinitialized existing" : "Initialized empty",
- shared_repository ? " shared" : "",
+
+ /* TRANSLATORS: The first '%s' is either "Reinitialized
+ existing" or "Initialized empty", the second " shared" or
+ "", and the last '%s%s' is the verbatim directory name. */
+ printf(_("%s%s Git repository in %s%s\n"),
+ reinit ? _("Reinitialized existing") : _("Initialized empty"),
+ shared_repository ? _(" shared") : "",
git_dir, len && git_dir[len-1] != '/' ? "/" : "");
}
if (!strcmp(".", git_dir))
return 1;
if (!getcwd(cwd, sizeof(cwd)))
- die_errno("cannot tell cwd");
+ die_errno(_("cannot tell cwd"));
if (!strcmp(git_dir, cwd))
return 1;
/*
errno = EEXIST;
/* fallthru */
case -1:
- die_errno("cannot mkdir %s", argv[0]);
+ die_errno(_("cannot mkdir %s"), argv[0]);
break;
default:
break;
}
shared_repository = saved;
if (mkdir(argv[0], 0777) < 0)
- die_errno("cannot mkdir %s", argv[0]);
+ die_errno(_("cannot mkdir %s"), argv[0]);
mkdir_tried = 1;
goto retry;
}
- die_errno("cannot chdir to %s", argv[0]);
+ die_errno(_("cannot chdir to %s"), argv[0]);
}
} else if (0 < argc) {
usage(init_db_usage[0]);
git_dir = getenv(GIT_DIR_ENVIRONMENT);
work_tree = getenv(GIT_WORK_TREE_ENVIRONMENT);
if ((!git_dir || is_bare_repository_cfg == 1) && work_tree)
- die("%s (or --work-tree=<directory>) not allowed without "
- "specifying %s (or --git-dir=<directory>)",
+ die(_("%s (or --work-tree=<directory>) not allowed without "
+ "specifying %s (or --git-dir=<directory>)"),
GIT_WORK_TREE_ENVIRONMENT,
GIT_DIR_ENVIRONMENT);
if (!git_work_tree_cfg) {
git_work_tree_cfg = xcalloc(PATH_MAX, 1);
if (!getcwd(git_work_tree_cfg, PATH_MAX))
- die_errno ("Cannot access current working directory");
+ die_errno (_("Cannot access current working directory"));
}
if (work_tree)
set_git_work_tree(make_absolute_path(work_tree));
else
set_git_work_tree(git_work_tree_cfg);
if (access(get_git_work_tree(), X_OK))
- die_errno ("Cannot access work tree '%s'",
+ die_errno (_("Cannot access work tree '%s'"),
get_git_work_tree());
}
else {
diff --git a/builtin/log.c b/builtin/log.c
index d8c6c28d2fcc3bd0744f071da536215141dc0d0b..2f2050aa2c13b8fe5b8fc3d286f9a1df4d988859 100644 (file)
--- a/builtin/log.c
+++ b/builtin/log.c
rev->always_show_header = 0;
if (DIFF_OPT_TST(&rev->diffopt, FOLLOW_RENAMES)) {
rev->always_show_header = 0;
- if (rev->diffopt.nr_paths != 1)
+ if (rev->diffopt.pathspec.nr != 1)
usage("git logs can only follow renames on one pathname at a time");
}
for (i = 1; i < argc; i++) {
const char *v = skip_prefix(arg, "--decorate=");
decoration_style = parse_decoration_style(arg, v);
if (decoration_style < 0)
- die("invalid --decorate option: %s", arg);
+ die(_("invalid --decorate option: %s"), arg);
decoration_given = 1;
} else if (!strcmp(arg, "--no-decorate")) {
decoration_style = 0;
} else if (!strcmp(arg, "-h")) {
usage(builtin_log_usage);
} else
- die("unrecognized argument: %s", arg);
+ die(_("unrecognized argument: %s"), arg);
}
/*
if (rev->commit_format != CMIT_FMT_ONELINE)
putchar(rev->diffopt.line_termination);
}
- printf("Final output: %d %s\n", nr, stage);
+ printf(_("Final output: %d %s\n"), nr, stage);
}
static struct itimerval early_output_timer;
setup_early_output(rev);
if (prepare_revision_walk(rev))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
if (rev->early_output)
finish_early_output(rev);
int offset = 0;
if (!buf)
- return error("Could not read object %s", sha1_to_hex(sha1));
+ return error(_("Could not read object %s"), sha1_to_hex(sha1));
if (show_tag_object)
while (offset < size && buf[offset] != '\n') {
break;
o = parse_object(t->tagged->sha1);
if (!o)
- ret = error("Could not read object %s",
+ ret = error(_("Could not read object %s"),
sha1_to_hex(t->tagged->sha1));
objects[i].item = o;
i--;
ret = cmd_log_walk(&rev);
break;
default:
- ret = error("Unknown type: %d", o->type);
+ ret = error(_("Unknown type: %d"), o->type);
}
}
free(objects);
{
if (!strcmp(var, "format.headers")) {
if (!value)
- die("format.headers without value");
+ die(_("format.headers without value"));
add_header(value);
return 0;
}
strbuf_addstr(&filename, output_directory);
if (filename.len >=
PATH_MAX - FORMAT_PATCH_NAME_MAX - suffix_len)
- return error("name of output directory is too long");
+ return error(_("name of output directory is too long"));
if (filename.buf[filename.len - 1] != '/')
strbuf_addch(&filename, '/');
}
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
if (freopen(filename.buf, "w", stdout) == NULL)
- return error("Cannot open patch file %s", filename.buf);
+ return error(_("Cannot open patch file %s"), filename.buf);
strbuf_release(&filename);
return 0;
@@ -651,7 +651,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
unsigned flags1, flags2;
if (rev->pending.nr != 2)
- die("Need exactly one range.");
+ die(_("Need exactly one range."));
o1 = rev->pending.objects[0].item;
flags1 = o1->flags;
@@ -659,7 +659,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
flags2 = o2->flags;
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
- die("Not a range.");
+ die(_("Not a range."));
init_patch_ids(ids);
@@ -670,7 +670,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
add_pending_object(&check_rev, o1, "o1");
add_pending_object(&check_rev, o2, "o2");
if (prepare_revision_walk(&check_rev))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
while ((commit = get_revision(&check_rev)) != NULL) {
/* ignore merges */
const char *email_end = strrchr(committer, '>');
struct strbuf buf = STRBUF_INIT;
if (!email_start || !email_end || email_start > email_end - 1)
- die("Could not extract email from committer identity.");
+ die(_("Could not extract email from committer identity."));
strbuf_addf(&buf, "%s.%lu.git.%.*s", base,
(unsigned long) time(NULL),
(int)(email_end - email_start - 1), email_start + 1);
struct commit *commit = NULL;
if (rev->commit_format != CMIT_FMT_EMAIL)
- die("Cover letter needs email format");
+ die(_("Cover letter needs email format"));
committer = git_committer_info(0);
m++;
}
if (!z)
- die("insane in-reply-to: %s", msg_id);
+ die(_("insane in-reply-to: %s"), msg_id);
if (++z == m)
return a;
return xmemdupz(a, z - a);
{
const char **dir = (const char **)opt->value;
if (*dir)
- die("Two output directories?");
+ die(_("Two output directories?"));
*dir = arg;
return 0;
}
committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
endpos = strchr(committer, '>');
if (!endpos)
- die("bogus committer info %s", committer);
+ die(_("bogus committer info %s"), committer);
add_signoff = xmemdupz(committer, endpos - committer + 1);
}
numbered = 0;
if (numbered && keep_subject)
- die ("-n and -k are mutually exclusive.");
+ die (_("-n and -k are mutually exclusive."));
if (keep_subject && subject_prefix)
- die ("--subject-prefix and -k are mutually exclusive.");
+ die (_("--subject-prefix and -k are mutually exclusive."));
argc = setup_revisions(argc, argv, &rev, &s_r_opt);
if (argc > 1)
- die ("unrecognized argument: %s", argv[1]);
+ die (_("unrecognized argument: %s"), argv[1]);
if (rev.diffopt.output_format & DIFF_FORMAT_NAME)
- die("--name-only does not make sense");
+ die(_("--name-only does not make sense"));
if (rev.diffopt.output_format & DIFF_FORMAT_NAME_STATUS)
- die("--name-status does not make sense");
+ die(_("--name-status does not make sense"));
if (rev.diffopt.output_format & DIFF_FORMAT_CHECKDIFF)
- die("--check does not make sense");
+ die(_("--check does not make sense"));
if (!use_patch_format &&
(!rev.diffopt.output_format ||
if (output_directory) {
if (use_stdout)
- die("standard output, or directory, which one?");
+ die(_("standard output, or directory, which one?"));
if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
- die_errno("Could not create directory '%s'",
+ die_errno(_("Could not create directory '%s'"),
output_directory);
}
realstdout = xfdopen(xdup(1), "w");
if (prepare_revision_walk(&rev))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
rev.boundary = 1;
while ((commit = get_revision(&rev)) != NULL) {
if (commit->object.flags & BOUNDARY) {
if (!use_stdout && reopen_stdout(numbered_files ? NULL : commit,
&rev))
- die("Failed to create output files");
+ die(_("Failed to create output files"));
shown = log_tree_commit(&rev, commit);
free(commit->buffer);
commit->buffer = NULL;
if (!current_branch || !current_branch->merge
|| !current_branch->merge[0]
|| !current_branch->merge[0]->dst) {
- fprintf(stderr, "Could not find a tracked"
+ fprintf(stderr, _("Could not find a tracked"
" remote branch, please"
- " specify <upstream> manually.\n");
+ " specify <upstream> manually.\n"));
usage_with_options(cherry_usage, options);
}
DIFF_OPT_SET(&revs.diffopt, RECURSIVE);
if (add_pending_commit(head, &revs, 0))
- die("Unknown commit %s", head);
+ die(_("Unknown commit %s"), head);
if (add_pending_commit(upstream, &revs, UNINTERESTING))
- die("Unknown commit %s", upstream);
+ die(_("Unknown commit %s"), upstream);
/* Don't say anything if head and upstream are the same. */
if (revs.pending.nr == 2) {
get_patch_ids(&revs, &ids, prefix);
if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
- die("Unknown commit %s", limit);
+ die(_("Unknown commit %s"), limit);
/* reverse the list of commits */
if (prepare_revision_walk(&revs))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
while ((commit = get_revision(&revs)) != NULL) {
/* ignore merges */
if (commit->parents && commit->parents->next)
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 2c4cf5e559b4166973f12bda567e1a6c5657a7e7..adc2a6dfb3290b2126a1ac68df31eb921c4b1196 100644 (file)
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
-#include "cache.h"
+#include "builtin.h"
#include "run-command.h"
#include "exec_cmd.h"
index c33091b3ed52bc8539ff82f039ec8c7718f3dcc2..3a64f5d0bdbcc8d7d21edb01f285cc8b41755228 100644 (file)
-#include "cache.h"
+#include "builtin.h"
#include "commit.h"
#include "tag.h"
#include "merge-recursive.h"
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 9b25ddc9794efe489ee9ec9fd3203ffa997f03f7..19917426fba19cf60b838ff9b07d20b5e44259a5 100644 (file)
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
-#include "cache.h"
+#include "builtin.h"
#include "tree-walk.h"
#include "xdiff-interface.h"
#include "blob.h"
diff --git a/builtin/merge.c b/builtin/merge.c
index 42fff387e69d9b5412e8e776aed3272b78ebe758..2511361eca0fb7531c912891a9ce0b48e4223c49 100644 (file)
--- a/builtin/merge.c
+++ b/builtin/merge.c
strbuf_addf(buf, "%s%s", buf->len ? "\n\n" : "", arg);
have_message = 1;
} else
- return error("switch `m' requires a value");
+ return error(_("switch `m' requires a value"));
return 0;
}
exclude_cmds(&main_cmds, ¬_strategies);
}
if (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {
- fprintf(stderr, "Could not find merge strategy '%s'.\n", name);
- fprintf(stderr, "Available strategies are:");
+ fprintf(stderr, _("Could not find merge strategy '%s'.\n"), name);
+ fprintf(stderr, _("Available strategies are:"));
for (i = 0; i < main_cmds.cnt; i++)
fprintf(stderr, " %s", main_cmds.names[i]->name);
fprintf(stderr, ".\n");
if (other_cmds.cnt) {
- fprintf(stderr, "Available custom strategies are:");
+ fprintf(stderr, _("Available custom strategies are:"));
for (i = 0; i < other_cmds.cnt; i++)
fprintf(stderr, " %s", other_cmds.names[i]->name);
fprintf(stderr, ".\n");
"allow fast-forward (default)"),
OPT_BOOLEAN(0, "ff-only", &fast_forward_only,
"abort if fast-forward is not possible"),
+ OPT_BOOLEAN('i', "ignored-are-precious", &ignored_are_precious,
+ "fail when an ignored file needs to be overwritten"),
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_CALLBACK('s', "strategy", &use_strategies, "strategy",
"merge strategy to use", option_parse_strategy),
cp.git_cmd = 1;
if (start_command(&cp))
- die("could not run stash.");
+ die(_("could not run stash."));
len = strbuf_read(&buffer, cp.out, 1024);
close(cp.out);
if (finish_command(&cp) || len < 0)
- die("stash failed");
+ die(_("stash failed"));
else if (!len)
return;
strbuf_setlen(&buffer, buffer.len-1);
if (get_sha1(buffer.buf, stash))
- die("not a valid object: %s", buffer.buf);
+ die(_("not a valid object: %s"), buffer.buf);
}
static void read_empty(unsigned const char *sha1, int verbose)
args[i] = NULL;
if (run_command_v_opt(args, RUN_GIT_CMD))
- die("read-tree failed");
+ die(_("read-tree failed"));
}
static void restore_state(void)
static void finish_up_to_date(const char *msg)
{
if (verbosity >= 0)
- printf("%s%s\n", squash ? " (nothing to squash)" : "", msg);
+ printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
drop_save();
}
int fd;
struct pretty_print_context ctx = {0};
- printf("Squash commit -- not updating HEAD\n");
+ printf(_("Squash commit -- not updating HEAD\n"));
fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666);
if (fd < 0)
- die_errno("Could not write to '%s'", git_path("SQUASH_MSG"));
+ die_errno(_("Could not write to '%s'"), git_path("SQUASH_MSG"));
init_revisions(&rev, NULL);
rev.ignore_merges = 1;
setup_revisions(0, NULL, &rev, NULL);
if (prepare_revision_walk(&rev))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
ctx.abbrev = rev.abbrev;
ctx.date_mode = rev.date_mode;
pretty_print_commit(rev.commit_format, commit, &out, &ctx);
}
if (write(fd, out.buf, out.len) < 0)
- die_errno("Writing SQUASH_MSG");
+ die_errno(_("Writing SQUASH_MSG"));
if (close(fd))
- die_errno("Finishing SQUASH_MSG");
+ die_errno(_("Finishing SQUASH_MSG"));
strbuf_release(&out);
}
squash_message();
} else {
if (verbosity >= 0 && !merge_msg.len)
- printf("No merge message -- not updating HEAD\n");
+ printf(_("No merge message -- not updating HEAD\n"));
else {
const char *argv_gc_auto[] = { "gc", "--auto", NULL };
update_ref(reflog_message.buf, "HEAD",
if (diff_use_color_default > 0)
DIFF_OPT_SET(&opts, COLOR_DIFF);
if (diff_setup_done(&opts) < 0)
- die("diff_setup_done failed");
+ die(_("diff_setup_done failed"));
diff_tree_sha1(head, new_head, "", &opts);
diffcore_std(&opts);
diff_flush(&opts);
memset(branch_head, 0, sizeof(branch_head));
remote_head = peel_to_type(remote, 0, NULL, OBJ_COMMIT);
if (!remote_head)
- die("'%s' does not point to a commit", remote);
+ die(_("'%s' does not point to a commit"), remote);
if (dwim_ref(remote, strlen(remote), branch_head, &found_ref) > 0) {
if (!prefixcmp(found_ref, "refs/heads/")) {
fp = fopen(git_path("FETCH_HEAD"), "r");
if (!fp)
- die_errno("could not open '%s' for reading",
+ die_errno(_("could not open '%s' for reading"),
git_path("FETCH_HEAD"));
strbuf_getline(&line, fp, '\n');
fclose(fp);
buf = xstrdup(v);
argc = split_cmdline(buf, &argv);
if (argc < 0)
- die("Bad branch.%s.mergeoptions string: %s", branch,
+ die(_("Bad branch.%s.mergeoptions string: %s"), branch,
split_cmdline_strerror(argc));
argv = xrealloc(argv, sizeof(*argv) * (argc + 2));
memmove(argv + 1, argv, sizeof(*argv) * (argc + 1));
static void write_tree_trivial(unsigned char *sha1)
{
if (write_cache_as_tree(sha1, 0, NULL))
- die("git write-tree failed to write a tree");
+ die(_("git write-tree failed to write a tree"));
}
-int try_merge_command(const char *strategy, struct commit_list *common,
+int try_merge_command(const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
const char *head_arg, struct commit_list *remotes)
{
const char **args;
free(args);
discard_cache();
if (read_cache() < 0)
- die("failed to read the cache");
+ die(_("failed to read the cache"));
resolve_undo_clear();
return ret;
if (active_cache_changed &&
(write_cache(index_fd, active_cache, active_nr) ||
commit_locked_index(lock)))
- return error("Unable to write index.");
+ return error(_("Unable to write index."));
rollback_lock_file(lock);
if (!strcmp(strategy, "recursive") || !strcmp(strategy, "subtree")) {
struct commit_list *j;
if (remoteheads->next) {
- error("Not handling anything other than two heads merge.");
+ error(_("Not handling anything other than two heads merge."));
return 2;
}
for (x = 0; x < xopts_nr; x++)
if (parse_merge_opt(&o, xopts[x]))
- die("Unknown option for merge-recursive: -X%s", xopts[x]);
+ die(_("Unknown option for merge-recursive: -X%s"), xopts[x]);
o.branch1 = head_arg;
o.branch2 = remoteheads->item->util;
@@ -676,11 +679,12 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
if (active_cache_changed &&
(write_cache(index_fd, active_cache, active_nr) ||
commit_locked_index(lock)))
- die ("unable to write %s", get_index_file());
+ die (_("unable to write %s"), get_index_file());
rollback_lock_file(lock);
return clean ? 0 : 1;
} else {
- return try_merge_command(strategy, common, head_arg, remoteheads);
+ return try_merge_command(strategy, xopts_nr, xopts,
+ common, head_arg, remoteheads);
}
}
@@ -720,9 +724,11 @@ int checkout_fast_forward(const unsigned char *head, const unsigned char *remote
memset(&opts, 0, sizeof(opts));
memset(&t, 0, sizeof(t));
memset(&dir, 0, sizeof(dir));
- dir.flags |= DIR_SHOW_IGNORED;
- dir.exclude_per_dir = ".gitignore";
- opts.dir = &dir;
+ if (!ignored_are_precious) {
+ dir.flags |= DIR_SHOW_IGNORED;
+ dir.exclude_per_dir = ".gitignore";
+ opts.dir = &dir;
+ }
opts.head_idx = 1;
opts.src_index = &the_index;
@@ -747,7 +753,7 @@ int checkout_fast_forward(const unsigned char *head, const unsigned char *remote
return -1;
if (write_cache(fd, active_cache, active_nr) ||
commit_locked_index(lock_file))
- die("unable to write new index file");
+ die(_("unable to write new index file"));
return 0;
}
struct commit_list *parent = xmalloc(sizeof(*parent));
write_tree_trivial(result_tree);
- printf("Wonderful.\n");
+ printf(_("Wonderful.\n"));
parent->item = lookup_commit(head);
parent->next = xmalloc(sizeof(*parent->next));
parent->next->item = remoteheads->item;
fp = fopen(git_path("MERGE_MSG"), "a");
if (!fp)
- die_errno("Could not open '%s' for writing",
+ die_errno(_("Could not open '%s' for writing"),
git_path("MERGE_MSG"));
fprintf(fp, "\nConflicts:\n");
for (pos = 0; pos < active_nr; pos++) {
}
fclose(fp);
rerere(allow_rerere_auto);
- printf("Automatic merge failed; "
- "fix conflicts and then commit the result.\n");
+ printf(_("Automatic merge failed; "
+ "fix conflicts and then commit the result.\n"));
return 1;
}
return NULL;
second_token = lookup_commit_reference_gently(second_sha1, 0);
if (!second_token)
- die("'%s' is not a commit", argv[1]);
+ die(_("'%s' is not a commit"), argv[1]);
if (hashcmp(second_token->object.sha1, head))
return NULL;
}
const char *nargv[] = {"reset", "--merge", NULL};
if (!file_exists(git_path("MERGE_HEAD")))
- die("There is no merge to abort (MERGE_HEAD missing).");
+ die(_("There is no merge to abort (MERGE_HEAD missing)."));
/* Invoke 'git reset --merge' */
return cmd_reset(nargc, nargv, prefix);
* add/rm <file>', just 'git commit'.
*/
if (advice_resolve_conflict)
- die("You have not concluded your merge (MERGE_HEAD exists).\n"
- "Please, commit your changes before you can merge.");
+ die(_("You have not concluded your merge (MERGE_HEAD exists).\n"
+ "Please, commit your changes before you can merge."));
else
- die("You have not concluded your merge (MERGE_HEAD exists).");
+ die(_("You have not concluded your merge (MERGE_HEAD exists)."));
}
resolve_undo_clear();
if (squash) {
if (!allow_fast_forward)
- die("You cannot combine --squash with --no-ff.");
+ die(_("You cannot combine --squash with --no-ff."));
option_commit = 0;
}
if (!allow_fast_forward && fast_forward_only)
- die("You cannot combine --no-ff with --ff-only.");
+ die(_("You cannot combine --no-ff with --ff-only."));
if (!argc)
usage_with_options(builtin_merge_usage,
* We do the same for "git pull".
*/
if (argc != 1)
- die("Can merge only exactly one commit into "
- "empty head");
+ die(_("Can merge only exactly one commit into "
+ "empty head"));
if (squash)
- die("Squash commit into empty head not supported yet");
+ die(_("Squash commit into empty head not supported yet"));
if (!allow_fast_forward)
- die("Non-fast-forward commit does not make sense into "
- "an empty head");
+ die(_("Non-fast-forward commit does not make sense into "
+ "an empty head"));
remote_head = peel_to_type(argv[0], 0, NULL, OBJ_COMMIT);
if (!remote_head)
- die("%s - not something we can merge", argv[0]);
+ die(_("%s - not something we can merge"), argv[0]);
update_ref("initial pull", "HEAD", remote_head->sha1, NULL, 0,
DIE_ON_ERR);
read_empty(remote_head->sha1, 0);
o = peel_to_type(argv[i], 0, NULL, OBJ_COMMIT);
if (!o)
- die("%s - not something we can merge", argv[i]);
+ die(_("%s - not something we can merge"), argv[i]);
commit = lookup_commit(o->sha1);
commit->util = (void *)argv[i];
remotes = &commit_list_insert(commit, remotes)->next;
strcpy(hex, find_unique_abbrev(head, DEFAULT_ABBREV));
if (verbosity >= 0)
- printf("Updating %s..%s\n",
+ printf(_("Updating %s..%s\n"),
hex,
find_unique_abbrev(remoteheads->item->object.sha1,
DEFAULT_ABBREV));
if (allow_trivial && !fast_forward_only) {
/* See if it is really trivial. */
git_committer_info(IDENT_ERROR_ON_NO_NAME);
- printf("Trying really trivial in-index merge...\n");
+ printf(_("Trying really trivial in-index merge...\n"));
if (!read_tree_trivial(common->item->object.sha1,
head, remoteheads->item->object.sha1))
return merge_trivial();
- printf("Nope.\n");
+ printf(_("Nope.\n"));
}
} else {
/*
}
if (fast_forward_only)
- die("Not possible to fast-forward, aborting.");
+ die(_("Not possible to fast-forward, aborting."));
/* We are going to make a new commit. */
git_committer_info(IDENT_ERROR_ON_NO_NAME);
for (i = 0; i < use_strategies_nr; i++) {
int ret;
if (i) {
- printf("Rewinding the tree to pristine...\n");
+ printf(_("Rewinding the tree to pristine...\n"));
restore_state();
}
if (use_strategies_nr != 1)
- printf("Trying merge strategy %s...\n",
+ printf(_("Trying merge strategy %s...\n"),
use_strategies[i]->name);
/*
* Remember which strategy left the state in the working
restore_state();
if (use_strategies_nr > 1)
fprintf(stderr,
- "No merge strategy handled the merge.\n");
+ _("No merge strategy handled the merge.\n"));
else
- fprintf(stderr, "Merge with strategy %s failed.\n",
+ fprintf(stderr, _("Merge with strategy %s failed.\n"),
use_strategies[0]->name);
return 2;
} else if (best_strategy == wt_strategy)
; /* We already have its result in the working tree. */
else {
- printf("Rewinding the tree to pristine...\n");
+ printf(_("Rewinding the tree to pristine...\n"));
restore_state();
- printf("Using the %s to prepare resolving by hand.\n",
+ printf(_("Using the %s to prepare resolving by hand.\n"),
best_strategy);
try_merge_strategy(best_strategy, common, head_arg);
}
sha1_to_hex(j->item->object.sha1));
fd = open(git_path("MERGE_HEAD"), O_WRONLY | O_CREAT, 0666);
if (fd < 0)
- die_errno("Could not open '%s' for writing",
+ die_errno(_("Could not open '%s' for writing"),
git_path("MERGE_HEAD"));
if (write_in_full(fd, buf.buf, buf.len) != buf.len)
- die_errno("Could not write to '%s'", git_path("MERGE_HEAD"));
+ die_errno(_("Could not write to '%s'"), git_path("MERGE_HEAD"));
close(fd);
strbuf_addch(&merge_msg, '\n');
fd = open(git_path("MERGE_MSG"), O_WRONLY | O_CREAT, 0666);
if (fd < 0)
- die_errno("Could not open '%s' for writing",
+ die_errno(_("Could not open '%s' for writing"),
git_path("MERGE_MSG"));
if (write_in_full(fd, merge_msg.buf, merge_msg.len) !=
merge_msg.len)
- die_errno("Could not write to '%s'", git_path("MERGE_MSG"));
+ die_errno(_("Could not write to '%s'"), git_path("MERGE_MSG"));
close(fd);
fd = open(git_path("MERGE_MODE"), O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0)
- die_errno("Could not open '%s' for writing",
+ die_errno(_("Could not open '%s' for writing"),
git_path("MERGE_MODE"));
strbuf_reset(&buf);
if (!allow_fast_forward)
strbuf_addf(&buf, "no-ff");
if (write_in_full(fd, buf.buf, buf.len) != buf.len)
- die_errno("Could not write to '%s'", git_path("MERGE_MODE"));
+ die_errno(_("Could not write to '%s'"), git_path("MERGE_MODE"));
close(fd);
}
if (merge_was_ok) {
- fprintf(stderr, "Automatic merge went well; "
- "stopped before committing as requested\n");
+ fprintf(stderr, _("Automatic merge went well; "
+ "stopped before committing as requested\n"));
return 0;
} else
return suggest_conflicts(option_renormalize);
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 1cb0f3f2a7cf580efc76957de24684630d596af9..9148cc0609a8dab6b6dc1d7d96e5c42705fc7ca1 100644 (file)
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
-#include "cache.h"
+#include "builtin.h"
#include "tag.h"
#include "exec_cmd.h"
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995d9e704faa041f97f92ba72dabe7839d81..40f33ca4d0e6d0bb1733e0544029c6f588d09b59 100644 (file)
--- a/builtin/mv.c
+++ b/builtin/mv.c
newfd = hold_locked_index(&lock_file, 1);
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
source = copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
const char *bad = NULL;
if (show_only)
- printf("Checking rename of '%s' to '%s'\n", src, dst);
+ printf(_("Checking rename of '%s' to '%s'\n"), src, dst);
length = strlen(src);
if (lstat(src, &st) < 0)
- bad = "bad source";
+ bad = _("bad source");
else if (!strncmp(src, dst, length) &&
(dst[length] == 0 || dst[length] == '/')) {
- bad = "can not move directory into itself";
+ bad = _("can not move directory into itself");
} else if ((src_is_dir = S_ISDIR(st.st_mode))
&& lstat(dst, &st) == 0)
- bad = "cannot move directory over file";
+ bad = _("cannot move directory over file");
else if (src_is_dir) {
const char *src_w_slash = add_slash(src);
int len_w_slash = length + 1;
first = cache_name_pos(src_w_slash, len_w_slash);
if (first >= 0)
- die ("Huh? %.*s is in index?",
+ die (_("Huh? %.*s is in index?"),
len_w_slash, src_w_slash);
first = -1 - first;
free((char *)src_w_slash);
if (last - first < 1)
- bad = "source directory is empty";
+ bad = _("source directory is empty");
else {
int j, dst_len;
argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
- bad = "not under version control";
+ bad = _("not under version control");
else if (lstat(dst, &st) == 0) {
- bad = "destination exists";
+ bad = _("destination exists");
if (force) {
/*
* only files can overwrite each other:
* check both source and destination
*/
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
+ warning(_("%s; will overwrite!"), bad);
bad = NULL;
} else
- bad = "Cannot overwrite";
+ bad = _("Cannot overwrite");
}
} else if (string_list_has_string(&src_for_dst, dst))
- bad = "multiple sources for the same target";
+ bad = _("multiple sources for the same target");
else
string_list_insert(&src_for_dst, dst);
i--;
}
} else
- die ("%s, source=%s, destination=%s",
+ die (_("%s, source=%s, destination=%s"),
bad, src, dst);
}
}
enum update_mode mode = modes[i];
int pos;
if (show_only || verbose)
- printf("Renaming %s to %s\n", src, dst);
+ printf(_("Renaming %s to %s\n"), src, dst);
if (!show_only && mode != INDEX &&
rename(src, dst) < 0 && !ignore_errors)
- die_errno ("renaming '%s' failed", src);
+ die_errno (_("renaming '%s' failed"), src);
if (mode == WORKING_DIRECTORY)
continue;
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
- die("Unable to write new index file");
+ die(_("Unable to write new index file"));
}
return 0;
diff --git a/builtin/notes.c b/builtin/notes.c
index 4d5556e2cb5bccaf0100d9f5019e1a1c493e35e7..91d792928d4b2545dd9fd158d46dd214acbfa998 100644 (file)
--- a/builtin/notes.c
+++ b/builtin/notes.c
show.err = 0;
show.git_cmd = 1;
if (start_command(&show))
- die("unable to start 'show' for object '%s'",
+ die(_("unable to start 'show' for object '%s'"),
sha1_to_hex(object));
/* Open the output as FILE* so strbuf_getline() can be used. */
show_out = xfdopen(show.out, "r");
if (show_out == NULL)
- die_errno("can't fdopen 'show' output fd");
+ die_errno(_("can't fdopen 'show' output fd"));
/* Prepend "# " to each output line and write result to 'fd' */
while (strbuf_getline(&buf, show_out, '\n') != EOF) {
}
strbuf_release(&buf);
if (fclose(show_out))
- die_errno("failed to close pipe to 'show' for object '%s'",
+ die_errno(_("failed to close pipe to 'show' for object '%s'"),
sha1_to_hex(object));
if (finish_command(&show))
- die("failed to finish 'show' for object '%s'",
+ die(_("failed to finish 'show' for object '%s'"),
sha1_to_hex(object));
}
path = git_pathdup("NOTES_EDITMSG");
fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)
- die_errno("could not create file '%s'", path);
+ die_errno(_("could not create file '%s'"), path);
if (msg->given)
write_or_die(fd, msg->buf.buf, msg->buf.len);
strbuf_reset(&(msg->buf));
if (launch_editor(path, &(msg->buf), NULL)) {
- die("Please supply the note contents using either -m" \
- " or -F option");
+ die(_("Please supply the note contents using either -m" \
+ " or -F option"));
}
stripspace(&(msg->buf), 1);
}
}
if (!msg->buf.len) {
- fprintf(stderr, "Removing note for object %s\n",
+ fprintf(stderr, _("Removing note for object %s\n"),
sha1_to_hex(object));
hashclr(result);
} else {
if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
- error("unable to write note object");
+ error(_("unable to write note object"));
if (path)
- error("The note contents has been left in %s",
+ error(_("The note contents has been left in %s"),
path);
exit(128);
}
strbuf_addch(&(msg->buf), '\n');
if (!strcmp(arg, "-")) {
if (strbuf_read(&(msg->buf), 0, 1024) < 0)
- die_errno("cannot read '%s'", arg);
+ die_errno(_("cannot read '%s'"), arg);
} else if (strbuf_read_file(&(msg->buf), arg, 1024) < 0)
- die_errno("could not open or read '%s'", arg);
+ die_errno(_("could not open or read '%s'"), arg);
stripspace(&(msg->buf), 0);
msg->given = 1;
@@ -279,10 +279,10 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
strbuf_addch(&(msg->buf), '\n');
if (get_sha1(arg, object))
- die("Failed to resolve '%s' as a valid ref.", arg);
+ die(_("Failed to resolve '%s' as a valid ref."), arg);
if (!(buf = read_sha1_file(object, &type, &len)) || !len) {
free(buf);
- die("Failed to read object '%s'.", arg);;
+ die(_("Failed to read object '%s'."), arg);;
}
strbuf_add(&(msg->buf), buf, len);
free(buf);
if (!t)
t = &default_notes_tree;
if (!t->initialized || !t->ref || !*t->ref)
- die("Cannot commit uninitialized/unreferenced notes tree");
+ die(_("Cannot commit uninitialized/unreferenced notes tree"));
if (!t->dirty)
return; /* don't have to commit an unchanged tree */
config_error_nonbool(k);
c->combine = parse_combine_notes_fn(v);
if (!c->combine) {
- error("Bad notes.rewriteMode value: '%s'", v);
+ error(_("Bad notes.rewriteMode value: '%s'"), v);
return 1;
}
return 0;
if (!prefixcmp(v, "refs/notes/"))
string_list_add_refs_by_glob(c->refs, v);
else
- warning("Refusing to rewrite notes in %s"
- " (outside of refs/notes/)", v);
+ warning(_("Refusing to rewrite notes in %s"
+ " (outside of refs/notes/)"), v);
return 0;
}
c->mode_from_env = 1;
c->combine = parse_combine_notes_fn(rewrite_mode_env);
if (!c->combine)
- error("Bad " GIT_NOTES_REWRITE_MODE_ENVIRONMENT
- " value: '%s'", rewrite_mode_env);
+ /* TRANSLATORS: The first %s is the name of the
+ environment variable, the second %s is its value */
+ error(_("Bad %s value: '%s'"), GIT_NOTES_REWRITE_MODE_ENVIRONMENT,
+ rewrite_mode_env);
}
if (rewrite_refs_env) {
c->refs_from_env = 1;
split = strbuf_split(&buf, ' ');
if (!split[0] || !split[1])
- die("Malformed input line: '%s'.", buf.buf);
+ die(_("Malformed input line: '%s'."), buf.buf);
strbuf_rtrim(split[0]);
strbuf_rtrim(split[1]);
if (get_sha1(split[0]->buf, from_obj))
- die("Failed to resolve '%s' as a valid ref.", split[0]->buf);
+ die(_("Failed to resolve '%s' as a valid ref."), split[0]->buf);
if (get_sha1(split[1]->buf, to_obj))
- die("Failed to resolve '%s' as a valid ref.", split[1]->buf);
+ die(_("Failed to resolve '%s' as a valid ref."), split[1]->buf);
if (rewrite_cmd)
err = copy_note_for_rewrite(c, from_obj, to_obj);
combine_notes_overwrite);
if (err) {
- error("Failed to copy notes from '%s' to '%s'",
+ error(_("Failed to copy notes from '%s' to '%s'"),
split[0]->buf, split[1]->buf);
ret = 1;
}
t = &default_notes_tree;
if (prefixcmp(t->ref, "refs/notes/"))
- die("Refusing to %s notes in %s (outside of refs/notes/)",
- subcommand, t->ref);
+ /* TRANSLATORS: The first %s is one of "git notes ACTION",
+ e.g. "add", "copy", "append" etc. */
+ die(_("Refusing to %s notes in %s (outside of refs/notes/)"),
+ _(subcommand), t->ref);
return t;
}
git_notes_list_usage, 0);
if (1 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_list_usage, options);
}
- t = init_notes_check("list");
+ t = init_notes_check(N_("list"));
if (argc) {
if (get_sha1(argv[0], object))
- die("Failed to resolve '%s' as a valid ref.", argv[0]);
+ die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
note = get_note(t, object);
if (note) {
puts(sha1_to_hex(note));
retval = 0;
} else
- retval = error("No note found for object %s.",
+ retval = error(_("No note found for object %s."),
sha1_to_hex(object));
} else
retval = for_each_note(t, 0, list_each_note, NULL);
0);
if (1 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_add_usage, options);
}
object_ref = argc ? argv[0] : "HEAD";
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
- t = init_notes_check("add");
+ t = init_notes_check(N_("add"));
note = get_note(t, object);
if (note) {
if (!force) {
- retval = error("Cannot add notes. Found existing notes "
+ retval = error(_("Cannot add notes. Found existing notes "
"for object %s. Use '-f' to overwrite "
- "existing notes", sha1_to_hex(object));
+ "existing notes"), sha1_to_hex(object));
goto out;
}
- fprintf(stderr, "Overwriting existing notes for object %s\n",
+ fprintf(stderr, _("Overwriting existing notes for object %s\n"),
sha1_to_hex(object));
}
if (from_stdin || rewrite_cmd) {
if (argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_copy_usage, options);
} else {
return notes_copy_from_stdin(force, rewrite_cmd);
}
if (argc < 2) {
- error("too few parameters");
+ error(_("too few parameters"));
usage_with_options(git_notes_copy_usage, options);
}
if (2 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_copy_usage, options);
}
if (get_sha1(argv[0], from_obj))
- die("Failed to resolve '%s' as a valid ref.", argv[0]);
+ die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
object_ref = 1 < argc ? argv[1] : "HEAD";
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
- t = init_notes_check("copy");
+ t = init_notes_check(N_("copy"));
note = get_note(t, object);
if (note) {
if (!force) {
- retval = error("Cannot copy notes. Found existing "
+ retval = error(_("Cannot copy notes. Found existing "
"notes for object %s. Use '-f' to "
- "overwrite existing notes",
+ "overwrite existing notes"),
sha1_to_hex(object));
goto out;
}
- fprintf(stderr, "Overwriting existing notes for object %s\n",
+ fprintf(stderr, _("Overwriting existing notes for object %s\n"),
sha1_to_hex(object));
}
from_note = get_note(t, from_obj);
if (!from_note) {
- retval = error("Missing notes on source object %s. Cannot "
- "copy.", sha1_to_hex(from_obj));
+ retval = error(_("Missing notes on source object %s. Cannot "
+ "copy."), sha1_to_hex(from_obj));
goto out;
}
PARSE_OPT_KEEP_ARGV0);
if (2 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(usage, options);
}
if (msg.given && edit)
- fprintf(stderr, "The -m/-F/-c/-C options have been deprecated "
+ fprintf(stderr, _("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");
+ "Please use 'git notes add -f -m/-F/-c/-C' instead.\n"));
object_ref = 1 < argc ? argv[1] : "HEAD";
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
t = init_notes_check(argv[0]);
note = get_note(t, object);
0);
if (1 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_show_usage, options);
}
object_ref = argc ? argv[0] : "HEAD";
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
- t = init_notes_check("show");
+ t = init_notes_check(N_("show"));
note = get_note(t, object);
if (!note)
- retval = error("No note found for object %s.",
+ retval = error(_("No note found for object %s."),
sha1_to_hex(object));
else {
const char *show_args[3] = {"show", sha1_to_hex(note), NULL};
git_notes_remove_usage, 0);
if (1 < argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_remove_usage, options);
}
object_ref = argc ? argv[0] : "HEAD";
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
- t = init_notes_check("remove");
+ t = init_notes_check(N_("remove"));
retval = remove_note(t, object);
if (retval)
- fprintf(stderr, "Object %s has no note\n", sha1_to_hex(object));
+ fprintf(stderr, _("Object %s has no note\n"), sha1_to_hex(object));
else {
- fprintf(stderr, "Removing note for object %s\n",
+ fprintf(stderr, _("Removing note for object %s\n"),
sha1_to_hex(object));
commit_notes(t, "Notes removed by 'git notes remove'");
0);
if (argc) {
- error("too many parameters");
+ error(_("too many parameters"));
usage_with_options(git_notes_prune_usage, options);
}
- t = init_notes_check("prune");
+ t = init_notes_check(N_("prune"));
prune_notes(t, (verbose ? NOTES_PRUNE_VERBOSE : 0) |
(show_only ? NOTES_PRUNE_VERBOSE|NOTES_PRUNE_DRYRUN : 0) );
else if (!strcmp(argv[0], "get-ref"))
result = get_ref(argc, argv, prefix);
else {
- result = error("Unknown subcommand: %s", argv[0]);
+ result = error(_("Unknown subcommand: %s"), argv[0]);
usage_with_options(git_notes_usage, options);
}
index 41e1615a28d772d1677c172ff2f570f31de4026f..a15e3661f4f4b9d113f478ee5fbcc2ad1b5c1555 100644 (file)
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
*
*/
-#include "cache.h"
+#include "builtin.h"
#include "exec_cmd.h"
#define BLKSIZE 512
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index 091860b2e370561f0811399b0d307e732e9eaac3..39a9d89fbdf322a8ef42a62e41ac36af934ff638 100644 (file)
--- a/builtin/pack-refs.c
+++ b/builtin/pack-refs.c
-#include "cache.h"
+#include "builtin.h"
#include "parse-options.h"
#include "pack-refs.h"
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 512530022edac398f8541ee6c400c7312659e730..33e9725a4a6aa641f4c1fefd3a541c35f2fd54f7 100644 (file)
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
-#include "cache.h"
+#include "builtin.h"
#include "exec_cmd.h"
static void flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c)
diff --git a/builtin/push.c b/builtin/push.c
index e655eb7695faba13c4d9e8f25b9649ffec7195be..8c8d8c717be6be5b4c701d6af53307ac684c54a5 100644 (file)
--- a/builtin/push.c
+++ b/builtin/push.c
char *tag;
int len;
if (nr <= ++i)
- die("tag shorthand without <tag>");
+ die(_("tag shorthand without <tag>"));
len = strlen(refs[i]) + 11;
if (deleterefs) {
tag = xmalloc(len+1);
strcat(delref, ref);
ref = delref;
} else if (deleterefs)
- die("--delete only accepts plain target ref names");
+ die(_("--delete only accepts plain target ref names"));
add_refspec(ref);
}
}
struct strbuf refspec = STRBUF_INIT;
struct branch *branch = branch_get(NULL);
if (!branch)
- die("You are not currently on a branch.");
+ die(_("You are not currently on a branch."));
if (!branch->merge_nr || !branch->merge)
- die("The current branch %s is not tracking anything.",
+ die(_("The current branch %s is not tracking anything."),
branch->name);
if (branch->merge_nr != 1)
- die("The current branch %s is tracking multiple branches, "
- "refusing to push.", branch->name);
+ die(_("The current branch %s is tracking multiple branches, "
+ "refusing to push."), branch->name);
strbuf_addf(&refspec, "%s:%s", branch->name, branch->merge[0]->src);
add_refspec(refspec.buf);
}
break;
case PUSH_DEFAULT_NOTHING:
- die("You didn't specify any refspecs to push, and "
- "push.default is \"nothing\".");
+ die(_("You didn't specify any refspecs to push, and "
+ "push.default is \"nothing\"."));
break;
}
}
transport_set_option(transport, TRANS_OPT_THIN, "yes");
if (verbosity > 0)
- fprintf(stderr, "Pushing to %s\n", transport->url);
+ fprintf(stderr, _("Pushing to %s\n"), transport->url);
err = transport_push(transport, refspec_nr, refspec, flags,
&nonfastforward);
if (err != 0)
- error("failed to push some refs to '%s'", transport->url);
+ error(_("failed to push some refs to '%s'"), transport->url);
err |= transport_disconnect(transport);
return 0;
if (nonfastforward && advice_push_nonfastforward) {
- fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
+ fprintf(stderr, _("To prevent you from losing history, non-fast-forward updates were rejected\n"
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
- "'Note about fast-forwards' section of 'git push --help' for details.\n");
+ "'Note about fast-forwards' section of 'git push --help' for details.\n"));
}
return 1;
if (!remote) {
if (repo)
- die("bad repository '%s'", repo);
- die("No destination configured to push to.");
+ die(_("bad repository '%s'"), repo);
+ die(_("No destination configured to push to."));
}
if (remote->mirror)
if ((flags & TRANSPORT_PUSH_ALL) && refspec) {
if (!strcmp(*refspec, "refs/tags/*"))
- return error("--all and --tags are incompatible");
- return error("--all can't be combined with refspecs");
+ return error(_("--all and --tags are incompatible"));
+ return error(_("--all can't be combined with refspecs"));
}
if ((flags & TRANSPORT_PUSH_MIRROR) && refspec) {
if (!strcmp(*refspec, "refs/tags/*"))
- return error("--mirror and --tags are incompatible");
- return error("--mirror can't be combined with refspecs");
+ return error(_("--mirror and --tags are incompatible"));
+ return error(_("--mirror can't be combined with refspecs"));
}
if ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==
(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {
- return error("--all and --mirror are incompatible");
+ return error(_("--all and --mirror are incompatible"));
}
if (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))
- die("--delete is incompatible with --all, --mirror and --tags");
+ die(_("--delete is incompatible with --all, --mirror and --tags"));
if (deleterefs && argc < 2)
- die("--delete doesn't make sense without any refs");
+ die(_("--delete doesn't make sense without any refs"));
if (tags)
add_refspec("refs/tags/*");
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 760817dbd7fec0086a0a1b62e58ab4438f227b7b..f64b79c95d5c6d2a0c459ac58c6fd36d0f898486 100644 (file)
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
-#include "cache.h"
+#include "builtin.h"
#include "pack.h"
#include "refs.h"
#include "pkt-line.h"
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c
index 1f773171cbdde76cc105e37928cc5f2ecb2ed93f..ea71977c8360e1a7899bbd035cf26f93d889800b 100644 (file)
--- a/builtin/remote-ext.c
+++ b/builtin/remote-ext.c
char buffer[MAXCOMMAND];
while (1) {
- size_t length;
+ size_t i;
if (!fgets(buffer, MAXCOMMAND - 1, stdin)) {
if (ferror(stdin))
die("Comammand input error");
exit(0);
}
/* Strip end of line characters. */
- length = strlen(buffer);
- while (isspace((unsigned char)buffer[length - 1]))
- buffer[--length] = 0;
+ i = strlen(buffer);
+ while (i > 0 && isspace(buffer[i - 1]))
+ buffer[--i] = 0;
if (!strcmp(buffer, "capabilities")) {
printf("*connect\n\n");
diff --git a/builtin/remote.c b/builtin/remote.c
index cb26080956077f8c9ae02c91ffdc341293a4f9f1..aaa4e9cb99bd90fb5008a1cef7c60653110acb2b 100644 (file)
--- a/builtin/remote.c
+++ b/builtin/remote.c
-#include "cache.h"
+#include "builtin.h"
#include "parse-options.h"
#include "transport.h"
#include "remote.h"
#include "string-list.h"
-#include "strbuf.h"
#include "run-command.h"
#include "refs.h"
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 642bf35587ed994948d3eeac0a189ae29e39bf11..081fccc7d7638f83a863a16193c91b17658f4d34 100644 (file)
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
#include "xdiff-interface.h"
static const char * const rerere_usage[] = {
- "git rerere [clear | status | diff | gc]",
+ "git rerere [clear | status | remaining | diff | gc]",
NULL,
};
if (!strcmp(argv[0], "clear")) {
for (i = 0; i < merge_rr.nr; i++) {
const char *name = (const char *)merge_rr.items[i].util;
+ if (!name)
+ continue;
if (!has_rerere_resolution(name))
unlink_rr_item(name);
}
} else if (!strcmp(argv[0], "gc"))
garbage_collect(&merge_rr);
else if (!strcmp(argv[0], "status"))
+ for (i = 0; i < merge_rr.nr; i++) {
+ if (!merge_rr.items[i].util)
+ continue;
+ printf("%s\n", merge_rr.items[i].string);
+ }
+ else if (!strcmp(argv[0], "remaining"))
for (i = 0; i < merge_rr.nr; i++)
printf("%s\n", merge_rr.items[i].string);
else if (!strcmp(argv[0], "diff"))
for (i = 0; i < merge_rr.nr; i++) {
const char *path = merge_rr.items[i].string;
const char *name = (const char *)merge_rr.items[i].util;
+ if (!name)
+ continue;
diff_two(rerere_path(name, "preimage"), path, path, path);
}
else
diff --git a/builtin/reset.c b/builtin/reset.c
index 5de2bceeec8c1d243ed6da70464d0c4dd60d7352..98bca044c1267fa63cb084a45aaf621e85f7d9b6 100644 (file)
--- a/builtin/reset.c
+++ b/builtin/reset.c
*
* Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
*/
-#include "cache.h"
+#include "builtin.h"
#include "tag.h"
#include "object.h"
#include "commit.h"
enum reset_type { MIXED, SOFT, HARD, MERGE, KEEP, NONE };
static const char *reset_type_names[] = {
- "mixed", "soft", "hard", "merge", "keep", NULL
+ N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
};
static char *args_to_str(const char **argv)
@@ -92,20 +92,20 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
if (reset_type == KEEP) {
unsigned char head_sha1[20];
if (get_sha1("HEAD", head_sha1))
- return error("You do not have a valid HEAD.");
+ return error(_("You do not have a valid HEAD."));
if (!fill_tree_descriptor(desc, head_sha1))
- return error("Failed to find tree of HEAD.");
+ return error(_("Failed to find tree of HEAD."));
nr++;
opts.fn = twoway_merge;
}
if (!fill_tree_descriptor(desc + nr - 1, sha1))
- return error("Failed to find tree of %s.", sha1_to_hex(sha1));
+ return error(_("Failed to find tree of %s."), sha1_to_hex(sha1));
if (unpack_trees(nr, desc, &opts))
return -1;
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock))
- return error("Could not write new index file.");
+ return error(_("Could not write new index file."));
return 0;
}
const char *hex, *body;
hex = find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV);
- printf("HEAD is now at %s", hex);
+ printf(_("HEAD is now at %s"), hex);
body = strstr(commit->buffer, "\n\n");
if (body) {
const char *eol;
@@ -139,10 +139,10 @@ static int update_index_refresh(int fd, struct lock_file *index_lock, int flags)
}
if (read_cache() < 0)
- return error("Could not read index");
+ return error(_("Could not read index"));
result = refresh_index(&the_index, (flags), NULL, NULL,
- "Unstaged changes after reset:") ? 1 : 0;
+ _("Unstaged changes after reset:")) ? 1 : 0;
if (write_cache(fd, active_cache, active_nr) ||
commit_locked_index(index_lock))
return error ("Could not refresh index");
ce = make_cache_entry(one->mode, one->sha1, one->path,
0, 0);
if (!ce)
- die("make_cache_entry failed for path '%s'",
+ die(_("make_cache_entry failed for path '%s'"),
one->path);
add_cache_entry(ce, ADD_CACHE_OK_TO_ADD |
ADD_CACHE_OK_TO_REPLACE);
if (!rla)
rla = sep = "";
if (snprintf(buf, size, "%s%s%s", rla, sep, action) >= size)
- warning("Reflog action message too long: %.*s...", 50, buf);
+ warning(_("Reflog action message too long: %.*s..."), 50, buf);
}
static void die_if_unmerged_cache(int reset_type)
{
if (is_merge() || read_cache() < 0 || unmerged_cache())
- die("Cannot do a %s reset in the middle of a merge.",
- reset_type_names[reset_type]);
+ die(_("Cannot do a %s reset in the middle of a merge."),
+ _(reset_type_names[reset_type]));
}
}
if (get_sha1(rev, sha1))
- die("Failed to resolve '%s' as a valid ref.", rev);
+ die(_("Failed to resolve '%s' as a valid ref."), rev);
commit = lookup_commit_reference(sha1);
if (!commit)
- die("Could not parse object '%s'.", rev);
+ die(_("Could not parse object '%s'."), rev);
hashcpy(sha1, commit->object.sha1);
if (patch_mode) {
if (reset_type != NONE)
- die("--patch is incompatible with --{hard,mixed,soft}");
+ die(_("--patch is incompatible with --{hard,mixed,soft}"));
return interactive_reset(rev, argv + i, prefix);
}
* affecting the working tree nor HEAD. */
if (i < argc) {
if (reset_type == MIXED)
- warning("--mixed with paths is deprecated; use 'git reset -- <paths>' instead.");
+ warning(_("--mixed with paths is deprecated; use 'git reset -- <paths>' instead."));
else if (reset_type != NONE)
- die("Cannot do %s reset with paths.",
- reset_type_names[reset_type]);
+ die(_("Cannot do %s reset with paths."),
+ _(reset_type_names[reset_type]));
return read_from_tree(prefix, argv + i, sha1,
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
}
setup_work_tree();
if (reset_type == MIXED && is_bare_repository())
- die("%s reset is not allowed in a bare repository",
- reset_type_names[reset_type]);
+ die(_("%s reset is not allowed in a bare repository"),
+ _(reset_type_names[reset_type]));
/* Soft reset does not touch the index file nor the working tree
* at all, but requires them in a good order. Other resets reset
if (reset_type == KEEP)
err = err || reset_index_file(sha1, MIXED, quiet);
if (err)
- die("Could not reset index file to revision '%s'.", rev);
+ die(_("Could not reset index file to revision '%s'."), rev);
}
/* Any resets update HEAD to the head being switched to,
diff --git a/builtin/revert.c b/builtin/revert.c
index bb6e9e83b756b47dae449064ca7762fe3558fc0e..d4631d7d5495469d0cd17be8b6536bcb9cfe19eb 100644 (file)
--- a/builtin/revert.c
+++ b/builtin/revert.c
static int allow_rerere_auto;
static const char *me;
+
+/* Merge strategy. */
static const char *strategy;
+static const char **xopts;
+static size_t xopts_nr, xopts_alloc;
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
return action == REVERT ? revert_usage : cherry_pick_usage;
}
+static int option_parse_x(const struct option *opt,
+ const char *arg, int unset)
+{
+ if (unset)
+ return 0;
+
+ ALLOC_GROW(xopts, xopts_nr + 1, xopts_alloc);
+ xopts[xopts_nr++] = xstrdup(arg);
+ return 0;
+}
+
static void parse_args(int argc, const char **argv)
{
const char * const * usage_str = revert_or_cherry_pick_usage();
OPT_INTEGER('m', "mainline", &mainline, "parent number"),
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_STRING(0, "strategy", &strategy, "strategy", "merge strategy"),
+ OPT_CALLBACK('X', "strategy-option", &xopts, "option",
+ "option for merge strategy", option_parse_x),
OPT_END(),
OPT_END(),
OPT_END(),
OPT_END(),
};
if (parse_options_concat(options, ARRAY_SIZE(options), cp_extra))
- die("program error");
+ die(_("program error"));
}
commit_argc = parse_options(argc, argv, NULL, options, usage_str,
const char *p = message, *eol;
if (!p)
- die ("Could not read commit message of %s",
+ die (_("Could not read commit message of %s"),
sha1_to_hex(commit->object.sha1));
while (*p && *p != '\n') {
for (eol = p + 1; *eol && *eol != '\n'; eol++)
{
const char *p = message;
if (!p)
- die ("Could not read commit message of %s",
+ die (_("Could not read commit message of %s"),
sha1_to_hex(commit->object.sha1));
while (*p && *p != '\n') {
const char *eol;
line = xmemdupz(p, eol - p);
email = strchr(line, '<');
if (!email)
- die ("Could not extract author email from %s",
+ die (_("Could not extract author email from %s"),
sha1_to_hex(commit->object.sha1));
if (email == line)
pend = line;
email++;
timestamp = strchr(email, '>');
if (!timestamp)
- die ("Could not extract author time from %s",
+ die (_("Could not extract author time from %s"),
sha1_to_hex(commit->object.sha1));
*timestamp = '\0';
for (timestamp++; *timestamp && isspace(*timestamp);
if (*p == '\n')
p++;
}
- die ("No author information found in %s",
+ die (_("No author information found in %s"),
sha1_to_hex(commit->object.sha1));
}
int msg_fd = hold_lock_file_for_update(&msg_file, filename,
LOCK_DIE_ON_ERROR);
if (write_in_full(msg_fd, msgbuf->buf, msgbuf->len) < 0)
- die_errno("Could not write to %s.", filename);
+ die_errno(_("Could not write to %s."), filename);
strbuf_release(msgbuf);
if (commit_lock_file(&msg_file) < 0)
- die("Error wrapping up %s", filename);
+ die(_("Error wrapping up %s"), filename);
}
static struct tree *empty_tree(void)
if (read_cache_unmerged()) {
die_resolve_conflict(me);
} else {
- if (advice_commit_before_merge)
- die("Your local changes would be overwritten by %s.\n"
- "Please, commit your changes or stash them to proceed.", me);
- else
- die("Your local changes would be overwritten by %s.\n", me);
+ if (advice_commit_before_merge) {
+ if (action == REVERT)
+ die(_("Your local changes would be overwritten by revert.\n"
+ "Please, commit your changes or stash them to proceed."));
+ else
+ die(_("Your local changes would be overwritten by cherry-pick.\n"
+ "Please, commit your changes or stash them to proceed."));
+ } else {
+ if (action == REVERT)
+ die("Your local changes would be overwritten by revert.\n");
+ else
+ die("Your local changes would be overwritten by cherry-pick.\n");
+ }
}
}
struct merge_options o;
struct tree *result, *next_tree, *base_tree, *head_tree;
int clean, index_fd;
+ const char **xopt;
static struct lock_file index_lock;
index_fd = hold_locked_index(&index_lock, 1);
read_cache();
- /*
- * NEEDSWORK: cherry-picking between branches with
- * different end-of-line normalization is a pain;
- * plumb in an option to set o.renormalize?
- * (or better: arbitrary -X options)
- */
init_merge_options(&o);
o.ancestor = base ? base_label : "(empty tree)";
o.branch1 = "HEAD";
next_tree = next ? next->tree : empty_tree();
base_tree = base ? base->tree : empty_tree();
+ for (xopt = xopts; xopt != xopts + xopts_nr; xopt++)
+ parse_merge_opt(&o, *xopt);
+
clean = merge_trees(&o,
head_tree,
next_tree, base_tree, &result);
if (active_cache_changed &&
(write_cache(index_fd, active_cache, active_nr) ||
commit_locked_index(&index_lock)))
- die("%s: Unable to write new index file", me);
+ /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+ die(_("%s: Unable to write new index file"), me);
rollback_lock_file(&index_lock);
if (!clean) {
* to work on.
*/
if (write_cache_as_tree(head, 0, NULL))
- die ("Your index file is unmerged.");
+ die (_("Your index file is unmerged."));
} else {
if (get_sha1("HEAD", head))
- die ("You do not have a valid HEAD");
+ die (_("You do not have a valid HEAD"));
if (index_differs_from("HEAD", 0))
die_dirty_index(me);
}
if (!commit->parents) {
if (action == REVERT)
- die ("Cannot revert a root commit");
+ die (_("Cannot revert a root commit"));
parent = NULL;
}
else if (commit->parents->next) {
struct commit_list *p;
if (!mainline)
- die("Commit %s is a merge but no -m option was given.",
+ die(_("Commit %s is a merge but no -m option was given."),
sha1_to_hex(commit->object.sha1));
for (cnt = 1, p = commit->parents;
cnt++)
p = p->next;
if (cnt != mainline || !p)
- die("Commit %s does not have parent %d",
+ die(_("Commit %s does not have parent %d"),
sha1_to_hex(commit->object.sha1), mainline);
parent = p->item;
} else if (0 < mainline)
- die("Mainline was specified but commit %s is not a merge.",
+ die(_("Mainline was specified but commit %s is not a merge."),
sha1_to_hex(commit->object.sha1));
else
parent = commit->parents->item;
return fast_forward_to(commit->object.sha1, head);
if (parent && parse_commit(parent) < 0)
- die("%s: cannot parse parent commit %s",
+ /* TRANSLATORS: The first %s will be "revert" or
+ "cherry-pick", the second %s a SHA1 */
+ die(_("%s: cannot parse parent commit %s"),
me, sha1_to_hex(parent->object.sha1));
if (get_message(commit->buffer, &msg) != 0)
- die("Cannot get commit message for %s",
+ die(_("Cannot get commit message for %s"),
sha1_to_hex(commit->object.sha1));
/*
commit_list_insert(base, &common);
commit_list_insert(next, &remotes);
- res = try_merge_command(strategy, common,
+ res = try_merge_command(strategy, xopts_nr, xopts, common,
sha1_to_hex(head), remotes);
free_commit_list(common);
free_commit_list(remotes);
}
if (res) {
- error("could not %s %s... %s",
- action == REVERT ? "revert" : "apply",
+ error(action == REVERT
+ ? _("could not revert %s... %s")
+ : _("could not apply %s... %s"),
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV),
msg.subject);
print_advice();
usage(*revert_or_cherry_pick_usage());
if (prepare_revision_walk(revs))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
if (!revs->commits)
- die("empty commit set passed");
+ die(_("empty commit set passed"));
}
static void read_and_refresh_cache(const char *me)
if (the_index.cache_changed) {
if (write_index(&the_index, index_fd) ||
commit_locked_index(&index_lock))
- die("git %s: failed to refresh the index", me);
+ /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+ die(_("git %s: failed to read the index"), me);
}
rollback_lock_file(&index_lock);
}
if (allow_ff) {
if (signoff)
- die("cherry-pick --ff cannot be used with --signoff");
+ die(_("cherry-pick --ff cannot be used with --signoff"));
if (no_commit)
- die("cherry-pick --ff cannot be used with --no-commit");
+ die(_("cherry-pick --ff cannot be used with --no-commit"));
if (no_replay)
- die("cherry-pick --ff cannot be used with -x");
+ die(_("cherry-pick --ff cannot be used with -x"));
if (edit)
- die("cherry-pick --ff cannot be used with --edit");
+ die(_("cherry-pick --ff cannot be used with --edit"));
}
read_and_refresh_cache(me);
diff --git a/builtin/rm.c b/builtin/rm.c
index ff491d77612ffb3c906c5e1ffa232f4410e4b661..90c8a5047c26cd7bdb939d150b842823f595333c 100644 (file)
--- a/builtin/rm.c
+++ b/builtin/rm.c
*/
if (local_changes && staged_changes) {
if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))
- errs = error("'%s' has staged content different "
+ errs = error(_("'%s' has staged content different "
"from both the file and the HEAD\n"
- "(use -f to force removal)", name);
+ "(use -f to force removal)"), name);
}
else if (!index_only) {
if (staged_changes)
- errs = error("'%s' has changes staged in the index\n"
+ errs = error(_("'%s' has changes staged in the index\n"
"(use --cached to keep the file, "
- "or -f to force removal)", name);
+ "or -f to force removal)"), name);
if (local_changes)
- errs = error("'%s' has local modifications\n"
+ errs = error(_("'%s' has local modifications\n"
"(use --cached to keep the file, "
- "or -f to force removal)", name);
+ "or -f to force removal)"), name);
}
}
return errs;
newfd = hold_locked_index(&lock_file, 1);
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
pathspec = get_pathspec(prefix, argv);
refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);
for (i = 0; (match = pathspec[i]) != NULL ; i++) {
if (!seen[i]) {
if (!ignore_unmatch) {
- die("pathspec '%s' did not match any files",
+ die(_("pathspec '%s' did not match any files"),
match);
}
}
seen_any = 1;
}
if (!recursive && seen[i] == MATCHED_RECURSIVELY)
- die("not removing '%s' recursively without -r",
+ die(_("not removing '%s' recursively without -r"),
*match ? match : ".");
}
printf("rm '%s'\n", path);
if (remove_file_from_cache(path))
- die("git rm: unable to remove %s", path);
+ die(_("git rm: unable to remove %s"), path);
}
if (show_only)
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
- die("Unable to write new index file");
+ die(_("Unable to write new index file"));
}
return 0;
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 2cd1c40b70890732905ad9433e452aa9a9548533..8b0911c0d2ac5a60f8a3c7a43e7960617ded9d7a 100644 (file)
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
-#include "cache.h"
+#include "builtin.h"
#include "commit.h"
#include "refs.h"
#include "pkt-line.h"
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 1a21e4b0538565f7a64488ed7b3a5c317e559699..f5efc67c9cad24fe54d5c6ab7257d38a4b1727ac 100644 (file)
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
buffer = eol;
}
if (!author)
- die("Missing author: %s",
+ die(_("Missing author: %s"),
sha1_to_hex(commit->object.sha1));
if (log->user_format) {
struct pretty_print_context ctx = {0};
struct commit *commit;
if (prepare_revision_walk(rev))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
while ((commit = get_revision(rev)) != NULL)
shortlog_add_commit(log, commit);
}
argc = parse_options_end(&ctx);
if (setup_revisions(argc, argv, &rev, NULL) != 1) {
- error("unrecognized argument: %s", argv[1]);
+ error(_("unrecognized argument: %s"), argv[1]);
usage_with_options(shortlog_usage, options);
}
add_head_to_pending(&rev);
if (rev.pending.nr == 0) {
if (isatty(0))
- fprintf(stderr, "(reading log message from standard input)\n");
+ fprintf(stderr, _("(reading log message from standard input)\n"));
read_from_stdin(&log);
}
else
diff --git a/builtin/skew.c b/builtin/skew.c
--- /dev/null
+++ b/builtin/skew.c
@@ -0,0 +1,50 @@
+#include "cache.h"
+#include "commit.h"
+#include "diff.h"
+#include "revision.h"
+
+unsigned long worst_skew = 0;
+
+static void check_skew_recurse(struct commit *c, unsigned long when)
+{
+ struct commit_list *p;
+
+ if (c->object.flags & SEEN)
+ return;
+ c->object.flags |= SEEN;
+
+ if (parse_commit(c) < 0)
+ return;
+
+ if (c->date > when) {
+ unsigned long skew = c->date - when;
+ if (skew > worst_skew)
+ worst_skew = skew;
+ }
+
+ for (p = c->parents; p; p = p->next)
+ check_skew_recurse(p->item, c->date < when ? c->date : when);
+}
+
+static void check_skew(struct commit *c)
+{
+ check_skew_recurse(c, time(NULL));
+}
+
+int cmd_skew(int argc, const char **argv, const char *prefix) {
+ struct rev_info revs;
+ int i;
+
+ git_config(git_default_config, NULL);
+ init_revisions(&revs, prefix);
+ argc = setup_revisions(argc, argv, &revs, NULL);
+
+ for (i = 0; i < revs.pending.nr; i++) {
+ struct object *o = revs.pending.objects[i].item;
+ if (o->type == OBJ_COMMIT)
+ check_skew((struct commit *)o);
+ }
+
+ printf("%lu\n", worst_skew);
+ return 0;
+}
diff --git a/builtin/tag.c b/builtin/tag.c
index aa1f87d47a3e4bdaa2ca3711c9dfc495fc2247e0..cfcc7e7913e1471bea480bea8ac9f5cca9a2412e 100644 (file)
--- a/builtin/tag.c
+++ b/builtin/tag.c
commit = lookup_commit_reference_gently(sha1, 1);
if (!commit)
return 0;
- if (!is_descendant_of(commit, filter->with_commit))
+ if (!contains(commit, filter->with_commit))
return 0;
}
for (p = argv; *p; p++) {
if (snprintf(ref, sizeof(ref), "refs/tags/%s", *p)
>= sizeof(ref)) {
- error("tag name too long: %.*s...", 50, *p);
+ error(_("tag name too long: %.*s..."), 50, *p);
had_error = 1;
continue;
}
if (!resolve_ref(ref, sha1, 1, NULL)) {
- error("tag '%s' not found.", *p);
+ error(_("tag '%s' not found."), *p);
had_error = 1;
continue;
}
{
if (delete_ref(ref, sha1, 0))
return 1;
- printf("Deleted tag '%s' (was %s)\n", name, find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ printf(_("Deleted tag '%s' (was %s)\n"), name, find_unique_abbrev(sha1, DEFAULT_ABBREV));
return 0;
}
argv_verify_tag[2] = sha1_to_hex(sha1);
if (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))
- return error("could not verify the tag '%s'", name);
+ return error(_("could not verify the tag '%s'"), name);
return 0;
}
if (!*signingkey) {
if (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),
sizeof(signingkey)) > sizeof(signingkey) - 1)
- return error("committer info too long.");
+ return error(_("committer info too long."));
bracket = strchr(signingkey, '>');
if (bracket)
bracket[1] = '\0';
args[3] = NULL;
if (start_command(&gpg))
- return error("could not run gpg.");
+ return error(_("could not run gpg."));
if (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {
close(gpg.in);
close(gpg.out);
finish_command(&gpg);
- return error("gpg did not accept the tag data");
+ return error(_("gpg did not accept the tag data"));
}
close(gpg.in);
len = strbuf_read(buffer, gpg.out, 1024);
close(gpg.out);
if (finish_command(&gpg) || !len || len < 0)
- return error("gpg failed to sign the tag");
+ return error(_("gpg failed to sign the tag"));
/* Strip CR from the line endings, in case we are on Windows. */
for (i = j = 0; i < buffer->len; i++)
}
static const char tag_template[] =
- "\n"
+ N_("\n"
"#\n"
"# Write a tag message\n"
- "#\n";
+ "#\n");
static void set_signingkey(const char *value)
{
if (strlcpy(signingkey, value, sizeof(signingkey)) >= sizeof(signingkey))
- die("signing key value too long (%.10s...)", value);
+ die(_("signing key value too long (%.10s...)"), value);
}
static int git_tag_config(const char *var, const char *value, void *cb)
static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)
{
if (sign && do_sign(buf) < 0)
- return error("unable to sign the tag");
+ return error(_("unable to sign the tag"));
if (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0)
- return error("unable to write tag file");
+ return error(_("unable to write tag file"));
return 0;
}
type = sha1_object_info(object, NULL);
if (type <= OBJ_NONE)
- die("bad object type.");
+ die(_("bad object type."));
header_len = snprintf(header_buf, sizeof(header_buf),
"object %s\n"
git_committer_info(IDENT_ERROR_ON_NO_NAME));
if (header_len > sizeof(header_buf) - 1)
- die("tag header too big.");
+ die(_("tag header too big."));
if (!message) {
int fd;
path = git_pathdup("TAG_EDITMSG");
fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)
- die_errno("could not create file '%s'", path);
+ die_errno(_("could not create file '%s'"), path);
if (!is_null_sha1(prev))
write_tag_body(fd, prev);
else
- write_or_die(fd, tag_template, strlen(tag_template));
+ write_or_die(fd, _(tag_template), strlen(_(tag_template)));
close(fd);
if (launch_editor(path, buf, NULL)) {
fprintf(stderr,
- "Please supply the message using either -m or -F option.\n");
+ _("Please supply the message using either -m or -F option.\n"));
exit(1);
}
}
stripspace(buf, 1);
if (!message && !buf->len)
- die("no tag message?");
+ die(_("no tag message?"));
strbuf_insert(buf, 0, header_buf, header_len);
if (build_tag_object(buf, sign, result) < 0) {
if (path)
- fprintf(stderr, "The tag message has been left in %s\n",
+ fprintf(stderr, _("The tag message has been left in %s\n"),
path);
exit(128);
}
return list_tags(argv[0], lines == -1 ? 0 : lines,
with_commit);
if (lines != -1)
- die("-n option is only allowed with -l.");
+ die(_("-n option is only allowed with -l."));
if (with_commit)
- die("--contains option is only allowed with -l.");
+ die(_("--contains option is only allowed with -l."));
if (delete)
return for_each_tag_name(argv, delete_tag);
if (verify)
if (msg.given || msgfile) {
if (msg.given && msgfile)
- die("only one -F or -m option is allowed.");
+ die(_("only one -F or -m option is allowed."));
annotate = 1;
if (msg.given)
strbuf_addbuf(&buf, &(msg.buf));
else {
if (!strcmp(msgfile, "-")) {
if (strbuf_read(&buf, 0, 1024) < 0)
- die_errno("cannot read '%s'", msgfile);
+ die_errno(_("cannot read '%s'"), msgfile);
} else {
if (strbuf_read_file(&buf, msgfile, 1024) < 0)
- die_errno("could not open or read '%s'",
+ die_errno(_("could not open or read '%s'"),
msgfile);
}
}
object_ref = argc == 2 ? argv[1] : "HEAD";
if (argc > 2)
- die("too many params");
+ die(_("too many params"));
if (get_sha1(object_ref, object))
- die("Failed to resolve '%s' as a valid ref.", object_ref);
+ die(_("Failed to resolve '%s' as a valid ref."), object_ref);
if (snprintf(ref, sizeof(ref), "refs/tags/%s", tag) > sizeof(ref) - 1)
- die("tag name too long: %.*s...", 50, tag);
+ die(_("tag name too long: %.*s..."), 50, tag);
if (check_ref_format(ref))
- die("'%s' is not a valid tag name.", tag);
+ die(_("'%s' is not a valid tag name."), tag);
if (!resolve_ref(ref, prev, 1, NULL))
hashclr(prev);
else if (!force)
- die("tag '%s' already exists", tag);
+ die(_("tag '%s' already exists"), tag);
if (annotate)
create_tag(object, tag, &buf, msg.given || msgfile,
lock = lock_any_ref_for_update(ref, prev, 0);
if (!lock)
- die("%s: cannot lock the ref", ref);
+ die(_("%s: cannot lock the ref"), ref);
if (write_ref_sha1(lock, object, NULL) < 0)
- die("%s: cannot update the ref", ref);
+ die(_("%s: cannot update the ref"), ref);
if (force && hashcmp(prev, object))
- printf("Updated tag '%s' (was %s)\n", tag, find_unique_abbrev(prev, DEFAULT_ABBREV));
+ printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev, DEFAULT_ABBREV));
strbuf_release(&buf);
return 0;
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index 608590ada8105a2e6a8cb9d6176696b511b410f6..c905d80e3ce47ec21af6b51338228ab52622cf7c 100644 (file)
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
-#include "cache.h"
+#include "builtin.h"
#include "blob.h"
#include "exec_cmd.h"
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 56baf27fb7eb18d77e8793d089f2a719d4876689..d7850c6309aec0c1a4f640999fb757d7b32ba1b8 100644 (file)
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
*/
int pos;
int has_head = 1;
- const char **pathspec = get_pathspec(prefix, av + 1);
+ const char **paths = get_pathspec(prefix, av + 1);
+ struct pathspec pathspec;
+
+ init_pathspec(&pathspec, paths);
if (read_ref("HEAD", head_sha1))
/* If there is no HEAD, that means it is an initial
struct cache_entry *old = NULL;
int save_nr;
- if (ce_stage(ce) || !ce_path_match(ce, pathspec))
+ if (ce_stage(ce) || !ce_path_match(ce, &pathspec))
continue;
if (has_head)
old = read_one_ent(NULL, head_sha1,
if (save_nr != active_nr)
goto redo;
}
+ free_pathspec(&pathspec);
return 0;
}
diff --git a/builtin/var.c b/builtin/var.c
index 0744bb83185289e26bd32b3b2ecaec717d8c75d7..1787771cdfa7dea5ac0d44db448df2964f7c5f41 100644 (file)
--- a/builtin/var.c
+++ b/builtin/var.c
*
* Copyright (C) Eric Biederman, 2005
*/
-#include "cache.h"
+#include "builtin.h"
#include "exec_cmd.h"
static const char var_usage[] = "git var (-l | <variable>)";
index d83d68c859904fadbe2501cabd8575be09131d7b..4b9268dfa022fe0a03f1cd8b1b0b158ab4616f5d 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
-extern int ce_path_match(const struct cache_entry *ce, const char **pathspec);
+struct pathspec {
+ const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
+ int nr;
+ int has_wildcard:1;
+ int recursive:1;
+ int max_depth;
+ struct pathspec_item {
+ const char *match;
+ int len;
+ int has_wildcard:1;
+ } *items;
+};
+
+extern int init_pathspec(struct pathspec *, const char **);
+extern void free_pathspec(struct pathspec *);
+extern int ce_path_match(const struct cache_entry *ce, const struct pathspec *pathspec);
extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, enum object_type type, const char *path);
extern int index_path(unsigned char *sha1, const char *path, struct stat *st, int write_object);
extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
extern size_t packed_git_limit;
extern size_t delta_base_cache_limit;
extern int read_replace_refs;
+extern int ignored_are_precious;
extern int fsync_object_files;
extern int core_preload_index;
extern int core_apply_sparse_checkout;
+extern int core_clock_skew;
enum safe_crlf {
SAFE_CRLF_FALSE = 0,
diff --git a/commit.c b/commit.c
index 74d66018800d7a2a2b3a3365e87a23049690da6b..85a65c096c1288f034084da42376ee3c63578c74 100644 (file)
--- a/commit.c
+++ b/commit.c
#include "revision.h"
#include "notes.h"
+int core_clock_skew = 86400;
int save_commit_buffer = 1;
const char *commit_type = "commit";
strbuf_release(&buffer);
return result;
}
+
+static int in_commit_list(const struct commit_list *want, struct commit *c)
+{
+ for (; want; want = want->next)
+ if (!hashcmp(want->item->object.sha1, c->object.sha1))
+ return 1;
+ return 0;
+}
+
+static int contains_recurse(struct commit *candidate,
+ const struct commit_list *want,
+ unsigned long cutoff)
+{
+ struct commit_list *p;
+
+ /* was it previously marked as containing a want commit? */
+ if (candidate->object.flags & TMP_MARK)
+ return 1;
+ /* or marked as not possibly containing a want commit? */
+ if (candidate->object.flags & UNINTERESTING)
+ return 0;
+ /* or are we it? */
+ if (in_commit_list(want, candidate))
+ return 1;
+
+ if (parse_commit(candidate) < 0)
+ return 0;
+
+ /* stop searching if we go too far back in time */
+ if (candidate->date < cutoff)
+ return 0;
+
+ /* Otherwise recurse and mark ourselves for future traversals. */
+ for (p = candidate->parents; p; p = p->next) {
+ if (contains_recurse(p->item, want, cutoff)) {
+ candidate->object.flags |= TMP_MARK;
+ return 1;
+ }
+ }
+ candidate->object.flags |= UNINTERESTING;
+ return 0;
+}
+
+int contains(struct commit *candidate, const struct commit_list *want)
+{
+ unsigned long cutoff = 0;
+
+ if (core_clock_skew >= 0) {
+ const struct commit_list *c;
+ unsigned long min_date = ULONG_MAX;
+ for (c = want; c; c = c->next) {
+ if (parse_commit(c->item) < 0)
+ continue;
+ if (c->item->date < min_date)
+ min_date = c->item->date;
+ }
+ if (min_date > core_clock_skew)
+ cutoff = min_date - core_clock_skew;
+ }
+
+ return contains_recurse(candidate, want, cutoff);
+}
diff --git a/commit.h b/commit.h
index eb6c5af1f6b18546b3b3f1683142b15bb0ae9e34..7d92d20b2f3c4e7cb3555e4f4d8390ca5644f095 100644 (file)
--- a/commit.h
+++ b/commit.h
int is_descendant_of(struct commit *, struct commit_list *);
int in_merge_bases(struct commit *, struct commit **, int);
+int contains(struct commit *, const struct commit_list *);
+
extern int interactive_add(int argc, const char **argv, const char *prefix);
extern int run_add_interactive(const char *revision, const char *patch_mode,
const char **pathspec);
diff --git a/compat/mingw.c b/compat/mingw.c
index bee605441910caeddd1e94eb7795f615a3d1348a..6dfafa2caf7c35cb2a694f1a42145c685b026f88 100644 (file)
--- a/compat/mingw.c
+++ b/compat/mingw.c
#include "win32.h"
#include <conio.h>
#include "../strbuf.h"
+#include "../run-command.h"
+
+static const int delay[] = { 0, 1, 10, 20, 40 };
int err_win_to_posix(DWORD winerr)
{
return error;
}
+static inline int is_file_in_use_error(DWORD errcode)
+{
+ switch(errcode) {
+ case ERROR_SHARING_VIOLATION:
+ case ERROR_ACCESS_DENIED:
+ return 1;
+ }
+
+ return 0;
+}
+
+static int read_yes_no_answer()
+{
+ char answer[1024];
+
+ if (fgets(answer, sizeof(answer), stdin)) {
+ size_t answer_len = strlen(answer);
+ int got_full_line = 0, c;
+
+ /* remove the newline */
+ if (answer_len >= 2 && answer[answer_len-2] == '\r') {
+ answer[answer_len-2] = '\0';
+ got_full_line = 1;
+ }
+ else if (answer_len >= 1 && answer[answer_len-1] == '\n') {
+ answer[answer_len-1] = '\0';
+ got_full_line = 1;
+ }
+ /* flush the buffer in case we did not get the full line */
+ if (!got_full_line)
+ while((c = getchar()) != EOF && c != '\n');
+ } else
+ /* we could not read, return the
+ * default answer which is no */
+ return 0;
+
+ if (answer[0] == 'y' && strlen(answer) == 1)
+ return 1;
+ if (!strncasecmp(answer, "yes", sizeof(answer)))
+ return 1;
+ if (answer[0] == 'n' && strlen(answer) == 1)
+ return 0;
+ if (!strncasecmp(answer, "no", sizeof(answer)))
+ return 0;
+
+ /* did not find an answer we understand */
+ return -1;
+}
+
+static int ask_user_yes_no(const char *format, ...)
+{
+ char question[4096];
+ const char *retry_hook[] = { NULL, NULL, NULL };
+ va_list args;
+
+ if ((retry_hook[0] = getenv("GIT_ASK_YESNO"))) {
+
+ va_start(args, format);
+ vsnprintf(question, sizeof(question), format, args);
+ va_end(args);
+
+ retry_hook[1] = question;
+ return !run_command_v_opt(retry_hook, 0);
+ }
+
+ if (!isatty(_fileno(stdin)) || !isatty(_fileno(stderr)))
+ return 0;
+
+ while (1) {
+ int answer;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ fprintf(stderr, " (y/n)? ");
+
+ if ((answer = read_yes_no_answer()) >= 0)
+ return answer;
+
+ fprintf(stderr, "Sorry, I did not understand your answer. "
+ "Please type 'y' or 'n'\n");
+ }
+}
+
+#undef unlink
+int mingw_unlink(const char *pathname)
+{
+ int ret, tries = 0;
+
+ /* read-only files cannot be removed */
+ chmod(pathname, 0666);
+ while ((ret = unlink(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {
+ if (!is_file_in_use_error(GetLastError()))
+ break;
+ /*
+ * We assume that some other process had the source or
+ * destination file open at the wrong moment and retry.
+ * In order to give the other process a higher chance to
+ * complete its operation, we give up our time slice now.
+ * If we have to retry again, we do sleep a bit.
+ */
+ Sleep(delay[tries]);
+ tries++;
+ }
+ while (ret == -1 && is_file_in_use_error(GetLastError()) &&
+ ask_user_yes_no("Unlink of file '%s' failed. "
+ "Should I try again?", pathname))
+ ret = unlink(pathname);
+ return ret;
+}
+
+static int is_dir_empty(const char *path)
+{
+ struct strbuf buf = STRBUF_INIT;
+ WIN32_FIND_DATAA findbuf;
+ HANDLE handle;
+
+ strbuf_addf(&buf, "%s\\*", path);
+ handle = FindFirstFileA(buf.buf, &findbuf);
+ if (handle == INVALID_HANDLE_VALUE) {
+ strbuf_release(&buf);
+ return GetLastError() == ERROR_NO_MORE_FILES;
+ }
+
+ while (!strcmp(findbuf.cFileName, ".") ||
+ !strcmp(findbuf.cFileName, ".."))
+ if (!FindNextFile(handle, &findbuf)) {
+ strbuf_release(&buf);
+ return GetLastError() == ERROR_NO_MORE_FILES;
+ }
+ FindClose(handle);
+ strbuf_release(&buf);
+ return 0;
+}
+
+#undef rmdir
+int mingw_rmdir(const char *pathname)
+{
+ int ret, tries = 0;
+
+ while ((ret = rmdir(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {
+ if (!is_file_in_use_error(GetLastError()))
+ break;
+ if (!is_dir_empty(pathname)) {
+ errno = ENOTEMPTY;
+ break;
+ }
+ /*
+ * We assume that some other process had the source or
+ * destination file open at the wrong moment and retry.
+ * In order to give the other process a higher chance to
+ * complete its operation, we give up our time slice now.
+ * If we have to retry again, we do sleep a bit.
+ */
+ Sleep(delay[tries]);
+ tries++;
+ }
+ while (ret == -1 && is_file_in_use_error(GetLastError()) &&
+ ask_user_yes_no("Deletion of directory '%s' failed. "
+ "Should I try again?", pathname))
+ ret = rmdir(pathname);
+ return ret;
+}
+
#undef open
int mingw_open (const char *filename, int oflags, ...)
{
{
DWORD attrs, gle;
int tries = 0;
- static const int delay[] = { 0, 1, 10, 20, 40 };
/*
* Try native rename() first to get errno right.
tries++;
goto repeat;
}
+ if (gle == ERROR_ACCESS_DENIED &&
+ ask_user_yes_no("Rename from '%s' to '%s' failed. "
+ "Should I try again?", pold, pnew))
+ goto repeat;
+
errno = EACCES;
return -1;
}
diff --git a/compat/mingw.h b/compat/mingw.h
index cafc1eb08a71dd60566a7389ed606e777cf17fc8..fe6ba340437b67237afd8cfdb4cf2a20074d27f7 100644 (file)
--- a/compat/mingw.h
+++ b/compat/mingw.h
}
#define mkdir mingw_mkdir
-static inline int mingw_unlink(const char *pathname)
-{
- /* read-only files cannot be removed */
- chmod(pathname, 0666);
- return unlink(pathname);
-}
-#define unlink mingw_unlink
-
#define WNOHANG 1
pid_t waitpid(pid_t pid, int *status, unsigned options);
* replacements of existing functions
*/
+int mingw_unlink(const char *pathname);
+#define unlink mingw_unlink
+
+int mingw_rmdir(const char *path);
+#define rmdir mingw_rmdir
+
int mingw_open (const char *filename, int oflags, ...);
#define open mingw_open
diff --git a/config.c b/config.c
index 625e0518767712583f917762634c2fc852c4d2eb..9b09375b65c3414544bfa02c1011d3a34eb568c7 100644 (file)
--- a/config.c
+++ b/config.c
if (!strcmp(var, "core.excludesfile"))
return git_config_pathname(&excludes_file, var, value);
+ if (!strcmp(var, "core.ignoredareprecious")) {
+ ignored_are_precious = git_config_bool(var, value);
+ return 0;
+ }
+
if (!strcmp(var, "core.whitespace")) {
if (!value)
return config_error_nonbool(var);
return 0;
}
+ if (!strcmp(var, "core.clockskew")) {
+ if (!value || !strcmp(value, "none"))
+ core_clock_skew = -1;
+ else
+ core_clock_skew = git_config_int(var, value);
+ return 0;
+ }
+
/* Add other config variables here and to Documentation/config.txt. */
return 0;
}
diff --git a/config.mak.in b/config.mak.in
index 961497305777fcbd67001fdae1335fcfe2910e88..b5314afcd3f1863027cfef08b60ad2ea2e15c4cf 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
NO_EXPAT=@NO_EXPAT@
NO_LIBGEN_H=@NO_LIBGEN_H@
HAVE_PATHS_H=@HAVE_PATHS_H@
+HAVE_LIBCHARSET_H=@HAVE_LIBCHARSET_H@
+NO_GETTEXT=@NO_GETTEXT@
NEEDS_LIBICONV=@NEEDS_LIBICONV@
NEEDS_SOCKET=@NEEDS_SOCKET@
NEEDS_RESOLV=@NEEDS_RESOLV@
+NEEDS_LIBINTL=@NEEDS_LIBINTL@
NEEDS_LIBGEN=@NEEDS_LIBGEN@
NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
diff --git a/configure.ac b/configure.ac
index 5792425a4948148b5a110346f5b830063dd78914..dbfd13e6ab4a228d4bde64b6dceff067ec4732fa 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_SUBST(NEEDS_LIBGEN)
test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"
+AC_CHECK_LIB([c], [gettext],
+[NEEDS_LIBINTL=],
+[NEEDS_LIBINTL=YesPlease])
+AC_SUBST(NEEDS_LIBINTL)
+test -n "$NEEDS_LIBINTL" && LIBS="$LIBS -lintl"
+
## Checks for header files.
AC_MSG_NOTICE([CHECKS for header files])
#
[HAVE_PATHS_H=])
AC_SUBST(HAVE_PATHS_H)
#
+# Define NO_GETTEXT if you don't have libintl.h
+AC_CHECK_HEADER([libintl.h],
+[NO_GETTEXT=],
+[NO_GETTEXT=YesPlease])
+AC_SUBST(NO_GETTEXT)
+#
+# Define HAVE_LIBCHARSET_H if have libcharset.h
+AC_CHECK_HEADER([libcharset.h],
+[HAVE_LIBCHARSET_H=YesPlease],
+[HAVE_LIBCHARSET_H=])
+AC_SUBST(HAVE_LIBCHARSET_H)
+#
# Define NO_STRCASESTR if you don't have strcasestr.
GIT_CHECK_FUNC(strcasestr,
[NO_STRCASESTR=],
index 60a05a8b978345224c0313edb8060f5a7c2ccb54..6bf155cbdb61498bdaf84712a2dea6fb05361ce2 100755 (executable)
cd_to_toplevel
no_commit=
+xopt=
while case "$#" in 0) break ;; esac
do
case "$1" in
-x|--i-really-want-to-expose-my-private-commit-object-name)
replay=
;;
+ -X?*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#-X}")"
+ ;;
+ --strategy-option=*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#--strategy-option=}")"
+ ;;
+ -X|--strategy-option)
+ shift
+ xopt="$xopt$(git rev-parse --sq-quote "--$1")"
+ ;;
-*)
usage
;;
# and $prev on top of us (when reverting), or the change between
# $prev and $commit on top of us (when cherry-picking or replaying).
-git-merge-recursive $base -- $head $next &&
+eval "git merge-recursive $xopt $base -- $head $next" &&
result=$(git-write-tree 2>/dev/null) || {
mv -f .msg "$GIT_DIR/MERGE_MSG"
{
index 04ce7e3b020f489d59fe103970fc989d7b351127..449df2ef473af744ac4b45c79e17378feeb378ae 100755 (executable)
try:
while True:
entry = marshal.load(p4.stdout)
- if cb is not None:
- cb(entry)
- else:
- result.append(entry)
+ if cb is not None:
+ cb(entry)
+ else:
+ result.append(entry)
except EOFError:
pass
exitCode = p4.wait()
changes = {}
for line in output:
- changeNum = int(line.split(" ")[1])
- changes[changeNum] = True
+ changeNum = int(line.split(" ")[1])
+ changes[changeNum] = True
changelist = changes.keys()
changelist.sort()
# - helper for streamP4Files
def streamOneP4File(self, file, contents):
- if file["type"] == "apple":
- print "\nfile %s is a strange apple file that forks. Ignoring" % \
- file['depotFile']
- return
+ if file["type"] == "apple":
+ print "\nfile %s is a strange apple file that forks. Ignoring" % file['depotFile']
+ return
relPath = self.stripRepoPath(file['depotFile'], self.branchPrefixes)
if verbose:
# handle another chunk of streaming data
def streamP4FilesCb(self, marshalled):
+ if marshalled.has_key('depotFile') and self.stream_have_file_info:
+ # start of a new file - output the old one first
+ self.streamOneP4File(self.stream_file, self.stream_contents)
+ self.stream_file = {}
+ self.stream_contents = []
+ self.stream_have_file_info = False
- if marshalled.has_key('depotFile') and self.stream_have_file_info:
- # start of a new file - output the old one first
- self.streamOneP4File(self.stream_file, self.stream_contents)
- self.stream_file = {}
- self.stream_contents = []
- self.stream_have_file_info = False
-
- # pick up the new file information... for the
- # 'data' field we need to append to our array
- for k in marshalled.keys():
- if k == 'data':
- self.stream_contents.append(marshalled['data'])
- else:
- self.stream_file[k] = marshalled[k]
+ # pick up the new file information... for the
+ # 'data' field we need to append to our array
+ for k in marshalled.keys():
+ if k == 'data':
+ self.stream_contents.append(marshalled['data'])
+ else:
+ self.stream_file[k] = marshalled[k]
- self.stream_have_file_info = True
+ self.stream_have_file_info = True
# Stream directly from "p4 files" into "git fast-import"
def streamP4Files(self, files):
self.stream_contents = []
self.stream_have_file_info = False
- # curry self argument
- def streamP4FilesCbSelf(entry):
- self.streamP4FilesCb(entry)
+ # curry self argument
+ def streamP4FilesCbSelf(entry):
+ self.streamP4FilesCb(entry)
- p4CmdList("-x - print",
- '\n'.join(['%s#%s' % (f['path'], f['rev'])
- for f in filesToRead]),
- cb=streamP4FilesCbSelf)
+ p4CmdList("-x - print",
+ '\n'.join(['%s#%s' % (f['path'], f['rev']) for f in filesToRead]),
+ cb=streamP4FilesCbSelf)
- # do the last chunk
- if self.stream_file.has_key('depotFile'):
- self.streamOneP4File(self.stream_file, self.stream_contents)
+ # do the last chunk
+ if self.stream_file.has_key('depotFile'):
+ self.streamOneP4File(self.stream_file, self.stream_contents)
def commit(self, details, files, branch, branchPrefixes, parent = ""):
epoch = details["time"]
author = details["user"]
- self.branchPrefixes = branchPrefixes
+ self.branchPrefixes = branchPrefixes
if self.verbose:
print "commit into %s" % branch
s = ''
for (key, val) in self.users.items():
- s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))
+ s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))
open(self.getUserCacheFilename(), "wb").write(s)
self.userMapFromPerforceServer = True
diff --git a/daemon.c b/daemon.c
index 347fd0c52b4cd797f5dafffb6885324f7c7f0274..d9f2291cc7e744ad2b815fa74b99ad13588101ff 100644 (file)
--- a/daemon.c
+++ b/daemon.c
#include "run-command.h"
#include "strbuf.h"
#include "string-list.h"
+#include "gettext.h"
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 256
struct credentials *cred = NULL;
int i;
+ git_setup_gettext();
+
git_extract_argv0_path(argv[0]);
for (i = 1; i < argc; i++) {
diff --git a/diff-lib.c b/diff-lib.c
index 392ce2bef05746cea7922d39da67bf25d1d3d192..1e22992cb10420b9dd6def16f80efc5f196ffbbb 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
break;
- if (!ce_path_match(ce, revs->prune_data))
+ if (!ce_path_match(ce, &revs->prune_data))
continue;
if (ce_stage(ce)) {
@@ -427,7 +427,7 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
if (tree == o->df_conflict_entry)
tree = NULL;
- if (ce_path_match(idx ? idx : tree, revs->prune_data))
+ if (ce_path_match(idx ? idx : tree, &revs->prune_data))
do_oneway_diff(o, idx, tree);
return 0;
active_nr = dst - active_cache;
init_revisions(&revs, NULL);
- revs.prune_data = opt->paths;
+ init_pathspec(&revs.prune_data, opt->pathspec.raw);
tree = parse_tree_indirect(tree_sha1);
if (!tree)
die("bad tree object %s", sha1_to_hex(tree_sha1));
diff --git a/diff-no-index.c b/diff-no-index.c
index ce9e783407437bb1e0efc6d5bc2392af26da5a41..3a36144687ae2f5bf7bb3afc914ddbada8d5ff93 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
if (prefix) {
int len = strlen(prefix);
+ const char *paths[3];
+ memset(paths, 0, sizeof(paths));
- revs->diffopt.paths = xcalloc(2, sizeof(char *));
for (i = 0; i < 2; i++) {
const char *p = argv[argc - 2 + i];
/*
p = (strcmp(p, "-")
? xstrdup(prefix_filename(prefix, len, p))
: p);
- revs->diffopt.paths[i] = p;
+ paths[i] = p;
}
+ diff_tree_setup_paths(paths, &revs->diffopt);
}
else
- revs->diffopt.paths = argv + argc - 2;
- revs->diffopt.nr_paths = 2;
+ diff_tree_setup_paths(argv + argc - 2, &revs->diffopt);
revs->diffopt.skip_stat_unmatch = 1;
if (!revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
- if (queue_diff(&revs->diffopt, revs->diffopt.paths[0],
- revs->diffopt.paths[1]))
+ if (queue_diff(&revs->diffopt, revs->diffopt.pathspec.raw[0],
+ revs->diffopt.pathspec.raw[1]))
exit(1);
diff_set_mnemonic_prefix(&revs->diffopt, "1/", "2/");
diffcore_std(&revs->diffopt);
index 0083d92438916a8188656df140ba70d6acc8c6f6..310bd6b2832ce7f874aff735bb19b4813f117d4d 100644 (file)
--- a/diff.h
+++ b/diff.h
FILE *file;
int close_file;
- int nr_paths;
- const char **paths;
- int *pathlens;
+ struct pathspec pathspec;
change_fn_t change;
add_remove_fn_t add_remove;
diff_format_fn_t format_callback;
diff --git a/diffcore-rename.c b/diffcore-rename.c
index df41be56deab60d4d39a45920a1e62b05d0474f6..4851af3d58fa88b2f76a780fe140aed6b942c0e1 100644 (file)
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
/* Table of rename/copy src files */
static struct diff_rename_src {
- struct diff_filespec *one;
+ struct diff_filepair *p;
unsigned short score; /* to remember the break score */
} *rename_src;
static int rename_src_nr, rename_src_alloc;
-static struct diff_rename_src *register_rename_src(struct diff_filespec *one,
- unsigned short score)
+static struct diff_rename_src *register_rename_src(struct diff_filepair *p)
{
int first, last;
+ struct diff_filespec *one = p->one;
+ unsigned short score = p->score;
first = 0;
last = rename_src_nr;
while (last > first) {
int next = (last + first) >> 1;
struct diff_rename_src *src = &(rename_src[next]);
- int cmp = strcmp(one->path, src->one->path);
+ int cmp = strcmp(one->path, src->p->one->path);
if (!cmp)
return src;
if (cmp < 0) {
if (first < rename_src_nr)
memmove(rename_src + first + 1, rename_src + first,
(rename_src_nr - first - 1) * sizeof(*rename_src));
- rename_src[first].one = one;
+ rename_src[first].p = p;
rename_src[first].score = score;
return &(rename_src[first]);
}
if (rename_dst[dst_index].pair)
die("internal error: dst already matched.");
- src = rename_src[src_index].one;
+ src = rename_src[src_index].p->one;
src->rename_used++;
src->count++;
init_hash(&file_table);
for (i = 0; i < rename_src_nr; i++)
- insert_file_table(&file_table, -1, i, rename_src[i].one);
+ insert_file_table(&file_table, -1, i, rename_src[i].p->one);
for (i = 0; i < rename_dst_nr; i++)
insert_file_table(&file_table, 1, i, rename_dst[i].two);
m[worst] = *o;
}
+/*
+ * Returns:
+ * 0 if we are under the limit;
+ * 1 if we need to disable inexact rename detection;
+ * 2 if we would be under the limit if we were given -C instead of -C -C.
+ */
+static int too_many_rename_candidates(int num_create,
+ struct diff_options *options)
+{
+ int rename_limit = options->rename_limit;
+ int num_src = rename_src_nr;
+ int i;
+
+ /*
+ * This basically does a test for the rename matrix not
+ * growing larger than a "rename_limit" square matrix, ie:
+ *
+ * num_create * num_src > rename_limit * rename_limit
+ *
+ * but handles the potential overflow case specially (and we
+ * assume at least 32-bit integers)
+ */
+ if (rename_limit <= 0 || rename_limit > 32767)
+ rename_limit = 32767;
+ if ((num_create <= rename_limit || num_src <= rename_limit) &&
+ (num_create * num_src <= rename_limit * rename_limit))
+ return 0;
+
+ /* Are we running under -C -C? */
+ if (!DIFF_OPT_TST(options, FIND_COPIES_HARDER))
+ return 1;
+
+ /* Would we bust the limit if we were running under -C? */
+ for (num_src = i = 0; i < rename_src_nr; i++) {
+ if (diff_unmodified_pair(rename_src[i].p))
+ continue;
+ num_src++;
+ }
+ if ((num_create <= rename_limit || num_src <= rename_limit) &&
+ (num_create * num_src <= rename_limit * rename_limit))
+ return 2;
+ return 1;
+}
+
void diffcore_rename(struct diff_options *options)
{
int detect_rename = options->detect_rename;
int minimum_score = options->rename_score;
- int rename_limit = options->rename_limit;
struct diff_queue_struct *q = &diff_queued_diff;
struct diff_queue_struct outq;
struct diff_score *mx;
- int i, j, rename_count;
+ int i, j, rename_count, skip_unmodified = 0;
int num_create, num_src, dst_cnt;
if (!minimum_score)
*/
if (p->broken_pair && !p->score)
p->one->rename_used++;
- register_rename_src(p->one, p->score);
+ register_rename_src(p);
}
else if (detect_rename == DIFF_DETECT_COPY) {
/*
* one, to indicate ourselves as a user.
*/
p->one->rename_used++;
- register_rename_src(p->one, p->score);
+ register_rename_src(p);
}
}
if (rename_dst_nr == 0 || rename_src_nr == 0)
if (!num_create)
goto cleanup;
- /*
- * This basically does a test for the rename matrix not
- * growing larger than a "rename_limit" square matrix, ie:
- *
- * num_create * num_src > rename_limit * rename_limit
- *
- * but handles the potential overflow case specially (and we
- * assume at least 32-bit integers)
- */
- if (rename_limit <= 0 || rename_limit > 32767)
- rename_limit = 32767;
- if ((num_create > rename_limit && num_src > rename_limit) ||
- (num_create * num_src > rename_limit * rename_limit)) {
+ switch (too_many_rename_candidates(num_create, options)) {
+ case 1:
if (options->warn_on_too_large_rename)
warning("too many files (created: %d deleted: %d), skipping inexact rename detection", num_create, num_src);
goto cleanup;
+ case 2:
+ if (options->warn_on_too_large_rename)
+ warning("too many files, falling back to -C");
+ skip_unmodified = 1;
+ break;
+ default:
+ break;
}
mx = xcalloc(num_create * NUM_CANDIDATE_PER_DST, sizeof(*mx));
m[j].dst = -1;
for (j = 0; j < rename_src_nr; j++) {
- struct diff_filespec *one = rename_src[j].one;
+ struct diff_filespec *one = rename_src[j].p->one;
struct diff_score this_src;
+
+ if (skip_unmodified &&
+ diff_unmodified_pair(rename_src[j].p))
+ continue;
+
this_src.score = estimate_similarity(one, two,
minimum_score);
this_src.name_score = basename_same(one, two);
dst = &rename_dst[mx[i].dst];
if (dst->pair)
continue; /* already done, either exact or fuzzy. */
- if (rename_src[mx[i].src].one->rename_used)
+ if (rename_src[mx[i].src].p->one->rename_used)
continue;
record_rename_pair(mx[i].dst, mx[i].src, mx[i].score);
rename_count++;
index 570b651a17520cbb0273b9247ab0fcffc0129477..168dad615230d77d7719101b76b50b4f6fe02777 100644 (file)
--- a/dir.c
+++ b/dir.c
return len;
}
+int within_depth(const char *name, int namelen,
+ int depth, int max_depth)
+{
+ const char *cp = name, *cpe = name + namelen;
+
+ while (cp < cpe) {
+ if (*cp++ != '/')
+ continue;
+ depth++;
+ if (depth > max_depth)
+ return 0;
+ }
+ return 1;
+}
+
/*
* Does 'match' match the given name?
* A match is found if
return retval;
}
+/*
+ * Does 'match' match the given name?
+ * A match is found if
+ *
+ * (1) the 'match' string is leading directory of 'name', or
+ * (2) the 'match' string is a wildcard and matches 'name', or
+ * (3) the 'match' string is exactly the same as 'name'.
+ *
+ * and the return value tells which case it was.
+ *
+ * It returns 0 when there is no match.
+ */
+static int match_pathspec_item(const struct pathspec_item *item, int prefix,
+ const char *name, int namelen)
+{
+ /* name/namelen has prefix cut off by caller */
+ const char *match = item->match + prefix;
+ int matchlen = item->len - prefix;
+
+ /* If the match was just the prefix, we matched */
+ if (!*match)
+ return MATCHED_RECURSIVELY;
+
+ if (matchlen <= namelen && !strncmp(match, name, matchlen)) {
+ if (matchlen == namelen)
+ return MATCHED_EXACTLY;
+
+ if (match[matchlen-1] == '/' || name[matchlen] == '/')
+ return MATCHED_RECURSIVELY;
+ }
+
+ if (item->has_wildcard && !fnmatch(match, name, 0))
+ return MATCHED_FNMATCH;
+
+ return 0;
+}
+
+/*
+ * Given a name and a list of pathspecs, see if the name matches
+ * any of the pathspecs. The caller is also interested in seeing
+ * all pathspec matches some names it calls this function with
+ * (otherwise the user could have mistyped the unmatched pathspec),
+ * and a mark is left in seen[] array for pathspec element that
+ * actually matched anything.
+ */
+int match_pathspec_depth(const struct pathspec *ps,
+ const char *name, int namelen,
+ int prefix, char *seen)
+{
+ int i, retval = 0;
+
+ if (!ps->nr) {
+ if (!ps->recursive || ps->max_depth == -1)
+ return MATCHED_RECURSIVELY;
+
+ if (within_depth(name, namelen, 0, ps->max_depth))
+ return MATCHED_EXACTLY;
+ else
+ return 0;
+ }
+
+ name += prefix;
+ namelen -= prefix;
+
+ for (i = ps->nr - 1; i >= 0; i--) {
+ int how;
+ if (seen && seen[i] == MATCHED_EXACTLY)
+ continue;
+ how = match_pathspec_item(ps->items+i, prefix, name, namelen);
+ if (ps->recursive && ps->max_depth != -1 &&
+ how && how != MATCHED_FNMATCH) {
+ int len = ps->items[i].len;
+ if (name[len] == '/')
+ len++;
+ if (within_depth(name+len, namelen-len, 0, ps->max_depth))
+ how = MATCHED_EXACTLY;
+ else
+ how = 0;
+ }
+ if (how) {
+ if (retval < how)
+ retval = how;
+ if (seen && seen[i] < how)
+ seen[i] = how;
+ }
+ }
+ return retval;
+}
+
static int no_wildcard(const char *string)
{
return string[strcspn(string, "*?[{\\")] == '\0';
return 0;
}
+static int pathspec_item_cmp(const void *a_, const void *b_)
+{
+ struct pathspec_item *a, *b;
+
+ a = (struct pathspec_item *)a_;
+ b = (struct pathspec_item *)b_;
+ return strcmp(a->match, b->match);
+}
+
+int init_pathspec(struct pathspec *pathspec, const char **paths)
+{
+ const char **p = paths;
+ int i;
+
+ memset(pathspec, 0, sizeof(*pathspec));
+ if (!p)
+ return 0;
+ while (*p)
+ p++;
+ pathspec->raw = paths;
+ pathspec->nr = p - paths;
+ if (!pathspec->nr)
+ return 0;
+
+ pathspec->items = xmalloc(sizeof(struct pathspec_item)*pathspec->nr);
+ for (i = 0; i < pathspec->nr; i++) {
+ struct pathspec_item *item = pathspec->items+i;
+ const char *path = paths[i];
+
+ item->match = path;
+ item->len = strlen(path);
+ item->has_wildcard = !no_wildcard(path);
+ if (item->has_wildcard)
+ pathspec->has_wildcard = 1;
+ }
+
+ qsort(pathspec->items, pathspec->nr,
+ sizeof(struct pathspec_item), pathspec_item_cmp);
+
+ return 0;
+}
+
+void free_pathspec(struct pathspec *pathspec)
+{
+ free(pathspec->items);
+ pathspec->items = NULL;
+}
index 72a764ed84828e4a6336d2880f2167fbc9d3143a..aa511da77b0ec54cbdbd3786faad0c1285df7182 100644 (file)
--- a/dir.h
+++ b/dir.h
#define MATCHED_FNMATCH 2
#define MATCHED_EXACTLY 3
extern int match_pathspec(const char **pathspec, const char *name, int namelen, int prefix, char *seen);
+extern int match_pathspec_depth(const struct pathspec *pathspec,
+ const char *name, int namelen,
+ int prefix, char *seen);
+extern int within_depth(const char *name, int namelen, int depth, int max_depth);
extern int fill_directory(struct dir_struct *dir, const char **pathspec);
extern int read_directory(struct dir_struct *, const char *path, int len, const char **pathspec);
diff --git a/environment.c b/environment.c
index 9564475f429312a467a020106f7443112367d5da..be744cc8a13401e75f10ecddc0b4f66c309d0f9c 100644 (file)
--- a/environment.c
+++ b/environment.c
int zlib_compression_level = Z_BEST_SPEED;
int core_compression_level;
int core_compression_seen;
+int ignored_are_precious;
int fsync_object_files;
size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
diff --git a/exec_cmd.c b/exec_cmd.c
index bf225706ee377b89035eb21f76f9957cfaf6363b..38545e8bfd72c8cd4f91e0d33257b143db86bac5 100644 (file)
--- a/exec_cmd.c
+++ b/exec_cmd.c
#include "quote.h"
#define MAX_ARGS 32
-extern char **environ;
static const char *argv_exec_path;
static const char *argv0_path;
diff --git a/fast-import.c b/fast-import.c
index 785776086ccc22dcd5488e3ac0bad3318f57043e..76daf6578de298fc7e6dd7efa7ca2b2567637900 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
#include "quote.h"
#include "exec_cmd.h"
#include "dir.h"
+#include "gettext.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
static const char *export_marks_file;
static const char *import_marks_file;
static int import_marks_file_from_stream;
+static int import_marks_file_ignore_missing;
static int relative_marks_paths;
/* Our last blob */
{
char line[512];
FILE *f = fopen(import_marks_file, "r");
- if (!f)
+ if (f)
+ ;
+ else if (import_marks_file_ignore_missing && errno == ENOENT)
+ return; /* Marks file does not exist */
+ else
die_errno("cannot read '%s'", import_marks_file);
while (fgets(line, sizeof(line), f)) {
uintmax_t mark;
p = uq.buf;
}
+ /* Git does not track empty, non-toplevel directories. */
+ if (S_ISDIR(mode) && !memcmp(sha1, EMPTY_TREE_SHA1_BIN, 20) && *p) {
+ tree_content_remove(&b->branch_tree, p, NULL);
+ return;
+ }
+
if (S_ISGITLINK(mode)) {
if (inline_data)
die("Git links cannot be specified 'inline': %s",
return strbuf_detach(&abs_path, NULL);
}
-static void option_import_marks(const char *marks, int from_stream)
+static void option_import_marks(const char *marks,
+ int from_stream, int ignore_missing)
{
if (import_marks_file) {
if (from_stream)
import_marks_file = make_fast_import_path(marks);
safe_create_leading_directories_const(import_marks_file);
import_marks_file_from_stream = from_stream;
+ import_marks_file_ignore_missing = ignore_missing;
}
static void option_date_format(const char *fmt)
if (!prefixcmp(feature, "date-format=")) {
option_date_format(feature + 12);
} else if (!prefixcmp(feature, "import-marks=")) {
- option_import_marks(feature + 13, from_stream);
+ option_import_marks(feature + 13, from_stream, 0);
+ } else if (!prefixcmp(feature, "import-marks-if-exists=")) {
+ option_import_marks(feature + strlen("import-marks-if-exists="),
+ from_stream, 1);
} else if (!prefixcmp(feature, "export-marks=")) {
option_export_marks(feature + 13);
} else if (!strcmp(feature, "cat-blob")) {
git_extract_argv0_path(argv[0]);
+ git_setup_gettext();
+
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(fast_import_usage);
diff --git a/gettext.c b/gettext.c
--- /dev/null
+++ b/gettext.c
@@ -0,0 +1,35 @@
+#include "exec_cmd.h"
+#include <locale.h>
+#include <libintl.h>
+#ifdef HAVE_LIBCHARSET_H
+#include <libcharset.h>
+#else
+#include <langinfo.h>
+#endif
+#include <stdlib.h>
+
+extern void git_setup_gettext(void) {
+ char *podir;
+ char *envdir = getenv("GIT_TEXTDOMAINDIR");
+ const char *charset;
+
+ if (envdir) {
+ (void)bindtextdomain("git", envdir);
+ } else {
+ podir = (char *)system_path("share/locale");
+ if (!podir) return;
+ (void)bindtextdomain("git", podir);
+ free(podir);
+ }
+
+ (void)setlocale(LC_MESSAGES, "");
+ (void)setlocale(LC_CTYPE, "");
+#ifdef HAVE_LIBCHARSET_H
+ charset = locale_charset();
+#else
+ charset = nl_langinfo(CODESET);
+#endif
+ (void)bind_textdomain_codeset("git", charset);
+ (void)setlocale(LC_CTYPE, "C");
+ (void)textdomain("git");
+}
diff --git a/gettext.h b/gettext.h
--- /dev/null
+++ b/gettext.h
@@ -0,0 +1,22 @@
+#ifndef GETTEXT_H
+#define GETTEXT_H
+
+#ifdef NO_GETTEXT
+static inline void git_setup_gettext(void) {}
+#else
+extern void git_setup_gettext(void);
+#endif
+
+#define N_(s) (s)
+#ifdef NO_GETTEXT
+#define _(s) (s)
+#else
+#ifndef GETTEXT_POISON
+#include <libintl.h>
+#define _(s) gettext(s)
+#else
+#define _(s) "# GETTEXT POISON #"
+#endif
+#endif
+
+#endif
diff --git a/git-am.sh b/git-am.sh
index 6cdd5910db50c96df3d149fba172750cb10c09cb..22239755735c845141b2eb5bf1682d08c955b491 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
rebasing* (internal use for git-rebase)"
. git-sh-setup
+. git-sh-i18n
prefix=$(git rev-parse --show-prefix)
set_reflog_action am
require_work_tree
cd_to_toplevel
git var GIT_COMMITTER_IDENT >/dev/null ||
- die "You need to set your committer info first"
+ die "$(gettext "You need to set your committer info first")"
if git rev-parse --verify -q HEAD >/dev/null
then
printf '%s\n' "$resolvemsg"
stop_here $1
fi
- echo "When you have resolved this problem run \"$cmdline --resolved\"."
- echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
- echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
+ eval_gettext "When you have resolved this problem run \"\$cmdline --resolved\".
+If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
+To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
stop_here $1
}
cannot_fallback () {
echo "$1"
- echo "Cannot fall back to three-way merge."
+ gettext "Cannot fall back to three-way merge."; echo
exit 1
}
"$dotest/patch" &&
GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
git write-tree >"$dotest/patch-merge-base+" ||
- cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
+ cannot_fallback "$(gettext "Repository lacks necessary blobs to fall back on 3-way merge.")"
say Using index info to reconstruct a base tree...
if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
mv "$dotest/patch-merge-base+" "$dotest/patch-merge-base"
mv "$dotest/patch-merge-tmp-index" "$dotest/patch-merge-index"
else
- cannot_fallback "Did you hand edit your patch?
-It does not apply to blobs recorded in its index."
+ cannot_fallback "$(gettext "Did you hand edit your patch?
+It does not apply to blobs recorded in its index.")"
fi
test -f "$dotest/patch-merge-index" &&
stgit-series)
if test $# -ne 1
then
- clean_abort "Only one StGIT patch series can be applied at once"
+ clean_abort "$(gettext "Only one StGIT patch series can be applied at once")"
fi
series_dir=`dirname "$1"`
series_file="$1"
;;
*)
if test -n "$parse_patch" ; then
- clean_abort "Patch format $patch_format is not supported."
+ clean_abort "$(eval_gettext "Patch format \$patch_format is not supported.")"
else
- clean_abort "Patch format detection failed."
+ clean_abort "$(gettext "Patch format detection failed.")"
fi
;;
esac
--rebasing)
rebasing=t threeway=t keep=t scissors=f no_inbody_headers=t ;;
-d|--dotest)
- die "-d option is no longer supported. Do not use."
+ die "$(gettext "-d option is no longer supported. Do not use.")"
;;
--resolvemsg)
shift; resolvemsg=$1 ;;
false
;;
esac ||
- die "previous rebase directory $dotest still exists but mbox given."
+ die "$(eval_gettext "previous rebase directory \$dotest still exists but mbox given.")"
resume=yes
case "$skip,$abort" in
t,t)
- die "Please make up your mind. --skip or --abort?"
+ die "$(gettext "Please make up your mind. --skip or --abort?")"
;;
t,)
git rerere clear
else
# Make sure we are not given --skip, --resolved, nor --abort
test "$skip$resolved$abort" = "" ||
- die "Resolve operation not in progress, we are not resuming."
+ die "$(gettext "Resolve operation not in progress, we are not resuming.")"
# Start afresh.
mkdir -p "$dotest" || exit
if test "$files"
then
test -n "$HAS_HEAD" && : >"$dotest/dirtyindex"
- die "Dirty index: cannot apply patches (dirty: $files)"
+ die "$(eval_gettext "Dirty index: cannot apply patches (dirty: \$files)")"
fi
esac
go_next && continue
test -s "$dotest/patch" || {
- echo "Patch is empty. Was it split wrong?"
- echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
- echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
+ eval_gettext "Patch is empty. Was it split wrong?
+If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
+To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
stop_here $this
}
rm -f "$dotest/original-commit" "$dotest/author-script"
if test -z "$GIT_AUTHOR_EMAIL"
then
- echo "Patch does not have a valid e-mail address."
+ gettext "Patch does not have a valid e-mail address."; echo
stop_here $this
fi
if test "$interactive" = t
then
test -t 0 ||
- die "cannot be interactive without stdin connected to a terminal."
+ die "$(gettext "cannot be interactive without stdin connected to a terminal.")"
action=again
while test "$action" = again
do
- echo "Commit Body is:"
+ gettext "Commit Body is:"; echo
echo "--------------------------"
cat "$dotest/final-commit"
echo "--------------------------"
- printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+ # TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+ # in your translation. The program will only accept English
+ # input at this point.
+ gettext "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
read reply
case "$reply" in
[yY]*) action=yes ;;
stop_here $this
fi
- say "Applying: $FIRSTLINE"
+ say "$(eval_gettext "Applying: \$FIRSTLINE")"
case "$resolved" in
'')
# working tree.
resolved=
git diff-index --quiet --cached HEAD -- && {
- echo "No changes - did you forget to use 'git add'?"
- echo "If there is nothing left to stage, chances are that something else"
- echo "already introduced the same changes; you might want to skip this patch."
+ gettext "No changes - did you forget to use 'git add'?
+If there is nothing left to stage, chances are that something else
+already introduced the same changes; you might want to skip this patch."; echo
stop_here_user_resolve $this
}
unmerged=$(git ls-files -u)
if test -n "$unmerged"
then
- echo "You still have unmerged paths in your index"
- echo "did you forget to use 'git add'?"
+ gettext "You still have unmerged paths in your index
+did you forget to use 'git add'?"; echo
stop_here_user_resolve $this
fi
apply_status=0
# Applying the patch to an earlier tree and merging the
# result may have produced the same tree as ours.
git diff-index --quiet --cached HEAD -- && {
- say No changes -- Patch already applied.
+ say "$(gettext "No changes -- Patch already applied.")"
go_next
continue
}
fi
if test $apply_status != 0
then
- printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
+ eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo
stop_here_user_resolve $this
fi
GIT_AUTHOR_DATE=
fi
parent=$(git rev-parse --verify -q HEAD) ||
- say >&2 "applying to an empty history"
+ say >&2 "$(gettext "applying to an empty history")"
if test -n "$committer_date_is_author_date"
then
diff --git a/git-bisect.sh b/git-bisect.sh
index c21e33c8d133af0e9e0ae3edaffd0a5593ff4ac3..9b79fe47ff332d31e04e6eda85df47f48917a2e1 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
OPTIONS_SPEC=
. git-sh-setup
+. git-sh-i18n
require_work_tree
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
bisect_autostart() {
test -s "$GIT_DIR/BISECT_START" || {
- echo >&2 'You need to start by "git bisect start"'
+ echo >&2 "$(gettext "You need to start by \"git bisect start\"")"
if test -t 0
then
- echo >&2 -n 'Do you want me to do it for you [Y/n]? '
+ # TRANSLATORS: Make sure to include [Y] and [n] in your
+ # translation. The program will only accept English input
+ # at this point.
+ echo >&2 -n "$(gettext "Do you want me to do it for you [Y/n]? ")"
read yesno
case "$yesno" in
[Nn]*)
#
head=$(GIT_DIR="$GIT_DIR" git symbolic-ref -q HEAD) ||
head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
- die "Bad HEAD - I need a HEAD"
+ die "$(gettext "Bad HEAD - I need a HEAD")"
#
# Check if we are bisecting.
# cogito usage, and cogito users should understand
# it relates to cg-seek.
[ -s "$GIT_DIR/head-name" ] &&
- die "won't bisect on seeked tree"
+ die "$(gettext "won't bisect on seeked tree")"
start_head="${head#refs/heads/}"
;;
*)
- die "Bad HEAD - strange symbolic ref"
+ die "$(gettext "Bad HEAD - strange symbolic ref")"
;;
esac
fi
*)
rev=$(git rev-parse -q --verify "$arg^{commit}") || {
test $has_double_dash -eq 1 &&
- die "'$arg' does not appear to be a valid revision"
+ die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
break
}
case $bad_seen in
case "$state" in
bad) tag="$state" ;;
good|skip) tag="$state"-"$rev" ;;
- *) die "Bad bisect_write argument: $state" ;;
+ *) die "$(eval_gettext "Bad bisect_write argument: \$state")" ;;
esac
git update-ref "refs/bisect/$tag" "$rev" || exit
echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
do
case "$arg" in
*..*)
- revs=$(git rev-list "$arg") || die "Bad rev input: $arg" ;;
+ revs=$(git rev-list "$arg") || die "$(eval_gettext "Bad rev input: \$arg")" ;;
*)
revs=$(git rev-parse --sq-quote "$arg") ;;
esac
state=$1
case "$#,$state" in
0,*)
- die "Please call 'bisect_state' with at least one argument." ;;
+ die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
1,bad|1,good|1,skip)
rev=$(git rev-parse --verify HEAD) ||
- die "Bad rev input: HEAD"
+ die "$(gettext "Bad rev input: HEAD")"
bisect_write "$state" "$rev"
check_expected_revs "$rev" ;;
2,bad|*,good|*,skip)
for rev in "$@"
do
sha=$(git rev-parse --verify "$rev^{commit}") ||
- die "Bad rev input: $rev"
+ die "$(eval_gettext "Bad rev input: \$rev")"
eval="$eval bisect_write '$state' '$sha'; "
done
eval "$eval"
check_expected_revs "$@" ;;
*,bad)
- die "'git bisect bad' can take only one argument." ;;
+ die "$(gettext "'git bisect bad' can take only one argument.")" ;;
*)
usage ;;
esac
t,,good)
# have bad but not good. we could bisect although
# this is less optimum.
- echo >&2 'Warning: bisecting only with a bad commit.'
+ echo >&2 "$(gettext "Warning: bisecting only with a bad commit.")"
if test -t 0
then
- printf >&2 'Are you sure [Y/n]? '
+ # TRANSLATORS: Make sure to include [Y] and [n] in your
+ # translation. The program will only accept English input
+ # at this point.
+ printf >&2 "$(gettext "Are you sure [Y/n]? ")"
read yesno
case "$yesno" in [Nn]*) exit 1 ;; esac
fi
: bisect without good...
;;
*)
- THEN=''
- test -s "$GIT_DIR/BISECT_START" || {
- echo >&2 'You need to start by "git bisect start".'
- THEN='then '
- }
- echo >&2 'You '$THEN'need to give me at least one good' \
- 'and one bad revisions.'
- echo >&2 '(You can use "git bisect bad" and' \
- '"git bisect good" for that.)'
+
+ if test -s "$GIT_DIR/BISECT_START"
+ then
+ echo >&2 "$(gettext "You need to give me at least one good and one bad revisions.
+(You can use \"git bisect bad\" and \"git bisect good\" for that.)")"
+ else
+ echo >&2 "$(gettext "You need to start by \"git bisect start\".
+You then need to give me at least one good and one bad revisions.
+(You can use \"git bisect bad\" and \"git bisect good\" for that.)")"
+ fi
exit 1 ;;
esac
}
bisect_reset() {
test -s "$GIT_DIR/BISECT_START" || {
- echo "We are not bisecting."
+ gettext "We are not bisecting."; echo
return
}
case "$#" in
0) branch=$(cat "$GIT_DIR/BISECT_START") ;;
- 1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null ||
- die "'$1' is not a valid commit"
+ 1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null || {
+ invalid="$1"
+ die "$(eval_gettext "'\$invalid' is not a valid commit")"
+ }
branch="$1" ;;
*)
usage ;;
bisect_replay () {
test "$#" -eq 1 || die "No logfile given"
- test -r "$1" || die "cannot read $1 for replaying"
+ file="$1"
+ test -r "$file" || die "$(eval_gettext "cannot read \$file for replaying")"
bisect_reset
while read git bisect command rev
do
good|bad|skip)
bisect_write "$command" "$rev" ;;
*)
- die "?? what are you talking about?" ;;
+ die "$(gettext "?? what are you talking about?")" ;;
esac
- done <"$1"
+ done <"$file"
bisect_auto_next
}
while true
do
- echo "running $@"
+ command="$@"
+ eval_gettext "running \$command"; echo
"$@"
res=$?
# Check for really bad run error.
if [ $res -lt 0 -o $res -ge 128 ]; then
- echo >&2 "bisect run failed:"
- echo >&2 "exit code $res from '$@' is < 0 or >= 128"
+ echo >&2 "$(eval_gettext "bisect run failed:
+exit code \$res from '\$command' is < 0 or >= 128")"
exit $res
fi
if sane_grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
> /dev/null; then
- echo >&2 "bisect run cannot continue any more"
+ echo >&2 "$(gettext "bisect run cannot continue any more")"
exit $res
fi
if [ $res -ne 0 ]; then
- echo >&2 "bisect run failed:"
- echo >&2 "'bisect_state $state' exited with error code $res"
+ echo >&2 "$(eval_gettext "bisect run failed:
+'bisect_state \$state' exited with error code \$res")"
exit $res
fi
if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
- echo "bisect run success"
+ gettext "bisect run success"; echo
exit 0;
fi
diff --git a/git-pull.sh b/git-pull.sh
index eb87f49062b70d707adebca4013809822123608b..cb804546fc707ca3de6683aa845c82a5361d858d 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
. git-sh-setup
+. git-sh-i18n
set_reflog_action "pull $*"
require_work_tree
cd_to_toplevel
die_conflict () {
git diff-index --cached --name-status -r --ignore-submodules HEAD --
if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
- die "Pull is not possible because you have unmerged files.
+ die "$(gettext "Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
-as appropriate to mark resolution, or use 'git commit -a'."
+as appropriate to mark resolution, or use 'git commit -a'.")"
else
- die "Pull is not possible because you have unmerged files."
+ die "$(gettext "Pull is not possible because you have unmerged files.")"
fi
}
die_merge () {
if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
- die "You have not concluded your merge (MERGE_HEAD exists).
-Please, commit your changes before you can merge."
+ die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).
+Please, commit your changes before you can merge.")"
else
- die "You have not concluded your merge (MERGE_HEAD exists)."
+ die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).")"
fi
}
esac
done
- if test true = "$rebase"
- then
- op_type=rebase
- op_prep=against
- else
- op_type=merge
- op_prep=with
- fi
-
curr_branch=${curr_branch#refs/heads/}
upstream=$(git config "branch.$curr_branch.merge")
remote=$(git config "branch.$curr_branch.remote")
if [ $# -gt 1 ]; then
if [ "$rebase" = true ]; then
- printf "There is no candidate for rebasing against "
+ gettext "There is no candidate for rebasing against among the refs that you just fetched.
+Generally this means that you provided a wildcard refspec which had no
+matches on the remote end."; echo
else
- printf "There are no candidates for merging "
+ gettext "There are no candidates for merging against among the refs that you just fetched.
+Generally this means that you provided a wildcard refspec which had no
+matches on the remote end."; echo
fi
- echo "among the refs that you just fetched."
- echo "Generally this means that you provided a wildcard refspec which had no"
- echo "matches on the remote end."
elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then
- echo "You asked to pull from the remote '$1', but did not specify"
- echo "a branch. Because this is not the default configured remote"
- echo "for your current branch, you must specify a branch on the command line."
+ requested_remote=$1
+ # TRANSLATORS: $requested_remote will be a remote name, like
+ # "origin" or "avar"
+ eval_gettext "You asked to pull from the remote '\$requested_remote', but did not specify
+a branch. Because this is not the default configured remote
+for your current branch, you must specify a branch on the command line."; echo
elif [ -z "$curr_branch" ]; then
- echo "You are not currently on a branch, so I cannot use any"
- echo "'branch.<branchname>.merge' in your configuration file."
- echo "Please specify which remote branch you want to use on the command"
- echo "line and try again (e.g. 'git pull <repository> <refspec>')."
- echo "See git-pull(1) for details."
+ gettext "You are not currently on a branch, so I cannot use any
+'branch.<branchname>.merge' in your configuration file.
+Please specify which remote branch you want to use on the command
+line and try again (e.g. 'git pull <repository> <refspec>').
+See git-pull(1) for details."; echo
elif [ -z "$upstream" ]; then
- echo "You asked me to pull without telling me which branch you"
- echo "want to $op_type $op_prep, and 'branch.${curr_branch}.merge' in"
- echo "your configuration file does not tell me, either. Please"
- echo "specify which branch you want to use on the command line and"
- echo "try again (e.g. 'git pull <repository> <refspec>')."
- echo "See git-pull(1) for details."
- echo
- echo "If you often $op_type $op_prep the same branch, you may want to"
- echo "use something like the following in your configuration file:"
- echo
- echo " [branch \"${curr_branch}\"]"
- echo " remote = <nickname>"
- echo " merge = <remote-ref>"
- test rebase = "$op_type" &&
- echo " rebase = true"
- echo
- echo " [remote \"<nickname>\"]"
- echo " url = <url>"
- echo " fetch = <refspec>"
- echo
- echo "See git-config(1) for details."
+ if test true = "$rebase"
+ then
+ eval_gettext "You asked me to pull without telling me which branch you
+want to rebase against, and 'branch.\${curr_branch}.merge' in
+your configuration file does not tell me, either. Please
+specify which branch you want to use on the command line and
+try again (e.g. 'git pull <repository> <refspec>').
+See git-pull(1) for details.
+
+If you often rebase against the same branch, you may want to
+use something like the following in your configuration file:
+
+ [branch \"\${curr_branch}\"]
+ remote = <nickname>
+ merge = <remote-ref>
+ rebase = true
+
+ [remote \"<nickname>\"]
+ url = <url>
+ fetch = <refspec>
+
+See git-config(1) for details."; echo
+ else
+ eval_gettext "You asked me to pull without telling me which branch you
+want to merge with, and 'branch.\${curr_branch}.merge' in
+your configuration file does not tell me, either. Please
+specify which branch you want to use on the command line and
+try again (e.g. 'git pull <repository> <refspec>').
+See git-pull(1) for details.
+
+If you often merge with the same branch, you may want to
+use something like the following in your configuration file:
+
+ [branch \"\${curr_branch}\"]
+ remote = <nickname>
+ merge = <remote-ref>
+
+ [remote \"<nickname>\"]
+ url = <url>
+ fetch = <refspec>
+
+See git-config(1) for details."; echo
+ fi
else
- echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
- echo "from the remote, but no such ref was fetched."
+ upstream_branch="${upstream#refs/heads/}"
+ if test true = "$rebase"
+ then
+ eval_gettext "Your configuration specifies to rebase against the ref '\$upstream_branch'
+from the remote, but no such ref was fetched."; echo
+ else
+ eval_gettext "Your configuration specifies to merge with the ref '\$upstream_branch'
+from the remote, but no such ref was fetched."; echo
+ fi
fi
exit 1
}
# On an unborn branch
if test -f "$GIT_DIR/index"
then
- die "updating an unborn branch with changes added to the index"
+ die "$(gettext "updating an unborn branch with changes added to the index")"
fi
else
require_clean_work_tree "pull with rebase" "Please commit or stash them."
# $orig_head commit, but we are merging into $curr_head.
# First update the working tree to match $curr_head.
- echo >&2 "Warning: fetch updated the current branch head."
- echo >&2 "Warning: fast-forwarding your working tree from"
- echo >&2 "Warning: commit $orig_head."
+ echo >&2 "$(eval_gettext "Warning: fetch updated the current branch head.
+Warning: fast-forwarding your working tree from
+Warning: commit \$orig_head.")"
git update-index -q --refresh
git read-tree -u -m "$orig_head" "$curr_head" ||
- die 'Cannot fast-forward your working tree.
+ die "$(eval_gettext "Cannot fast-forward your working tree.
After making sure that you saved anything precious from
-$ git diff '$orig_head'
+$ git diff \$orig_head
output, run
$ git reset --hard
-to recover.'
+to recover.")"
fi
?*' '?*)
if test -z "$orig_head"
then
- die "Cannot merge multiple branches into empty head"
+ die "$(gettext "Cannot merge multiple branches into empty head")"
fi
if test true = "$rebase"
then
- die "Cannot rebase onto multiple branches"
+ die "$(gettext "Cannot rebase onto multiple branches")"
fi
;;
esac
diff --git a/git-rebase--am.sh b/git-rebase--am.sh
--- /dev/null
+++ b/git-rebase--am.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Junio C Hamano.
+#
+
+. git-sh-setup
+
+case "$action" in
+continue)
+ git am --resolved --resolvemsg="$RESOLVEMSG" &&
+ move_to_original_branch
+ exit
+ ;;
+skip)
+ git am --skip --resolvemsg="$RESOLVEMSG" &&
+ move_to_original_branch
+ exit
+ ;;
+esac
+
+test -n "$rebase_root" && root_flag=--root
+
+git format-patch -k --stdout --full-index --ignore-if-in-upstream \
+ --src-prefix=a/ --dst-prefix=b/ \
+ --no-renames $root_flag "$revisions" |
+git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
+move_to_original_branch
+ret=$?
+test 0 != $ret -a -d "$state_dir" && write_basic_state
+exit $ret
index a5ffd9a31eea0f361774d77867c83f444847279b..71b996b5d3e63660e5b5a2c8e9597acc7664383f 100755 (executable)
# The original idea comes from Eric W. Biederman, in
# http://article.gmane.org/gmane.comp.version-control.git/22407
-OPTIONS_KEEPDASHDASH=
-OPTIONS_SPEC="\
-git-rebase [-i] [options] [--] <upstream> [<branch>]
-git-rebase [-i] (--continue | --abort | --skip)
---
- Available options are
-v,verbose display a diffstat of what changed upstream
-onto= rebase onto given branch instead of upstream
-p,preserve-merges try to recreate merges instead of ignoring them
-s,strategy= use the given merge strategy
-no-ff cherry-pick all commits, even if unchanged
-m,merge always used (no-op)
-i,interactive always used (no-op)
- Actions:
-continue continue rebasing process
-abort abort rebasing process and restore original branch
-skip skip current patch and continue rebasing process
-no-verify override pre-rebase hook from stopping the operation
-verify allow pre-rebase hook to run
-root rebase all reachable commmits up to the root(s)
-autosquash move commits that begin with squash!/fixup! under -i
-"
-
. git-sh-setup
-require_work_tree
-
-DOTEST="$GIT_DIR/rebase-merge"
# The file containing rebase commands, comments, and empty lines.
# This file is created by "git rebase -i" then edited by the user. As
# the lines are processed, they are removed from the front of this
# file and written to the tail of $DONE.
-TODO="$DOTEST"/git-rebase-todo
+TODO="$state_dir"/git-rebase-todo
# The rebase command lines that have already been processed. A line
# is moved here when it is first handled, before any associated user
# actions.
-DONE="$DOTEST"/done
+DONE="$state_dir"/done
# The commit message that is planned to be used for any changes that
# need to be committed following a user interaction.
-MSG="$DOTEST"/message
+MSG="$state_dir"/message
# The file into which is accumulated the suggested commit message for
# squash/fixup commands. When the first of a series of squash/fixups
# written to the file so far (including the initial "pick" commit).
# Each time that a commit message is processed, this line is read and
# updated. It is deleted just before the combined commit is made.
-SQUASH_MSG="$DOTEST"/message-squash
+SQUASH_MSG="$state_dir"/message-squash
# If the current series of squash/fixups has not yet included a squash
# command, then this file exists and holds the commit message of the
# original "pick" commit. (If the series ends without a "squash"
# command, then this can be used as the commit message of the combined
# commit without opening the editor.)
-FIXUP_MSG="$DOTEST"/message-fixup
+FIXUP_MSG="$state_dir"/message-fixup
# $REWRITTEN is the name of a directory containing files for each
# commit that is reachable by at least one merge base of $HEAD and
-# $UPSTREAM. They are not necessarily rewritten, but their children
+# $upstream. They are not necessarily rewritten, but their children
# might be. This ensures that commits on merged, but otherwise
# unrelated side branches are left alone. (Think "X" in the man page's
# example.)
-REWRITTEN="$DOTEST"/rewritten
+REWRITTEN="$state_dir"/rewritten
-DROPPED="$DOTEST"/dropped
+DROPPED="$state_dir"/dropped
# A script to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and
# GIT_AUTHOR_DATE that will be used for the commit that is currently
# being rebased.
-AUTHOR_SCRIPT="$DOTEST"/author-script
+AUTHOR_SCRIPT="$state_dir"/author-script
# When an "edit" rebase command is being processed, the SHA1 of the
# commit to be edited is recorded in this file. When "git rebase
# will be amended to the HEAD commit, but only provided the HEAD
# commit is still the commit to be edited. When any other rebase
# command is processed, this file is deleted.
-AMEND="$DOTEST"/amend
+AMEND="$state_dir"/amend
# For the post-rewrite hook, we make a list of rewritten commits and
# their new sha1s. The rewritten-pending list keeps the sha1s of
# commits that have been processed, but not committed yet,
# e.g. because they are waiting for a 'squash' command.
-REWRITTEN_LIST="$DOTEST"/rewritten-list
-REWRITTEN_PENDING="$DOTEST"/rewritten-pending
-
-PRESERVE_MERGES=
-STRATEGY=
-ONTO=
-VERBOSE=
-OK_TO_SKIP_PRE_REBASE=
-REBASE_ROOT=
-AUTOSQUASH=
-test "$(git config --bool rebase.autosquash)" = "true" && AUTOSQUASH=t
-NEVER_FF=
-
-GIT_CHERRY_PICK_HELP="\
-hint: after resolving the conflicts, mark the corrected paths
-hint: with 'git add <paths>' and run 'git rebase --continue'"
+REWRITTEN_LIST="$state_dir"/rewritten-list
+REWRITTEN_PENDING="$state_dir"/rewritten-pending
+
+GIT_CHERRY_PICK_HELP="$RESOLVEMSG"
export GIT_CHERRY_PICK_HELP
warn () {
printf '%s\n' "$*" >&2
}
-output () {
- case "$VERBOSE" in
- '')
- output=$("$@" 2>&1 )
- status=$?
- test $status != 0 && printf "%s\n" "$output"
- return $status
- ;;
- *)
- "$@"
- ;;
- esac
-}
-
# Output the commit message for the specified commit.
commit_message () {
git cat-file commit "$1" | sed "1,/^$/d"
}
-run_pre_rebase_hook () {
- if test -z "$OK_TO_SKIP_PRE_REBASE" &&
- test -x "$GIT_DIR/hooks/pre-rebase"
- then
- "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || {
- echo >&2 "The pre-rebase hook refused to rebase."
- exit 1
- }
- fi
-}
-
-
ORIG_REFLOG_ACTION="$GIT_REFLOG_ACTION"
comment_for_reflog () {
then
last_count=$count
printf "Rebasing (%d/%d)\r" $count $total
- test -z "$VERBOSE" || echo
+ test -z "$verbose" || echo
fi
}
*)
echo "Root commit"
;;
- esac > "$DOTEST"/patch
+ esac > "$state_dir"/patch
test -f "$MSG" ||
commit_message "$1" > "$MSG"
test -f "$AUTHOR_SCRIPT" ||
}
die_with_patch () {
- echo "$1" > "$DOTEST"/stopped-sha
+ echo "$1" > "$state_dir"/stopped-sha
make_patch "$1"
git rerere
die "$2"
}
die_abort () {
- rm -rf "$DOTEST"
+ rm -rf "$state_dir"
die "$1"
}
pick_one () {
ff=--ff
case "$1" in -n) sha1=$2; ff= ;; *) sha1=$1 ;; esac
- case "$NEVER_FF" in '') ;; ?*) ff= ;; esac
+ case "$force_rebase" in '') ;; ?*) ff= ;; esac
output git rev-parse --verify $sha1 || die "Invalid commit name: $sha1"
test -d "$REWRITTEN" &&
pick_one_preserving_merges "$@" && return
- if test -n "$REBASE_ROOT"
- then
- output git cherry-pick "$@"
- return
- fi
output git cherry-pick $ff "$@"
}
esac
sha1=$(git rev-parse $sha1)
- if test -f "$DOTEST"/current-commit
+ if test -f "$state_dir"/current-commit
then
if test "$fast_forward" = t
then
while read current_commit
do
git rev-parse HEAD > "$REWRITTEN"/$current_commit
- done <"$DOTEST"/current-commit
- rm "$DOTEST"/current-commit ||
+ done <"$state_dir"/current-commit
+ rm "$state_dir"/current-commit ||
die "Cannot write current commit's replacement sha1"
fi
fi
- echo $sha1 >> "$DOTEST"/current-commit
+ echo $sha1 >> "$state_dir"/current-commit
# rewrite parents; if none were rewritten, we can fast-forward.
new_parents=
# No point in merging the first parent, that's HEAD
new_parents=${new_parents# $first_parent}
if ! do_with_author output \
- git merge $STRATEGY -m "$msg" $new_parents
+ git merge ${strategy:+-s $strategy} -m "$msg" \
+ $new_parents
then
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
die_with_patch $sha1 "Error redoing merge $sha1"
mark_action_done
pick_one $sha1 ||
die_with_patch $sha1 "Could not apply $sha1... $rest"
- echo "$sha1" > "$DOTEST"/stopped-sha
+ echo "$sha1" > "$state_dir"/stopped-sha
make_patch $sha1
git rev-parse --verify HEAD > "$AMEND"
warn "Stopped at $sha1... $rest"
printf 'Executing: %s\n' "$rest"
# "exec" command doesn't take a sha1 in the todo-list.
# => can't just use $sha1 here.
- git rev-parse --verify HEAD > "$DOTEST"/stopped-sha
+ git rev-parse --verify HEAD > "$state_dir"/stopped-sha
${SHELL:-@SHELL_PATH@} -c "$rest" # Actual execution
status=$?
if test "$status" -ne 0
test -s "$TODO" && return
comment_for_reflog finish &&
- HEADNAME=$(cat "$DOTEST"/head-name) &&
- OLDHEAD=$(cat "$DOTEST"/head) &&
- SHORTONTO=$(git rev-parse --short $(cat "$DOTEST"/onto)) &&
+ SHORTONTO=$(git rev-parse --short $onto) &&
NEWHEAD=$(git rev-parse HEAD) &&
- case $HEADNAME in
+ case $head_name in
refs/*)
- message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO" &&
- git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
- git symbolic-ref HEAD $HEADNAME
+ message="$GIT_REFLOG_ACTION: $head_name onto $SHORTONTO" &&
+ git update-ref -m "$message" $head_name $NEWHEAD $orig_head &&
+ git symbolic-ref HEAD $head_name
;;
esac && {
- test ! -f "$DOTEST"/verbose ||
- git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
+ test ! -f "$state_dir"/verbose ||
+ git diff-tree --stat $orig_head..HEAD
} &&
{
test -s "$REWRITTEN_LIST" &&
"$GIT_DIR"/hooks/post-rewrite rebase < "$REWRITTEN_LIST"
true # we don't care if this hook failed
fi &&
- rm -rf "$DOTEST" &&
+ rm -rf "$state_dir" &&
git gc --auto &&
- warn "Successfully rebased and updated $HEADNAME."
+ warn "Successfully rebased and updated $head_name."
exit
}
# fd=3 means we skip the command
case "$fd,$command" in
3,pick|3,p)
- # pick a commit whose parent is current $ONTO -> skip
+ # pick a commit whose parent is current $onto -> skip
sha1=${rest%% *}
case "$(git rev-parse --verify --quiet "$sha1"^)" in
- "$ONTO"*)
- ONTO=$sha1
+ "$onto"*)
+ onto=$sha1
;;
*)
fd=1
mv -f "$TODO".new "$TODO" &&
case "$(peek_next_command)" in
squash|s|fixup|f)
- record_in_rewritten "$ONTO"
+ record_in_rewritten "$onto"
;;
esac ||
die "Could not skip unnecessary pick commands"
}
-# check if no other options are set
-is_standalone () {
- test $# -eq 2 -a "$2" = '--' &&
- test -z "$ONTO" &&
- test -z "$PRESERVE_MERGES" &&
- test -z "$STRATEGY" &&
- test -z "$VERBOSE"
-}
-
-get_saved_options () {
- test -d "$REWRITTEN" && PRESERVE_MERGES=t
- test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
- test -f "$DOTEST"/verbose && VERBOSE=t
- test -f "$DOTEST"/rebase-root && REBASE_ROOT=t
-}
-
# Rearrange the todo list that has both "pick sha1 msg" and
# "pick sha1 fixup!/squash! msg" appears in it so that the latter
# comes immediately after the former, and change "pick" to
rm -f "$1.sq" "$1.rearranged"
}
-LF='
-'
-parse_onto () {
- case "$1" in
- *...*)
- if left=${1%...*} right=${1#*...} &&
- onto=$(git merge-base --all ${left:-HEAD} ${right:-HEAD})
- then
- case "$onto" in
- ?*"$LF"?* | '')
- exit 1 ;;
- esac
- echo "$onto"
- exit 0
- fi
- esac
- git rev-parse --verify "$1^0"
-}
-
-while test $# != 0
-do
- case "$1" in
- --no-verify)
- OK_TO_SKIP_PRE_REBASE=yes
- ;;
- --verify)
- OK_TO_SKIP_PRE_REBASE=
- ;;
- --continue)
- is_standalone "$@" || usage
- get_saved_options
- comment_for_reflog continue
-
- test -d "$DOTEST" || die "No interactive rebase running"
-
- # Sanity check
- git rev-parse --verify HEAD >/dev/null ||
- die "Cannot read HEAD"
- git update-index --ignore-submodules --refresh &&
- git diff-files --quiet --ignore-submodules ||
- die "Working tree is dirty"
-
- # do we have anything to commit?
- if git diff-index --cached --quiet --ignore-submodules HEAD --
+case "$action" in
+continue)
+ # do we have anything to commit?
+ if git diff-index --cached --quiet --ignore-submodules HEAD --
+ then
+ : Nothing to commit -- skip this
+ else
+ . "$AUTHOR_SCRIPT" ||
+ die "Cannot find the author identity"
+ amend=
+ if test -f "$AMEND"
then
- : Nothing to commit -- skip this
- else
- . "$AUTHOR_SCRIPT" ||
- die "Cannot find the author identity"
- amend=
- if test -f "$AMEND"
- then
- amend=$(git rev-parse --verify HEAD)
- test "$amend" = $(cat "$AMEND") ||
- die "\
+ amend=$(git rev-parse --verify HEAD)
+ test "$amend" = $(cat "$AMEND") ||
+ die "\
You have uncommitted changes in your working tree. Please, commit them
first and then run 'git rebase --continue' again."
- git reset --soft HEAD^ ||
- die "Cannot rewind the HEAD"
- fi
- do_with_author git commit --no-verify -F "$MSG" -e || {
- test -n "$amend" && git reset --soft $amend
- die "Could not commit staged changes."
- }
+ git reset --soft HEAD^ ||
+ die "Cannot rewind the HEAD"
fi
+ do_with_author git commit --no-verify -F "$MSG" -e || {
+ test -n "$amend" && git reset --soft $amend
+ die "Could not commit staged changes."
+ }
+ fi
- record_in_rewritten "$(cat "$DOTEST"/stopped-sha)"
-
- require_clean_work_tree "rebase"
- do_rest
- ;;
- --abort)
- is_standalone "$@" || usage
- get_saved_options
- comment_for_reflog abort
-
- git rerere clear
- test -d "$DOTEST" || die "No interactive rebase running"
-
- HEADNAME=$(cat "$DOTEST"/head-name)
- HEAD=$(cat "$DOTEST"/head)
- case $HEADNAME in
- refs/*)
- git symbolic-ref HEAD $HEADNAME
- ;;
- esac &&
- output git reset --hard $HEAD &&
- rm -rf "$DOTEST"
- exit
- ;;
- --skip)
- is_standalone "$@" || usage
- get_saved_options
- comment_for_reflog skip
-
- git rerere clear
- test -d "$DOTEST" || die "No interactive rebase running"
-
- output git reset --hard && do_rest
- ;;
- -s)
- case "$#,$1" in
- *,*=*)
- STRATEGY="-s "$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
- 1,*)
- usage ;;
- *)
- STRATEGY="-s $2"
- shift ;;
- esac
- ;;
- -m)
- # we use merge anyway
- ;;
- -v)
- VERBOSE=t
- ;;
- -p)
- PRESERVE_MERGES=t
- ;;
- -i)
- # yeah, we know
- ;;
- --no-ff)
- NEVER_FF=t
- ;;
- --root)
- REBASE_ROOT=t
- ;;
- --autosquash)
- AUTOSQUASH=t
- ;;
- --no-autosquash)
- AUTOSQUASH=
- ;;
- --onto)
- shift
- ONTO=$(parse_onto "$1") ||
- die "Does not point to a valid commit: $1"
- ;;
- --)
- shift
- test -z "$REBASE_ROOT" -a $# -ge 1 -a $# -le 2 ||
- test ! -z "$REBASE_ROOT" -a $# -le 1 || usage
- test -d "$DOTEST" &&
- die "Interactive rebase already started"
-
- git var GIT_COMMITTER_IDENT >/dev/null ||
- die "You need to set your committer info first"
+ record_in_rewritten "$(cat "$state_dir"/stopped-sha)"
- if test -z "$REBASE_ROOT"
- then
- UPSTREAM_ARG="$1"
- UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
- test -z "$ONTO" && ONTO=$UPSTREAM
- shift
- else
- UPSTREAM=
- UPSTREAM_ARG=--root
- test -z "$ONTO" &&
- die "You must specify --onto when using --root"
- fi
- run_pre_rebase_hook "$UPSTREAM_ARG" "$@"
+ require_clean_work_tree "rebase"
+ do_rest
+ ;;
+skip)
+ git rerere clear
- comment_for_reflog start
+ do_rest
+ ;;
+esac
- require_clean_work_tree "rebase" "Please commit or stash them."
+git var GIT_COMMITTER_IDENT >/dev/null ||
+ die "You need to set your committer info first"
- if test ! -z "$1"
- then
- output git checkout "$1" ||
- die "Could not checkout $1"
- fi
+comment_for_reflog start
- HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
- mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
+if test ! -z "$switch_to"
+then
+ output git checkout "$switch_to" -- ||
+ die "Could not checkout $switch_to"
+fi
- : > "$DOTEST"/interactive || die "Could not mark as interactive"
- git symbolic-ref HEAD > "$DOTEST"/head-name 2> /dev/null ||
- echo "detached HEAD" > "$DOTEST"/head-name
+orig_head=$(git rev-parse --verify HEAD) || die "No HEAD?"
+mkdir "$state_dir" || die "Could not create temporary $state_dir"
- echo $HEAD > "$DOTEST"/head
- case "$REBASE_ROOT" in
- '')
- rm -f "$DOTEST"/rebase-root ;;
- *)
- : >"$DOTEST"/rebase-root ;;
- esac
- echo $ONTO > "$DOTEST"/onto
- test -z "$STRATEGY" || echo "$STRATEGY" > "$DOTEST"/strategy
- test t = "$VERBOSE" && : > "$DOTEST"/verbose
- if test t = "$PRESERVE_MERGES"
- then
- if test -z "$REBASE_ROOT"
- then
- mkdir "$REWRITTEN" &&
- for c in $(git merge-base --all $HEAD $UPSTREAM)
- do
- echo $ONTO > "$REWRITTEN"/$c ||
- die "Could not init rewritten commits"
- done
- else
- mkdir "$REWRITTEN" &&
- echo $ONTO > "$REWRITTEN"/root ||
- die "Could not init rewritten commits"
- fi
- # No cherry-pick because our first pass is to determine
- # parents to rewrite and skipping dropped commits would
- # prematurely end our probe
- MERGES_OPTION=
- first_after_upstream="$(git rev-list --reverse --first-parent $UPSTREAM..$HEAD | head -n 1)"
- else
- MERGES_OPTION="--no-merges --cherry-pick"
- fi
-
- SHORTHEAD=$(git rev-parse --short $HEAD)
- SHORTONTO=$(git rev-parse --short $ONTO)
- if test -z "$REBASE_ROOT"
- # this is now equivalent to ! -z "$UPSTREAM"
- then
- SHORTUPSTREAM=$(git rev-parse --short $UPSTREAM)
- REVISIONS=$UPSTREAM...$HEAD
- SHORTREVISIONS=$SHORTUPSTREAM..$SHORTHEAD
- else
- REVISIONS=$ONTO...$HEAD
- SHORTREVISIONS=$SHORTHEAD
- fi
- git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
- --abbrev=7 --reverse --left-right --topo-order \
- $REVISIONS | \
- sed -n "s/^>//p" |
- while read -r shortsha1 rest
+: > "$state_dir"/interactive || die "Could not mark as interactive"
+write_basic_state
+if test t = "$preserve_merges"
+then
+ if test -z "$rebase_root"
+ then
+ mkdir "$REWRITTEN" &&
+ for c in $(git merge-base --all $orig_head $upstream)
do
- if test t != "$PRESERVE_MERGES"
- then
- printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
- else
- sha1=$(git rev-parse $shortsha1)
- if test -z "$REBASE_ROOT"
- then
- preserve=t
- for p in $(git rev-list --parents -1 $sha1 | cut -d' ' -s -f2-)
- do
- if test -f "$REWRITTEN"/$p -a \( $p != $ONTO -o $sha1 = $first_after_upstream \)
- then
- preserve=f
- fi
- done
- else
- preserve=f
- fi
- if test f = "$preserve"
- then
- touch "$REWRITTEN"/$sha1
- printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
- fi
- fi
+ echo $onto > "$REWRITTEN"/$c ||
+ die "Could not init rewritten commits"
done
-
- # Watch for commits that been dropped by --cherry-pick
- if test t = "$PRESERVE_MERGES"
+ else
+ mkdir "$REWRITTEN" &&
+ echo $onto > "$REWRITTEN"/root ||
+ die "Could not init rewritten commits"
+ fi
+ # No cherry-pick because our first pass is to determine
+ # parents to rewrite and skipping dropped commits would
+ # prematurely end our probe
+ MERGES_OPTION=
+ first_after_upstream="$(git rev-list --reverse --first-parent $upstream..$orig_head | head -n 1)"
+else
+ MERGES_OPTION="--no-merges --cherry-pick"
+fi
+
+SHORTHEAD=$(git rev-parse --short $orig_head)
+SHORTONTO=$(git rev-parse --short $onto)
+if test -z "$rebase_root"
+ # this is now equivalent to ! -z "$upstream"
+then
+ SHORTUPSTREAM=$(git rev-parse --short $upstream)
+ REVISIONS=$upstream...$orig_head
+ SHORTREVISIONS=$SHORTUPSTREAM..$SHORTHEAD
+else
+ REVISIONS=$onto...$orig_head
+ SHORTREVISIONS=$SHORTHEAD
+fi
+git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
+ --abbrev=7 --reverse --left-right --topo-order \
+ $REVISIONS | \
+ sed -n "s/^>//p" |
+while read -r shortsha1 rest
+do
+ if test t != "$preserve_merges"
+ then
+ printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
+ else
+ sha1=$(git rev-parse $shortsha1)
+ if test -z "$rebase_root"
then
- mkdir "$DROPPED"
- # Save all non-cherry-picked changes
- git rev-list $REVISIONS --left-right --cherry-pick | \
- sed -n "s/^>//p" > "$DOTEST"/not-cherry-picks
- # Now all commits and note which ones are missing in
- # not-cherry-picks and hence being dropped
- git rev-list $REVISIONS |
- while read rev
+ preserve=t
+ for p in $(git rev-list --parents -1 $sha1 | cut -d' ' -s -f2-)
do
- if test -f "$REWRITTEN"/$rev -a "$(sane_grep "$rev" "$DOTEST"/not-cherry-picks)" = ""
+ if test -f "$REWRITTEN"/$p -a \( $p != $onto -o $sha1 = $first_after_upstream \)
then
- # Use -f2 because if rev-list is telling us this commit is
- # not worthwhile, we don't want to track its multiple heads,
- # just the history of its first-parent for others that will
- # be rebasing on top of it
- git rev-list --parents -1 $rev | cut -d' ' -s -f2 > "$DROPPED"/$rev
- short=$(git rev-list -1 --abbrev-commit --abbrev=7 $rev)
- sane_grep -v "^[a-z][a-z]* $short" <"$TODO" > "${TODO}2" ; mv "${TODO}2" "$TODO"
- rm "$REWRITTEN"/$rev
+ preserve=f
fi
done
+ else
+ preserve=f
+ fi
+ if test f = "$preserve"
+ then
+ touch "$REWRITTEN"/$sha1
+ printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
fi
+ fi
+done
- test -s "$TODO" || echo noop >> "$TODO"
- test -n "$AUTOSQUASH" && rearrange_squash "$TODO"
- cat >> "$TODO" << EOF
+# Watch for commits that been dropped by --cherry-pick
+if test t = "$preserve_merges"
+then
+ mkdir "$DROPPED"
+ # Save all non-cherry-picked changes
+ git rev-list $REVISIONS --left-right --cherry-pick | \
+ sed -n "s/^>//p" > "$state_dir"/not-cherry-picks
+ # Now all commits and note which ones are missing in
+ # not-cherry-picks and hence being dropped
+ git rev-list $REVISIONS |
+ while read rev
+ do
+ if test -f "$REWRITTEN"/$rev -a "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
+ then
+ # Use -f2 because if rev-list is telling us this commit is
+ # not worthwhile, we don't want to track its multiple heads,
+ # just the history of its first-parent for others that will
+ # be rebasing on top of it
+ git rev-list --parents -1 $rev | cut -d' ' -s -f2 > "$DROPPED"/$rev
+ short=$(git rev-list -1 --abbrev-commit --abbrev=7 $rev)
+ sane_grep -v "^[a-z][a-z]* $short" <"$TODO" > "${TODO}2" ; mv "${TODO}2" "$TODO"
+ rm "$REWRITTEN"/$rev
+ fi
+ done
+fi
+
+test -s "$TODO" || echo noop >> "$TODO"
+test -n "$autosquash" && rearrange_squash "$TODO"
+cat >> "$TODO" << EOF
# Rebase $SHORTREVISIONS onto $SHORTONTO
#
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
-# x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
+# x, exec = run command (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
EOF
- has_action "$TODO" ||
- die_abort "Nothing to do"
+has_action "$TODO" ||
+ die_abort "Nothing to do"
- cp "$TODO" "$TODO".backup
- git_editor "$TODO" ||
- die_abort "Could not execute editor"
+cp "$TODO" "$TODO".backup
+git_editor "$TODO" ||
+ die_abort "Could not execute editor"
- has_action "$TODO" ||
- die_abort "Nothing to do"
+has_action "$TODO" ||
+ die_abort "Nothing to do"
- test -d "$REWRITTEN" || test -n "$NEVER_FF" || skip_unnecessary_picks
+test -d "$REWRITTEN" || test -n "$force_rebase" || skip_unnecessary_picks
- output git checkout $ONTO || die_abort "could not detach HEAD"
- git update-ref ORIG_HEAD $HEAD
- do_rest
- ;;
- esac
- shift
-done
+output git checkout $onto || die_abort "could not detach HEAD"
+git update-ref ORIG_HEAD $orig_head
+do_rest
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
--- /dev/null
+++ b/git-rebase--merge.sh
@@ -0,0 +1,151 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Junio C Hamano.
+#
+
+. git-sh-setup
+
+prec=4
+
+read_state () {
+ onto_name=$(cat "$state_dir"/onto_name) &&
+ end=$(cat "$state_dir"/end) &&
+ msgnum=$(cat "$state_dir"/msgnum)
+}
+
+continue_merge () {
+ test -d "$state_dir" || die "$state_dir directory does not exist"
+
+ unmerged=$(git ls-files -u)
+ if test -n "$unmerged"
+ then
+ echo "You still have unmerged paths in your index"
+ echo "did you forget to use git add?"
+ die "$RESOLVEMSG"
+ fi
+
+ cmt=`cat "$state_dir/current"`
+ if ! git diff-index --quiet --ignore-submodules HEAD --
+ then
+ if ! git commit --no-verify -C "$cmt"
+ then
+ echo "Commit failed, please do not call \"git commit\""
+ echo "directly, but instead do one of the following: "
+ die "$RESOLVEMSG"
+ fi
+ if test -z "$GIT_QUIET"
+ then
+ printf "Committed: %0${prec}d " $msgnum
+ fi
+ echo "$cmt $(git rev-parse HEAD^0)" >> "$state_dir/rewritten"
+ else
+ if test -z "$GIT_QUIET"
+ then
+ printf "Already applied: %0${prec}d " $msgnum
+ fi
+ fi
+ test -z "$GIT_QUIET" &&
+ GIT_PAGER='' git log --format=%s -1 "$cmt"
+
+ # onto the next patch:
+ msgnum=$(($msgnum + 1))
+ echo "$msgnum" >"$state_dir/msgnum"
+}
+
+call_merge () {
+ cmt="$(cat "$state_dir/cmt.$1")"
+ echo "$cmt" > "$state_dir/current"
+ hd=$(git rev-parse --verify HEAD)
+ cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD)
+ msgnum=$(cat "$state_dir/msgnum")
+ eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
+ eval GITHEAD_$hd='$onto_name'
+ export GITHEAD_$cmt GITHEAD_$hd
+ if test -n "$GIT_QUIET"
+ then
+ GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY
+ fi
+ test -z "$strategy" && strategy=recursive
+ eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"'
+ rv=$?
+ case "$rv" in
+ 0)
+ unset GITHEAD_$cmt GITHEAD_$hd
+ return
+ ;;
+ 1)
+ git rerere $allow_rerere_autoupdate
+ die "$RESOLVEMSG"
+ ;;
+ 2)
+ echo "Strategy: $strategy failed, try another" 1>&2
+ die "$RESOLVEMSG"
+ ;;
+ *)
+ die "Unknown exit code ($rv) from command:" \
+ "git-merge-$strategy $cmt^ -- HEAD $cmt"
+ ;;
+ esac
+}
+
+finish_rb_merge () {
+ move_to_original_branch
+ git notes copy --for-rewrite=rebase < "$state_dir"/rewritten
+ if test -x "$GIT_DIR"/hooks/post-rewrite &&
+ test -s "$state_dir"/rewritten; then
+ "$GIT_DIR"/hooks/post-rewrite rebase < "$state_dir"/rewritten
+ fi
+ rm -r "$state_dir"
+ say All done.
+}
+
+case "$action" in
+continue)
+ read_state
+ continue_merge
+ while test "$msgnum" -le "$end"
+ do
+ call_merge "$msgnum"
+ continue_merge
+ done
+ finish_rb_merge
+ exit
+ ;;
+skip)
+ read_state
+ git rerere clear
+ msgnum=$(($msgnum + 1))
+ while test "$msgnum" -le "$end"
+ do
+ call_merge "$msgnum"
+ continue_merge
+ done
+ finish_rb_merge
+ exit
+ ;;
+esac
+
+mkdir -p "$state_dir"
+echo "$onto_name" > "$state_dir/onto_name"
+write_basic_state
+
+msgnum=0
+for cmt in `git rev-list --reverse --no-merges "$revisions"`
+do
+ msgnum=$(($msgnum + 1))
+ echo "$cmt" > "$state_dir/cmt.$msgnum"
+done
+
+echo 1 >"$state_dir/msgnum"
+echo $msgnum >"$state_dir/end"
+
+end=$msgnum
+msgnum=1
+
+while test "$msgnum" -le "$end"
+do
+ call_merge "$msgnum"
+ continue_merge
+done
+
+finish_rb_merge
diff --git a/git-rebase.sh b/git-rebase.sh
index d8e190302668ca352fd58cd052a677347a29cdcd..5ea7419ab844c7b77ecb3750490c9c9667ddf10e 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
If you would prefer to skip this patch, instead run \"git rebase --skip\".
To restore the original branch and stop rebasing run \"git rebase --abort\".
"
-unset newbase
-strategy=recursive
+unset onto
+strategy=
strategy_opts=
do_merge=
-dotest="$GIT_DIR"/rebase-merge
-prec=4
+merge_dir="$GIT_DIR"/rebase-merge
+apply_dir="$GIT_DIR"/rebase-apply
verbose=
diffstat=
test "$(git config --bool rebase.stat)" = true && diffstat=t
rebase_root=
force_rebase=
allow_rerere_autoupdate=
-
-continue_merge () {
- test -n "$prev_head" || die "prev_head must be defined"
- test -d "$dotest" || die "$dotest directory does not exist"
-
- unmerged=$(git ls-files -u)
- if test -n "$unmerged"
+# Non-empty if a rebase was in progress when 'git rebase' was invoked
+in_progress=
+# One of {am, merge, interactive}
+type=
+# One of {"$GIT_DIR"/rebase-apply, "$GIT_DIR"/rebase-merge}
+state_dir=
+# One of {'', continue, skip, abort}, as parsed from command line
+action=
+preserve_merges=
+autosquash=
+test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
+
+read_basic_state () {
+ head_name=$(cat "$state_dir"/head-name) &&
+ onto=$(cat "$state_dir"/onto) &&
+ if test "$type" = interactive
then
- echo "You still have unmerged paths in your index"
- echo "did you forget to use git add?"
- die "$RESOLVEMSG"
- fi
+ orig_head=$(cat "$state_dir"/head)
+ else
+ orig_head=$(cat "$state_dir"/orig-head)
+ fi &&
+ GIT_QUIET=$(cat "$state_dir"/quiet) &&
+ test -f "$state_dir"/verbose && verbose=t
+ test -f "$state_dir"/strategy && strategy="$(cat "$state_dir"/strategy)"
+ test -f "$state_dir"/strategy_opts &&
+ strategy_opts="$(cat "$state_dir"/strategy_opts)"
+ test -f "$state_dir"/allow_rerere_autoupdate &&
+ allow_rerere_autoupdate="$(cat "$state_dir"/allow_rerere_autoupdate)"
+}
- cmt=`cat "$dotest/current"`
- if ! git diff-index --quiet --ignore-submodules HEAD --
+write_basic_state () {
+ echo "$head_name" > "$state_dir"/head-name &&
+ echo "$onto" > "$state_dir"/onto &&
+ if test "$type" = interactive
then
- if ! git commit --no-verify -C "$cmt"
- then
- echo "Commit failed, please do not call \"git commit\""
- echo "directly, but instead do one of the following: "
- die "$RESOLVEMSG"
- fi
- if test -z "$GIT_QUIET"
- then
- printf "Committed: %0${prec}d " $msgnum
- fi
- echo "$cmt $(git rev-parse HEAD^0)" >> "$dotest/rewritten"
+ echo "$orig_head" > "$state_dir"/head
else
- if test -z "$GIT_QUIET"
- then
- printf "Already applied: %0${prec}d " $msgnum
- fi
- fi
- test -z "$GIT_QUIET" &&
- GIT_PAGER='' git log --format=%s -1 "$cmt"
-
- prev_head=`git rev-parse HEAD^0`
- # save the resulting commit so we can read-tree on it later
- echo "$prev_head" > "$dotest/prev_head"
-
- # onto the next patch:
- msgnum=$(($msgnum + 1))
- echo "$msgnum" >"$dotest/msgnum"
+ echo "$orig_head" > "$state_dir"/orig-head
+ fi &&
+ echo "$GIT_QUIET" > "$state_dir"/quiet &&
+ test t = "$verbose" && : > "$state_dir"/verbose
+ test -n "$strategy" && echo "$strategy" > "$state_dir"/strategy
+ test -n "$strategy_opts" && echo "$strategy_opts" > \
+ "$state_dir"/strategy_opts
+ test -n "$allow_rerere_autoupdate" && echo "$allow_rerere_autoupdate" > \
+ "$state_dir"/allow_rerere_autoupdate
}
-call_merge () {
- cmt="$(cat "$dotest/cmt.$1")"
- echo "$cmt" > "$dotest/current"
- hd=$(git rev-parse --verify HEAD)
- cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD)
- msgnum=$(cat "$dotest/msgnum")
- end=$(cat "$dotest/end")
- eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
- eval GITHEAD_$hd='$(cat "$dotest/onto_name")'
- export GITHEAD_$cmt GITHEAD_$hd
- if test -n "$GIT_QUIET"
- then
- GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY
- fi
- eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"'
- rv=$?
- case "$rv" in
- 0)
- unset GITHEAD_$cmt GITHEAD_$hd
- return
- ;;
- 1)
- git rerere $allow_rerere_autoupdate
- die "$RESOLVEMSG"
- ;;
- 2)
- echo "Strategy: $rv $strategy failed, try another" 1>&2
- die "$RESOLVEMSG"
+output () {
+ case "$verbose" in
+ '')
+ output=$("$@" 2>&1 )
+ status=$?
+ test $status != 0 && printf "%s\n" "$output"
+ return $status
;;
*)
- die "Unknown exit code ($rv) from command:" \
- "git-merge-$strategy $cmt^ -- HEAD $cmt"
+ "$@"
;;
esac
}
move_to_original_branch () {
- test -z "$head_name" &&
- head_name="$(cat "$dotest"/head-name)" &&
- onto="$(cat "$dotest"/onto)" &&
- orig_head="$(cat "$dotest"/orig-head)"
case "$head_name" in
refs/*)
message="rebase finished: $head_name onto $onto"
esac
}
-finish_rb_merge () {
- move_to_original_branch
- git notes copy --for-rewrite=rebase < "$dotest"/rewritten
- if test -x "$GIT_DIR"/hooks/post-rewrite &&
- test -s "$dotest"/rewritten; then
- "$GIT_DIR"/hooks/post-rewrite rebase < "$dotest"/rewritten
- fi
- rm -r "$dotest"
- say All done.
-}
-
-is_interactive () {
- while test $# != 0
- do
- case "$1" in
- -i|--interactive)
- interactive_rebase=explicit
- break
- ;;
- -p|--preserve-merges)
- interactive_rebase=implied
- ;;
- esac
- shift
- done
-
+run_specific_rebase () {
if [ "$interactive_rebase" = implied ]; then
GIT_EDITOR=:
export GIT_EDITOR
fi
-
- test -n "$interactive_rebase" || test -f "$dotest"/interactive
+ export onto autosquash strategy strategy_opts verbose rebase_root \
+ force_rebase action preserve_merges upstream switch_to head_name \
+ state_dir orig_head onto_name GIT_QUIET revisions RESOLVEMSG \
+ allow_rerere_autoupdate git_am_opt type
+ export -f move_to_original_branch output write_basic_state
+ exec git-rebase--$type
}
run_pre_rebase_hook () {
fi
}
-test -f "$GIT_DIR"/rebase-apply/applying &&
+test -f "$apply_dir"/applying &&
die 'It looks like git-am is in progress. Cannot rebase.'
-is_interactive "$@" && exec git-rebase--interactive "$@"
+if test -d "$apply_dir"
+then
+ type=am
+ state_dir="$apply_dir"
+elif test -d "$merge_dir"
+then
+ if test -f "$merge_dir"/interactive
+ then
+ type=interactive
+ interactive_rebase=explicit
+ else
+ type=merge
+ fi
+ state_dir="$merge_dir"
+fi
+test -n "$type" && in_progress=t
+total_argc=$#
while test $# != 0
do
case "$1" in
--verify)
OK_TO_SKIP_PRE_REBASE=
;;
- --continue)
- test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
- die "No rebase in progress?"
-
- git update-index --ignore-submodules --refresh &&
- git diff-files --quiet --ignore-submodules || {
- echo "You must edit all merge conflicts and then"
- echo "mark them as resolved using git add"
- exit 1
- }
- if test -d "$dotest"
- then
- prev_head=$(cat "$dotest/prev_head")
- end=$(cat "$dotest/end")
- msgnum=$(cat "$dotest/msgnum")
- onto=$(cat "$dotest/onto")
- GIT_QUIET=$(cat "$dotest/quiet")
- continue_merge
- while test "$msgnum" -le "$end"
- do
- call_merge "$msgnum"
- continue_merge
- done
- finish_rb_merge
- exit
- fi
- head_name=$(cat "$GIT_DIR"/rebase-apply/head-name) &&
- onto=$(cat "$GIT_DIR"/rebase-apply/onto) &&
- orig_head=$(cat "$GIT_DIR"/rebase-apply/orig-head) &&
- GIT_QUIET=$(cat "$GIT_DIR"/rebase-apply/quiet)
- git am --resolved --3way --resolvemsg="$RESOLVEMSG" &&
- move_to_original_branch
- exit
- ;;
- --skip)
- test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
- die "No rebase in progress?"
-
- git reset --hard HEAD || exit $?
- if test -d "$dotest"
- then
- git rerere clear
- prev_head=$(cat "$dotest/prev_head")
- end=$(cat "$dotest/end")
- msgnum=$(cat "$dotest/msgnum")
- msgnum=$(($msgnum + 1))
- onto=$(cat "$dotest/onto")
- GIT_QUIET=$(cat "$dotest/quiet")
- while test "$msgnum" -le "$end"
- do
- call_merge "$msgnum"
- continue_merge
- done
- finish_rb_merge
- exit
- fi
- head_name=$(cat "$GIT_DIR"/rebase-apply/head-name) &&
- onto=$(cat "$GIT_DIR"/rebase-apply/onto) &&
- orig_head=$(cat "$GIT_DIR"/rebase-apply/orig-head) &&
- GIT_QUIET=$(cat "$GIT_DIR"/rebase-apply/quiet)
- git am -3 --skip --resolvemsg="$RESOLVEMSG" &&
- move_to_original_branch
- exit
- ;;
- --abort)
- test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
- die "No rebase in progress?"
-
- git rerere clear
-
- test -d "$dotest" || dotest="$GIT_DIR"/rebase-apply
-
- head_name="$(cat "$dotest"/head-name)" &&
- case "$head_name" in
- refs/*)
- git symbolic-ref HEAD $head_name ||
- die "Could not move back to $head_name"
- ;;
- esac
- git reset --hard $(cat "$dotest/orig-head")
- rm -r "$dotest"
- exit
+ --continue|--skip|--abort)
+ test $total_argc -eq 1 || usage
+ action=${1##--}
;;
--onto)
test 2 -le "$#" || usage
- newbase="$2"
+ onto="$2"
shift
;;
+ -i|--interactive)
+ interactive_rebase=explicit
+ ;;
+ -p|--preserve-merges)
+ preserve_merges=t
+ test -z "$interactive_rebase" && interactive_rebase=implied
+ ;;
+ --autosquash)
+ autosquash=t
+ ;;
+ --no-autosquash)
+ autosquash=
+ ;;
-M|-m|--m|--me|--mer|--merg|--merge)
do_merge=t
;;
esac
strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$newopt")"
do_merge=t
+ test -z "$strategy" && strategy=recursive
;;
-s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\
--strateg=*|--strategy=*|\
done
test $# -gt 2 && usage
-if test $# -eq 0 && test -z "$rebase_root"
+if test -n "$action"
then
- test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply || usage
- test -d "$dotest" -o -f "$GIT_DIR"/rebase-apply/rebasing &&
- die 'A rebase is in progress, try --continue, --skip or --abort.'
+ test -z "$in_progress" && die "No rebase in progress?"
+ # Only interactive rebase uses detailed reflog messages
+ if test "$type" = interactive && test "$GIT_REFLOG_ACTION" = rebase
+ then
+ GIT_REFLOG_ACTION="rebase -i ($action)"
+ export GIT_REFLOG_ACTION
+ fi
fi
-# Make sure we do not have $GIT_DIR/rebase-apply
-if test -z "$do_merge"
+case "$action" in
+continue)
+ # Sanity check
+ git rev-parse --verify HEAD >/dev/null ||
+ die "Cannot read HEAD"
+ git update-index --ignore-submodules --refresh &&
+ git diff-files --quiet --ignore-submodules || {
+ echo "You must edit all merge conflicts and then"
+ echo "mark them as resolved using git add"
+ exit 1
+ }
+ read_basic_state
+ run_specific_rebase
+ ;;
+skip)
+ output git reset --hard HEAD || exit $?
+ read_basic_state
+ run_specific_rebase
+ ;;
+abort)
+ git rerere clear
+ read_basic_state
+ case "$head_name" in
+ refs/*)
+ git symbolic-ref HEAD $head_name ||
+ die "Could not move back to $head_name"
+ ;;
+ esac
+ output git reset --hard $orig_head
+ rm -r "$state_dir"
+ exit
+ ;;
+esac
+
+# Make sure no rebase is in progress
+if test -n "$in_progress"
then
- if mkdir "$GIT_DIR"/rebase-apply 2>/dev/null
- then
- rmdir "$GIT_DIR"/rebase-apply
- else
- echo >&2 '
-It seems that I cannot create a rebase-apply directory, and
-I wonder if you are in the middle of patch application or another
-rebase. If that is not the case, please
- rm -fr '"$GIT_DIR"'/rebase-apply
+ die '
+It seems that there is already a '"${state_dir##*/}"' directory, and
+I wonder if you are in the middle of another rebase. If that is the
+case, please try
+ git rebase (--continue | --abort | --skip)
+If that is not the case, please
+ rm -fr '"$state_dir"'
and run me again. I am stopping in case you still have something
valuable there.'
- exit 1
- fi
-else
- if test -d "$dotest"
- then
- die "previous rebase directory $dotest still exists." \
- 'Try git rebase (--continue | --abort | --skip)'
- fi
fi
-require_clean_work_tree "rebase" "Please commit or stash them."
+test $# -eq 0 && test -z "$rebase_root" && usage
+
+if test -n "$interactive_rebase"
+then
+ type=interactive
+ state_dir="$merge_dir"
+elif test -n "$do_merge"
+then
+ type=merge
+ state_dir="$merge_dir"
+else
+ type=am
+ state_dir="$apply_dir"
+fi
if test -z "$rebase_root"
then
shift
upstream=`git rev-parse --verify "${upstream_name}^0"` ||
die "invalid upstream $upstream_name"
- unset root_flag
upstream_arg="$upstream_name"
else
- test -z "$newbase" && die "--root must be used with --onto"
+ test -z "$onto" && die "You must specify --onto when using --root"
unset upstream_name
unset upstream
- root_flag="--root"
- upstream_arg="$root_flag"
+ upstream_arg=--root
fi
# Make sure the branch to rebase onto is valid.
-onto_name=${newbase-"$upstream_name"}
+onto_name=${onto-"$upstream_name"}
case "$onto_name" in
*...*)
if left=${onto_name%...*} right=${onto_name#*...} &&
fi
;;
*)
- onto=$(git rev-parse --verify "${onto_name}^0") || exit
+ onto=$(git rev-parse --verify "${onto_name}^0") ||
+ die "Does not point to a valid commit: $1"
;;
esac
-# If a hook exists, give it a chance to interrupt
-run_pre_rebase_hook "$upstream_arg" "$@"
-
# If the branch to rebase is given, that is the branch we will rebase
# $branch_name -- branch being rebased, or HEAD (already detached)
# $orig_head -- commit object name of tip of the branch before rebasing
switch_to="$1"
if git show-ref --verify --quiet -- "refs/heads/$1" &&
- branch=$(git rev-parse -q --verify "refs/heads/$1")
+ orig_head=$(git rev-parse -q --verify "refs/heads/$1")
then
head_name="refs/heads/$1"
- elif branch=$(git rev-parse -q --verify "$1")
+ elif orig_head=$(git rev-parse -q --verify "$1")
then
head_name="detached HEAD"
else
+ echo >&2 "fatal: no such branch: $1"
usage
fi
;;
head_name="detached HEAD"
branch_name=HEAD ;# detached
fi
- branch=$(git rev-parse --verify "${branch_name}^0") || exit
+ orig_head=$(git rev-parse --verify "${branch_name}^0") || exit
;;
esac
-orig_head=$branch
-# Now we are rebasing commits $upstream..$branch (or with --root,
-# everything leading up to $branch) on top of $onto
+require_clean_work_tree "rebase" "Please commit or stash them."
+
+# Now we are rebasing commits $upstream..$orig_head (or with --root,
+# everything leading up to $orig_head) on top of $onto
# Check if we are already based on $onto with linear history,
-# but this should be done only when upstream and onto are the same.
-mb=$(git merge-base "$onto" "$branch")
-if test "$upstream" = "$onto" && test "$mb" = "$onto" &&
+# but this should be done only when upstream and onto are the same
+# and if this is not an interactive rebase.
+mb=$(git merge-base "$onto" "$orig_head")
+if test "$type" != interactive && test "$upstream" = "$onto" &&
+ test "$mb" = "$onto" &&
# linear history?
- ! (git rev-list --parents "$onto".."$branch" | sane_grep " .* ") > /dev/null
+ ! (git rev-list --parents "$onto".."$orig_head" | sane_grep " .* ") > /dev/null
then
if test -z "$force_rebase"
then
# Lazily switch to the target branch if needed...
- test -z "$switch_to" || git checkout "$switch_to"
+ test -z "$switch_to" || git checkout "$switch_to" --
say "Current branch $branch_name is up to date."
exit 0
else
fi
fi
-# Detach HEAD and reset the tree
-say "First, rewinding head to replay your work on top of it..."
-git checkout -q "$onto^0" || die "could not detach HEAD"
-git update-ref ORIG_HEAD $branch
+# If a hook exists, give it a chance to interrupt
+run_pre_rebase_hook "$upstream_arg" "$@"
if test -n "$diffstat"
then
GIT_PAGER='' git diff --stat --summary "$mb" "$onto"
fi
+test "$type" = interactive && run_specific_rebase
+
+# Detach HEAD and reset the tree
+say "First, rewinding head to replay your work on top of it..."
+git checkout -q "$onto^0" || die "could not detach HEAD"
+git update-ref ORIG_HEAD $orig_head
+
# If the $onto is a proper descendant of the tip of the branch, then
# we just fast-forwarded.
-if test "$mb" = "$branch"
+if test "$mb" = "$orig_head"
then
say "Fast-forwarded $branch_name to $onto_name."
move_to_original_branch
revisions="$upstream..$orig_head"
fi
-if test -z "$do_merge"
-then
- git format-patch -k --stdout --full-index --ignore-if-in-upstream \
- --src-prefix=a/ --dst-prefix=b/ \
- --no-renames $root_flag "$revisions" |
- git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
- move_to_original_branch
- ret=$?
- test 0 != $ret -a -d "$GIT_DIR"/rebase-apply &&
- echo $head_name > "$GIT_DIR"/rebase-apply/head-name &&
- echo $onto > "$GIT_DIR"/rebase-apply/onto &&
- echo $orig_head > "$GIT_DIR"/rebase-apply/orig-head &&
- echo "$GIT_QUIET" > "$GIT_DIR"/rebase-apply/quiet
- exit $ret
-fi
-
-# start doing a rebase with git-merge
-# this is rename-aware if the recursive (default) strategy is used
-
-mkdir -p "$dotest"
-echo "$onto" > "$dotest/onto"
-echo "$onto_name" > "$dotest/onto_name"
-prev_head=$orig_head
-echo "$prev_head" > "$dotest/prev_head"
-echo "$orig_head" > "$dotest/orig-head"
-echo "$head_name" > "$dotest/head-name"
-echo "$GIT_QUIET" > "$dotest/quiet"
-
-msgnum=0
-for cmt in `git rev-list --reverse --no-merges "$revisions"`
-do
- msgnum=$(($msgnum + 1))
- echo "$cmt" > "$dotest/cmt.$msgnum"
-done
-
-echo 1 >"$dotest/msgnum"
-echo $msgnum >"$dotest/end"
-
-end=$msgnum
-msgnum=1
-
-while test "$msgnum" -le "$end"
-do
- call_merge "$msgnum"
- continue_merge
-done
-
-finish_rb_merge
+run_specific_rebase
diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
--- /dev/null
+++ b/git-sh-i18n.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+# This is Git's interface to gettext.sh. See po/README for usage
+# instructions.
+
+# Export the TEXTDOMAIN* data that we need for Git
+TEXTDOMAIN=git
+export TEXTDOMAIN
+if [ -z "$GIT_TEXTDOMAINDIR" ]
+then
+ TEXTDOMAINDIR="@@LOCALEDIR@@"
+else
+ TEXTDOMAINDIR="$GIT_TEXTDOMAINDIR"
+fi
+export TEXTDOMAINDIR
+
+if test -z "$GIT_INTERNAL_GETTEXT_GETTEXT_POISON"
+then
+ if test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" && type gettext.sh >/dev/null 2>&1
+ then
+ # This is GNU libintl's gettext.sh, we don't need to do anything
+ # else than setting up the environment and loading gettext.sh
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+ # Try to use libintl's gettext.sh, or fall back to English if we
+ # can't.
+ . gettext.sh
+ elif test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" && test "$(gettext -h 2>&1)" = "-h"
+ then
+ # We don't have gettext.sh, but there's a gettext binary in our
+ # path. This is probably Solaris or something like it which has a
+ # gettext implementation that isn't GNU libintl.
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=solaris
+ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+ # Solaris has a gettext(1) but no eval_gettext(1)
+ eval_gettext () {
+ gettext_out=$(gettext "$1")
+ gettext_eval="printf '%s' \"$gettext_out\""
+ printf "%s" "`eval \"$gettext_eval\"`"
+ }
+ else
+ # Since gettext.sh isn't available we'll have to define our own
+ # dummy pass-through functions.
+
+ # Tell our tests that we don't have the real gettext.sh
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+ gettext () {
+ printf "%s" "$1"
+ }
+
+ eval_gettext () {
+ gettext_eval="printf '%s' \"$1\""
+ printf "%s" "`eval \"$gettext_eval\"`"
+ }
+ fi
+else
+ # Emit garbage under GETTEXT_POISON=YesPlease. Unlike the C tests
+ # this relies on an environment variable
+
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=poison
+ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+ gettext () {
+ printf "%s" "# GETTEXT POISON #"
+ }
+
+ eval_gettext () {
+ printf "%s" "# GETTEXT POISON #"
+ }
+fi
diff --git a/git-stash.sh b/git-stash.sh
index 7561b374d2ec90fe774e98e39a121a1a3a3cdfa9..717ee3c5e3fa64c7c5554dc1afbf0674b3ed1b6d 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
. git-sh-setup
+. git-sh-i18n
require_work_tree
cd_to_toplevel
clear_stash () {
if test $# != 0
then
- die "git stash clear with parameters is unimplemented"
+ die "$(gettext "git stash clear with parameters is unimplemented")"
fi
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
then
head=$(git rev-list --oneline -n 1 HEAD --)
else
- die "You do not have the initial commit yet"
+ die "$(gettext "You do not have the initial commit yet")"
fi
if branch=$(git symbolic-ref -q HEAD)
i_tree=$(git write-tree) &&
i_commit=$(printf 'index on %s\n' "$msg" |
git commit-tree $i_tree -p $b_commit) ||
- die "Cannot save the current index state"
+ die "$(gettext "Cannot save the current index state")"
if test -z "$patch_mode"
then
git write-tree &&
rm -f "$TMP-index"
) ) ||
- die "Cannot save the current worktree state"
+ die "$(gettext "Cannot save the current worktree state")"
else
# state of the working tree
w_tree=$(GIT_INDEX_FILE="$TMP-index" git write-tree) ||
- die "Cannot save the current worktree state"
+ die "$(gettext "Cannot save the current worktree state")"
git diff-tree -p HEAD $w_tree > "$TMP-patch" &&
test -s "$TMP-patch" ||
- die "No changes selected"
+ die "$(gettext "No changes selected")"
rm -f "$TMP-index" ||
- die "Cannot remove temporary index (can't happen)"
+ die "$(gettext "Cannot remove temporary index (can't happen)")"
fi
fi
w_commit=$(printf '%s\n' "$stash_msg" |
git commit-tree $w_tree -p $b_commit -p $i_commit) ||
- die "Cannot record working tree state"
+ die "$(gettext "Cannot record working tree state")"
}
save_stash () {
break
;;
-*)
- echo "error: unknown option for 'stash save': $1"
- echo " To provide a message, use git stash save -- '$1'"
+ option="$1"
+ # TRANSLATORS: $option is an invalid option, like
+ # `--blah-blah'. The 7 spaces at the beginning of the
+ # second line correspond to "error: ". So you should line
+ # up the second line with however many characters the
+ # translation of "error: " takes in your language.
+ eval_gettext "$("error: unknown option for 'stash save': \$option
+ To provide a message, use git stash save -- '\$option'")"; echo
usage
;;
*)
git update-index -q --refresh
if no_changes
then
- say 'No local changes to save'
+ say "$(gettext "No local changes to save")"
exit 0
fi
test -f "$GIT_DIR/logs/$ref_stash" ||
- clear_stash || die "Cannot initialize stash"
+ clear_stash || die "$(gettext "Cannot initialize stash")"
create_stash "$stash_msg"
: >>"$GIT_DIR/logs/$ref_stash"
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
- die "Cannot save the current status"
+ die "$(gettext "Cannot save the current status")"
say Saved working directory and index state "$stash_msg"
if test -z "$patch_mode"
fi
else
git apply -R < "$TMP-patch" ||
- die "Cannot remove worktree changes"
+ die "$(gettext "Cannot remove worktree changes")"
if test -z "$keep_index"
then
case $# in
0)
- have_stash || die "No stash found."
+ have_stash || die "$(gettext "No stash found.")"
set -- ${ref_stash}@{0}
;;
1)
:
;;
*)
- die "Too many revisions specified: $REV"
+ die "$(eval_gettext "Too many revisions specified: \$REV")"
;;
esac
- REV=$(git rev-parse --quiet --symbolic --verify $1 2>/dev/null) || die "$1 is not valid reference"
+ REV=$(git rev-parse --quiet --symbolic --verify $1 2>/dev/null) || {
+ reference="$1"
+ die "$(eval_gettext "\$reference is not valid reference")"
+ }
i_commit=$(git rev-parse --quiet --verify $REV^2 2>/dev/null) &&
set -- $(git rev-parse $REV $REV^1 $REV: $REV^1: $REV^2: 2>/dev/null) &&
# this condition with a non-zero status code but as of 1.7.2.1 it
# it did not. So, we use non-empty stderr output as a proxy for the
# condition of interest.
- test -z "$(git rev-parse "$REV" 2>&1 >/dev/null)" || die "$REV does not exist in the stash log"
+ test -z "$(git rev-parse "$REV" 2>&1 >/dev/null)" || die "$(eval_gettext "\$REV does not exist in the stash log")"
fi
}
}
assert_stash_like() {
- is_stash_like "$@" || die "'$*' is not a stash-like commit"
+ is_stash_like "$@" || {
+ args="$*"
+ die "$(eval_gettext "'\$args' is not a stash-like commit")"
+ }
}
is_stash_ref() {
}
assert_stash_ref() {
- is_stash_ref "$@" || die "'$*' is not a stash reference"
+ is_stash_ref "$@" || {
+ args="$*"
+ die "$(eval_gettext "'\$args' is not a stash reference")"
+ }
}
apply_stash () {
git update-index -q --refresh &&
git diff-files --quiet --ignore-submodules ||
- die 'Cannot apply to a dirty working tree, please stage your changes'
+ die "$(gettext "Cannot apply to a dirty working tree, please stage your changes")"
# current index state
c_tree=$(git write-tree) ||
- die 'Cannot apply a stash in the middle of a merge'
+ die "$(gettext "Cannot apply a stash in the middle of a merge")"
unstashed_index_tree=
if test -n "$INDEX_OPTION" && test "$b_tree" != "$i_tree" &&
then
git diff-tree --binary $s^2^..$s^2 | git apply --cached
test $? -ne 0 &&
- die 'Conflicts in index. Try without --index.'
+ die "$(gettext "Conflicts in index. Try without --index.")"
unstashed_index_tree=$(git write-tree) ||
- die 'Could not save index tree'
+ die "$(gettext "Could not save index tree")"
git reset
fi
git diff-index --cached --name-only --diff-filter=A $c_tree >"$a" &&
git read-tree --reset $c_tree &&
git update-index --add --stdin <"$a" ||
- die "Cannot unstage modified files"
+ die "$(gettext "Cannot unstage modified files")"
rm -f "$a"
fi
squelch=
status=$?
if test -n "$INDEX_OPTION"
then
- echo >&2 'Index was not unstashed.'
+ echo >&2 "$(gettext "Index was not unstashed.")"
fi
exit $status
fi
assert_stash_ref "$@"
git reflog delete --updateref --rewrite "${REV}" &&
- say "Dropped ${REV} ($s)" || die "${REV}: Could not drop stash entry"
+ say "$(eval_gettext "Dropped \${REV} (\$s)")" ||
+ die "$(eval_gettext "\${REV}: Could not drop stash entry")"
# clear_stash if we just dropped the last stash entry
git rev-parse --verify "$ref_stash@{0}" > /dev/null 2>&1 || clear_stash
}
apply_to_branch () {
- test -n "$1" || die 'No branch name specified'
+ test -n "$1" || die "$(gettext "No branch name specified")"
branch=$1
shift 1
case $# in
0)
save_stash &&
- say '(To restore them type "git stash apply")'
+ say "$(gettext "(To restore them type \"git stash apply\")")"
;;
*)
usage
diff --git a/git-submodule.sh b/git-submodule.sh
index 8b9058971767dbb4d94e996876f6ba7ed178ddd6..37f8bfab8130d9c38fc167220c0cadebebc7f1f7 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
or: $dashless [--quiet] sync [--] [<path>...]"
OPTIONS_SPEC=
. git-sh-setup
+. git-sh-i18n
. git-parse-remote
require_work_tree
{
remote=$(get_default_remote)
remoteurl=$(git config "remote.$remote.url") ||
- die "remote ($remote) does not have a url defined in .git/config"
+ die "$(eval_gettext "remote (\$remote) does not have a url defined in .git/config")"
url="$1"
remoteurl=${remoteurl%/}
sep=/
name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )
test -z "$name" &&
- die "No submodule mapping found in .gitmodules for path '$path'"
+ die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")"
echo "$name"
}
else
git-clone -n "$url" "$path"
fi ||
- die "Clone of '$url' into submodule path '$path' failed"
+ die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
}
#
realrepo=$repo
;;
*)
- die "repo URL: '$repo' must be absolute or begin with ./|../"
+ die "$(eval_gettext "repo URL: '\$repo' must be absolute or begin with ./|../")"
;;
esac
s|/*$||
')
git ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
- die "'$path' already exists in the index"
+ die "$(eval_gettext "'\$path' already exists in the index")"
if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
then
- echo >&2 "The following path is ignored by one of your .gitignore files:" &&
- echo >&2 $path &&
- echo >&2 "Use -f if you really want to add it."
+ echo >&2 "$(eval_gettext "The following path is ignored by one of your .gitignore files:
+\$path
+Use -f if you really want to add it.")"
exit 1
fi
then
if test -d "$path"/.git -o -f "$path"/.git
then
- echo "Adding existing repo at '$path' to the index"
+ echo "$(eval_gettext "Adding existing repo at '\$path' to the index")"
else
- die "'$path' already exists and is not a valid git repo"
+ die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
fi
case "$repo" in
'') git checkout -f -q ;;
?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
esac
- ) || die "Unable to checkout submodule '$path'"
+ ) || die "$(eval_gettext "Unable to checkout submodule '\$path'")"
fi
git add $force "$path" ||
- die "Failed to add submodule '$path'"
+ die "$(eval_gettext "Failed to add submodule '\$path'")"
git config -f .gitmodules submodule."$path".path "$path" &&
git config -f .gitmodules submodule."$path".url "$repo" &&
git add --force .gitmodules ||
- die "Failed to register submodule '$path'"
+ die "$(eval_gettext "Failed to register submodule '\$path'")"
}
#
do
if test -e "$path"/.git
then
- say "Entering '$prefix$path'"
+ say "$(eval_gettext "Entering '\$prefix\$path'")"
name=$(module_name "$path")
(
prefix="$prefix$path/"
cmd_foreach "--recursive" "$@"
fi
) ||
- die "Stopping at '$path'; script returned non-zero status."
+ die "$(eval_gettext "Stopping at '\$path'; script returned non-zero status.")"
fi
done
}
url=$(git config -f .gitmodules submodule."$name".url)
test -z "$url" &&
- die "No url found for submodule path '$path' in .gitmodules"
+ die "$(eval_gettext "No url found for submodule path '\$path' in .gitmodules")"
# Possibly a url relative to parent
case "$url" in
esac
git config submodule."$name".url "$url" ||
- die "Failed to register url for submodule path '$path'"
+ die "$(eval_gettext "Failed to register url for submodule path '\$path'")"
upd="$(git config -f .gitmodules submodule."$name".update)"
test -z "$upd" ||
git config submodule."$name".update "$upd" ||
- die "Failed to register update mode for submodule path '$path'"
+ die "$(eval_gettext "Failed to register update mode for submodule path '\$path'")"
- say "Submodule '$name' ($url) registered for path '$path'"
+ say "$(eval_gettext "Submodule '\$name' (\$url) registered for path '\$path'")"
done
}
# Only mention uninitialized submodules when its
# path have been specified
test "$#" != "0" &&
- say "Submodule path '$path' not initialized" &&
- say "Maybe you want to use 'update --init'?"
+ say "$(eval_gettext "Submodule path '\$path' not initialized
+Maybe you want to use 'update --init'?")"
continue
fi
else
subsha1=$(clear_local_git_env; cd "$path" &&
git rev-parse --verify HEAD) ||
- die "Unable to find current revision in submodule path '$path'"
+ die "$(eval_gettext "Unable to find current revision in submodule path '\$path'")"
fi
if ! test -z "$update"
then
(clear_local_git_env; cd "$path" &&
git-fetch) ||
- die "Unable to fetch in submodule path '$path'"
+ die "$(eval_gettext "Unable to fetch in submodule path '\$path'")"
fi
case "$update_module" in
rebase)
command="git rebase"
- action="rebase"
- msg="rebased onto"
+ die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+ say_msg="$(eval_gettext "Submodule path '\$path': rebased into '\$sha1'")"
;;
merge)
command="git merge"
- action="merge"
- msg="merged in"
+ die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+ say_msg="$(eval_gettext "Submodule path '\$path': merged in '\$sha1'")"
;;
*)
command="git checkout $force -q"
- action="checkout"
- msg="checked out"
+ die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+ say_msg="$(eval_gettext "Submodule path '\$path': checked out '\$sha1'")"
;;
esac
- (clear_local_git_env; cd "$path" && $command "$sha1") ||
- die "Unable to $action '$sha1' in submodule path '$path'"
- say "Submodule path '$path': $msg '$sha1'"
+ (clear_local_git_env; cd "$path" && $command "$sha1") || die $die_msg
+ say $say_msg
fi
if test -n "$recursive"
then
- (clear_local_git_env; cd "$path" && eval cmd_update "$orig_flags") ||
- die "Failed to recurse into submodule path '$path'"
+ (clear_local_git_env; cd "$path" && eval cmd_update $orig_args) ||
+ die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
fi
done
}
if [ -n "$files" ]
then
test -n "$cached" &&
- die "--cached cannot be used with --files"
+ die "$(gettext -- "--cached cannot be used with --files")"
diff_cmd=diff-files
head=
fi
;; # removed
*)
# unexpected type
- echo >&2 "unexpected mode $mod_dst"
+ echo >&2 "$(eval_gettext "unexpected mode \$mod_dst")"
continue ;;
esac
fi
total_commits=
case "$missing_src,$missing_dst" in
t,)
- errmsg=" Warn: $name doesn't contain commit $sha1_src"
+ errmsg="$(eval_gettext " Warn: \$name doesn't contain commit \$sha1_src")"
;;
,t)
- errmsg=" Warn: $name doesn't contain commit $sha1_dst"
+ errmsg="$(eval_gettext " Warn: \$name doesn't contain commit \$sha1_dst")"
;;
t,t)
- errmsg=" Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
+ errmsg="$(eval_gettext " Warn: \$name doesn't contain commits \$sha1_src and \$sha1_dst")"
;;
*)
errmsg=
sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7)
if test $status = T
then
+ blob="$(gettext "blob")"
+ submodule="$(gettext "submodule")"
if test $mod_dst = 160000
then
- echo "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:"
+ echo "* $name $sha1_abbr_src($blob)->$sha1_abbr_dst($submodule)$total_commits:"
else
- echo "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:"
+ echo "* $name $sha1_abbr_src($submodule)->$sha1_abbr_dst($blob)$total_commits:"
fi
else
echo "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:"
done |
if test -n "$for_status"; then
if [ -n "$files" ]; then
- echo "# Submodules changed but not updated:"
+ gettext "# Submodules changed but not updated:"; echo
else
- echo "# Submodule changes to be committed:"
+ gettext "# Submodule changes to be committed:"; echo
fi
echo "#"
sed -e 's|^|# |' -e 's|^# $|#|'
cd "$path" &&
eval cmd_status "$orig_args"
) ||
- die "Failed to recurse into submodule path '$path'"
+ die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
fi
done
}
;;
esac
- say "Synchronizing submodule url for '$name'"
+ say "$(eval_gettext "Synchronizing submodule url for '\$name'")"
git config submodule."$name".url "$url"
if test -e "$path"/.git
index 68334f6a3134bb76a8ffc59e4da773400c59a388..a9ff1d37a678c4c72c539e6d18b9b773378b0731 100644 (file)
--- a/git.c
+++ b/git.c
#include "help.h"
#include "quote.h"
#include "run-command.h"
+#include "gettext.h"
const char git_usage_string[] =
"git [--version] [--exec-path[=<path>]] [--html-path]\n"
alias_string = alias_lookup(alias_command);
if (alias_string) {
if (alias_string[0] == '!') {
+ const char **alias_argv;
+ int argc = *argcp, i;
+
commit_pager_choice();
- if (*argcp > 1) {
- struct strbuf buf;
-
- strbuf_init(&buf, PATH_MAX);
- strbuf_addstr(&buf, alias_string);
- sq_quote_argv(&buf, (*argv) + 1, PATH_MAX);
- free(alias_string);
- alias_string = buf.buf;
- }
- trace_printf("trace: alias to shell cmd: %s => %s\n",
- alias_command, alias_string + 1);
- ret = system(alias_string + 1);
- if (ret >= 0 && WIFEXITED(ret) &&
- WEXITSTATUS(ret) != 127)
- exit(WEXITSTATUS(ret));
- die("Failed to run '%s' when expanding alias '%s'",
- alias_string + 1, alias_command);
+
+ /* build alias_argv */
+ alias_argv = xmalloc(sizeof(*alias_argv) * (argc + 1));
+ alias_argv[0] = alias_string + 1;
+ for (i = 1; i < argc; ++i)
+ alias_argv[i] = (*argv)[i];
+ alias_argv[argc] = NULL;
+
+ ret = run_command_v_opt(alias_argv, RUN_USING_SHELL);
+ if (ret >= 0) /* normal exit */
+ exit(ret);
+
+ die_errno("While expanding alias '%s': '%s'",
+ alias_command, alias_string + 1);
}
count = split_cmdline(alias_string, &new_argv);
if (count < 0)
{ "verify-pack", cmd_verify_pack },
{ "show-ref", cmd_show_ref, RUN_SETUP },
{ "pack-refs", cmd_pack_refs, RUN_SETUP },
+ { "skew", cmd_skew, RUN_SETUP },
};
int i;
static const char ext[] = STRIP_EXTENSION;
if (!cmd)
cmd = "git-help";
+ git_setup_gettext();
+
/*
* "git-xxxx" is the same as "git xxxx", but we obviously:
*
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1025c2f7165a7941ac8d13bff0e693cb3783b475..0779f12d6178c23a47f4b9a08152176d0e19a2a8 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
close $fd;
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
quote_command($highlight_bin).
- " --xhtml --fragment --syntax $syntax |"
+ " --fragment --syntax $syntax |"
or die_error(500, "Couldn't open file or run syntax highlighter");
return $fd;
}
diff --git a/http-backend.c b/http-backend.c
index 85015048dd466fb2f2afe12086379ecf579d0a56..95f2464aa97c7c7e1f9ef7f009435e1b411ccd75 100644 (file)
--- a/http-backend.c
+++ b/http-backend.c
#include "run-command.h"
#include "string-list.h"
#include "url.h"
+#include "gettext.h"
static const char content_type[] = "Content-Type";
static const char content_length[] = "Content-Length";
char *cmd_arg = NULL;
int i;
+ git_setup_gettext();
+
git_extract_argv0_path(argv[0]);
set_die_routine(die_webcgi);
diff --git a/http-fetch.c b/http-fetch.c
index 923904f97f9274d09a0a0b08543492f78a141f79..bb8989793cc584c47ab7f9513e2500523668442d 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
#include "exec_cmd.h"
#include "http.h"
#include "walker.h"
+#include "gettext.h"
static const char http_fetch_usage[] = "git http-fetch "
"[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url";
int get_verbosely = 0;
int get_recover = 0;
+ git_setup_gettext();
+
git_extract_argv0_path(argv[0]);
while (arg < argc && argv[arg][0] == '-') {
diff --git a/http-push.c b/http-push.c
index ff41a0e183dd3a449f5136c6d1488a31b4a8960b..4ec3741cb0ea581c79725dd845da1a1057d313bb 100644 (file)
--- a/http-push.c
+++ b/http-push.c
#include "remote.h"
#include "list-objects.h"
#include "sigchain.h"
+#include "gettext.h"
#include <expat.h>
struct ref *ref, *local_refs;
struct remote *remote;
+ git_setup_gettext();
+
git_extract_argv0_path(argv[0]);
repo = xcalloc(sizeof(*repo), 1);
diff --git a/imap-send.c b/imap-send.c
index 71506a8dd3ed07fe44c487a644ce9a42b94a7578..c9dc7ecd555866dc4d1441f62b318c4c9708fdd0 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
#include "cache.h"
#include "exec_cmd.h"
#include "run-command.h"
+#include "gettext.h"
#ifdef NO_OPENSSL
typedef void *SSL;
#else
git_extract_argv0_path(argv[0]);
+ git_setup_gettext();
+
if (argc != 1)
usage(imap_send_usage);
diff --git a/list-objects.c b/list-objects.c
index 8953548c07bb36f20798c7ca344d07960c22618c..61f6cc98d917c3e4395ec397ac74df6a40eeb07f 100644 (file)
--- a/list-objects.c
+++ b/list-objects.c
struct tree *tree,
show_object_fn show,
struct name_path *path,
+ struct strbuf *base,
const char *name)
{
struct object *obj = &tree->object;
struct tree_desc desc;
struct name_entry entry;
struct name_path me;
+ int all_interesting = (revs->diffopt.pathspec.nr == 0);
+ int baselen = base->len;
if (!revs->tree_objects)
return;
me.elem = name;
me.elem_len = strlen(name);
+ if (!all_interesting) {
+ strbuf_addstr(base, name);
+ if (base->len)
+ strbuf_addch(base, '/');
+ }
+
init_tree_desc(&desc, tree->buffer, tree->size);
while (tree_entry(&desc, &entry)) {
+ if (!all_interesting) {
+ int showit = tree_entry_interesting(&entry,
+ base, 0,
+ &revs->diffopt.pathspec);
+
+ if (showit < 0)
+ break;
+ else if (!showit)
+ continue;
+ else if (showit == 2)
+ all_interesting = 1;
+ }
+
if (S_ISDIR(entry.mode))
process_tree(revs,
lookup_tree(entry.sha1),
- show, &me, entry.path);
+ show, &me, base, entry.path);
else if (S_ISGITLINK(entry.mode))
process_gitlink(revs, entry.sha1,
show, &me, entry.path);
lookup_blob(entry.sha1),
show, &me, entry.path);
}
+ strbuf_setlen(base, baselen);
free(tree->buffer);
tree->buffer = NULL;
}
{
int i;
struct commit *commit;
+ struct strbuf base;
+ strbuf_init(&base, PATH_MAX);
while ((commit = get_revision(revs)) != NULL) {
add_pending_tree(revs, commit->tree);
show_commit(commit, data);
}
if (obj->type == OBJ_TREE) {
process_tree(revs, (struct tree *)obj, show_object,
- NULL, name);
+ NULL, &base, name);
continue;
}
if (obj->type == OBJ_BLOB) {
revs->pending.alloc = 0;
revs->pending.objects = NULL;
}
+ strbuf_release(&base);
}
diff --git a/ll-merge.c b/ll-merge.c
index 007dd3e4d38ff657a29a06e559173b796f193763..6ce512efc4cce8042481e8a6947d033c272e78e6 100644 (file)
--- a/ll-merge.c
+++ b/ll-merge.c
const struct ll_merge_options *opts)
{
static struct git_attr_check check[2];
+ static const struct ll_merge_options default_opts;
const char *ll_driver_name = NULL;
int marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
const struct ll_merge_driver *driver;
- if (!opts) {
- struct ll_merge_options default_opts = {0};
- return ll_merge(result_buf, path, ancestor, ancestor_label,
- ours, our_label, theirs, their_label,
- &default_opts);
- }
+ if (!opts)
+ opts = &default_opts;
if (opts->renormalize) {
normalize_file(ancestor, path);
diff --git a/merge-recursive.h b/merge-recursive.h
index c8135b0ec70cc2eb92e5a6fd9353a134fda6b7bf..981ed6ac94b5ed73f15a3b0dca723586374ca0b8 100644 (file)
--- a/merge-recursive.h
+++ b/merge-recursive.h
int parse_merge_opt(struct merge_options *out, const char *s);
/* builtin/merge.c */
-int try_merge_command(const char *strategy, struct commit_list *common, const char *head_arg, struct commit_list *remotes);
+int try_merge_command(const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
+ const char *head_arg, struct commit_list *remotes);
#endif
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
--- /dev/null
+++ b/perl/Git/I18N.pm
@@ -0,0 +1,91 @@
+package Git::I18N;
+use 5.006002;
+use strict;
+use warnings;
+use Exporter;
+use base 'Exporter';
+
+our $VERSION = '0.01';
+
+our @EXPORT = qw(__);
+our @EXPORT_OK = @EXPORT;
+
+sub __bootstrap_locale_messages {
+ our $TEXTDOMAIN = 'git';
+ our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '++LOCALEDIR++';
+
+ require POSIX;
+ POSIX->import(qw(setlocale));
+ # Non-core prerequisite module
+ require Locale::Messages;
+ Locale::Messages->import(qw(:locale_h :libintl_h));
+
+ setlocale(LC_MESSAGES(), '');
+ setlocale(LC_CTYPE(), '');
+ textdomain($TEXTDOMAIN);
+ bindtextdomain($TEXTDOMAIN => $TEXTDOMAINDIR);
+
+ return;
+}
+
+BEGIN
+{
+ # Used by our test script to see if it should test fallbacks or
+ # not.
+ our $__HAS_LIBRARY = 1;
+
+ local $@;
+ eval { __bootstrap_locale_messages() };
+ if ($@) {
+ # Tell test.pl that we couldn't load the gettext library.
+ $Git::I18N::__HAS_LIBRARY = 0;
+
+ # Just a fall-through no-op
+ *__ = sub ($) { $_[0] };
+ } else {
+ *__ = \&Locale::Messages::gettext;
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Git::I18N - Perl interface to Git's Gettext localizations
+
+=head1 SYNOPSIS
+
+ use Git::I18N;
+
+ print __("Welcome to Git!\n");
+
+ printf __("The following error occured: %s\n"), $error;
+
+=head1 DESCRIPTION
+
+Git's internal Perl interface to gettext via L<Locale::Messages>. If
+L<Locale::Messages> can't be loaded (it's not a core module) we
+provide stub passthrough fallbacks.
+
+This is a distilled interface to gettext, see C<info '(gettext)Perl'>
+for the full interface. This module implements only a small part of
+it.
+
+=head1 FUNCTIONS
+
+=head2 __($)
+
+L<Locale::Messages>'s gettext function if all goes well, otherwise our
+passthrough fallback function.
+
+=head1 AUTHOR
+
+E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avarab@gmail.com>
+
+=head1 COPYRIGHT
+
+Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avarab@gmail.com>
+
+=cut
diff --git a/perl/Makefile b/perl/Makefile
index a2ffb6402d45420dff4dcd545dfa08b57305d8cd..b2977cd0bc8f23d75a228ca13d6cb42e1c72628f 100644 (file)
--- a/perl/Makefile
+++ b/perl/Makefile
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
prefix_SQ = $(subst ','\'',$(prefix))
+localedir_SQ = $(subst ','\'',$(localedir))
ifndef V
QUIET = @
echo ' echo $(instdir_SQ)' >> $@
else
$(makfile): Makefile.PL ../GIT-CFLAGS
- $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE=''
+ $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
endif
# this is just added comfort for calling make directly in perl dir
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 0b9deca2cc6ef77897a23b2096a7acdd577c2482..456d45bf4092467e290ce478ceb8032938a01aac 100644 (file)
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
+use strict;
+use warnings;
use ExtUtils::MakeMaker;
+use Getopt::Long;
+
+# Sanity: die at first unknown option
+Getopt::Long::Configure qw/ pass_through /;
+
+GetOptions("localedir=s" => \my $localedir);
sub MY::postamble {
return <<'MAKE_FRAG';
MAKE_FRAG
}
-my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
+my %pm = (
+ 'Git.pm' => '$(INST_LIBDIR)/Git.pm',
+ 'Git/I18N.pm' => '$(INST_LIBDIR)/Git/I18N.pm',
+);
# We come with our own bundled Error.pm. It's not in the set of default
# Perl modules so install it if it's not available on the system yet.
NAME => 'Git',
VERSION_FROM => 'Git.pm',
PM => \%pm,
+ PM_FILTER => qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
MAKEFILE => 'perl.mak',
INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
);
diff --git a/po/README b/po/README
--- /dev/null
+++ b/po/README
@@ -0,0 +1,209 @@
+Core GIT Translations
+=====================
+
+This directory holds the translations for the core of Git. This
+document describes how to add to and maintain these translations, and
+how to mark source strings for translation.
+
+
+Generating a .pot file
+----------------------
+
+The po/git.pot file contains a message catalog extracted from Git's
+sources. You need to generate it to add new translations with
+msginit(1), or update existing ones with msgmerge(1).
+
+Since the file can be automatically generated it's not checked into
+git.git. To generate it do, at the top-level:
+
+ make pot
+
+
+Initializing a .po file
+-----------------------
+
+To add a new translation first generate git.pot (see above) and then
+in the po/ directory do:
+
+ msginit --locale=XX
+
+Where XX is your locale, e.g. "is", "de" or "pt_BR".
+
+Then edit the automatically generated copyright info in your new XX.po
+to be correct, e.g. for Icelandic:
+
+ @@ -1,6 +1,6 @@
+ -# Icelandic translations for PACKAGE package.
+ -# Copyright (C) 2010 THE PACKAGE'S COPYRIGHT HOLDER
+ -# This file is distributed under the same license as the PACKAGE package.
+ +# Icelandic translations for Git.
+ +# Copyright (C) 2010 Ævar Arnfjörð Bjarmason <avarab@gmail.com>
+ +# This file is distributed under the same license as the Git package.
+ # Ævar Arnfjörð Bjarmason <avarab@gmail.com>, 2010.
+
+And change references to PACKAGE VERSION in the PO Header Entry to
+just "Git":
+
+ perl -pi -e 's/(?<="Project-Id-Version: )PACKAGE VERSION/Git/' XX.po
+
+
+Updating a .po file
+-------------------
+
+If there's an existing *.po file for your language but you need to
+update the translation you first need to generate git.pot (see above)
+and then in the po/ directory do:
+
+ msgmerge --add-location --backup=off -U XX.po git.pot
+
+Where XX.po is the file you want to update.
+
+Testing your changes
+--------------------
+
+Before you submit your changes go back to the top-level and do:
+
+ make
+
+On systems with GNU gettext (i.e. not Solaris) this will compile your
+changed PO file with `msgfmt --check`, the --check option flags many
+common errors, e.g. missing printf format strings, or translated
+messages that deviate from the originals in whether they begin/end
+with a newline or not.
+
+
+Marking strings for translation
+-------------------------------
+
+Before strings can be translated they first have to be marked for
+translation.
+
+Git uses an internationalization interface that wraps the system's
+gettext library, so most of the advice in your gettext documentation
+(on GNU systems `info gettext` in a terminal) applies.
+
+General advice:
+
+ - Don't mark everything for translation, only strings which will be
+ read by humans (the porcelain interface) should be translated.
+
+ The output from Git's plumbing utilities will primarily be read by
+ programs and would break scripts under non-C locales if it was
+ translated. Plumbing strings should not be translated, since
+ they're part of Git's API.
+
+ - Adjust the strings so that they're easy to translate. Most of the
+ advice in `info '(gettext)Preparing Strings'` applies here.
+
+ - If something is unclear or ambiguous you can use a "TRANSLATORS"
+ comment to tell the translators what to make of it. These will be
+ extracted by xgettext(1) and put in the po/*.po files, e.g. from
+ git-am.sh:
+
+ # TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+ # in your translation. The program will only accept English
+ # input at this point.
+ gettext "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+
+ Or in C, from builtin/revert.c:
+
+ /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+ die(_("%s: Unable to write new index file"), me);
+
+We provide wrappers for C, Shell and Perl programs. Here's how they're
+used:
+
+C:
+
+ - Include builtin.h at the top, it'll pull in in gettext.h, which
+ defines the gettext interface. Consult with the list if you need to
+ use gettext.h directly.
+
+ - The C interface is a subset of the normal GNU gettext
+ interface. We currently export these functions:
+
+ - _()
+
+ Mark and translate a string. E.g.:
+
+ printf(_("HEAD is now at %s"), hex);
+
+ - N_()
+
+ A no-op pass-through macro for marking strings inside static
+ initializations, e.g.:
+
+ static const char *reset_type_names[] = {
+ N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
+ };
+
+ And then, later:
+
+ die(_("%s reset is not allowed in a bare repository"),
+ _(reset_type_names[reset_type]));
+
+ Here _() couldn't have statically determined what the translation
+ string will be, but since it was already marked for translation
+ with N_() the look-up in the message catalog will succeed.
+
+Shell:
+
+ - The Git gettext shell interface is just a wrapper for
+ gettext.sh. Import it right after git-sh-setup like this:
+
+ . git-sh-setup
+ . git-sh-i18n
+
+ And then use the gettext or eval_gettext functions:
+
+ # For constant interface messages:
+ gettext "A message for the user"; echo
+
+ # To interpolate variables:
+ details="oh noes"
+ eval_gettext "An error occured: \$details"; echo
+
+ More documentation about the interface is available in the GNU info
+ page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell
+ command to be translated) for examples is also useful:
+
+ git log --reverse -p --grep=gettextize git-am.sh
+
+Perl:
+
+ - The Git::I18N module provides a limited subset of the
+ Locale::Messages functionality, e.g.:
+
+ use Git::I18N;
+ print __("Welcome to Git!\n");
+ printf __("The following error occured: %s\n"), $error;
+
+ Run `perldoc perl/Git/I18N.pm` for more info.
+
+
+Testing marked strings
+----------------------
+
+Even if you've correctly marked porcelain strings for translation
+something in the test suite might still depend on the US English
+version of the strings, e.g. to grep some error message or other
+output.
+
+To smoke out issues like these Git can be compiled with gettext poison
+support, at the top-level:
+
+ make GETTEXT_POISON=YesPlease
+
+That'll give you a git which emits gibberish on every call to
+gettext. It's obviously not meant to be installed, but you should run
+the test suite with it:
+
+ cd t && prove -j 9 ./t[0-9]*.sh
+
+If tests break with it you should inspect them manually and see if
+what you're translating is sane, i.e. that you're not translating
+plumbing output.
+
+If not you should add a NO_GETTEXT_POISON prerequisite to the test (as
+documented in t/README). See existing test files with this
+prerequisite for examples.
diff --git a/po/de.po b/po/de.po
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,3609 @@
+# German translations for Git.
+# Copyright (C) 2010 Jan Krüger <jk@jk.gs>
+# This file is distributed under the same license as the Git package.
+# Jan Krüger <jk@jk.gs>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-10-30 07:35+0000\n"
+"PO-Revision-Date: 2010-10-29 15:20+0100\n"
+"Last-Translator: Jan Engelhardt <jengelh@medozas.de>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: wt-status.c:56
+msgid "# Unmerged paths:"
+msgstr "# Verbleibende Konflikte in Pfaden:"
+
+#: wt-status.c:62 wt-status.c:79
+#, c-format
+msgid "# (use \"git reset %s <file>...\" to unstage)"
+msgstr ""
+"# (verwende `git reset %s <Datei>`, um die Änderungen nicht mehr "
+"vorzumerken)"
+
+#: wt-status.c:64 wt-status.c:81
+msgid "# (use \"git rm --cached <file>...\" to unstage)"
+msgstr ""
+"# (verwende `git rm --cached <Datei>`, um die Datei nicht mehr vorzumerken)"
+
+#: wt-status.c:65
+msgid "# (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr ""
+"# (verwende `git add/rm <Datei>...`, um Konflikte als gelöst zu markieren)"
+
+#: wt-status.c:73
+msgid "# Changes to be committed:"
+msgstr "# Vorgemerkte Änderungen für den nächsten Commit:"
+
+#: wt-status.c:91
+msgid "# Changed but not updated:"
+msgstr "# Geändert, aber nicht für den nächsten Commit vorgemerkt:"
+
+#: wt-status.c:95
+msgid "# (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+"# (verwende `git add <Datei>...`, um den aktuellen Stand vorzumerken)"
+
+#: wt-status.c:97
+msgid "# (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+"# (verwende entsprechend `git add/rm <Datei>...`, um den aktuellen Stand "
+"vorzumerken)"
+
+#: wt-status.c:98
+msgid ""
+"# (use \"git checkout -- <file>...\" to discard changes in working "
+"directory)"
+msgstr ""
+"# (verwende `git checkout -- <Datei>...`, um Änderungen in der Datei zu "
+"verwerfen)"
+
+#: wt-status.c:100
+msgid "# (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+"# (committe oder verwerfe die unberücksichtigten Dateien oder Änderungen "
+"in Submodulen)"
+
+#: wt-status.c:109
+#, c-format
+msgid "# %s files:"
+msgstr "# %s Dateien:"
+
+#: wt-status.c:112
+#, c-format
+msgid "# (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+"# (verwende `git %s <Datei>...`, um zu vorgemerkten Dateien hinzuzufügen)"
+
+#: wt-status.c:129
+msgid "bug"
+msgstr "Bug"
+
+#: wt-status.c:134
+msgid "both deleted:"
+msgstr "beide gelöscht:"
+
+#: wt-status.c:135
+msgid "added by us:"
+msgstr "hier hinzugefügt:"
+
+#: wt-status.c:136
+msgid "deleted by them:"
+msgstr "dort gelöscht:"
+
+#: wt-status.c:137
+msgid "added by them:"
+msgstr "dort hinzugefügt:"
+
+#: wt-status.c:138
+msgid "deleted by us:"
+msgstr "hier gelöscht:"
+
+#: wt-status.c:139
+msgid "both added:"
+msgstr "bei beiden hinzugefügt:"
+
+#: wt-status.c:140
+msgid "both modified:"
+msgstr "bei beiden geändert:"
+
+#: wt-status.c:170
+msgid "new commits, "
+msgstr "neue Commits, "
+
+#: wt-status.c:172
+msgid "modified content, "
+msgstr "veränderte Dateien, "
+
+#: wt-status.c:174
+msgid "untracked content, "
+msgstr "unberücksichtigte Dateien, "
+
+#: wt-status.c:188
+#, c-format
+msgid "new file: %s"
+msgstr "neue Datei: %s"
+
+#: wt-status.c:191
+#, c-format
+msgid "copied: %s -> %s"
+msgstr "kopiert: %s -> %s"
+
+#: wt-status.c:194
+#, c-format
+msgid "deleted: %s"
+msgstr "gelöscht: %s"
+
+#: wt-status.c:197
+#, c-format
+msgid "modified: %s"
+msgstr "geändert: %s"
+
+#: wt-status.c:200
+#, c-format
+msgid "renamed: %s -> %s"
+msgstr "umbenannt: %s -> %s"
+
+#: wt-status.c:203
+#, c-format
+msgid "typechange: %s"
+msgstr "neuer Typ: %s"
+
+#: wt-status.c:206
+#, c-format
+msgid "unknown: %s"
+msgstr "unbekannt: %s"
+
+#: wt-status.c:209
+#, c-format
+msgid "unmerged: %s"
+msgstr "Konflikt: %s"
+
+#: wt-status.c:212
+#, c-format
+msgid "bug: unhandled diff status %c"
+msgstr "Bug: nicht behandelter Diff-Status %c"
+
+#: wt-status.c:631
+msgid "On branch "
+msgstr "Auf Branch: "
+
+#: wt-status.c:638
+msgid "Not currently on any branch."
+msgstr "Gegenwärtig auf keiner Branch."
+
+#: wt-status.c:648
+msgid "# Initial commit"
+msgstr "# Erster Commit"
+
+#: wt-status.c:662
+msgid "Untracked"
+msgstr "Unberücksichtigte"
+
+#: wt-status.c:664
+msgid "Ignored"
+msgstr "Ignorierte"
+
+#: wt-status.c:666
+#, c-format
+msgid "# Untracked files not listed%s\n"
+msgstr "# Unberücksichtigte Dateien werden nicht aufgeführt%s\n"
+
+#: wt-status.c:668
+msgid " (use -u option to show untracked files)"
+msgstr " (verwende die Option -u, um unberücksichtigte Dateien anzuzeigen)"
+
+#: wt-status.c:674
+#, c-format
+msgid "# No changes\n"
+msgstr "# Keine Änderungen\n"
+
+#: wt-status.c:678
+#, c-format
+msgid "no changes added to commit%s\n"
+msgstr "keine Änderungen für den Commit vorgemerkt%s\n"
+
+#: wt-status.c:680
+msgid " (use \"git add\" and/or \"git commit -a\")"
+msgstr " (verwende `git add` und/oder `git commit -a`)"
+
+#: wt-status.c:682
+#, c-format
+msgid "nothing added to commit but untracked files present%s\n"
+msgstr ""
+"keine Änderungen für den Commit vorgemerkt, aber unberücksichtigte Dateien "
+"vorhanden%s\n"
+
+#: wt-status.c:684
+msgid " (use \"git add\" to track)"
+msgstr " (verwende `git add`, um sie zu berücksichtigen)"
+
+#: wt-status.c:686 wt-status.c:689 wt-status.c:692
+#, c-format
+msgid "nothing to commit%s\n"
+msgstr "nichts zu committen%s\n"
+
+#: wt-status.c:687
+msgid " (create/copy files and use \"git add\" to track)"
+msgstr " (erstelle Dateien und verwende `git add`, um sie zu berücksichtigen)"
+
+#: wt-status.c:690
+msgid " (use -u to show untracked files)"
+msgstr " (verwende -u, um unberücksichtigte Datei anzuzeigen)"
+
+#: wt-status.c:693
+msgid " (working directory clean)"
+msgstr " (Arbeitsverzeichnis sauber)"
+
+#: wt-status.c:791
+msgid "HEAD (no branch)"
+msgstr "HEAD (keine Branch)"
+
+#: wt-status.c:797
+msgid "Initial commit on "
+msgstr "Erster Commit auf "
+
+#: wt-status.c:812
+msgid "behind "
+msgstr "hinterher um "
+
+#: wt-status.c:815 wt-status.c:818
+msgid "ahead "
+msgstr "voraus um "
+
+#: wt-status.c:820
+msgid ", behind "
+msgstr ", hinterher um"
+
+#: builtin/add.c:41
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "unerwarteter Diff-Status %c"
+
+#: builtin/add.c:67 builtin/commit.c:244
+msgid "updating files failed"
+msgstr "Aktualisieren der Dateien ist fehlgeschlagen"
+
+#: builtin/add.c:77
+#, c-format
+msgid "remove '%s'\n"
+msgstr "entferne \"%s\"\n"
+
+#: builtin/add.c:175
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "Pfad \"%s\" ist im Submodul \"%.*s\""
+
+#: builtin/add.c:191
+msgid "Unstaged changes after refreshing the index:"
+msgstr "Nicht vorgemerkte Änderungen nach Aktualisierung des Index:"
+
+#: builtin/add.c:194 builtin/add.c:452 builtin/rm.c:194
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr "Pfadangabe \"%s\" passt auf keine Dateien"
+
+#: builtin/add.c:208
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "\"%s\" befindet sich jenseits eines symbolischen Links"
+
+#: builtin/add.c:275
+msgid "Could not read the index"
+msgstr "Konnte den Index nicht auslesen"
+
+#: builtin/add.c:284
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Konnte \"%s\" nicht zum Schreiben öffnen."
+
+#: builtin/add.c:288
+msgid "Could not write patch"
+msgstr "Konnte Patch nicht erstellen"
+
+#: builtin/add.c:293
+#, c-format
+msgid "Could not stat '%s'"
+msgstr "Konnte \"%s\" nicht finden/prüfen"
+
+#: builtin/add.c:295
+msgid "Empty patch. Aborted."
+msgstr "Leerer Patch. Breche ab."
+
+#: builtin/add.c:301
+#, c-format
+msgid "Could not apply '%s'"
+msgstr "Konnte \"%s\" nicht anwenden"
+
+#: builtin/add.c:349
+#, c-format
+msgid "Use -f if you really want to add them.\n"
+msgstr "Benutze -f, wenn sie wirklich hinzufügt werden sollen.\n"
+
+#: builtin/add.c:350
+msgid "no files added"
+msgstr "keine Dateien hinzugefügt"
+
+#: builtin/add.c:356
+msgid "adding files failed"
+msgstr "Das Hinzufügen der Dateien ist fehlgeschlagen"
+
+#: builtin/add.c:388
+msgid "-A and -u are mutually incompatible"
+msgstr "-A kann nicht mit -u kombiniert werden"
+
+#: builtin/add.c:390
+msgid "Option --ignore-missing can only be used together with --dry-run"
+msgstr "Option --ignore-missing kann nur zusammen mit --dry-run benutzt werden"
+
+#: builtin/add.c:410
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr "Nichts angegeben, nichts hinzugefügt.\n"
+
+#: builtin/add.c:411
+#, c-format
+msgid "Maybe you wanted to say 'git add .'?\n"
+msgstr "Vielleicht war `git add .` gewollt?\n"
+
+#: builtin/add.c:417 builtin/clean.c:95 builtin/commit.c:301
+#: builtin/commit.c:310 builtin/mv.c:77 builtin/rm.c:171
+msgid "index file corrupt"
+msgstr "Indexdatei beschädigt"
+
+#: builtin/add.c:468 builtin/mv.c:223 builtin/rm.c:268
+msgid "Unable to write new index file"
+msgstr "Konnte neue Indexdatei nicht anlegen"
+
+#: builtin/archive.c:17
+#, c-format
+msgid "could not create archive file '%s'"
+msgstr "konnte Archivdatei \"%s\" nicht anlegen"
+
+#: builtin/archive.c:20
+msgid "could not redirect output"
+msgstr "konnte Ausgabe nicht umleiten"
+
+#: builtin/archive.c:36
+msgid "git archive: Remote with no URL"
+msgstr "git archive: Remote ohne URL"
+
+#: builtin/archive.c:46
+msgid "git archive: expected ACK/NAK, got EOF"
+msgstr "git archive: ACK/NAK erwartet, bekam aber EOF"
+
+#: builtin/archive.c:51
+#, c-format
+msgid "git archive: NACK %s"
+msgstr "get archive: NACK %s"
+
+#: builtin/archive.c:52
+msgid "git archive: protocol error"
+msgstr "git archive: Protokollfehler"
+
+#: builtin/archive.c:57
+msgid "git archive: expected a flush"
+msgstr "git archive: Flush erwartet"
+
+#: builtin/branch.c:136
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but it is not yet merged to HEAD."
+msgstr ""
+"lösche Branch \"%s\", die zwar bereits in \"%s\" gemerged wurde, aber noch "
+"nicht in HEAD ist."
+
+#: builtin/branch.c:140
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD."
+msgstr ""
+"Branch \"%s\" wird nicht gelöscht, da noch nicht in \"%s\" gemerged, obwohl "
+"bereits in HEAD gemerged."
+
+#. TRANSLATORS: This is "remote " in "remote branch '%s' not found"
+#: builtin/branch.c:161
+msgid "remote "
+msgstr "Remote-"
+
+#: builtin/branch.c:169
+msgid "cannot use -a with -d"
+msgstr "-a kann nicht mit -d kombiniert werden"
+
+#: builtin/branch.c:175
+msgid "Couldn't look up commit object for HEAD"
+msgstr "Konnte Commit-Objekt für HEAD nicht finden"
+
+#: builtin/branch.c:180
+#, c-format
+msgid "Cannot delete the branch '%s' which you are currently on."
+msgstr "Aktive Branch \"%s\" nicht löschbar."
+
+#: builtin/branch.c:190
+#, c-format
+msgid "%sbranch '%s' not found."
+msgstr "%sBranch \"%s\" nicht gefunden."
+
+#: builtin/branch.c:198
+#, c-format
+msgid "Couldn't look up commit object for '%s'"
+msgstr "Konnte Commit-Objekt für \"%s\" nicht finden"
+
+#: builtin/branch.c:204
+#, c-format
+msgid ""
+"The branch '%s' is not fully merged.\n"
+"If you are sure you want to delete it, run 'git branch -D %s'."
+msgstr ""
+"Die Branch \"%s\" ist nicht komplett gemerged.\n"
+"Löschung mittels `git branch -D %s` erzwingbar."
+
+#: builtin/branch.c:212
+#, c-format
+msgid "Error deleting %sbranch '%s'"
+msgstr "Fehler beim Löschen von %sBranch \"%s\""
+
+#: builtin/branch.c:217
+#, c-format
+msgid "Deleted %sbranch %s (was %s).\n"
+msgstr "%sBranch \"%s\" gelöscht (war %s).\n"
+
+#: builtin/branch.c:222
+msgid "Update of config-file failed"
+msgstr "Konfigurationsdatei konnte nicht aktualisiert werden"
+
+#: builtin/branch.c:304
+#, c-format
+msgid "branch '%s' does not point at a commit"
+msgstr "Branch \"%s\" zeigt nicht auf einen Commit"
+
+#: builtin/branch.c:381
+#, c-format
+msgid "behind %d] "
+msgstr "um %d hinterher] "
+
+#: builtin/branch.c:383
+#, c-format
+msgid "ahead %d] "
+msgstr "um %d voraus] "
+
+#: builtin/branch.c:385
+#, c-format
+msgid "ahead %d, behind %d] "
+msgstr "um %d voraus, um %d hinterher] "
+
+#: builtin/branch.c:484
+msgid "(no branch)"
+msgstr "(keine Branch)"
+
+#: builtin/branch.c:544
+msgid "some refs could not be read"
+msgstr "einige Einträge konnten nicht gelesen werden"
+
+#: builtin/branch.c:557
+msgid "cannot rename the current branch while not on any."
+msgstr "kann die aktuelle Branch nicht umbenennen, wenn man auf keiner ist"
+
+#: builtin/branch.c:567 builtin/branch.c:571
+#, c-format
+msgid "Invalid branch name: '%s'"
+msgstr "Ungültiger Name für Branch: \"%s\""
+
+#: builtin/branch.c:574
+#, c-format
+msgid "A branch named '%s' already exists."
+msgstr "Eine Branch namens \"%s\" gibt es bereits."
+
+#: builtin/branch.c:580
+msgid "Branch rename failed"
+msgstr "Umbenennung der Branch fehlgeschlagen"
+
+#: builtin/branch.c:584
+#, c-format
+msgid "Renamed a misnamed branch '%s' away"
+msgstr "Ungültiger Branchname \"%s\" durch Umbenennen in Ordnung gebracht"
+
+#: builtin/branch.c:588
+#, c-format
+msgid "Branch renamed to %s, but HEAD is not updated!"
+msgstr "Branch in %s umbenannt, aber HEAD nicht aktualisiert!"
+
+#: builtin/branch.c:595
+msgid "Branch is renamed, but update of config-file failed"
+msgstr ""
+"Branch wurde umbenannt, aber die Konfigurationsdatei konnte nicht "
+"aktualisiert werden"
+
+#: builtin/branch.c:610
+#, c-format
+msgid "malformed object name %s"
+msgstr "ungültiger Objektname %s"
+
+#: builtin/branch.c:680
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr "Konnte HEAD nicht als gültige Referenze auflösen."
+
+#: builtin/branch.c:686
+msgid "HEAD not found below refs/heads!"
+msgstr "HEAD zeigt nicht auf eine Referenz unter refs/heads!"
+
+#: builtin/branch.c:706
+msgid "-a and -r options to 'git branch' do not make sense with a branch name"
+msgstr ""
+"Die Optionen -a und -r für `git branch` ergeben zusammen mit einem "
+"Branchnamen keinen Sinn"
+
+#: builtin/bundle.c:47
+#, c-format
+msgid "%s is okay\n"
+msgstr "%s ist in Ordnung\n"
+
+#: builtin/bundle.c:56
+msgid "Need a repository to create a bundle."
+msgstr "Benötige Repository, um Bundle zu erstellen"
+
+#: builtin/bundle.c:60
+msgid "Need a repository to unbundle."
+msgstr "Benötige ein Repository zum Entpacken."
+
+#: builtin/checkout.c:107 builtin/checkout.c:135
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr "Pfad \"%s\" hat keine Version \"von uns\" im Index"
+
+#: builtin/checkout.c:109 builtin/checkout.c:137
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr "Pfad \"%s\" hat keine Version \"von denen\" im Index"
+
+#: builtin/checkout.c:120
+#, c-format
+msgid "path '%s' does not have all three versions"
+msgstr "Pfad \"%s\" hat keine drei verschiedenen Versionen im Index"
+
+#: builtin/checkout.c:155
+#, c-format
+msgid "path '%s' does not have all 3 versions"
+msgstr "Pfad \"%s\" hat keine drei verschiedenen Versionen im Index"
+
+#: builtin/checkout.c:172
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr "Pfad \"%s\": kann nicht mergen"
+
+#: builtin/checkout.c:189
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr "Kann Merge-Ergebnis für \"%s\" nicht hinzufügen"
+
+#: builtin/checkout.c:194 builtin/reset.c:170
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr "make_cache_entry für Pfad \"%s\" fehlgeschlagen"
+
+#: builtin/checkout.c:216 builtin/checkout.c:371
+msgid "corrupt index file"
+msgstr "beschädigte Indexdatei"
+
+#: builtin/checkout.c:244 builtin/checkout.c:251
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr "Pfad \"%s\" enthält Konflikte"
+
+#: builtin/checkout.c:280 builtin/checkout.c:475 builtin/clone.c:658
+#: builtin/merge.c:729
+msgid "unable to write new index file"
+msgstr "kann keine neue Indexdatei anlegen"
+
+#: builtin/checkout.c:297 builtin/diff.c:307 builtin/merge.c:368
+msgid "diff_setup_done failed"
+msgstr "diff_setup_done fehlgeschlagen"
+
+#: builtin/checkout.c:393
+msgid "you need to resolve your current index first"
+msgstr "Zuerst müssen Konflikte im aktuellen Index aufgelöst werden"
+
+#: builtin/checkout.c:524
+#, c-format
+msgid "Can not do reflog for '%s'\n"
+msgstr "Kann Reflog für \"%s\" nicht einrichten\n"
+
+#: builtin/checkout.c:550
+#, c-format
+msgid "Already on '%s'\n"
+msgstr "Bereits auf Branch \"%s\"\n"
+
+#: builtin/checkout.c:554
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr "Zu Branch \"%s\" gewechselt und Inhalt überschrieben\n"
+
+#: builtin/checkout.c:556
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr "Zu neuer Branch \"%s\" gewechselt\n"
+
+#: builtin/checkout.c:558
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr "Zu Branch \"%s\" gewechselt\n"
+
+#: builtin/checkout.c:575
+msgid "HEAD is now at"
+msgstr "HEAD zeigt jetzt auf"
+
+#: builtin/checkout.c:603
+msgid "You are on a branch yet to be born"
+msgstr "Die aktive Branch ist noch nicht angelegt"
+
+#: builtin/checkout.c:617
+msgid "Previous HEAD position was"
+msgstr "HEAD zeigte vorher auf"
+
+#: builtin/checkout.c:730
+msgid "-B cannot be used with -b"
+msgstr "-B kann nicht mit -b kombiniert werden"
+
+#: builtin/checkout.c:738
+msgid "--patch is incompatible with all other options"
+msgstr "--patch kann mit keinen weiteren Optionen kombiniert werden"
+
+#: builtin/checkout.c:744
+msgid "--track needs a branch name"
+msgstr "--track benötigt einen Branchnamen"
+
+#: builtin/checkout.c:751
+msgid "Missing branch name; try -b"
+msgstr "Fehlender Branchname; versuch's mit -b"
+
+#: builtin/checkout.c:757
+msgid "--orphan and -b|-B are mutually exclusive"
+msgstr "--orphan kann nicht mit -b/-B kombiniert werden"
+
+#: builtin/checkout.c:759
+msgid "--orphan cannot be used with -t"
+msgstr "--orphan kann nicht mit -t kombiniert werden"
+
+#: builtin/checkout.c:769
+msgid "git checkout: -f and -m are incompatible"
+msgstr "git checkout: -f kann nicht mit -m kombiniert werden"
+
+#. case (1)
+#: builtin/checkout.c:815
+#, c-format
+msgid "invalid reference: %s"
+msgstr "ungültige Referenz: %s"
+
+#. case (1): want a tree
+#: builtin/checkout.c:852
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr "Referenz ist kein Baum: %s"
+
+#: builtin/checkout.c:878
+msgid "invalid path specification"
+msgstr "ungültige Pfadangabe"
+
+#: builtin/checkout.c:886
+#, c-format
+msgid ""
+"git checkout: updating paths is incompatible with switching branches.\n"
+"Did you intend to checkout '%s' which can not be resolved as commit?"
+msgstr ""
+"git checkout: Pfade aktualisieren und Branchwechsel kann nicht\n"
+"kombiniert werden. Sollte \"%s\" (das aber nicht als Commit\n"
+"gefunden werden konnte) ausgecheckt werden?"
+
+#: builtin/checkout.c:888
+msgid "git checkout: updating paths is incompatible with switching branches."
+msgstr ""
+"git checkout: Pfade aktualisieren kann nicht mit Branchwechsel kombiniert "
+"werden."
+
+#: builtin/checkout.c:893
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+"git checkout: --ours/--theirs, --force und --merge ergeben keinen Sinn, "
+"wenn\n"
+"Pfade aus dem Index ausgecheckt werden."
+
+#: builtin/checkout.c:904
+#, c-format
+msgid "git checkout: we do not like '%s' as a branch name."
+msgstr "git checkout: \"%s\" ist kein gültiger Branchname."
+
+#: builtin/checkout.c:909
+#, c-format
+msgid "git checkout: branch %s already exists"
+msgstr "git checkout: Branch \"%s\" existiert bereits"
+
+#: builtin/checkout.c:916
+msgid "Cannot switch branch to a non-commit."
+msgstr "Kann Branch nicht auf etwas anderes als einen Commit umsetzen."
+
+#: builtin/checkout.c:919
+msgid "--ours/--theirs is incompatible with switching branches."
+msgstr "--ours/--theirs können nicht beim Branchwechsel benutzt werden."
+
+#: builtin/clean.c:78
+msgid "-x and -X cannot be used together"
+msgstr "-x und -X können nicht zusammen verwendet werden"
+
+#: builtin/clean.c:82
+msgid ""
+"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
+msgstr ""
+"clean.requireForce steht auf \"true\", aber weder Option -n noch -f "
+"angegeben; Säuberung verweigert"
+
+#: builtin/clean.c:85
+msgid ""
+"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
+"clean"
+msgstr ""
+"clean.requireForce steht per Default auf \"true\", aber weder die Option -n "
+"noch -f wurden angegeben; verweigere Säuberung"
+
+#: builtin/clean.c:154 builtin/clean.c:175
+#, c-format
+msgid "Would remove %s\n"
+msgstr "Würde \"%s\" entfernen\n"
+
+#: builtin/clean.c:158 builtin/clean.c:178
+#, c-format
+msgid "Removing %s\n"
+msgstr "Entferne %s\n"
+
+#: builtin/clean.c:161 builtin/clean.c:181
+#, c-format
+msgid "failed to remove '%s'"
+msgstr "konnte \"%s\" nicht entfernen"
+
+#: builtin/clean.c:165
+#, c-format
+msgid "Would not remove %s\n"
+msgstr "Würde %s nicht entfernen\n"
+
+#: builtin/clean.c:167
+#, c-format
+msgid "Not removing %s\n"
+msgstr "Lasse %s bestehen\n"
+
+#: builtin/clone.c:208
+#, c-format
+msgid "reference repository '%s' is not a local directory."
+msgstr "Referenz-Repository \"%s\" ist kein lokales Verzeichnis."
+
+#: builtin/clone.c:235
+#, c-format
+msgid "failed to open '%s'"
+msgstr "konnte \"%s\" nicht öffnen"
+
+#: builtin/clone.c:239
+#, c-format
+msgid "failed to create directory '%s'"
+msgstr "konnte Verzeichnis '\"%s\" nicht anlegen"
+
+#: builtin/clone.c:241 builtin/diff.c:74
+#, c-format
+msgid "failed to stat '%s'"
+msgstr "konnte \"%s\" nicht finden/prüfen"
+
+#: builtin/clone.c:243
+#, c-format
+msgid "%s exists and is not a directory"
+msgstr "%s existiert und ist kein Verzeichnis"
+
+#: builtin/clone.c:257
+#, c-format
+msgid "failed to stat %s\n"
+msgstr "konnte \"%s\" nicht finden/prüfen\n"
+
+#: builtin/clone.c:267
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "konnte \"%s\" nicht entfernen"
+
+#: builtin/clone.c:272
+#, c-format
+msgid "failed to create link '%s'"
+msgstr "konnte Link \"%s\" nicht anlegen"
+
+#: builtin/clone.c:276
+#, c-format
+msgid "failed to copy file to '%s'"
+msgstr "konnte Datei nicht nach \"%s\" kopieren"
+
+#: builtin/clone.c:305
+#, c-format
+msgid "done.\n"
+msgstr "fertig.\n"
+
+#: builtin/clone.c:387
+msgid "Too many arguments."
+msgstr "Zu viele Parameter."
+
+#: builtin/clone.c:391
+msgid "You must specify a repository to clone."
+msgstr "Ein Quell-Repository zum Klonen muss angegeben werden."
+
+#: builtin/clone.c:399
+#, c-format
+msgid "--bare and --origin %s options are incompatible."
+msgstr "--bare kann nicht mit --origin %s kombiniert werden."
+
+#: builtin/clone.c:428
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr "Zielpfad \"%s\" existiert bereits und ist kein leeres Verzeichnis."
+
+#: builtin/clone.c:438
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr "Arbeitsverzeichnis \"%s\" existiert bereits."
+
+#: builtin/clone.c:451 builtin/clone.c:465
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr "konnte übergeordnete Verzeichnisse für \"%s\" nicht anlegen"
+
+#: builtin/clone.c:454
+#, c-format
+msgid "could not create work tree dir '%s'."
+msgstr "konnte Verzeichnis \"%s\" im Arbeitsverzeichnis nicht anlegen."
+
+#: builtin/clone.c:470
+#, c-format
+msgid "Cloning into bare repository %s\n"
+msgstr "Klone nach Lager-Repository %s\n"
+
+#: builtin/clone.c:472
+#, c-format
+msgid "Cloning into %s\n"
+msgstr "Klone nach %s\n"
+
+#: builtin/clone.c:530
+#, c-format
+msgid "Don't know how to clone %s"
+msgstr "Keine Ahnung, wie man %s klont"
+
+#: builtin/clone.c:569
+#, c-format
+msgid "Remote branch %s not found in upstream %s, using HEAD instead"
+msgstr ""
+"Remote-Branch %s nicht in Ursprung %s gefunden, verwende stattdessen HEAD"
+
+#: builtin/clone.c:579
+msgid "You appear to have cloned an empty repository."
+msgstr "Anscheinend wurde ein leeres Repository geklont."
+
+#: builtin/clone.c:621
+msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgstr ""
+"Ursprungs-HEAD verweist auf fehlende Referenz, kann keinen Checkout "
+"vornehmen.\n"
+
+#: builtin/commit.c:41
+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"
+"If the identity used for this commit is wrong, you can fix it with:\n"
+"\n"
+" git commit --amend --author='Your Name <you@example.com>'\n"
+msgstr ""
+"Name und E-Mail-Adresse wurden automatisch aus deinem Benutzernamen und "
+"Hostnamen übernommen. Prüfe, ob diese korrekt sind.\n"
+"Diese Nachricht kann mittels expliziter Konfiguration unterdrückt werden:\n"
+"\n"
+" git config --global user.name \"Vorname Nachname\"\n"
+" git config --global user.email ich@example.de\n"
+"\n"
+"Falls die Angaben für diesen Commit falsch sind, können sie mittels\n"
+"\n"
+" git commit --amend --author=\"Vorname Nachname <ich@example.de>\"\n"
+"\n"
+"nachträglich korrigiert werden.\n"
+
+#: builtin/commit.c:53
+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 ""
+"Du willst den neuesten Commit nachbearbeiten, aber dadurch würde er leer\n"
+"werden. Du kannst deinen Befehl mit --allow-empty wiederholen oder den\n"
+"Commit mit `git reset HEAD^` komplett entfernen.\n"
+
+#: builtin/commit.c:271
+msgid "failed to unpack HEAD tree object"
+msgstr "konnte das HEAD-Baum-Objekt nicht entpacken"
+
+#: builtin/commit.c:299
+msgid "interactive add failed"
+msgstr "Interaktives Hinzufügen fehlgeschlagen"
+
+#: builtin/commit.c:330 builtin/commit.c:350 builtin/commit.c:396
+msgid "unable to write new_index file"
+msgstr "konnte new_index-Datei nicht anlegen"
+
+#: builtin/commit.c:380
+msgid "cannot do a partial commit during a merge."
+msgstr "kann keinen partiellen Commit während eines Merges durchführen."
+
+#: builtin/commit.c:389
+msgid "cannot read the index"
+msgstr "kann den Index nicht auslesen"
+
+#: builtin/commit.c:409
+msgid "unable to write temporary index file"
+msgstr "kann keine temporäre Indexdatei anlegen"
+
+#: builtin/commit.c:456 builtin/commit.c:1294
+msgid "could not parse HEAD commit"
+msgstr "konnte HEAD-Commit nicht analysieren"
+
+#: builtin/commit.c:475 builtin/commit.c:481
+#, c-format
+msgid "invalid commit: %s"
+msgstr "ungültiger Commit: %s"
+
+#: builtin/commit.c:499
+msgid "malformed --author parameter"
+msgstr "ungültiger --author-Parameter"
+
+#: builtin/commit.c:573 builtin/shortlog.c:299
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr "(Commit-Kommentar wird von der Standardeingabe gelesen)\n"
+
+#: builtin/commit.c:575
+msgid "could not read log from standard input"
+msgstr "konnte Kommentar nicht von der Standardeingabe lesen"
+
+#: builtin/commit.c:579
+#, c-format
+msgid "could not read log file '%s'"
+msgstr "konnte Kommentardatei \"%s\" nicht lesen"
+
+#: builtin/commit.c:585
+msgid "commit has empty message"
+msgstr "der Commit-Kommentar ist leer"
+
+#: builtin/commit.c:591
+msgid "could not read MERGE_MSG"
+msgstr "konnte MERGE_MSG nicht lesen"
+
+#: builtin/commit.c:595
+msgid "could not read SQUASH_MSG"
+msgstr "konnte SQUASH_MSG nicht lesen"
+
+#: builtin/commit.c:599
+#, c-format
+msgid "could not read '%s'"
+msgstr "konnte \"%s\" nicht lesen"
+
+#: builtin/commit.c:612
+#, c-format
+msgid "could not open '%s'"
+msgstr "konnte \"%s\" nicht öffnen"
+
+#: builtin/commit.c:636
+msgid "could not write commit template"
+msgstr "konnte Kommentarvorlage nicht anlegen"
+
+#: builtin/commit.c:650
+#, c-format
+msgid ""
+"#\n"
+"# It looks like you may be committing a MERGE.\n"
+"# If this is not correct, please remove the file\n"
+"#\t%s\n"
+"# and try again.\n"
+"#\n"
+msgstr ""
+"#\n"
+"# Es scheint, als ob ein MERGE committet wird.\n"
+"# Falls das nicht stimmt, entferne die Datei\n"
+"#\t%s\n"
+"# und versuche es nochmal.\n"
+"#\n"
+
+#: builtin/commit.c:659
+#, c-format
+msgid ""
+"\n"
+"# Please enter the commit message for your changes."
+msgstr ""
+"\n"
+"# Gib einen Commit-Kommentar für die Änderungen an."
+
+#: builtin/commit.c:663
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+" Zeilen, die mit '#'\n"
+"# anfangen, werden ignoriert, und ein leerer Kommentar bricht den Commit "
+"ab.\n"
+
+#: builtin/commit.c:668
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be kept; you may remove them yourself if you want to.\n"
+"# An empty message aborts the commit.\n"
+msgstr ""
+" Zeilen, die mit '#'\n"
+"# anfangen, werden beibehalten; sie können entfernen werden, wenn "
+"gewünscht.\n"
+"# Ein leerer Kommentar bricht den Commit ab.\n"
+
+#: builtin/commit.c:680
+#, c-format
+msgid "%s# Author: %s\n"
+msgstr "%s# Autor: %s\n"
+
+#: builtin/commit.c:688
+#, c-format
+msgid "%s# Committer: %s\n"
+msgstr "%s# Committer: %s\n"
+
+#: builtin/commit.c:705
+msgid "Cannot read index"
+msgstr "Kann Index nicht auslesen"
+
+#: builtin/commit.c:737
+msgid "Error building trees"
+msgstr "Fehler beim Anlegen der Bäume"
+
+#: builtin/commit.c:752 builtin/tag.c:321
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr "Bitte gib den Kommentar mit der Option -m oder -F an.\n"
+
+#: builtin/commit.c:832
+#, c-format
+msgid "No existing author found with '%s'"
+msgstr "Kein bekannter Autor gefunden mit \"%s\""
+
+#: builtin/commit.c:847 builtin/commit.c:1039
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr "Ungültiger Modus für unberücksichtigte Dateien: \"%s\""
+
+#: builtin/commit.c:864
+msgid "Using both --reset-author and --author does not make sense"
+msgstr "Es ist unsinnig, --reset-author und --author zusammen zu verwenden"
+
+#: builtin/commit.c:878
+msgid "You have nothing to amend."
+msgstr "Es gibt nichts zum Nachbearbeiten."
+
+#: builtin/commit.c:880
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr "Du bist mitten in einem Merge; Nachbearbeitung nicht möglich."
+
+#: builtin/commit.c:889
+msgid "Only one of -c/-C/-F can be used."
+msgstr "Nur eine der Optionen -c, -C und -F kann auf einmal benutzt werden."
+
+#: builtin/commit.c:891
+msgid "Option -m cannot be combined with -c/-C/-F."
+msgstr "Option -m kann nicht mit -c, -C oder -F kombiniert werden."
+
+#: builtin/commit.c:897
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr "--reset-author kann nur mit -C, -c oder --amend benutzt werden."
+
+#: builtin/commit.c:906
+#, c-format
+msgid "could not lookup commit %s"
+msgstr "konnte Commit %s nicht finden"
+
+#: builtin/commit.c:909
+#, c-format
+msgid "could not parse commit %s"
+msgstr "konnte Commit %s nicht analysieren"
+
+#: builtin/commit.c:937
+msgid "Only one of --include/--only/--all/--interactive can be used."
+msgstr ""
+"Nur eine der Optionen --include, --only, --all und --interactive kann auf "
+"einmal benutzt werden."
+
+#: builtin/commit.c:939
+msgid "No paths with --include/--only does not make sense."
+msgstr "Für --include/--only müssen Pfade angeben werden."
+
+#: builtin/commit.c:941
+msgid "Clever... amending the last one with dirty index."
+msgstr ""
+"Bearbeite letzten Commit nach, ohne Änderungen an Dateien zu übernehmen."
+
+#: builtin/commit.c:943
+msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
+msgstr ""
+"Explizite Pfade ohne -i noch -o angegeben; Annahme, dass --only gemeint "
+"ist..."
+
+#: builtin/commit.c:953
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr "Ungültiger Aufräummodus (--cleanup=%s) für den Commit-Kommentar"
+
+#: builtin/commit.c:958
+msgid "Paths with -a does not make sense."
+msgstr "Es ist unsinnig, Pfade zusammen mit -a anzugeben."
+
+#: builtin/commit.c:960
+msgid "Paths with --interactive does not make sense."
+msgstr "Es ist unsinnig, Pfade zusammen mit --interactive anzugeben."
+
+#: builtin/commit.c:1142
+msgid "couldn't look up newly created commit"
+msgstr "konnte neu angelegten Commit nicht finden"
+
+#: builtin/commit.c:1144
+msgid "could not parse newly created commit"
+msgstr "konnte neu angelegten Commit nicht analysieren"
+
+#: builtin/commit.c:1185
+msgid "detached HEAD"
+msgstr "freistehender HEAD"
+
+#: builtin/commit.c:1187
+msgid " (root-commit)"
+msgstr " (Wurzel-Commit)"
+
+#: builtin/commit.c:1307 builtin/merge.c:462
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr "konnte \"%s\" nicht zum Lesen öffnen"
+
+#: builtin/commit.c:1312
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr "Beschädigte MERGE_HEAD-Datei (%s)"
+
+#: builtin/commit.c:1319
+msgid "could not read MERGE_MODE"
+msgstr "konnte MERGE_MODE nicht auslesen"
+
+#: builtin/commit.c:1336
+#, c-format
+msgid "could not read commit message: %s"
+msgstr "konnte Commit-Kommentar nicht lesen: %s"
+
+#: builtin/commit.c:1350
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr "Commit wegen leerem Kommentar abgebrochen.\n"
+
+#: builtin/commit.c:1358
+msgid "failed to write commit object"
+msgstr "konnte Commit-Objekt nicht schreiben"
+
+#: builtin/commit.c:1375
+msgid "cannot lock HEAD ref"
+msgstr "kann HEAD-Referenz nicht sperren"
+
+#: builtin/commit.c:1379
+msgid "cannot update HEAD ref"
+msgstr "kann HEAD-Referenz nicht aktualisieren"
+
+#: builtin/commit.c:1388
+msgid ""
+"Repository has been updated, but unable to write\n"
+"new_index file. Check that disk is not full or quota is\n"
+"not exceeded, and then \"git reset HEAD\" to recover."
+msgstr ""
+"Repository wurde aktualisiert, aber die new_index-Datei kann nicht\n"
+"anlegt werden. Stelle sicher, dass der Datenträger nicht voll ist und\n"
+"Limits nicht überschritten werden, und verwende dann `git reset HEAD` zum "
+"Reparieren."
+
+#: builtin/describe.c:205
+#, c-format
+msgid "annotated tag %s not available"
+msgstr "Kommentierter Tag %s nicht verfügbar"
+
+#: builtin/describe.c:209
+#, c-format
+msgid "annotated tag %s has no embedded name"
+msgstr "Kommentierter Tag %s hat keinen eingebetteten Namen"
+
+#: builtin/describe.c:211
+#, c-format
+msgid "tag '%s' is really '%s' here"
+msgstr "Tag '%s' ist hier eher '%s'"
+
+#: builtin/describe.c:238
+#, c-format
+msgid "Not a valid object name %s"
+msgstr "Kein gültiger Objektname %s"
+
+#: builtin/describe.c:241
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s ist kein gültiges \"%s\"-Objekt"
+
+#: builtin/describe.c:258
+#, c-format
+msgid "no tag exactly matches '%s'"
+msgstr "Kein Tag passt genau auf \"%s\""
+
+#: builtin/describe.c:260
+#, c-format
+msgid "searching to describe %s\n"
+msgstr "Suche, was %s beschreibt\n"
+
+#: builtin/describe.c:295
+#, c-format
+msgid "finished search at %s\n"
+msgstr "Suche bei %s beendet\n"
+
+#: builtin/describe.c:319
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+"Keine kommentierten Tags können '%s' beschreiben.\n"
+"Es gab aber kommentarlose Tags: probiere --tags."
+
+#: builtin/describe.c:323
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+"Keine Tags können '%s' beschreiben.\n"
+"Versuche --always, oder erstelle Tags."
+
+#: builtin/describe.c:344
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr "%lu Commits durchlaufen\n"
+
+#: builtin/describe.c:347
+#, c-format
+msgid ""
+"more than %i tags found; listed %i most recent\n"
+"gave up search at %s\n"
+msgstr ""
+"Mehr als %d Tags gefunden; die %d aktuellsten wurden angezeigt\n"
+"Suche aufgegeben ab %s\n"
+
+#: builtin/describe.c:398
+msgid "--long is incompatible with --abbrev=0"
+msgstr "--long kann nicht mit --abrev=0 kombiniert werden"
+
+#: builtin/describe.c:423
+msgid "No names found, cannot describe anything."
+msgstr "Keine Namen gefunden, kann nichts beschreiben."
+
+#: builtin/describe.c:430
+msgid "--dirty is incompatible with committishes"
+msgstr "--dirty kann nicht mit Commitishes kombiniert werden"
+
+#: builtin/diff.c:76
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr "\"%s\": weder normale Datei noch Symlink"
+
+#: builtin/diff.c:225
+#, c-format
+msgid "invalid option: %s"
+msgstr "ungültige Option: %s"
+
+#: builtin/diff.c:302
+msgid "Not a git repository"
+msgstr "Kein git-Repository"
+
+#: builtin/diff.c:334
+msgid "No HEAD commit to compare with (yet)"
+msgstr "Es gibt (noch) keinen HEAD-Commit zum Vergleich"
+
+#: builtin/diff.c:349
+#, c-format
+msgid "invalid object '%s' given."
+msgstr "ungültiges Objekt \"%s\" angegeben."
+
+#: builtin/diff.c:354
+#, c-format
+msgid "more than %d trees given: '%s'"
+msgstr "mehr als %d Bäume angegeben: \"%s\""
+
+#: builtin/diff.c:364
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr "mehr als zwei Blobs angegeben: \"%s\""
+
+#: builtin/diff.c:372
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr "nicht unterstütztes Objekt \"%s\" angegeben."
+
+#: builtin/fetch.c:175
+msgid "Couldn't find remote ref HEAD"
+msgstr "Konnte Remote-Referenz HEAD nicht finden"
+
+#: builtin/fetch.c:228
+#, c-format
+msgid "object %s not found"
+msgstr "Objekt %s nicht gefunden"
+
+#: builtin/fetch.c:233
+msgid "[up to date]"
+msgstr "[aktuell]"
+
+#.
+#. * If this is the head, and it's not okay to update
+#. * the head, and the old value of the head isn't empty...
+#.
+#: builtin/fetch.c:246
+#, c-format
+msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
+msgstr "! %-*s %-*s -> %s (kann aktuelle Branch nicht überschreiben)"
+
+#: builtin/fetch.c:247 builtin/fetch.c:309
+msgid "[rejected]"
+msgstr "[abgewiesen]"
+
+#: builtin/fetch.c:257
+msgid "[tag update]"
+msgstr "[Tag-Update]"
+
+#: builtin/fetch.c:258 builtin/fetch.c:280 builtin/fetch.c:293
+msgid " (unable to update local ref)"
+msgstr " (kann lokale Referenz nicht aktualisieren)"
+
+#: builtin/fetch.c:270
+msgid "[new tag]"
+msgstr "[neuer Tag]"
+
+#: builtin/fetch.c:274
+msgid "[new branch]"
+msgstr "[neue Branch]"
+
+#: builtin/fetch.c:305
+msgid "unable to update local ref"
+msgstr "kann lokale Referenz nicht aktualisieren"
+
+#: builtin/fetch.c:305
+msgid "forced update"
+msgstr "Update erzwungen"
+
+#: builtin/fetch.c:310
+msgid "(non-fast-forward)"
+msgstr "(Update ohne Merge)"
+
+#: builtin/fetch.c:328 builtin/fetch.c:651
+#, c-format
+msgid "cannot open %s: %s\n"
+msgstr "kann %s nicht öffnen: %s\n"
+
+#: builtin/fetch.c:406
+#, c-format
+msgid "From %.*s\n"
+msgstr "Von %.*s\n"
+
+#: builtin/fetch.c:417
+#, c-format
+msgid ""
+"some local refs could not be updated; try running\n"
+" 'git remote prune %s' to remove any old, conflicting branches"
+msgstr ""
+"einige lokale Referenzen konnten nicht aktualisiert werden; versuche,\n"
+"alte kollidierende Branches mit `git remote prune %s` zu entfernen"
+
+#: builtin/fetch.c:467
+msgid "could not run rev-list"
+msgstr "konnte rev-list nicht ausführen"
+
+#: builtin/fetch.c:481
+#, c-format
+msgid "failed write to rev-list: %s"
+msgstr "konnte Daten nicht an rev-list übergeben: %s"
+
+#: builtin/fetch.c:488
+#, c-format
+msgid "failed to close rev-list's stdin: %s"
+msgstr "konnte Standardeingabe von rev-list nicht schließen: %s"
+
+# dangling ist nicht gerade "nichts".
+# Ein dangling Symlink zeigt immer noch auf etwas, aber auf etwas das nicht mehr existiert.
+#: builtin/fetch.c:515
+#, c-format
+msgid " (%s will become dangling)\n"
+msgstr " (%s wird auf nichts existentes mehr zeigen)\n"
+
+# dangling ist nicht gerade "nichts".
+# Ein dangling Symlink zeigt immer noch auf etwas, aber auf etwas das nicht mehr existiert.
+#: builtin/fetch.c:516
+#, c-format
+msgid " (%s has become dangling)\n"
+msgstr " (%s zeigt auf nichts existentes mehr)\n"
+
+#: builtin/fetch.c:523
+msgid "[deleted]"
+msgstr "[gelöscht]"
+
+#: builtin/fetch.c:524
+msgid "(none)"
+msgstr "(nichts)"
+
+#: builtin/fetch.c:641
+#, c-format
+msgid "Refusing to fetch into current branch %s of non-bare repository"
+msgstr "Überschreiben der aktuellen Branch %s im Lager-Repository verweigert"
+
+#: builtin/fetch.c:675
+#, c-format
+msgid "Don't know how to fetch from %s"
+msgstr "Keine Ahnung, wie man von %s runterlädt"
+
+#: builtin/fetch.c:729
+#, c-format
+msgid "Option \"%s\" value \"%s\" is not valid for %s"
+msgstr "Option \"%s\" (Wert \"%s\") ist nicht gültig für %s"
+
+#: builtin/fetch.c:732
+#, c-format
+msgid "Option \"%s\" is ignored for %s\n"
+msgstr "Option \"%s\" wird für %s ignoriert\n"
+
+#: builtin/fetch.c:821
+#, c-format
+msgid "Fetching %s\n"
+msgstr "Hole %s\n"
+
+#: builtin/fetch.c:823
+#, c-format
+msgid "Could not fetch %s"
+msgstr "Konnte %s nicht holen"
+
+#: builtin/fetch.c:839
+msgid ""
+"No remote repository specified. Please, specify either a URL or a\n"
+"remote name from which new revisions should be fetched."
+msgstr ""
+"Kein Ursprungs-Repository angegeben. Gib entweder eine URL oder einen\n"
+"Remote-Namen an, um die Quelle für neu zu holende Revisionen festzulegen."
+
+#: builtin/fetch.c:859
+msgid "You need to specify a tag name."
+msgstr "Ein Tagname muss angegeben werden."
+
+#: builtin/fetch.c:899
+msgid "fetch --all does not take a repository argument"
+msgstr ""
+"fetch --all akzeptiert keine explizite Angabe eines Ursprungs-Repositorys"
+
+#: builtin/fetch.c:901
+msgid "fetch --all does not make sense with refspecs"
+msgstr "fetch --all ergibt keinen Sinn mit Refspecs"
+
+#: builtin/fetch.c:912
+#, c-format
+msgid "No such remote or remote group: %s"
+msgstr "Es gibt kein Remote und auch keine Remote-Gruppe \"%s\""
+
+#: builtin/fetch.c:920
+msgid "Fetching a group and specifying refspecs does not make sense"
+msgstr "Das Holen einer Gruppe unter Angabe von Refspecs ergibt keinen Sinn"
+
+#: builtin/gc.c:63
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr "Ungültiger Wert für %s: \"%s\""
+
+#: builtin/gc.c:78
+msgid "Too many options specified"
+msgstr "Zuviele Optionen angegeben"
+
+#: builtin/gc.c:103
+#, c-format
+msgid "insanely long object directory %.*s"
+msgstr "irrsinniges langes Objektverzeichnis %.*s"
+
+#: builtin/gc.c:220
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr ""
+"Automatische Komprimierung des Repositories für optimale Performance.\n"
+
+#: builtin/gc.c:223
+#, c-format
+msgid ""
+"Auto packing the repository for optimum performance. You may also\n"
+"run \"git gc\" manually. See \"git help gc\" for more information."
+msgstr ""
+"Automatische Komprimierung des Repositories für optimale Performance. `git "
+"gc` kann auch manuell ausgeführt werden. Siehe `git help gc` für weitere "
+"Informationen."
+
+#: builtin/gc.c:251
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+"Es gibt zu viele unerreichbare lose Objekte; führe `git prune` aus, um sie "
+"zu entfernen."
+
+#: builtin/grep.c:252
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr "grep: konnte Thread nicht erstellen: %s"
+
+#: builtin/grep.c:457
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr "\"%s\": kann %s nicht lesen"
+
+#: builtin/grep.c:508
+#, c-format
+msgid "'%s': %s"
+msgstr "\"%s\": %s"
+
+#: builtin/grep.c:519
+#, c-format
+msgid "'%s': short read %s"
+msgstr "\"%s\": zu wenig gelesen: %s"
+
+#: builtin/grep.c:581
+#, c-format
+msgid "Failed to chdir: %s"
+msgstr "Konnte Verzeichnis nicht wechseln: %s"
+
+#: builtin/grep.c:671 builtin/grep.c:697
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr "kann Baum nicht lesen (%s)"
+
+#: builtin/grep.c:703
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr "kann Objekte des Typs %s nicht greppen"
+
+#: builtin/grep.c:755
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr "Option '%c' benötigt einen numerischen Wert"
+
+#: builtin/grep.c:771
+#, c-format
+msgid "cannot open '%s'"
+msgstr "kann \"%s\" nicht öffnen"
+
+#: builtin/grep.c:1012
+msgid "no pattern given."
+msgstr "kein Suchmuster angegeben."
+
+#: builtin/grep.c:1016
+msgid "cannot mix --fixed-strings and regexp"
+msgstr "--fixed-strings kann nicht mit regulärem Ausdruck kombiniert werden"
+
+#: builtin/grep.c:1041
+#, c-format
+msgid "bad object %s"
+msgstr "ungültiges Objekt %s"
+
+#: builtin/grep.c:1068
+msgid "--open-files-in-pager only works on the worktree"
+msgstr "--open-files-in-pager funktioniert nur im Arbeitsverzeichnis"
+
+#: builtin/grep.c:1093
+msgid "--cached cannot be used with --no-index."
+msgstr "--cached kann nicht mit --no-index kombiniert werden."
+
+#: builtin/grep.c:1095
+msgid "--no-index cannot be used with revs."
+msgstr "--no-index kann nicht mit Revisionen kombiniert werden."
+
+#: builtin/grep.c:1104
+msgid "both --cached and trees are given."
+msgstr "Sowohl --cached als auch Baum wurden angegeben."
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Konnte %s nicht für die Gruppe schreibbar machen"
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr "irrsinnig langer Vorlagen-Name %s"
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "kann \"%s\" nicht finden/prüfen"
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "kann Vorlage \"%s\" nicht finden/prüfen"
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "kann Verzeichnis \"%s\" nicht öffnen"
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "kann Linkziel für \"%s\" nicht ermitteln"
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "irrsinnig langer Symlink \"%s\""
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "kann \"%s\" nicht nach \"%s\" symbolisch verlinken"
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "kann \"%s\" nicht nach \"%s\" kopieren"
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr "ignoriere Vorlage %s"
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr "irrsinnig langer Vorlagen-Pfad %s"
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr "Vorlagen nicht gefunden: %s"
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr "kopiere keine Vorlagen einer falschen Formatversion %d aus \"%s\""
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr "irrsinniges git-Verzeichnis %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:361
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr "%s%s Git-Repository in %s%s\n"
+
+#: builtin/init-db.c:362
+msgid "Reinitialized existing"
+msgstr "Bereits bestehend und neuinitialisierte"
+
+#: builtin/init-db.c:362
+msgid "Initialized empty"
+msgstr "Neu angelegte"
+
+#: builtin/init-db.c:363
+msgid " shared"
+msgstr " gemeinsam benutztes"
+
+#: builtin/init-db.c:382
+msgid "cannot tell cwd"
+msgstr "kann aktuelles Verzeichnis nicht ermitteln"
+
+#: builtin/init-db.c:456 builtin/init-db.c:463
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "kann Verzeichnis %s nicht anlegen"
+
+#: builtin/init-db.c:467
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "kann nicht in Verzeichnis %s wechseln"
+
+#: builtin/init-db.c:489
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+"%s (oder --work-tree=<Verzeichnis>) ohne Angabe von %s nicht erlaubt (oder --"
+"git-dir=<Verzeichnis>)"
+
+#: builtin/init-db.c:515
+msgid "Cannot access current working directory"
+msgstr "Kann auf aktuelles Verzeichnis nicht zugreifen"
+
+#: builtin/init-db.c:518
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Kann auf Arbeitsverzeichnis \"%s\" nicht zugreifen"
+
+#: builtin/log.c:104
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr "ungültige --decorate-Option: %s"
+
+#: builtin/log.c:113 builtin/log.c:1137 builtin/shortlog.c:287
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "unbekannter Parameter: %s"
+
+#: builtin/log.c:156
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr "Endgültige Ausgabe: %d %s\n"
+
+#: builtin/log.c:255 builtin/log.c:674 builtin/log.c:1221 builtin/log.c:1423
+#: builtin/merge.c:311 builtin/revert.c:556 builtin/shortlog.c:184
+msgid "revision walk setup failed"
+msgstr "Einrichtung der Revisionsverfolgung fehlgeschlagen"
+
+#: builtin/log.c:347 builtin/log.c:434
+#, c-format
+msgid "Could not read object %s"
+msgstr "Konnte Objekt %s nicht lesen"
+
+#: builtin/log.c:458
+#, c-format
+msgid "Unknown type: %d"
+msgstr "Unbekannter Typ: %d"
+
+#: builtin/log.c:558
+msgid "format.headers without value"
+msgstr "format.headers ohne Wert"
+
+#: builtin/log.c:630
+msgid "name of output directory is too long"
+msgstr "Name des Ausgabeverzeichnisses ist zu lang"
+
+#: builtin/log.c:641
+#, c-format
+msgid "Cannot open patch file %s"
+msgstr "Kann Patch-Datei \"%s\" nicht öffnen"
+
+#: builtin/log.c:655
+msgid "Need exactly one range."
+msgstr "Benötige genau eine Bereichsangabe."
+
+#: builtin/log.c:663
+msgid "Not a range."
+msgstr "Keine Bereichsangabe."
+
+#: builtin/log.c:700
+msgid "Could not extract email from committer identity."
+msgstr "Konnte E-Mail-Adresse nicht aus der Committer-Angabe entnehmen."
+
+#: builtin/log.c:732
+msgid "Cover letter needs email format"
+msgstr "Begleittext muss im E-Mail-Format sein"
+
+#: builtin/log.c:825
+#, c-format
+msgid "insane in-reply-to: %s"
+msgstr "irrsinniges in-reply-to: %s"
+
+#: builtin/log.c:898
+msgid "Two output directories?"
+msgstr "Zwei Ausgabeverzeichnisse?"
+
+#: builtin/log.c:1086
+#, c-format
+msgid "bogus committer info %s"
+msgstr "merkwürdige Committer-Angabe %s"
+
+#: builtin/log.c:1131
+msgid "-n and -k are mutually exclusive."
+msgstr "-n kann nicht mit -k kombiniert werden."
+
+#: builtin/log.c:1133
+msgid "--subject-prefix and -k are mutually exclusive."
+msgstr "--subject-prefix kann nicht mit -k kombiniert werden."
+
+#: builtin/log.c:1140
+msgid "--name-only does not make sense"
+msgstr "--name-only ergibt keinen Sinn"
+
+#: builtin/log.c:1142
+msgid "--name-status does not make sense"
+msgstr "--name-status ergibt keinen Sinn"
+
+#: builtin/log.c:1144
+msgid "--check does not make sense"
+msgstr "--check ergibt keinen Sinn"
+
+#: builtin/log.c:1165
+msgid "standard output, or directory, which one?"
+msgstr "Standardausgabe oder Verzeichnis... welches nun?"
+
+#: builtin/log.c:1167
+#, c-format
+msgid "Could not create directory '%s'"
+msgstr "Konnte Verzeichnis \"%s\" nicht anlegen"
+
+#: builtin/log.c:1302
+msgid "Failed to create output files"
+msgstr "Konnte Ausgabedateien nicht anlegen"
+
+#: builtin/log.c:1389
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr ""
+"Konnte keine verfolgte Remote-Branch finden, bitte gib <Ursprung> selbst "
+"an.\n"
+
+#: builtin/log.c:1405 builtin/log.c:1407 builtin/log.c:1419
+#, c-format
+msgid "Unknown commit %s"
+msgstr "Unbekannter Commit %s"
+
+#: builtin/merge.c:82
+msgid "switch `m' requires a value"
+msgstr "Option 'm' benötigt einen Wert"
+
+#: builtin/merge.c:119
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr "Konnte Merge-Strategie \"%s\" nicht finden.\n"
+
+#: builtin/merge.c:120
+#, c-format
+msgid "Available strategies are:"
+msgstr "Verfügbare Strategien:"
+
+#: builtin/merge.c:125
+#, c-format
+msgid "Available custom strategies are:"
+msgstr "Verfügbare benutzerdefinierte Strategien:"
+
+#: builtin/merge.c:224
+msgid "could not run stash."
+msgstr "konnte \"stash\" nicht ausführen."
+
+#: builtin/merge.c:229
+msgid "stash failed"
+msgstr "\"stash\" fehlgeschlagen"
+
+#: builtin/merge.c:234
+#, c-format
+msgid "not a valid object: %s"
+msgstr "kein gültiges Objekt: %s"
+
+#: builtin/merge.c:251
+msgid "read-tree failed"
+msgstr "read-tree fehlgeschlagen"
+
+#: builtin/merge.c:280
+msgid " (nothing to squash)"
+msgstr " (nichts zu kombinieren (--squash))"
+
+#: builtin/merge.c:293
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr "Squash-Commit -- HEAD wird nicht aktualisiert\n"
+
+#: builtin/merge.c:296 builtin/merge.c:1280 builtin/merge.c:1289
+#: builtin/merge.c:1299
+#, c-format
+msgid "Could not write to '%s'"
+msgstr "Konnte nicht nach \"%s\" schreiben"
+
+#: builtin/merge.c:324
+msgid "Writing SQUASH_MSG"
+msgstr "Schreibe SQUASH_MSG"
+
+#: builtin/merge.c:326
+msgid "Finishing SQUASH_MSG"
+msgstr "Schließe SQUASH_MSG ab"
+
+#: builtin/merge.c:346
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr "Kein Merge-Kommentar -- HEAD wird nicht aktualisiert\n"
+
+#: builtin/merge.c:397
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr "\"%s\" zeigt nicht auf einen Commit"
+
+#: builtin/merge.c:492
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr "Ungültige Branch.%s.mergeoptions string: %s"
+
+#: builtin/merge.c:561
+msgid "git write-tree failed to write a tree"
+msgstr "`git write-tree` konnte keinen Baum anlegen"
+
+#: builtin/merge.c:602
+msgid "failed to read the cache"
+msgstr "konnte den Index nicht auslesen"
+
+#: builtin/merge.c:619
+msgid "Unable to write index."
+msgstr "Konnte den Index nicht anlegen."
+
+#: builtin/merge.c:632
+msgid "Not handling anything other than two heads merge."
+msgstr "Dieser Befehl erledigt ausschließlich Merges mit zwei Quellen."
+
+#: builtin/merge.c:644
+#, c-format
+msgid "Unknown option for merge-recursive: -X%s"
+msgstr "Unbekannte Option für merge-recursive: -X%s"
+
+#: builtin/merge.c:658
+#, c-format
+msgid "unable to write %s"
+msgstr "konnte %s nicht schreiben"
+
+#: builtin/merge.c:783
+#, c-format
+msgid "Wonderful.\n"
+msgstr "Wunderbar.\n"
+
+#: builtin/merge.c:832 builtin/merge.c:1277 builtin/merge.c:1285
+#: builtin/merge.c:1293
+#, c-format
+msgid "Could not open '%s' for writing"
+msgstr "Konnte \"%s\" nicht zum Schreiben öffnen"
+
+#: builtin/merge.c:848
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+"Automatischer Merge fehlgeschlagen; behebe die Konflikte und committe das "
+"Ergebnis.\n"
+
+#: builtin/merge.c:863
+#, c-format
+msgid "'%s' is not a commit"
+msgstr "\"%s\" ist kein Commit"
+
+#: builtin/merge.c:913 git-pull.sh:31
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you can merge."
+msgstr ""
+"Du hast deinen Merge nicht abgeschlossen (MERGE_HEAD existiert).\n"
+"Committe die Änderungen, bevor du einen weiteren Merge startest."
+
+#: builtin/merge.c:916 git-pull.sh:34
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr "Du hast deinen Merge nicht abgeschlossen (MERGE_HEAD existiert)."
+
+#: builtin/merge.c:943
+msgid "You cannot combine --squash with --no-ff."
+msgstr "--squash kann nicht mit --no-ff kombiniert werden."
+
+#: builtin/merge.c:948
+msgid "You cannot combine --no-ff with --ff-only."
+msgstr "--no-ff kann nicht mit --ff-only kombiniert werden."
+
+# Die Originalumschreibung "exactly one commit" ist irreführend; es geht
+# natürlich um die gesamte History hinter diesem Commit
+#: builtin/merge.c:976
+msgid "Can merge only exactly one commit into empty head"
+msgstr "Kann nur exakt eine Historie in einen leeren HEAD mergen"
+
+#: builtin/merge.c:979
+msgid "Squash commit into empty head not supported yet"
+msgstr ""
+"Zusammenführen von Commits in einen leeren HEAD wird noch nicht unterstützt"
+
+#: builtin/merge.c:981
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr "Das Erzwingen eines Merge-Commits in einem leeren HEAD ist unsinnig"
+
+#: builtin/merge.c:985 builtin/merge.c:1031
+#, c-format
+msgid "%s - not something we can merge"
+msgstr "%s - nicht etwas, das wir mergen könnten"
+
+#: builtin/merge.c:1089
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr "Aktualisiere %s..%s\n"
+
+#: builtin/merge.c:1123
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr "Probiere total simplen Inner-Index Merge...\n"
+
+#: builtin/merge.c:1127
+#, c-format
+msgid "Nope.\n"
+msgstr "Nö.\n"
+
+#: builtin/merge.c:1160
+msgid "Not possible to fast-forward, aborting."
+msgstr "Kann nicht ohne Merge-Commit aktualisieren, breche ab."
+
+#: builtin/merge.c:1186 builtin/merge.c:1259
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr "Baum wird auf Ursprung zurückgesetzt...\n"
+
+#: builtin/merge.c:1190
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr "Probiere Merge-Strategie %s...\n"
+
+#: builtin/merge.c:1251
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr "Keine Merge-Strategie hat den Merge erledigt.\n"
+
+#: builtin/merge.c:1253
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr "Merge mit Strategie \"%s\" fehlgeschlagen.\n"
+
+#: builtin/merge.c:1261
+#, c-format
+msgid "Using the %s to prepare resolving by hand.\n"
+msgstr ""
+"Strategie %s wird verwendet, um auf manuelle Auflösung vorzubereiten.\n"
+
+#: builtin/merge.c:1304
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr ""
+"Automatisches Merge hat gut funktioniert; warte wie gewünscht vor dem "
+"Commit\n"
+
+#: builtin/mv.c:103
+#, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr "Prüfe Umbenennen von \"%s\" nach \"%s\"\n"
+
+#: builtin/mv.c:107
+msgid "bad source"
+msgstr "ungültige Quelle"
+
+#: builtin/mv.c:110
+msgid "can not move directory into itself"
+msgstr "kann ein Verzeichnis nicht in sich selbst verschieben"
+
+#: builtin/mv.c:113
+msgid "cannot move directory over file"
+msgstr "kann Verzeichnis nicht an die Stelle einer Datei verschieben"
+
+#: builtin/mv.c:123
+#, c-format
+msgid "Huh? %.*s is in index?"
+msgstr "Hä? %.*s ist im Index?"
+
+#: builtin/mv.c:135
+msgid "source directory is empty"
+msgstr "Quellverzeichnis ist leer"
+
+#: builtin/mv.c:166
+msgid "not under version control"
+msgstr "nicht unter Versionskontrolle"
+
+#: builtin/mv.c:168
+msgid "destination exists"
+msgstr "Ziel existiert bereits"
+
+#: builtin/mv.c:175
+#, c-format
+msgid "%s; will overwrite!"
+msgstr "%s; werde überschreiben!"
+
+#: builtin/mv.c:178
+msgid "Cannot overwrite"
+msgstr "Kann nicht überschreiben"
+
+#: builtin/mv.c:181
+msgid "multiple sources for the same target"
+msgstr "mehrere Quellen für das gleiche Ziel"
+
+#: builtin/mv.c:196
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr "%s, Quelle=%s, Ziel=%s"
+
+#: builtin/mv.c:206
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr "Benenne %s nach %s um\n"
+
+#: builtin/mv.c:209
+#, c-format
+msgid "renaming '%s' failed"
+msgstr "Umbenennen von \"%s\" fehlgeschlagen"
+
+#: builtin/notes.c:122
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr "kann \"show\" für Objekt \"%s\" nicht starten"
+
+#: builtin/notes.c:128
+msgid "can't fdopen 'show' output fd"
+msgstr "\"show\"-Ausgabenfiledeskriptor nicht fdopen-öffenbar"
+
+#: builtin/notes.c:138
+#, c-format
+msgid "failed to close pipe to 'show' for object '%s'"
+msgstr "konnte Pipe zu \"show\" für Objekt \"%s\" nicht schließen"
+
+#: builtin/notes.c:141
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr "konnte \"show\" für Objekt \"%s\" nicht beenden"
+
+#: builtin/notes.c:158 builtin/tag.c:311
+#, c-format
+msgid "could not create file '%s'"
+msgstr "konnte Datei \"%s\" nicht anlegen"
+
+#: builtin/notes.c:172
+msgid "Please supply the note contents using either -m or -F option"
+msgstr "Gib den Inhalt der Notiz entweder mit der Option -m oder -F an"
+
+#: builtin/notes.c:193 builtin/notes.c:797
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr "Entferne Notiz für Objekt %s\n"
+
+#: builtin/notes.c:198
+msgid "unable to write note object"
+msgstr "konnte Notizobjekt nicht schreiben"
+
+#: builtin/notes.c:200
+#, c-format
+msgid "The note contents has been left in %s"
+msgstr "Der Inhalt der Notiz wurde nach \"%s\" gesichert"
+
+#: builtin/notes.c:234 builtin/tag.c:445
+#, c-format
+msgid "cannot read '%s'"
+msgstr "kann \"%s\" nicht auslesen"
+
+#: builtin/notes.c:236 builtin/tag.c:448
+#, c-format
+msgid "could not open or read '%s'"
+msgstr "Konnte \"%s\" nicht öffnen oder auslesen"
+
+#: builtin/notes.c:255 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:508 builtin/notes.c:560 builtin/notes.c:631
+#: builtin/notes.c:636 builtin/notes.c:710 builtin/notes.c:752
+#: builtin/notes.c:789 builtin/reset.c:303 builtin/tag.c:461
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr "Konnte \"%s\" nicht als gültige Referenz auflösen."
+
+#: builtin/notes.c:258
+#, c-format
+msgid "Failed to read object '%s'."
+msgstr "Konnte Objekt \"%s\" nicht lesen."
+
+#: builtin/notes.c:283
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr ""
+"Kann nicht-initialisierten/nicht-referenzierten Notizenbaum nicht committen"
+
+#: builtin/notes.c:295
+msgid "Failed to write current notes tree to database"
+msgstr ""
+"Fehler beim Versuch, aktuellen Notizenbaum in die Datenbank zu schreiben"
+
+#: builtin/notes.c:307
+msgid "Failed to commit notes tree to database"
+msgstr "Konnte Notizenbaum nicht in Datenbank schreiben."
+
+#: builtin/notes.c:339
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr "Ungültiger Wert für notes.rewriteMode: \"%s\""
+
+#: builtin/notes.c:349
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr "Überschreiben von Notizen in %s (außerhalb von refs/notes/) verweigert"
+
+#. TRANSLATORS: The first %s is the name of the
+#. environment variable, the second %s is its value
+#: builtin/notes.c:376
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr "Ungültiger Wert für %s: \"%s\""
+
+#: builtin/notes.c:440
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr "Ungültige Eingabezeile: \"%s\"."
+
+#: builtin/notes.c:455
+#, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr "Fehler beim Kopieren der Notizen von \"%s\" nach \"%s\""
+
+#. TRANSLATORS: The first %s is one of "git notes ACTION",
+#. e.g. "add", "copy", "append" etc.
+#: builtin/notes.c:481
+#, c-format
+msgid "Refusing to %s notes in %s (outside of refs/notes/)"
+msgstr "%s von Notizen in %s (außerhalb von refs/notes/) verweigert"
+
+#: builtin/notes.c:501 builtin/notes.c:553 builtin/notes.c:614
+#: builtin/notes.c:626 builtin/notes.c:698 builtin/notes.c:745
+#: builtin/notes.c:782 builtin/notes.c:821
+msgid "too many parameters"
+msgstr "zu viele Parameter"
+
+#: builtin/notes.c:505
+msgid "list"
+msgstr "Auflistung"
+
+#: builtin/notes.c:514 builtin/notes.c:758
+#, c-format
+msgid "No note found for object %s."
+msgstr "Keine Notiz für Objekt %s gefunden."
+
+#: builtin/notes.c:562
+msgid "add"
+msgstr "füge hinzu"
+
+#: builtin/notes.c:567
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Kann Notizen nicht hinzufügen. Es gibt bereits Notizen für Objekt %s. "
+"Verwende Option -f zum Überschreiben."
+
+#: builtin/notes.c:572 builtin/notes.c:649
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr "Überschreibe existierende Notizen für Objekt %s\n"
+
+#: builtin/notes.c:622
+msgid "too few parameters"
+msgstr "zu wenige Parameter"
+
+#: builtin/notes.c:638
+msgid "copy"
+msgstr "Kopie"
+
+#: builtin/notes.c:643
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Kann Notizen nicht kopieren. Es gibt bereits Notizen für Objekt %s. Verwende "
+"Option -f zum Überschreiben."
+
+#: builtin/notes.c:655
+#, c-format
+msgid "Missing notes on source object %s. Cannot copy."
+msgstr "Fehlende Notizen zum Quellobjekt %s. Kopie nicht erstellbar."
+
+#: builtin/notes.c:703
+#, 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 ""
+"Die Optionen -m, -F, -c und -C für den \"edit\"-Unterbefehl sind veraltet.\n"
+"Verwende stattdessen `git notes add -f -m/-F/-c/-C`.\n"
+
+# "Refusing to %s notes" <-> "%s von Notizen"
+#: builtin/notes.c:754
+msgid "show"
+msgstr "Anziegen"
+
+#: builtin/notes.c:791
+msgid "remove"
+msgstr "Löschen"
+
+#: builtin/notes.c:795
+#, c-format
+msgid "Object %s has no note\n"
+msgstr "Objekt %s hat keine Notiz\n"
+
+#: builtin/notes.c:825
+msgid "prune"
+msgstr "Trimmen"
+
+#: builtin/notes.c:877
+#, c-format
+msgid "Unknown subcommand: %s"
+msgstr "Unbekannter Unterbefehl: %s"
+
+#: builtin/push.c:43
+msgid "tag shorthand without <tag>"
+msgstr "Tag-Kurzschreibweise ohne <Tag>"
+
+#: builtin/push.c:62
+msgid "--delete only accepts plain target ref names"
+msgstr "--delete akzeptiert nur einfache Referenzen (keine Refspecs)"
+
+#: builtin/push.c:72
+msgid "You are not currently on a branch."
+msgstr "Gegenwärtig auf keiner Branch."
+
+#: builtin/push.c:74
+#, c-format
+msgid "The current branch %s is not tracking anything."
+msgstr "Die aktuelle Branch %s verfolgt nichts."
+
+#: builtin/push.c:77
+#, c-format
+msgid "The current branch %s is tracking multiple branches, refusing to push."
+msgstr ""
+"Die aktuelle Branch %s verfolgt mehrere Branches, daher \"push\" verweigert."
+
+#: builtin/push.c:100
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+"Es wurden keine Refspecs zur Übertragung angegeben, und push.default ist auf "
+"\"nothing\" gesetzt."
+
+#: builtin/push.c:120
+#, c-format
+msgid "Pushing to %s\n"
+msgstr "Übertrage zu %s\n"
+
+#: builtin/push.c:124
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr "Übertragen einiger Referenzen nach \"%s\" fehlgeschlagen"
+
+# TODO: Verweis auf Manpage aktualisieren, sobald wir die auch übersetzen
+#: builtin/push.c:132
+#, c-format
+msgid ""
+"To prevent you from losing history, non-fast-forward updates were rejected\n"
+"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
+"'Note about fast-forwards' section of 'git push --help' for details.\n"
+msgstr ""
+"Um zu verhindern, dass du Daten verloren gehen, wurden Updates, die einen\n"
+"Merge-Commit erfordern, zurückgewiesen. Merge die Änderungen im\n"
+"Ursprungs-Repository (z.B. `git pull`), bevor du es nochmal versuchst.\n"
+"Siehe Abschnitt \"Note about fast-forwards\" von `git push --help` für\n"
+"weitere Informationen.\n"
+
+#: builtin/push.c:149
+#, c-format
+msgid "bad repository '%s'"
+msgstr "ungültiges Repository \"%s\""
+
+#: builtin/push.c:150
+msgid "No destination configured to push to."
+msgstr "Kein Ziel für Übertragung festgelegt."
+
+#: builtin/push.c:158
+msgid "--all and --tags are incompatible"
+msgstr "--all kann nicht mit --tags kombiniert werden"
+
+#: builtin/push.c:159
+msgid "--all can't be combined with refspecs"
+msgstr "--all kann nicht mit Refspecs kombiniert werden"
+
+#: builtin/push.c:164
+msgid "--mirror and --tags are incompatible"
+msgstr "--mirror kann nicht mit --tags kombiniert werden"
+
+#: builtin/push.c:165
+msgid "--mirror can't be combined with refspecs"
+msgstr "--mirror kann nicht mit Refspecs kombiniert werden"
+
+#: builtin/push.c:170
+msgid "--all and --mirror are incompatible"
+msgstr "--all kann nicht mit --mirror kombiniert werden"
+
+#: builtin/push.c:235
+msgid "--delete is incompatible with --all, --mirror and --tags"
+msgstr "--delete kann weder mit --all, --mirror noch --tags kombiniert werden"
+
+#: builtin/push.c:237
+msgid "--delete doesn't make sense without any refs"
+msgstr "--delete ergibt ohne Angabe von Referenzen keinen Sinn"
+
+# Originalwerte für diese Strings belassen wg. Übereinstimmung mit
+# Optionsnamen
+#: builtin/reset.c:33
+msgid "mixed"
+msgstr "Mixed"
+
+#: builtin/reset.c:33
+msgid "soft"
+msgstr "Soft"
+
+#: builtin/reset.c:33
+msgid "hard"
+msgstr "Hard"
+
+#: builtin/reset.c:33
+msgid "merge"
+msgstr "Merge"
+
+#: builtin/reset.c:33
+msgid "keep"
+msgstr "Keep"
+
+#: builtin/reset.c:95
+msgid "You do not have a valid HEAD."
+msgstr "Du hast keinen gültigen HEAD."
+
+#: builtin/reset.c:97
+msgid "Failed to find tree of HEAD."
+msgstr "Konnte Baum von HEAD nicht finden."
+
+#: builtin/reset.c:103
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr "Konnte Baum von %s nicht finden."
+
+#: builtin/reset.c:108
+msgid "Could not write new index file."
+msgstr "Konnte neue Indexdatei nicht anlegen."
+
+#: builtin/reset.c:118
+#, c-format
+msgid "HEAD is now at %s"
+msgstr "HEAD zeigt jetzt auf %s"
+
+#: builtin/reset.c:142
+msgid "Could not read index"
+msgstr "Konnte den Index nicht lesen"
+
+#: builtin/reset.c:145
+msgid "Unstaged changes after reset:"
+msgstr "Nicht vorgemerkte Änderungen nach Reset:"
+
+#: builtin/reset.c:225
+#, c-format
+msgid "Reflog action message too long: %.*s..."
+msgstr "Aktionsbeschreibung im Reflog zu lang: %.*s..."
+
+#: builtin/reset.c:231
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr "Kann keinen %s-Reset mitten in einem Merge machen."
+
+#: builtin/reset.c:307
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr "Konnte Objekt \"%s\" nicht verstehen."
+
+#: builtin/reset.c:312
+msgid "--patch is incompatible with --{hard,mixed,soft}"
+msgstr "--patch kann nicht mit --{hard,mixed,soft} kombiniert werden"
+
+#: builtin/reset.c:321
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+"--mixed mit Pfaden ist veraltet; verwende stattdessen `git reset -- <Pfade>`."
+
+#: builtin/reset.c:323
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr "Kann keinen %s-Reset mit Pfadangaben durchführen."
+
+#: builtin/reset.c:335
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr "%s-Reset ist in einem Lager-Repository nicht erlaubt"
+
+#: builtin/reset.c:351
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr "Konnte Indexdatei nicht auf Revision \"%s\" zurücksetzen."
+
+#: builtin/revert.c:82
+msgid "program error"
+msgstr "Programmfehler"
+
+#: builtin/revert.c:154 builtin/revert.c:188
+#, c-format
+msgid "Could not read commit message of %s"
+msgstr "konnte Commit-Kommentar nicht lesen: %s"
+
+#: builtin/revert.c:202
+#, c-format
+msgid "Could not extract author email from %s"
+msgstr "Konnte E-Mail-Adresse des Autors nicht aus %s entnehmen"
+
+#: builtin/revert.c:214
+#, c-format
+msgid "Could not extract author time from %s"
+msgstr "Konnte Erstelldatum nicht aus %s entnehmen"
+
+#: builtin/revert.c:230
+#, c-format
+msgid "No author information found in %s"
+msgstr "Keine Autoreninformationen in %s gefunden"
+
+#: builtin/revert.c:267
+#, c-format
+msgid "Could not write to %s."
+msgstr "Konnte nicht nach \"%s\" schreiben"
+
+#: builtin/revert.c:270
+#, c-format
+msgid "Error wrapping up %s"
+msgstr "Fehler beim Aufräumen von %s"
+
+#: builtin/revert.c:290
+msgid ""
+"Your local changes would be overwritten by revert.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+"Lokale Änderungen würden durch revert überschrieben werden.\n"
+"Committe oder stashe die Änderungen um fortzufahren."
+
+#: builtin/revert.c:293
+msgid ""
+"Your local changes would be overwritten by cherry-pick.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+"Lokale Änderungen würden durch cherry-pick überschrieben werden.\n"
+"Committe oder stashe die Änderungen um fortzufahren."
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:351
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr "%s: Konnte neue Indexdatei nicht schreiben"
+
+#: builtin/revert.c:417
+msgid "Your index file is unmerged."
+msgstr "Der Index enthält Konflikte."
+
+#: builtin/revert.c:420
+msgid "You do not have a valid HEAD"
+msgstr "Du hast keinen gültigen HEAD."
+
+#: builtin/revert.c:428
+msgid "Cannot revert a root commit"
+msgstr "Kann einen Wurzel-Commit nicht umkehren"
+
+#: builtin/revert.c:437
+#, c-format
+msgid "Commit %s is a merge but no -m option was given."
+msgstr "Commit %s ist ein Merge, aber Option -m wurde nicht angegeben."
+
+#: builtin/revert.c:445
+#, c-format
+msgid "Commit %s does not have parent %d"
+msgstr "Commit %s hat keinen Vorgänger %d"
+
+#: builtin/revert.c:449
+#, c-format
+msgid "Mainline was specified but commit %s is not a merge."
+msgstr "Mainline wurde angegeben, aber Commit %s ist kein Merge."
+
+#. TRANSLATORS: The first %s will be "revert" or
+#. "cherry-pick", the second %s a SHA1
+#: builtin/revert.c:460
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr "%s: konnte Vorgänger-Commit %s nicht analysieren"
+
+#: builtin/revert.c:464
+#, c-format
+msgid "Cannot get commit message for %s"
+msgstr "konnte Commit-Kommentar für %s nicht lesen"
+
+#: builtin/revert.c:525
+#, c-format
+msgid "could not revert %s... %s"
+msgstr "konnte \"%s\" nicht umkehren... %s"
+
+#: builtin/revert.c:526
+#, c-format
+msgid "could not apply %s... %s"
+msgstr "Konnte \"%s\" nicht anwenden... %s"
+
+#: builtin/revert.c:559
+msgid "empty commit set passed"
+msgstr "Leere Commitliste übergeben"
+
+#: builtin/revert.c:573
+msgid "cherry-pick --ff cannot be used with --signoff"
+msgstr "cherry-pick --ff kann nicht mit --signoff kombiniert werden"
+
+#: builtin/revert.c:575
+msgid "cherry-pick --ff cannot be used with --no-commit"
+msgstr "cherry-pick --ff kann nicht mit --no-commit kombiniert werden"
+
+#: builtin/revert.c:577
+msgid "cherry-pick --ff cannot be used with -x"
+msgstr "cherry-pick --ff kann nicht mit -x kombiniert werden"
+
+#: builtin/revert.c:579
+msgid "cherry-pick --ff cannot be used with --edit"
+msgstr "cherry-pick --ff kann nicht mit --edit kombiniert werden"
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:584
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr "git %s: konnte den Index nicht auslesen"
+
+#: builtin/rm.c:118
+#, c-format
+msgid ""
+"'%s' has staged content different from both the file and the HEAD\n"
+"(use -f to force removal)"
+msgstr ""
+"\"%s\" hat vorgemerkte Änderungen, die sich sowohl von der Datei als auch "
+"vom letzten Commit unterscheiden (Verwende -f, um trotzdem zu löschen)"
+
+#: builtin/rm.c:124
+#, c-format
+msgid ""
+"'%s' has changes staged in the index\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+"\"%s\" hat Änderungen im Index vorgemerkt\n"
+"(Verwende --cached, um die Datei zu behalten, oder -f, um trotzdem zu "
+"löschen)"
+
+#: builtin/rm.c:128
+#, c-format
+msgid ""
+"'%s' has local modifications\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+"\"%s\" hat lokale Änderungen\n"
+"(Verwende --cached, um die Datei zu behalten, oder -f, um trotzdem zu "
+"löschen)"
+
+#: builtin/rm.c:202
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr "Verzeichnis \"%s\" wird ohne -r nicht rekursiv gelöscht"
+
+#: builtin/rm.c:238
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr "git rm: kann \"%s\" nicht entfernen"
+
+#: builtin/shortlog.c:161
+#, c-format
+msgid "Missing author: %s"
+msgstr "Fehlender Autor: %s"
+
+#: builtin/tag.c:123 builtin/tag.c:464
+#, c-format
+msgid "tag name too long: %.*s..."
+msgstr "Tagname zu lang: %.*s..."
+
+#: builtin/tag.c:128
+#, c-format
+msgid "tag '%s' not found."
+msgstr "Tag \"%s\" nicht gefunden."
+
+#: builtin/tag.c:143
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr "Tag \"%s\" gelöscht (war %s)\n"
+
+#: builtin/tag.c:155
+#, c-format
+msgid "could not verify the tag '%s'"
+msgstr "konnte den Tag \"%s\" nicht überprüfen"
+
+#: builtin/tag.c:170
+msgid "committer info too long."
+msgstr "Committer-Angabe zu lang."
+
+#: builtin/tag.c:190
+msgid "could not run gpg."
+msgstr "konnte gpg nicht ausführen."
+
+#: builtin/tag.c:196
+msgid "gpg did not accept the tag data"
+msgstr "gpg hat die Tag-Daten nicht angenommen"
+
+#: builtin/tag.c:203
+msgid "gpg failed to sign the tag"
+msgstr "gpg konnte den Tag nicht signieren"
+
+#: builtin/tag.c:218
+msgid ""
+"\n"
+"#\n"
+"# Write a tag message\n"
+"#\n"
+msgstr ""
+"\n"
+"#\n"
+"# Schreibe einen Tag-Kommentar\n"
+"#\n"
+
+#: builtin/tag.c:226
+#, c-format
+msgid "signing key value too long (%.10s...)"
+msgstr "Signaturschlüsselwert zu lang (%.10s...)"
+
+#: builtin/tag.c:272
+msgid "unable to sign the tag"
+msgstr "kann den Tag nicht signieren"
+
+#: builtin/tag.c:274
+msgid "unable to write tag file"
+msgstr "kann die Tag-Datei nicht anlegen"
+
+#: builtin/tag.c:289
+msgid "bad object type."
+msgstr "ungültiger Objekttyp."
+
+#: builtin/tag.c:302
+msgid "tag header too big."
+msgstr "Tag-Header zu groß."
+
+#: builtin/tag.c:329
+msgid "no tag message?"
+msgstr "kein Tag-Kommentar?"
+
+#: builtin/tag.c:335
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr "Der Tag-Kommentar wurde in %s hinterlassen\n"
+
+#: builtin/tag.c:428
+msgid "-n option is only allowed with -l."
+msgstr "-n ist nur in Verbindung mit -l erlaubt."
+
+#: builtin/tag.c:430
+msgid "--contains option is only allowed with -l."
+msgstr "--contains ist nur in Verbindung mit -l erlaubt."
+
+#: builtin/tag.c:438
+msgid "only one -F or -m option is allowed."
+msgstr "-F kann nicht mit -m kombiniert werden."
+
+#: builtin/tag.c:458
+msgid "too many params"
+msgstr "zu viele Parameter"
+
+#: builtin/tag.c:466
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr "'%s' ist kein gültiger Tagname."
+
+#: builtin/tag.c:471
+#, c-format
+msgid "tag '%s' already exists"
+msgstr "Tag '%s' existiert bereits"
+
+#: builtin/tag.c:479
+#, c-format
+msgid "%s: cannot lock the ref"
+msgstr "%s: kann die Referenz nicht sperren"
+
+#: builtin/tag.c:481
+#, c-format
+msgid "%s: cannot update the ref"
+msgstr "%s: kann die Referenz nicht aktualisieren"
+
+#: builtin/tag.c:483
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr "Tag '%s' aktualisiert (war %s)\n"
+
+#: git-am.sh:47
+msgid "You need to set your committer info first"
+msgstr "Committer-Info muss zunächst gesetzt werden"
+
+#: git-am.sh:80
+#, sh-format
+msgid ""
+"When you have resolved this problem run \"$cmdline --resolved\".\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+"Sobald das Problem gelöst ist, führe \\`$cmdline --resolved``` aus.\n"
+"Soll dieser Patch stattdessen übersprungen werden, verwende \\`$cmdline --"
+"skip\\`.\n"
+"Um die ursprüngliche Branch wiederherzustellen und den Patchvorgang zu "
+"stoppen, verwende \\`$cmdline --abort\\`."
+
+#: git-am.sh:96
+msgid "Cannot fall back to three-way merge."
+msgstr "Kann den 3-Wege-Merge auch nicht durchführen."
+
+#: git-am.sh:111
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+"Dem Repository fehlen die nötigen Blobs um einen 3-Wege-Merge durchzuführen."
+
+#: git-am.sh:120
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+"Wurde der Patch per Hand verändert?\n"
+"Er passt nicht auf die in dessen Index angegebenen Blobs."
+
+#: git-am.sh:236
+msgid "Only one StGIT patch series can be applied at once"
+msgstr "Es kann maximal eine StGIT-Patchserie auf einmal angewandt werden"
+
+#: git-am.sh:288
+#, sh-format
+msgid "Patch format $patch_format is not supported."
+msgstr "Patchformat $patch_format wird nicht unterstützt."
+
+#: git-am.sh:290
+msgid "Patch format detection failed."
+msgstr "Patchformaterkennung fehlgeschlagen."
+
+#: git-am.sh:340
+msgid "-d option is no longer supported. Do not use."
+msgstr "Die Option -d wird nicht länger unterstützt."
+
+#: git-am.sh:403
+#, sh-format
+msgid "previous rebase directory $dotest still exists but mbox given."
+msgstr ""
+"vorheriges Rebase-Verzeichnis $dotest existiert noch, aber trotzdem wurde "
+"eine mbox angegeben."
+
+#: git-am.sh:408
+msgid "Please make up your mind. --skip or --abort?"
+msgstr "Entscheidungsprobleme? --skip oder --abort."
+
+#: git-am.sh:434
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr "Lösungsvorgang nicht aktiv, es wird auch nicht weitergemacht."
+
+#: git-am.sh:499
+#, sh-format
+msgid "Dirty index: cannot apply patches (dirty: $files)"
+msgstr "Geänderter Index: kann Patches nicht anwenden (geändert: $files)"
+
+#: git-am.sh:595
+#, sh-format
+msgid ""
+"Patch is empty. Was it split wrong?\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+"Der Patch ist leer. Wurde er falsch aufgeteilt?\n"
+"Überspringen des Patches mittels \\\\`$cmdline --skip\\\\`.\n"
+"Um die ursprüngle Branch wiederherstellen und den Patchvorgang zu stoppen, "
+"verwendet \\\\`$cmdline --abort\\\\`."
+
+#: git-am.sh:632
+msgid "Patch does not have a valid e-mail address."
+msgstr "Pfad \"%s\" hat keine drei verschiedenen Versionen im Index"
+
+#: git-am.sh:679
+msgid "cannot be interactive without stdin connected to a terminal."
+msgstr ""
+"Für den Interaktivmodus muss die Standardeingabe mit einem Terminal "
+"verbunden sein."
+
+#: git-am.sh:683
+msgid "Commit Body is:"
+msgstr "Commitinhalt ist:"
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#: git-am.sh:690
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+msgstr "Anwenden? Ja(y)/(N)ein/B(e)arbeiten/Ansehen(v)/Alle (a)kzeptieren"
+
+#: git-am.sh:726
+#, sh-format
+msgid "Applying: $FIRSTLINE"
+msgstr "Wende an: $FIRSTLINE"
+
+#: git-am.sh:747
+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 ""
+"Keine Änderungen - vergessen, \\`git add\\` zu verwenden?\n"
+"Gibt es nichts weiter zum Vormerken, so ist es möglich, dass bereits etwas "
+"zuvor die Änderungen eingepflegt hat; überspringe ggf. diesen Patch."
+
+#: git-am.sh:755
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+"Es gibt noch kollidierende Änderungen im Index.\n"
+"Vergessen, \\`git add\\` zu verwenden?"
+
+#: git-am.sh:771
+msgid "No changes -- Patch already applied."
+msgstr "Keine Änderungen -- Patch bereits angewendet."
+
+#: git-am.sh:781
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "Patch fehlgeschlagen bei $msgnum $FIRSTLINE"
+
+#: git-am.sh:797
+msgid "applying to an empty history"
+msgstr "Anwenden auf leere History"
+
+#: git-bisect.sh:39
+msgid "You need to start by \"git bisect start\""
+msgstr "Bisect muss mittels \\`git bisect start\\` begonnen werden"
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-bisect.sh:45
+msgid "Do you want me to do it for you [Y/n]? "
+msgstr "Soll dies nun ausgeführt werden [Y/n]?"
+
+#: git-bisect.sh:64
+msgid "Bad HEAD - I need a HEAD"
+msgstr "Ungültiger HEAD - es wird ein HEAD benötigt"
+
+#: git-bisect.sh:83
+msgid "won't bisect on seeked tree"
+msgstr "Bisektion auf gespultem Baum abgelehnt"
+
+#: git-bisect.sh:87
+msgid "Bad HEAD - strange symbolic ref"
+msgstr "Ungültiger HEAD - komische symbolische Referenz"
+
+#: git-bisect.sh:117
+#, sh-format
+msgid "'$arg' does not appear to be a valid revision"
+msgstr "\\\"$arg\\\" scheint keine gültige Revision zu sein"
+
+#: git-bisect.sh:162
+#, sh-format
+msgid "Bad bisect_write argument: $state"
+msgstr "Ungültiger Parameter zu bisect_write: $state"
+
+#: git-bisect.sh:190
+#, sh-format
+msgid "Bad rev input: $arg"
+msgstr "Ungültige Revisions-Eingabe: $arg"
+
+#: git-bisect.sh:204
+msgid "Please call 'bisect_state' with at least one argument."
+msgstr "Rufe \\\"bisect_state\\\" mit mindestens einem Argument auf."
+
+#: git-bisect.sh:207
+msgid "Bad rev input: HEAD"
+msgstr "Ungültige Revisions-Eingabe: HEAD"
+
+#: git-bisect.sh:216
+#, sh-format
+msgid "Bad rev input: $rev"
+msgstr "Ungültige Revisions-Eingabe: $rev"
+
+#: git-bisect.sh:222
+msgid "'git bisect bad' can take only one argument."
+msgstr "\\`git bisect bad\\` kann nur mit einem Argument verwendet werden."
+
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:245
+msgid "Warning: bisecting only with a bad commit."
+msgstr "Warnung: Bisektion mit nur einem schlechten Commit."
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-bisect.sh:251
+msgid "Are you sure [Y/n]? "
+msgstr "Sicher [Y/n]?"
+
+#: git-bisect.sh:261
+msgid ""
+"You need to give me at least one good and one bad revisions.\n"
+"(You can use \"git bisect bad\" and \"git bisect good\" for that.)"
+msgstr ""
+"Die Angabe von mindestens einer guten und einer schlechten Revision ist "
+"erforderlich.\n"
+"(Verwende \\`git bisect bad\\` und \\`git bisect good\\`.)"
+
+#: git-bisect.sh:264
+msgid ""
+"You need to start by \"git bisect start\".\n"
+"You then need to give me at least one good and one bad revisions.\n"
+"(You can use \"git bisect bad\" and \"git bisect good\" for that.)"
+msgstr ""
+"Bisektion ist mittels \\`git bisect start\\` zu starten.\n"
+"Danach ist mindestens eine gute und eine schlechte Revision anzugeben.\n"
+"(Verwende dazu \\`git bisect good\\` und \\`git bisect bad\\`.)"
+
+#: git-bisect.sh:316
+msgid "We are not bisecting."
+msgstr "Gegenwärtig läuft keine Bisektion."
+
+#: git-bisect.sh:323
+#, sh-format
+msgid "'$invalid' is not a valid commit"
+msgstr "\"$invalid\" ist kein gültiger Commit"
+
+#: git-bisect.sh:352
+#, sh-format
+msgid "cannot read $file for replaying"
+msgstr "kann Datei $file zur Wiederholung der Operation nicht lesen"
+
+#: git-bisect.sh:368
+msgid "?? what are you talking about?"
+msgstr "Ungültiger Unterbefehl"
+
+#: git-bisect.sh:380
+#, sh-format
+msgid "running $command"
+msgstr "Ausführen von $command"
+
+#: git-bisect.sh:386
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+"bisect run fehlgeschlagen:\n"
+"Fehlercode $res von \\`$command\\` ist < 0 oder >= 128"
+
+#: git-bisect.sh:409
+msgid "bisect run cannot continue any more"
+msgstr "\\`bisect run\\` kann nicht mehr weitermachen"
+
+#: git-bisect.sh:414
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+"bisect run fehlgeschlagen:\n"
+"\\`bisect_state $state\\` endete mit Fehlercode $res"
+
+#: git-bisect.sh:420
+msgid "bisect run success"
+msgstr "bisect run success"
+
+#: git-pull.sh:21
+msgid ""
+"Pull is not possible because you have unmerged files.\n"
+"Please, fix them up in the work tree, and then use 'git add/rm <file>'\n"
+"as appropriate to mark resolution, or use 'git commit -a'."
+msgstr ""
+"Pull ist nicht möglich, da noch Konflikte in Dateien bestehen.\n"
+"Bereinige das Arbeitsverzeichnis und verwende zur Auflösung\n"
+"entsprechend \\`git add/rm <Datei>\\`, oder \\`git commit -a\\`."
+
+#: git-pull.sh:25
+msgid "Pull is not possible because you have unmerged files."
+msgstr "Pull ist nicht möglich, da noch Konflikte in Dateien bestehen."
+
+#: git-pull.sh:141
+msgid ""
+"There is no candidate for rebasing against among the refs that you just "
+"fetched.\n"
+"Generally this means that you provided a wildcard refspec which had no\n"
+"matches on the remote end."
+msgstr ""
+"Entlang der soeben geholten Refs gibt es keinen Kandidat, auf den rebased\n"
+"werden könnte. Generell bedeutet dies, dass eine Wildcard-Refspec angegeben\n"
+"wurde, die auf der entfernten Seite keinen Treffer erzielte."
+
+#: git-pull.sh:145
+msgid ""
+"There are no candidates for merging against among the refs that you just "
+"fetched.\n"
+"Generally this means that you provided a wildcard refspec which had no\n"
+"matches on the remote end."
+msgstr ""
+"Entlang der soeben geholten Refs gibt es keine Kandidaten, mit denen "
+"gemerged\n"
+"werden könnte. Generell bedeutet dies, dass eine Wildcard-Refspec angegeben\n"
+"wurde, die auf der entfernten Seite keinen Treffer erzielte."
+
+#. TRANSLATORS: $requested_remote will be a remote name, like
+#. "origin" or "avar"
+#: git-pull.sh:153
+#, sh-format
+msgid ""
+"You asked to pull from the remote '$requested_remote', 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 ""
+"Da die gegenwärtige Branch nicht der für den Remote als Standard definierten "
+"Branch entspricht, ist beim Pull von \"$requested_remote\" eine Branch "
+"anzugeben."
+
+#: git-pull.sh:157
+msgid ""
+"You are not currently on a branch, so I cannot use any\n"
+"'branch.<branchname>.merge' in your configuration file.\n"
+"Please specify which remote branch you want to use on the command\n"
+"line and try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details."
+msgstr ""
+"Gegenwärtig ist keine Branch aktiv, weshalb keine in der Konfigurationsdatei "
+"festgelegten \"branch.<branchname>.merge\" verwendet werden können.\n"
+"Gib die zu verwendende Branch mit an (z.B. \\`git pull <repository> <refspec>"
+"\\`).\n"
+"Siehe git-pull(1) für weiter Informationen."
+
+#: git-pull.sh:165
+#, sh-format
+msgid ""
+"You asked me to pull without telling me which branch you\n"
+"want to rebase against, and 'branch.${curr_branch}.merge' in\n"
+"your configuration file does not tell me, either. Please\n"
+"specify which branch you want to use on the command line and\n"
+"try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details.\n"
+"\n"
+"If you often rebase against the same branch, you may want to\n"
+"use something like the following in your configuration file:\n"
+"\n"
+" [branch \"${curr_branch}\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+" rebase = true\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"See git-config(1) for details."
+msgstr ""
+"Es wurde keine Branch, auf die rebased werden soll, angegeben; auch \"branch."
+"$curr_branch.merge\" in der Konfigurationsdatei ist nicht gesetzt. Gib die "
+"zu verwendende Branch mit an (z.B. \\`git pull <repository> <refspec>\\`).\n"
+"Siehe git-pull(1) für weitere Informationen.\n"
+"\n"
+"Falls oft auf die gleiche Branch rebased wird, kann folgendes Konstrukt in "
+"der Konfigurationsdatei verwendet werden:\n"
+"\n"
+" [branch \"$curr_branch\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+" rebase = true\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"Siehe git-config(1) für weitere Informationen."
+
+#: git-pull.sh:186
+#, sh-format
+msgid ""
+"You asked me to pull without telling me which branch you\n"
+"want to merge with, and 'branch.${curr_branch}.merge' in\n"
+"your configuration file does not tell me, either. Please\n"
+"specify which branch you want to use on the command line and\n"
+"try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details.\n"
+"\n"
+"If you often merge with the same branch, you may want to\n"
+"use something like the following in your configuration file:\n"
+"\n"
+" [branch \"${curr_branch}\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"See git-config(1) for details."
+msgstr ""
+"Es wurde keine Branch, mit der gemerged werden soll, angegeben; auch "
+"\"branch.$curr_branch.merge\" in der Konfigurationsdatei ist nicht gesetzt. "
+"Gib die zu verwendende Branch mit an (z.B. \\`git pull <repository> <refspec>"
+"\\`).\n"
+"Siehe git-pull(1) für weitere Informationen.\n"
+"\n"
+"Falls oft mit der gleichen Branch gemerged wird, kann folgendes Konstrukt in "
+"der Konfigurationsdatei verwendet werden:\n"
+"\n"
+" [branch \"$curr_branch\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"Siehe git-config(1) für weitere Informationen."
+
+#: git-pull.sh:210
+#, sh-format
+msgid ""
+"Your configuration specifies to rebase against the ref '$upstream_branch'\n"
+"from the remote, but no such ref was fetched."
+msgstr ""
+"Die Konfiguration gibt an, dass die Referenz \"$upstream_branch\" des "
+"Remotes zum Rebasen verwendet werden soll, aber keine solche Referenz wurde "
+"geholt."
+
+#: git-pull.sh:213
+#, sh-format
+msgid ""
+"Your configuration specifies to merge with the ref '$upstream_branch'\n"
+"from the remote, but no such ref was fetched."
+msgstr ""
+"Die Konfiguration gibt an, dass die Referenz \"$upstream_branch\" des "
+"Remotes zu merge sei, aber keine solche Referenz wurde geholt."
+
+#: git-pull.sh:226
+msgid "updating an unborn branch with changes added to the index"
+msgstr "Update eine ungeborene Branch mit Änderungen aus dem/in den(?) Index"
+
+#: git-pull.sh:232
+msgid "refusing to pull with rebase: your working tree is not up-to-date"
+msgstr "Verweigerung des Pull mit Rebase: die Arbeitskopie ist nicht aktuell"
+
+#. The fetch involved updating the current branch.
+#. The working tree and the index file is still based on the
+#. $orig_head commit, but we are merging into $curr_head.
+#. First update the working tree to match $curr_head.
+#: git-pull.sh:260
+#, sh-format
+msgid ""
+"Warning: fetch updated the current branch head.\n"
+"Warning: fast-forwarding your working tree from\n"
+"Warning: commit $orig_head."
+msgstr ""
+"Warnung: fetch aktualisierte den aktuellen Branch-HEAD.\n"
+"Warnung: Update der Arbeitskopie von Commit $orig_head aus ohne Merge."
+
+# Die Originalumschreibung "exactly one commit" ist irreführend; es geht
+# natürlich um die gesamte History hinter diesem Commit
+#: git-pull.sh:285
+msgid "Cannot merge multiple branches into empty head"
+msgstr "Kann nur exakt eine Historie in einen leeren HEAD mergen"
+
+#: git-pull.sh:289
+msgid "Cannot rebase onto multiple branches"
+msgstr "Kann nicht auf mehrere Branches rebasen"
+
+#: git-stash.sh:41
+msgid "git stash clear with parameters is unimplemented"
+msgstr ""
+"\\`git stash clear\\` ohne Angabe von Parametern wird nicht unterstützt"
+
+#: git-stash.sh:63
+msgid "You do not have the initial commit yet"
+msgstr "Es gibt noch keinen Wurzel-Commit"
+
+#: git-stash.sh:78
+msgid "Cannot save the current index state"
+msgstr "Kann den aktuellen Zustand des Index nicht speichern"
+
+#: git-stash.sh:94 git-stash.sh:107
+msgid "Cannot save the current worktree state"
+msgstr "Kann den aktuellen Zustand des Arbeitsverzeichnisses nicht speichern"
+
+#: git-stash.sh:111
+msgid "No changes selected"
+msgstr "Keine Änderungen ausgewählt"
+
+#: git-stash.sh:114
+msgid "Cannot remove temporary index (can't happen)"
+msgstr ""
+"Kann temporären Index nicht löschen (das sollte eigentlich nicht auftreten)"
+
+#: git-stash.sh:127
+msgid "Cannot record working tree state"
+msgstr "Kann Zustand des Arbeitsverzeichnis nicht aufzeichnen"
+
+#: git-stash.sh:176
+msgid "No local changes to save"
+msgstr "Keine lokalen Änderungen zum Abspeichern"
+
+#: git-stash.sh:180
+msgid "Cannot initialize stash"
+msgstr "Kann den Stash nicht initialisieren"
+
+#: git-stash.sh:188
+msgid "Cannot save the current status"
+msgstr "Kann den aktuellen Status nicht speichern"
+
+#: git-stash.sh:201
+msgid "Cannot remove worktree changes"
+msgstr "Kann Änderungen im Arbeitsverzeichnis nicht entfernen"
+
+#: git-stash.sh:296
+msgid "No stash found."
+msgstr "Keinen Stash gefunden."
+
+#: git-stash.sh:303
+#, sh-format
+msgid "Too many revisions specified: $REV"
+msgstr "Zuviele Revisionen angegeben: $REV"
+
+#: git-stash.sh:309
+#, sh-format
+msgid "$reference is not valid reference"
+msgstr "$reference ist keine gültige Referenz"
+
+#. maintainers: it would be better if git rev-parse indicated
+#. this condition with a non-zero status code but as of 1.7.2.1 it
+#. it did not. So, we use non-empty stderr output as a proxy for the
+#. condition of interest.
+#: git-stash.sh:330
+#, sh-format
+msgid "$REV does not exist in the stash log"
+msgstr "$REV existiert im Stash-Log nicht"
+
+#: git-stash.sh:344
+#, sh-format
+msgid "'$args' is not a stash-like commit"
+msgstr "\"$args\" ist kein Stash-Commit"
+
+#: git-stash.sh:355
+#, sh-format
+msgid "'$args' is not a stash reference"
+msgstr "\\\"$args\\\" ist keine Stash-Referenz"
+
+#: git-stash.sh:365
+msgid "Cannot apply to a dirty working tree, please stage your changes"
+msgstr ""
+"Kann Patch nicht auf eine geänderte Arbeitskopie anwenden; merke die "
+"Änderungen zunächst vor"
+
+#: git-stash.sh:369
+msgid "Cannot apply a stash in the middle of a merge"
+msgstr "Kann während eines Merges keinen Stash anwenden."
+
+#: git-stash.sh:377
+msgid "Conflicts in index. Try without --index."
+msgstr "Es existieren Konflikte im Index. Versuche es ohne --index."
+
+#: git-stash.sh:379
+msgid "Could not save index tree"
+msgstr "Konnte den Indexbaum nicht speichern"
+
+#: git-stash.sh:405
+msgid "Cannot unstage modified files"
+msgstr "Kann geänderte Dateien nicht rückmerken"
+
+#: git-stash.sh:419
+msgid "Index was not unstashed."
+msgstr "Es wurde kein Stash angewendet."
+
+#: git-stash.sh:436
+#, sh-format
+msgid "Dropped ${REV} ($s)"
+msgstr "$REV ($s) verworfen"
+
+#: git-stash.sh:437
+#, sh-format
+msgid "${REV}: Could not drop stash entry"
+msgstr "$REV: Konnte Stash-Eintrag nicht verwerfen"
+
+#: git-stash.sh:444
+msgid "No branch name specified"
+msgstr "Kein Branchname angegeben"
+
+#: git-stash.sh:515
+msgid "(To restore them type \"git stash apply\")"
+msgstr "(Zum Wiederherstellen \\`git stash apply\\` verwenden)"
+
+#: git-submodule.sh:38
+#, sh-format
+msgid "remote ($remote) does not have a url defined in .git/config"
+msgstr "Für Remote ($remote) ist in .git/config keine URL definiert"
+
+#: git-submodule.sh:79
+#, sh-format
+msgid "No submodule mapping found in .gitmodules for path '$path'"
+msgstr "Kein Submodul-Eintrag für Pfad \"$path\" in .gitmodules gefunden"
+
+#: git-submodule.sh:105
+#, sh-format
+msgid "Directory '$path' exists, but is neither empty nor a git repository"
+msgstr ""
+"Verzeichnis \"$path\" existiert, aber ist weder leer noch ein Git-Repository"
+
+#: git-submodule.sh:109
+#, sh-format
+msgid "A file already exist at path '$path'"
+msgstr "Es existiert bereits eine Datei am Pfad \"$path\""
+
+#: git-submodule.sh:117
+#, sh-format
+msgid "Clone of '$url' into submodule path '$path' failed"
+msgstr "Clone von \"$url\" in Submodul-Pfad \"$path\" fehlgeschlagen"
+
+#: git-submodule.sh:190
+#, sh-format
+msgid "repo URL: '$repo' must be absolute or begin with ./|../"
+msgstr "Repo-URL: \"$repo\" muss absolut sein oder mit ./|../ beginnen"
+
+#: git-submodule.sh:207
+#, sh-format
+msgid "'$path' already exists in the index"
+msgstr "\"$path\" existiert bereits im Index"
+
+#: git-submodule.sh:211
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$path\n"
+"Use -f if you really want to add it."
+msgstr ""
+"Der folgende Pfad ist mittels einer der .gitignore-Dateien ignoriert:\n"
+"$path\n"
+"Verwende -f um Hinzufügen zu erzwingen."
+
+#: git-submodule.sh:222
+#, sh-format
+msgid "Adding existing repo at '$path' to the index"
+msgstr "Füge bereits bestehendes Repository bei \"$path\" dem Index hinzu"
+
+#: git-submodule.sh:224
+#, sh-format
+msgid "'$path' already exists and is not a valid git repo"
+msgstr ""
+"Zielpfad \"$path\" existiert bereits und ist kein gültiges Git-Repository"
+
+#: git-submodule.sh:247
+#, sh-format
+msgid "Unable to checkout submodule '$path'"
+msgstr "Kann Submodul \"$path\" nicht auschecken"
+
+#: git-submodule.sh:251
+#, sh-format
+msgid "Failed to add submodule '$path'"
+msgstr "Konnte Submodul \"$path\" nicht hinzufügen"
+
+#: git-submodule.sh:256
+#, sh-format
+msgid "Failed to register submodule '$path'"
+msgstr "Registrierung des Submoduls \"$path\" fehlgeschlagen"
+
+#: git-submodule.sh:294
+#, sh-format
+msgid "Entering '$prefix$path'"
+msgstr "Wechsle nach \"$prefix$path\""
+
+#: git-submodule.sh:306
+#, sh-format
+msgid "Stopping at '$path'; script returned non-zero status."
+msgstr "Angehalten bei \"$path\"; Skript gab nicht-Null Status zurück."
+
+#: git-submodule.sh:349
+#, sh-format
+msgid "No url found for submodule path '$path' in .gitmodules"
+msgstr "Keine URL für Submodul-Pfad \"$path\" in .gitmodules gefunden"
+
+#: git-submodule.sh:359
+#, sh-format
+msgid "Failed to register url for submodule path '$path'"
+msgstr "Registrierung der URL für Submodul-Pfad \"$path\" fehlgeschlagen"
+
+#: git-submodule.sh:364
+#, sh-format
+msgid "Failed to register update mode for submodule path '$path'"
+msgstr ""
+"Registrierung des Update-Modus für Submodul-Pfad \"$path\" fehlgeschlagen"
+
+#: git-submodule.sh:366
+#, sh-format
+msgid "Submodule '$name' ($url) registered for path '$path'"
+msgstr "Submodul \"$name\" ($url) für Pfad \"$path\" registriert"
+
+#: git-submodule.sh:444
+#, sh-format
+msgid ""
+"Submodule path '$path' not initialized\n"
+"Maybe you want to use 'update --init'?"
+msgstr ""
+"Submodul-Pfad \"$path\" ist nicht initialisiert\n"
+"War vielleicht \\`update --init\\` gewollt?"
+
+#: git-submodule.sh:456
+#, sh-format
+msgid "Unable to find current revision in submodule path '$path'"
+msgstr "Kann aktuelle Revision im Submodul-Pfad \"$path\" nicht finden"
+
+#: git-submodule.sh:476
+#, sh-format
+msgid "Unable to fetch in submodule path '$path'"
+msgstr "Kann im Submodul-Pfad \"$path\" nicht holen"
+
+#: git-submodule.sh:482 git-submodule.sh:487 git-submodule.sh:492
+#, sh-format
+msgid "Unable to rebase '$sha1' in submodule path '$path'"
+msgstr "Kann nicht auf \"$sha1\" im Submodul-Pfad \"$path\" rebasen"
+
+#: git-submodule.sh:483
+#, sh-format
+msgid "Submodule path '$path': rebased into '$sha1'"
+msgstr "Submodul-Pfad \"$path\": auf \"$sha1\" rebased"
+
+#: git-submodule.sh:488
+#, sh-format
+msgid "Submodule path '$path': merged in '$sha1'"
+msgstr "Submodul-Pfad \"$path\": \"$sha1\" wurde gemerged"
+
+#: git-submodule.sh:493
+#, sh-format
+msgid "Submodule path '$path': checked out '$sha1'"
+msgstr "Submodul-Pfad \"$path\": \"$sha1\" wurde ausgecheckt"
+
+#: git-submodule.sh:504 git-submodule.sh:797
+#, sh-format
+msgid "Failed to recurse into submodule path '$path'"
+msgstr "Konnte nicht in den Submodul-Pfad \"$path\" wechseln"
+
+#: git-submodule.sh:588
+msgid "--"
+msgstr "--"
+
+#. unexpected type
+#: git-submodule.sh:628
+#, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "unerwarteter Modus $mod_dst"
+
+#: git-submodule.sh:646
+#, sh-format
+msgid " Warn: $name doesn't contain commit $sha1_src"
+msgstr " Warnung: $name enthält nicht Commit $sha1_src"
+
+#: git-submodule.sh:649
+#, sh-format
+msgid " Warn: $name doesn't contain commit $sha1_dst"
+msgstr " Warnung: $name enthält nicht Commit $sha1_dst"
+
+#: git-submodule.sh:652
+#, sh-format
+msgid " Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
+msgstr " Warnung: $name enthält nicht Commit $sha1_src und $sha1_dst"
+
+#: git-submodule.sh:677
+msgid "blob"
+msgstr "Blob"
+
+#: git-submodule.sh:678
+msgid "submodule"
+msgstr "Submodul"
+
+#: git-submodule.sh:715
+msgid "# Submodules changed but not updated:"
+msgstr "# Geändert, aber nicht für den nächsten Commit vorgemerkte Submodule:"
+
+#: git-submodule.sh:717
+msgid "# Submodule changes to be committed:"
+msgstr "# Vorgemerkte Änderungen im Submodul für den nächsten Commit:"
+
+#: git-submodule.sh:844
+#, sh-format
+msgid "Synchronizing submodule url for '$name'"
+msgstr "Synchronisiere Submodul-URL für \"$name\""
diff --git a/po/en_GB.po b/po/en_GB.po
--- /dev/null
+++ b/po/en_GB.po
@@ -0,0 +1,2784 @@
+# British English translations for Git.
+# Copyright (C) 2010 Sam Reed <sam@reedyboy.net>
+# This file is distributed under the same license as the Git package.
+# Sam Reed <sam@reedyboy.net>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-09-20 15:07+0000\n"
+"PO-Revision-Date: 2010-09-02 19:09 +0000\n"
+"Last-Translator: Sam Reed <sam@reedyboy.net>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: en-gb\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: wt-status.c:56
+msgid "# Unmerged paths:"
+msgstr ""
+
+#: wt-status.c:62 wt-status.c:79
+#, c-format
+msgid "# (use \"git reset %s <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:64 wt-status.c:81
+msgid "# (use \"git rm --cached <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:65
+msgid "# (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr ""
+
+#: wt-status.c:73
+msgid "# Changes to be committed:"
+msgstr ""
+
+#: wt-status.c:91
+msgid "# Changed but not updated:"
+msgstr ""
+
+#: wt-status.c:95
+msgid "# (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:97
+msgid "# (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:98
+msgid ""
+"# (use \"git checkout -- <file>...\" to discard changes in working "
+"directory)"
+msgstr ""
+
+#: wt-status.c:100
+msgid "# (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+
+#: wt-status.c:109
+#, c-format
+msgid "# %s files:"
+msgstr ""
+
+#: wt-status.c:112
+#, c-format
+msgid "# (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+
+#: wt-status.c:129
+msgid "bug"
+msgstr ""
+
+#: wt-status.c:134
+msgid "both deleted:"
+msgstr ""
+
+#: wt-status.c:135
+msgid "added by us:"
+msgstr ""
+
+#: wt-status.c:136
+msgid "deleted by them:"
+msgstr ""
+
+#: wt-status.c:137
+msgid "added by them:"
+msgstr ""
+
+#: wt-status.c:138
+msgid "deleted by us:"
+msgstr ""
+
+#: wt-status.c:139
+msgid "both added:"
+msgstr ""
+
+#: wt-status.c:140
+msgid "both modified:"
+msgstr ""
+
+#: wt-status.c:170
+msgid "new commits, "
+msgstr ""
+
+#: wt-status.c:172
+msgid "modified content, "
+msgstr ""
+
+#: wt-status.c:174
+msgid "untracked content, "
+msgstr ""
+
+#: wt-status.c:188
+#, c-format
+msgid "new file: %s"
+msgstr ""
+
+#: wt-status.c:191
+#, c-format
+msgid "copied: %s -> %s"
+msgstr ""
+
+#: wt-status.c:194
+#, c-format
+msgid "deleted: %s"
+msgstr ""
+
+#: wt-status.c:197
+#, c-format
+msgid "modified: %s"
+msgstr ""
+
+#: wt-status.c:200
+#, c-format
+msgid "renamed: %s -> %s"
+msgstr ""
+
+#: wt-status.c:203
+#, c-format
+msgid "typechange: %s"
+msgstr ""
+
+#: wt-status.c:206
+#, c-format
+msgid "unknown: %s"
+msgstr ""
+
+#: wt-status.c:209
+#, c-format
+msgid "unmerged: %s"
+msgstr ""
+
+#: wt-status.c:212
+#, c-format
+msgid "bug: unhandled diff status %c"
+msgstr ""
+
+#: wt-status.c:635
+msgid "On branch "
+msgstr ""
+
+#: wt-status.c:642
+msgid "Not currently on any branch."
+msgstr ""
+
+#: wt-status.c:652
+msgid "# Initial commit"
+msgstr ""
+
+#: wt-status.c:666
+msgid "Untracked"
+msgstr ""
+
+#: wt-status.c:668
+msgid "Ignored"
+msgstr ""
+
+#: wt-status.c:670
+#, c-format
+msgid "# Untracked files not listed%s\n"
+msgstr ""
+
+#: wt-status.c:672
+msgid " (use -u option to show untracked files)"
+msgstr ""
+
+#: wt-status.c:678
+#, c-format
+msgid "# No changes\n"
+msgstr ""
+
+#: wt-status.c:682
+#, c-format
+msgid "no changes added to commit%s\n"
+msgstr ""
+
+#: wt-status.c:684
+msgid " (use \"git add\" and/or \"git commit -a\")"
+msgstr ""
+
+#: wt-status.c:686
+#, c-format
+msgid "nothing added to commit but untracked files present%s\n"
+msgstr ""
+
+#: wt-status.c:688
+msgid " (use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:690 wt-status.c:693 wt-status.c:696
+#, c-format
+msgid "nothing to commit%s\n"
+msgstr ""
+
+#: wt-status.c:691
+msgid " (create/copy files and use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:694
+msgid " (use -u to show untracked files)"
+msgstr ""
+
+#: wt-status.c:697
+msgid " (working directory clean)"
+msgstr ""
+
+#: wt-status.c:795
+msgid "HEAD (no branch)"
+msgstr ""
+
+#: wt-status.c:801
+msgid "Initial commit on "
+msgstr ""
+
+#: wt-status.c:816
+msgid "behind "
+msgstr ""
+
+#: wt-status.c:819 wt-status.c:822
+msgid "ahead "
+msgstr ""
+
+#: wt-status.c:824
+msgid ", behind "
+msgstr ""
+
+#: builtin/add.c:41
+#, c-format
+msgid "unexpected diff status %c"
+msgstr ""
+
+#: builtin/add.c:67 builtin/commit.c:244
+msgid "updating files failed"
+msgstr ""
+
+#: builtin/add.c:77
+#, c-format
+msgid "remove '%s'\n"
+msgstr ""
+
+#: builtin/add.c:175
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr ""
+
+#: builtin/add.c:191
+msgid "Unstaged changes after refreshing the index:"
+msgstr ""
+
+#: builtin/add.c:194 builtin/add.c:452 builtin/rm.c:194
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr ""
+
+#: builtin/add.c:208
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr ""
+
+#: builtin/add.c:275
+msgid "Could not read the index"
+msgstr ""
+
+#: builtin/add.c:284
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr ""
+
+#: builtin/add.c:288
+msgid "Could not write patch"
+msgstr ""
+
+#: builtin/add.c:293
+#, c-format
+msgid "Could not stat '%s'"
+msgstr ""
+
+#: builtin/add.c:295
+msgid "Empty patch. Aborted."
+msgstr ""
+
+#: builtin/add.c:301
+#, c-format
+msgid "Could not apply '%s'"
+msgstr ""
+
+#: builtin/add.c:349
+#, c-format
+msgid "Use -f if you really want to add them.\n"
+msgstr ""
+
+#: builtin/add.c:350
+msgid "no files added"
+msgstr ""
+
+#: builtin/add.c:356
+msgid "adding files failed"
+msgstr ""
+
+#: builtin/add.c:388
+msgid "-A and -u are mutually incompatible"
+msgstr ""
+
+#: builtin/add.c:390
+msgid "Option --ignore-missing can only be used together with --dry-run"
+msgstr ""
+
+#: builtin/add.c:410
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr ""
+
+#: builtin/add.c:411
+#, c-format
+msgid "Maybe you wanted to say 'git add .'?\n"
+msgstr ""
+
+#: builtin/add.c:417 builtin/clean.c:95 builtin/commit.c:301
+#: builtin/commit.c:310 builtin/mv.c:77 builtin/rm.c:171
+msgid "index file corrupt"
+msgstr ""
+
+#: builtin/add.c:468 builtin/mv.c:223 builtin/rm.c:268
+msgid "Unable to write new index file"
+msgstr ""
+
+#: builtin/archive.c:17
+#, c-format
+msgid "could not create archive file '%s'"
+msgstr ""
+
+#: builtin/archive.c:20
+msgid "could not redirect output"
+msgstr ""
+
+#: builtin/archive.c:36
+msgid "git archive: Remote with no URL"
+msgstr ""
+
+#: builtin/archive.c:46
+msgid "git archive: expected ACK/NAK, got EOF"
+msgstr ""
+
+#: builtin/archive.c:51
+#, c-format
+msgid "git archive: NACK %s"
+msgstr ""
+
+#: builtin/archive.c:52
+msgid "git archive: protocol error"
+msgstr ""
+
+#: builtin/archive.c:57
+msgid "git archive: expected a flush"
+msgstr ""
+
+#: builtin/branch.c:136
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but it is not yet merged to HEAD."
+msgstr ""
+
+#: builtin/branch.c:140
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD."
+msgstr ""
+
+#. TRANSLATORS: This is "remote " in "remote branch '%s' not found"
+#: builtin/branch.c:161
+msgid "remote "
+msgstr ""
+
+#: builtin/branch.c:169
+msgid "cannot use -a with -d"
+msgstr ""
+
+#: builtin/branch.c:175
+msgid "Couldn't look up commit object for HEAD"
+msgstr ""
+
+#: builtin/branch.c:180
+#, c-format
+msgid "Cannot delete the branch '%s' which you are currently on."
+msgstr ""
+
+#: builtin/branch.c:190
+#, c-format
+msgid "%sbranch '%s' not found."
+msgstr ""
+
+#: builtin/branch.c:198
+#, c-format
+msgid "Couldn't look up commit object for '%s'"
+msgstr ""
+
+#: builtin/branch.c:204
+#, c-format
+msgid ""
+"The branch '%s' is not fully merged.\n"
+"If you are sure you want to delete it, run 'git branch -D %s'."
+msgstr ""
+
+#: builtin/branch.c:212
+#, c-format
+msgid "Error deleting %sbranch '%s'"
+msgstr ""
+
+#: builtin/branch.c:217
+#, c-format
+msgid "Deleted %sbranch %s (was %s).\n"
+msgstr ""
+
+#: builtin/branch.c:222
+msgid "Update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:304
+#, c-format
+msgid "branch '%s' does not point at a commit"
+msgstr ""
+
+#: builtin/branch.c:381
+#, c-format
+msgid "behind %d] "
+msgstr ""
+
+#: builtin/branch.c:383
+#, c-format
+msgid "ahead %d] "
+msgstr ""
+
+#: builtin/branch.c:385
+#, c-format
+msgid "ahead %d, behind %d] "
+msgstr ""
+
+#: builtin/branch.c:484
+msgid "(no branch)"
+msgstr ""
+
+#: builtin/branch.c:544
+msgid "some refs could not be read"
+msgstr ""
+
+#: builtin/branch.c:557
+msgid "cannot rename the current branch while not on any."
+msgstr ""
+
+#: builtin/branch.c:567 builtin/branch.c:571
+#, c-format
+msgid "Invalid branch name: '%s'"
+msgstr ""
+
+#: builtin/branch.c:574
+#, c-format
+msgid "A branch named '%s' already exists."
+msgstr ""
+
+#: builtin/branch.c:580
+msgid "Branch rename failed"
+msgstr ""
+
+#: builtin/branch.c:584
+#, c-format
+msgid "Renamed a misnamed branch '%s' away"
+msgstr ""
+
+#: builtin/branch.c:588
+#, c-format
+msgid "Branch renamed to %s, but HEAD is not updated!"
+msgstr ""
+
+#: builtin/branch.c:595
+msgid "Branch is renamed, but update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:610
+#, c-format
+msgid "malformed object name %s"
+msgstr ""
+
+#: builtin/branch.c:680
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr ""
+
+#: builtin/branch.c:686
+msgid "HEAD not found below refs/heads!"
+msgstr ""
+
+#: builtin/branch.c:706
+msgid "-a and -r options to 'git branch' do not make sense with a branch name"
+msgstr ""
+
+#: builtin/bundle.c:47
+#, c-format
+msgid "%s is okay\n"
+msgstr ""
+
+#: builtin/bundle.c:56
+msgid "Need a repository to create a bundle."
+msgstr ""
+
+#: builtin/bundle.c:60
+msgid "Need a repository to unbundle."
+msgstr ""
+
+#: builtin/checkout.c:107 builtin/checkout.c:135
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr ""
+
+#: builtin/checkout.c:109 builtin/checkout.c:137
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr ""
+
+#: builtin/checkout.c:120
+#, c-format
+msgid "path '%s' does not have all three versions"
+msgstr ""
+
+#: builtin/checkout.c:155
+#, c-format
+msgid "path '%s' does not have all 3 versions"
+msgstr ""
+
+#: builtin/checkout.c:172
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr ""
+
+#: builtin/checkout.c:189
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr ""
+
+#: builtin/checkout.c:194 builtin/reset.c:170
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr ""
+
+#: builtin/checkout.c:216 builtin/checkout.c:371
+msgid "corrupt index file"
+msgstr ""
+
+#: builtin/checkout.c:244 builtin/checkout.c:251
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr ""
+
+#: builtin/checkout.c:280 builtin/checkout.c:475 builtin/clone.c:658
+#: builtin/merge.c:737
+msgid "unable to write new index file"
+msgstr ""
+
+#: builtin/checkout.c:297 builtin/diff.c:307 builtin/merge.c:367
+msgid "diff_setup_done failed"
+msgstr ""
+
+#: builtin/checkout.c:393
+msgid "you need to resolve your current index first"
+msgstr ""
+
+#: builtin/checkout.c:524
+#, c-format
+msgid "Can not do reflog for '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:550
+#, c-format
+msgid "Already on '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:554
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:556
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:558
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:575
+msgid "HEAD is now at"
+msgstr ""
+
+#: builtin/checkout.c:603
+msgid "You are on a branch yet to be born"
+msgstr ""
+
+#: builtin/checkout.c:617
+msgid "Previous HEAD position was"
+msgstr ""
+
+#: builtin/checkout.c:730
+msgid "-B cannot be used with -b"
+msgstr ""
+
+#: builtin/checkout.c:738
+msgid "--patch is incompatible with all other options"
+msgstr ""
+
+#: builtin/checkout.c:744
+msgid "--track needs a branch name"
+msgstr ""
+
+#: builtin/checkout.c:751
+msgid "Missing branch name; try -b"
+msgstr ""
+
+#: builtin/checkout.c:757
+msgid "--orphan and -b|-B are mutually exclusive"
+msgstr ""
+
+#: builtin/checkout.c:759
+msgid "--orphan cannot be used with -t"
+msgstr ""
+
+#: builtin/checkout.c:769
+msgid "git checkout: -f and -m are incompatible"
+msgstr ""
+
+#. case (1)
+#: builtin/checkout.c:815
+#, c-format
+msgid "invalid reference: %s"
+msgstr ""
+
+#. case (1): want a tree
+#: builtin/checkout.c:852
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr ""
+
+#: builtin/checkout.c:878
+msgid "invalid path specification"
+msgstr ""
+
+#: builtin/checkout.c:886
+#, c-format
+msgid ""
+"git checkout: updating paths is incompatible with switching branches.\n"
+"Did you intend to checkout '%s' which can not be resolved as commit?"
+msgstr ""
+
+#: builtin/checkout.c:888
+msgid "git checkout: updating paths is incompatible with switching branches."
+msgstr ""
+
+#: builtin/checkout.c:893
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+
+#: builtin/checkout.c:904
+#, c-format
+msgid "git checkout: we do not like '%s' as a branch name."
+msgstr ""
+
+#: builtin/checkout.c:909
+#, c-format
+msgid "git checkout: branch %s already exists"
+msgstr ""
+
+#: builtin/checkout.c:916
+msgid "Cannot switch branch to a non-commit."
+msgstr ""
+
+#: builtin/checkout.c:919
+msgid "--ours/--theirs is incompatible with switching branches."
+msgstr ""
+
+#: builtin/clean.c:78
+msgid "-x and -X cannot be used together"
+msgstr ""
+
+#: builtin/clean.c:82
+msgid ""
+"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
+msgstr ""
+
+#: builtin/clean.c:85
+msgid ""
+"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
+"clean"
+msgstr ""
+
+#: builtin/clean.c:154 builtin/clean.c:175
+#, c-format
+msgid "Would remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:158 builtin/clean.c:178
+#, c-format
+msgid "Removing %s\n"
+msgstr ""
+
+#: builtin/clean.c:161 builtin/clean.c:181
+#, c-format
+msgid "failed to remove '%s'"
+msgstr ""
+
+#: builtin/clean.c:165
+#, c-format
+msgid "Would not remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:167
+#, c-format
+msgid "Not removing %s\n"
+msgstr ""
+
+#: builtin/clone.c:208
+#, c-format
+msgid "reference repository '%s' is not a local directory."
+msgstr ""
+
+#: builtin/clone.c:235
+#, c-format
+msgid "failed to open '%s'"
+msgstr ""
+
+#: builtin/clone.c:239
+#, c-format
+msgid "failed to create directory '%s'"
+msgstr ""
+
+#: builtin/clone.c:241 builtin/diff.c:74
+#, c-format
+msgid "failed to stat '%s'"
+msgstr ""
+
+#: builtin/clone.c:243
+#, c-format
+msgid "%s exists and is not a directory"
+msgstr ""
+
+#: builtin/clone.c:257
+#, c-format
+msgid "failed to stat %s\n"
+msgstr ""
+
+#: builtin/clone.c:267
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr ""
+
+#: builtin/clone.c:272
+#, c-format
+msgid "failed to create link '%s'"
+msgstr ""
+
+#: builtin/clone.c:276
+#, c-format
+msgid "failed to copy file to '%s'"
+msgstr ""
+
+#: builtin/clone.c:305
+#, c-format
+msgid "done.\n"
+msgstr ""
+
+#: builtin/clone.c:387
+msgid "Too many arguments."
+msgstr ""
+
+#: builtin/clone.c:391
+msgid "You must specify a repository to clone."
+msgstr ""
+
+#: builtin/clone.c:399
+#, c-format
+msgid "--bare and --origin %s options are incompatible."
+msgstr ""
+
+#: builtin/clone.c:428
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr ""
+
+#: builtin/clone.c:438
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr ""
+
+#: builtin/clone.c:451 builtin/clone.c:465
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr ""
+
+#: builtin/clone.c:454
+#, c-format
+msgid "could not create work tree dir '%s'."
+msgstr ""
+
+#: builtin/clone.c:470
+#, c-format
+msgid "Cloning into bare repository %s\n"
+msgstr ""
+
+#: builtin/clone.c:472
+#, c-format
+msgid "Cloning into %s\n"
+msgstr ""
+
+#: builtin/clone.c:530
+#, c-format
+msgid "Don't know how to clone %s"
+msgstr ""
+
+#: builtin/clone.c:569
+#, c-format
+msgid "Remote branch %s not found in upstream %s, using HEAD instead"
+msgstr ""
+
+#: builtin/clone.c:579
+msgid "You appear to have cloned an empty repository."
+msgstr ""
+
+#: builtin/clone.c:621
+msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgstr ""
+
+#: builtin/commit.c:41
+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"
+"If the identity used for this commit is wrong, you can fix it with:\n"
+"\n"
+" git commit --amend --author='Your Name <you@example.com>'\n"
+msgstr ""
+
+#: builtin/commit.c:53
+msgid ""
+"You asked to amend the most recent commit, but doing so would make\n"
+"it empty. You can repeat your command with --allow-empty, or you can\n"
+"remove the commit entirely with \"git reset HEAD^\".\n"
+msgstr ""
+
+#: builtin/commit.c:271
+msgid "failed to unpack HEAD tree object"
+msgstr ""
+
+#: builtin/commit.c:299
+msgid "interactive add failed"
+msgstr ""
+
+#: builtin/commit.c:330 builtin/commit.c:350 builtin/commit.c:396
+msgid "unable to write new_index file"
+msgstr ""
+
+#: builtin/commit.c:380
+msgid "cannot do a partial commit during a merge."
+msgstr ""
+
+#: builtin/commit.c:389
+msgid "cannot read the index"
+msgstr ""
+
+#: builtin/commit.c:409
+msgid "unable to write temporary index file"
+msgstr ""
+
+#: builtin/commit.c:456 builtin/commit.c:1294
+msgid "could not parse HEAD commit"
+msgstr ""
+
+#: builtin/commit.c:475 builtin/commit.c:481
+#, c-format
+msgid "invalid commit: %s"
+msgstr ""
+
+#: builtin/commit.c:499
+msgid "malformed --author parameter"
+msgstr ""
+
+#: builtin/commit.c:573 builtin/shortlog.c:299
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr ""
+
+#: builtin/commit.c:575
+msgid "could not read log from standard input"
+msgstr ""
+
+#: builtin/commit.c:579
+#, c-format
+msgid "could not read log file '%s'"
+msgstr ""
+
+#: builtin/commit.c:585
+msgid "commit has empty message"
+msgstr ""
+
+#: builtin/commit.c:591
+msgid "could not read MERGE_MSG"
+msgstr ""
+
+#: builtin/commit.c:595
+msgid "could not read SQUASH_MSG"
+msgstr ""
+
+#: builtin/commit.c:599
+#, c-format
+msgid "could not read '%s'"
+msgstr ""
+
+#: builtin/commit.c:612
+#, c-format
+msgid "could not open '%s'"
+msgstr ""
+
+#: builtin/commit.c:636
+msgid "could not write commit template"
+msgstr ""
+
+#: builtin/commit.c:650
+#, c-format
+msgid ""
+"#\n"
+"# It looks like you may be committing a MERGE.\n"
+"# If this is not correct, please remove the file\n"
+"#\t%s\n"
+"# and try again.\n"
+"#\n"
+msgstr ""
+
+#: builtin/commit.c:659
+#, c-format
+msgid ""
+"\n"
+"# Please enter the commit message for your changes."
+msgstr ""
+
+#: builtin/commit.c:663
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:668
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be kept; you may remove them yourself if you want to.\n"
+"# An empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:680
+#, c-format
+msgid "%s# Author: %s\n"
+msgstr ""
+
+#: builtin/commit.c:688
+#, c-format
+msgid "%s# Committer: %s\n"
+msgstr ""
+
+#: builtin/commit.c:705
+msgid "Cannot read index"
+msgstr ""
+
+#: builtin/commit.c:737
+msgid "Error building trees"
+msgstr ""
+
+#: builtin/commit.c:752 builtin/tag.c:321
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr ""
+
+#: builtin/commit.c:832
+#, c-format
+msgid "No existing author found with '%s'"
+msgstr ""
+
+#: builtin/commit.c:847 builtin/commit.c:1039
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr ""
+
+#: builtin/commit.c:864
+msgid "Using both --reset-author and --author does not make sense"
+msgstr ""
+
+#: builtin/commit.c:878
+msgid "You have nothing to amend."
+msgstr ""
+
+#: builtin/commit.c:880
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr ""
+
+#: builtin/commit.c:889
+msgid "Only one of -c/-C/-F can be used."
+msgstr ""
+
+#: builtin/commit.c:891
+msgid "Option -m cannot be combined with -c/-C/-F."
+msgstr ""
+
+#: builtin/commit.c:897
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr ""
+
+#: builtin/commit.c:906
+#, c-format
+msgid "could not lookup commit %s"
+msgstr ""
+
+#: builtin/commit.c:909
+#, c-format
+msgid "could not parse commit %s"
+msgstr ""
+
+#: builtin/commit.c:937
+msgid "Only one of --include/--only/--all/--interactive can be used."
+msgstr ""
+
+#: builtin/commit.c:939
+msgid "No paths with --include/--only does not make sense."
+msgstr ""
+
+#: builtin/commit.c:941
+msgid "Clever... amending the last one with dirty index."
+msgstr ""
+
+#: builtin/commit.c:943
+msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
+msgstr ""
+
+#: builtin/commit.c:953
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr ""
+
+#: builtin/commit.c:958
+msgid "Paths with -a does not make sense."
+msgstr ""
+
+#: builtin/commit.c:960
+msgid "Paths with --interactive does not make sense."
+msgstr ""
+
+#: builtin/commit.c:1142
+msgid "couldn't look up newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1144
+msgid "could not parse newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1185
+msgid "detached HEAD"
+msgstr ""
+
+#: builtin/commit.c:1187
+msgid " (root-commit)"
+msgstr ""
+
+#: builtin/commit.c:1307 builtin/merge.c:461
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr ""
+
+#: builtin/commit.c:1312
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr ""
+
+#: builtin/commit.c:1319
+msgid "could not read MERGE_MODE"
+msgstr ""
+
+#: builtin/commit.c:1336
+#, c-format
+msgid "could not read commit message: %s"
+msgstr ""
+
+#: builtin/commit.c:1350
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr ""
+
+#: builtin/commit.c:1358
+msgid "failed to write commit object"
+msgstr ""
+
+#: builtin/commit.c:1375
+msgid "cannot lock HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1379
+msgid "cannot update HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1388
+msgid ""
+"Repository has been updated, but unable to write\n"
+"new_index file. Check that disk is not full or quota is\n"
+"not exceeded, and then \"git reset HEAD\" to recover."
+msgstr ""
+
+#: builtin/describe.c:205
+#, c-format
+msgid "annotated tag %s not available"
+msgstr ""
+
+#: builtin/describe.c:209
+#, c-format
+msgid "annotated tag %s has no embedded name"
+msgstr ""
+
+#: builtin/describe.c:211
+#, c-format
+msgid "tag '%s' is really '%s' here"
+msgstr ""
+
+#: builtin/describe.c:238
+#, c-format
+msgid "Not a valid object name %s"
+msgstr ""
+
+#: builtin/describe.c:241
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr ""
+
+#: builtin/describe.c:258
+#, c-format
+msgid "no tag exactly matches '%s'"
+msgstr ""
+
+#: builtin/describe.c:260
+#, c-format
+msgid "searching to describe %s\n"
+msgstr ""
+
+#: builtin/describe.c:295
+#, c-format
+msgid "finished search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:319
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+
+#: builtin/describe.c:323
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+
+#: builtin/describe.c:344
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr ""
+
+#: builtin/describe.c:347
+#, c-format
+msgid ""
+"more than %i tags found; listed %i most recent\n"
+"gave up search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:398
+msgid "--long is incompatible with --abbrev=0"
+msgstr ""
+
+#: builtin/describe.c:423
+msgid "No names found, cannot describe anything."
+msgstr ""
+
+#: builtin/describe.c:430
+msgid "--dirty is incompatible with committishes"
+msgstr ""
+
+#: builtin/diff.c:76
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr ""
+
+#: builtin/diff.c:225
+#, c-format
+msgid "invalid option: %s"
+msgstr ""
+
+#: builtin/diff.c:302
+msgid "Not a git repository"
+msgstr ""
+
+#: builtin/diff.c:334
+msgid "No HEAD commit to compare with (yet)"
+msgstr ""
+
+#: builtin/diff.c:349
+#, c-format
+msgid "invalid object '%s' given."
+msgstr ""
+
+#: builtin/diff.c:354
+#, c-format
+msgid "more than %d trees given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:364
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:372
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr ""
+
+#: builtin/fetch.c:175
+msgid "Couldn't find remote ref HEAD"
+msgstr ""
+
+#: builtin/fetch.c:228
+#, c-format
+msgid "object %s not found"
+msgstr ""
+
+#: builtin/fetch.c:233
+msgid "[up to date]"
+msgstr ""
+
+#.
+#. * If this is the head, and it's not okay to update
+#. * the head, and the old value of the head isn't empty...
+#.
+#: builtin/fetch.c:246
+#, c-format
+msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
+msgstr ""
+
+#: builtin/fetch.c:247 builtin/fetch.c:309
+msgid "[rejected]"
+msgstr ""
+
+#: builtin/fetch.c:257
+msgid "[tag update]"
+msgstr ""
+
+#: builtin/fetch.c:258 builtin/fetch.c:280 builtin/fetch.c:293
+msgid " (unable to update local ref)"
+msgstr ""
+
+#: builtin/fetch.c:270
+msgid "[new tag]"
+msgstr ""
+
+#: builtin/fetch.c:274
+msgid "[new branch]"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "unable to update local ref"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "forced update"
+msgstr ""
+
+#: builtin/fetch.c:310
+msgid "(non-fast-forward)"
+msgstr ""
+
+#: builtin/fetch.c:328 builtin/fetch.c:651
+#, c-format
+msgid "cannot open %s: %s\n"
+msgstr ""
+
+#: builtin/fetch.c:406
+#, c-format
+msgid "From %.*s\n"
+msgstr ""
+
+#: builtin/fetch.c:417
+#, c-format
+msgid ""
+"some local refs could not be updated; try running\n"
+" 'git remote prune %s' to remove any old, conflicting branches"
+msgstr ""
+
+#: builtin/fetch.c:467
+msgid "could not run rev-list"
+msgstr ""
+
+#: builtin/fetch.c:481
+#, c-format
+msgid "failed write to rev-list: %s"
+msgstr ""
+
+#: builtin/fetch.c:488
+#, c-format
+msgid "failed to close rev-list's stdin: %s"
+msgstr ""
+
+#: builtin/fetch.c:515
+#, c-format
+msgid " (%s will become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:516
+#, c-format
+msgid " (%s has become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:523
+msgid "[deleted]"
+msgstr ""
+
+#: builtin/fetch.c:524
+msgid "(none)"
+msgstr ""
+
+#: builtin/fetch.c:641
+#, c-format
+msgid "Refusing to fetch into current branch %s of non-bare repository"
+msgstr ""
+
+#: builtin/fetch.c:675
+#, c-format
+msgid "Don't know how to fetch from %s"
+msgstr ""
+
+#: builtin/fetch.c:729
+#, c-format
+msgid "Option \"%s\" value \"%s\" is not valid for %s"
+msgstr ""
+
+#: builtin/fetch.c:732
+#, c-format
+msgid "Option \"%s\" is ignored for %s\n"
+msgstr ""
+
+#: builtin/fetch.c:821
+#, c-format
+msgid "Fetching %s\n"
+msgstr ""
+
+#: builtin/fetch.c:823
+#, c-format
+msgid "Could not fetch %s"
+msgstr ""
+
+#: builtin/fetch.c:839
+msgid ""
+"No remote repository specified. Please, specify either a URL or a\n"
+"remote name from which new revisions should be fetched."
+msgstr ""
+
+#: builtin/fetch.c:859
+msgid "You need to specify a tag name."
+msgstr ""
+
+#: builtin/fetch.c:899
+msgid "fetch --all does not take a repository argument"
+msgstr ""
+
+#: builtin/fetch.c:901
+msgid "fetch --all does not make sense with refspecs"
+msgstr ""
+
+#: builtin/fetch.c:912
+#, c-format
+msgid "No such remote or remote group: %s"
+msgstr ""
+
+#: builtin/fetch.c:920
+msgid "Fetching a group and specifying refspecs does not make sense"
+msgstr ""
+
+#: builtin/gc.c:63
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr ""
+
+#: builtin/gc.c:78
+msgid "Too many options specified"
+msgstr ""
+
+#: builtin/gc.c:103
+#, c-format
+msgid "insanely long object directory %.*s"
+msgstr ""
+
+#: builtin/gc.c:220
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr ""
+
+#: builtin/gc.c:223
+#, c-format
+msgid ""
+"Auto packing the repository for optimum performance. You may also\n"
+"run \"git gc\" manually. See \"git help gc\" for more information."
+msgstr ""
+
+#: builtin/gc.c:251
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+
+#: builtin/grep.c:252
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr ""
+
+#: builtin/grep.c:457
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr ""
+
+#: builtin/grep.c:508
+#, c-format
+msgid "'%s': %s"
+msgstr ""
+
+#: builtin/grep.c:519
+#, c-format
+msgid "'%s': short read %s"
+msgstr ""
+
+#: builtin/grep.c:581
+#, c-format
+msgid "Failed to chdir: %s"
+msgstr ""
+
+#: builtin/grep.c:671 builtin/grep.c:697
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr ""
+
+#: builtin/grep.c:703
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr ""
+
+#: builtin/grep.c:755
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr ""
+
+#: builtin/grep.c:771
+#, c-format
+msgid "cannot open '%s'"
+msgstr ""
+
+#: builtin/grep.c:1012
+msgid "no pattern given."
+msgstr ""
+
+#: builtin/grep.c:1016
+msgid "cannot mix --fixed-strings and regexp"
+msgstr ""
+
+#: builtin/grep.c:1041
+#, c-format
+msgid "bad object %s"
+msgstr ""
+
+#: builtin/grep.c:1068
+msgid "--open-files-in-pager only works on the worktree"
+msgstr ""
+
+#: builtin/grep.c:1093
+msgid "--cached cannot be used with --no-index."
+msgstr ""
+
+#: builtin/grep.c:1095
+msgid "--no-index cannot be used with revs."
+msgstr ""
+
+#: builtin/grep.c:1104
+msgid "both --cached and trees are given."
+msgstr ""
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr ""
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr ""
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr ""
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr ""
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr ""
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr ""
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr ""
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr ""
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr ""
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr ""
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr ""
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr ""
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr ""
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr ""
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:355
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr ""
+
+#: builtin/init-db.c:356
+msgid "Reinitialized existing"
+msgstr "Reinitialised existing"
+
+#: builtin/init-db.c:356
+msgid "Initialized empty"
+msgstr "Initialised empty"
+
+#: builtin/init-db.c:357
+msgid " shared"
+msgstr ""
+
+#: builtin/init-db.c:376
+msgid "cannot tell cwd"
+msgstr ""
+
+#: builtin/init-db.c:450 builtin/init-db.c:457
+#, c-format
+msgid "cannot mkdir %s"
+msgstr ""
+
+#: builtin/init-db.c:461
+#, c-format
+msgid "cannot chdir to %s"
+msgstr ""
+
+#: builtin/init-db.c:483
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+
+#: builtin/init-db.c:509
+msgid "Cannot access current working directory"
+msgstr ""
+
+#: builtin/init-db.c:512
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr ""
+
+#: builtin/log.c:104
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr ""
+
+#: builtin/log.c:113 builtin/log.c:1138 builtin/shortlog.c:287
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "unrecognised argument: %s"
+
+#: builtin/log.c:156
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr ""
+
+#: builtin/log.c:255 builtin/log.c:674 builtin/log.c:1222 builtin/log.c:1428
+#: builtin/merge.c:310 builtin/revert.c:556 builtin/shortlog.c:184
+msgid "revision walk setup failed"
+msgstr ""
+
+#: builtin/log.c:347 builtin/log.c:434
+#, c-format
+msgid "Could not read object %s"
+msgstr ""
+
+#: builtin/log.c:458
+#, c-format
+msgid "Unknown type: %d"
+msgstr ""
+
+#: builtin/log.c:558
+msgid "format.headers without value"
+msgstr ""
+
+#: builtin/log.c:630
+msgid "name of output directory is too long"
+msgstr ""
+
+#: builtin/log.c:641
+#, c-format
+msgid "Cannot open patch file %s"
+msgstr ""
+
+#: builtin/log.c:655
+msgid "Need exactly one range."
+msgstr ""
+
+#: builtin/log.c:663
+msgid "Not a range."
+msgstr ""
+
+#: builtin/log.c:700
+msgid "Could not extract email from committer identity."
+msgstr ""
+
+#: builtin/log.c:732
+msgid "Cover letter needs email format"
+msgstr ""
+
+#: builtin/log.c:825
+#, c-format
+msgid "insane in-reply-to: %s"
+msgstr ""
+
+#: builtin/log.c:898
+msgid "Two output directories?"
+msgstr ""
+
+#: builtin/log.c:1087
+#, c-format
+msgid "bogus committer info %s"
+msgstr ""
+
+#: builtin/log.c:1132
+msgid "-n and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1134
+msgid "--subject-prefix and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1141
+msgid "--name-only does not make sense"
+msgstr ""
+
+#: builtin/log.c:1143
+msgid "--name-status does not make sense"
+msgstr ""
+
+#: builtin/log.c:1145
+msgid "--check does not make sense"
+msgstr ""
+
+#: builtin/log.c:1166
+msgid "standard output, or directory, which one?"
+msgstr ""
+
+#: builtin/log.c:1168
+#, c-format
+msgid "Could not create directory '%s'"
+msgstr ""
+
+#: builtin/log.c:1307
+msgid "Failed to create output files"
+msgstr ""
+
+#: builtin/log.c:1394
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr ""
+
+#: builtin/log.c:1410 builtin/log.c:1412 builtin/log.c:1424
+#, c-format
+msgid "Unknown commit %s"
+msgstr ""
+
+#: builtin/merge.c:82
+msgid "switch `m' requires a value"
+msgstr ""
+
+#: builtin/merge.c:119
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr ""
+
+#: builtin/merge.c:120
+#, c-format
+msgid "Available strategies are:"
+msgstr ""
+
+#: builtin/merge.c:125
+#, c-format
+msgid "Available custom strategies are:"
+msgstr ""
+
+#: builtin/merge.c:223
+msgid "could not run stash."
+msgstr ""
+
+#: builtin/merge.c:228
+msgid "stash failed"
+msgstr ""
+
+#: builtin/merge.c:233
+#, c-format
+msgid "not a valid object: %s"
+msgstr ""
+
+#: builtin/merge.c:250
+msgid "read-tree failed"
+msgstr ""
+
+#: builtin/merge.c:279
+msgid " (nothing to squash)"
+msgstr ""
+
+#: builtin/merge.c:292
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:295 builtin/merge.c:1290 builtin/merge.c:1299
+#: builtin/merge.c:1309
+#, c-format
+msgid "Could not write to '%s'"
+msgstr ""
+
+#: builtin/merge.c:323
+msgid "Writing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:325
+msgid "Finishing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:345
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:396
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr ""
+
+#: builtin/merge.c:491
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr ""
+
+#: builtin/merge.c:553
+msgid "git write-tree failed to write a tree"
+msgstr ""
+
+#: builtin/merge.c:594
+msgid "failed to read the cache"
+msgstr ""
+
+#: builtin/merge.c:611
+msgid "Unable to write index."
+msgstr ""
+
+#: builtin/merge.c:624
+msgid "Not handling anything other than two heads merge."
+msgstr ""
+
+#: builtin/merge.c:651
+#, c-format
+msgid "Unknown option for merge-recursive: -X%s"
+msgstr ""
+
+#: builtin/merge.c:666
+#, c-format
+msgid "unable to write %s"
+msgstr ""
+
+#: builtin/merge.c:791
+#, c-format
+msgid "Wonderful.\n"
+msgstr ""
+
+#: builtin/merge.c:840 builtin/merge.c:1287 builtin/merge.c:1295
+#: builtin/merge.c:1303
+#, c-format
+msgid "Could not open '%s' for writing"
+msgstr ""
+
+#: builtin/merge.c:856
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+
+#: builtin/merge.c:871
+#, c-format
+msgid "'%s' is not a commit"
+msgstr ""
+
+#: builtin/merge.c:921
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you can merge."
+msgstr ""
+
+#: builtin/merge.c:924
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr ""
+
+#: builtin/merge.c:951
+msgid "You cannot combine --squash with --no-ff."
+msgstr ""
+
+#: builtin/merge.c:956
+msgid "You cannot combine --no-ff with --ff-only."
+msgstr ""
+
+#: builtin/merge.c:984
+msgid "Can merge only exactly one commit into empty head"
+msgstr ""
+
+#: builtin/merge.c:987
+msgid "Squash commit into empty head not supported yet"
+msgstr ""
+
+#: builtin/merge.c:989
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr ""
+
+#: builtin/merge.c:993 builtin/merge.c:1041
+#, c-format
+msgid "%s - not something we can merge"
+msgstr ""
+
+#: builtin/merge.c:1099
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr ""
+
+#: builtin/merge.c:1133
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr ""
+
+#: builtin/merge.c:1137
+#, c-format
+msgid "Nope.\n"
+msgstr ""
+
+#: builtin/merge.c:1170
+msgid "Not possible to fast-forward, aborting."
+msgstr ""
+
+#: builtin/merge.c:1196 builtin/merge.c:1269
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr ""
+
+#: builtin/merge.c:1200
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr ""
+
+#: builtin/merge.c:1261
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr ""
+
+#: builtin/merge.c:1263
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr ""
+
+#: builtin/merge.c:1271
+#, c-format
+msgid "Using the %s to prepare resolving by hand.\n"
+msgstr ""
+
+#: builtin/merge.c:1314
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr ""
+
+#: builtin/mv.c:103
+#, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr ""
+
+#: builtin/mv.c:107
+msgid "bad source"
+msgstr ""
+
+#: builtin/mv.c:110
+msgid "can not move directory into itself"
+msgstr ""
+
+#: builtin/mv.c:113
+msgid "cannot move directory over file"
+msgstr ""
+
+#: builtin/mv.c:123
+#, c-format
+msgid "Huh? %.*s is in index?"
+msgstr ""
+
+#: builtin/mv.c:135
+msgid "source directory is empty"
+msgstr ""
+
+#: builtin/mv.c:166
+msgid "not under version control"
+msgstr ""
+
+#: builtin/mv.c:168
+msgid "destination exists"
+msgstr ""
+
+#: builtin/mv.c:175
+#, c-format
+msgid "%s; will overwrite!"
+msgstr ""
+
+#: builtin/mv.c:178
+msgid "Cannot overwrite"
+msgstr ""
+
+#: builtin/mv.c:181
+msgid "multiple sources for the same target"
+msgstr ""
+
+#: builtin/mv.c:196
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr ""
+
+#: builtin/mv.c:206
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr ""
+
+#: builtin/mv.c:209
+#, c-format
+msgid "renaming '%s' failed"
+msgstr ""
+
+#: builtin/notes.c:122
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:128
+msgid "can't fdopen 'show' output fd"
+msgstr ""
+
+#: builtin/notes.c:138
+#, c-format
+msgid "failed to close pipe to 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:141
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:158 builtin/tag.c:311
+#, c-format
+msgid "could not create file '%s'"
+msgstr ""
+
+#: builtin/notes.c:172
+msgid "Please supply the note contents using either -m or -F option"
+msgstr ""
+
+#: builtin/notes.c:193 builtin/notes.c:797
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:198
+msgid "unable to write note object"
+msgstr ""
+
+#: builtin/notes.c:200
+#, c-format
+msgid "The note contents has been left in %s"
+msgstr ""
+
+#: builtin/notes.c:234 builtin/tag.c:445
+#, c-format
+msgid "cannot read '%s'"
+msgstr ""
+
+#: builtin/notes.c:236 builtin/tag.c:448
+#, c-format
+msgid "could not open or read '%s'"
+msgstr ""
+
+#: builtin/notes.c:255 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:508 builtin/notes.c:560 builtin/notes.c:631
+#: builtin/notes.c:636 builtin/notes.c:710 builtin/notes.c:752
+#: builtin/notes.c:789 builtin/reset.c:303 builtin/tag.c:461
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr ""
+
+#: builtin/notes.c:258
+#, c-format
+msgid "Failed to read object '%s'."
+msgstr ""
+
+#: builtin/notes.c:283
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr ""
+
+#: builtin/notes.c:295
+msgid "Failed to write current notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:307
+msgid "Failed to commit notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:339
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:349
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#. TRANSLATORS: The first %s is the name of the
+#. environment variable, the second %s is its value
+#: builtin/notes.c:376
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:440
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr ""
+
+#: builtin/notes.c:455
+#, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr ""
+
+#. TRANSLATORS: The first %s is one of "git notes ACTION",
+#. e.g. "add", "copy", "append" etc.
+#: builtin/notes.c:481
+#, c-format
+msgid "Refusing to %s notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#: builtin/notes.c:501 builtin/notes.c:553 builtin/notes.c:614
+#: builtin/notes.c:626 builtin/notes.c:698 builtin/notes.c:745
+#: builtin/notes.c:782 builtin/notes.c:821
+msgid "too many parameters"
+msgstr ""
+
+#: builtin/notes.c:505
+msgid "list"
+msgstr ""
+
+#: builtin/notes.c:514 builtin/notes.c:758
+#, c-format
+msgid "No note found for object %s."
+msgstr ""
+
+#: builtin/notes.c:562
+msgid "add"
+msgstr ""
+
+#: builtin/notes.c:567
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:572 builtin/notes.c:649
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:622
+msgid "too few parameters"
+msgstr ""
+
+#: builtin/notes.c:638
+msgid "copy"
+msgstr ""
+
+#: builtin/notes.c:643
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:655
+#, c-format
+msgid "Missing notes on source object %s. Cannot copy."
+msgstr ""
+
+#: builtin/notes.c:703
+#, 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 ""
+
+#: builtin/notes.c:754
+msgid "show"
+msgstr ""
+
+#: builtin/notes.c:791
+msgid "remove"
+msgstr ""
+
+#: builtin/notes.c:795
+#, c-format
+msgid "Object %s has no note\n"
+msgstr ""
+
+#: builtin/notes.c:825
+msgid "prune"
+msgstr ""
+
+#: builtin/notes.c:877
+#, c-format
+msgid "Unknown subcommand: %s"
+msgstr ""
+
+#: builtin/push.c:43
+msgid "tag shorthand without <tag>"
+msgstr ""
+
+#: builtin/push.c:62
+msgid "--delete only accepts plain target ref names"
+msgstr ""
+
+#: builtin/push.c:72
+msgid "You are not currently on a branch."
+msgstr ""
+
+#: builtin/push.c:74
+#, c-format
+msgid "The current branch %s is not tracking anything."
+msgstr ""
+
+#: builtin/push.c:77
+#, c-format
+msgid "The current branch %s is tracking multiple branches, refusing to push."
+msgstr ""
+
+#: builtin/push.c:100
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+
+#: builtin/push.c:120
+#, c-format
+msgid "Pushing to %s\n"
+msgstr ""
+
+#: builtin/push.c:124
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr ""
+
+#: builtin/push.c:132
+#, c-format
+msgid ""
+"To prevent you from losing history, non-fast-forward updates were rejected\n"
+"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
+"'Note about fast-forwards' section of 'git push --help' for details.\n"
+msgstr ""
+
+#: builtin/push.c:149
+#, c-format
+msgid "bad repository '%s'"
+msgstr ""
+
+#: builtin/push.c:150
+msgid "No destination configured to push to."
+msgstr ""
+
+#: builtin/push.c:158
+msgid "--all and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:159
+msgid "--all can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:164
+msgid "--mirror and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:165
+msgid "--mirror can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:170
+msgid "--all and --mirror are incompatible"
+msgstr ""
+
+#: builtin/push.c:235
+msgid "--delete is incompatible with --all, --mirror and --tags"
+msgstr ""
+
+#: builtin/push.c:237
+msgid "--delete doesn't make sense without any refs"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "mixed"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "soft"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "hard"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "merge"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "keep"
+msgstr ""
+
+#: builtin/reset.c:95
+msgid "You do not have a valid HEAD."
+msgstr ""
+
+#: builtin/reset.c:97
+msgid "Failed to find tree of HEAD."
+msgstr ""
+
+#: builtin/reset.c:103
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr ""
+
+#: builtin/reset.c:108
+msgid "Could not write new index file."
+msgstr ""
+
+#: builtin/reset.c:118
+#, c-format
+msgid "HEAD is now at %s"
+msgstr ""
+
+#: builtin/reset.c:142
+msgid "Could not read index"
+msgstr ""
+
+#: builtin/reset.c:145
+msgid "Unstaged changes after reset:"
+msgstr ""
+
+#: builtin/reset.c:225
+#, c-format
+msgid "Reflog action message too long: %.*s..."
+msgstr ""
+
+#: builtin/reset.c:231
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr ""
+
+#: builtin/reset.c:307
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr ""
+
+#: builtin/reset.c:312
+msgid "--patch is incompatible with --{hard,mixed,soft}"
+msgstr ""
+
+#: builtin/reset.c:321
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+
+#: builtin/reset.c:323
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr ""
+
+#: builtin/reset.c:335
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr ""
+
+#: builtin/reset.c:351
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr ""
+
+#: builtin/revert.c:82
+msgid "program error"
+msgstr ""
+
+#: builtin/revert.c:154 builtin/revert.c:188
+#, c-format
+msgid "Could not read commit message of %s"
+msgstr ""
+
+#: builtin/revert.c:202
+#, c-format
+msgid "Could not extract author email from %s"
+msgstr ""
+
+#: builtin/revert.c:214
+#, c-format
+msgid "Could not extract author time from %s"
+msgstr ""
+
+#: builtin/revert.c:230
+#, c-format
+msgid "No author information found in %s"
+msgstr ""
+
+#: builtin/revert.c:267
+#, c-format
+msgid "Could not write to %s."
+msgstr ""
+
+#: builtin/revert.c:270
+#, c-format
+msgid "Error wrapping up %s"
+msgstr ""
+
+#: builtin/revert.c:290
+msgid ""
+"Your local changes would be overwritten by revert.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#: builtin/revert.c:293
+msgid ""
+"Your local changes would be overwritten by cherry-pick.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:351
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr ""
+
+#: builtin/revert.c:417
+msgid "Your index file is unmerged."
+msgstr ""
+
+#: builtin/revert.c:420
+msgid "You do not have a valid HEAD"
+msgstr ""
+
+#: builtin/revert.c:428
+msgid "Cannot revert a root commit"
+msgstr ""
+
+#: builtin/revert.c:437
+#, c-format
+msgid "Commit %s is a merge but no -m option was given."
+msgstr ""
+
+#: builtin/revert.c:445
+#, c-format
+msgid "Commit %s does not have parent %d"
+msgstr ""
+
+#: builtin/revert.c:449
+#, c-format
+msgid "Mainline was specified but commit %s is not a merge."
+msgstr ""
+
+#. TRANSLATORS: The first %s will be "revert" or
+#. "cherry-pick", the second %s a SHA1
+#: builtin/revert.c:460
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr ""
+
+#: builtin/revert.c:464
+#, c-format
+msgid "Cannot get commit message for %s"
+msgstr ""
+
+#: builtin/revert.c:525
+#, c-format
+msgid "could not revert %s... %s"
+msgstr ""
+
+#: builtin/revert.c:526
+#, c-format
+msgid "could not apply %s... %s"
+msgstr ""
+
+#: builtin/revert.c:559
+msgid "empty commit set passed"
+msgstr ""
+
+#: builtin/revert.c:573
+msgid "cherry-pick --ff cannot be used with --signoff"
+msgstr ""
+
+#: builtin/revert.c:575
+msgid "cherry-pick --ff cannot be used with --no-commit"
+msgstr ""
+
+#: builtin/revert.c:577
+msgid "cherry-pick --ff cannot be used with -x"
+msgstr ""
+
+#: builtin/revert.c:579
+msgid "cherry-pick --ff cannot be used with --edit"
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:584
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr ""
+
+#: builtin/rm.c:118
+#, c-format
+msgid ""
+"'%s' has staged content different from both the file and the HEAD\n"
+"(use -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:124
+#, c-format
+msgid ""
+"'%s' has changes staged in the index\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:128
+#, c-format
+msgid ""
+"'%s' has local modifications\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:202
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr ""
+
+#: builtin/rm.c:238
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr ""
+
+#: builtin/shortlog.c:161
+#, c-format
+msgid "Missing author: %s"
+msgstr ""
+
+#: builtin/tag.c:123 builtin/tag.c:464
+#, c-format
+msgid "tag name too long: %.*s..."
+msgstr ""
+
+#: builtin/tag.c:128
+#, c-format
+msgid "tag '%s' not found."
+msgstr ""
+
+#: builtin/tag.c:143
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr ""
+
+#: builtin/tag.c:155
+#, c-format
+msgid "could not verify the tag '%s'"
+msgstr ""
+
+#: builtin/tag.c:170
+msgid "committer info too long."
+msgstr ""
+
+#: builtin/tag.c:190
+msgid "could not run gpg."
+msgstr ""
+
+#: builtin/tag.c:196
+msgid "gpg did not accept the tag data"
+msgstr ""
+
+#: builtin/tag.c:203
+msgid "gpg failed to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:218
+msgid ""
+"\n"
+"#\n"
+"# Write a tag message\n"
+"#\n"
+msgstr ""
+
+#: builtin/tag.c:226
+#, c-format
+msgid "signing key value too long (%.10s...)"
+msgstr ""
+
+#: builtin/tag.c:272
+msgid "unable to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:274
+msgid "unable to write tag file"
+msgstr ""
+
+#: builtin/tag.c:289
+msgid "bad object type."
+msgstr ""
+
+#: builtin/tag.c:302
+msgid "tag header too big."
+msgstr ""
+
+#: builtin/tag.c:329
+msgid "no tag message?"
+msgstr ""
+
+#: builtin/tag.c:335
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr ""
+
+#: builtin/tag.c:428
+msgid "-n option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:430
+msgid "--contains option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:438
+msgid "only one -F or -m option is allowed."
+msgstr ""
+
+#: builtin/tag.c:458
+msgid "too many params"
+msgstr ""
+
+#: builtin/tag.c:466
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr ""
+
+#: builtin/tag.c:471
+#, c-format
+msgid "tag '%s' already exists"
+msgstr ""
+
+#: builtin/tag.c:479
+#, c-format
+msgid "%s: cannot lock the ref"
+msgstr ""
+
+#: builtin/tag.c:481
+#, c-format
+msgid "%s: cannot update the ref"
+msgstr ""
+
+#: builtin/tag.c:483
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr ""
+
+#: git-am.sh:47
+msgid "You need to set your committer info first"
+msgstr ""
+
+#: git-am.sh:80
+#, sh-format
+msgid ""
+"When you have resolved this problem run \"$cmdline --resolved\".\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:96
+msgid "Cannot fall back to three-way merge."
+msgstr ""
+
+#: git-am.sh:111
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+
+#: git-am.sh:120
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+
+#: git-am.sh:236
+msgid "Only one StGIT patch series can be applied at once"
+msgstr ""
+
+#: git-am.sh:288
+#, sh-format
+msgid "Patch format $patch_format is not supported."
+msgstr ""
+
+#: git-am.sh:290
+msgid "Patch format detection failed."
+msgstr ""
+
+#: git-am.sh:340
+msgid "-d option is no longer supported. Do not use."
+msgstr ""
+
+#: git-am.sh:403
+#, sh-format
+msgid "previous rebase directory $dotest still exists but mbox given."
+msgstr ""
+
+#: git-am.sh:408
+msgid "Please make up your mind. --skip or --abort?"
+msgstr ""
+
+#: git-am.sh:434
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr ""
+
+#: git-am.sh:499
+#, sh-format
+msgid "Dirty index: cannot apply patches (dirty: $files)"
+msgstr ""
+
+#: git-am.sh:595
+#, sh-format
+msgid ""
+"Patch is empty. Was it split wrong?\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:632
+msgid "Patch does not have a valid e-mail address."
+msgstr ""
+
+#: git-am.sh:679
+msgid "cannot be interactive without stdin connected to a terminal."
+msgstr ""
+
+#: git-am.sh:683
+msgid "Commit Body is:"
+msgstr ""
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#: git-am.sh:690
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+msgstr ""
+
+#: git-am.sh:726
+#, sh-format
+msgid "Applying: $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:747
+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 ""
+
+#: git-am.sh:755
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+
+#: git-am.sh:771
+msgid "No changes -- Patch already applied."
+msgstr ""
+
+#: git-am.sh:781
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:797
+msgid "applying to an empty history"
+msgstr ""
diff --git a/po/hi.po b/po/hi.po
--- /dev/null
+++ b/po/hi.po
@@ -0,0 +1,2787 @@
+# Hindi translations for Git.
+# Copyright (C) 2010 Ramkumar Ramachandra <artagnon@gmail.com>
+# This file is distributed under the same license as the Git package.
+# Ramkumar Ramachandra <artagnon@gmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-09-20 15:11+0000\n"
+"PO-Revision-Date: 2010-09-09 20:55+0530\n"
+"Last-Translator: Ramkumar Ramachandra <artagnon@gmail.com>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: hi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: wt-status.c:56
+msgid "# Unmerged paths:"
+msgstr ""
+
+#: wt-status.c:62 wt-status.c:79
+#, c-format
+msgid "# (use \"git reset %s <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:64 wt-status.c:81
+msgid "# (use \"git rm --cached <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:65
+msgid "# (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr ""
+
+#: wt-status.c:73
+msgid "# Changes to be committed:"
+msgstr ""
+
+#: wt-status.c:91
+msgid "# Changed but not updated:"
+msgstr ""
+
+#: wt-status.c:95
+msgid "# (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:97
+msgid "# (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:98
+msgid ""
+"# (use \"git checkout -- <file>...\" to discard changes in working "
+"directory)"
+msgstr ""
+
+#: wt-status.c:100
+msgid "# (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+
+#: wt-status.c:109
+#, c-format
+msgid "# %s files:"
+msgstr ""
+
+#: wt-status.c:112
+#, c-format
+msgid "# (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+
+#: wt-status.c:129
+msgid "bug"
+msgstr ""
+
+#: wt-status.c:134
+msgid "both deleted:"
+msgstr ""
+
+#: wt-status.c:135
+msgid "added by us:"
+msgstr ""
+
+#: wt-status.c:136
+msgid "deleted by them:"
+msgstr ""
+
+#: wt-status.c:137
+msgid "added by them:"
+msgstr ""
+
+#: wt-status.c:138
+msgid "deleted by us:"
+msgstr ""
+
+#: wt-status.c:139
+msgid "both added:"
+msgstr ""
+
+#: wt-status.c:140
+msgid "both modified:"
+msgstr ""
+
+#: wt-status.c:170
+msgid "new commits, "
+msgstr ""
+
+#: wt-status.c:172
+msgid "modified content, "
+msgstr ""
+
+#: wt-status.c:174
+msgid "untracked content, "
+msgstr ""
+
+#: wt-status.c:188
+#, c-format
+msgid "new file: %s"
+msgstr ""
+
+#: wt-status.c:191
+#, c-format
+msgid "copied: %s -> %s"
+msgstr ""
+
+#: wt-status.c:194
+#, c-format
+msgid "deleted: %s"
+msgstr ""
+
+#: wt-status.c:197
+#, c-format
+msgid "modified: %s"
+msgstr ""
+
+#: wt-status.c:200
+#, c-format
+msgid "renamed: %s -> %s"
+msgstr ""
+
+#: wt-status.c:203
+#, c-format
+msgid "typechange: %s"
+msgstr ""
+
+#: wt-status.c:206
+#, c-format
+msgid "unknown: %s"
+msgstr ""
+
+#: wt-status.c:209
+#, c-format
+msgid "unmerged: %s"
+msgstr ""
+
+#: wt-status.c:212
+#, c-format
+msgid "bug: unhandled diff status %c"
+msgstr ""
+
+#: wt-status.c:635
+msgid "On branch "
+msgstr ""
+
+#: wt-status.c:642
+msgid "Not currently on any branch."
+msgstr ""
+
+#: wt-status.c:652
+msgid "# Initial commit"
+msgstr ""
+
+#: wt-status.c:666
+msgid "Untracked"
+msgstr ""
+
+#: wt-status.c:668
+msgid "Ignored"
+msgstr ""
+
+#: wt-status.c:670
+#, c-format
+msgid "# Untracked files not listed%s\n"
+msgstr ""
+
+#: wt-status.c:672
+msgid " (use -u option to show untracked files)"
+msgstr ""
+
+#: wt-status.c:678
+#, c-format
+msgid "# No changes\n"
+msgstr ""
+
+#: wt-status.c:682
+#, c-format
+msgid "no changes added to commit%s\n"
+msgstr ""
+
+#: wt-status.c:684
+msgid " (use \"git add\" and/or \"git commit -a\")"
+msgstr ""
+
+#: wt-status.c:686
+#, c-format
+msgid "nothing added to commit but untracked files present%s\n"
+msgstr ""
+
+#: wt-status.c:688
+msgid " (use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:690 wt-status.c:693 wt-status.c:696
+#, c-format
+msgid "nothing to commit%s\n"
+msgstr ""
+
+#: wt-status.c:691
+msgid " (create/copy files and use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:694
+msgid " (use -u to show untracked files)"
+msgstr ""
+
+#: wt-status.c:697
+msgid " (working directory clean)"
+msgstr ""
+
+#: wt-status.c:795
+msgid "HEAD (no branch)"
+msgstr ""
+
+#: wt-status.c:801
+msgid "Initial commit on "
+msgstr ""
+
+#: wt-status.c:816
+msgid "behind "
+msgstr ""
+
+#: wt-status.c:819 wt-status.c:822
+msgid "ahead "
+msgstr ""
+
+#: wt-status.c:824
+msgid ", behind "
+msgstr ""
+
+#: builtin/add.c:41
+#, c-format
+msgid "unexpected diff status %c"
+msgstr ""
+
+#: builtin/add.c:67 builtin/commit.c:244
+msgid "updating files failed"
+msgstr ""
+
+#: builtin/add.c:77
+#, c-format
+msgid "remove '%s'\n"
+msgstr ""
+
+#: builtin/add.c:175
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr ""
+
+#: builtin/add.c:191
+msgid "Unstaged changes after refreshing the index:"
+msgstr ""
+
+#: builtin/add.c:194 builtin/add.c:452 builtin/rm.c:194
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr ""
+
+#: builtin/add.c:208
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr ""
+
+#: builtin/add.c:275
+msgid "Could not read the index"
+msgstr ""
+
+#: builtin/add.c:284
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr ""
+
+#: builtin/add.c:288
+#, fuzzy
+msgid "Could not write patch"
+msgstr "%s को समूह द्वारा लिखने की इजाज़त नही दे सके"
+
+#: builtin/add.c:293
+#, fuzzy, c-format
+msgid "Could not stat '%s'"
+msgstr "'%s' को [stat] नहीं कर सके"
+
+#: builtin/add.c:295
+msgid "Empty patch. Aborted."
+msgstr ""
+
+#: builtin/add.c:301
+#, c-format
+msgid "Could not apply '%s'"
+msgstr ""
+
+#: builtin/add.c:349
+#, c-format
+msgid "Use -f if you really want to add them.\n"
+msgstr ""
+
+#: builtin/add.c:350
+msgid "no files added"
+msgstr ""
+
+#: builtin/add.c:356
+msgid "adding files failed"
+msgstr ""
+
+#: builtin/add.c:388
+msgid "-A and -u are mutually incompatible"
+msgstr ""
+
+#: builtin/add.c:390
+msgid "Option --ignore-missing can only be used together with --dry-run"
+msgstr ""
+
+#: builtin/add.c:410
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr ""
+
+#: builtin/add.c:411
+#, c-format
+msgid "Maybe you wanted to say 'git add .'?\n"
+msgstr ""
+
+#: builtin/add.c:417 builtin/clean.c:95 builtin/commit.c:301
+#: builtin/commit.c:310 builtin/mv.c:77 builtin/rm.c:171
+msgid "index file corrupt"
+msgstr ""
+
+#: builtin/add.c:468 builtin/mv.c:223 builtin/rm.c:268
+msgid "Unable to write new index file"
+msgstr ""
+
+#: builtin/archive.c:17
+#, c-format
+msgid "could not create archive file '%s'"
+msgstr ""
+
+#: builtin/archive.c:20
+msgid "could not redirect output"
+msgstr ""
+
+#: builtin/archive.c:36
+msgid "git archive: Remote with no URL"
+msgstr ""
+
+#: builtin/archive.c:46
+msgid "git archive: expected ACK/NAK, got EOF"
+msgstr ""
+
+#: builtin/archive.c:51
+#, c-format
+msgid "git archive: NACK %s"
+msgstr ""
+
+#: builtin/archive.c:52
+msgid "git archive: protocol error"
+msgstr ""
+
+#: builtin/archive.c:57
+msgid "git archive: expected a flush"
+msgstr ""
+
+#: builtin/branch.c:136
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but it is not yet merged to HEAD."
+msgstr ""
+
+#: builtin/branch.c:140
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD."
+msgstr ""
+
+#. TRANSLATORS: This is "remote " in "remote branch '%s' not found"
+#: builtin/branch.c:161
+msgid "remote "
+msgstr ""
+
+#: builtin/branch.c:169
+msgid "cannot use -a with -d"
+msgstr ""
+
+#: builtin/branch.c:175
+msgid "Couldn't look up commit object for HEAD"
+msgstr ""
+
+#: builtin/branch.c:180
+#, c-format
+msgid "Cannot delete the branch '%s' which you are currently on."
+msgstr ""
+
+#: builtin/branch.c:190
+#, c-format
+msgid "%sbranch '%s' not found."
+msgstr ""
+
+#: builtin/branch.c:198
+#, c-format
+msgid "Couldn't look up commit object for '%s'"
+msgstr ""
+
+#: builtin/branch.c:204
+#, c-format
+msgid ""
+"The branch '%s' is not fully merged.\n"
+"If you are sure you want to delete it, run 'git branch -D %s'."
+msgstr ""
+
+#: builtin/branch.c:212
+#, c-format
+msgid "Error deleting %sbranch '%s'"
+msgstr ""
+
+#: builtin/branch.c:217
+#, c-format
+msgid "Deleted %sbranch %s (was %s).\n"
+msgstr ""
+
+#: builtin/branch.c:222
+msgid "Update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:304
+#, c-format
+msgid "branch '%s' does not point at a commit"
+msgstr ""
+
+#: builtin/branch.c:381
+#, c-format
+msgid "behind %d] "
+msgstr ""
+
+#: builtin/branch.c:383
+#, c-format
+msgid "ahead %d] "
+msgstr ""
+
+#: builtin/branch.c:385
+#, c-format
+msgid "ahead %d, behind %d] "
+msgstr ""
+
+#: builtin/branch.c:484
+msgid "(no branch)"
+msgstr ""
+
+#: builtin/branch.c:544
+msgid "some refs could not be read"
+msgstr ""
+
+#: builtin/branch.c:557
+msgid "cannot rename the current branch while not on any."
+msgstr ""
+
+#: builtin/branch.c:567 builtin/branch.c:571
+#, c-format
+msgid "Invalid branch name: '%s'"
+msgstr ""
+
+#: builtin/branch.c:574
+#, c-format
+msgid "A branch named '%s' already exists."
+msgstr ""
+
+#: builtin/branch.c:580
+msgid "Branch rename failed"
+msgstr ""
+
+#: builtin/branch.c:584
+#, c-format
+msgid "Renamed a misnamed branch '%s' away"
+msgstr ""
+
+#: builtin/branch.c:588
+#, c-format
+msgid "Branch renamed to %s, but HEAD is not updated!"
+msgstr ""
+
+#: builtin/branch.c:595
+msgid "Branch is renamed, but update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:610
+#, c-format
+msgid "malformed object name %s"
+msgstr ""
+
+#: builtin/branch.c:680
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr ""
+
+#: builtin/branch.c:686
+msgid "HEAD not found below refs/heads!"
+msgstr ""
+
+#: builtin/branch.c:706
+msgid "-a and -r options to 'git branch' do not make sense with a branch name"
+msgstr ""
+
+#: builtin/bundle.c:47
+#, c-format
+msgid "%s is okay\n"
+msgstr ""
+
+#: builtin/bundle.c:56
+msgid "Need a repository to create a bundle."
+msgstr ""
+
+#: builtin/bundle.c:60
+msgid "Need a repository to unbundle."
+msgstr ""
+
+#: builtin/checkout.c:107 builtin/checkout.c:135
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr ""
+
+#: builtin/checkout.c:109 builtin/checkout.c:137
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr ""
+
+#: builtin/checkout.c:120
+#, c-format
+msgid "path '%s' does not have all three versions"
+msgstr ""
+
+#: builtin/checkout.c:155
+#, c-format
+msgid "path '%s' does not have all 3 versions"
+msgstr ""
+
+#: builtin/checkout.c:172
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr ""
+
+#: builtin/checkout.c:189
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr ""
+
+#: builtin/checkout.c:194 builtin/reset.c:170
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr ""
+
+#: builtin/checkout.c:216 builtin/checkout.c:371
+msgid "corrupt index file"
+msgstr ""
+
+#: builtin/checkout.c:244 builtin/checkout.c:251
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr ""
+
+#: builtin/checkout.c:280 builtin/checkout.c:475 builtin/clone.c:658
+#: builtin/merge.c:737
+msgid "unable to write new index file"
+msgstr ""
+
+#: builtin/checkout.c:297 builtin/diff.c:307 builtin/merge.c:367
+msgid "diff_setup_done failed"
+msgstr ""
+
+#: builtin/checkout.c:393
+msgid "you need to resolve your current index first"
+msgstr ""
+
+#: builtin/checkout.c:524
+#, fuzzy, c-format
+msgid "Can not do reflog for '%s'\n"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/checkout.c:550
+#, c-format
+msgid "Already on '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:554
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:556
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:558
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:575
+msgid "HEAD is now at"
+msgstr ""
+
+#: builtin/checkout.c:603
+msgid "You are on a branch yet to be born"
+msgstr ""
+
+#: builtin/checkout.c:617
+msgid "Previous HEAD position was"
+msgstr ""
+
+#: builtin/checkout.c:730
+msgid "-B cannot be used with -b"
+msgstr ""
+
+#: builtin/checkout.c:738
+msgid "--patch is incompatible with all other options"
+msgstr ""
+
+#: builtin/checkout.c:744
+msgid "--track needs a branch name"
+msgstr ""
+
+#: builtin/checkout.c:751
+msgid "Missing branch name; try -b"
+msgstr ""
+
+#: builtin/checkout.c:757
+msgid "--orphan and -b|-B are mutually exclusive"
+msgstr ""
+
+#: builtin/checkout.c:759
+msgid "--orphan cannot be used with -t"
+msgstr ""
+
+#: builtin/checkout.c:769
+msgid "git checkout: -f and -m are incompatible"
+msgstr ""
+
+#. case (1)
+#: builtin/checkout.c:815
+#, c-format
+msgid "invalid reference: %s"
+msgstr ""
+
+#. case (1): want a tree
+#: builtin/checkout.c:852
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr ""
+
+#: builtin/checkout.c:878
+msgid "invalid path specification"
+msgstr ""
+
+#: builtin/checkout.c:886
+#, c-format
+msgid ""
+"git checkout: updating paths is incompatible with switching branches.\n"
+"Did you intend to checkout '%s' which can not be resolved as commit?"
+msgstr ""
+
+#: builtin/checkout.c:888
+msgid "git checkout: updating paths is incompatible with switching branches."
+msgstr ""
+
+#: builtin/checkout.c:893
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+
+#: builtin/checkout.c:904
+#, c-format
+msgid "git checkout: we do not like '%s' as a branch name."
+msgstr ""
+
+#: builtin/checkout.c:909
+#, c-format
+msgid "git checkout: branch %s already exists"
+msgstr ""
+
+#: builtin/checkout.c:916
+msgid "Cannot switch branch to a non-commit."
+msgstr ""
+
+#: builtin/checkout.c:919
+msgid "--ours/--theirs is incompatible with switching branches."
+msgstr ""
+
+#: builtin/clean.c:78
+msgid "-x and -X cannot be used together"
+msgstr ""
+
+#: builtin/clean.c:82
+msgid ""
+"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
+msgstr ""
+
+#: builtin/clean.c:85
+msgid ""
+"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
+"clean"
+msgstr ""
+
+#: builtin/clean.c:154 builtin/clean.c:175
+#, c-format
+msgid "Would remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:158 builtin/clean.c:178
+#, c-format
+msgid "Removing %s\n"
+msgstr ""
+
+#: builtin/clean.c:161 builtin/clean.c:181
+#, c-format
+msgid "failed to remove '%s'"
+msgstr ""
+
+#: builtin/clean.c:165
+#, c-format
+msgid "Would not remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:167
+#, c-format
+msgid "Not removing %s\n"
+msgstr ""
+
+#: builtin/clone.c:208
+#, c-format
+msgid "reference repository '%s' is not a local directory."
+msgstr ""
+
+#: builtin/clone.c:235
+#, fuzzy, c-format
+msgid "failed to open '%s'"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/clone.c:239
+#, fuzzy, c-format
+msgid "failed to create directory '%s'"
+msgstr "खराब गिट निर्देशिका %s"
+
+#: builtin/clone.c:241 builtin/diff.c:74
+#, fuzzy, c-format
+msgid "failed to stat '%s'"
+msgstr "'%s' को [stat] नहीं कर सके"
+
+#: builtin/clone.c:243
+#, fuzzy, c-format
+msgid "%s exists and is not a directory"
+msgstr "खराब गिट निर्देशिका %s"
+
+#: builtin/clone.c:257
+#, c-format
+msgid "failed to stat %s\n"
+msgstr ""
+
+#: builtin/clone.c:267
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr ""
+
+#: builtin/clone.c:272
+#, fuzzy, c-format
+msgid "failed to create link '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/clone.c:276
+#, fuzzy, c-format
+msgid "failed to copy file to '%s'"
+msgstr "'%s' की अनुकृति '%s' में नहीं कर सके"
+
+#: builtin/clone.c:305
+#, c-format
+msgid "done.\n"
+msgstr ""
+
+#: builtin/clone.c:387
+msgid "Too many arguments."
+msgstr ""
+
+#: builtin/clone.c:391
+msgid "You must specify a repository to clone."
+msgstr ""
+
+#: builtin/clone.c:399
+#, c-format
+msgid "--bare and --origin %s options are incompatible."
+msgstr ""
+
+#: builtin/clone.c:428
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr ""
+
+#: builtin/clone.c:438
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr ""
+
+#: builtin/clone.c:451 builtin/clone.c:465
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr ""
+
+#: builtin/clone.c:454
+#, c-format
+msgid "could not create work tree dir '%s'."
+msgstr ""
+
+#: builtin/clone.c:470
+#, c-format
+msgid "Cloning into bare repository %s\n"
+msgstr ""
+
+#: builtin/clone.c:472
+#, c-format
+msgid "Cloning into %s\n"
+msgstr ""
+
+#: builtin/clone.c:530
+#, c-format
+msgid "Don't know how to clone %s"
+msgstr ""
+
+#: builtin/clone.c:569
+#, c-format
+msgid "Remote branch %s not found in upstream %s, using HEAD instead"
+msgstr ""
+
+#: builtin/clone.c:579
+msgid "You appear to have cloned an empty repository."
+msgstr ""
+
+#: builtin/clone.c:621
+msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgstr ""
+
+#: builtin/commit.c:41
+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"
+"If the identity used for this commit is wrong, you can fix it with:\n"
+"\n"
+" git commit --amend --author='Your Name <you@example.com>'\n"
+msgstr ""
+
+#: builtin/commit.c:53
+msgid ""
+"You asked to amend the most recent commit, but doing so would make\n"
+"it empty. You can repeat your command with --allow-empty, or you can\n"
+"remove the commit entirely with \"git reset HEAD^\".\n"
+msgstr ""
+
+#: builtin/commit.c:271
+msgid "failed to unpack HEAD tree object"
+msgstr ""
+
+#: builtin/commit.c:299
+msgid "interactive add failed"
+msgstr ""
+
+#: builtin/commit.c:330 builtin/commit.c:350 builtin/commit.c:396
+msgid "unable to write new_index file"
+msgstr ""
+
+#: builtin/commit.c:380
+msgid "cannot do a partial commit during a merge."
+msgstr ""
+
+#: builtin/commit.c:389
+#, fuzzy
+msgid "cannot read the index"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/commit.c:409
+msgid "unable to write temporary index file"
+msgstr ""
+
+#: builtin/commit.c:456 builtin/commit.c:1294
+msgid "could not parse HEAD commit"
+msgstr ""
+
+#: builtin/commit.c:475 builtin/commit.c:481
+#, c-format
+msgid "invalid commit: %s"
+msgstr ""
+
+#: builtin/commit.c:499
+msgid "malformed --author parameter"
+msgstr ""
+
+#: builtin/commit.c:573 builtin/shortlog.c:299
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr ""
+
+#: builtin/commit.c:575
+msgid "could not read log from standard input"
+msgstr ""
+
+#: builtin/commit.c:579
+#, fuzzy, c-format
+msgid "could not read log file '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/commit.c:585
+msgid "commit has empty message"
+msgstr ""
+
+#: builtin/commit.c:591
+msgid "could not read MERGE_MSG"
+msgstr ""
+
+#: builtin/commit.c:595
+msgid "could not read SQUASH_MSG"
+msgstr ""
+
+#: builtin/commit.c:599
+#, fuzzy, c-format
+msgid "could not read '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/commit.c:612
+#, fuzzy, c-format
+msgid "could not open '%s'"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/commit.c:636
+msgid "could not write commit template"
+msgstr ""
+
+#: builtin/commit.c:650
+#, c-format
+msgid ""
+"#\n"
+"# It looks like you may be committing a MERGE.\n"
+"# If this is not correct, please remove the file\n"
+"#\t%s\n"
+"# and try again.\n"
+"#\n"
+msgstr ""
+
+#: builtin/commit.c:659
+#, c-format
+msgid ""
+"\n"
+"# Please enter the commit message for your changes."
+msgstr ""
+
+#: builtin/commit.c:663
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:668
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be kept; you may remove them yourself if you want to.\n"
+"# An empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:680
+#, c-format
+msgid "%s# Author: %s\n"
+msgstr ""
+
+#: builtin/commit.c:688
+#, c-format
+msgid "%s# Committer: %s\n"
+msgstr ""
+
+#: builtin/commit.c:705
+#, fuzzy
+msgid "Cannot read index"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/commit.c:737
+msgid "Error building trees"
+msgstr ""
+
+#: builtin/commit.c:752 builtin/tag.c:321
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr ""
+
+#: builtin/commit.c:832
+#, c-format
+msgid "No existing author found with '%s'"
+msgstr ""
+
+#: builtin/commit.c:847 builtin/commit.c:1039
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr ""
+
+#: builtin/commit.c:864
+msgid "Using both --reset-author and --author does not make sense"
+msgstr ""
+
+#: builtin/commit.c:878
+msgid "You have nothing to amend."
+msgstr ""
+
+#: builtin/commit.c:880
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr ""
+
+#: builtin/commit.c:889
+msgid "Only one of -c/-C/-F can be used."
+msgstr ""
+
+#: builtin/commit.c:891
+msgid "Option -m cannot be combined with -c/-C/-F."
+msgstr ""
+
+#: builtin/commit.c:897
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr ""
+
+#: builtin/commit.c:906
+#, c-format
+msgid "could not lookup commit %s"
+msgstr ""
+
+#: builtin/commit.c:909
+#, c-format
+msgid "could not parse commit %s"
+msgstr ""
+
+#: builtin/commit.c:937
+msgid "Only one of --include/--only/--all/--interactive can be used."
+msgstr ""
+
+#: builtin/commit.c:939
+msgid "No paths with --include/--only does not make sense."
+msgstr ""
+
+#: builtin/commit.c:941
+msgid "Clever... amending the last one with dirty index."
+msgstr ""
+
+#: builtin/commit.c:943
+msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
+msgstr ""
+
+#: builtin/commit.c:953
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr ""
+
+#: builtin/commit.c:958
+msgid "Paths with -a does not make sense."
+msgstr ""
+
+#: builtin/commit.c:960
+msgid "Paths with --interactive does not make sense."
+msgstr ""
+
+#: builtin/commit.c:1142
+msgid "couldn't look up newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1144
+msgid "could not parse newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1185
+msgid "detached HEAD"
+msgstr ""
+
+#: builtin/commit.c:1187
+msgid " (root-commit)"
+msgstr ""
+
+#: builtin/commit.c:1307 builtin/merge.c:461
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr ""
+
+#: builtin/commit.c:1312
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr ""
+
+#: builtin/commit.c:1319
+msgid "could not read MERGE_MODE"
+msgstr ""
+
+#: builtin/commit.c:1336
+#, c-format
+msgid "could not read commit message: %s"
+msgstr ""
+
+#: builtin/commit.c:1350
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr ""
+
+#: builtin/commit.c:1358
+msgid "failed to write commit object"
+msgstr ""
+
+#: builtin/commit.c:1375
+msgid "cannot lock HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1379
+msgid "cannot update HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1388
+msgid ""
+"Repository has been updated, but unable to write\n"
+"new_index file. Check that disk is not full or quota is\n"
+"not exceeded, and then \"git reset HEAD\" to recover."
+msgstr ""
+
+#: builtin/describe.c:205
+#, c-format
+msgid "annotated tag %s not available"
+msgstr ""
+
+#: builtin/describe.c:209
+#, c-format
+msgid "annotated tag %s has no embedded name"
+msgstr ""
+
+#: builtin/describe.c:211
+#, c-format
+msgid "tag '%s' is really '%s' here"
+msgstr ""
+
+#: builtin/describe.c:238
+#, c-format
+msgid "Not a valid object name %s"
+msgstr ""
+
+#: builtin/describe.c:241
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr ""
+
+#: builtin/describe.c:258
+#, fuzzy, c-format
+msgid "no tag exactly matches '%s'"
+msgstr "टेम्पलेट '%s' को [stat] नहीं कर सके"
+
+#: builtin/describe.c:260
+#, c-format
+msgid "searching to describe %s\n"
+msgstr ""
+
+#: builtin/describe.c:295
+#, c-format
+msgid "finished search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:319
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+
+#: builtin/describe.c:323
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+
+#: builtin/describe.c:344
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr ""
+
+#: builtin/describe.c:347
+#, c-format
+msgid ""
+"more than %i tags found; listed %i most recent\n"
+"gave up search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:398
+msgid "--long is incompatible with --abbrev=0"
+msgstr ""
+
+#: builtin/describe.c:423
+msgid "No names found, cannot describe anything."
+msgstr ""
+
+#: builtin/describe.c:430
+msgid "--dirty is incompatible with committishes"
+msgstr ""
+
+#: builtin/diff.c:76
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr ""
+
+#: builtin/diff.c:225
+#, c-format
+msgid "invalid option: %s"
+msgstr ""
+
+#: builtin/diff.c:302
+msgid "Not a git repository"
+msgstr ""
+
+#: builtin/diff.c:334
+msgid "No HEAD commit to compare with (yet)"
+msgstr ""
+
+#: builtin/diff.c:349
+#, c-format
+msgid "invalid object '%s' given."
+msgstr ""
+
+#: builtin/diff.c:354
+#, c-format
+msgid "more than %d trees given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:364
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:372
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr ""
+
+#: builtin/fetch.c:175
+msgid "Couldn't find remote ref HEAD"
+msgstr ""
+
+#: builtin/fetch.c:228
+#, fuzzy, c-format
+msgid "object %s not found"
+msgstr "टेम्पलेट्स नहीं मिले: %s"
+
+#: builtin/fetch.c:233
+msgid "[up to date]"
+msgstr ""
+
+#.
+#. * If this is the head, and it's not okay to update
+#. * the head, and the old value of the head isn't empty...
+#.
+#: builtin/fetch.c:246
+#, c-format
+msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
+msgstr ""
+
+#: builtin/fetch.c:247 builtin/fetch.c:309
+msgid "[rejected]"
+msgstr ""
+
+#: builtin/fetch.c:257
+msgid "[tag update]"
+msgstr ""
+
+#: builtin/fetch.c:258 builtin/fetch.c:280 builtin/fetch.c:293
+msgid " (unable to update local ref)"
+msgstr ""
+
+#: builtin/fetch.c:270
+msgid "[new tag]"
+msgstr ""
+
+#: builtin/fetch.c:274
+msgid "[new branch]"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "unable to update local ref"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "forced update"
+msgstr ""
+
+#: builtin/fetch.c:310
+msgid "(non-fast-forward)"
+msgstr ""
+
+#: builtin/fetch.c:328 builtin/fetch.c:651
+#, fuzzy, c-format
+msgid "cannot open %s: %s\n"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/fetch.c:406
+#, c-format
+msgid "From %.*s\n"
+msgstr ""
+
+#: builtin/fetch.c:417
+#, c-format
+msgid ""
+"some local refs could not be updated; try running\n"
+" 'git remote prune %s' to remove any old, conflicting branches"
+msgstr ""
+
+#: builtin/fetch.c:467
+msgid "could not run rev-list"
+msgstr ""
+
+#: builtin/fetch.c:481
+#, c-format
+msgid "failed write to rev-list: %s"
+msgstr ""
+
+#: builtin/fetch.c:488
+#, c-format
+msgid "failed to close rev-list's stdin: %s"
+msgstr ""
+
+#: builtin/fetch.c:515
+#, c-format
+msgid " (%s will become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:516
+#, c-format
+msgid " (%s has become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:523
+msgid "[deleted]"
+msgstr ""
+
+#: builtin/fetch.c:524
+msgid "(none)"
+msgstr ""
+
+#: builtin/fetch.c:641
+#, c-format
+msgid "Refusing to fetch into current branch %s of non-bare repository"
+msgstr ""
+
+#: builtin/fetch.c:675
+#, c-format
+msgid "Don't know how to fetch from %s"
+msgstr ""
+
+#: builtin/fetch.c:729
+#, c-format
+msgid "Option \"%s\" value \"%s\" is not valid for %s"
+msgstr ""
+
+#: builtin/fetch.c:732
+#, c-format
+msgid "Option \"%s\" is ignored for %s\n"
+msgstr ""
+
+#: builtin/fetch.c:821
+#, c-format
+msgid "Fetching %s\n"
+msgstr ""
+
+#: builtin/fetch.c:823
+#, c-format
+msgid "Could not fetch %s"
+msgstr ""
+
+#: builtin/fetch.c:839
+msgid ""
+"No remote repository specified. Please, specify either a URL or a\n"
+"remote name from which new revisions should be fetched."
+msgstr ""
+
+#: builtin/fetch.c:859
+msgid "You need to specify a tag name."
+msgstr ""
+
+#: builtin/fetch.c:899
+msgid "fetch --all does not take a repository argument"
+msgstr ""
+
+#: builtin/fetch.c:901
+msgid "fetch --all does not make sense with refspecs"
+msgstr ""
+
+#: builtin/fetch.c:912
+#, c-format
+msgid "No such remote or remote group: %s"
+msgstr ""
+
+#: builtin/fetch.c:920
+msgid "Fetching a group and specifying refspecs does not make sense"
+msgstr ""
+
+#: builtin/gc.c:63
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr ""
+
+#: builtin/gc.c:78
+msgid "Too many options specified"
+msgstr ""
+
+#: builtin/gc.c:103
+#, fuzzy, c-format
+msgid "insanely long object directory %.*s"
+msgstr "खराब गिट निर्देशिका %s"
+
+#: builtin/gc.c:220
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr ""
+
+#: builtin/gc.c:223
+#, c-format
+msgid ""
+"Auto packing the repository for optimum performance. You may also\n"
+"run \"git gc\" manually. See \"git help gc\" for more information."
+msgstr ""
+
+#: builtin/gc.c:251
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+
+#: builtin/grep.c:252
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr ""
+
+#: builtin/grep.c:457
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr ""
+
+#: builtin/grep.c:508
+#, c-format
+msgid "'%s': %s"
+msgstr ""
+
+#: builtin/grep.c:519
+#, c-format
+msgid "'%s': short read %s"
+msgstr ""
+
+#: builtin/grep.c:581
+#, c-format
+msgid "Failed to chdir: %s"
+msgstr ""
+
+#: builtin/grep.c:671 builtin/grep.c:697
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr ""
+
+#: builtin/grep.c:703
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr ""
+
+#: builtin/grep.c:755
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr ""
+
+#: builtin/grep.c:771
+#, fuzzy, c-format
+msgid "cannot open '%s'"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/grep.c:1012
+msgid "no pattern given."
+msgstr ""
+
+#: builtin/grep.c:1016
+msgid "cannot mix --fixed-strings and regexp"
+msgstr ""
+
+#: builtin/grep.c:1041
+#, c-format
+msgid "bad object %s"
+msgstr ""
+
+#: builtin/grep.c:1068
+msgid "--open-files-in-pager only works on the worktree"
+msgstr ""
+
+#: builtin/grep.c:1093
+msgid "--cached cannot be used with --no-index."
+msgstr ""
+
+#: builtin/grep.c:1095
+msgid "--no-index cannot be used with revs."
+msgstr ""
+
+#: builtin/grep.c:1104
+msgid "both --cached and trees are given."
+msgstr ""
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "%s को समूह द्वारा लिखने की इजाज़त नही दे सके"
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr "टेम्पलेट %s का नाम अत्यंत लंबा"
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "'%s' को [stat] नहीं कर सके"
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "टेम्पलेट '%s' को [stat] नहीं कर सके"
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "प्रतीकात्मक लिंक %s अत्यंत लंबा"
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "'%s' का प्रतीकात्मक लिंक '%s' में नहीं बना सके"
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "'%s' की अनुकृति '%s' में नहीं कर सके"
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr "टेम्पलेट %s की उपेक्षा कर रहे हैं"
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr "टेम्पलेट %s का [path] अत्यंत लंबा"
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr "टेम्पलेट्स नहीं मिले: %s"
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr "'%2$s' से गलत स्वरूप संस्करण %1$d के टेम्पलेट्स की नकल नहीं कर रहे हैं"
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr "खराब गिट निर्देशिका %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:355
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr ""
+
+#: builtin/init-db.c:356
+msgid "Reinitialized existing"
+msgstr ""
+
+#: builtin/init-db.c:356
+msgid "Initialized empty"
+msgstr ""
+
+#: builtin/init-db.c:357
+msgid " shared"
+msgstr ""
+
+#: builtin/init-db.c:376
+msgid "cannot tell cwd"
+msgstr ""
+
+#: builtin/init-db.c:450 builtin/init-db.c:457
+#, fuzzy, c-format
+msgid "cannot mkdir %s"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/init-db.c:461
+#, fuzzy, c-format
+msgid "cannot chdir to %s"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/init-db.c:483
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+
+#: builtin/init-db.c:509
+msgid "Cannot access current working directory"
+msgstr ""
+
+#: builtin/init-db.c:512
+#, fuzzy, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "टेम्पलेट '%s' को [stat] नहीं कर सके"
+
+#: builtin/log.c:104
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr ""
+
+#: builtin/log.c:113 builtin/log.c:1138 builtin/shortlog.c:287
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr ""
+
+#: builtin/log.c:156
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr ""
+
+#: builtin/log.c:255 builtin/log.c:674 builtin/log.c:1222 builtin/log.c:1428
+#: builtin/merge.c:310 builtin/revert.c:556 builtin/shortlog.c:184
+msgid "revision walk setup failed"
+msgstr ""
+
+#: builtin/log.c:347 builtin/log.c:434
+#, c-format
+msgid "Could not read object %s"
+msgstr ""
+
+#: builtin/log.c:458
+#, c-format
+msgid "Unknown type: %d"
+msgstr ""
+
+#: builtin/log.c:558
+msgid "format.headers without value"
+msgstr ""
+
+#: builtin/log.c:630
+msgid "name of output directory is too long"
+msgstr ""
+
+#: builtin/log.c:641
+#, fuzzy, c-format
+msgid "Cannot open patch file %s"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/log.c:655
+msgid "Need exactly one range."
+msgstr ""
+
+#: builtin/log.c:663
+msgid "Not a range."
+msgstr ""
+
+#: builtin/log.c:700
+msgid "Could not extract email from committer identity."
+msgstr ""
+
+#: builtin/log.c:732
+msgid "Cover letter needs email format"
+msgstr ""
+
+#: builtin/log.c:825
+#, fuzzy, c-format
+msgid "insane in-reply-to: %s"
+msgstr "खराब गिट निर्देशिका %s"
+
+#: builtin/log.c:898
+msgid "Two output directories?"
+msgstr ""
+
+#: builtin/log.c:1087
+#, c-format
+msgid "bogus committer info %s"
+msgstr ""
+
+#: builtin/log.c:1132
+msgid "-n and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1134
+msgid "--subject-prefix and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1141
+msgid "--name-only does not make sense"
+msgstr ""
+
+#: builtin/log.c:1143
+msgid "--name-status does not make sense"
+msgstr ""
+
+#: builtin/log.c:1145
+msgid "--check does not make sense"
+msgstr ""
+
+#: builtin/log.c:1166
+msgid "standard output, or directory, which one?"
+msgstr ""
+
+#: builtin/log.c:1168
+#, c-format
+msgid "Could not create directory '%s'"
+msgstr ""
+
+#: builtin/log.c:1307
+msgid "Failed to create output files"
+msgstr ""
+
+#: builtin/log.c:1394
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr ""
+
+#: builtin/log.c:1410 builtin/log.c:1412 builtin/log.c:1424
+#, c-format
+msgid "Unknown commit %s"
+msgstr ""
+
+#: builtin/merge.c:82
+msgid "switch `m' requires a value"
+msgstr ""
+
+#: builtin/merge.c:119
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr ""
+
+#: builtin/merge.c:120
+#, c-format
+msgid "Available strategies are:"
+msgstr ""
+
+#: builtin/merge.c:125
+#, c-format
+msgid "Available custom strategies are:"
+msgstr ""
+
+#: builtin/merge.c:223
+msgid "could not run stash."
+msgstr ""
+
+#: builtin/merge.c:228
+msgid "stash failed"
+msgstr ""
+
+#: builtin/merge.c:233
+#, c-format
+msgid "not a valid object: %s"
+msgstr ""
+
+#: builtin/merge.c:250
+msgid "read-tree failed"
+msgstr ""
+
+#: builtin/merge.c:279
+msgid " (nothing to squash)"
+msgstr ""
+
+#: builtin/merge.c:292
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:295 builtin/merge.c:1290 builtin/merge.c:1299
+#: builtin/merge.c:1309
+#, c-format
+msgid "Could not write to '%s'"
+msgstr ""
+
+#: builtin/merge.c:323
+msgid "Writing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:325
+msgid "Finishing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:345
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:396
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr ""
+
+#: builtin/merge.c:491
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr ""
+
+#: builtin/merge.c:553
+msgid "git write-tree failed to write a tree"
+msgstr ""
+
+#: builtin/merge.c:594
+msgid "failed to read the cache"
+msgstr ""
+
+#: builtin/merge.c:611
+msgid "Unable to write index."
+msgstr ""
+
+#: builtin/merge.c:624
+msgid "Not handling anything other than two heads merge."
+msgstr ""
+
+#: builtin/merge.c:651
+#, c-format
+msgid "Unknown option for merge-recursive: -X%s"
+msgstr ""
+
+#: builtin/merge.c:666
+#, c-format
+msgid "unable to write %s"
+msgstr ""
+
+#: builtin/merge.c:791
+#, c-format
+msgid "Wonderful.\n"
+msgstr ""
+
+#: builtin/merge.c:840 builtin/merge.c:1287 builtin/merge.c:1295
+#: builtin/merge.c:1303
+#, fuzzy, c-format
+msgid "Could not open '%s' for writing"
+msgstr "%s को समूह द्वारा लिखने की इजाज़त नही दे सके"
+
+#: builtin/merge.c:856
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+
+#: builtin/merge.c:871
+#, c-format
+msgid "'%s' is not a commit"
+msgstr ""
+
+#: builtin/merge.c:921
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you can merge."
+msgstr ""
+
+#: builtin/merge.c:924
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr ""
+
+#: builtin/merge.c:951
+msgid "You cannot combine --squash with --no-ff."
+msgstr ""
+
+#: builtin/merge.c:956
+msgid "You cannot combine --no-ff with --ff-only."
+msgstr ""
+
+#: builtin/merge.c:984
+msgid "Can merge only exactly one commit into empty head"
+msgstr ""
+
+#: builtin/merge.c:987
+msgid "Squash commit into empty head not supported yet"
+msgstr ""
+
+#: builtin/merge.c:989
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr ""
+
+#: builtin/merge.c:993 builtin/merge.c:1041
+#, c-format
+msgid "%s - not something we can merge"
+msgstr ""
+
+#: builtin/merge.c:1099
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr ""
+
+#: builtin/merge.c:1133
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr ""
+
+#: builtin/merge.c:1137
+#, c-format
+msgid "Nope.\n"
+msgstr ""
+
+#: builtin/merge.c:1170
+msgid "Not possible to fast-forward, aborting."
+msgstr ""
+
+#: builtin/merge.c:1196 builtin/merge.c:1269
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr ""
+
+#: builtin/merge.c:1200
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr ""
+
+#: builtin/merge.c:1261
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr ""
+
+#: builtin/merge.c:1263
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr ""
+
+#: builtin/merge.c:1271
+#, c-format
+msgid "Using the %s to prepare resolving by hand.\n"
+msgstr ""
+
+#: builtin/merge.c:1314
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr ""
+
+#: builtin/mv.c:103
+#, fuzzy, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr "'%s' की अनुकृति '%s' में नहीं कर सके"
+
+#: builtin/mv.c:107
+msgid "bad source"
+msgstr ""
+
+#: builtin/mv.c:110
+msgid "can not move directory into itself"
+msgstr ""
+
+#: builtin/mv.c:113
+msgid "cannot move directory over file"
+msgstr ""
+
+#: builtin/mv.c:123
+#, c-format
+msgid "Huh? %.*s is in index?"
+msgstr ""
+
+#: builtin/mv.c:135
+msgid "source directory is empty"
+msgstr ""
+
+#: builtin/mv.c:166
+msgid "not under version control"
+msgstr ""
+
+#: builtin/mv.c:168
+msgid "destination exists"
+msgstr ""
+
+#: builtin/mv.c:175
+#, c-format
+msgid "%s; will overwrite!"
+msgstr ""
+
+#: builtin/mv.c:178
+msgid "Cannot overwrite"
+msgstr ""
+
+#: builtin/mv.c:181
+msgid "multiple sources for the same target"
+msgstr ""
+
+#: builtin/mv.c:196
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr ""
+
+#: builtin/mv.c:206
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr ""
+
+#: builtin/mv.c:209
+#, c-format
+msgid "renaming '%s' failed"
+msgstr ""
+
+#: builtin/notes.c:122
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:128
+msgid "can't fdopen 'show' output fd"
+msgstr ""
+
+#: builtin/notes.c:138
+#, c-format
+msgid "failed to close pipe to 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:141
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:158 builtin/tag.c:311
+#, fuzzy, c-format
+msgid "could not create file '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/notes.c:172
+msgid "Please supply the note contents using either -m or -F option"
+msgstr ""
+
+#: builtin/notes.c:193 builtin/notes.c:797
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:198
+msgid "unable to write note object"
+msgstr ""
+
+#: builtin/notes.c:200
+#, c-format
+msgid "The note contents has been left in %s"
+msgstr ""
+
+#: builtin/notes.c:234 builtin/tag.c:445
+#, fuzzy, c-format
+msgid "cannot read '%s'"
+msgstr "लिंक '%s' नहीं पढ़ सके"
+
+#: builtin/notes.c:236 builtin/tag.c:448
+#, fuzzy, c-format
+msgid "could not open or read '%s'"
+msgstr "निर्देशिका '%s' नहीं खोल सके"
+
+#: builtin/notes.c:255 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:508 builtin/notes.c:560 builtin/notes.c:631
+#: builtin/notes.c:636 builtin/notes.c:710 builtin/notes.c:752
+#: builtin/notes.c:789 builtin/reset.c:303 builtin/tag.c:461
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr ""
+
+#: builtin/notes.c:258
+#, c-format
+msgid "Failed to read object '%s'."
+msgstr ""
+
+#: builtin/notes.c:283
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr ""
+
+#: builtin/notes.c:295
+msgid "Failed to write current notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:307
+msgid "Failed to commit notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:339
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:349
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#. TRANSLATORS: The first %s is the name of the
+#. environment variable, the second %s is its value
+#: builtin/notes.c:376
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:440
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr ""
+
+#: builtin/notes.c:455
+#, fuzzy, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr "'%s' की अनुकृति '%s' में नहीं कर सके"
+
+#. TRANSLATORS: The first %s is one of "git notes ACTION",
+#. e.g. "add", "copy", "append" etc.
+#: builtin/notes.c:481
+#, c-format
+msgid "Refusing to %s notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#: builtin/notes.c:501 builtin/notes.c:553 builtin/notes.c:614
+#: builtin/notes.c:626 builtin/notes.c:698 builtin/notes.c:745
+#: builtin/notes.c:782 builtin/notes.c:821
+msgid "too many parameters"
+msgstr ""
+
+#: builtin/notes.c:505
+msgid "list"
+msgstr ""
+
+#: builtin/notes.c:514 builtin/notes.c:758
+#, c-format
+msgid "No note found for object %s."
+msgstr ""
+
+#: builtin/notes.c:562
+msgid "add"
+msgstr ""
+
+#: builtin/notes.c:567
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:572 builtin/notes.c:649
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:622
+msgid "too few parameters"
+msgstr ""
+
+#: builtin/notes.c:638
+msgid "copy"
+msgstr ""
+
+#: builtin/notes.c:643
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:655
+#, c-format
+msgid "Missing notes on source object %s. Cannot copy."
+msgstr ""
+
+#: builtin/notes.c:703
+#, 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 ""
+
+#: builtin/notes.c:754
+msgid "show"
+msgstr ""
+
+#: builtin/notes.c:791
+msgid "remove"
+msgstr ""
+
+#: builtin/notes.c:795
+#, c-format
+msgid "Object %s has no note\n"
+msgstr ""
+
+#: builtin/notes.c:825
+msgid "prune"
+msgstr ""
+
+#: builtin/notes.c:877
+#, c-format
+msgid "Unknown subcommand: %s"
+msgstr ""
+
+#: builtin/push.c:43
+msgid "tag shorthand without <tag>"
+msgstr ""
+
+#: builtin/push.c:62
+msgid "--delete only accepts plain target ref names"
+msgstr ""
+
+#: builtin/push.c:72
+msgid "You are not currently on a branch."
+msgstr ""
+
+#: builtin/push.c:74
+#, c-format
+msgid "The current branch %s is not tracking anything."
+msgstr ""
+
+#: builtin/push.c:77
+#, c-format
+msgid "The current branch %s is tracking multiple branches, refusing to push."
+msgstr ""
+
+#: builtin/push.c:100
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+
+#: builtin/push.c:120
+#, c-format
+msgid "Pushing to %s\n"
+msgstr ""
+
+#: builtin/push.c:124
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr ""
+
+#: builtin/push.c:132
+#, c-format
+msgid ""
+"To prevent you from losing history, non-fast-forward updates were rejected\n"
+"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
+"'Note about fast-forwards' section of 'git push --help' for details.\n"
+msgstr ""
+
+#: builtin/push.c:149
+#, c-format
+msgid "bad repository '%s'"
+msgstr ""
+
+#: builtin/push.c:150
+msgid "No destination configured to push to."
+msgstr ""
+
+#: builtin/push.c:158
+msgid "--all and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:159
+msgid "--all can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:164
+msgid "--mirror and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:165
+msgid "--mirror can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:170
+msgid "--all and --mirror are incompatible"
+msgstr ""
+
+#: builtin/push.c:235
+msgid "--delete is incompatible with --all, --mirror and --tags"
+msgstr ""
+
+#: builtin/push.c:237
+msgid "--delete doesn't make sense without any refs"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "mixed"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "soft"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "hard"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "merge"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "keep"
+msgstr ""
+
+#: builtin/reset.c:95
+msgid "You do not have a valid HEAD."
+msgstr ""
+
+#: builtin/reset.c:97
+msgid "Failed to find tree of HEAD."
+msgstr ""
+
+#: builtin/reset.c:103
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr ""
+
+#: builtin/reset.c:108
+msgid "Could not write new index file."
+msgstr ""
+
+#: builtin/reset.c:118
+#, c-format
+msgid "HEAD is now at %s"
+msgstr ""
+
+#: builtin/reset.c:142
+msgid "Could not read index"
+msgstr ""
+
+#: builtin/reset.c:145
+msgid "Unstaged changes after reset:"
+msgstr ""
+
+#: builtin/reset.c:225
+#, c-format
+msgid "Reflog action message too long: %.*s..."
+msgstr ""
+
+#: builtin/reset.c:231
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr ""
+
+#: builtin/reset.c:307
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr ""
+
+#: builtin/reset.c:312
+msgid "--patch is incompatible with --{hard,mixed,soft}"
+msgstr ""
+
+#: builtin/reset.c:321
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+
+#: builtin/reset.c:323
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr ""
+
+#: builtin/reset.c:335
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr ""
+
+#: builtin/reset.c:351
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr ""
+
+#: builtin/revert.c:82
+msgid "program error"
+msgstr ""
+
+#: builtin/revert.c:154 builtin/revert.c:188
+#, c-format
+msgid "Could not read commit message of %s"
+msgstr ""
+
+#: builtin/revert.c:202
+#, c-format
+msgid "Could not extract author email from %s"
+msgstr ""
+
+#: builtin/revert.c:214
+#, c-format
+msgid "Could not extract author time from %s"
+msgstr ""
+
+#: builtin/revert.c:230
+#, c-format
+msgid "No author information found in %s"
+msgstr ""
+
+#: builtin/revert.c:267
+#, c-format
+msgid "Could not write to %s."
+msgstr ""
+
+#: builtin/revert.c:270
+#, c-format
+msgid "Error wrapping up %s"
+msgstr ""
+
+#: builtin/revert.c:290
+msgid ""
+"Your local changes would be overwritten by revert.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#: builtin/revert.c:293
+msgid ""
+"Your local changes would be overwritten by cherry-pick.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:351
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr ""
+
+#: builtin/revert.c:417
+msgid "Your index file is unmerged."
+msgstr ""
+
+#: builtin/revert.c:420
+msgid "You do not have a valid HEAD"
+msgstr ""
+
+#: builtin/revert.c:428
+msgid "Cannot revert a root commit"
+msgstr ""
+
+#: builtin/revert.c:437
+#, c-format
+msgid "Commit %s is a merge but no -m option was given."
+msgstr ""
+
+#: builtin/revert.c:445
+#, c-format
+msgid "Commit %s does not have parent %d"
+msgstr ""
+
+#: builtin/revert.c:449
+#, c-format
+msgid "Mainline was specified but commit %s is not a merge."
+msgstr ""
+
+#. TRANSLATORS: The first %s will be "revert" or
+#. "cherry-pick", the second %s a SHA1
+#: builtin/revert.c:460
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr ""
+
+#: builtin/revert.c:464
+#, c-format
+msgid "Cannot get commit message for %s"
+msgstr ""
+
+#: builtin/revert.c:525
+#, c-format
+msgid "could not revert %s... %s"
+msgstr ""
+
+#: builtin/revert.c:526
+#, c-format
+msgid "could not apply %s... %s"
+msgstr ""
+
+#: builtin/revert.c:559
+msgid "empty commit set passed"
+msgstr ""
+
+#: builtin/revert.c:573
+msgid "cherry-pick --ff cannot be used with --signoff"
+msgstr ""
+
+#: builtin/revert.c:575
+msgid "cherry-pick --ff cannot be used with --no-commit"
+msgstr ""
+
+#: builtin/revert.c:577
+msgid "cherry-pick --ff cannot be used with -x"
+msgstr ""
+
+#: builtin/revert.c:579
+msgid "cherry-pick --ff cannot be used with --edit"
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:584
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr ""
+
+#: builtin/rm.c:118
+#, c-format
+msgid ""
+"'%s' has staged content different from both the file and the HEAD\n"
+"(use -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:124
+#, c-format
+msgid ""
+"'%s' has changes staged in the index\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:128
+#, c-format
+msgid ""
+"'%s' has local modifications\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:202
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr ""
+
+#: builtin/rm.c:238
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr ""
+
+#: builtin/shortlog.c:161
+#, c-format
+msgid "Missing author: %s"
+msgstr ""
+
+#: builtin/tag.c:123 builtin/tag.c:464
+#, c-format
+msgid "tag name too long: %.*s..."
+msgstr ""
+
+#: builtin/tag.c:128
+#, fuzzy, c-format
+msgid "tag '%s' not found."
+msgstr "टेम्पलेट्स नहीं मिले: %s"
+
+#: builtin/tag.c:143
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr ""
+
+#: builtin/tag.c:155
+#, c-format
+msgid "could not verify the tag '%s'"
+msgstr ""
+
+#: builtin/tag.c:170
+msgid "committer info too long."
+msgstr ""
+
+#: builtin/tag.c:190
+msgid "could not run gpg."
+msgstr ""
+
+#: builtin/tag.c:196
+msgid "gpg did not accept the tag data"
+msgstr ""
+
+#: builtin/tag.c:203
+msgid "gpg failed to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:218
+msgid ""
+"\n"
+"#\n"
+"# Write a tag message\n"
+"#\n"
+msgstr ""
+
+#: builtin/tag.c:226
+#, c-format
+msgid "signing key value too long (%.10s...)"
+msgstr ""
+
+#: builtin/tag.c:272
+msgid "unable to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:274
+msgid "unable to write tag file"
+msgstr ""
+
+#: builtin/tag.c:289
+msgid "bad object type."
+msgstr ""
+
+#: builtin/tag.c:302
+msgid "tag header too big."
+msgstr ""
+
+#: builtin/tag.c:329
+msgid "no tag message?"
+msgstr ""
+
+#: builtin/tag.c:335
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr ""
+
+#: builtin/tag.c:428
+msgid "-n option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:430
+msgid "--contains option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:438
+msgid "only one -F or -m option is allowed."
+msgstr ""
+
+#: builtin/tag.c:458
+msgid "too many params"
+msgstr ""
+
+#: builtin/tag.c:466
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr ""
+
+#: builtin/tag.c:471
+#, c-format
+msgid "tag '%s' already exists"
+msgstr ""
+
+#: builtin/tag.c:479
+#, c-format
+msgid "%s: cannot lock the ref"
+msgstr ""
+
+#: builtin/tag.c:481
+#, c-format
+msgid "%s: cannot update the ref"
+msgstr ""
+
+#: builtin/tag.c:483
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr ""
+
+#: git-am.sh:47
+msgid "You need to set your committer info first"
+msgstr ""
+
+#: git-am.sh:80
+#, sh-format
+msgid ""
+"When you have resolved this problem run \"$cmdline --resolved\".\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:96
+msgid "Cannot fall back to three-way merge."
+msgstr ""
+
+#: git-am.sh:111
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+
+#: git-am.sh:120
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+
+#: git-am.sh:236
+msgid "Only one StGIT patch series can be applied at once"
+msgstr ""
+
+#: git-am.sh:288
+#, sh-format
+msgid "Patch format $patch_format is not supported."
+msgstr ""
+
+#: git-am.sh:290
+msgid "Patch format detection failed."
+msgstr ""
+
+#: git-am.sh:340
+msgid "-d option is no longer supported. Do not use."
+msgstr ""
+
+#: git-am.sh:403
+#, sh-format
+msgid "previous rebase directory $dotest still exists but mbox given."
+msgstr ""
+
+#: git-am.sh:408
+msgid "Please make up your mind. --skip or --abort?"
+msgstr ""
+
+#: git-am.sh:434
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr ""
+
+#: git-am.sh:499
+#, sh-format
+msgid "Dirty index: cannot apply patches (dirty: $files)"
+msgstr ""
+
+#: git-am.sh:595
+#, sh-format
+msgid ""
+"Patch is empty. Was it split wrong?\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:632
+msgid "Patch does not have a valid e-mail address."
+msgstr ""
+
+#: git-am.sh:679
+msgid "cannot be interactive without stdin connected to a terminal."
+msgstr ""
+
+#: git-am.sh:683
+msgid "Commit Body is:"
+msgstr ""
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#: git-am.sh:690
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+msgstr ""
+
+#: git-am.sh:726
+#, sh-format
+msgid "Applying: $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:747
+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 ""
+
+#: git-am.sh:755
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+
+#: git-am.sh:771
+msgid "No changes -- Patch already applied."
+msgstr ""
+
+#: git-am.sh:781
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:797
+msgid "applying to an empty history"
+msgstr ""
diff --git a/po/is.po b/po/is.po
--- /dev/null
+++ b/po/is.po
@@ -0,0 +1,194 @@
+# Icelandic translations for Git.
+# Copyright (C) 2010 Ævar Arnfjörð Bjarmason <avarab@gmail.com>
+# This file is distributed under the same license as the Git package.
+# Ævar Arnfjörð Bjarmason <avarab@gmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-09-20 20:14+0000\n"
+"PO-Revision-Date: 2010-09-20 15:01+0000\n"
+"Last-Translator: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: is\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Gat ekki gert %s skrifanlega af hóp"
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr "brjálæðislega langt sniðsnafn %s"
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "gat ekki stat-að '%s'"
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "gat ekki stat-að sniðið '%s'"
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "gat ekki opnað möppuna '%s'"
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "gat ekki lesið tengilinn '%s'"
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "brjálæðislega langur tengill %s"
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "gat ekki búið til tengilinn '%s' '%s'"
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "gat ekki afritað '%s' til '%s'"
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr "hunsa sniðið %s"
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr "brjálæðislega löng slóð á snið %s"
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr "sniðin funndust ekki %s"
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr "afrita ekki sniðin vegna rangar útgáfu %d frá '%s'"
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr "brjáluð git mappa %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:355
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr "%s%s Git lind í %s%s\n"
+
+#: builtin/init-db.c:356
+msgid "Reinitialized existing"
+msgstr "Endurgerði"
+
+#: builtin/init-db.c:356
+msgid "Initialized empty"
+msgstr "Bjó til tóma"
+
+#: builtin/init-db.c:357
+msgid " shared"
+msgstr " sameiginlega"
+
+#: builtin/init-db.c:376
+msgid "cannot tell cwd"
+msgstr "finn ekki núverandi möppu"
+
+#: builtin/init-db.c:450 builtin/init-db.c:457
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "get ekki búið til möppuna %s"
+
+#: builtin/init-db.c:461
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "get ekki farið inn í möppuna %s"
+
+#: builtin/init-db.c:483
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+"%s (eða --work-tree=<mappa>) ekki leyfilegt ásamt %s (eða --git-dir=<mappa>)"
+
+#: builtin/init-db.c:509
+msgid "Cannot access current working directory"
+msgstr "Get ekki opnað núverandi möppu"
+
+#: builtin/init-db.c:512
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Get ekki opnað tréð '%s'"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:5
+msgid "See 'git help COMMAND' for more information on a specific command."
+msgstr "Sjá 'git help SKIPUN' til að sjá hjálp fyrir tiltekna skipun."
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:10
+msgid "TEST: A C test string"
+msgstr "TILRAUN: C tilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:13
+#, c-format
+msgid "TEST: A C test string %s"
+msgstr "TILRAUN: C tilraunastrengur %s"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:16
+#, c-format
+msgid "TEST: Hello World!"
+msgstr "TILRAUN: Halló Heimur!"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:19
+#, c-format
+msgid "TEST: Old English Runes"
+msgstr "TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.c:22
+#, c-format
+msgid "TEST: ‘single’ and “double” quotes"
+msgstr "TILRAUN: ‚einfaldar‘ og „tvöfaldar“ gæsalappir"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.sh:8
+msgid "TEST: A Shell test string"
+msgstr "TILRAUN: Skeljartilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.sh:11
+#, sh-format
+msgid "TEST: A Shell test $variable"
+msgstr "TILRAUN: Skeljartilraunastrengur með breytunni $variable"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.perl:8
+msgid "TEST: A Perl test string"
+msgstr "TILRAUN: Perl tilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#: t/t0200/test.perl:11
+#, perl-format
+msgid "TEST: A Perl test variable %s"
+msgstr "TILRAUN: Perl tilraunastrengur með breytunni %s"
diff --git a/po/pl.po b/po/pl.po
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,2793 @@
+# Polish translations for Git.
+# Copyright (C) 2010 Marcin Cieślak <saper@saper.info>
+# This file is distributed under the same license as the Git package.
+# Marcin Cieślak <saper@saper.info>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-09-20 15:09+0000\n"
+"PO-Revision-Date: 2010-08-30 17:02+0200\n"
+"Last-Translator: Marcin Cieślak <saper@saper.info>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: pl\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%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: wt-status.c:56
+msgid "# Unmerged paths:"
+msgstr ""
+
+#: wt-status.c:62 wt-status.c:79
+#, c-format
+msgid "# (use \"git reset %s <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:64 wt-status.c:81
+msgid "# (use \"git rm --cached <file>...\" to unstage)"
+msgstr ""
+
+#: wt-status.c:65
+msgid "# (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr ""
+
+#: wt-status.c:73
+msgid "# Changes to be committed:"
+msgstr ""
+
+#: wt-status.c:91
+msgid "# Changed but not updated:"
+msgstr ""
+
+#: wt-status.c:95
+msgid "# (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:97
+msgid "# (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+
+#: wt-status.c:98
+msgid ""
+"# (use \"git checkout -- <file>...\" to discard changes in working "
+"directory)"
+msgstr ""
+
+#: wt-status.c:100
+msgid "# (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+
+#: wt-status.c:109
+#, c-format
+msgid "# %s files:"
+msgstr ""
+
+#: wt-status.c:112
+#, c-format
+msgid "# (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+
+#: wt-status.c:129
+msgid "bug"
+msgstr ""
+
+#: wt-status.c:134
+msgid "both deleted:"
+msgstr ""
+
+#: wt-status.c:135
+msgid "added by us:"
+msgstr ""
+
+#: wt-status.c:136
+msgid "deleted by them:"
+msgstr ""
+
+#: wt-status.c:137
+msgid "added by them:"
+msgstr ""
+
+#: wt-status.c:138
+msgid "deleted by us:"
+msgstr ""
+
+#: wt-status.c:139
+msgid "both added:"
+msgstr ""
+
+#: wt-status.c:140
+msgid "both modified:"
+msgstr ""
+
+#: wt-status.c:170
+msgid "new commits, "
+msgstr ""
+
+#: wt-status.c:172
+msgid "modified content, "
+msgstr ""
+
+#: wt-status.c:174
+msgid "untracked content, "
+msgstr ""
+
+#: wt-status.c:188
+#, c-format
+msgid "new file: %s"
+msgstr ""
+
+#: wt-status.c:191
+#, c-format
+msgid "copied: %s -> %s"
+msgstr ""
+
+#: wt-status.c:194
+#, c-format
+msgid "deleted: %s"
+msgstr ""
+
+#: wt-status.c:197
+#, c-format
+msgid "modified: %s"
+msgstr ""
+
+#: wt-status.c:200
+#, c-format
+msgid "renamed: %s -> %s"
+msgstr ""
+
+#: wt-status.c:203
+#, c-format
+msgid "typechange: %s"
+msgstr ""
+
+#: wt-status.c:206
+#, c-format
+msgid "unknown: %s"
+msgstr ""
+
+#: wt-status.c:209
+#, c-format
+msgid "unmerged: %s"
+msgstr ""
+
+#: wt-status.c:212
+#, c-format
+msgid "bug: unhandled diff status %c"
+msgstr ""
+
+#: wt-status.c:635
+msgid "On branch "
+msgstr ""
+
+#: wt-status.c:642
+msgid "Not currently on any branch."
+msgstr ""
+
+#: wt-status.c:652
+#, fuzzy
+msgid "# Initial commit"
+msgstr "Utworzyłem puste"
+
+#: wt-status.c:666
+msgid "Untracked"
+msgstr ""
+
+#: wt-status.c:668
+msgid "Ignored"
+msgstr ""
+
+#: wt-status.c:670
+#, c-format
+msgid "# Untracked files not listed%s\n"
+msgstr ""
+
+#: wt-status.c:672
+msgid " (use -u option to show untracked files)"
+msgstr ""
+
+#: wt-status.c:678
+#, c-format
+msgid "# No changes\n"
+msgstr ""
+
+#: wt-status.c:682
+#, c-format
+msgid "no changes added to commit%s\n"
+msgstr ""
+
+#: wt-status.c:684
+msgid " (use \"git add\" and/or \"git commit -a\")"
+msgstr ""
+
+#: wt-status.c:686
+#, c-format
+msgid "nothing added to commit but untracked files present%s\n"
+msgstr ""
+
+#: wt-status.c:688
+msgid " (use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:690 wt-status.c:693 wt-status.c:696
+#, c-format
+msgid "nothing to commit%s\n"
+msgstr ""
+
+#: wt-status.c:691
+msgid " (create/copy files and use \"git add\" to track)"
+msgstr ""
+
+#: wt-status.c:694
+msgid " (use -u to show untracked files)"
+msgstr ""
+
+#: wt-status.c:697
+msgid " (working directory clean)"
+msgstr ""
+
+#: wt-status.c:795
+msgid "HEAD (no branch)"
+msgstr ""
+
+#: wt-status.c:801
+msgid "Initial commit on "
+msgstr ""
+
+#: wt-status.c:816
+msgid "behind "
+msgstr ""
+
+#: wt-status.c:819 wt-status.c:822
+msgid "ahead "
+msgstr ""
+
+#: wt-status.c:824
+msgid ", behind "
+msgstr ""
+
+#: builtin/add.c:41
+#, c-format
+msgid "unexpected diff status %c"
+msgstr ""
+
+#: builtin/add.c:67 builtin/commit.c:244
+msgid "updating files failed"
+msgstr ""
+
+#: builtin/add.c:77
+#, c-format
+msgid "remove '%s'\n"
+msgstr ""
+
+#: builtin/add.c:175
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr ""
+
+#: builtin/add.c:191
+msgid "Unstaged changes after refreshing the index:"
+msgstr ""
+
+#: builtin/add.c:194 builtin/add.c:452 builtin/rm.c:194
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr ""
+
+#: builtin/add.c:208
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr ""
+
+#: builtin/add.c:275
+msgid "Could not read the index"
+msgstr ""
+
+#: builtin/add.c:284
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr ""
+
+#: builtin/add.c:288
+#, fuzzy
+msgid "Could not write patch"
+msgstr "Nie mogę dać prawa zapisu grupie w %s"
+
+#: builtin/add.c:293
+#, fuzzy, c-format
+msgid "Could not stat '%s'"
+msgstr "nie mogę tknąć '%s'"
+
+#: builtin/add.c:295
+msgid "Empty patch. Aborted."
+msgstr ""
+
+#: builtin/add.c:301
+#, c-format
+msgid "Could not apply '%s'"
+msgstr ""
+
+#: builtin/add.c:349
+#, c-format
+msgid "Use -f if you really want to add them.\n"
+msgstr ""
+
+#: builtin/add.c:350
+msgid "no files added"
+msgstr ""
+
+#: builtin/add.c:356
+msgid "adding files failed"
+msgstr ""
+
+#: builtin/add.c:388
+msgid "-A and -u are mutually incompatible"
+msgstr ""
+
+#: builtin/add.c:390
+msgid "Option --ignore-missing can only be used together with --dry-run"
+msgstr ""
+
+#: builtin/add.c:410
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr ""
+
+#: builtin/add.c:411
+#, c-format
+msgid "Maybe you wanted to say 'git add .'?\n"
+msgstr ""
+
+#: builtin/add.c:417 builtin/clean.c:95 builtin/commit.c:301
+#: builtin/commit.c:310 builtin/mv.c:77 builtin/rm.c:171
+msgid "index file corrupt"
+msgstr ""
+
+#: builtin/add.c:468 builtin/mv.c:223 builtin/rm.c:268
+msgid "Unable to write new index file"
+msgstr ""
+
+#: builtin/archive.c:17
+#, c-format
+msgid "could not create archive file '%s'"
+msgstr ""
+
+#: builtin/archive.c:20
+msgid "could not redirect output"
+msgstr ""
+
+#: builtin/archive.c:36
+msgid "git archive: Remote with no URL"
+msgstr ""
+
+#: builtin/archive.c:46
+msgid "git archive: expected ACK/NAK, got EOF"
+msgstr ""
+
+#: builtin/archive.c:51
+#, c-format
+msgid "git archive: NACK %s"
+msgstr ""
+
+#: builtin/archive.c:52
+msgid "git archive: protocol error"
+msgstr ""
+
+#: builtin/archive.c:57
+msgid "git archive: expected a flush"
+msgstr ""
+
+#: builtin/branch.c:136
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but it is not yet merged to HEAD."
+msgstr ""
+
+#: builtin/branch.c:140
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD."
+msgstr ""
+
+#. TRANSLATORS: This is "remote " in "remote branch '%s' not found"
+#: builtin/branch.c:161
+msgid "remote "
+msgstr ""
+
+#: builtin/branch.c:169
+#, fuzzy
+msgid "cannot use -a with -d"
+msgstr "nie wiem w którym katalogu jestem"
+
+#: builtin/branch.c:175
+msgid "Couldn't look up commit object for HEAD"
+msgstr ""
+
+#: builtin/branch.c:180
+#, c-format
+msgid "Cannot delete the branch '%s' which you are currently on."
+msgstr ""
+
+#: builtin/branch.c:190
+#, c-format
+msgid "%sbranch '%s' not found."
+msgstr ""
+
+#: builtin/branch.c:198
+#, c-format
+msgid "Couldn't look up commit object for '%s'"
+msgstr ""
+
+#: builtin/branch.c:204
+#, c-format
+msgid ""
+"The branch '%s' is not fully merged.\n"
+"If you are sure you want to delete it, run 'git branch -D %s'."
+msgstr ""
+
+#: builtin/branch.c:212
+#, c-format
+msgid "Error deleting %sbranch '%s'"
+msgstr ""
+
+#: builtin/branch.c:217
+#, c-format
+msgid "Deleted %sbranch %s (was %s).\n"
+msgstr ""
+
+#: builtin/branch.c:222
+msgid "Update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:304
+#, c-format
+msgid "branch '%s' does not point at a commit"
+msgstr ""
+
+#: builtin/branch.c:381
+#, c-format
+msgid "behind %d] "
+msgstr ""
+
+#: builtin/branch.c:383
+#, c-format
+msgid "ahead %d] "
+msgstr ""
+
+#: builtin/branch.c:385
+#, c-format
+msgid "ahead %d, behind %d] "
+msgstr ""
+
+#: builtin/branch.c:484
+msgid "(no branch)"
+msgstr ""
+
+#: builtin/branch.c:544
+msgid "some refs could not be read"
+msgstr ""
+
+#: builtin/branch.c:557
+msgid "cannot rename the current branch while not on any."
+msgstr ""
+
+#: builtin/branch.c:567 builtin/branch.c:571
+#, c-format
+msgid "Invalid branch name: '%s'"
+msgstr ""
+
+#: builtin/branch.c:574
+#, c-format
+msgid "A branch named '%s' already exists."
+msgstr ""
+
+#: builtin/branch.c:580
+msgid "Branch rename failed"
+msgstr ""
+
+#: builtin/branch.c:584
+#, c-format
+msgid "Renamed a misnamed branch '%s' away"
+msgstr ""
+
+#: builtin/branch.c:588
+#, c-format
+msgid "Branch renamed to %s, but HEAD is not updated!"
+msgstr ""
+
+#: builtin/branch.c:595
+msgid "Branch is renamed, but update of config-file failed"
+msgstr ""
+
+#: builtin/branch.c:610
+#, c-format
+msgid "malformed object name %s"
+msgstr ""
+
+#: builtin/branch.c:680
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr ""
+
+#: builtin/branch.c:686
+msgid "HEAD not found below refs/heads!"
+msgstr ""
+
+#: builtin/branch.c:706
+msgid "-a and -r options to 'git branch' do not make sense with a branch name"
+msgstr ""
+
+#: builtin/bundle.c:47
+#, c-format
+msgid "%s is okay\n"
+msgstr ""
+
+#: builtin/bundle.c:56
+msgid "Need a repository to create a bundle."
+msgstr ""
+
+#: builtin/bundle.c:60
+msgid "Need a repository to unbundle."
+msgstr ""
+
+#: builtin/checkout.c:107 builtin/checkout.c:135
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr ""
+
+#: builtin/checkout.c:109 builtin/checkout.c:137
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr ""
+
+#: builtin/checkout.c:120
+#, c-format
+msgid "path '%s' does not have all three versions"
+msgstr ""
+
+#: builtin/checkout.c:155
+#, c-format
+msgid "path '%s' does not have all 3 versions"
+msgstr ""
+
+#: builtin/checkout.c:172
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr ""
+
+#: builtin/checkout.c:189
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr ""
+
+#: builtin/checkout.c:194 builtin/reset.c:170
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr ""
+
+#: builtin/checkout.c:216 builtin/checkout.c:371
+msgid "corrupt index file"
+msgstr ""
+
+#: builtin/checkout.c:244 builtin/checkout.c:251
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr ""
+
+#: builtin/checkout.c:280 builtin/checkout.c:475 builtin/clone.c:658
+#: builtin/merge.c:737
+msgid "unable to write new index file"
+msgstr ""
+
+#: builtin/checkout.c:297 builtin/diff.c:307 builtin/merge.c:367
+msgid "diff_setup_done failed"
+msgstr ""
+
+#: builtin/checkout.c:393
+msgid "you need to resolve your current index first"
+msgstr ""
+
+#: builtin/checkout.c:524
+#, fuzzy, c-format
+msgid "Can not do reflog for '%s'\n"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/checkout.c:550
+#, c-format
+msgid "Already on '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:554
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:556
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:558
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr ""
+
+#: builtin/checkout.c:575
+msgid "HEAD is now at"
+msgstr ""
+
+#: builtin/checkout.c:603
+msgid "You are on a branch yet to be born"
+msgstr ""
+
+#: builtin/checkout.c:617
+msgid "Previous HEAD position was"
+msgstr ""
+
+#: builtin/checkout.c:730
+msgid "-B cannot be used with -b"
+msgstr ""
+
+#: builtin/checkout.c:738
+msgid "--patch is incompatible with all other options"
+msgstr ""
+
+#: builtin/checkout.c:744
+msgid "--track needs a branch name"
+msgstr ""
+
+#: builtin/checkout.c:751
+msgid "Missing branch name; try -b"
+msgstr ""
+
+#: builtin/checkout.c:757
+msgid "--orphan and -b|-B are mutually exclusive"
+msgstr ""
+
+#: builtin/checkout.c:759
+msgid "--orphan cannot be used with -t"
+msgstr ""
+
+#: builtin/checkout.c:769
+msgid "git checkout: -f and -m are incompatible"
+msgstr ""
+
+#. case (1)
+#: builtin/checkout.c:815
+#, c-format
+msgid "invalid reference: %s"
+msgstr ""
+
+#. case (1): want a tree
+#: builtin/checkout.c:852
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr ""
+
+#: builtin/checkout.c:878
+msgid "invalid path specification"
+msgstr ""
+
+#: builtin/checkout.c:886
+#, c-format
+msgid ""
+"git checkout: updating paths is incompatible with switching branches.\n"
+"Did you intend to checkout '%s' which can not be resolved as commit?"
+msgstr ""
+
+#: builtin/checkout.c:888
+msgid "git checkout: updating paths is incompatible with switching branches."
+msgstr ""
+
+#: builtin/checkout.c:893
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+
+#: builtin/checkout.c:904
+#, c-format
+msgid "git checkout: we do not like '%s' as a branch name."
+msgstr ""
+
+#: builtin/checkout.c:909
+#, c-format
+msgid "git checkout: branch %s already exists"
+msgstr ""
+
+#: builtin/checkout.c:916
+msgid "Cannot switch branch to a non-commit."
+msgstr ""
+
+#: builtin/checkout.c:919
+msgid "--ours/--theirs is incompatible with switching branches."
+msgstr ""
+
+#: builtin/clean.c:78
+msgid "-x and -X cannot be used together"
+msgstr ""
+
+#: builtin/clean.c:82
+msgid ""
+"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
+msgstr ""
+
+#: builtin/clean.c:85
+msgid ""
+"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
+"clean"
+msgstr ""
+
+#: builtin/clean.c:154 builtin/clean.c:175
+#, c-format
+msgid "Would remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:158 builtin/clean.c:178
+#, c-format
+msgid "Removing %s\n"
+msgstr ""
+
+#: builtin/clean.c:161 builtin/clean.c:181
+#, c-format
+msgid "failed to remove '%s'"
+msgstr ""
+
+#: builtin/clean.c:165
+#, c-format
+msgid "Would not remove %s\n"
+msgstr ""
+
+#: builtin/clean.c:167
+#, c-format
+msgid "Not removing %s\n"
+msgstr ""
+
+#: builtin/clone.c:208
+#, c-format
+msgid "reference repository '%s' is not a local directory."
+msgstr ""
+
+#: builtin/clone.c:235
+#, fuzzy, c-format
+msgid "failed to open '%s'"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/clone.c:239
+#, fuzzy, c-format
+msgid "failed to create directory '%s'"
+msgstr "beznadziejny katalog gita %s"
+
+#: builtin/clone.c:241 builtin/diff.c:74
+#, fuzzy, c-format
+msgid "failed to stat '%s'"
+msgstr "nie mogę tknąć '%s'"
+
+#: builtin/clone.c:243
+#, fuzzy, c-format
+msgid "%s exists and is not a directory"
+msgstr "beznadziejny katalog gita %s"
+
+#: builtin/clone.c:257
+#, c-format
+msgid "failed to stat %s\n"
+msgstr ""
+
+#: builtin/clone.c:267
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr ""
+
+#: builtin/clone.c:272
+#, fuzzy, c-format
+msgid "failed to create link '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/clone.c:276
+#, fuzzy, c-format
+msgid "failed to copy file to '%s'"
+msgstr "nie mogę skopiować '%s' to '%s'"
+
+#: builtin/clone.c:305
+#, c-format
+msgid "done.\n"
+msgstr ""
+
+#: builtin/clone.c:387
+msgid "Too many arguments."
+msgstr ""
+
+#: builtin/clone.c:391
+msgid "You must specify a repository to clone."
+msgstr ""
+
+#: builtin/clone.c:399
+#, c-format
+msgid "--bare and --origin %s options are incompatible."
+msgstr ""
+
+#: builtin/clone.c:428
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr ""
+
+#: builtin/clone.c:438
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr ""
+
+#: builtin/clone.c:451 builtin/clone.c:465
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr ""
+
+#: builtin/clone.c:454
+#, fuzzy, c-format
+msgid "could not create work tree dir '%s'."
+msgstr "Nie mogę dostać się do drzewa roboczego '%s'"
+
+#: builtin/clone.c:470
+#, c-format
+msgid "Cloning into bare repository %s\n"
+msgstr ""
+
+#: builtin/clone.c:472
+#, c-format
+msgid "Cloning into %s\n"
+msgstr ""
+
+#: builtin/clone.c:530
+#, c-format
+msgid "Don't know how to clone %s"
+msgstr ""
+
+#: builtin/clone.c:569
+#, c-format
+msgid "Remote branch %s not found in upstream %s, using HEAD instead"
+msgstr ""
+
+#: builtin/clone.c:579
+msgid "You appear to have cloned an empty repository."
+msgstr ""
+
+#: builtin/clone.c:621
+msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgstr ""
+
+#: builtin/commit.c:41
+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"
+"If the identity used for this commit is wrong, you can fix it with:\n"
+"\n"
+" git commit --amend --author='Your Name <you@example.com>'\n"
+msgstr ""
+
+#: builtin/commit.c:53
+msgid ""
+"You asked to amend the most recent commit, but doing so would make\n"
+"it empty. You can repeat your command with --allow-empty, or you can\n"
+"remove the commit entirely with \"git reset HEAD^\".\n"
+msgstr ""
+
+#: builtin/commit.c:271
+msgid "failed to unpack HEAD tree object"
+msgstr ""
+
+#: builtin/commit.c:299
+msgid "interactive add failed"
+msgstr ""
+
+#: builtin/commit.c:330 builtin/commit.c:350 builtin/commit.c:396
+msgid "unable to write new_index file"
+msgstr ""
+
+#: builtin/commit.c:380
+msgid "cannot do a partial commit during a merge."
+msgstr ""
+
+#: builtin/commit.c:389
+#, fuzzy
+msgid "cannot read the index"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/commit.c:409
+msgid "unable to write temporary index file"
+msgstr ""
+
+#: builtin/commit.c:456 builtin/commit.c:1294
+msgid "could not parse HEAD commit"
+msgstr ""
+
+#: builtin/commit.c:475 builtin/commit.c:481
+#, c-format
+msgid "invalid commit: %s"
+msgstr ""
+
+#: builtin/commit.c:499
+msgid "malformed --author parameter"
+msgstr ""
+
+#: builtin/commit.c:573 builtin/shortlog.c:299
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr ""
+
+#: builtin/commit.c:575
+msgid "could not read log from standard input"
+msgstr ""
+
+#: builtin/commit.c:579
+#, fuzzy, c-format
+msgid "could not read log file '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/commit.c:585
+msgid "commit has empty message"
+msgstr ""
+
+#: builtin/commit.c:591
+msgid "could not read MERGE_MSG"
+msgstr ""
+
+#: builtin/commit.c:595
+msgid "could not read SQUASH_MSG"
+msgstr ""
+
+#: builtin/commit.c:599
+#, fuzzy, c-format
+msgid "could not read '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/commit.c:612
+#, fuzzy, c-format
+msgid "could not open '%s'"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/commit.c:636
+msgid "could not write commit template"
+msgstr ""
+
+#: builtin/commit.c:650
+#, c-format
+msgid ""
+"#\n"
+"# It looks like you may be committing a MERGE.\n"
+"# If this is not correct, please remove the file\n"
+"#\t%s\n"
+"# and try again.\n"
+"#\n"
+msgstr ""
+
+#: builtin/commit.c:659
+#, c-format
+msgid ""
+"\n"
+"# Please enter the commit message for your changes."
+msgstr ""
+
+#: builtin/commit.c:663
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:668
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be kept; you may remove them yourself if you want to.\n"
+"# An empty message aborts the commit.\n"
+msgstr ""
+
+#: builtin/commit.c:680
+#, c-format
+msgid "%s# Author: %s\n"
+msgstr ""
+
+#: builtin/commit.c:688
+#, c-format
+msgid "%s# Committer: %s\n"
+msgstr ""
+
+#: builtin/commit.c:705
+#, fuzzy
+msgid "Cannot read index"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/commit.c:737
+msgid "Error building trees"
+msgstr ""
+
+#: builtin/commit.c:752 builtin/tag.c:321
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr ""
+
+#: builtin/commit.c:832
+#, c-format
+msgid "No existing author found with '%s'"
+msgstr ""
+
+#: builtin/commit.c:847 builtin/commit.c:1039
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr ""
+
+#: builtin/commit.c:864
+msgid "Using both --reset-author and --author does not make sense"
+msgstr ""
+
+#: builtin/commit.c:878
+msgid "You have nothing to amend."
+msgstr ""
+
+#: builtin/commit.c:880
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr ""
+
+#: builtin/commit.c:889
+msgid "Only one of -c/-C/-F can be used."
+msgstr ""
+
+#: builtin/commit.c:891
+msgid "Option -m cannot be combined with -c/-C/-F."
+msgstr ""
+
+#: builtin/commit.c:897
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr ""
+
+#: builtin/commit.c:906
+#, c-format
+msgid "could not lookup commit %s"
+msgstr ""
+
+#: builtin/commit.c:909
+#, c-format
+msgid "could not parse commit %s"
+msgstr ""
+
+#: builtin/commit.c:937
+msgid "Only one of --include/--only/--all/--interactive can be used."
+msgstr ""
+
+#: builtin/commit.c:939
+msgid "No paths with --include/--only does not make sense."
+msgstr ""
+
+#: builtin/commit.c:941
+msgid "Clever... amending the last one with dirty index."
+msgstr ""
+
+#: builtin/commit.c:943
+msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
+msgstr ""
+
+#: builtin/commit.c:953
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr ""
+
+#: builtin/commit.c:958
+msgid "Paths with -a does not make sense."
+msgstr ""
+
+#: builtin/commit.c:960
+msgid "Paths with --interactive does not make sense."
+msgstr ""
+
+#: builtin/commit.c:1142
+msgid "couldn't look up newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1144
+msgid "could not parse newly created commit"
+msgstr ""
+
+#: builtin/commit.c:1185
+msgid "detached HEAD"
+msgstr ""
+
+#: builtin/commit.c:1187
+msgid " (root-commit)"
+msgstr ""
+
+#: builtin/commit.c:1307 builtin/merge.c:461
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr ""
+
+#: builtin/commit.c:1312
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr ""
+
+#: builtin/commit.c:1319
+msgid "could not read MERGE_MODE"
+msgstr ""
+
+#: builtin/commit.c:1336
+#, c-format
+msgid "could not read commit message: %s"
+msgstr ""
+
+#: builtin/commit.c:1350
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr ""
+
+#: builtin/commit.c:1358
+msgid "failed to write commit object"
+msgstr ""
+
+#: builtin/commit.c:1375
+msgid "cannot lock HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1379
+msgid "cannot update HEAD ref"
+msgstr ""
+
+#: builtin/commit.c:1388
+msgid ""
+"Repository has been updated, but unable to write\n"
+"new_index file. Check that disk is not full or quota is\n"
+"not exceeded, and then \"git reset HEAD\" to recover."
+msgstr ""
+
+#: builtin/describe.c:205
+#, c-format
+msgid "annotated tag %s not available"
+msgstr ""
+
+#: builtin/describe.c:209
+#, c-format
+msgid "annotated tag %s has no embedded name"
+msgstr ""
+
+#: builtin/describe.c:211
+#, c-format
+msgid "tag '%s' is really '%s' here"
+msgstr ""
+
+#: builtin/describe.c:238
+#, c-format
+msgid "Not a valid object name %s"
+msgstr ""
+
+#: builtin/describe.c:241
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr ""
+
+#: builtin/describe.c:258
+#, fuzzy, c-format
+msgid "no tag exactly matches '%s'"
+msgstr "nie mogę tknąć szablonu '%s'"
+
+#: builtin/describe.c:260
+#, c-format
+msgid "searching to describe %s\n"
+msgstr ""
+
+#: builtin/describe.c:295
+#, c-format
+msgid "finished search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:319
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+
+#: builtin/describe.c:323
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+
+#: builtin/describe.c:344
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr ""
+
+#: builtin/describe.c:347
+#, c-format
+msgid ""
+"more than %i tags found; listed %i most recent\n"
+"gave up search at %s\n"
+msgstr ""
+
+#: builtin/describe.c:398
+msgid "--long is incompatible with --abbrev=0"
+msgstr ""
+
+#: builtin/describe.c:423
+msgid "No names found, cannot describe anything."
+msgstr ""
+
+#: builtin/describe.c:430
+msgid "--dirty is incompatible with committishes"
+msgstr ""
+
+#: builtin/diff.c:76
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr ""
+
+#: builtin/diff.c:225
+#, c-format
+msgid "invalid option: %s"
+msgstr ""
+
+#: builtin/diff.c:302
+msgid "Not a git repository"
+msgstr ""
+
+#: builtin/diff.c:334
+msgid "No HEAD commit to compare with (yet)"
+msgstr ""
+
+#: builtin/diff.c:349
+#, c-format
+msgid "invalid object '%s' given."
+msgstr ""
+
+#: builtin/diff.c:354
+#, c-format
+msgid "more than %d trees given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:364
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr ""
+
+#: builtin/diff.c:372
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr ""
+
+#: builtin/fetch.c:175
+msgid "Couldn't find remote ref HEAD"
+msgstr ""
+
+#: builtin/fetch.c:228
+#, fuzzy, c-format
+msgid "object %s not found"
+msgstr "nie znaleziono szablonów %s"
+
+#: builtin/fetch.c:233
+msgid "[up to date]"
+msgstr ""
+
+#.
+#. * If this is the head, and it's not okay to update
+#. * the head, and the old value of the head isn't empty...
+#.
+#: builtin/fetch.c:246
+#, c-format
+msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
+msgstr ""
+
+#: builtin/fetch.c:247 builtin/fetch.c:309
+msgid "[rejected]"
+msgstr ""
+
+#: builtin/fetch.c:257
+msgid "[tag update]"
+msgstr ""
+
+#: builtin/fetch.c:258 builtin/fetch.c:280 builtin/fetch.c:293
+msgid " (unable to update local ref)"
+msgstr ""
+
+#: builtin/fetch.c:270
+msgid "[new tag]"
+msgstr ""
+
+#: builtin/fetch.c:274
+msgid "[new branch]"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "unable to update local ref"
+msgstr ""
+
+#: builtin/fetch.c:305
+msgid "forced update"
+msgstr ""
+
+#: builtin/fetch.c:310
+msgid "(non-fast-forward)"
+msgstr ""
+
+#: builtin/fetch.c:328 builtin/fetch.c:651
+#, fuzzy, c-format
+msgid "cannot open %s: %s\n"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/fetch.c:406
+#, c-format
+msgid "From %.*s\n"
+msgstr ""
+
+#: builtin/fetch.c:417
+#, c-format
+msgid ""
+"some local refs could not be updated; try running\n"
+" 'git remote prune %s' to remove any old, conflicting branches"
+msgstr ""
+
+#: builtin/fetch.c:467
+msgid "could not run rev-list"
+msgstr ""
+
+#: builtin/fetch.c:481
+#, c-format
+msgid "failed write to rev-list: %s"
+msgstr ""
+
+#: builtin/fetch.c:488
+#, c-format
+msgid "failed to close rev-list's stdin: %s"
+msgstr ""
+
+#: builtin/fetch.c:515
+#, c-format
+msgid " (%s will become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:516
+#, c-format
+msgid " (%s has become dangling)\n"
+msgstr ""
+
+#: builtin/fetch.c:523
+msgid "[deleted]"
+msgstr ""
+
+#: builtin/fetch.c:524
+msgid "(none)"
+msgstr ""
+
+#: builtin/fetch.c:641
+#, c-format
+msgid "Refusing to fetch into current branch %s of non-bare repository"
+msgstr ""
+
+#: builtin/fetch.c:675
+#, c-format
+msgid "Don't know how to fetch from %s"
+msgstr ""
+
+#: builtin/fetch.c:729
+#, c-format
+msgid "Option \"%s\" value \"%s\" is not valid for %s"
+msgstr ""
+
+#: builtin/fetch.c:732
+#, c-format
+msgid "Option \"%s\" is ignored for %s\n"
+msgstr ""
+
+#: builtin/fetch.c:821
+#, c-format
+msgid "Fetching %s\n"
+msgstr ""
+
+#: builtin/fetch.c:823
+#, c-format
+msgid "Could not fetch %s"
+msgstr ""
+
+#: builtin/fetch.c:839
+msgid ""
+"No remote repository specified. Please, specify either a URL or a\n"
+"remote name from which new revisions should be fetched."
+msgstr ""
+
+#: builtin/fetch.c:859
+msgid "You need to specify a tag name."
+msgstr ""
+
+#: builtin/fetch.c:899
+msgid "fetch --all does not take a repository argument"
+msgstr ""
+
+#: builtin/fetch.c:901
+msgid "fetch --all does not make sense with refspecs"
+msgstr ""
+
+#: builtin/fetch.c:912
+#, c-format
+msgid "No such remote or remote group: %s"
+msgstr ""
+
+#: builtin/fetch.c:920
+msgid "Fetching a group and specifying refspecs does not make sense"
+msgstr ""
+
+#: builtin/gc.c:63
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr ""
+
+#: builtin/gc.c:78
+msgid "Too many options specified"
+msgstr ""
+
+#: builtin/gc.c:103
+#, fuzzy, c-format
+msgid "insanely long object directory %.*s"
+msgstr "beznadziejny katalog gita %s"
+
+#: builtin/gc.c:220
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr ""
+
+#: builtin/gc.c:223
+#, c-format
+msgid ""
+"Auto packing the repository for optimum performance. You may also\n"
+"run \"git gc\" manually. See \"git help gc\" for more information."
+msgstr ""
+
+#: builtin/gc.c:251
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+
+#: builtin/grep.c:252
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr ""
+
+#: builtin/grep.c:457
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr ""
+
+#: builtin/grep.c:508
+#, c-format
+msgid "'%s': %s"
+msgstr ""
+
+#: builtin/grep.c:519
+#, c-format
+msgid "'%s': short read %s"
+msgstr ""
+
+#: builtin/grep.c:581
+#, c-format
+msgid "Failed to chdir: %s"
+msgstr ""
+
+#: builtin/grep.c:671 builtin/grep.c:697
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr ""
+
+#: builtin/grep.c:703
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr ""
+
+#: builtin/grep.c:755
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr ""
+
+#: builtin/grep.c:771
+#, fuzzy, c-format
+msgid "cannot open '%s'"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/grep.c:1012
+msgid "no pattern given."
+msgstr ""
+
+#: builtin/grep.c:1016
+msgid "cannot mix --fixed-strings and regexp"
+msgstr ""
+
+#: builtin/grep.c:1041
+#, c-format
+msgid "bad object %s"
+msgstr ""
+
+#: builtin/grep.c:1068
+msgid "--open-files-in-pager only works on the worktree"
+msgstr ""
+
+#: builtin/grep.c:1093
+msgid "--cached cannot be used with --no-index."
+msgstr ""
+
+#: builtin/grep.c:1095
+msgid "--no-index cannot be used with revs."
+msgstr ""
+
+#: builtin/grep.c:1104
+msgid "both --cached and trees are given."
+msgstr ""
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Nie mogę dać prawa zapisu grupie w %s"
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr "beznadziejnie długa nazwa szablonu %s"
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "nie mogę tknąć '%s'"
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "nie mogę tknąć szablonu '%s'"
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "beznadziejnie długi link symboliczny %s"
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "nie mogę założyć symbolicznego link z '%s' do '%s'"
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "nie mogę skopiować '%s' to '%s'"
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr "pomijam szablon %s"
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr "beznadziejnie długa śieżka do wzorca %s"
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr "nie znaleziono szablonów %s"
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr ""
+"nie będę kopiować szablonów oznaczonych niewłaściwym numerem wersji %d z '%s'"
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr "beznadziejny katalog gita %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:355
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr "%s%s repozytorium Gita w %s%s\n"
+
+#: builtin/init-db.c:356
+msgid "Reinitialized existing"
+msgstr "Ponownie zainicjowałem istniejące"
+
+#: builtin/init-db.c:356
+msgid "Initialized empty"
+msgstr "Utworzyłem puste"
+
+#: builtin/init-db.c:357
+msgid " shared"
+msgstr " współdzielone"
+
+#: builtin/init-db.c:376
+msgid "cannot tell cwd"
+msgstr "nie wiem w którym katalogu jestem"
+
+#: builtin/init-db.c:450 builtin/init-db.c:457
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "nie mogę utworzyć katalogu %s"
+
+#: builtin/init-db.c:461
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "nie mogę wejść do katalogu %s"
+
+#: builtin/init-db.c:483
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+"nie można użyć %s (or --work-tree=<katalog>) bez podania %s (or --git-"
+"dir=<katalog>)"
+
+#: builtin/init-db.c:509
+msgid "Cannot access current working directory"
+msgstr "Nie mogę dobrać się do bieżącego katalogu"
+
+#: builtin/init-db.c:512
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Nie mogę dostać się do drzewa roboczego '%s'"
+
+#: builtin/log.c:104
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr ""
+
+#: builtin/log.c:113 builtin/log.c:1138 builtin/shortlog.c:287
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr ""
+
+#: builtin/log.c:156
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr ""
+
+#: builtin/log.c:255 builtin/log.c:674 builtin/log.c:1222 builtin/log.c:1428
+#: builtin/merge.c:310 builtin/revert.c:556 builtin/shortlog.c:184
+msgid "revision walk setup failed"
+msgstr ""
+
+#: builtin/log.c:347 builtin/log.c:434
+#, c-format
+msgid "Could not read object %s"
+msgstr ""
+
+#: builtin/log.c:458
+#, c-format
+msgid "Unknown type: %d"
+msgstr ""
+
+#: builtin/log.c:558
+msgid "format.headers without value"
+msgstr ""
+
+#: builtin/log.c:630
+msgid "name of output directory is too long"
+msgstr ""
+
+#: builtin/log.c:641
+#, fuzzy, c-format
+msgid "Cannot open patch file %s"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/log.c:655
+msgid "Need exactly one range."
+msgstr ""
+
+#: builtin/log.c:663
+msgid "Not a range."
+msgstr ""
+
+#: builtin/log.c:700
+msgid "Could not extract email from committer identity."
+msgstr ""
+
+#: builtin/log.c:732
+msgid "Cover letter needs email format"
+msgstr ""
+
+#: builtin/log.c:825
+#, fuzzy, c-format
+msgid "insane in-reply-to: %s"
+msgstr "beznadziejny katalog gita %s"
+
+#: builtin/log.c:898
+msgid "Two output directories?"
+msgstr ""
+
+#: builtin/log.c:1087
+#, c-format
+msgid "bogus committer info %s"
+msgstr ""
+
+#: builtin/log.c:1132
+msgid "-n and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1134
+msgid "--subject-prefix and -k are mutually exclusive."
+msgstr ""
+
+#: builtin/log.c:1141
+msgid "--name-only does not make sense"
+msgstr ""
+
+#: builtin/log.c:1143
+msgid "--name-status does not make sense"
+msgstr ""
+
+#: builtin/log.c:1145
+msgid "--check does not make sense"
+msgstr ""
+
+#: builtin/log.c:1166
+msgid "standard output, or directory, which one?"
+msgstr ""
+
+#: builtin/log.c:1168
+#, c-format
+msgid "Could not create directory '%s'"
+msgstr ""
+
+#: builtin/log.c:1307
+msgid "Failed to create output files"
+msgstr ""
+
+#: builtin/log.c:1394
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr ""
+
+#: builtin/log.c:1410 builtin/log.c:1412 builtin/log.c:1424
+#, c-format
+msgid "Unknown commit %s"
+msgstr ""
+
+#: builtin/merge.c:82
+msgid "switch `m' requires a value"
+msgstr ""
+
+#: builtin/merge.c:119
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr ""
+
+#: builtin/merge.c:120
+#, c-format
+msgid "Available strategies are:"
+msgstr ""
+
+#: builtin/merge.c:125
+#, c-format
+msgid "Available custom strategies are:"
+msgstr ""
+
+#: builtin/merge.c:223
+msgid "could not run stash."
+msgstr ""
+
+#: builtin/merge.c:228
+msgid "stash failed"
+msgstr ""
+
+#: builtin/merge.c:233
+#, c-format
+msgid "not a valid object: %s"
+msgstr ""
+
+#: builtin/merge.c:250
+msgid "read-tree failed"
+msgstr ""
+
+#: builtin/merge.c:279
+msgid " (nothing to squash)"
+msgstr ""
+
+#: builtin/merge.c:292
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:295 builtin/merge.c:1290 builtin/merge.c:1299
+#: builtin/merge.c:1309
+#, c-format
+msgid "Could not write to '%s'"
+msgstr ""
+
+#: builtin/merge.c:323
+msgid "Writing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:325
+msgid "Finishing SQUASH_MSG"
+msgstr ""
+
+#: builtin/merge.c:345
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr ""
+
+#: builtin/merge.c:396
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr ""
+
+#: builtin/merge.c:491
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr ""
+
+#: builtin/merge.c:553
+msgid "git write-tree failed to write a tree"
+msgstr ""
+
+#: builtin/merge.c:594
+msgid "failed to read the cache"
+msgstr ""
+
+#: builtin/merge.c:611
+msgid "Unable to write index."
+msgstr ""
+
+#: builtin/merge.c:624
+msgid "Not handling anything other than two heads merge."
+msgstr ""
+
+#: builtin/merge.c:651
+#, c-format
+msgid "Unknown option for merge-recursive: -X%s"
+msgstr ""
+
+#: builtin/merge.c:666
+#, c-format
+msgid "unable to write %s"
+msgstr ""
+
+#: builtin/merge.c:791
+#, c-format
+msgid "Wonderful.\n"
+msgstr ""
+
+#: builtin/merge.c:840 builtin/merge.c:1287 builtin/merge.c:1295
+#: builtin/merge.c:1303
+#, fuzzy, c-format
+msgid "Could not open '%s' for writing"
+msgstr "Nie mogę dać prawa zapisu grupie w %s"
+
+#: builtin/merge.c:856
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+
+#: builtin/merge.c:871
+#, c-format
+msgid "'%s' is not a commit"
+msgstr ""
+
+#: builtin/merge.c:921
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you can merge."
+msgstr ""
+
+#: builtin/merge.c:924
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr ""
+
+#: builtin/merge.c:951
+msgid "You cannot combine --squash with --no-ff."
+msgstr ""
+
+#: builtin/merge.c:956
+msgid "You cannot combine --no-ff with --ff-only."
+msgstr ""
+
+#: builtin/merge.c:984
+msgid "Can merge only exactly one commit into empty head"
+msgstr ""
+
+#: builtin/merge.c:987
+msgid "Squash commit into empty head not supported yet"
+msgstr ""
+
+#: builtin/merge.c:989
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr ""
+
+#: builtin/merge.c:993 builtin/merge.c:1041
+#, c-format
+msgid "%s - not something we can merge"
+msgstr ""
+
+#: builtin/merge.c:1099
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr ""
+
+#: builtin/merge.c:1133
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr ""
+
+#: builtin/merge.c:1137
+#, c-format
+msgid "Nope.\n"
+msgstr ""
+
+#: builtin/merge.c:1170
+msgid "Not possible to fast-forward, aborting."
+msgstr ""
+
+#: builtin/merge.c:1196 builtin/merge.c:1269
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr ""
+
+#: builtin/merge.c:1200
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr ""
+
+#: builtin/merge.c:1261
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr ""
+
+#: builtin/merge.c:1263
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr ""
+
+#: builtin/merge.c:1271
+#, c-format
+msgid "Using the %s to prepare resolving by hand.\n"
+msgstr ""
+
+#: builtin/merge.c:1314
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr ""
+
+#: builtin/mv.c:103
+#, fuzzy, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr "nie mogę skopiować '%s' to '%s'"
+
+#: builtin/mv.c:107
+msgid "bad source"
+msgstr ""
+
+#: builtin/mv.c:110
+msgid "can not move directory into itself"
+msgstr ""
+
+#: builtin/mv.c:113
+msgid "cannot move directory over file"
+msgstr ""
+
+#: builtin/mv.c:123
+#, c-format
+msgid "Huh? %.*s is in index?"
+msgstr ""
+
+#: builtin/mv.c:135
+msgid "source directory is empty"
+msgstr ""
+
+#: builtin/mv.c:166
+msgid "not under version control"
+msgstr ""
+
+#: builtin/mv.c:168
+msgid "destination exists"
+msgstr ""
+
+#: builtin/mv.c:175
+#, c-format
+msgid "%s; will overwrite!"
+msgstr ""
+
+#: builtin/mv.c:178
+msgid "Cannot overwrite"
+msgstr ""
+
+#: builtin/mv.c:181
+msgid "multiple sources for the same target"
+msgstr ""
+
+#: builtin/mv.c:196
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr ""
+
+#: builtin/mv.c:206
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr ""
+
+#: builtin/mv.c:209
+#, c-format
+msgid "renaming '%s' failed"
+msgstr ""
+
+#: builtin/notes.c:122
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:128
+msgid "can't fdopen 'show' output fd"
+msgstr ""
+
+#: builtin/notes.c:138
+#, c-format
+msgid "failed to close pipe to 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:141
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr ""
+
+#: builtin/notes.c:158 builtin/tag.c:311
+#, fuzzy, c-format
+msgid "could not create file '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/notes.c:172
+msgid "Please supply the note contents using either -m or -F option"
+msgstr ""
+
+#: builtin/notes.c:193 builtin/notes.c:797
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:198
+msgid "unable to write note object"
+msgstr ""
+
+#: builtin/notes.c:200
+#, c-format
+msgid "The note contents has been left in %s"
+msgstr ""
+
+#: builtin/notes.c:234 builtin/tag.c:445
+#, fuzzy, c-format
+msgid "cannot read '%s'"
+msgstr "readlink nie zadziałało dla '%s'"
+
+#: builtin/notes.c:236 builtin/tag.c:448
+#, fuzzy, c-format
+msgid "could not open or read '%s'"
+msgstr "nie mogę otworzyć katalogu '%s'"
+
+#: builtin/notes.c:255 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:508 builtin/notes.c:560 builtin/notes.c:631
+#: builtin/notes.c:636 builtin/notes.c:710 builtin/notes.c:752
+#: builtin/notes.c:789 builtin/reset.c:303 builtin/tag.c:461
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr ""
+
+#: builtin/notes.c:258
+#, c-format
+msgid "Failed to read object '%s'."
+msgstr ""
+
+#: builtin/notes.c:283
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr ""
+
+#: builtin/notes.c:295
+msgid "Failed to write current notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:307
+msgid "Failed to commit notes tree to database"
+msgstr ""
+
+#: builtin/notes.c:339
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:349
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#. TRANSLATORS: The first %s is the name of the
+#. environment variable, the second %s is its value
+#: builtin/notes.c:376
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr ""
+
+#: builtin/notes.c:440
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr ""
+
+#: builtin/notes.c:455
+#, fuzzy, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr "nie mogę skopiować '%s' to '%s'"
+
+#. TRANSLATORS: The first %s is one of "git notes ACTION",
+#. e.g. "add", "copy", "append" etc.
+#: builtin/notes.c:481
+#, c-format
+msgid "Refusing to %s notes in %s (outside of refs/notes/)"
+msgstr ""
+
+#: builtin/notes.c:501 builtin/notes.c:553 builtin/notes.c:614
+#: builtin/notes.c:626 builtin/notes.c:698 builtin/notes.c:745
+#: builtin/notes.c:782 builtin/notes.c:821
+msgid "too many parameters"
+msgstr ""
+
+#: builtin/notes.c:505
+msgid "list"
+msgstr ""
+
+#: builtin/notes.c:514 builtin/notes.c:758
+#, c-format
+msgid "No note found for object %s."
+msgstr ""
+
+#: builtin/notes.c:562
+msgid "add"
+msgstr ""
+
+#: builtin/notes.c:567
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:572 builtin/notes.c:649
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr ""
+
+#: builtin/notes.c:622
+msgid "too few parameters"
+msgstr ""
+
+#: builtin/notes.c:638
+msgid "copy"
+msgstr ""
+
+#: builtin/notes.c:643
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+
+#: builtin/notes.c:655
+#, c-format
+msgid "Missing notes on source object %s. Cannot copy."
+msgstr ""
+
+#: builtin/notes.c:703
+#, 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 ""
+
+#: builtin/notes.c:754
+msgid "show"
+msgstr ""
+
+#: builtin/notes.c:791
+msgid "remove"
+msgstr ""
+
+#: builtin/notes.c:795
+#, c-format
+msgid "Object %s has no note\n"
+msgstr ""
+
+#: builtin/notes.c:825
+msgid "prune"
+msgstr ""
+
+#: builtin/notes.c:877
+#, c-format
+msgid "Unknown subcommand: %s"
+msgstr ""
+
+#: builtin/push.c:43
+msgid "tag shorthand without <tag>"
+msgstr ""
+
+#: builtin/push.c:62
+msgid "--delete only accepts plain target ref names"
+msgstr ""
+
+#: builtin/push.c:72
+msgid "You are not currently on a branch."
+msgstr ""
+
+#: builtin/push.c:74
+#, c-format
+msgid "The current branch %s is not tracking anything."
+msgstr ""
+
+#: builtin/push.c:77
+#, c-format
+msgid "The current branch %s is tracking multiple branches, refusing to push."
+msgstr ""
+
+#: builtin/push.c:100
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+
+#: builtin/push.c:120
+#, c-format
+msgid "Pushing to %s\n"
+msgstr ""
+
+#: builtin/push.c:124
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr ""
+
+#: builtin/push.c:132
+#, c-format
+msgid ""
+"To prevent you from losing history, non-fast-forward updates were rejected\n"
+"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
+"'Note about fast-forwards' section of 'git push --help' for details.\n"
+msgstr ""
+
+#: builtin/push.c:149
+#, c-format
+msgid "bad repository '%s'"
+msgstr ""
+
+#: builtin/push.c:150
+msgid "No destination configured to push to."
+msgstr ""
+
+#: builtin/push.c:158
+msgid "--all and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:159
+msgid "--all can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:164
+msgid "--mirror and --tags are incompatible"
+msgstr ""
+
+#: builtin/push.c:165
+msgid "--mirror can't be combined with refspecs"
+msgstr ""
+
+#: builtin/push.c:170
+msgid "--all and --mirror are incompatible"
+msgstr ""
+
+#: builtin/push.c:235
+msgid "--delete is incompatible with --all, --mirror and --tags"
+msgstr ""
+
+#: builtin/push.c:237
+msgid "--delete doesn't make sense without any refs"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "mixed"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "soft"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "hard"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "merge"
+msgstr ""
+
+#: builtin/reset.c:33
+msgid "keep"
+msgstr ""
+
+#: builtin/reset.c:95
+msgid "You do not have a valid HEAD."
+msgstr ""
+
+#: builtin/reset.c:97
+msgid "Failed to find tree of HEAD."
+msgstr ""
+
+#: builtin/reset.c:103
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr ""
+
+#: builtin/reset.c:108
+msgid "Could not write new index file."
+msgstr ""
+
+#: builtin/reset.c:118
+#, c-format
+msgid "HEAD is now at %s"
+msgstr ""
+
+#: builtin/reset.c:142
+msgid "Could not read index"
+msgstr ""
+
+#: builtin/reset.c:145
+msgid "Unstaged changes after reset:"
+msgstr ""
+
+#: builtin/reset.c:225
+#, c-format
+msgid "Reflog action message too long: %.*s..."
+msgstr ""
+
+#: builtin/reset.c:231
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr ""
+
+#: builtin/reset.c:307
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr ""
+
+#: builtin/reset.c:312
+msgid "--patch is incompatible with --{hard,mixed,soft}"
+msgstr ""
+
+#: builtin/reset.c:321
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+
+#: builtin/reset.c:323
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr ""
+
+#: builtin/reset.c:335
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr ""
+
+#: builtin/reset.c:351
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr ""
+
+#: builtin/revert.c:82
+msgid "program error"
+msgstr ""
+
+#: builtin/revert.c:154 builtin/revert.c:188
+#, c-format
+msgid "Could not read commit message of %s"
+msgstr ""
+
+#: builtin/revert.c:202
+#, c-format
+msgid "Could not extract author email from %s"
+msgstr ""
+
+#: builtin/revert.c:214
+#, c-format
+msgid "Could not extract author time from %s"
+msgstr ""
+
+#: builtin/revert.c:230
+#, c-format
+msgid "No author information found in %s"
+msgstr ""
+
+#: builtin/revert.c:267
+#, c-format
+msgid "Could not write to %s."
+msgstr ""
+
+#: builtin/revert.c:270
+#, c-format
+msgid "Error wrapping up %s"
+msgstr ""
+
+#: builtin/revert.c:290
+msgid ""
+"Your local changes would be overwritten by revert.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#: builtin/revert.c:293
+msgid ""
+"Your local changes would be overwritten by cherry-pick.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:351
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr ""
+
+#: builtin/revert.c:417
+msgid "Your index file is unmerged."
+msgstr ""
+
+#: builtin/revert.c:420
+msgid "You do not have a valid HEAD"
+msgstr ""
+
+#: builtin/revert.c:428
+msgid "Cannot revert a root commit"
+msgstr ""
+
+#: builtin/revert.c:437
+#, c-format
+msgid "Commit %s is a merge but no -m option was given."
+msgstr ""
+
+#: builtin/revert.c:445
+#, c-format
+msgid "Commit %s does not have parent %d"
+msgstr ""
+
+#: builtin/revert.c:449
+#, c-format
+msgid "Mainline was specified but commit %s is not a merge."
+msgstr ""
+
+#. TRANSLATORS: The first %s will be "revert" or
+#. "cherry-pick", the second %s a SHA1
+#: builtin/revert.c:460
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr ""
+
+#: builtin/revert.c:464
+#, c-format
+msgid "Cannot get commit message for %s"
+msgstr ""
+
+#: builtin/revert.c:525
+#, c-format
+msgid "could not revert %s... %s"
+msgstr ""
+
+#: builtin/revert.c:526
+#, c-format
+msgid "could not apply %s... %s"
+msgstr ""
+
+#: builtin/revert.c:559
+msgid "empty commit set passed"
+msgstr ""
+
+#: builtin/revert.c:573
+msgid "cherry-pick --ff cannot be used with --signoff"
+msgstr ""
+
+#: builtin/revert.c:575
+msgid "cherry-pick --ff cannot be used with --no-commit"
+msgstr ""
+
+#: builtin/revert.c:577
+msgid "cherry-pick --ff cannot be used with -x"
+msgstr ""
+
+#: builtin/revert.c:579
+msgid "cherry-pick --ff cannot be used with --edit"
+msgstr ""
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:584
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr ""
+
+#: builtin/rm.c:118
+#, c-format
+msgid ""
+"'%s' has staged content different from both the file and the HEAD\n"
+"(use -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:124
+#, c-format
+msgid ""
+"'%s' has changes staged in the index\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:128
+#, c-format
+msgid ""
+"'%s' has local modifications\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+
+#: builtin/rm.c:202
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr ""
+
+#: builtin/rm.c:238
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr ""
+
+#: builtin/shortlog.c:161
+#, c-format
+msgid "Missing author: %s"
+msgstr ""
+
+#: builtin/tag.c:123 builtin/tag.c:464
+#, c-format
+msgid "tag name too long: %.*s..."
+msgstr ""
+
+#: builtin/tag.c:128
+#, fuzzy, c-format
+msgid "tag '%s' not found."
+msgstr "nie znaleziono szablonów %s"
+
+#: builtin/tag.c:143
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr ""
+
+#: builtin/tag.c:155
+#, c-format
+msgid "could not verify the tag '%s'"
+msgstr ""
+
+#: builtin/tag.c:170
+msgid "committer info too long."
+msgstr ""
+
+#: builtin/tag.c:190
+msgid "could not run gpg."
+msgstr ""
+
+#: builtin/tag.c:196
+msgid "gpg did not accept the tag data"
+msgstr ""
+
+#: builtin/tag.c:203
+msgid "gpg failed to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:218
+msgid ""
+"\n"
+"#\n"
+"# Write a tag message\n"
+"#\n"
+msgstr ""
+
+#: builtin/tag.c:226
+#, c-format
+msgid "signing key value too long (%.10s...)"
+msgstr ""
+
+#: builtin/tag.c:272
+msgid "unable to sign the tag"
+msgstr ""
+
+#: builtin/tag.c:274
+msgid "unable to write tag file"
+msgstr ""
+
+#: builtin/tag.c:289
+msgid "bad object type."
+msgstr ""
+
+#: builtin/tag.c:302
+msgid "tag header too big."
+msgstr ""
+
+#: builtin/tag.c:329
+msgid "no tag message?"
+msgstr ""
+
+#: builtin/tag.c:335
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr ""
+
+#: builtin/tag.c:428
+msgid "-n option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:430
+msgid "--contains option is only allowed with -l."
+msgstr ""
+
+#: builtin/tag.c:438
+msgid "only one -F or -m option is allowed."
+msgstr ""
+
+#: builtin/tag.c:458
+msgid "too many params"
+msgstr ""
+
+#: builtin/tag.c:466
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr ""
+
+#: builtin/tag.c:471
+#, c-format
+msgid "tag '%s' already exists"
+msgstr ""
+
+#: builtin/tag.c:479
+#, c-format
+msgid "%s: cannot lock the ref"
+msgstr ""
+
+#: builtin/tag.c:481
+#, c-format
+msgid "%s: cannot update the ref"
+msgstr ""
+
+#: builtin/tag.c:483
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr ""
+
+#: git-am.sh:47
+msgid "You need to set your committer info first"
+msgstr ""
+
+#: git-am.sh:80
+#, sh-format
+msgid ""
+"When you have resolved this problem run \"$cmdline --resolved\".\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:96
+msgid "Cannot fall back to three-way merge."
+msgstr ""
+
+#: git-am.sh:111
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+
+#: git-am.sh:120
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+
+#: git-am.sh:236
+msgid "Only one StGIT patch series can be applied at once"
+msgstr ""
+
+#: git-am.sh:288
+#, sh-format
+msgid "Patch format $patch_format is not supported."
+msgstr ""
+
+#: git-am.sh:290
+msgid "Patch format detection failed."
+msgstr ""
+
+#: git-am.sh:340
+msgid "-d option is no longer supported. Do not use."
+msgstr ""
+
+#: git-am.sh:403
+#, sh-format
+msgid "previous rebase directory $dotest still exists but mbox given."
+msgstr ""
+
+#: git-am.sh:408
+msgid "Please make up your mind. --skip or --abort?"
+msgstr ""
+
+#: git-am.sh:434
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr ""
+
+#: git-am.sh:499
+#, sh-format
+msgid "Dirty index: cannot apply patches (dirty: $files)"
+msgstr ""
+
+#: git-am.sh:595
+#, sh-format
+msgid ""
+"Patch is empty. Was it split wrong?\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+
+#: git-am.sh:632
+msgid "Patch does not have a valid e-mail address."
+msgstr ""
+
+#: git-am.sh:679
+msgid "cannot be interactive without stdin connected to a terminal."
+msgstr ""
+
+#: git-am.sh:683
+msgid "Commit Body is:"
+msgstr ""
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#: git-am.sh:690
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+msgstr ""
+
+#: git-am.sh:726
+#, sh-format
+msgid "Applying: $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:747
+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 ""
+
+#: git-am.sh:755
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+
+#: git-am.sh:771
+msgid "No changes -- Patch already applied."
+msgstr ""
+
+#: git-am.sh:781
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr ""
+
+#: git-am.sh:797
+msgid "applying to an empty history"
+msgstr ""
diff --git a/po/sv.po b/po/sv.po
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,3492 @@
+# Swedish translations for Git.
+# Copyright (C) 2010 Peter krefting <peter@softwolves.pp.se>
+# This file is distributed under the same license as the Git package.
+# Peter krefting <peter@softwolves.pp.se>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: git 1.7.3\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2010-09-20 15:16+0000\n"
+"PO-Revision-Date: 2010-09-12 21:07+0100\n"
+"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: wt-status.c:56
+msgid "# Unmerged paths:"
+msgstr "# Ej sammanslagna sökvägar:"
+
+#: wt-status.c:62 wt-status.c:79
+#, c-format
+msgid "# (use \"git reset %s <file>...\" to unstage)"
+msgstr "# (använd \"git reset %s <fil>...\" för att ta bort från kö)"
+
+#: wt-status.c:64 wt-status.c:81
+msgid "# (use \"git rm --cached <file>...\" to unstage)"
+msgstr "# (använd \"git rm --cached <fil>...\" för att ta bort från kö)"
+
+#: wt-status.c:65
+msgid "# (use \"git add/rm <file>...\" as appropriate to mark resolution)"
+msgstr "# (använd \"git add/rm <fil>...\" som lämpligt för att ange lösning)"
+
+#: wt-status.c:73
+msgid "# Changes to be committed:"
+msgstr "# Ändringar att checka in:"
+
+#: wt-status.c:91
+msgid "# Changed but not updated:"
+msgstr "# Ändrade men inte uppdaterade:"
+
+#: wt-status.c:95
+msgid "# (use \"git add <file>...\" to update what will be committed)"
+msgstr ""
+"# (använd \"git add <fil>...\" för att uppdatera vad som skall checkas in)"
+
+#: wt-status.c:97
+msgid "# (use \"git add/rm <file>...\" to update what will be committed)"
+msgstr ""
+"# (använd \"git add/rm <fil>...\" för att uppdatera vad som skall checkas "
+"in)"
+
+#: wt-status.c:98
+msgid ""
+"# (use \"git checkout -- <file>...\" to discard changes in working "
+"directory)"
+msgstr ""
+"# (använd \"git checkout -- <fil>...\" för att förkasta ändringar i "
+"arbetskatalogen)"
+
+#: wt-status.c:100
+msgid "# (commit or discard the untracked or modified content in submodules)"
+msgstr ""
+"# (checka in eller förkasta ospårat eller ändrat innehåll i undermoduler)"
+
+#: wt-status.c:109
+#, c-format
+msgid "# %s files:"
+msgstr "# %s filer:"
+
+#: wt-status.c:112
+#, c-format
+msgid "# (use \"git %s <file>...\" to include in what will be committed)"
+msgstr ""
+"# (använd \"git %s <fil>...\" för att ta med i vad som skall checkas in)"
+
+#: wt-status.c:129
+msgid "bug"
+msgstr "programfel"
+
+#: wt-status.c:134
+msgid "both deleted:"
+msgstr "borttaget av bägge:"
+
+#: wt-status.c:135
+msgid "added by us:"
+msgstr "tillagt av oss:"
+
+#: wt-status.c:136
+msgid "deleted by them:"
+msgstr "borttaget av dem:"
+
+#: wt-status.c:137
+msgid "added by them:"
+msgstr "tillagt av dem:"
+
+#: wt-status.c:138
+msgid "deleted by us:"
+msgstr "borttaget av oss:"
+
+#: wt-status.c:139
+msgid "both added:"
+msgstr "tillagt av bägge:"
+
+#: wt-status.c:140
+msgid "both modified:"
+msgstr "ändrat av bägge:"
+
+#: wt-status.c:170
+msgid "new commits, "
+msgstr "nya incheckningar, "
+
+#: wt-status.c:172
+msgid "modified content, "
+msgstr "ändrat innehåll, "
+
+#: wt-status.c:174
+msgid "untracked content, "
+msgstr "ospårat innehåll, "
+
+#: wt-status.c:188
+#, c-format
+msgid "new file: %s"
+msgstr "ny fil: %s"
+
+#: wt-status.c:191
+#, c-format
+msgid "copied: %s -> %s"
+msgstr "kopierad: %s -> %s"
+
+#: wt-status.c:194
+#, c-format
+msgid "deleted: %s"
+msgstr "borttagen: %s"
+
+#: wt-status.c:197
+#, c-format
+msgid "modified: %s"
+msgstr "ändrad: %s"
+
+#: wt-status.c:200
+#, c-format
+msgid "renamed: %s -> %s"
+msgstr "namnbyte: %s -> %s"
+
+#: wt-status.c:203
+#, c-format
+msgid "typechange: %s"
+msgstr "typbyte: %s"
+
+#: wt-status.c:206
+#, c-format
+msgid "unknown: %s"
+msgstr "okänd: %s"
+
+#: wt-status.c:209
+#, c-format
+msgid "unmerged: %s"
+msgstr "osammansl.: %s"
+
+#: wt-status.c:212
+#, c-format
+msgid "bug: unhandled diff status %c"
+msgstr "programfel: diff-status %c ej hanterad"
+
+#: wt-status.c:635
+msgid "On branch "
+msgstr "På grenen "
+
+#: wt-status.c:642
+msgid "Not currently on any branch."
+msgstr "Inte på någon gren för närvarande."
+
+#: wt-status.c:652
+msgid "# Initial commit"
+msgstr "# Grundincheckning"
+
+#: wt-status.c:666
+msgid "Untracked"
+msgstr "Ospårad"
+
+#: wt-status.c:668
+msgid "Ignored"
+msgstr "Ignorerad"
+
+#: wt-status.c:670
+#, c-format
+msgid "# Untracked files not listed%s\n"
+msgstr "# Ospårade filer visas ej%s\n"
+
+#: wt-status.c:672
+msgid " (use -u option to show untracked files)"
+msgstr " (använd flaggan -u för att visa ospårade filer)"
+
+#: wt-status.c:678
+#, c-format
+msgid "# No changes\n"
+msgstr "# Inga ändringar\n"
+
+#: wt-status.c:682
+#, c-format
+msgid "no changes added to commit%s\n"
+msgstr "inga ändringar att checka in%s\n"
+
+#: wt-status.c:684
+msgid " (use \"git add\" and/or \"git commit -a\")"
+msgstr " (använd \"git add\" och/eller \"git commit -a\")"
+
+#: wt-status.c:686
+#, c-format
+msgid "nothing added to commit but untracked files present%s\n"
+msgstr "inget köat för incheckning, men ospårade filer finns%s\n"
+
+#: wt-status.c:688
+msgid " (use \"git add\" to track)"
+msgstr " (använd \"git add\" för att spåra)"
+
+#: wt-status.c:690 wt-status.c:693 wt-status.c:696
+#, c-format
+msgid "nothing to commit%s\n"
+msgstr "inget att checka in%s\n"
+
+#: wt-status.c:691
+msgid " (create/copy files and use \"git add\" to track)"
+msgstr " (skapa/kopiera filer och använd \"git add\" för att spåra)"
+
+#: wt-status.c:694
+msgid " (use -u to show untracked files)"
+msgstr " (använd -u för att visa ospårade filer)"
+
+#: wt-status.c:697
+msgid " (working directory clean)"
+msgstr " (arbetskatalogen ren)"
+
+#: wt-status.c:795
+msgid "HEAD (no branch)"
+msgstr "HEAD (ingen gren)"
+
+#: wt-status.c:801
+msgid "Initial commit on "
+msgstr "Grundincheckning på "
+
+#: wt-status.c:816
+msgid "behind "
+msgstr "efter "
+
+#: wt-status.c:819 wt-status.c:822
+msgid "ahead "
+msgstr "före "
+
+#: wt-status.c:824
+msgid ", behind "
+msgstr ", efter "
+
+#: builtin/add.c:41
+#, c-format
+msgid "unexpected diff status %c"
+msgstr "diff-status %c förväntades inte"
+
+#: builtin/add.c:67 builtin/commit.c:244
+msgid "updating files failed"
+msgstr "misslyckades uppdatera filer"
+
+#: builtin/add.c:77
+#, c-format
+msgid "remove '%s'\n"
+msgstr "ta bort \"%s\"\n"
+
+#: builtin/add.c:175
+#, c-format
+msgid "Path '%s' is in submodule '%.*s'"
+msgstr "Sökvägen \"%s\" är i undermodulen \"%.*s\""
+
+#: builtin/add.c:191
+msgid "Unstaged changes after refreshing the index:"
+msgstr "Ospårade ändringar efter att ha uppdaterat indexet:"
+
+#: builtin/add.c:194 builtin/add.c:452 builtin/rm.c:194
+#, c-format
+msgid "pathspec '%s' did not match any files"
+msgstr "sökvägsangivelsen \"%s\" motsvarade inte några filer"
+
+#: builtin/add.c:208
+#, c-format
+msgid "'%s' is beyond a symbolic link"
+msgstr "\"%s\" är på andra sidan av en symbolisk länk"
+
+#: builtin/add.c:275
+msgid "Could not read the index"
+msgstr "Kunde inte läsa indexet"
+
+#: builtin/add.c:284
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Kunde inte öppna \"%s\" för skrivning"
+
+#: builtin/add.c:288
+msgid "Could not write patch"
+msgstr "Kunde inte skriva patch"
+
+#: builtin/add.c:293
+#, c-format
+msgid "Could not stat '%s'"
+msgstr "Kunde inte ta status på \"%s\""
+
+#: builtin/add.c:295
+msgid "Empty patch. Aborted."
+msgstr "Tom patch. Avbryter."
+
+#: builtin/add.c:301
+#, c-format
+msgid "Could not apply '%s'"
+msgstr "Kunde inte applicera \"%s\""
+
+#: builtin/add.c:349
+#, c-format
+msgid "Use -f if you really want to add them.\n"
+msgstr "Använd -f om du verkligen vill lägga till dem.\n"
+
+#: builtin/add.c:350
+msgid "no files added"
+msgstr "inga filer har lagts till"
+
+#: builtin/add.c:356
+msgid "adding files failed"
+msgstr "misslyckades lägga till filer"
+
+#: builtin/add.c:388
+msgid "-A and -u are mutually incompatible"
+msgstr "-A och -u är ömsesidigt inkompatibla"
+
+#: builtin/add.c:390
+msgid "Option --ignore-missing can only be used together with --dry-run"
+msgstr "Flaggan --ignore-missing kan endast användas tillsammans med --dry-run"
+
+#: builtin/add.c:410
+#, c-format
+msgid "Nothing specified, nothing added.\n"
+msgstr "Inget angivet, inget tillagt.\n"
+
+#: builtin/add.c:411
+#, c-format
+msgid "Maybe you wanted to say 'git add .'?\n"
+msgstr "Kanske menade du att skriva \"git add .\"?\n"
+
+#: builtin/add.c:417 builtin/clean.c:95 builtin/commit.c:301
+#: builtin/commit.c:310 builtin/mv.c:77 builtin/rm.c:171
+msgid "index file corrupt"
+msgstr "indexfilen trasig"
+
+#: builtin/add.c:468 builtin/mv.c:223 builtin/rm.c:268
+msgid "Unable to write new index file"
+msgstr "Kunde inte skriva ny indexfil"
+
+#: builtin/archive.c:17
+#, c-format
+msgid "could not create archive file '%s'"
+msgstr "Kunde inte skapa arkivfilen \"%s\""
+
+#: builtin/archive.c:20
+msgid "could not redirect output"
+msgstr "kunde inte omdirigera utdata"
+
+#: builtin/archive.c:36
+msgid "git archive: Remote with no URL"
+msgstr "git archive: Fjärr utan URL"
+
+#: builtin/archive.c:46
+msgid "git archive: expected ACK/NAK, got EOF"
+msgstr "git archive: förväntade ACK/NAK, fick EOF"
+
+#: builtin/archive.c:51
+#, c-format
+msgid "git archive: NACK %s"
+msgstr "git archive: NACK %s"
+
+#: builtin/archive.c:52
+msgid "git archive: protocol error"
+msgstr "git archive: protokollfel"
+
+#: builtin/archive.c:57
+msgid "git archive: expected a flush"
+msgstr "git archive: förväntade en tömning (flush)"
+
+#: builtin/branch.c:136
+#, c-format
+msgid ""
+"deleting branch '%s' that has been merged to\n"
+" '%s', but it is not yet merged to HEAD."
+msgstr ""
+"tar bort grenen \"%s\" som inte har slagits ihop med\n"
+" \"%s\", men som ännu inte slagits ihop med HEAD."
+
+#: builtin/branch.c:140
+#, c-format
+msgid ""
+"not deleting branch '%s' that is not yet merged to\n"
+" '%s', even though it is merged to HEAD."
+msgstr ""
+"tar inte bort grenen \"%s\" som inte har slagits ihop med\n"
+" \"%s\", trots att den har slagits ihop med HEAD."
+
+#. TRANSLATORS: This is "remote " in "remote branch '%s' not found"
+#: builtin/branch.c:161
+msgid "remote "
+msgstr "fjärr"
+
+#: builtin/branch.c:169
+msgid "cannot use -a with -d"
+msgstr "kan inte ange -a med -d"
+
+#: builtin/branch.c:175
+msgid "Couldn't look up commit object for HEAD"
+msgstr "Kunde inte slå upp incheckningsobjekt för HEAD"
+
+#: builtin/branch.c:180
+#, c-format
+msgid "Cannot delete the branch '%s' which you are currently on."
+msgstr "Kan inte ta bort grenen \"%s\" som du befinner dig på för närvarande."
+
+#: builtin/branch.c:190
+#, c-format
+msgid "%sbranch '%s' not found."
+msgstr "%sgrenen \"%s\" hittades inte."
+
+#: builtin/branch.c:198
+#, c-format
+msgid "Couldn't look up commit object for '%s'"
+msgstr "Kunde inte slå upp incheckningsobjekt för \"%s\""
+
+#: builtin/branch.c:204
+#, c-format
+msgid ""
+"The branch '%s' is not fully merged.\n"
+"If you are sure you want to delete it, run 'git branch -D %s'."
+msgstr ""
+"Grenen \"%s\" har inte slagits samman i sin helhet.\n"
+"Om du är säker på att du vill ta bort den, kör \"git branch -D %s\"."
+
+#: builtin/branch.c:212
+#, c-format
+msgid "Error deleting %sbranch '%s'"
+msgstr "Fel vid borttagning av %sgrenen \"%s\""
+
+#: builtin/branch.c:217
+#, c-format
+msgid "Deleted %sbranch %s (was %s).\n"
+msgstr "Tog bort %sgrenen %s (var %s).\n"
+
+#: builtin/branch.c:222
+msgid "Update of config-file failed"
+msgstr "Misslyckades uppdatera konfigurationsfil"
+
+#: builtin/branch.c:304
+#, c-format
+msgid "branch '%s' does not point at a commit"
+msgstr "grenen \"%s\" pekar inte på en incheckning"
+
+#: builtin/branch.c:381
+#, c-format
+msgid "behind %d] "
+msgstr "bakom %d] "
+
+#: builtin/branch.c:383
+#, c-format
+msgid "ahead %d] "
+msgstr "före %d] "
+
+#: builtin/branch.c:385
+#, c-format
+msgid "ahead %d, behind %d] "
+msgstr "före %d, bakom %d] "
+
+#: builtin/branch.c:484
+msgid "(no branch)"
+msgstr "(ingen gren)"
+
+#: builtin/branch.c:544
+msgid "some refs could not be read"
+msgstr "vissa referenser kunde inte läsas"
+
+#: builtin/branch.c:557
+msgid "cannot rename the current branch while not on any."
+msgstr ""
+"kunde inte byta namn på aktuell gren när du inte befinner dig på någon."
+
+#: builtin/branch.c:567 builtin/branch.c:571
+#, c-format
+msgid "Invalid branch name: '%s'"
+msgstr "Felaktigt namn på gren: \"%s\""
+
+#: builtin/branch.c:574
+#, c-format
+msgid "A branch named '%s' already exists."
+msgstr "Det finns redan en gren som heter \"%s\""
+
+#: builtin/branch.c:580
+msgid "Branch rename failed"
+msgstr "Misslyckades byta namn på gren"
+
+#: builtin/branch.c:584
+#, c-format
+msgid "Renamed a misnamed branch '%s' away"
+msgstr "Bytte bort namn på en felaktigt namngiven gren \"%s\""
+
+#: builtin/branch.c:588
+#, c-format
+msgid "Branch renamed to %s, but HEAD is not updated!"
+msgstr "Grenen namnbytt till %s, men HEAD har inte uppdaterats!"
+
+#: builtin/branch.c:595
+msgid "Branch is renamed, but update of config-file failed"
+msgstr "Grenen namnbytt, men misslyckades uppdatera konfigurationsfilen"
+
+#: builtin/branch.c:610
+#, c-format
+msgid "malformed object name %s"
+msgstr "felformat objektnamn %s"
+
+#: builtin/branch.c:680
+msgid "Failed to resolve HEAD as a valid ref."
+msgstr "Misslyckades slå upp HEAD som giltig referens"
+
+#: builtin/branch.c:686
+msgid "HEAD not found below refs/heads!"
+msgstr "HEAD hittades inte under refs/heads!"
+
+#: builtin/branch.c:706
+msgid "-a and -r options to 'git branch' do not make sense with a branch name"
+msgstr ""
+"flaggorna -a och -r på \"git branch\" kan inte anges tillsammans med ett "
+"grennamn"
+
+#: builtin/bundle.c:47
+#, c-format
+msgid "%s is okay\n"
+msgstr "%s är okej\n"
+
+#: builtin/bundle.c:56
+msgid "Need a repository to create a bundle."
+msgstr "Behöver ett arkiv för att skapa ett paket (bundle)."
+
+#: builtin/bundle.c:60
+msgid "Need a repository to unbundle."
+msgstr "Behöver ett arkiv för att packa upp ett paket (bundle)."
+
+#: builtin/checkout.c:107 builtin/checkout.c:135
+#, c-format
+msgid "path '%s' does not have our version"
+msgstr "sökvägen \"%s\" har inte vår version"
+
+#: builtin/checkout.c:109 builtin/checkout.c:137
+#, c-format
+msgid "path '%s' does not have their version"
+msgstr "sökvägen \"%s\" har inte deras version"
+
+#: builtin/checkout.c:120
+#, c-format
+msgid "path '%s' does not have all three versions"
+msgstr "sökvägen \"%s\" har inte alla tre versionerna"
+
+#: builtin/checkout.c:155
+#, c-format
+msgid "path '%s' does not have all 3 versions"
+msgstr "sökvägen \"%s\" har inte alla 3 versionerna"
+
+#: builtin/checkout.c:172
+#, c-format
+msgid "path '%s': cannot merge"
+msgstr "sökväg \"%s\": kan inte slå ihop"
+
+#: builtin/checkout.c:189
+#, c-format
+msgid "Unable to add merge result for '%s'"
+msgstr "Kunde inte lägga till sammanslagningsresultat för \"%s\""
+
+#: builtin/checkout.c:194 builtin/reset.c:170
+#, c-format
+msgid "make_cache_entry failed for path '%s'"
+msgstr "make_cache_entry misslyckades för sökvägen \"%s\""
+
+#: builtin/checkout.c:216 builtin/checkout.c:371
+msgid "corrupt index file"
+msgstr "indexfilen är trasig"
+
+#: builtin/checkout.c:244 builtin/checkout.c:251
+#, c-format
+msgid "path '%s' is unmerged"
+msgstr "sökvägen \"%s\" har inte slagits ihop"
+
+#: builtin/checkout.c:280 builtin/checkout.c:475 builtin/clone.c:658
+#: builtin/merge.c:737
+msgid "unable to write new index file"
+msgstr "kunde inte skriva ny indexfil"
+
+#: builtin/checkout.c:297 builtin/diff.c:307 builtin/merge.c:367
+msgid "diff_setup_done failed"
+msgstr "diff_setup_done misslyckades"
+
+#: builtin/checkout.c:393
+msgid "you need to resolve your current index first"
+msgstr "du måste lösa ditt befintliga index först"
+
+#: builtin/checkout.c:524
+#, c-format
+msgid "Can not do reflog for '%s'\n"
+msgstr "Kan inte skapa referenslog för \"%s\"\n"
+
+#: builtin/checkout.c:550
+#, c-format
+msgid "Already on '%s'\n"
+msgstr "Redan på \"%s\"\n"
+
+#: builtin/checkout.c:554
+#, c-format
+msgid "Switched to and reset branch '%s'\n"
+msgstr "Växlade till och nollställde grenen \"%s\"\n"
+
+#: builtin/checkout.c:556
+#, c-format
+msgid "Switched to a new branch '%s'\n"
+msgstr "Växlade till en ny gren \"%s\"\n"
+
+#: builtin/checkout.c:558
+#, c-format
+msgid "Switched to branch '%s'\n"
+msgstr "Växlade till grenen \"%s\"\n"
+
+#: builtin/checkout.c:575
+msgid "HEAD is now at"
+msgstr "HEAD är nu på"
+
+#: builtin/checkout.c:603
+msgid "You are on a branch yet to be born"
+msgstr "Du är på en gren som ännu inte är född"
+
+#: builtin/checkout.c:617
+msgid "Previous HEAD position was"
+msgstr "Tidigare position för HEAD var"
+
+#: builtin/checkout.c:730
+msgid "-B cannot be used with -b"
+msgstr "-B kan inte användas med -b"
+
+#: builtin/checkout.c:738
+msgid "--patch is incompatible with all other options"
+msgstr "--patch är inkompatibel med alla andra flaggor"
+
+#: builtin/checkout.c:744
+msgid "--track needs a branch name"
+msgstr "--track behöver ett namn på en gren"
+
+#: builtin/checkout.c:751
+msgid "Missing branch name; try -b"
+msgstr "Grennamn saknas; försök med -b"
+
+#: builtin/checkout.c:757
+msgid "--orphan and -b|-B are mutually exclusive"
+msgstr "--orphan och --b|-B kan inte användas samtidigt"
+
+#: builtin/checkout.c:759
+msgid "--orphan cannot be used with -t"
+msgstr "--orphan kan inte användas med -t"
+
+#: builtin/checkout.c:769
+msgid "git checkout: -f and -m are incompatible"
+msgstr "git checkout: -f och -m är inkompatibla"
+
+#. case (1)
+#: builtin/checkout.c:815
+#, c-format
+msgid "invalid reference: %s"
+msgstr "felaktig referens: %s"
+
+#. case (1): want a tree
+#: builtin/checkout.c:852
+#, c-format
+msgid "reference is not a tree: %s"
+msgstr "referensen är inte ett träd: %s"
+
+#: builtin/checkout.c:878
+msgid "invalid path specification"
+msgstr "felaktig sökvägsangivelse"
+
+#: builtin/checkout.c:886
+#, c-format
+msgid ""
+"git checkout: updating paths is incompatible with switching branches.\n"
+"Did you intend to checkout '%s' which can not be resolved as commit?"
+msgstr ""
+"git checkout: uppdatera sökvägar är inkompatibelt med att växla gren.\n"
+"Ville du checka ut \"%s\" som inte kan lösas som en sammanslaning?"
+
+#: builtin/checkout.c:888
+msgid "git checkout: updating paths is incompatible with switching branches."
+msgstr "git checkout: uppdatera sökvägar är inkompatibelt med att växla gren."
+
+#: builtin/checkout.c:893
+msgid ""
+"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
+"checking out of the index."
+msgstr ""
+"git checkout: --ours/--theirs, --force och --merge är inkompatibla när\n"
+"du checkar ut från indexet."
+
+#: builtin/checkout.c:904
+#, c-format
+msgid "git checkout: we do not like '%s' as a branch name."
+msgstr "git checkout: vi tycker inte om \"%s\" som namn på en gren."
+
+#: builtin/checkout.c:909
+#, c-format
+msgid "git checkout: branch %s already exists"
+msgstr "git checkout: grenen %s finns redan"
+
+#: builtin/checkout.c:916
+msgid "Cannot switch branch to a non-commit."
+msgstr "Kan inte växla gren på en icke-incheckning."
+
+#: builtin/checkout.c:919
+msgid "--ours/--theirs is incompatible with switching branches."
+msgstr "--ours/--theirs är inkompatibla när du växlar gren."
+
+#: builtin/clean.c:78
+msgid "-x and -X cannot be used together"
+msgstr "-x och -X kan inte användas samtidigt"
+
+#: builtin/clean.c:82
+msgid ""
+"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
+msgstr ""
+"clean.requireForce satt till true, men varken -n eller -f angavs; vägrar "
+"städa"
+
+#: builtin/clean.c:85
+msgid ""
+"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
+"clean"
+msgstr ""
+"clean.requireForce har standardvärdet true, men varken -n eller -f angavs; "
+"vägrar städa"
+
+#: builtin/clean.c:154 builtin/clean.c:175
+#, c-format
+msgid "Would remove %s\n"
+msgstr "Skulle ta bort %s\n"
+
+#: builtin/clean.c:158 builtin/clean.c:178
+#, c-format
+msgid "Removing %s\n"
+msgstr "Tar bort %s\n"
+
+#: builtin/clean.c:161 builtin/clean.c:181
+#, c-format
+msgid "failed to remove '%s'"
+msgstr "kunde inte ta bort \"%s\""
+
+#: builtin/clean.c:165
+#, c-format
+msgid "Would not remove %s\n"
+msgstr "Skulle inte ta bort %s\n"
+
+#: builtin/clean.c:167
+#, c-format
+msgid "Not removing %s\n"
+msgstr "Tar inte bort %s\n"
+
+#: builtin/clone.c:208
+#, c-format
+msgid "reference repository '%s' is not a local directory."
+msgstr "referensarkivet \"%s\" är inte en lokal katalog."
+
+#: builtin/clone.c:235
+#, c-format
+msgid "failed to open '%s'"
+msgstr "misslyckades öppna \"%s\""
+
+#: builtin/clone.c:239
+#, c-format
+msgid "failed to create directory '%s'"
+msgstr "misslyckades skapa katalogen \"%s\""
+
+#: builtin/clone.c:241 builtin/diff.c:74
+#, c-format
+msgid "failed to stat '%s'"
+msgstr "misslyckades ta status på \"%s\""
+
+#: builtin/clone.c:243
+#, c-format
+msgid "%s exists and is not a directory"
+msgstr "%s finns och är ingen katalog"
+
+#: builtin/clone.c:257
+#, c-format
+msgid "failed to stat %s\n"
+msgstr "misslyckades ta status på %s\n"
+
+#: builtin/clone.c:267
+#, c-format
+msgid "failed to unlink '%s'"
+msgstr "misslyckades ta bort länken \"%s\""
+
+#: builtin/clone.c:272
+#, c-format
+msgid "failed to create link '%s'"
+msgstr "misslyckades skapa länken \"%s\""
+
+#: builtin/clone.c:276
+#, c-format
+msgid "failed to copy file to '%s'"
+msgstr "misslyckades kopiera filen till \"%s\""
+
+#: builtin/clone.c:305
+#, c-format
+msgid "done.\n"
+msgstr "klart.\n"
+
+#: builtin/clone.c:387
+msgid "Too many arguments."
+msgstr "För många argument."
+
+#: builtin/clone.c:391
+msgid "You must specify a repository to clone."
+msgstr "Du måste ange ett arkiv att klona."
+
+#: builtin/clone.c:399
+#, c-format
+msgid "--bare and --origin %s options are incompatible."
+msgstr "flaggorna --bare och --origin %s är inkompatibla."
+
+#: builtin/clone.c:428
+#, c-format
+msgid "destination path '%s' already exists and is not an empty directory."
+msgstr "destinationssökvägen \"%s\" finns redan och är inte en tom katalog."
+
+#: builtin/clone.c:438
+#, c-format
+msgid "working tree '%s' already exists."
+msgstr "arbetsträdet \"%s\" finns redan."
+
+#: builtin/clone.c:451 builtin/clone.c:465
+#, c-format
+msgid "could not create leading directories of '%s'"
+msgstr "kunde inte skapa inledande kataloger för \"%s\""
+
+#: builtin/clone.c:454
+#, c-format
+msgid "could not create work tree dir '%s'."
+msgstr "kunde inte skapa arbetskatalogen \"%s\""
+
+#: builtin/clone.c:470
+#, c-format
+msgid "Cloning into bare repository %s\n"
+msgstr "Klonar till ett naket arkiv %s\n"
+
+#: builtin/clone.c:472
+#, c-format
+msgid "Cloning into %s\n"
+msgstr "Klonar till %s\n"
+
+#: builtin/clone.c:530
+#, c-format
+msgid "Don't know how to clone %s"
+msgstr "Vet inte hur man klonar %s"
+
+#: builtin/clone.c:569
+#, c-format
+msgid "Remote branch %s not found in upstream %s, using HEAD instead"
+msgstr ""
+"Fjärrgrenen %s hittades inte i uppströmsarkivet %s, använder HEAD istället"
+
+#: builtin/clone.c:579
+msgid "You appear to have cloned an empty repository."
+msgstr "Du verkar ha klonat ett tomt arkiv."
+
+#: builtin/clone.c:621
+msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
+msgstr ""
+"HEAD hos fjärren pekar på en obefintlig referens, kan inte checka ut.\n"
+
+#: builtin/commit.c:41
+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"
+"If the identity used for this commit is wrong, you can fix it with:\n"
+"\n"
+" git commit --amend --author='Your Name <you@example.com>'\n"
+msgstr ""
+"Ditt namn och e-postadress konfigurerades automatiskt baserat på\n"
+"ditt användar-id och värdnamn. Kontrollera att de är riktiga. Du\n"
+"kan förhindra det här meddelandet genom att ställa dem explicit:\n"
+"\n"
+" git config --global user.name \"Ditt namn\"\n"
+" git config --global user.email du@example.com\n"
+"\n"
+"Om identiteten som användes för incheckningen är felaktig kan du\n"
+"rätta den med:\n"
+"\n"
+" git commit --amend --author='Ditt namn <du@example.com>'\n"
+
+#: builtin/commit.c:53
+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 ""
+"Du bad om att utöka den senaste incheckningen, men om du gör det\n"
+"blir den tom. Du kan köra kommandot på nytt med --allow-empty, eller\n"
+"så kan du ta bort incheckningen helt med \"git reset HEAD^\".\n"
+
+#: builtin/commit.c:271
+msgid "failed to unpack HEAD tree object"
+msgstr "misslyckades packa upp HEAD:s trädobjekt"
+
+#: builtin/commit.c:299
+msgid "interactive add failed"
+msgstr "interaktiv tilläggning misslyckades"
+
+#: builtin/commit.c:330 builtin/commit.c:350 builtin/commit.c:396
+msgid "unable to write new_index file"
+msgstr "kunde inte skriva filen new_index"
+
+#: builtin/commit.c:380
+msgid "cannot do a partial commit during a merge."
+msgstr "kan inte utföra en delvis incheckning under en sammanslagning."
+
+#: builtin/commit.c:389
+msgid "cannot read the index"
+msgstr "kan inte läsa indexet"
+
+#: builtin/commit.c:409
+msgid "unable to write temporary index file"
+msgstr "kunde inte skriva temporär indexfil"
+
+#: builtin/commit.c:456 builtin/commit.c:1294
+msgid "could not parse HEAD commit"
+msgstr "kunde inte tolka HEAD:s incheckning"
+
+#: builtin/commit.c:475 builtin/commit.c:481
+#, c-format
+msgid "invalid commit: %s"
+msgstr "felaktig incheckning: %s"
+
+#: builtin/commit.c:499
+msgid "malformed --author parameter"
+msgstr "felformad \"--author\"-flagga"
+
+#: builtin/commit.c:573 builtin/shortlog.c:299
+#, c-format
+msgid "(reading log message from standard input)\n"
+msgstr "(läser loggmeddelande från standard in)\n"
+
+#: builtin/commit.c:575
+msgid "could not read log from standard input"
+msgstr "kunde inte läsa logg från standard in"
+
+#: builtin/commit.c:579
+#, c-format
+msgid "could not read log file '%s'"
+msgstr "kunde inte läsa loggfilen \"%s\""
+
+#: builtin/commit.c:585
+msgid "commit has empty message"
+msgstr "incheckningen har ett tomt meddelande"
+
+#: builtin/commit.c:591
+msgid "could not read MERGE_MSG"
+msgstr "kunde inte läsa MERGE_MSG"
+
+#: builtin/commit.c:595
+msgid "could not read SQUASH_MSG"
+msgstr "kunde inte läsa SQUASH_MSG"
+
+#: builtin/commit.c:599
+#, c-format
+msgid "could not read '%s'"
+msgstr "kunde inte läsa \"%s\""
+
+#: builtin/commit.c:612
+#, c-format
+msgid "could not open '%s'"
+msgstr "kunde inte öppna \"%s\""
+
+#: builtin/commit.c:636
+msgid "could not write commit template"
+msgstr "kunde inte skriva incheckningsmall"
+
+#: builtin/commit.c:650
+#, c-format
+msgid ""
+"#\n"
+"# It looks like you may be committing a MERGE.\n"
+"# If this is not correct, please remove the file\n"
+"#\t%s\n"
+"# and try again.\n"
+"#\n"
+msgstr ""
+"#\n"
+"# Det verkar som du checkar in en SAMMANSLAGNING.\n"
+"# Om det inte stämmer tar du bort filen\n"
+"#\t%s\n"
+"# och försöker igen.\n"
+"#\n"
+
+#: builtin/commit.c:659
+#, c-format
+msgid ""
+"\n"
+"# Please enter the commit message for your changes."
+msgstr ""
+"\n"
+"# Ange ett incheckningsmeddelande för dina ändringar."
+
+#: builtin/commit.c:663
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be ignored, and an empty message aborts the commit.\n"
+msgstr ""
+" Rader som inleds\n"
+"# med \"#\" kommer ignoreras, och ett tomt meddelande avbryter "
+"incheckningen.\n"
+
+#: builtin/commit.c:668
+#, c-format
+msgid ""
+" Lines starting\n"
+"# with '#' will be kept; you may remove them yourself if you want to.\n"
+"# An empty message aborts the commit.\n"
+msgstr ""
+" Rader som inleds\n"
+"# med \"#\" kommer behållas; du kan själv ta bort dem om du vill.\n"
+"# Ett tomt meddelande avbryter incheckningen.\n"
+
+#: builtin/commit.c:680
+#, c-format
+msgid "%s# Author: %s\n"
+msgstr "%s# Författare: %s\n"
+
+#: builtin/commit.c:688
+#, c-format
+msgid "%s# Committer: %s\n"
+msgstr "%s# Incheckare: %s\n"
+
+#: builtin/commit.c:705
+msgid "Cannot read index"
+msgstr "Kan inte läsa indexet"
+
+#: builtin/commit.c:737
+msgid "Error building trees"
+msgstr "Fel vid byggande av träd"
+
+#: builtin/commit.c:752 builtin/tag.c:321
+#, c-format
+msgid "Please supply the message using either -m or -F option.\n"
+msgstr "Ange meddelandet en av flaggorna -m eller -F.\n"
+
+#: builtin/commit.c:832
+#, c-format
+msgid "No existing author found with '%s'"
+msgstr "Hittade ingen befintlig författare med \"%s\""
+
+#: builtin/commit.c:847 builtin/commit.c:1039
+#, c-format
+msgid "Invalid untracked files mode '%s'"
+msgstr "Ogiltigt läge för ospårade filer: \"%s\""
+
+#: builtin/commit.c:864
+msgid "Using both --reset-author and --author does not make sense"
+msgstr "Kan inte använda både --reset-author och --author"
+
+#: builtin/commit.c:878
+msgid "You have nothing to amend."
+msgstr "Du har inget att utöka."
+
+#: builtin/commit.c:880
+msgid "You are in the middle of a merge -- cannot amend."
+msgstr "Du är i mitten av en incheckning -- kan inte utöka."
+
+#: builtin/commit.c:889
+msgid "Only one of -c/-C/-F can be used."
+msgstr "Kan endast använda en av -c/-C/-F."
+
+#: builtin/commit.c:891
+msgid "Option -m cannot be combined with -c/-C/-F."
+msgstr "Flaggan -m kan inte kombineras med -c/-C/-F."
+
+#: builtin/commit.c:897
+msgid "--reset-author can be used only with -C, -c or --amend."
+msgstr "--reset-author kan endast användas med -C, -c eller --amend."
+
+#: builtin/commit.c:906
+#, c-format
+msgid "could not lookup commit %s"
+msgstr "kunde inte slå upp incheckningen %s"
+
+#: builtin/commit.c:909
+#, c-format
+msgid "could not parse commit %s"
+msgstr "kunde inte tolka incheckningen %s"
+
+#: builtin/commit.c:937
+msgid "Only one of --include/--only/--all/--interactive can be used."
+msgstr "Endast en av --include/--only/--all/--interactive kan användas."
+
+#: builtin/commit.c:939
+msgid "No paths with --include/--only does not make sense."
+msgstr "Du måste ange sökvägar tillsammans med --include/--only."
+
+#: builtin/commit.c:941
+msgid "Clever... amending the last one with dirty index."
+msgstr "Smart... utöka den senaste med smutsigt index."
+
+#: builtin/commit.c:943
+msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
+msgstr "Explicita sökvägar angavs utan -i eller -o; antar --only-paths..."
+
+#: builtin/commit.c:953
+#, c-format
+msgid "Invalid cleanup mode %s"
+msgstr "Felaktigt städningsläge %s"
+
+#: builtin/commit.c:958
+msgid "Paths with -a does not make sense."
+msgstr "Kan inte ange sökvägar med -a."
+
+#: builtin/commit.c:960
+msgid "Paths with --interactive does not make sense."
+msgstr "Kan inte ange sökvägar med --interactive."
+
+#: builtin/commit.c:1142
+msgid "couldn't look up newly created commit"
+msgstr "kunde inte slå upp en precis skapad incheckning"
+
+#: builtin/commit.c:1144
+msgid "could not parse newly created commit"
+msgstr "kunde inte tolka en precis skapad incheckning"
+
+#: builtin/commit.c:1185
+msgid "detached HEAD"
+msgstr "frånkopplad HEAD"
+
+#: builtin/commit.c:1187
+msgid " (root-commit)"
+msgstr " (rotincheckning)"
+
+#: builtin/commit.c:1307 builtin/merge.c:461
+#, c-format
+msgid "could not open '%s' for reading"
+msgstr "kunde inte öppna \"%s\" för läsning"
+
+#: builtin/commit.c:1312
+#, c-format
+msgid "Corrupt MERGE_HEAD file (%s)"
+msgstr "Trasig MERGE_HEAD-fil (%s)"
+
+#: builtin/commit.c:1319
+msgid "could not read MERGE_MODE"
+msgstr "kunde inte läsa MERGE_MODE"
+
+#: builtin/commit.c:1336
+#, c-format
+msgid "could not read commit message: %s"
+msgstr "kunde inte läsa incheckningsmeddelande: %s"
+
+#: builtin/commit.c:1350
+#, c-format
+msgid "Aborting commit due to empty commit message.\n"
+msgstr "Avbryter på grund av tomt incheckningsmeddelande.\n"
+
+#: builtin/commit.c:1358
+msgid "failed to write commit object"
+msgstr "kunde inte skriva incheckningsobjekt"
+
+#: builtin/commit.c:1375
+msgid "cannot lock HEAD ref"
+msgstr "kunde inte låsa HEAD-referens"
+
+#: builtin/commit.c:1379
+msgid "cannot update HEAD ref"
+msgstr "kunde inte uppdatera HEAD-referens"
+
+#: builtin/commit.c:1388
+msgid ""
+"Repository has been updated, but unable to write\n"
+"new_index file. Check that disk is not full or quota is\n"
+"not exceeded, and then \"git reset HEAD\" to recover."
+msgstr ""
+"Arkivet har uppdaterats, men kunde inte skriva filen\n"
+"new_index. Kontrollera att disken inte är full och\n"
+"att kvoten inte har överskridits, och kör sedan\n"
+"\"git reset HEAD\" för att återställa."
+
+#: builtin/describe.c:205
+#, c-format
+msgid "annotated tag %s not available"
+msgstr "den dekorerade taggen %s inte tillgänglig"
+
+#: builtin/describe.c:209
+#, c-format
+msgid "annotated tag %s has no embedded name"
+msgstr "den dekorerade taggen %s har inget inbäddat namn"
+
+#: builtin/describe.c:211
+#, c-format
+msgid "tag '%s' is really '%s' here"
+msgstr "taggen \"%s\" är i verkligheten \"%s\" här"
+
+#: builtin/describe.c:238
+#, c-format
+msgid "Not a valid object name %s"
+msgstr "Objektnamnet är inte giltigt: %s"
+
+#: builtin/describe.c:241
+#, c-format
+msgid "%s is not a valid '%s' object"
+msgstr "%s är inte ett giltigt \"%s\"-objekt"
+
+#: builtin/describe.c:258
+#, c-format
+msgid "no tag exactly matches '%s'"
+msgstr "ingen tagg motsvarar \"%s\" exakt"
+
+#: builtin/describe.c:260
+#, c-format
+msgid "searching to describe %s\n"
+msgstr "söker för att beskriva %s\n"
+
+#: builtin/describe.c:295
+#, c-format
+msgid "finished search at %s\n"
+msgstr "avslutade sökning på %s\n"
+
+#: builtin/describe.c:319
+#, c-format
+msgid ""
+"No annotated tags can describe '%s'.\n"
+"However, there were unannotated tags: try --tags."
+msgstr ""
+"Inga dekorerade taggar kan beskriva \"%s\".\n"
+"Det finns dock odekorerade taggar: testa --tags."
+
+#: builtin/describe.c:323
+#, c-format
+msgid ""
+"No tags can describe '%s'.\n"
+"Try --always, or create some tags."
+msgstr ""
+"Inga taggar kan beskriva \"%s\".\n"
+"Testa --always, eller skapa några taggar."
+
+#: builtin/describe.c:344
+#, c-format
+msgid "traversed %lu commits\n"
+msgstr "traverserade %lu incheckningar\n"
+
+#: builtin/describe.c:347
+#, c-format
+msgid ""
+"more than %i tags found; listed %i most recent\n"
+"gave up search at %s\n"
+msgstr ""
+"mer än %i taggar hittades; listar de %i senaste\n"
+"gav upp sökningen vid %s\n"
+
+#: builtin/describe.c:398
+msgid "--long is incompatible with --abbrev=0"
+msgstr "--long är inkompatibel med --abbrev=0"
+
+#: builtin/describe.c:423
+msgid "No names found, cannot describe anything."
+msgstr "Inga namn hittades, kan inte beskriva något."
+
+#: builtin/describe.c:430
+msgid "--dirty is incompatible with committishes"
+msgstr "--dirty är inkompatibelt med \"committish\"-värden"
+
+#: builtin/diff.c:76
+#, c-format
+msgid "'%s': not a regular file or symlink"
+msgstr "\"%s\": inte en normal fil eller symbolisk länk"
+
+#: builtin/diff.c:225
+#, c-format
+msgid "invalid option: %s"
+msgstr "ogiltig flagga: %s"
+
+#: builtin/diff.c:302
+msgid "Not a git repository"
+msgstr "Inte ett git-arkiv"
+
+#: builtin/diff.c:334
+msgid "No HEAD commit to compare with (yet)"
+msgstr "Ingen HEAD-incheckning att jämföra med (ännu)"
+
+#: builtin/diff.c:349
+#, c-format
+msgid "invalid object '%s' given."
+msgstr "objektet \"%s\" som angavs är felaktigt."
+
+#: builtin/diff.c:354
+#, c-format
+msgid "more than %d trees given: '%s'"
+msgstr "mer än %d träd angavs: \"%s\""
+
+#: builtin/diff.c:364
+#, c-format
+msgid "more than two blobs given: '%s'"
+msgstr "mer än två blobbar angavs: \"%s\""
+
+#: builtin/diff.c:372
+#, c-format
+msgid "unhandled object '%s' given."
+msgstr "ej hanterat objekt \"%s\" angavs."
+
+#: builtin/fetch.c:175
+msgid "Couldn't find remote ref HEAD"
+msgstr "Kunde inte hitta fjärr-referensen HEAD"
+
+#: builtin/fetch.c:228
+#, c-format
+msgid "object %s not found"
+msgstr "objektet %s hittades inte"
+
+#: builtin/fetch.c:233
+msgid "[up to date]"
+msgstr "[àjour]"
+
+#.
+#. * If this is the head, and it's not okay to update
+#. * the head, and the old value of the head isn't empty...
+#.
+#: builtin/fetch.c:246
+#, c-format
+msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
+msgstr "! %-*s %-*s -> %s (kan inte hämta i aktuell gren)"
+
+#: builtin/fetch.c:247 builtin/fetch.c:309
+msgid "[rejected]"
+msgstr "[refuserad]"
+
+#: builtin/fetch.c:257
+msgid "[tag update]"
+msgstr "[uppdaterad tagg]"
+
+#: builtin/fetch.c:258 builtin/fetch.c:280 builtin/fetch.c:293
+msgid " (unable to update local ref)"
+msgstr " (kunde inte uppdatera lokal ref)"
+
+#: builtin/fetch.c:270
+msgid "[new tag]"
+msgstr "[ny tagg]"
+
+#: builtin/fetch.c:274
+msgid "[new branch]"
+msgstr "[ny gren]"
+
+#: builtin/fetch.c:305
+msgid "unable to update local ref"
+msgstr "kunde inte uppdatera lokal ref"
+
+#: builtin/fetch.c:305
+msgid "forced update"
+msgstr "tvingad uppdatering"
+
+#: builtin/fetch.c:310
+msgid "(non-fast-forward)"
+msgstr "(ej snabbspolad)"
+
+#: builtin/fetch.c:328 builtin/fetch.c:651
+#, c-format
+msgid "cannot open %s: %s\n"
+msgstr "kan inte öppna %s. %s\n"
+
+#: builtin/fetch.c:406
+#, c-format
+msgid "From %.*s\n"
+msgstr "Från %.*s\n"
+
+#: builtin/fetch.c:417
+#, 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ågra lokala referenser kunde inte uppdateras; testa att köra\n"
+" \"git remote prune %s\" för att ta bort gamla grenar som står i konflikt"
+
+#: builtin/fetch.c:467
+msgid "could not run rev-list"
+msgstr "kunde inte köra rev-list"
+
+#: builtin/fetch.c:481
+#, c-format
+msgid "failed write to rev-list: %s"
+msgstr "kunde inte skriva till rev-list: %s"
+
+#: builtin/fetch.c:488
+#, c-format
+msgid "failed to close rev-list's stdin: %s"
+msgstr "kunde inte stänga rev-list:s standard in: %s"
+
+#: builtin/fetch.c:515
+#, c-format
+msgid " (%s will become dangling)\n"
+msgstr " (%s kommer bli dinglande)\n"
+
+#: builtin/fetch.c:516
+#, c-format
+msgid " (%s has become dangling)\n"
+msgstr " (%s har blivit dinglande)\n"
+
+#: builtin/fetch.c:523
+msgid "[deleted]"
+msgstr "[borttagen]"
+
+#: builtin/fetch.c:524
+msgid "(none)"
+msgstr "(ingen)"
+
+#: builtin/fetch.c:641
+#, c-format
+msgid "Refusing to fetch into current branch %s of non-bare repository"
+msgstr "Vägrar hämta till aktuell gren %s i ett icke-naket arkiv"
+
+#: builtin/fetch.c:675
+#, c-format
+msgid "Don't know how to fetch from %s"
+msgstr "Vet inte hur man hämtar från %s"
+
+#: builtin/fetch.c:729
+#, c-format
+msgid "Option \"%s\" value \"%s\" is not valid for %s"
+msgstr "Flaggan \"%s\" och värdet \"%s\" är inte giltigt för %s"
+
+#: builtin/fetch.c:732
+#, c-format
+msgid "Option \"%s\" is ignored for %s\n"
+msgstr "Flaggan \"%s\" ignoreras för %s\n"
+
+#: builtin/fetch.c:821
+#, c-format
+msgid "Fetching %s\n"
+msgstr "Hämtar %s\n"
+
+#: builtin/fetch.c:823
+#, c-format
+msgid "Could not fetch %s"
+msgstr "Kunde inte hämta %s"
+
+#: builtin/fetch.c:839
+msgid ""
+"No remote repository specified. Please, specify either a URL or a\n"
+"remote name from which new revisions should be fetched."
+msgstr ""
+"Inget fjärrarkiv angavs. Ange antingen en URL eller namnet på ett\n"
+"fjärrarkiv som nya incheckningar skall hämtas från."
+
+#: builtin/fetch.c:859
+msgid "You need to specify a tag name."
+msgstr "Du måste ange namnet på en tagg."
+
+#: builtin/fetch.c:899
+msgid "fetch --all does not take a repository argument"
+msgstr "fetch --all tar inte namnet på ett arkiv som argument"
+
+#: builtin/fetch.c:901
+msgid "fetch --all does not make sense with refspecs"
+msgstr "fetch --all kan inte anges med referensspecifikationer"
+
+#: builtin/fetch.c:912
+#, c-format
+msgid "No such remote or remote group: %s"
+msgstr "Fjärren eller fjärrgruppen finns inte: %s"
+
+#: builtin/fetch.c:920
+msgid "Fetching a group and specifying refspecs does not make sense"
+msgstr "Kan inte hämta från grupp och ange referensspecifikationer"
+
+#: builtin/gc.c:63
+#, c-format
+msgid "Invalid %s: '%s'"
+msgstr "Felaktigt %s: \"%s\""
+
+#: builtin/gc.c:78
+msgid "Too many options specified"
+msgstr "För många flaggor angavs"
+
+#: builtin/gc.c:103
+#, c-format
+msgid "insanely long object directory %.*s"
+msgstr "tokigt lång objektkatalog %.*s"
+
+#: builtin/gc.c:220
+#, c-format
+msgid "Auto packing the repository for optimum performance.\n"
+msgstr "Packar arkivet automatiskt för optimal prestanda.\n"
+
+#: builtin/gc.c:223
+#, c-format
+msgid ""
+"Auto packing the repository for optimum performance. You may also\n"
+"run \"git gc\" manually. See \"git help gc\" for more information."
+msgstr ""
+"Packar arkivet automatiskt för optimal prestanda. Du kan även\n"
+"köra \"git gc\" manuellt. Se \"git help gc\" för mer information."
+
+#: builtin/gc.c:251
+msgid ""
+"There are too many unreachable loose objects; run 'git prune' to remove them."
+msgstr ""
+"Det finns för många onåbara lösa objekt; kör \"git prune\" för att ta bort "
+"dem."
+
+#: builtin/grep.c:252
+#, c-format
+msgid "grep: failed to create thread: %s"
+msgstr "grep: misslyckades skapa tråd. %s"
+
+#: builtin/grep.c:457
+#, c-format
+msgid "'%s': unable to read %s"
+msgstr "\"%s\" kunde inte läsa %s"
+
+#: builtin/grep.c:508
+#, c-format
+msgid "'%s': %s"
+msgstr "\"%s\": %s"
+
+#: builtin/grep.c:519
+#, c-format
+msgid "'%s': short read %s"
+msgstr "\"%s\": kort läsning %s"
+
+#: builtin/grep.c:581
+#, c-format
+msgid "Failed to chdir: %s"
+msgstr "Kunde inte byta katalog (chdir): %s"
+
+#: builtin/grep.c:671 builtin/grep.c:697
+#, c-format
+msgid "unable to read tree (%s)"
+msgstr "kunde inte läsa träd (%s)"
+
+#: builtin/grep.c:703
+#, c-format
+msgid "unable to grep from object of type %s"
+msgstr "Kunde inte \"grep\" från objekt av typen %s"
+
+#: builtin/grep.c:755
+#, c-format
+msgid "switch `%c' expects a numerical value"
+msgstr "flaggan \"%c\" antar ett numeriskt värde"
+
+#: builtin/grep.c:771
+#, c-format
+msgid "cannot open '%s'"
+msgstr "kan inte öppna \"%s\""
+
+#: builtin/grep.c:1012
+msgid "no pattern given."
+msgstr "inget mönster angavs."
+
+#: builtin/grep.c:1016
+msgid "cannot mix --fixed-strings and regexp"
+msgstr "kan inte blanda --fixed-strings och reguljära uttryck"
+
+#: builtin/grep.c:1041
+#, c-format
+msgid "bad object %s"
+msgstr "felaktigt objekt %s"
+
+#: builtin/grep.c:1068
+msgid "--open-files-in-pager only works on the worktree"
+msgstr "--open-files-in-pager fungerar endast i arbetskatalogen"
+
+#: builtin/grep.c:1093
+msgid "--cached cannot be used with --no-index."
+msgstr "--cached kan inte användas med --no-index."
+
+#: builtin/grep.c:1095
+msgid "--no-index cannot be used with revs."
+msgstr "--no-index kan inte användas med revisioner."
+
+#: builtin/grep.c:1104
+msgid "both --cached and trees are given."
+msgstr "både --cached och träd angavs."
+
+#: builtin/init-db.c:34
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Kunde inte göra %s skrivbar för grubben"
+
+#: builtin/init-db.c:61
+#, c-format
+msgid "insanely long template name %s"
+msgstr "tokigt långt namn på mallen %s"
+
+#: builtin/init-db.c:66
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "kan inte ta status på \"%s\""
+
+#: builtin/init-db.c:72
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "kan inte ta status på mallen \"%s\""
+
+#: builtin/init-db.c:79
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "kan inte öppna katalogen (opendir) \"%s\""
+
+#: builtin/init-db.c:96
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "kan inte läsa länk (readlink) \"%s\""
+
+#: builtin/init-db.c:98
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "tokigt lång symbolisk länk %s"
+
+#: builtin/init-db.c:101
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "kan inte skapa symbolisk länk \"%s\" \"%s\""
+
+#: builtin/init-db.c:105
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "kan inte kopiera \"%s\" till \"%s\""
+
+#: builtin/init-db.c:109
+#, c-format
+msgid "ignoring template %s"
+msgstr "ignorerar mallen %s"
+
+#: builtin/init-db.c:132
+#, c-format
+msgid "insanely long template path %s"
+msgstr "tokigt lång mallsökväg %s"
+
+#: builtin/init-db.c:140
+#, c-format
+msgid "templates not found %s"
+msgstr "mallarna hittades inte %s"
+
+#: builtin/init-db.c:153
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr "kopierade inte mallar från felaktig formatversion %d från \"%s\""
+
+#: builtin/init-db.c:191
+#, c-format
+msgid "insane git directory %s"
+msgstr "tokig git-katalog %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#: builtin/init-db.c:355
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr "%s%s Git-arkiv i %s%s\n"
+
+#: builtin/init-db.c:356
+msgid "Reinitialized existing"
+msgstr "Ominitierade befintligt"
+
+#: builtin/init-db.c:356
+msgid "Initialized empty"
+msgstr "Initierade tomt"
+
+#: builtin/init-db.c:357
+msgid " shared"
+msgstr " delat"
+
+#: builtin/init-db.c:376
+msgid "cannot tell cwd"
+msgstr "kan inte läsa aktuell katalog (cwd)"
+
+#: builtin/init-db.c:450 builtin/init-db.c:457
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "kan inte skapa katalogen (mkdir) %s"
+
+#: builtin/init-db.c:461
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "kan inte byta katalog (chdir) till %s"
+
+#: builtin/init-db.c:483
+#, c-format
+msgid ""
+"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
+"dir=<directory>)"
+msgstr ""
+"%s (eller --work-tree=<katalog>) inte tillåtet utan att ange %s (eller --git-"
+"dir=<katalog>)"
+
+#: builtin/init-db.c:509
+msgid "Cannot access current working directory"
+msgstr "Kan inte komma åt aktuell arbetskatalog"
+
+#: builtin/init-db.c:512
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Kan inte komma åt arbetskatalogen \"%s\""
+
+#: builtin/log.c:104
+#, c-format
+msgid "invalid --decorate option: %s"
+msgstr "felaktigt värde till --decorate: %s"
+
+#: builtin/log.c:113 builtin/log.c:1138 builtin/shortlog.c:287
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "okänt argument: %s"
+
+#: builtin/log.c:156
+#, c-format
+msgid "Final output: %d %s\n"
+msgstr "Slututdata: %d %s\n"
+
+#: builtin/log.c:255 builtin/log.c:674 builtin/log.c:1222 builtin/log.c:1428
+#: builtin/merge.c:310 builtin/revert.c:556 builtin/shortlog.c:184
+msgid "revision walk setup failed"
+msgstr "misslyckades skapa revisionstraversering"
+
+#: builtin/log.c:347 builtin/log.c:434
+#, c-format
+msgid "Could not read object %s"
+msgstr "Kunde inte läsa objektet %s"
+
+#: builtin/log.c:458
+#, c-format
+msgid "Unknown type: %d"
+msgstr "Okänd typ: %d"
+
+#: builtin/log.c:558
+msgid "format.headers without value"
+msgstr "format.headers utan värde"
+
+#: builtin/log.c:630
+msgid "name of output directory is too long"
+msgstr "namn på utdatakatalogen är för lång"
+
+#: builtin/log.c:641
+#, c-format
+msgid "Cannot open patch file %s"
+msgstr "Kan inte öppna patchfilen %s"
+
+#: builtin/log.c:655
+msgid "Need exactly one range."
+msgstr "Behöver precis ett intervall."
+
+#: builtin/log.c:663
+msgid "Not a range."
+msgstr "Inte ett intervall."
+
+#: builtin/log.c:700
+msgid "Could not extract email from committer identity."
+msgstr "Kunde inte extrahera e-postadress från incheckarens identitet."
+
+#: builtin/log.c:732
+msgid "Cover letter needs email format"
+msgstr "Omslagsbrevet behöver e-postformat"
+
+#: builtin/log.c:825
+#, c-format
+msgid "insane in-reply-to: %s"
+msgstr "tokigt in-reply-to: %s"
+
+#: builtin/log.c:898
+msgid "Two output directories?"
+msgstr "Två utdatakataloger?"
+
+#: builtin/log.c:1087
+#, c-format
+msgid "bogus committer info %s"
+msgstr "felaktig incheckarinformation %s"
+
+#: builtin/log.c:1132
+msgid "-n and -k are mutually exclusive."
+msgstr "-n och -k kan inte användas samtidigt."
+
+#: builtin/log.c:1134
+msgid "--subject-prefix and -k are mutually exclusive."
+msgstr "--subject-prefix och -k kan inte användas samtidigt."
+
+#: builtin/log.c:1141
+msgid "--name-only does not make sense"
+msgstr "kan inte använda --name-only"
+
+#: builtin/log.c:1143
+msgid "--name-status does not make sense"
+msgstr "kan inte använda --name-status"
+
+#: builtin/log.c:1145
+msgid "--check does not make sense"
+msgstr "kan inte använda --check"
+
+#: builtin/log.c:1166
+msgid "standard output, or directory, which one?"
+msgstr "standard ut, eller katalog, vilken skall det vara?"
+
+#: builtin/log.c:1168
+#, c-format
+msgid "Could not create directory '%s'"
+msgstr "Kunde inte skapa katalogen \"%s\""
+
+#: builtin/log.c:1307
+msgid "Failed to create output files"
+msgstr "Misslyckades skapa utdatafiler"
+
+#: builtin/log.c:1394
+#, c-format
+msgid ""
+"Could not find a tracked remote branch, please specify <upstream> manually.\n"
+msgstr "Kunde inte hitta en spårad fjärrgren, ange <uppström> manuellt.\n"
+
+#: builtin/log.c:1410 builtin/log.c:1412 builtin/log.c:1424
+#, c-format
+msgid "Unknown commit %s"
+msgstr "Okänd incheckning %s"
+
+#: builtin/merge.c:82
+msgid "switch `m' requires a value"
+msgstr "flaggan \"m\" behöver ett värde"
+
+#: builtin/merge.c:119
+#, c-format
+msgid "Could not find merge strategy '%s'.\n"
+msgstr "Kunde inte hitta sammanslagningsstrategin \"%s\".\n"
+
+#: builtin/merge.c:120
+#, c-format
+msgid "Available strategies are:"
+msgstr "Tillgängliga strategier är:"
+
+#: builtin/merge.c:125
+#, c-format
+msgid "Available custom strategies are:"
+msgstr "Tillgängliga skräddarsydda strategier är:"
+
+#: builtin/merge.c:223
+msgid "could not run stash."
+msgstr "kunde köra stash."
+
+#: builtin/merge.c:228
+msgid "stash failed"
+msgstr "stash misslyckades"
+
+#: builtin/merge.c:233
+#, c-format
+msgid "not a valid object: %s"
+msgstr "inte ett giltigt objekt: %s"
+
+#: builtin/merge.c:250
+msgid "read-tree failed"
+msgstr "read-tree misslyckades"
+
+#: builtin/merge.c:279
+msgid " (nothing to squash)"
+msgstr " (inget att platta till)"
+
+#: builtin/merge.c:292
+#, c-format
+msgid "Squash commit -- not updating HEAD\n"
+msgstr "Tillplattningsincheckning -- uppdaterar inte HEAD\n"
+
+#: builtin/merge.c:295 builtin/merge.c:1290 builtin/merge.c:1299
+#: builtin/merge.c:1309
+#, c-format
+msgid "Could not write to '%s'"
+msgstr "Kunde inte skriva till \"%s\""
+
+#: builtin/merge.c:323
+msgid "Writing SQUASH_MSG"
+msgstr "Skriver SQUASH_MSG"
+
+#: builtin/merge.c:325
+msgid "Finishing SQUASH_MSG"
+msgstr "Avslutar SQUASH_MSG"
+
+#: builtin/merge.c:345
+#, c-format
+msgid "No merge message -- not updating HEAD\n"
+msgstr "Inget sammanslagningsmeddelande -- uppdaterar inte HEAD\n"
+
+#: builtin/merge.c:396
+#, c-format
+msgid "'%s' does not point to a commit"
+msgstr "\"%s\" verkar inte peka på en incheckning"
+
+#: builtin/merge.c:491
+#, c-format
+msgid "Bad branch.%s.mergeoptions string: %s"
+msgstr "Felaktig branch.%s.mergeoptions-sträng: %s"
+
+#: builtin/merge.c:553
+msgid "git write-tree failed to write a tree"
+msgstr "git write--tree misslyckades skriva ett träd"
+
+#: builtin/merge.c:594
+msgid "failed to read the cache"
+msgstr "misslyckads läsa cachen"
+
+#: builtin/merge.c:611
+msgid "Unable to write index."
+msgstr "Kunde inte skriva indexet."
+
+#: builtin/merge.c:624
+msgid "Not handling anything other than two heads merge."
+msgstr "Hanterar inte något annat än en sammanslagning av två huvuden."
+
+#: builtin/merge.c:651
+#, c-format
+msgid "Unknown option for merge-recursive: -X%s"
+msgstr "Felaktig flagga för merge-recursive: -X%s"
+
+#: builtin/merge.c:666
+#, c-format
+msgid "unable to write %s"
+msgstr "kunde inte skriva %s"
+
+#: builtin/merge.c:791
+#, c-format
+msgid "Wonderful.\n"
+msgstr "Underbart.\n"
+
+#: builtin/merge.c:840 builtin/merge.c:1287 builtin/merge.c:1295
+#: builtin/merge.c:1303
+#, c-format
+msgid "Could not open '%s' for writing"
+msgstr "Kunde inte öppna \"%s\" för skrivning"
+
+#: builtin/merge.c:856
+#, c-format
+msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
+msgstr ""
+"Kunde inte slå ihop automatiskt; fixa konflikter och checka in resultatet.\n"
+
+#: builtin/merge.c:871
+#, c-format
+msgid "'%s' is not a commit"
+msgstr "\"%s\" är inte en incheckning"
+
+#: builtin/merge.c:921 git-pull.sh:31
+msgid ""
+"You have not concluded your merge (MERGE_HEAD exists).\n"
+"Please, commit your changes before you can merge."
+msgstr ""
+"Du har inte avslutat sammanslagningen (MERGE_HEAD finns).\n"
+"Checka in dina ändringar innan du kan slå ihop."
+
+#: builtin/merge.c:924 git-pull.sh:34
+msgid "You have not concluded your merge (MERGE_HEAD exists)."
+msgstr "Du har inte avslutat sammanslagningen (MERGE_HEAD finns)."
+
+#: builtin/merge.c:951
+msgid "You cannot combine --squash with --no-ff."
+msgstr "Du kan inte kombinera --squash med --no-ff."
+
+#: builtin/merge.c:956
+msgid "You cannot combine --no-ff with --ff-only."
+msgstr "Du kan inte kombinera --no-ff med --ff-only."
+
+#: builtin/merge.c:984
+msgid "Can merge only exactly one commit into empty head"
+msgstr "Kan endast slå ihop en enda incheckning i ett tomt huvud."
+
+#: builtin/merge.c:987
+msgid "Squash commit into empty head not supported yet"
+msgstr "Stöder inte en tillplattningsincheckning på ett tomt huvud ännu"
+
+#: builtin/merge.c:989
+msgid "Non-fast-forward commit does not make sense into an empty head"
+msgstr "Icke-snabbspolad incheckning kan inte användas med ett tomt huvud"
+
+#: builtin/merge.c:993 builtin/merge.c:1041
+#, c-format
+msgid "%s - not something we can merge"
+msgstr "%s - inte något vi kan slå ihop"
+
+#: builtin/merge.c:1099
+#, c-format
+msgid "Updating %s..%s\n"
+msgstr "Uppdaterar %s..%s\n"
+
+#: builtin/merge.c:1133
+#, c-format
+msgid "Trying really trivial in-index merge...\n"
+msgstr "Försöker riktigt enkel sammanslagning i indexet...\n"
+
+#: builtin/merge.c:1137
+#, c-format
+msgid "Nope.\n"
+msgstr "Nej.\n"
+
+#: builtin/merge.c:1170
+msgid "Not possible to fast-forward, aborting."
+msgstr "Kan inte snabbspola, avbryter."
+
+#: builtin/merge.c:1196 builtin/merge.c:1269
+#, c-format
+msgid "Rewinding the tree to pristine...\n"
+msgstr "Återspolar trädet till ofördärvat...\n"
+
+#: builtin/merge.c:1200
+#, c-format
+msgid "Trying merge strategy %s...\n"
+msgstr "Försöker sammanslagninsstrategin %s...\n"
+
+#: builtin/merge.c:1261
+#, c-format
+msgid "No merge strategy handled the merge.\n"
+msgstr "Ingen sammanslagningsstrategi hanterade sammanslagningen.\n"
+
+#: builtin/merge.c:1263
+#, c-format
+msgid "Merge with strategy %s failed.\n"
+msgstr "Sammanslaning med strategin %s misslyckades.\n"
+
+#: builtin/merge.c:1271
+#, c-format
+msgid "Using the %s to prepare resolving by hand.\n"
+msgstr "Använder %s för att förbereda lösning för hand.\n"
+
+#: builtin/merge.c:1314
+#, c-format
+msgid "Automatic merge went well; stopped before committing as requested\n"
+msgstr ""
+"Automatisk sammanslagning lyckades; stoppar före incheckning som önskat\n"
+
+#: builtin/mv.c:103
+#, c-format
+msgid "Checking rename of '%s' to '%s'\n"
+msgstr "Kontrollerar namnbyte av \"%s\" till \"%s\"\n"
+
+#: builtin/mv.c:107
+msgid "bad source"
+msgstr "felaktig källa"
+
+#: builtin/mv.c:110
+msgid "can not move directory into itself"
+msgstr "kan inte flytta katalog till sig själv"
+
+#: builtin/mv.c:113
+msgid "cannot move directory over file"
+msgstr "kan inte flytta katalog över fil"
+
+#: builtin/mv.c:123
+#, c-format
+msgid "Huh? %.*s is in index?"
+msgstr "Vad? %.*s är i indexet?"
+
+#: builtin/mv.c:135
+msgid "source directory is empty"
+msgstr "källkatalogen är tom"
+
+#: builtin/mv.c:166
+msgid "not under version control"
+msgstr "inte versionshanterad"
+
+#: builtin/mv.c:168
+msgid "destination exists"
+msgstr "destinationen finns"
+
+#: builtin/mv.c:175
+#, c-format
+msgid "%s; will overwrite!"
+msgstr "%s; kommer skriva över!"
+
+#: builtin/mv.c:178
+msgid "Cannot overwrite"
+msgstr "Kan inte skriva över"
+
+#: builtin/mv.c:181
+msgid "multiple sources for the same target"
+msgstr "flera källor för samma mål"
+
+#: builtin/mv.c:196
+#, c-format
+msgid "%s, source=%s, destination=%s"
+msgstr "%s, källa=%s, mål=%s"
+
+#: builtin/mv.c:206
+#, c-format
+msgid "Renaming %s to %s\n"
+msgstr "Byter namn på %s till %s\n"
+
+#: builtin/mv.c:209
+#, c-format
+msgid "renaming '%s' failed"
+msgstr "misslyckades byta namn på \"%s\""
+
+#: builtin/notes.c:122
+#, c-format
+msgid "unable to start 'show' for object '%s'"
+msgstr "kunde int estarta \"show\" för objektet \"%s\""
+
+#: builtin/notes.c:128
+msgid "can't fdopen 'show' output fd"
+msgstr "kunde inte öppna (fdopen) \"show\"-utdata-filhandtag"
+
+#: builtin/notes.c:138
+#, c-format
+msgid "failed to close pipe to 'show' for object '%s'"
+msgstr "kunde inte stänga röret till \"show\" för objektet \"%s\""
+
+#: builtin/notes.c:141
+#, c-format
+msgid "failed to finish 'show' for object '%s'"
+msgstr "kunde inte avsluta \"show\" för objektet \"%s\""
+
+#: builtin/notes.c:158 builtin/tag.c:311
+#, c-format
+msgid "could not create file '%s'"
+msgstr "kunde inte skapa filen \"%s\""
+
+#: builtin/notes.c:172
+msgid "Please supply the note contents using either -m or -F option"
+msgstr "Ange innehåll för anteckningen med antingen -m eller -F"
+
+#: builtin/notes.c:193 builtin/notes.c:797
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr "Tar bort anteckning för objektet %s\n"
+
+#: builtin/notes.c:198
+msgid "unable to write note object"
+msgstr "kunde inte skriva anteckningsobjekt"
+
+#: builtin/notes.c:200
+#, c-format
+msgid "The note contents has been left in %s"
+msgstr "Anteckningens innehåll har lämnats kvar i %s"
+
+#: builtin/notes.c:234 builtin/tag.c:445
+#, c-format
+msgid "cannot read '%s'"
+msgstr "kunde inte läsa \"%s\""
+
+#: builtin/notes.c:236 builtin/tag.c:448
+#, c-format
+msgid "could not open or read '%s'"
+msgstr "kunde inte öppna eller läsa \"%s\""
+
+#: builtin/notes.c:255 builtin/notes.c:444 builtin/notes.c:446
+#: builtin/notes.c:508 builtin/notes.c:560 builtin/notes.c:631
+#: builtin/notes.c:636 builtin/notes.c:710 builtin/notes.c:752
+#: builtin/notes.c:789 builtin/reset.c:303 builtin/tag.c:461
+#, c-format
+msgid "Failed to resolve '%s' as a valid ref."
+msgstr "Kunde inte slå upp \"%s\" som en giltig referens."
+
+#: builtin/notes.c:258
+#, c-format
+msgid "Failed to read object '%s'."
+msgstr "Kunde inte läsa objektet \"%s\"."
+
+#: builtin/notes.c:283
+msgid "Cannot commit uninitialized/unreferenced notes tree"
+msgstr "Kan inte checka in oinitierat/orefererat anteckningsträd"
+
+#: builtin/notes.c:295
+msgid "Failed to write current notes tree to database"
+msgstr "Kunde inte skriva aktuellt anteckningsträd till databasen"
+
+#: builtin/notes.c:307
+msgid "Failed to commit notes tree to database"
+msgstr "Kunde inte checka in anteckningsträd i databasen"
+
+#: builtin/notes.c:339
+#, c-format
+msgid "Bad notes.rewriteMode value: '%s'"
+msgstr "Felaktigt värde för notes.rewriteMode: '%s'"
+
+#: builtin/notes.c:349
+#, c-format
+msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
+msgstr "Vägrar skriva över anteckningar i %s (utanför refs/notes/)"
+
+#. TRANSLATORS: The first %s is the name of the
+#. environment variable, the second %s is its value
+#: builtin/notes.c:376
+#, c-format
+msgid "Bad %s value: '%s'"
+msgstr "Felaktigt värde på %s: \"%s\""
+
+#: builtin/notes.c:440
+#, c-format
+msgid "Malformed input line: '%s'."
+msgstr "Felaktig indatarad: \"%s\"."
+
+#: builtin/notes.c:455
+#, c-format
+msgid "Failed to copy notes from '%s' to '%s'"
+msgstr "Misslyckades kopiera anteckningar från \"%s\" till \"%s\""
+
+# FIXME: Untranslatable!
+#
+#. TRANSLATORS: The first %s is one of "git notes ACTION",
+#. e.g. "add", "copy", "append" etc.
+#: builtin/notes.c:481
+#, c-format
+msgid "Refusing to %s notes in %s (outside of refs/notes/)"
+msgstr "Vägrar %s anteckningar i %s (utanför refs/notes/)"
+
+#: builtin/notes.c:501 builtin/notes.c:553 builtin/notes.c:614
+#: builtin/notes.c:626 builtin/notes.c:698 builtin/notes.c:745
+#: builtin/notes.c:782 builtin/notes.c:821
+msgid "too many parameters"
+msgstr "för många parametrar"
+
+#: builtin/notes.c:505
+msgid "list"
+msgstr "list"
+
+#: builtin/notes.c:514 builtin/notes.c:758
+#, c-format
+msgid "No note found for object %s."
+msgstr "Inga anteckningar hittades för objektet %s."
+
+#: builtin/notes.c:562
+msgid "add"
+msgstr "add"
+
+#: builtin/notes.c:567
+#, c-format
+msgid ""
+"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Kan inte lägga till anteckningar. Hittade befintliga anteckningar för "
+"objektet %s. Använd \"-f\" för att skriva över befintliga anteckningar"
+
+#: builtin/notes.c:572 builtin/notes.c:649
+#, c-format
+msgid "Overwriting existing notes for object %s\n"
+msgstr "Skriver över befintliga anteckningar för objektet %s\n"
+
+#: builtin/notes.c:622
+msgid "too few parameters"
+msgstr "för få parametrar"
+
+#: builtin/notes.c:638
+msgid "copy"
+msgstr "copy"
+
+#: builtin/notes.c:643
+#, c-format
+msgid ""
+"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
+"existing notes"
+msgstr ""
+"Kan inte kopiera anteckningar. Hittade befintliga anteckningar för objektet "
+"%s. Använd \"-f\" för att skriva över befintliga anteckningar"
+
+#: builtin/notes.c:655
+#, c-format
+msgid "Missing notes on source object %s. Cannot copy."
+msgstr "Anteckningar på källobjektet %s saknas. Kan inte kopiera."
+
+#: builtin/notes.c:703
+#, 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 ""
+"Flaggorna -m/-F/-c/-C rekommenderas inte för underkommandot \"edit\".\n"
+"Använd \"git notes add -f -m/-F/-c/-C\" istället.\n"
+
+#: builtin/notes.c:754
+msgid "show"
+msgstr "show"
+
+#: builtin/notes.c:791
+msgid "remove"
+msgstr "remove"
+
+#: builtin/notes.c:795
+#, c-format
+msgid "Object %s has no note\n"
+msgstr "Objektet %s har ingen anteckning\n"
+
+#: builtin/notes.c:825
+msgid "prune"
+msgstr "prune"
+
+#: builtin/notes.c:877
+#, c-format
+msgid "Unknown subcommand: %s"
+msgstr "Okänt underkommando: %s"
+
+#: builtin/push.c:43
+msgid "tag shorthand without <tag>"
+msgstr "taggförkortning utan <tagg>"
+
+#: builtin/push.c:62
+msgid "--delete only accepts plain target ref names"
+msgstr "--delete godtar endast enkla målreferensnamn"
+
+#: builtin/push.c:72
+msgid "You are not currently on a branch."
+msgstr "Du är inte på någon gren för närvarande."
+
+#: builtin/push.c:74
+#, c-format
+msgid "The current branch %s is not tracking anything."
+msgstr "Den aktuella grenen %s spårar ingenting."
+
+#: builtin/push.c:77
+#, c-format
+msgid "The current branch %s is tracking multiple branches, refusing to push."
+msgstr "Den aktuella grenen %s spårar flera grenar, vägrar sända."
+
+#: builtin/push.c:100
+msgid ""
+"You didn't specify any refspecs to push, and push.default is \"nothing\"."
+msgstr ""
+"Du angav inga referensspecifikationer att sända, och push.default är "
+"\"nothing\"."
+
+#: builtin/push.c:120
+#, c-format
+msgid "Pushing to %s\n"
+msgstr "Sänder till %s\n"
+
+#: builtin/push.c:124
+#, c-format
+msgid "failed to push some refs to '%s'"
+msgstr "misslyckades sända några referenser till \"%s\""
+
+#: builtin/push.c:132
+#, c-format
+msgid ""
+"To prevent you from losing history, non-fast-forward updates were rejected\n"
+"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
+"'Note about fast-forwards' section of 'git push --help' for details.\n"
+msgstr ""
+"För att förhindra att du tappar historik har icke snabbspolande "
+"uppdateringar\n"
+"avvisats. Slå ihop fjärrändringarna (t.ex \"git pull\") innan du sänder "
+"igen.\n"
+"Se avsnittet \"Note about fast-forward\" i \"git push --help\" för "
+"detaljer.\n"
+
+#: builtin/push.c:149
+#, c-format
+msgid "bad repository '%s'"
+msgstr "felaktigt arkiv \"%s\""
+
+#: builtin/push.c:150
+msgid "No destination configured to push to."
+msgstr "Har inte ställt in någon destination att sända till."
+
+#: builtin/push.c:158
+msgid "--all and --tags are incompatible"
+msgstr "--all och --tags är inkompatibla"
+
+#: builtin/push.c:159
+msgid "--all can't be combined with refspecs"
+msgstr "--all kan inte kombineras med referensspecifikationer"
+
+#: builtin/push.c:164
+msgid "--mirror and --tags are incompatible"
+msgstr "--mirror och --tags är inkompatibla"
+
+#: builtin/push.c:165
+msgid "--mirror can't be combined with refspecs"
+msgstr "--mirror kan inte kombineras med referensspecifikationer"
+
+#: builtin/push.c:170
+msgid "--all and --mirror are incompatible"
+msgstr "--all och --mirror är inkompatibla"
+
+#: builtin/push.c:235
+msgid "--delete is incompatible with --all, --mirror and --tags"
+msgstr "--delete är imkompatibel med --all, --mirror och --tags"
+
+#: builtin/push.c:237
+msgid "--delete doesn't make sense without any refs"
+msgstr "--delete kan inte användas utan referenser"
+
+#: builtin/reset.c:33
+msgid "mixed"
+msgstr "blandad"
+
+#: builtin/reset.c:33
+msgid "soft"
+msgstr "mjuk"
+
+#: builtin/reset.c:33
+msgid "hard"
+msgstr "hård"
+
+#: builtin/reset.c:33
+msgid "merge"
+msgstr "sammanslagning"
+
+#: builtin/reset.c:33
+msgid "keep"
+msgstr "behåll"
+
+#: builtin/reset.c:95
+msgid "You do not have a valid HEAD."
+msgstr "Du har inte en giltig HEAD."
+
+#: builtin/reset.c:97
+msgid "Failed to find tree of HEAD."
+msgstr "Kunde inte hitta träder för HEAD."
+
+#: builtin/reset.c:103
+#, c-format
+msgid "Failed to find tree of %s."
+msgstr "Kunde inte hitta träder för %s."
+
+#: builtin/reset.c:108
+msgid "Could not write new index file."
+msgstr "Kunde inte skriva ny indexfil."
+
+#: builtin/reset.c:118
+#, c-format
+msgid "HEAD is now at %s"
+msgstr "HEAD är nu på %s"
+
+#: builtin/reset.c:142
+msgid "Could not read index"
+msgstr "Kunde inte läsa indexet"
+
+#: builtin/reset.c:145
+msgid "Unstaged changes after reset:"
+msgstr "Oköade ändringar efter återställning:"
+
+#: builtin/reset.c:225
+#, c-format
+msgid "Reflog action message too long: %.*s..."
+msgstr "Reflog-händelsemeddelande för långt: %.*s..."
+
+#: builtin/reset.c:231
+#, c-format
+msgid "Cannot do a %s reset in the middle of a merge."
+msgstr "Kan inte utföra en %s återställning mitt i en sammanslagning."
+
+#: builtin/reset.c:307
+#, c-format
+msgid "Could not parse object '%s'."
+msgstr "Kan inte tolka objektet \"%s\""
+
+#: builtin/reset.c:312
+msgid "--patch is incompatible with --{hard,mixed,soft}"
+msgstr "--patch är inkompatibel med --{hard,mixed,soft}"
+
+#: builtin/reset.c:321
+msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
+msgstr ""
+"--mixed rekommenderas inte med sökvägar; använd \"git reset -- <sökvägar>\"."
+
+#: builtin/reset.c:323
+#, c-format
+msgid "Cannot do %s reset with paths."
+msgstr "Kan inte göra %s återställning med sökvägar."
+
+#: builtin/reset.c:335
+#, c-format
+msgid "%s reset is not allowed in a bare repository"
+msgstr "%s återställning tillåts inte i ett naket arkiv"
+
+#: builtin/reset.c:351
+#, c-format
+msgid "Could not reset index file to revision '%s'."
+msgstr "Kunde inte återställa indexfilen till versionen \"%s\"."
+
+#: builtin/revert.c:82
+msgid "program error"
+msgstr "programfel"
+
+#: builtin/revert.c:154 builtin/revert.c:188
+#, c-format
+msgid "Could not read commit message of %s"
+msgstr "Kunde inte läsa incheckningsmeddelandet för %s"
+
+#: builtin/revert.c:202
+#, c-format
+msgid "Could not extract author email from %s"
+msgstr "Kunde inte hämta författarens e-postadress från %s"
+
+#: builtin/revert.c:214
+#, c-format
+msgid "Could not extract author time from %s"
+msgstr "Kunde inte hämta författartid från %s"
+
+#: builtin/revert.c:230
+#, c-format
+msgid "No author information found in %s"
+msgstr "Hittade ingen författarinformation i %s"
+
+#: builtin/revert.c:267
+#, c-format
+msgid "Could not write to %s."
+msgstr "Kunde inte skriva till %s."
+
+#: builtin/revert.c:270
+#, c-format
+msgid "Error wrapping up %s"
+msgstr "Fel vid ombrytning av %s"
+
+#: builtin/revert.c:290
+msgid ""
+"Your local changes would be overwritten by revert.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+"Dina lokala ändringar skulle skrivas över av \"revert\".\n"
+"Checka in dina ändringar eller använd \"stash\" för att fortsätta."
+
+#: builtin/revert.c:293
+msgid ""
+"Your local changes would be overwritten by cherry-pick.\n"
+"Please, commit your changes or stash them to proceed."
+msgstr ""
+"Dina lokala ändringar skulle skrivas över av \"cherry-pick\".\n"
+"Checka in dina ändringar eller använd \"stash\" för att fortsätta."
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:351
+#, c-format
+msgid "%s: Unable to write new index file"
+msgstr "%s: Kunde inte skriva ny indexfil"
+
+#: builtin/revert.c:417
+msgid "Your index file is unmerged."
+msgstr "Din indexfil har inte slagits ihop."
+
+#: builtin/revert.c:420
+msgid "You do not have a valid HEAD"
+msgstr "Du har ingen giltig HEAD"
+
+#: builtin/revert.c:428
+msgid "Cannot revert a root commit"
+msgstr "Kan inte ångra en rotincheckning"
+
+#: builtin/revert.c:437
+#, c-format
+msgid "Commit %s is a merge but no -m option was given."
+msgstr "Incheckning %s är en sammanslagning, men flaggan -m angavs inte."
+
+#: builtin/revert.c:445
+#, c-format
+msgid "Commit %s does not have parent %d"
+msgstr "Incheckning %s har inte förälder %d"
+
+#: builtin/revert.c:449
+#, c-format
+msgid "Mainline was specified but commit %s is not a merge."
+msgstr "Huvudlinje angavs, men incheckningen %s är inte en sammanslagning"
+
+#. TRANSLATORS: The first %s will be "revert" or
+#. "cherry-pick", the second %s a SHA1
+#: builtin/revert.c:460
+#, c-format
+msgid "%s: cannot parse parent commit %s"
+msgstr "%s: kan inte tolka föräldraincheckningen %s"
+
+#: builtin/revert.c:464
+#, c-format
+msgid "Cannot get commit message for %s"
+msgstr "Kan inte hämta incheckningsmeddelande för %s"
+
+#: builtin/revert.c:525
+#, c-format
+msgid "could not revert %s... %s"
+msgstr "kunde inte ångra %s... %s"
+
+#: builtin/revert.c:526
+#, c-format
+msgid "could not apply %s... %s"
+msgstr "kunde inte applicera %s... %s"
+
+#: builtin/revert.c:559
+msgid "empty commit set passed"
+msgstr "den angivna uppsättningen incheckningar är tom"
+
+#: builtin/revert.c:573
+msgid "cherry-pick --ff cannot be used with --signoff"
+msgstr "cherry-pick --ff kan inte användas med --signoff"
+
+#: builtin/revert.c:575
+msgid "cherry-pick --ff cannot be used with --no-commit"
+msgstr "cherry-pick --ff kan inte användas med --no-commit"
+
+#: builtin/revert.c:577
+msgid "cherry-pick --ff cannot be used with -x"
+msgstr "cherry-pick --ff kan inte användas med -x"
+
+#: builtin/revert.c:579
+msgid "cherry-pick --ff cannot be used with --edit"
+msgstr "cherry-pick --ff kan inte användas med --edit"
+
+#. TRANSLATORS: %s will be "revert" or "cherry-pick"
+#: builtin/revert.c:584
+#, c-format
+msgid "git %s: failed to read the index"
+msgstr "git %s: misslyckades läsa indexet"
+
+#: builtin/rm.c:118
+#, c-format
+msgid ""
+"'%s' has staged content different from both the file and the HEAD\n"
+"(use -f to force removal)"
+msgstr ""
+"\"%s\" har köat ändringar som skiljer sig både från filen och HEAD\n"
+"(använd -f för att tvinga borttagning)"
+
+#: builtin/rm.c:124
+#, c-format
+msgid ""
+"'%s' has changes staged in the index\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+"\"%s\" har köade ändringar i indexet\n"
+"(använd --cached för att behålla filen eller -f för att tvinga borttagning)"
+
+#: builtin/rm.c:128
+#, c-format
+msgid ""
+"'%s' has local modifications\n"
+"(use --cached to keep the file, or -f to force removal)"
+msgstr ""
+"\"%s\" har lokala ändringar\n"
+"(använd --cached för att behålla filen eller -f för att tvinga borttagning)"
+
+#: builtin/rm.c:202
+#, c-format
+msgid "not removing '%s' recursively without -r"
+msgstr "tar inte bort \"%s\" rekursivt utan -r"
+
+#: builtin/rm.c:238
+#, c-format
+msgid "git rm: unable to remove %s"
+msgstr "git rm: kan inte ta bort %s"
+
+#: builtin/shortlog.c:161
+#, c-format
+msgid "Missing author: %s"
+msgstr "Saknad författare: %s"
+
+#: builtin/tag.c:123 builtin/tag.c:464
+#, c-format
+msgid "tag name too long: %.*s..."
+msgstr "taggnamnet för långt: %.*s..."
+
+#: builtin/tag.c:128
+#, c-format
+msgid "tag '%s' not found."
+msgstr "taggen \"%s\" hittades inte."
+
+#: builtin/tag.c:143
+#, c-format
+msgid "Deleted tag '%s' (was %s)\n"
+msgstr "Tog bort tagg \"%s\" (var %s)\n"
+
+#: builtin/tag.c:155
+#, c-format
+msgid "could not verify the tag '%s'"
+msgstr "kunde inte bekräfta taggen \"%s\""
+
+#: builtin/tag.c:170
+msgid "committer info too long."
+msgstr "incheckarinformation för lång."
+
+#: builtin/tag.c:190
+msgid "could not run gpg."
+msgstr "kunde inte köra gpg."
+
+#: builtin/tag.c:196
+msgid "gpg did not accept the tag data"
+msgstr "gpg godtog inte taggdata"
+
+#: builtin/tag.c:203
+msgid "gpg failed to sign the tag"
+msgstr "gpg misslyckades signera taggen"
+
+#: builtin/tag.c:218
+msgid ""
+"\n"
+"#\n"
+"# Write a tag message\n"
+"#\n"
+msgstr ""
+"\n"
+"#\n"
+"# Skriv ett taggmeddelande\n"
+"#\n"
+
+#: builtin/tag.c:226
+#, c-format
+msgid "signing key value too long (%.10s...)"
+msgstr "signeringsnyckelvärdet för långt (%.10s...)"
+
+#: builtin/tag.c:272
+msgid "unable to sign the tag"
+msgstr "kunde inte signera taggen"
+
+#: builtin/tag.c:274
+msgid "unable to write tag file"
+msgstr "kunde inte skriva tagg-filen"
+
+#: builtin/tag.c:289
+msgid "bad object type."
+msgstr "felaktig objekttyp"
+
+#: builtin/tag.c:302
+msgid "tag header too big."
+msgstr "tagghuvud för stort."
+
+#: builtin/tag.c:329
+msgid "no tag message?"
+msgstr "inget taggmeddelande?"
+
+#: builtin/tag.c:335
+#, c-format
+msgid "The tag message has been left in %s\n"
+msgstr "Taggmeddelandet har lämnats i %s\n"
+
+#: builtin/tag.c:428
+msgid "-n option is only allowed with -l."
+msgstr "Flaggan -n är endast tillåten tillsammans med -l."
+
+#: builtin/tag.c:430
+msgid "--contains option is only allowed with -l."
+msgstr "Flaggan --contains är endast tillåten tillsammans med -l"
+
+#: builtin/tag.c:438
+msgid "only one -F or -m option is allowed."
+msgstr "endast en av flaggorna -F eller -m tillåts."
+
+#: builtin/tag.c:458
+msgid "too many params"
+msgstr "för många parametrar"
+
+#: builtin/tag.c:466
+#, c-format
+msgid "'%s' is not a valid tag name."
+msgstr "\"%s\" är inte ett giltigt taggnamn."
+
+#: builtin/tag.c:471
+#, c-format
+msgid "tag '%s' already exists"
+msgstr "taggen \"%s\" finns redan"
+
+#: builtin/tag.c:479
+#, c-format
+msgid "%s: cannot lock the ref"
+msgstr "%s: kan inte låsa referensen"
+
+#: builtin/tag.c:481
+#, c-format
+msgid "%s: cannot update the ref"
+msgstr "%s: kan inte uppdatera referensen"
+
+#: builtin/tag.c:483
+#, c-format
+msgid "Updated tag '%s' (was %s)\n"
+msgstr "Uppdaterad tagg \"%s\" (var %s)\n"
+
+#: git-am.sh:47
+msgid "You need to set your committer info first"
+msgstr "Du måste ställa in din incheckarinformation först"
+
+#: git-am.sh:80
+#, sh-format
+msgid ""
+"When you have resolved this problem run \"$cmdline --resolved\".\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+"När du har löst problemet kör du \"$cmdline --resolved\".\n"
+"Om du vill hoppa över patchen kör du istället \"$cmdline --skip\".\n"
+"För att återställa originalgrenen och avbryta kör du \"$cmdline --abort\"."
+
+#: git-am.sh:96
+msgid "Cannot fall back to three-way merge."
+msgstr "Kan inte falla tillbaka på trevägssammanslagning."
+
+#: git-am.sh:111
+msgid "Repository lacks necessary blobs to fall back on 3-way merge."
+msgstr ""
+"Arkivet saknar objekt som behövs för att falla tillbaka på 3-"
+"vägssammanslagning."
+
+#: git-am.sh:120
+msgid ""
+"Did you hand edit your patch?\n"
+"It does not apply to blobs recorded in its index."
+msgstr ""
+"Vill du handredigera din patch?\n"
+"Den kan inte appliceras på blobbar som antecknats i dess index."
+
+#: git-am.sh:236
+msgid "Only one StGIT patch series can be applied at once"
+msgstr "Endast en StGIT-patchserie kan appliceras åt gången"
+
+#: git-am.sh:288
+#, sh-format
+msgid "Patch format $patch_format is not supported."
+msgstr "Patchformatet $patch_format stöds inte."
+
+#: git-am.sh:290
+msgid "Patch format detection failed."
+msgstr "Misslyckades detektera patchformat."
+
+#: git-am.sh:340
+msgid "-d option is no longer supported. Do not use."
+msgstr "Flaggan -d stöds inte lägre. Använd inte."
+
+#: git-am.sh:403
+#, sh-format
+msgid "previous rebase directory $dotest still exists but mbox given."
+msgstr "tidigare rebase-katalog $dotest finns redan, men mbox angavs."
+
+#: git-am.sh:408
+msgid "Please make up your mind. --skip or --abort?"
+msgstr "Bestäm dig. --skip eller --abort?"
+
+#: git-am.sh:434
+msgid "Resolve operation not in progress, we are not resuming."
+msgstr "Lösningsoperation pågår inte, vi återupptar inte."
+
+#: git-am.sh:499
+#, sh-format
+msgid "Dirty index: cannot apply patches (dirty: $files)"
+msgstr "Smutsigt index: kan inte applicera patchar (smutsiga: $files)"
+
+#: git-am.sh:595
+#, sh-format
+msgid ""
+"Patch is empty. Was it split wrong?\n"
+"If you would prefer to skip this patch, instead run \"$cmdline --skip\".\n"
+"To restore the original branch and stop patching run \"$cmdline --abort\"."
+msgstr ""
+"Patchen är tom. Delades den upp felaktigt?\n"
+"Om du vill hoppa över patchen kör du istället \"$cmdline --skip\".\n"
+"För att återställa originalgrenen och avbryta kör du \"$cmdline --abort\"."
+
+#: git-am.sh:632
+msgid "Patch does not have a valid e-mail address."
+msgstr "Patchen har inte någon giltig e-postadress."
+
+#: git-am.sh:679
+msgid "cannot be interactive without stdin connected to a terminal."
+msgstr ""
+"kan inte vara interaktiv om standard in inte är ansluten till en terminal."
+
+#: git-am.sh:683
+msgid "Commit Body is:"
+msgstr "Incheckningskroppen är:"
+
+#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+#. in your translation. The program will only accept English
+#. input at this point.
+#: git-am.sh:690
+msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+msgstr "Applicera? Y=ja/N=nej/E=redigera/V=visa patch/A=godta alla "
+
+#: git-am.sh:726
+#, sh-format
+msgid "Applying: $FIRSTLINE"
+msgstr "Applicerar: $FIRSTLINE"
+
+#: git-am.sh:747
+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 ""
+"Inga ändrinar - glömde du använda \"git add\"?\n"
+"Om det inte är något kvar att köa kan det hända att någon annan redan\n"
+"introducerat samma ändringar; kanske du bör hoppa över patchen."
+
+#: git-am.sh:755
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+"Du har fortfarande sökvägar som inte slagits samman i ditt index\n"
+"glömde du använda \"git add\"?"
+
+#: git-am.sh:771
+msgid "No changes -- Patch already applied."
+msgstr "Inga ändringar -- Patchen har redan applicerats."
+
+#: git-am.sh:781
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "Patchen misslyckades vid $msgnum $FIRSTLINE"
+
+#: git-am.sh:797
+msgid "applying to an empty history"
+msgstr "applicerar på en tom historik"
+
+#: git-bisect.sh:39
+#, fuzzy
+msgid "You need to start by \"git bisect start\""
+msgstr "Du måste ställa in din incheckarinformation först"
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-bisect.sh:45
+msgid "Do you want me to do it for you [Y/n]? "
+msgstr ""
+
+#: git-bisect.sh:64
+msgid "Bad HEAD - I need a HEAD"
+msgstr ""
+
+#: git-bisect.sh:83
+msgid "won't bisect on seeked tree"
+msgstr ""
+
+#: git-bisect.sh:87
+msgid "Bad HEAD - strange symbolic ref"
+msgstr ""
+
+#: git-bisect.sh:117
+#, sh-format
+msgid "'$arg' does not appear to be a valid revision"
+msgstr ""
+
+#: git-bisect.sh:162
+#, sh-format
+msgid "Bad bisect_write argument: $state"
+msgstr ""
+
+#: git-bisect.sh:190
+#, sh-format
+msgid "Bad rev input: $arg"
+msgstr ""
+
+#: git-bisect.sh:204
+msgid "Please call 'bisect_state' with at least one argument."
+msgstr ""
+
+#: git-bisect.sh:207
+msgid "Bad rev input: HEAD"
+msgstr ""
+
+#: git-bisect.sh:216
+#, sh-format
+msgid "Bad rev input: $rev"
+msgstr ""
+
+#: git-bisect.sh:222
+msgid "'git bisect bad' can take only one argument."
+msgstr ""
+
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:245
+msgid "Warning: bisecting only with a bad commit."
+msgstr ""
+
+#. TRANSLATORS: Make sure to include [Y] and [n] in your
+#. translation. The program will only accept English input
+#. at this point.
+#: git-bisect.sh:251
+msgid "Are you sure [Y/n]? "
+msgstr ""
+
+#: git-bisect.sh:261
+msgid ""
+"You need to give me at least one good and one bad revisions.\n"
+"(You can use \"git bisect bad\" and \"git bisect good\" for that.)"
+msgstr ""
+
+#: git-bisect.sh:264
+msgid ""
+"You need to start by \"git bisect start\".\n"
+"You then need to give me at least one good and one bad revisions.\n"
+"(You can use \"git bisect bad\" and \"git bisect good\" for that.)"
+msgstr ""
+
+#: git-bisect.sh:316
+msgid "We are not bisecting."
+msgstr ""
+
+#: git-bisect.sh:323
+#, fuzzy, sh-format
+msgid "'$invalid' is not a valid commit"
+msgstr "\"%s\" är inte en incheckning"
+
+#: git-bisect.sh:352
+#, fuzzy, sh-format
+msgid "cannot read $file for replaying"
+msgstr "kan inte läsa indexet"
+
+#: git-bisect.sh:368
+msgid "?? what are you talking about?"
+msgstr ""
+
+#: git-bisect.sh:380
+#, sh-format
+msgid "running $command"
+msgstr ""
+
+#: git-bisect.sh:386
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+
+#: git-bisect.sh:409
+msgid "bisect run cannot continue any more"
+msgstr ""
+
+#: git-bisect.sh:414
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+
+#: git-bisect.sh:420
+msgid "bisect run success"
+msgstr ""
+
+#: git-pull.sh:21
+msgid ""
+"Pull is not possible because you have unmerged files.\n"
+"Please, fix them up in the work tree, and then use 'git add/rm <file>'\n"
+"as appropriate to mark resolution, or use 'git commit -a'."
+msgstr ""
+
+#: git-pull.sh:25
+msgid "Pull is not possible because you have unmerged files."
+msgstr ""
+
+#: git-pull.sh:141
+msgid ""
+"There is no candidate for rebasing against among the refs that you just "
+"fetched.\n"
+"Generally this means that you provided a wildcard refspec which had no\n"
+"matches on the remote end."
+msgstr ""
+
+#: git-pull.sh:145
+msgid ""
+"There are no candidates for merging against among the refs that you just "
+"fetched.\n"
+"Generally this means that you provided a wildcard refspec which had no\n"
+"matches on the remote end."
+msgstr ""
+
+#. TRANSLATORS: $requested_remote will be a remote name, like
+#. "origin" or "avar"
+#: git-pull.sh:153
+#, sh-format
+msgid ""
+"You asked to pull from the remote '$requested_remote', 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 ""
+
+#: git-pull.sh:157
+msgid ""
+"You are not currently on a branch, so I cannot use any\n"
+"'branch.<branchname>.merge' in your configuration file.\n"
+"Please specify which remote branch you want to use on the command\n"
+"line and try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details."
+msgstr ""
+
+#: git-pull.sh:165
+#, sh-format
+msgid ""
+"You asked me to pull without telling me which branch you\n"
+"want to rebase against, and 'branch.${curr_branch}.merge' in\n"
+"your configuration file does not tell me, either. Please\n"
+"specify which branch you want to use on the command line and\n"
+"try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details.\n"
+"\n"
+"If you often rebase against the same branch, you may want to\n"
+"use something like the following in your configuration file:\n"
+"\n"
+" [branch \"${curr_branch}\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+" rebase = true\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"See git-config(1) for details."
+msgstr ""
+
+#: git-pull.sh:186
+#, sh-format
+msgid ""
+"You asked me to pull without telling me which branch you\n"
+"want to merge with, and 'branch.${curr_branch}.merge' in\n"
+"your configuration file does not tell me, either. Please\n"
+"specify which branch you want to use on the command line and\n"
+"try again (e.g. 'git pull <repository> <refspec>').\n"
+"See git-pull(1) for details.\n"
+"\n"
+"If you often merge with the same branch, you may want to\n"
+"use something like the following in your configuration file:\n"
+"\n"
+" [branch \"${curr_branch}\"]\n"
+" remote = <nickname>\n"
+" merge = <remote-ref>\n"
+"\n"
+" [remote \"<nickname>\"]\n"
+" url = <url>\n"
+" fetch = <refspec>\n"
+"\n"
+"See git-config(1) for details."
+msgstr ""
+
+#: git-pull.sh:210
+#, sh-format
+msgid ""
+"Your configuration specifies to rebase against the ref '$upstream_branch'\n"
+"from the remote, but no such ref was fetched."
+msgstr ""
+
+#: git-pull.sh:213
+#, sh-format
+msgid ""
+"Your configuration specifies to merge with the ref '$upstream_branch'\n"
+"from the remote, but no such ref was fetched."
+msgstr ""
+
+#: git-pull.sh:226
+msgid "updating an unborn branch with changes added to the index"
+msgstr ""
+
+#: git-pull.sh:232
+msgid "refusing to pull with rebase: your working tree is not up-to-date"
+msgstr ""
+
+#. The fetch involved updating the current branch.
+#. The working tree and the index file is still based on the
+#. $orig_head commit, but we are merging into $curr_head.
+#. First update the working tree to match $curr_head.
+#: git-pull.sh:260
+#, sh-format
+msgid ""
+"Warning: fetch updated the current branch head.\n"
+"Warning: fast-forwarding your working tree from\n"
+"Warning: commit $orig_head."
+msgstr ""
+
+#: git-pull.sh:285
+#, fuzzy
+msgid "Cannot merge multiple branches into empty head"
+msgstr "Kan endast slå ihop en enda incheckning i ett tomt huvud."
+
+#: git-pull.sh:289
+msgid "Cannot rebase onto multiple branches"
+msgstr ""
+
+#: git-stash.sh:41
+msgid "git stash clear with parameters is unimplemented"
+msgstr ""
+
+#: git-stash.sh:63
+#, fuzzy
+msgid "You do not have the initial commit yet"
+msgstr "Du har ingen giltig HEAD"
+
+#: git-stash.sh:78
+#, fuzzy
+msgid "Cannot save the current index state"
+msgstr "Kan inte komma åt aktuell arbetskatalog"
+
+#: git-stash.sh:94 git-stash.sh:107
+#, fuzzy
+msgid "Cannot save the current worktree state"
+msgstr "Kan inte komma åt aktuell arbetskatalog"
+
+#: git-stash.sh:111
+#, fuzzy
+msgid "No changes selected"
+msgstr "# Inga ändringar\n"
+
+#: git-stash.sh:114
+msgid "Cannot remove temporary index (can't happen)"
+msgstr ""
+
+#: git-stash.sh:127
+#, fuzzy
+msgid "Cannot record working tree state"
+msgstr "Kan inte komma åt arbetskatalogen \"%s\""
+
+#: git-stash.sh:176
+msgid "No local changes to save"
+msgstr ""
+
+#: git-stash.sh:180
+msgid "Cannot initialize stash"
+msgstr ""
+
+#: git-stash.sh:188
+msgid "Cannot save the current status"
+msgstr ""
+
+#: git-stash.sh:201
+#, fuzzy
+msgid "Cannot remove worktree changes"
+msgstr "Kan inte komma åt arbetskatalogen \"%s\""
+
+#: git-stash.sh:303
+msgid "No stash found."
+msgstr ""
+
+#: git-stash.sh:310
+#, fuzzy, sh-format
+msgid "Too many revisions specified: $REV"
+msgstr "För många flaggor angavs"
+
+#: git-stash.sh:316
+#, fuzzy, sh-format
+msgid "$reference is not valid reference"
+msgstr "referensen är inte ett träd: %s"
+
+#. maintainers: it would be better if git rev-parse indicated
+#. this condition with a non-zero status code but as of 1.7.2.1 it
+#. it did not. So, we use non-empty stderr output as a proxy for the
+#. condition of interest.
+#: git-stash.sh:337
+#, sh-format
+msgid "$REV does not exist in the stash log"
+msgstr ""
+
+#: git-stash.sh:351
+#, fuzzy, sh-format
+msgid "'$args' is not a stash-like commit"
+msgstr "\"%s\" är inte en incheckning"
+
+#: git-stash.sh:362
+#, sh-format
+msgid "'$args' is not a stash reference"
+msgstr ""
+
+#: git-stash.sh:372
+msgid "Cannot apply to a dirty working tree, please stage your changes"
+msgstr ""
+
+#: git-stash.sh:376
+#, fuzzy
+msgid "Cannot apply a stash in the middle of a merge"
+msgstr "Kan inte utföra en %s återställning mitt i en sammanslagning."
+
+#: git-stash.sh:384
+msgid "Conflicts in index. Try without --index."
+msgstr ""
+
+#: git-stash.sh:386
+#, fuzzy
+msgid "Could not save index tree"
+msgstr "Kunde inte läsa indexet"
+
+#: git-stash.sh:412
+msgid "Cannot unstage modified files"
+msgstr ""
+
+#: git-stash.sh:426
+#, fuzzy
+msgid "Index was not unstashed."
+msgstr "kunde köra stash."
+
+#: git-stash.sh:443
+#, sh-format
+msgid "Dropped ${REV} ($s)"
+msgstr ""
+
+#: git-stash.sh:444
+#, sh-format
+msgid "${REV}: Could not drop stash entry"
+msgstr ""
+
+#: git-stash.sh:451
+#, fuzzy
+msgid "No branch name specified"
+msgstr "Misslyckades byta namn på gren"
+
+#: git-stash.sh:522
+msgid "(To restore them type \"git stash apply\")"
+msgstr ""
+
+#: git-submodule.sh:38
+#, sh-format
+msgid "remote ($remote) does not have a url defined in .git/config"
+msgstr ""
+
+#: git-submodule.sh:79
+#, sh-format
+msgid "No submodule mapping found in .gitmodules for path '$path'"
+msgstr ""
+
+#: git-submodule.sh:105
+#, sh-format
+msgid "Directory '$path' exists, but is neither empty nor a git repository"
+msgstr ""
+
+#: git-submodule.sh:109
+#, sh-format
+msgid "A file already exist at path '$path'"
+msgstr ""
+
+#: git-submodule.sh:117
+#, sh-format
+msgid "Clone of '$url' into submodule path '$path' failed"
+msgstr ""
+
+#: git-submodule.sh:190
+#, sh-format
+msgid "repo URL: '$repo' must be absolute or begin with ./|../"
+msgstr ""
+
+#: git-submodule.sh:207
+#, fuzzy, sh-format
+msgid "'$path' already exists in the index"
+msgstr "kan inte läsa indexet"
+
+#: git-submodule.sh:211
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$path\n"
+"Use -f if you really want to add it."
+msgstr ""
+
+#: git-submodule.sh:222
+#, sh-format
+msgid "Adding existing repo at '$path' to the index"
+msgstr ""
+
+#: git-submodule.sh:224
+#, fuzzy, sh-format
+msgid "'$path' already exists and is not a valid git repo"
+msgstr "destinationssökvägen \"%s\" finns redan och är inte en tom katalog."
+
+#: git-submodule.sh:247
+#, sh-format
+msgid "Unable to checkout submodule '$path'"
+msgstr ""
+
+#: git-submodule.sh:251
+#, fuzzy, sh-format
+msgid "Failed to add submodule '$path'"
+msgstr "Kunde inte läsa objektet \"%s\"."
+
+#: git-submodule.sh:256
+#, sh-format
+msgid "Failed to register submodule '$path'"
+msgstr ""
+
+#: git-submodule.sh:294
+#, sh-format
+msgid "Entering '$prefix$path'"
+msgstr ""
+
+#: git-submodule.sh:306
+#, sh-format
+msgid "Stopping at '$path'; script returned non-zero status."
+msgstr ""
+
+#: git-submodule.sh:349
+#, sh-format
+msgid "No url found for submodule path '$path' in .gitmodules"
+msgstr ""
+
+#: git-submodule.sh:359
+#, sh-format
+msgid "Failed to register url for submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:364
+#, sh-format
+msgid "Failed to register update mode for submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:366
+#, sh-format
+msgid "Submodule '$name' ($url) registered for path '$path'"
+msgstr ""
+
+#: git-submodule.sh:444
+#, sh-format
+msgid ""
+"Submodule path '$path' not initialized\n"
+"Maybe you want to use 'update --init'?"
+msgstr ""
+
+#: git-submodule.sh:456
+#, sh-format
+msgid "Unable to find current revision in submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:476
+#, sh-format
+msgid "Unable to fetch in submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:482 git-submodule.sh:487 git-submodule.sh:492
+#, sh-format
+msgid "Unable to rebase '$sha1' in submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:483
+#, sh-format
+msgid "Submodule path '$path': rebased into '$sha1'"
+msgstr ""
+
+#: git-submodule.sh:488
+#, sh-format
+msgid "Submodule path '$path': merged in '$sha1'"
+msgstr ""
+
+#: git-submodule.sh:493
+#, sh-format
+msgid "Submodule path '$path': checked out '$sha1'"
+msgstr ""
+
+#: git-submodule.sh:504 git-submodule.sh:797
+#, sh-format
+msgid "Failed to recurse into submodule path '$path'"
+msgstr ""
+
+#: git-submodule.sh:588
+msgid "--"
+msgstr ""
+
+#. unexpected type
+#: git-submodule.sh:628
+#, fuzzy, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "diff-status %c förväntades inte"
+
+#: git-submodule.sh:646
+#, sh-format
+msgid " Warn: $name doesn't contain commit $sha1_src"
+msgstr ""
+
+#: git-submodule.sh:649
+#, sh-format
+msgid " Warn: $name doesn't contain commit $sha1_dst"
+msgstr ""
+
+#: git-submodule.sh:652
+#, sh-format
+msgid " Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
+msgstr ""
+
+#: git-submodule.sh:677
+msgid "blob"
+msgstr ""
+
+#: git-submodule.sh:678
+msgid "submodule"
+msgstr ""
+
+#: git-submodule.sh:715
+#, fuzzy
+msgid "# Submodules changed but not updated:"
+msgstr "# Ändrade men inte uppdaterade:"
+
+#: git-submodule.sh:717
+#, fuzzy
+msgid "# Submodule changes to be committed:"
+msgstr "# Ändringar att checka in:"
+
+#: git-submodule.sh:844
+#, sh-format
+msgid "Synchronizing submodule url for '$name'"
+msgstr ""
diff --git a/preload-index.c b/preload-index.c
index e3d0bda31a98372eb9b6a8c2cd0fd65917a9dbde..49cb08df96faa90101bb25d8f96acaffc066f19b 100644 (file)
--- a/preload-index.c
+++ b/preload-index.c
struct index_state *index = p->index;
struct cache_entry **cep = index->cache + p->offset;
struct cache_def cache;
+ struct pathspec pathspec;
+ init_pathspec(&pathspec, p->pathspec);
memset(&cache, 0, sizeof(cache));
nr = p->nr;
if (nr + p->offset > index->cache_nr)
continue;
if (ce_uptodate(ce))
continue;
- if (!ce_path_match(ce, p->pathspec))
+ if (!ce_path_match(ce, &pathspec))
continue;
if (threaded_has_symlink_leading_path(&cache, ce->name, ce_namelen(ce)))
continue;
continue;
ce_mark_uptodate(ce);
} while (--nr > 0);
+ free_pathspec(&pathspec);
return NULL;
}
diff --git a/read-cache.c b/read-cache.c
index 4f2e890b01b0c27ef2e49080e1fd34bf67e969c7..7772079ad3101a2a51cfef1c5b1c250ed3ff37de 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
return ce_namelen(b) == len && !memcmp(a->name, b->name, len);
}
-int ce_path_match(const struct cache_entry *ce, const char **pathspec)
+int ce_path_match(const struct cache_entry *ce, const struct pathspec *pathspec)
{
- const char *match, *name;
- int len;
-
- if (!pathspec)
- return 1;
-
- len = ce_namelen(ce);
- name = ce->name;
- while ((match = *pathspec++) != NULL) {
- int matchlen = strlen(match);
- if (matchlen > len)
- continue;
- if (memcmp(name, match, matchlen))
- continue;
- if (matchlen && name[matchlen-1] == '/')
- return 1;
- if (name[matchlen] == '/' || !name[matchlen])
- return 1;
- if (!matchlen)
- return 1;
- }
- return 0;
+ return match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, NULL);
}
/*
diff --git a/rerere.c b/rerere.c
index d2608434750c336c3f3881efda8373b7c67d4b11..eb47f975c6154cb56e05a16da0223a492d63be59 100644 (file)
--- a/rerere.c
+++ b/rerere.c
int i;
if (read_cache() < 0)
return error("Could not read index");
- for (i = 0; i+1 < active_nr; i++) {
- struct cache_entry *e2 = active_cache[i];
- struct cache_entry *e3 = active_cache[i+1];
- if (ce_stage(e2) == 2 &&
- ce_stage(e3) == 3 &&
- ce_same_name(e2, e3) &&
- S_ISREG(e2->ce_mode) &&
- S_ISREG(e3->ce_mode)) {
- string_list_insert(conflict, (const char *)e2->name);
- i++; /* skip over both #2 and #3 */
+
+ /*
+ * Collect paths with conflict, mark them with NULL (punted) or
+ * !NULL (eligible) in their ->util field.
+ */
+ for (i = 0; i < active_nr; i++) {
+ struct cache_entry *e = active_cache[i];
+ struct string_list_item *it;
+
+ if (!ce_stage(e))
+ continue;
+ it = string_list_insert(conflict, (const char *)e->name);
+ it->util = NULL;
+ if (ce_stage(e) == 1) {
+ if (active_nr <= ++i)
+ break;
}
+
+ /* Only handle regular files with both stages #2 and #3 */
+ if (i + 1 < active_nr) {
+ struct cache_entry *e2 = active_cache[i];
+ struct cache_entry *e3 = active_cache[i + 1];
+ if (ce_stage(e2) == 2 &&
+ ce_stage(e3) == 3 &&
+ ce_same_name(e, e3) &&
+ S_ISREG(e2->ce_mode) &&
+ S_ISREG(e3->ce_mode))
+ it->util = (void *) 1;
+ }
+
+ /* Skip the entries with the same name */
+ while (i < active_nr && ce_same_name(e, active_cache[i]))
+ i++;
+ i--; /* compensate for the outer loop */
}
return 0;
}
+static void add_punted(struct string_list *merge_rr)
+{
+ int i;
+ struct string_list conflict = STRING_LIST_INIT_DUP;
+
+ find_conflict(&conflict);
+ for (i = 0; i < conflict.nr; i++) {
+ if (conflict.items[i].util)
+ continue;
+ string_list_insert(merge_rr, conflict.items[i].string);
+ }
+}
+
static int merge(const char *name, const char *path)
{
int ret;
for (i = 0; i < conflict.nr; i++) {
const char *path = conflict.items[i].string;
+ if (!conflict.items[i].util)
+ continue; /* punted */
if (!string_list_has_string(rr, path)) {
unsigned char sha1[20];
char *hex;
const char *path = rr->items[i].string;
const char *name = (const char *)rr->items[i].util;
+ if (!name)
+ continue;
if (has_rerere_resolution(name)) {
if (!merge(name, path)) {
if (rerere_autoupdate)
fd = hold_lock_file_for_update(&write_lock, merge_rr_path,
LOCK_DIE_ON_ERROR);
read_rr(merge_rr);
+ add_punted(merge_rr);
return fd;
}
find_conflict(&conflict);
for (i = 0; i < conflict.nr; i++) {
struct string_list_item *it = &conflict.items[i];
+ if (!conflict.items[i].util)
+ continue; /* punted */
if (!match_pathspec(pathspec, it->string, strlen(it->string),
0, NULL))
continue;
diff --git a/revision.c b/revision.c
index 7b9eaefae4ed03e994c2122453144b3c09591b9c..86d24704896d71de7bb554a3925ea88e2be3417b 100644 (file)
--- a/revision.c
+++ b/revision.c
@@ -323,7 +323,7 @@ static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct
* tagged commit by specifying both --simplify-by-decoration
* and pathspec.
*/
- if (!revs->prune_data)
+ if (!revs->prune_data.nr)
return REV_TREE_SAME;
}
left_first = left_count < right_count;
init_patch_ids(&ids);
- if (revs->diffopt.nr_paths) {
- ids.diffopts.nr_paths = revs->diffopt.nr_paths;
- ids.diffopts.paths = revs->diffopt.paths;
- ids.diffopts.pathlens = revs->diffopt.pathlens;
- }
+ ids.diffopts.pathspec = revs->diffopt.pathspec;
/* Compute patch-ids for one side */
for (p = list; p; p = p->next) {
struct cache_entry *ce = active_cache[i];
if (!ce_stage(ce))
continue;
- if (ce_path_match(ce, revs->prune_data)) {
+ if (ce_path_match(ce, &revs->prune_data)) {
prune_num++;
prune = xrealloc(prune, sizeof(*prune) * prune_num);
prune[prune_num-2] = ce->name;
ce_same_name(ce, active_cache[i+1]))
i++;
}
- revs->prune_data = prune;
+ free_pathspec(&revs->prune_data);
+ init_pathspec(&revs->prune_data, prune);
revs->limited = 1;
}
@@ -1620,7 +1617,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
}
if (prune_data)
- revs->prune_data = get_pathspec(revs->prefix, prune_data);
+ init_pathspec(&revs->prune_data, get_pathspec(revs->prefix, prune_data));
if (revs->def == NULL)
revs->def = opt ? opt->def : NULL;
@@ -1651,13 +1648,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
if (revs->topo_order)
revs->limited = 1;
- if (revs->prune_data) {
- diff_tree_setup_paths(revs->prune_data, &revs->pruning);
+ if (revs->prune_data.nr) {
+ diff_tree_setup_paths(revs->prune_data.raw, &revs->pruning);
/* Can't prune commits with rename following: the paths change.. */
if (!DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
revs->prune = 1;
if (!revs->full_diff)
- diff_tree_setup_paths(revs->prune_data, &revs->diffopt);
+ diff_tree_setup_paths(revs->prune_data.raw, &revs->diffopt);
}
if (revs->combine_merges)
revs->ignore_merges = 0;
diff --git a/revision.h b/revision.h
index 05659c64acd7fe8eb7be011cee6174e397e57baf..82509dd1d9ad7b1824971be4884409060f10aee3 100644 (file)
--- a/revision.h
+++ b/revision.h
/* Basic information */
const char *prefix;
const char *def;
- void *prune_data;
+ struct pathspec prune_data;
unsigned int early_output;
/* Traversal flags */
index 3d732697af600ccc3c6017844c73e1d3b0dac738..021d0133ae1d6cf7f3a6a8284cb5b6e9a42dbe0d 100644 (file)
--- a/setup.c
+++ b/setup.c
char *prefix_path(const char *prefix, int len, const char *path)
{
const char *orig = path;
- char *sanitized = xmalloc(len + strlen(path) + 1);
- if (is_absolute_path(orig))
- strcpy(sanitized, path);
- else {
+ char *sanitized;
+ if (is_absolute_path(orig)) {
+ const char *temp = make_absolute_path(path);
+ sanitized = xmalloc(len + strlen(temp) + 1);
+ strcpy(sanitized, temp);
+ } else {
+ sanitized = xmalloc(len + strlen(path) + 1);
if (len)
memcpy(sanitized, prefix, len);
strcpy(sanitized + len, path);
if (check_repository_format_gently(gitdir, nongit_ok))
return NULL;
+ /* --work-tree is set without --git-dir; use discovered one */
+ if (getenv(GIT_WORK_TREE_ENVIRONMENT) || git_work_tree_cfg) {
+ if (offset != len && !is_absolute_path(gitdir))
+ gitdir = xstrdup(make_absolute_path(gitdir));
+ if (chdir(cwd))
+ die_errno("Could not come back to cwd");
+ return setup_explicit_git_dir(gitdir, cwd, len, nongit_ok);
+ }
+
/* #16.2, #17.2, #20.2, #21.2, #24, #25, #28, #29 (see t1510) */
if (is_bare_repository_cfg > 0) {
set_git_dir(offset == len ? gitdir : make_absolute_path(gitdir));
@@ -443,6 +455,16 @@ static const char *setup_bare_git_dir(char *cwd, int offset, int len, int *nongi
if (check_repository_format_gently(".", nongit_ok))
return NULL;
+ /* --work-tree is set without --git-dir; use discovered one */
+ if (getenv(GIT_WORK_TREE_ENVIRONMENT) || git_work_tree_cfg) {
+ const char *gitdir;
+
+ gitdir = offset == len ? "." : xmemdupz(cwd, offset);
+ if (chdir(cwd))
+ die_errno("Could not come back to cwd");
+ return setup_explicit_git_dir(gitdir, cwd, len, nongit_ok);
+ }
+
inside_git_dir = 1;
inside_work_tree = 0;
if (offset != len) {
diff --git a/sha1_file.c b/sha1_file.c
index 1cafdfa617a833ec757b481826dc62282be8f374..d86a8db69ade6fd26ebd88bbb361a7a86838f14e 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return data;
}
- if (errno != ENOENT)
+ if (errno && errno != ENOENT)
die_errno("failed to read object %s", sha1_to_hex(sha1));
/* die if we replaced an object with one that does not exist */
index dea4cfdd2c230af6afd6233cacfa5c776a9962f9..7be826d8bc765ae6bd2d9a24dd1a06b7e3005cba 100644 (file)
--- a/shell.c
+++ b/shell.c
#include "quote.h"
#include "exec_cmd.h"
#include "strbuf.h"
+#include "gettext.h"
#include "run-command.h"
#define COMMAND_DIR "git-shell-commands"
int devnull_fd;
int count;
+ git_setup_gettext();
+
/*
* Always open file descriptors 0/1/2 to avoid clobbering files
* in die(). It also avoids not messing up when the pipes are
diff --git a/show-index.c b/show-index.c
index 4c0ac138aff7b5add73e17fc9c3c4e409fd918e2..c2f54485362cb59aaf6b67d8d98943d6b9bd743d 100644 (file)
--- a/show-index.c
+++ b/show-index.c
#include "cache.h"
#include "pack.h"
+#include "gettext.h"
static const char show_index_usage[] =
"git show-index < <packed archive index>";
unsigned int version;
static unsigned int top_index[256];
+ git_setup_gettext();
+
if (argc != 1)
usage(show_index_usage);
if (fread(top_index, 2 * 4, 1, stdin) != 1)
diff --git a/t/README b/t/README
index 892d443f63428aea6d6b92458bdaa4575bc46da0..25f7d2d2e3cf70d54f5b854ad4199c831a74ae2a 100644 (file)
--- a/t/README
+++ b/t/README
Tests that are likely to smoke out future regressions are better
than tests that just inflate the coverage metrics.
+ - When a test checks for an absolute path that a git command generated,
+ construct the expected value using $(pwd) rather than $PWD,
+ $TEST_DIRECTORY, or $TRASH_DIRECTORY. It makes a difference on
+ Windows, where the shell (MSYS bash) mangles absolute path names.
+ For details, see the commit message of 4114156ae9.
+
Don't:
- exit() within a <script> part.
diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
--- /dev/null
+++ b/t/lib-gettext.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+. ./test-lib.sh
+
+GIT_TEXTDOMAINDIR="$GIT_BUILD_DIR/share/locale"
+GIT_PO_PATH="$GIT_BUILD_DIR/po"
+export GIT_TEXTDOMAINDIR GIT_PO_PATH
+
+. "$GIT_BUILD_DIR"/git-sh-i18n
+
+if test_have_prereq GETTEXT && test_have_prereq NO_GETTEXT_POISON
+then
+ # is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
+ is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
+ p
+ q
+ }')
+ # is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
+ is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
+ p
+ q
+ }')
+
+ # Export them as an environmental variable so the t0202/test.pl
+ # Perl test can use it too
+ export is_IS_locale is_IS_iso_locale
+
+ if test -n "$is_IS_locale" &&
+ test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
+ then
+ # Some of the tests need the reference Icelandic locale
+ test_set_prereq GETTEXT_LOCALE
+
+ # Exporting for t0202/test.pl
+ GETTEXT_LOCALE=1
+ export GETTEXT_LOCALE
+ say "# lib-gettext: Found '$is_IS_locale' as a is_IS UTF-8 locale"
+ else
+ say "# lib-gettext: No is_IS UTF-8 locale available"
+ fi
+
+ if test -n "$is_IS_iso_locale" &&
+ test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
+ then
+ # Some of the tests need the reference Icelandic locale
+ test_set_prereq GETTEXT_ISO_LOCALE
+
+ # Exporting for t0202/test.pl
+ GETTEXT_ISO_LOCALE=1
+ export GETTEXT_ISO_LOCALE
+ say "# lib-gettext: Found '$is_IS_iso_locale' as a is_IS ISO-8859-1 locale"
+ else
+ say "# lib-gettext: No is_IS ISO-8859-1 locale available"
+ fi
+else
+ # Only run some tests when we don't have gettext support
+ test_set_prereq NO_GETTEXT
+
+ if test_have_prereq NO_GETTEXT_POISON
+ then
+ say "# lib-gettext: GETTEXT_POISON defined, can't test gettext"
+ else
+ say "# lib-gettext: No GETTEXT support available"
+ fi
+fi
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 3f24384371bf227126e38da61f3b7efd3961ede8..0f0b35a883ac7ae436b5ac2d08c3866643591f85 100644 (file)
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
grep "^ ! \[rejected\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$" output
'
- test_expect_success 'non-fast-forward push shows help message' '
+ test_expect_success NO_GETTEXT_POISON 'non-fast-forward push shows help message' '
grep "To prevent you from losing history, non-fast-forward updates were rejected" \
output
'
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f6849932112f1bbea1dafad09150857a707b64e4..4235ad4385fa7ab51aa201be7d859d6965e83154 100755 (executable)
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
fi
'
-test_expect_success 'reinit' '
+test_expect_success NO_GETTEXT_POISON 'reinit' '
(
sane_unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG &&
diff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh
index 680d7d68612b168a2642ab64e7bc6c15c316d5b4..9bee8bfd2e063c40bae2d76930370bd9e8ba8fa5 100755 (executable)
--- a/t/t0070-fundamental.sh
+++ b/t/t0070-fundamental.sh
test-ctype
'
+test_expect_success 'mktemp to nonexistent directory prints filename' '
+ test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
+ grep "doesnotexist/test" err
+'
+
+test_expect_success POSIXPERM 'mktemp to unwritable directory prints filename' '
+ mkdir cannotwrite &&
+ chmod -w cannotwrite &&
+ test_when_finished "chmod +w cannotwrite" &&
+ test_must_fail test-mktemp cannotwrite/testXXXXXX 2>err &&
+ grep "cannotwrite/test" err
+'
+
test_done
diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh
--- /dev/null
+++ b/t/t0200-gettext-basic.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext support for Git'
+
+. ./lib-gettext.sh
+
+test_expect_success "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+ test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success 'sanity: $TEXTDOMAIN is git' '
+ test $TEXTDOMAIN = "git"
+'
+
+test_expect_success 'xgettext sanity: Perl _() strings are not extracted' '
+ ! grep "A Perl string xgettext will not get" "$GIT_PO_PATH"/is.po
+'
+
+test_expect_success 'xgettext sanity: Comment extraction with --add-comments' '
+ grep "TRANSLATORS: This is a test" "$TEST_DIRECTORY"/t0200/* | wc -l >expect &&
+ grep "TRANSLATORS: This is a test" "$GIT_PO_PATH"/is.po | wc -l >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'xgettext sanity: Comment extraction with --add-comments stops at statements' '
+ ! grep "This is a phony" "$GIT_PO_PATH"/is.po &&
+ ! grep "the above comment" "$GIT_PO_PATH"/is.po
+'
+
+test_expect_success GETTEXT 'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease' '
+ test -d "$TEXTDOMAINDIR" &&
+ test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
+'
+
+test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '
+ test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
+'
+
+# TODO: When we have more locales, generalize this to test them
+# all. Maybe we'll need a dir->locale map for that.
+test_expect_success GETTEXT_LOCALE 'sanity: gettext("") metadata is OK' '
+ # Return value may be non-zero
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >zero-expect &&
+ grep "Project-Id-Version: Git" zero-expect &&
+ grep "Git Mailing List <git@vger.kernel.org>" zero-expect &&
+ grep "Content-Type: text/plain; charset=UTF-8" zero-expect &&
+ grep "Content-Transfer-Encoding: 8bit" zero-expect
+'
+
+test_expect_success GETTEXT_LOCALE 'sanity: gettext(unknown) is passed through' '
+ printf "This is not a translation string" >expect &&
+ gettext "This is not a translation string" >actual &&
+ eval_gettext "This is not a translation string" >actual &&
+ test_cmp expect actual
+'
+
+# xgettext from C
+test_expect_success GETTEXT_LOCALE 'xgettext: C extraction of _() and N_() strings' '
+ printf "TILRAUN: C tilraunastrengur" >expect &&
+ printf "\n" >>expect &&
+ printf "Sjá '\''git help SKIPUN'\'' til að sjá hjálp fyrir tiltekna skipun." >>expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string" >actual &&
+ printf "\n" >>actual &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "See '\''git help COMMAND'\'' for more information on a specific command." >>actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: C extraction with %s' '
+ printf "TILRAUN: C tilraunastrengur %%s" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string %s" >actual &&
+ test_cmp expect actual
+'
+
+# xgettext from Shell
+test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction' '
+ printf "TILRAUN: Skeljartilraunastrengur" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Shell test string" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction with $variable' '
+ printf "TILRAUN: Skeljartilraunastrengur með breytunni a var i able" >x-expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" variable="a var i able" eval_gettext "TEST: A Shell test \$variable" >x-actual &&
+ test_cmp x-expect x-actual
+'
+
+# xgettext from Perl
+test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction' '
+ printf "TILRAUN: Perl tilraunastrengur" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test string" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction with %s' '
+ printf "TILRAUN: Perl tilraunastrengur með breytunni %%s" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test variable %s" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'sanity: Some gettext("") data for real locale' '
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >real-locale &&
+ test -s real-locale
+'
+
+test_done
diff --git a/t/t0200/test.c b/t/t0200/test.c
--- /dev/null
+++ b/t/t0200/test.c
@@ -0,0 +1,23 @@
+/* This is a phony C program that's only here to test xgettext message extraction */
+
+const char help[] =
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ N_("See 'git help COMMAND' for more information on a specific command.");
+
+int main(void)
+{
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ puts(_("TEST: A C test string"));
+
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ printf(_("TEST: A C test string %s"), "variable");
+
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ printf(_("TEST: Hello World!"));
+
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ printf(_("TEST: Old English Runes"));
+
+ /* TRANSLATORS: This is a test. You don't need to translate it. */
+ printf(_("TEST: ‘single’ and “double” quotes"));
+}
diff --git a/t/t0200/test.perl b/t/t0200/test.perl
--- /dev/null
+++ b/t/t0200/test.perl
@@ -0,0 +1,14 @@
+# This is a phony Perl program that's only here to test xgettext
+# message extraction
+
+# so the above comment won't be folded into the next one by xgettext
+1;
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+print __("TEST: A Perl test string");
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+printf __("TEST: A Perl test variable %s"), "moo";
+
+# TRANSLATORS: If you see this, Git has a bug
+print _"TEST: A Perl string xgettext will not get";
diff --git a/t/t0200/test.sh b/t/t0200/test.sh
--- /dev/null
+++ b/t/t0200/test.sh
@@ -0,0 +1,14 @@
+# This is a phony Shell program that's only here to test xgettext
+# message extraction
+
+# so the above comment won't be folded into the next one by xgettext
+echo
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+gettext "TEST: A Shell test string"
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+eval_gettext "TEST: A Shell test \$variable"
+
+# TRANSLATORS: If you see this, Git has a bug
+_("TEST: A Shell string xgettext won't get")
diff --git a/t/t0201-gettext-fallbacks.sh b/t/t0201-gettext-fallbacks.sh
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext Shell fallbacks'
+
+GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=YesPlease
+export GIT_INTERNAL_GETTEXT_TEST_FALLBACKS
+
+. ./lib-gettext.sh
+
+test_expect_success NO_GETTEXT_POISON "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+ test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success NO_GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_TEST_FALLBACKS is set' '
+ test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
+'
+
+test_expect_success NO_GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is fallthrough' '
+ test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "fallthrough"
+'
+
+test_expect_success NO_GETTEXT_POISON 'gettext: our gettext() fallback has pass-through semantics' '
+ printf "test" >expect &&
+ gettext "test" >actual &&
+ test_cmp expect actual &&
+ printf "test more words" >expect &&
+ gettext "test more words" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success NO_GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has pass-through semantics' '
+ printf "test" >expect &&
+ eval_gettext "test" >actual &&
+ test_cmp expect actual &&
+ printf "test more words" >expect &&
+ eval_gettext "test more words" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success NO_GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback can interpolate variables' '
+ printf "test YesPlease" >expect &&
+ eval_gettext "test \$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t0202-gettext-perl.sh b/t/t0202-gettext-perl.sh
--- /dev/null
+++ b/t/t0202-gettext-perl.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Perl gettext interface (Git::I18N)'
+
+. ./lib-gettext.sh
+
+if ! test_have_prereq PERL; then
+ skip_all='skipping perl interface tests, perl not available'
+ test_done
+fi
+
+"$PERL_PATH" -MTest::More -e 0 2>/dev/null || {
+ skip_all="Perl Test::More unavailable, skipping test"
+ test_done
+}
+
+# The external test will outputs its own plan
+test_external_has_tap=1
+
+test_external_without_stderr \
+ 'Perl Git::I18N API' \
+ "$PERL_PATH" "$TEST_DIRECTORY"/t0202/test.pl
+
+test_done
diff --git a/t/t0202/test.pl b/t/t0202/test.pl
--- /dev/null
+++ b/t/t0202/test.pl
@@ -0,0 +1,109 @@
+#!/usr/bin/perl
+use 5.006002;
+use lib (split(/:/, $ENV{GITPERLLIB}));
+use warnings;
+use strict;
+use Test::More tests => 9;
+use Git::I18N;
+use POSIX qw(:locale_h);
+
+my $has_gettext_library = $Git::I18N::__HAS_LIBRARY;
+
+ok(1, "Testing Git::I18N version $Git::I18N::VERSION with " .
+ ($has_gettext_library
+ ? (defined $Locale::Messages::VERSION
+ ? "Locale::Messages version $Locale::Messages::VERSION"
+ : "Locale::Messages version <1.17")
+ : "NO Perl gettext library"));
+ok(1, "Git::I18N is located at $INC{'Git/I18N.pm'}");
+
+ok($Git::I18N::VERSION, 'sanity: Git::I18N defines a $VERSION');
+{
+ my $exports = @Git::I18N::EXPORT;
+ ok($exports, "sanity: Git::I18N has $exports export(s)");
+}
+is_deeply(\@Git::I18N::EXPORT, \@Git::I18N::EXPORT_OK, "sanity: Git::I18N exports everything by default");
+
+# prototypes
+{
+ # Add prototypes here when modifying the public interface to add
+ # more gettext wrapper functions.
+ my %prototypes = (qw(
+ __ $
+ ));
+ while (my ($sub, $proto) = each %prototypes) {
+ is(prototype(\&{"Git::I18N::$sub"}), $proto, "sanity: $sub has a $proto prototype");
+ }
+}
+
+# Test basic passthrough in the C locale
+{
+ local $ENV{LANGUAGE} = 'C';
+ local $ENV{LC_ALL} = 'C';
+ local $ENV{LANG} = 'C';
+
+ my ($got, $expect) = (('TEST: A Perl test string') x 2);
+
+ is(__($got), $expect, "Passing a string through __() in the C locale works");
+}
+
+# Test a basic message on different locales
+SKIP: {
+ unless ($ENV{GETTEXT_LOCALE}) {
+ # Can't reliably test __() with a non-C locales because the
+ # required locales may not be installed on the system.
+ #
+ # We test for these anyway as part of the shell
+ # tests. Skipping these here will eliminate failures on odd
+ # platforms with incomplete locale data.
+
+ skip "GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests", 2;
+ }
+
+ # The is_IS UTF-8 locale passed from lib-gettext.sh
+ my $is_IS_locale = $ENV{is_IS_locale};
+
+ my $test = sub {
+ my ($got, $expect, $msg, $locale) = @_;
+ # Maybe this system doesn't have the locale we're trying to
+ # test.
+ my $locale_ok = setlocale(LC_ALL, $locale);
+ is(__($got), $expect, "$msg a gettext library + <$locale> locale <$got> turns into <$expect>");
+ };
+
+ my $env_C = sub {
+ $ENV{LANGUAGE} = 'C';
+ $ENV{LC_ALL} = 'C';
+ };
+
+ my $env_is = sub {
+ $ENV{LANGUAGE} = 'is';
+ $ENV{LC_ALL} = $is_IS_locale;
+ };
+
+ # Translation's the same as the original
+ my ($got, $expect) = (('TEST: A Perl test string') x 2);
+
+ if ($has_gettext_library) {
+ {
+ local %ENV; $env_C->();
+ $test->($got, $expect, "With", 'C');
+ }
+
+ {
+ my ($got, $expect) = ($got, 'TILRAUN: Perl tilraunastrengur');
+ local %ENV; $env_is->();
+ $test->($got, $expect, "With", $is_IS_locale);
+ }
+ } else {
+ {
+ local %ENV; $env_C->();
+ $test->($got, $expect, "Without", 'C');
+ }
+
+ {
+ local %ENV; $env_is->();
+ $test->($got, $expect, "Without", 'is');
+ }
+ }
+}
diff --git a/t/t0203-gettext-setlocale-sanity.sh b/t/t0203-gettext-setlocale-sanity.sh
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description="The Git C functions aren't broken by setlocale(3)"
+
+. ./lib-gettext.sh
+
+test_expect_success 'git show a ISO-8859-1 commit under C locale' '
+ . "$TEST_DIRECTORY"/t3901-8859-1.txt &&
+ test_commit "iso-c-commit" iso-under-c &&
+ git show >out 2>err &&
+ ! test -s err &&
+ grep -q "iso-c-commit" out
+'
+
+test_expect_success GETTEXT_LOCALE 'git show a ISO-8859-1 commit under a UTF-8 locale' '
+ . "$TEST_DIRECTORY"/t3901-8859-1.txt &&
+ test_commit "iso-utf8-commit" iso-under-utf8 &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err &&
+ ! test -s err &&
+ grep -q "iso-utf8-commit" out
+'
+
+test_done
diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description="Gettext reencoding of our *.po/*.mo files works"
+
+. ./lib-gettext.sh
+
+
+test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic' '
+ printf "TILRAUN: Halló Heimur!" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: Hello World!" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes' '
+ printf "TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: Old English Runes" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic' '
+ printf "TILRAUN: Halló Heimur!" | iconv -f UTF-8 -t ISO8859-1 >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Hello World!" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes' '
+ LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Old English Runes" >runes &&
+
+ if grep "^TEST: Old English Runes$" runes
+ then
+ say "Your system can not handle this complexity and returns the string as-is"
+ else
+ # Both Solaris and GNU libintl will return this stream of
+ # question marks, so it is s probably portable enough
+ printf "TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????" >runes-expect &&
+ test_cmp runes-expect runes
+ fi
+'
+
+test_expect_success GETTEXT_LOCALE 'gettext: Fetching a UTF-8 msgid -> UTF-8' '
+ printf "TILRAUN: ‚einfaldar‘ og „tvöfaldar“ gæsalappir" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: ‘single’ and “double” quotes" >actual &&
+ test_cmp expect actual
+'
+
+# How these quotes get transliterated depends on the gettext implementation:
+#
+# Debian: ,einfaldar' og ,,tvöfaldar" [GNU libintl]
+# FreeBSD: `einfaldar` og "tvöfaldar" [GNU libintl]
+# Solaris: ?einfaldar? og ?tvöfaldar? [Solaris libintl]
+#
+# Just make sure the contents are transliterated, and don't use grep -q
+# so that these differences are emitted under --verbose for curious
+# eyes.
+test_expect_success GETTEXT_ISO_LOCALE 'gettext: Fetching a UTF-8 msgid -> ISO-8859-1' '
+ LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: ‘single’ and “double” quotes" >actual &&
+ grep "einfaldar" actual &&
+ grep "$(echo tvöfaldar | iconv -f UTF-8 -t ISO8859-1)" actual
+'
+
+test_expect_success GETTEXT_LOCALE 'gettext.c: git init UTF-8 -> UTF-8' '
+ printf "Bjó til tóma Git lind" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_locale" git init repo >actual &&
+ test_when_finished "rm -rf repo" &&
+ grep "^$(cat expect) " actual
+'
+
+test_expect_success GETTEXT_ISO_LOCALE 'gettext.c: git init UTF-8 -> ISO-8859-1' '
+ printf "Bjó til tóma Git lind" >expect &&
+ LANGUAGE=is LC_ALL="$is_IS_iso_locale" git init repo >actual &&
+ test_when_finished "rm -rf repo" &&
+ grep "^$(cat expect | iconv -f UTF-8 -t ISO8859-1) " actual
+'
+
+test_done
diff --git a/t/t0205-gettext-poison.sh b/t/t0205-gettext-poison.sh
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext Shell poison'
+
+. ./lib-gettext.sh
+
+test_expect_success GETTEXT_POISON "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+ test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison' '
+ test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
+'
+
+test_expect_success GETTEXT_POISON 'gettext: our gettext() fallback has poison semantics' '
+ printf "# GETTEXT POISON #" >expect &&
+ gettext "test" >actual &&
+ test_cmp expect actual &&
+ printf "# GETTEXT POISON #" >expect &&
+ gettext "test more words" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has poison semantics' '
+ printf "# GETTEXT POISON #" >expect &&
+ eval_gettext "test" >actual &&
+ test_cmp expect actual &&
+ printf "# GETTEXT POISON #" >expect &&
+ eval_gettext "test more words" >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index bfa2c2190d0368eba533a8411df739eee77fa1be..fb02cac682500b57b617ec14472b36cdc638ed3c 100755 (executable)
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
git checkout mybranch &&
git merge -m "Merge upstream changes." master |
sed -e "1s/[0-9a-f]\{7\}/VARIABLE/g" \
- -e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output &&
+ -e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output
+'
+
+test_expect_success NO_GETTEXT_POISON 'git resolve output' '
test_cmp resolve.expect resolve.output
'
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index f072a8ed48ce87267c72635f417bc0b3ebe03f19..da6252b1179c47d39393c983d88c75d84a507cb7 100755 (executable)
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
- echo "$TRASH_DIRECTORY/repo.git/work" >expected &&
+ echo "$(pwd)/repo.git/work" >expected &&
test_cmp expected actual
'
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index c3798ce17917827c5a00bed09b2475d761fde32d..15101d5e032fbbef4a66039342d07afbc5203ee0 100755 (executable)
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
#!/bin/sh
-test_description='Tests of cwd/prefix/worktree/gitdir setup in all cases'
+test_description="Tests of cwd/prefix/worktree/gitdir setup in all cases
-. ./test-lib.sh
-
-#
-# A few rules for repo setup:
-#
-# 1. GIT_DIR is relative to user's cwd. --git-dir is equivalent to
-# GIT_DIR.
-#
-# 2. .git file is relative to parent directory. .git file is basically
-# symlink in disguise. The directory where .git file points to will
-# become new git_dir.
-#
-# 3. core.worktree is relative to git_dir.
-#
-# 4. GIT_WORK_TREE is relative to user's cwd. --work-tree is
-# equivalent to GIT_WORK_TREE.
-#
-# 5. GIT_WORK_TREE/core.worktree is only effective if GIT_DIR is set
-# Uneffective worktree settings should be warned.
-#
-# 6. Effective GIT_WORK_TREE overrides core.worktree and core.bare
-#
-# 7. Effective core.worktree conflicts with core.bare
-#
-# 8. If GIT_DIR is set but neither worktree nor bare setting is given,
-# original cwd becomes worktree.
-#
-# 9. If .git discovery is done inside a repo, the repo becomes a bare
-# repo. .git discovery is performed if GIT_DIR is not set.
-#
-# 10. If no worktree is available, cwd remains unchanged, prefix is
-# NULL.
-#
-# 11. When user's cwd is outside worktree, cwd remains unchanged,
-# prefix is NULL.
-#
-
-test_repo() {
- (
- cd "$1" &&
- if test -n "$2"; then GIT_DIR="$2" && export GIT_DIR; fi &&
- if test -n "$3"; then GIT_WORK_TREE="$3" && export GIT_WORK_TREE; fi &&
- rm -f trace &&
- GIT_TRACE="`pwd`/trace" git symbolic-ref HEAD >/dev/null &&
- grep '^setup: ' trace >result &&
- test_cmp expected result
- )
-}
-
-# Bit 0 = GIT_WORK_TREE
-# Bit 1 = GIT_DIR
-# Bit 2 = core.worktree
-# Bit 3 = .git is a file
-# Bit 4 = bare repo
-# Case# = encoding of the above 5 bits
-
-#
-# Case #0
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# - worktree is .git's parent directory
-# - cwd is at worktree root dir
-# - prefix is calculated
-# - git_dir is set to ".git"
-# - cwd can't be outside worktree
-
-test_expect_success '#0: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 0 0/sub &&
- cd 0 && git init && cd ..
-'
-
-test_expect_success '#0: at root' '
- cat >0/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/0
-setup: cwd: $TRASH_DIRECTORY/0
-setup: prefix: (null)
-EOF
- test_repo 0
-'
-
-test_expect_success '#0: in subdir' '
- cat >0/sub/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/0
-setup: cwd: $TRASH_DIRECTORY/0
-setup: prefix: sub/
-EOF
- test_repo 0/sub
-'
-
-#
-# case #1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# GIT_WORK_TREE is ignored -> #0
-
-test_expect_success '#1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub &&
- cd 1 &&
- git init &&
- GIT_WORK_TREE=non-existent &&
- export GIT_WORK_TREE &&
- cd ..
-'
-
-test_expect_success '#1: at root' '
- cat >1/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/1
-setup: cwd: $TRASH_DIRECTORY/1
-setup: prefix: (null)
-EOF
- test_repo 1
-'
-
-test_expect_success '#1: in subdir' '
- cat >1/sub/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/1
-setup: cwd: $TRASH_DIRECTORY/1
-setup: prefix: sub/
-EOF
- test_repo 1/sub
-'
-
-#
-# case #2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# - worktree is at original cwd
-# - cwd is unchanged
-# - prefix is NULL
-# - git_dir is set to $GIT_DIR
-# - cwd can't be outside worktree
-
-test_expect_success '#2: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 2 2/sub &&
- cd 2 && git init && cd ..
-'
-
-test_expect_success '#2: at root' '
- cat >2/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/2/.git
-setup: worktree: $TRASH_DIRECTORY/2
-setup: cwd: $TRASH_DIRECTORY/2
-setup: prefix: (null)
-EOF
- test_repo 2 "$TRASH_DIRECTORY/2/.git"
-'
-
-test_expect_success '#2: in subdir' '
- cat >2/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/2/.git
-setup: worktree: $TRASH_DIRECTORY/2/sub
-setup: cwd: $TRASH_DIRECTORY/2/sub
-setup: prefix: (null)
-EOF
- test_repo 2/sub "$TRASH_DIRECTORY/2/.git"
-'
-
-test_expect_success '#2: relative GIT_DIR at root' '
- cat >2/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/2
-setup: cwd: $TRASH_DIRECTORY/2
-setup: prefix: (null)
-EOF
- test_repo 2 .git
-'
-
-test_expect_success '#2: relative GIT_DIR in subdir' '
- cat >2/sub/expected <<EOF &&
-setup: git_dir: ../.git
-setup: worktree: $TRASH_DIRECTORY/2/sub
-setup: cwd: $TRASH_DIRECTORY/2/sub
-setup: prefix: (null)
-EOF
- test_repo 2/sub ../.git
-'
-
-#
-# case #3
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# - worktree is set to $GIT_WORK_TREE
-# - cwd is at worktree root
-# - prefix is calculated
-# - git_dir is set to $GIT_DIR
-# - cwd can be outside worktree
-
-test_expect_success '#3: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 3 3/sub 3/sub/sub 3.wt 3.wt/sub 3/wt 3/wt/sub &&
- cd 3 && git init && cd ..
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 .git "$TRASH_DIRECTORY/3"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 .git .
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY/3"
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" .
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: sub/sub/
-EOF
- test_repo 3/sub/sub ../../.git "$TRASH_DIRECTORY/3"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: sub/sub/
-EOF
- test_repo 3/sub/sub ../../.git ../..
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >3/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: sub/
-EOF
- test_repo 3/sub "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY/3"
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: sub/sub/
-EOF
- test_repo 3/sub/sub "$TRASH_DIRECTORY/3/.git" ../..
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 .git "$TRASH_DIRECTORY/3/wt"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 .git wt
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" wt
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3
-setup: prefix: (null)
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY/3/wt"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 3/sub/sub ../../.git "$TRASH_DIRECTORY/3/wt"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 3/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 3/sub/sub "$TRASH_DIRECTORY/3/.git" ../../wt
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY/3/wt
-setup: cwd: $TRASH_DIRECTORY/3/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 3/sub/sub "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY/3/wt"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/
-EOF
- test_repo 3 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/
-EOF
- test_repo 3 .git ..
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" ..
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >3/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/
-EOF
- test_repo 3 "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/sub/sub/
-EOF
- test_repo 3/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#3: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/sub/sub/
-EOF
- test_repo 3/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/sub/sub/
-EOF
- test_repo 3/sub/sub "$TRASH_DIRECTORY/3/.git" ../../../
-'
-
-test_expect_success '#3: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >3/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/3/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 3/sub/sub/
-EOF
- test_repo 3/sub/sub "$TRASH_DIRECTORY/3/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #4
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# core.worktree is ignored -> #0
-
-test_expect_success '#4: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 4 4/sub &&
- cd 4 &&
- git init &&
- git config core.worktree non-existent &&
- cd ..
-'
-
-test_expect_success '#4: at root' '
- cat >4/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/4
-setup: cwd: $TRASH_DIRECTORY/4
-setup: prefix: (null)
-EOF
- test_repo 4
-'
-
-test_expect_success '#4: in subdir' '
- cat >4/sub/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/4
-setup: cwd: $TRASH_DIRECTORY/4
-setup: prefix: sub/
-EOF
- test_repo 4/sub
-'
-
-#
-# case #5
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# GIT_WORK_TREE/core.worktree are ignored -> #0
-
-test_expect_success '#5: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 5 5/sub &&
- cd 5 &&
- git init &&
- git config core.worktree non-existent &&
- GIT_WORK_TREE=non-existent-too &&
- export GIT_WORK_TREE &&
- cd ..
-'
-
-test_expect_success '#5: at root' '
- cat >5/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/5
-setup: cwd: $TRASH_DIRECTORY/5
-setup: prefix: (null)
-EOF
- test_repo 5
-'
-
-test_expect_success '#5: in subdir' '
- cat >5/sub/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/5
-setup: cwd: $TRASH_DIRECTORY/5
-setup: prefix: sub/
-EOF
- test_repo 5/sub
-'
-
-#
-# case #6
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# - worktree is at core.worktree
-# - cwd is at worktree root
-# - prefix is calculated
-# - git_dir is at $GIT_DIR
-# - cwd can be outside worktree
-
-test_expect_success '#6: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 6 6/sub 6/sub/sub 6.wt 6.wt/sub 6/wt 6/wt/sub &&
- cd 6 && git init && cd ..
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=.. at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6" &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=..(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree .. &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=.. at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6" &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=..(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree .. &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=.. in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6" &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=..(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree .. &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=.. in subdir' '
- cat >6/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6" &&
- test_repo 6/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=..(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree .. &&
- test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../wt at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6/wt" &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../wt(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../wt &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../wt(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../wt &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../wt at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6/wt" &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../wt in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6/wt" &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../wt(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../wt &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../wt(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../wt &&
- test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../wt in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY/6/wt
-setup: cwd: $TRASH_DIRECTORY/6/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY/6/wt" &&
- test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../.. at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../..(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../../ &&
- test_repo 6 .git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../..(rel) at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../../ &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../.. at root' '
- cat >6/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 6 "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../.. in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR(rel), core.worktree=../..(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../.. &&
- test_repo 6/sub/sub ../../.git
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../..(rel) in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree ../.. &&
- test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-test_expect_success '#6: GIT_DIR, core.worktree=../.. in subdir' '
- cat >6/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/6/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 6/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/6/.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git"
-'
-
-#
-# case #7
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# core.worktree is overridden by GIT_WORK_TREE -> #3
-
-test_expect_success '#7: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub &&
- cd 7 &&
- git init &&
- git config core.worktree non-existent &&
- cd ..
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 .git "$TRASH_DIRECTORY/7"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 .git .
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY/7"
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" .
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: sub/sub/
-EOF
- test_repo 7/sub/sub ../../.git "$TRASH_DIRECTORY/7"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: sub/sub/
-EOF
- test_repo 7/sub/sub ../../.git ../..
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >7/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: sub/
-EOF
- test_repo 7/sub "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY/7"
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: sub/sub/
-EOF
- test_repo 7/sub/sub "$TRASH_DIRECTORY/7/.git" ../..
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 .git "$TRASH_DIRECTORY/7/wt"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 .git wt
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" wt
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7
-setup: prefix: (null)
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY/7/wt"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 7/sub/sub ../../.git "$TRASH_DIRECTORY/7/wt"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 7/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 7/sub/sub "$TRASH_DIRECTORY/7/.git" ../../wt
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY/7/wt
-setup: cwd: $TRASH_DIRECTORY/7/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 7/sub/sub "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY/7/wt"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/
-EOF
- test_repo 7 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/
-EOF
- test_repo 7 .git ..
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" ..
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >7/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/
-EOF
- test_repo 7 "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/sub/sub/
-EOF
- test_repo 7/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/sub/sub/
-EOF
- test_repo 7/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/sub/sub/
-EOF
- test_repo 7/sub/sub "$TRASH_DIRECTORY/7/.git" ../../../
-'
-
-test_expect_success '#7: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >7/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/7/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 7/sub/sub/
-EOF
- test_repo 7/sub/sub "$TRASH_DIRECTORY/7/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #8
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #0 except that git_dir is set by .git file
-
-test_expect_success '#8: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 8 8/sub &&
- cd 8 &&
- git init &&
- mv .git ../8.git &&
- echo gitdir: ../8.git >.git &&
- cd ..
-'
-
-test_expect_success '#8: at root' '
- cat >8/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/8.git
-setup: worktree: $TRASH_DIRECTORY/8
-setup: cwd: $TRASH_DIRECTORY/8
-setup: prefix: (null)
-EOF
- test_repo 8
-'
-
-test_expect_success '#8: in subdir' '
- cat >8/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/8.git
-setup: worktree: $TRASH_DIRECTORY/8
-setup: cwd: $TRASH_DIRECTORY/8
-setup: prefix: sub/
-EOF
- test_repo 8/sub
-'
-
-#
-# case #9
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #1 except that git_dir is set by .git file
-
-test_expect_success '#9: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub &&
- cd 9 &&
- git init &&
- mv .git ../9.git &&
- echo gitdir: ../9.git >.git &&
- GIT_WORK_TREE=non-existent &&
- export GIT_WORK_TREE &&
- cd ..
-'
-
-test_expect_success '#9: at root' '
- cat >9/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/9.git
-setup: worktree: $TRASH_DIRECTORY/9
-setup: cwd: $TRASH_DIRECTORY/9
-setup: prefix: (null)
-EOF
- test_repo 9
-'
-
-test_expect_success '#9: in subdir' '
- cat >9/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/9.git
-setup: worktree: $TRASH_DIRECTORY/9
-setup: cwd: $TRASH_DIRECTORY/9
-setup: prefix: sub/
-EOF
- test_repo 9/sub
-'
-
-#
-# case #10
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #2 except that git_dir is set by .git file
-
-test_expect_success '#10: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 10 10/sub &&
- cd 10 &&
- git init &&
- mv .git ../10.git &&
- echo gitdir: ../10.git >.git &&
- cd ..
-'
-
-test_expect_success '#10: at root' '
- cat >10/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/10.git
-setup: worktree: $TRASH_DIRECTORY/10
-setup: cwd: $TRASH_DIRECTORY/10
-setup: prefix: (null)
-EOF
- test_repo 10 "$TRASH_DIRECTORY/10/.git"
-'
-
-test_expect_success '#10: in subdir' '
- cat >10/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/10.git
-setup: worktree: $TRASH_DIRECTORY/10/sub
-setup: cwd: $TRASH_DIRECTORY/10/sub
-setup: prefix: (null)
-EOF
- test_repo 10/sub "$TRASH_DIRECTORY/10/.git"
-'
-
-test_expect_success '#10: relative GIT_DIR at root' '
- cat >10/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/10.git
-setup: worktree: $TRASH_DIRECTORY/10
-setup: cwd: $TRASH_DIRECTORY/10
-setup: prefix: (null)
-EOF
- test_repo 10 .git
-'
-
-test_expect_success '#10: relative GIT_DIR in subdir' '
- cat >10/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/10.git
-setup: worktree: $TRASH_DIRECTORY/10/sub
-setup: cwd: $TRASH_DIRECTORY/10/sub
-setup: prefix: (null)
-EOF
- test_repo 10/sub ../.git
-'
-
-#
-# case #11
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #3 except that git_dir is set by .git file
-
-test_expect_success '#11: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub &&
- cd 11 &&
- git init &&
- mv .git ../11.git &&
- echo gitdir: ../11.git >.git &&
- cd ..
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 .git "$TRASH_DIRECTORY/11"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 .git .
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY/11"
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" .
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: sub/sub/
-EOF
- test_repo 11/sub/sub ../../.git "$TRASH_DIRECTORY/11"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: sub/sub/
-EOF
- test_repo 11/sub/sub ../../.git ../..
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >11/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: sub/
-EOF
- test_repo 11/sub "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY/11"
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: sub/sub/
-EOF
- test_repo 11/sub/sub "$TRASH_DIRECTORY/11/.git" ../..
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 .git "$TRASH_DIRECTORY/11/wt"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 .git wt
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" wt
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11
-setup: prefix: (null)
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY/11/wt"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 11/sub/sub ../../.git "$TRASH_DIRECTORY/11/wt"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 11/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 11/sub/sub "$TRASH_DIRECTORY/11/.git" ../../wt
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY/11/wt
-setup: cwd: $TRASH_DIRECTORY/11/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 11/sub/sub "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY/11/wt"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/
-EOF
- test_repo 11 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/
-EOF
- test_repo 11 .git ..
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" ..
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >11/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/
-EOF
- test_repo 11 "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/sub/sub/
-EOF
- test_repo 11/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#11: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/sub/sub/
-EOF
- test_repo 11/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/sub/sub/
-EOF
- test_repo 11/sub/sub "$TRASH_DIRECTORY/11/.git" ../../../
-'
-
-test_expect_success '#11: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >11/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/11.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 11/sub/sub/
-EOF
- test_repo 11/sub/sub "$TRASH_DIRECTORY/11/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #12
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #4 except that git_dir is set by .git file
-
-
-test_expect_success '#12: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 12 12/sub 12/sub/sub 12.wt 12.wt/sub 12/wt 12/wt/sub &&
- cd 12 &&
- git init &&
- git config core.worktree non-existent &&
- mv .git ../12.git &&
- echo gitdir: ../12.git >.git &&
- cd ..
-'
-
-test_expect_success '#12: at root' '
- cat >12/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/12.git
-setup: worktree: $TRASH_DIRECTORY/12
-setup: cwd: $TRASH_DIRECTORY/12
-setup: prefix: (null)
-EOF
- test_repo 12
-'
-
-test_expect_success '#12: in subdir' '
- cat >12/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/12.git
-setup: worktree: $TRASH_DIRECTORY/12
-setup: cwd: $TRASH_DIRECTORY/12
-setup: prefix: sub/
-EOF
- test_repo 12/sub
-'
-
-#
-# case #13
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #5 except that git_dir is set by .git file
-
-test_expect_success '#13: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 13 13/sub 13/sub/sub 13.wt 13.wt/sub 13/wt 13/wt/sub &&
- cd 13 &&
- git init &&
- git config core.worktree non-existent &&
- GIT_WORK_TREE=non-existent-too &&
- export GIT_WORK_TREE &&
- mv .git ../13.git &&
- echo gitdir: ../13.git >.git &&
- cd ..
-'
-
-test_expect_success '#13: at root' '
- cat >13/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/13.git
-setup: worktree: $TRASH_DIRECTORY/13
-setup: cwd: $TRASH_DIRECTORY/13
-setup: prefix: (null)
-EOF
- test_repo 13
-'
-
-test_expect_success '#13: in subdir' '
- cat >13/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/13.git
-setup: worktree: $TRASH_DIRECTORY/13
-setup: cwd: $TRASH_DIRECTORY/13
-setup: prefix: sub/
-EOF
- test_repo 13/sub
-'
-
-#
-# case #14
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #6 except that git_dir is set by .git file
-
-test_expect_success '#14: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub &&
- cd 14 &&
- git init &&
- mv .git ../14.git &&
- echo gitdir: ../14.git >.git &&
- cd ..
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14 at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14" &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14 &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14 at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14" &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14 &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14 in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14" &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14 &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14 in subdir' '
- cat >14/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14" &&
- test_repo 14/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14 &&
- test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14/wt at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14/wt" &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14/wt(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14/wt &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14/wt(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14/wt &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14/wt at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14/wt" &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14/wt in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14/wt" &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=../14/wt(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14/wt &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14/wt(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree ../14/wt &&
- test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=../14/wt in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY/14/wt
-setup: cwd: $TRASH_DIRECTORY/14/sub/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY/14/wt" &&
- test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=.. at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=..(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree .. &&
- test_repo 14 .git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=..(rel) at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree .. &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=.. at root' '
- cat >14/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 14 "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=.. in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR(rel), core.worktree=..(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree .. &&
- test_repo 14/sub/sub ../../.git
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=..(rel) in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree .. &&
- test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-test_expect_success '#14: GIT_DIR, core.worktree=.. in subdir' '
- cat >14/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/14.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 14/sub/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/14.git/config" core.worktree "$TRASH_DIRECTORY" &&
- test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git"
-'
-
-#
-# case #15
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is not set, cwd is outside .git
-#
-# Output:
-#
-# #7 except that git_dir is set by .git file
-
-test_expect_success '#15: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub &&
- cd 15 &&
- git init &&
- git config core.worktree non-existent &&
- mv .git ../15.git &&
- echo gitdir: ../15.git >.git &&
- cd ..
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 .git "$TRASH_DIRECTORY/15"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 .git .
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY/15"
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" .
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: sub/sub/
-EOF
- test_repo 15/sub/sub ../../.git "$TRASH_DIRECTORY/15"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: sub/sub/
-EOF
- test_repo 15/sub/sub ../../.git ../..
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >15/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: sub/
-EOF
- test_repo 15/sub "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY/15"
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: sub/sub/
-EOF
- test_repo 15/sub/sub "$TRASH_DIRECTORY/15/.git" ../..
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 .git "$TRASH_DIRECTORY/15/wt"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 .git wt
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" wt
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15
-setup: prefix: (null)
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY/15/wt"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 15/sub/sub ../../.git "$TRASH_DIRECTORY/15/wt"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 15/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 15/sub/sub "$TRASH_DIRECTORY/15/.git" ../../wt
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY/15/wt
-setup: cwd: $TRASH_DIRECTORY/15/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 15/sub/sub "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY/15/wt"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/
-EOF
- test_repo 15 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/
-EOF
- test_repo 15 .git ..
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" ..
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >15/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/
-EOF
- test_repo 15 "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/sub/sub/
-EOF
- test_repo 15/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#15: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/sub/sub/
-EOF
- test_repo 15/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/sub/sub/
-EOF
- test_repo 15/sub/sub "$TRASH_DIRECTORY/15/.git" ../../../
-'
-
-test_expect_success '#15: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >15/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/15.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 15/sub/sub/
-EOF
- test_repo 15/sub/sub "$TRASH_DIRECTORY/15/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #16.1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - cwd is inside .git
-#
-# Output:
-#
-# - no worktree
-# - cwd is unchanged
-# - prefix is NULL
-# - git_dir is set
-# - cwd can't be outside worktree
-
-test_expect_success '#16.1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 16 16/sub &&
- cd 16 &&
- git init &&
- mkdir .git/wt .git/wt/sub &&
- cd ..
-'
-
-test_expect_success '#16.1: at .git' '
- cat >16/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git
-setup: prefix: (null)
-EOF
- test_repo 16/.git
-'
-
-test_expect_success '#16.1: in .git/wt' '
- cat >16/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/16/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 16/.git/wt
-'
-
-test_expect_success '#16.1: in .git/wt/sub' '
- cat >16/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/16/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 16/.git/wt/sub
-'
-
-#
-# case #16.2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# - no worktree
-# - cwd is unchanged
-# - prefix is NULL
-# - git_dir is set
-# - cwd can't be outside worktree
-
-test_expect_success '#16.2: setup' '
- git config --file="$TRASH_DIRECTORY/16/.git/config" core.bare true
-'
-
-test_expect_success '#16.2: at .git' '
- cat >16/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git
-setup: prefix: (null)
-EOF
- test_repo 16/.git
-'
-
-test_expect_success '#16.2: in .git/wt' '
- cat >16/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/16/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 16/.git/wt
-'
-
-test_expect_success '#16.2: in .git/wt/sub' '
- cat >16/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/16/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 16/.git/wt/sub
-'
-
-test_expect_success '#16.2: at root' '
- cat >16/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16
-setup: prefix: (null)
-EOF
- test_repo 16
-'
-
-test_expect_success '#16.2: in subdir' '
- cat >16/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/16/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/16/sub
-setup: prefix: (null)
-EOF
- test_repo 16/sub
-'
-
-#
-# case #17.1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - cwd is inside .git
-#
-# Output:
-#
-# GIT_WORK_TREE is ignored -> #16.1 (with warnings perhaps)
-
-test_expect_success '#17.1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 17 17/sub &&
- cd 17 &&
- git init &&
- mkdir .git/wt .git/wt/sub &&
- GIT_WORK_TREE=non-existent &&
- export GIT_WORK_TREE &&
- cd ..
-'
-
-test_expect_success '#17.1: at .git' '
- cat >17/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git
-setup: prefix: (null)
-EOF
- test_repo 17/.git
-'
-
-test_expect_success '#17.1: in .git/wt' '
- cat >17/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/17/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 17/.git/wt
-'
-
-test_expect_success '#17.1: in .git/wt/sub' '
- cat >17/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/17/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 17/.git/wt/sub
-'
-
-#
-# case #17.2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# GIT_WORK_TREE is ignored -> #16.2 (with warnings perhaps)
-
-test_expect_success '#17.2: setup' '
- git config --file="$TRASH_DIRECTORY/17/.git/config" core.bare true
-'
-
-test_expect_success '#17.2: at .git' '
- cat >17/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git
-setup: prefix: (null)
-EOF
- test_repo 17/.git
-'
-
-test_expect_success '#17.2: in .git/wt' '
- cat >17/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/17/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 17/.git/wt
-'
-
-test_expect_success '#17.2: in .git/wt/sub' '
- cat >17/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/17/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 17/.git/wt/sub
-'
-
-test_expect_success '#17.2: at root' '
- cat >17/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17
-setup: prefix: (null)
-EOF
- test_repo 17
-'
-
-test_expect_success '#17.2: in subdir' '
- cat >17/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/17/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/17/sub
-setup: prefix: (null)
-EOF
- test_repo 17/sub
-'
-
-#
-# case #18
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# - no worktree (rule #8)
-# - cwd is unchanged
-# - prefix is NULL
-# - git_dir is set to $GIT_DIR
-# - cwd can't be outside worktree
-
-test_expect_success '#18: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 18 18/sub &&
- cd 18 &&
- git init &&
- mkdir .git/wt .git/wt/sub &&
- git config core.bare true &&
- cd ..
-'
-
-test_expect_success '#18: (rel) at root' '
- cat >18/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/18
-setup: prefix: (null)
-EOF
- test_repo 18 .git
-'
-
-test_expect_success '#18: at root' '
- cat >18/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/18/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/18
-setup: prefix: (null)
-EOF
- test_repo 18 "$TRASH_DIRECTORY/18/.git"
-'
-
-test_expect_success '#18: (rel) in subdir' '
- cat >18/sub/expected <<EOF &&
-setup: git_dir: ../.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/18/sub
-setup: prefix: (null)
-EOF
- test_repo 18/sub ../.git
-'
-
-test_expect_success '#18: in subdir' '
- cat >18/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/18/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/18/sub
-setup: prefix: (null)
-EOF
- test_repo 18/sub "$TRASH_DIRECTORY/18/.git"
-'
-
-#
-# case #19
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - .git is a directory
-# - core.worktree is not set
-# - core.bare is set
-#
-# Output:
-#
-# bare repo is overridden by GIT_WORK_TREE -> #3
-
-test_expect_success '#19: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub &&
- cd 19 &&
- git init &&
- git config core.bare true &&
- cd ..
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 .git "$TRASH_DIRECTORY/19"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 .git .
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY/19"
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" .
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: sub/sub/
-EOF
- test_repo 19/sub/sub ../../.git "$TRASH_DIRECTORY/19"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: sub/sub/
-EOF
- test_repo 19/sub/sub ../../.git ../..
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >19/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: sub/
-EOF
- test_repo 19/sub "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY/19"
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: sub/sub/
-EOF
- test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" ../..
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 .git "$TRASH_DIRECTORY/19/wt"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 .git wt
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" wt
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19
-setup: prefix: (null)
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY/19/wt"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 19/sub/sub ../../.git "$TRASH_DIRECTORY/19/wt"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 19/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" ../../wt
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY/19/wt
-setup: cwd: $TRASH_DIRECTORY/19/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY/19/wt"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/
-EOF
- test_repo 19 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/
-EOF
- test_repo 19 .git ..
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" ..
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >19/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/
-EOF
- test_repo 19 "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/sub/sub/
-EOF
- test_repo 19/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/sub/sub/
-EOF
- test_repo 19/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/sub/sub/
-EOF
- test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" ../../../
-'
-
-test_expect_success '#19: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >19/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/19/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 19/sub/sub/
-EOF
- test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #20.1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - cwd is inside .git
-#
-# Output:
-#
-# core.worktree is ignored -> #16.1
-
-test_expect_success '#20.1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 20 20/sub &&
- cd 20 &&
- git init &&
- git config core.worktree non-existent &&
- mkdir .git/wt .git/wt/sub &&
- cd ..
-'
-
-test_expect_success '#20.1: at .git' '
- cat >20/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git
-setup: prefix: (null)
-EOF
- test_repo 20/.git
-'
-
-test_expect_success '#20.1: in .git/wt' '
- cat >20/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/20/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 20/.git/wt
-'
-
-test_expect_success '#20.1: in .git/wt/sub' '
- cat >20/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/20/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 20/.git/wt/sub
-'
-
-#
-# case #20.2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# core.worktree is ignored -> #16.2
-
-test_expect_success '#20.2: setup' '
- git config --file="$TRASH_DIRECTORY/20/.git/config" core.bare true
-'
-
-test_expect_success '#20.2: at .git' '
- cat >20/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git
-setup: prefix: (null)
-EOF
- test_repo 20/.git
-'
-
-test_expect_success '#20.2: in .git/wt' '
- cat >20/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/20/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 20/.git/wt
-'
-
-test_expect_success '#20.2: in .git/wt/sub' '
- cat >20/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/20/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 20/.git/wt/sub
-'
-
-test_expect_success '#20.2: at root' '
- cat >20/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20
-setup: prefix: (null)
-EOF
- test_repo 20
-'
-
-test_expect_success '#20.2: in subdir' '
- cat >20/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/20/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/20/sub
-setup: prefix: (null)
-EOF
- test_repo 20/sub
-'
-
-#
-# case #21.1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - cwd is inside .git
-#
-# Output:
-#
-# GIT_WORK_TREE/core.worktree are ignored -> #20.1
-
-test_expect_success '#21.1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 21 21/sub &&
- cd 21 &&
- git init &&
- git config core.worktree non-existent &&
- GIT_WORK_TREE=non-existent-too &&
- export GIT_WORK_TREE &&
- mkdir .git/wt .git/wt/sub &&
- cd ..
-'
-
-test_expect_success '#21.1: at .git' '
- cat >21/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git
-setup: prefix: (null)
-EOF
- test_repo 21/.git
-'
-
-test_expect_success '#21.1: in .git/wt' '
- cat >21/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/21/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 21/.git/wt
-'
-
-test_expect_success '#21.1: in .git/wt/sub' '
- cat >21/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/21/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 21/.git/wt/sub
-'
-
-#
-# case #21.2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# GIT_WORK_TREE/core.worktree are ignored -> #20.2
-
-test_expect_success '#21.2: setup' '
- git config --file="$TRASH_DIRECTORY/21/.git/config" core.bare true
-'
-
-test_expect_success '#21.2: at .git' '
- cat >21/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git
-setup: prefix: (null)
-EOF
- test_repo 21/.git
-'
-
-test_expect_success '#21.2: in .git/wt' '
- cat >21/.git/wt/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/21/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git/wt
-setup: prefix: (null)
-EOF
- test_repo 21/.git/wt
-'
-
-test_expect_success '#21.2: in .git/wt/sub' '
- cat >21/.git/wt/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/21/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/.git/wt/sub
-setup: prefix: (null)
-EOF
- test_repo 21/.git/wt/sub
-'
-
-test_expect_success '#21.2: at root' '
- cat >21/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21
-setup: prefix: (null)
-EOF
- test_repo 21
-'
-
-test_expect_success '#21.2: in subdir' '
- cat >21/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/21/.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/21/sub
-setup: prefix: (null)
-EOF
- test_repo 21/sub
-'
-
-#
-# case #22.1
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a directory
-# - cwd is inside .git
-#
-# Output:
-#
-# bare attribute is ignored
-#
-# - worktree is at core.worktree
-# - cwd is at worktree root
-# - prefix is calculated
-# - git_dir is at $GIT_DIR
-# - cwd can be outside worktree
-
-test_expect_success '#22.1: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 22 &&
- cd 22 &&
- git init &&
- mkdir .git/sub .git/wt .git/wt/sub &&
- cd ..
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=. at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git" &&
- test_repo 22/.git .
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=.(rel) at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree . &&
- test_repo 22/.git .
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=. at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git" &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=.(rel) at root' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree . &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=. in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git" &&
- test_repo 22/.git/sub ..
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=.(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree . &&
- test_repo 22/.git/sub/ ..
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=. in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git" &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=.(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree . &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=wt at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git/wt" &&
- test_repo 22/.git .
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=wt(rel) at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: .
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree wt &&
- test_repo 22/.git .
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=wt(rel) at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree wt &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=wt at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git/wt" &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=wt in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: ..
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git/wt" &&
- test_repo 22/.git/sub ..
-'
-
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=wt(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: ..
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree wt &&
- test_repo 22/.git/sub ..
-'
-
-test_expect_success '#22.1: GIT_DIR, core.worktree=wt(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree wt &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
+A few rules for repo setup:
-test_expect_success '#22.1: GIT_DIR, core.worktree=wt in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22/.git/wt
-setup: cwd: $TRASH_DIRECTORY/22/.git/sub
-setup: prefix: (null)
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22/.git/wt" &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
+1. GIT_DIR is relative to user's cwd. --git-dir is equivalent to
+ GIT_DIR.
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=.. at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22" &&
- test_repo 22/.git .
-'
+2. .git file is relative to parent directory. .git file is basically
+ symlink in disguise. The directory where .git file points to will
+ become new git_dir.
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=..(rel) at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree .. &&
- test_repo 22/.git .
-'
+3. core.worktree is relative to git_dir.
-test_expect_success '#22.1: GIT_DIR, core.worktree=..(rel) at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree .. &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
+4. GIT_WORK_TREE is relative to user's cwd. --work-tree is
+ equivalent to GIT_WORK_TREE.
-test_expect_success '#22.1: GIT_DIR, core.worktree=.. at .git' '
- cat >22/.git/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22" &&
- test_repo 22/.git "$TRASH_DIRECTORY/22/.git"
-'
+5. GIT_WORK_TREE/core.worktree was originally meant to work only if
+ GIT_DIR is set, but earlier git didn't enforce it, and some scripts
+ depend on the implementation that happened to first discover .git by
+ going up from the users $cwd and then using the specified working tree
+ that may or may not have any relation to where .git was found in. This
+ historical behaviour must be kept.
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=.. in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22" &&
- test_repo 22/.git/sub ..
-'
+6. Effective GIT_WORK_TREE overrides core.worktree and core.bare
-test_expect_success '#22.1: GIT_DIR(rel), core.worktree=..(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree .. &&
- test_repo 22/.git/sub ..
-'
+7. Effective core.worktree conflicts with core.bare
-test_expect_success '#22.1: GIT_DIR, core.worktree=..(rel) in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree .. &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
+8. If GIT_DIR is set but neither worktree nor bare setting is given,
+ original cwd becomes worktree.
-test_expect_success '#22.1: GIT_DIR, core.worktree=.. in .git/sub' '
- cat >22/.git/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/22/.git
-setup: worktree: $TRASH_DIRECTORY/22
-setup: cwd: $TRASH_DIRECTORY/22
-setup: prefix: .git/sub/
-EOF
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.worktree "$TRASH_DIRECTORY/22" &&
- test_repo 22/.git/sub "$TRASH_DIRECTORY/22/.git"
-'
+9. If .git discovery is done inside a repo, the repo becomes a bare
+ repo. .git discovery is performed if GIT_DIR is not set.
-#
-# case #22.2
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# core.worktree and core.bare conflict, won't fly.
+10. If no worktree is available, cwd remains unchanged, prefix is
+ NULL.
-test_expect_success '#22.2: setup' '
- git config --file="$TRASH_DIRECTORY/22/.git/config" core.bare true
-'
+11. When user's cwd is outside worktree, cwd remains unchanged,
+ prefix is NULL.
+"
+. ./test-lib.sh
-test_expect_success '#22.2: at .git' '
- (
- cd 22/.git &&
- GIT_DIR=. &&
- export GIT_DIR &&
- test_must_fail git symbolic-ref HEAD 2>result &&
- grep "core.bare and core.worktree do not make sense" result
- )
-'
+here=$(pwd)
-test_expect_success '#22.2: at root' '
+test_repo () {
(
- cd 22 &&
- GIT_DIR=.git &&
- export GIT_DIR &&
- test_must_fail git symbolic-ref HEAD 2>result &&
- grep "core.bare and core.worktree do not make sense" result
+ cd "$1" &&
+ if test -n "$2"
+ then
+ GIT_DIR="$2" &&
+ export GIT_DIR
+ fi &&
+ if test -n "$3"
+ then
+ GIT_WORK_TREE="$3" &&
+ export GIT_WORK_TREE
+ fi &&
+ rm -f trace &&
+ GIT_TRACE="$(pwd)/trace" git symbolic-ref HEAD >/dev/null &&
+ grep '^setup: ' trace >result &&
+ test_cmp expected result
)
-'
-
-#
-# case #23
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a directory
-# - core.bare is set
-#
-# Output:
-#
-# core.worktree is overridden by GIT_WORK_TREE -> #19
-
-test_expect_success '#23: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub &&
- cd 23 &&
- git init &&
- git config core.bare true &&
- git config core.worktree non-existent &&
- cd ..
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 .git "$TRASH_DIRECTORY/23"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 .git .
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY/23"
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" .
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: sub/sub/
-EOF
- test_repo 23/sub/sub ../../.git "$TRASH_DIRECTORY/23"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: sub/sub/
-EOF
- test_repo 23/sub/sub ../../.git ../..
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >23/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: sub/
-EOF
- test_repo 23/sub "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY/23"
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: sub/sub/
-EOF
- test_repo 23/sub/sub "$TRASH_DIRECTORY/23/.git" ../..
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 .git "$TRASH_DIRECTORY/23/wt"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: .git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 .git wt
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" wt
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23
-setup: prefix: (null)
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY/23/wt"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 23/sub/sub ../../.git "$TRASH_DIRECTORY/23/wt"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: ../../.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 23/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 23/sub/sub "$TRASH_DIRECTORY/23/.git" ../../wt
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY/23/wt
-setup: cwd: $TRASH_DIRECTORY/23/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 23/sub/sub "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY/23/wt"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/
-EOF
- test_repo 23 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/
-EOF
- test_repo 23 .git ..
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" ..
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >23/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/
-EOF
- test_repo 23 "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/sub/sub/
-EOF
- test_repo 23/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/sub/sub/
-EOF
- test_repo 23/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/sub/sub/
-EOF
- test_repo 23/sub/sub "$TRASH_DIRECTORY/23/.git" ../../../
-'
-
-test_expect_success '#23: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >23/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/23/.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 23/sub/sub/
-EOF
- test_repo 23/sub/sub "$TRASH_DIRECTORY/23/.git" "$TRASH_DIRECTORY"
-'
-
-#
-# case #24
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# #16.2 except git_dir is set according to .git file
-
-test_expect_success '#24: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 24 24/sub &&
- cd 24 &&
- git init &&
- git config core.bare true &&
- mv .git ../24.git &&
- echo gitdir: ../24.git >.git &&
- cd ..
-'
-
-test_expect_success '#24: at root' '
- cat >24/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/24.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/24
-setup: prefix: (null)
-EOF
- test_repo 24
-'
-
-test_expect_success '#24: in subdir' '
- cat >24/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/24.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/24/sub
-setup: prefix: (null)
-EOF
- test_repo 24/sub
-'
-
-#
-# case #25
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# #17.2 except git_dir is set according to .git file
-
-test_expect_success '#25: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 25 25/sub &&
- cd 25 &&
- git init &&
- git config core.bare true &&
- GIT_WORK_TREE=non-existent &&
- export GIT_WORK_TREE &&
- mv .git ../25.git &&
- echo gitdir: ../25.git >.git &&
- cd ..
-'
-
-test_expect_success '#25: at root' '
- cat >25/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/25.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/25
-setup: prefix: (null)
-EOF
- test_repo 25
-'
-
-test_expect_success '#25: in subdir' '
- cat >25/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/25.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/25/sub
-setup: prefix: (null)
-EOF
- test_repo 25/sub
-'
+}
-#
-# case #26
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is not set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# #18 except git_dir is set according to .git file
+maybe_config () {
+ file=$1 var=$2 value=$3 &&
+ if test "$value" != unset
+ then
+ git config --file="$file" "$var" "$value"
+ fi
+}
-test_expect_success '#26: setup' '
+setup_repo () {
+ name=$1 worktreecfg=$2 gitfile=$3 barecfg=$4 &&
sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 26 26/sub &&
- cd 26 &&
- git init &&
- git config core.bare true &&
- mv .git ../26.git &&
- echo gitdir: ../26.git >.git &&
- cd ..
-'
-
-test_expect_success '#26: (rel) at root' '
- cat >26/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/26.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/26
-setup: prefix: (null)
-EOF
- test_repo 26 .git
-'
-test_expect_success '#26: at root' '
- cat >26/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/26.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/26
-setup: prefix: (null)
-EOF
- test_repo 26 "$TRASH_DIRECTORY/26/.git"
-'
-
-test_expect_success '#26: (rel) in subdir' '
- cat >26/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/26.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/26/sub
-setup: prefix: (null)
-EOF
- test_repo 26/sub ../.git
-'
+ git init "$name" &&
+ maybe_config "$name/.git/config" core.worktree "$worktreecfg" &&
+ maybe_config "$name/.git/config" core.bare "$barecfg" &&
+ mkdir -p "$name/sub/sub" &&
-test_expect_success '#26: in subdir' '
- cat >26/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/26.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/26/sub
-setup: prefix: (null)
-EOF
- test_repo 26/sub "$TRASH_DIRECTORY/26/.git"
-'
+ if test "${gitfile:+set}"
+ then
+ mv "$name/.git" "$name.git" &&
+ echo "gitdir: ../$name.git" >"$name/.git"
+ fi
+}
-#
-# case #27
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - .git is a file
-# - core.worktree is not set
-# - core.bare is set
-#
-# Output:
-#
-# #19 except git_dir is set according to .git file
+maybe_set () {
+ var=$1 value=$2 &&
+ if test "$value" != unset
+ then
+ eval "$var=\$value" &&
+ export $var
+ fi
+}
-test_expect_success '#27: setup' '
+setup_env () {
+ worktreenv=$1 gitdirenv=$2 &&
sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub &&
- cd 27 &&
- git init &&
- git config core.bare true &&
- mv .git ../27.git &&
- echo gitdir: ../27.git >.git &&
- cd ..
-'
-
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 .git "$TRASH_DIRECTORY/27"
-'
-
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 .git .
-'
-
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY/27"
-'
-
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" .
-'
-
-test_expect_success '#27: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: sub/sub/
-EOF
- test_repo 27/sub/sub ../../.git "$TRASH_DIRECTORY/27"
-'
+ maybe_set GIT_DIR "$gitdirenv" &&
+ maybe_set GIT_WORK_TREE "$worktreeenv"
+}
-test_expect_success '#27: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: sub/sub/
-EOF
- test_repo 27/sub/sub ../../.git ../..
-'
+expect () {
+ cat >"$1/expected" <<-EOF
+ setup: git_dir: $2
+ setup: worktree: $3
+ setup: cwd: $4
+ setup: prefix: $5
+ EOF
+}
-test_expect_success '#27: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >27/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: sub/
-EOF
- test_repo 27/sub "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY/27"
-'
+try_case () {
+ name=$1 worktreeenv=$2 gitdirenv=$3 &&
+ setup_env "$worktreeenv" "$gitdirenv" &&
+ expect "$name" "$4" "$5" "$6" "$7" &&
+ test_repo "$name"
+}
-test_expect_success '#27: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: sub/sub/
-EOF
- test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" ../..
-'
+run_wt_tests () {
+ N=$1 gitfile=$2
+
+ absgit="$here/$N/.git"
+ dotgit=.git
+ dotdotgit=../../.git
+
+ if test "$gitfile"
+ then
+ absgit="$here/$N.git"
+ dotgit=$absgit dotdotgit=$absgit
+ fi
+
+ test_expect_success "#$N: explicit GIT_WORK_TREE and GIT_DIR at toplevel" '
+ try_case $N "$here/$N" .git \
+ "$dotgit" "$here/$N" "$here/$N" "(null)" &&
+ try_case $N . .git \
+ "$dotgit" "$here/$N" "$here/$N" "(null)" &&
+ try_case $N "$here/$N" "$here/$N/.git" \
+ "$absgit" "$here/$N" "$here/$N" "(null)" &&
+ try_case $N . "$here/$N/.git" \
+ "$absgit" "$here/$N" "$here/$N" "(null)"
+ '
+
+ test_expect_success "#$N: explicit GIT_WORK_TREE and GIT_DIR in subdir" '
+ try_case $N/sub/sub "$here/$N" ../../.git \
+ "$absgit" "$here/$N" "$here/$N" sub/sub/ &&
+ try_case $N/sub/sub ../.. ../../.git \
+ "$absgit" "$here/$N" "$here/$N" sub/sub/ &&
+ try_case $N/sub/sub "$here/$N" "$here/$N/.git" \
+ "$absgit" "$here/$N" "$here/$N" sub/sub/ &&
+ try_case $N/sub/sub ../.. "$here/$N/.git" \
+ "$absgit" "$here/$N" "$here/$N" sub/sub/
+ '
+
+ test_expect_success "#$N: explicit GIT_WORK_TREE from parent of worktree" '
+ try_case $N "$here/$N/wt" .git \
+ "$dotgit" "$here/$N/wt" "$here/$N" "(null)" &&
+ try_case $N wt .git \
+ "$dotgit" "$here/$N/wt" "$here/$N" "(null)" &&
+ try_case $N wt "$here/$N/.git" \
+ "$absgit" "$here/$N/wt" "$here/$N" "(null)" &&
+ try_case $N "$here/$N/wt" "$here/$N/.git" \
+ "$absgit" "$here/$N/wt" "$here/$N" "(null)"
+ '
+
+ test_expect_success "#$N: explicit GIT_WORK_TREE from nephew of worktree" '
+ try_case $N/sub/sub "$here/$N/wt" ../../.git \
+ "$dotdotgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
+ try_case $N/sub/sub ../../wt ../../.git \
+ "$dotdotgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
+ try_case $N/sub/sub ../../wt "$here/$N/.git" \
+ "$absgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
+ try_case $N/sub/sub "$here/$N/wt" "$here/$N/.git" \
+ "$absgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)"
+ '
+
+ test_expect_success "#$N: chdir_to_toplevel uses worktree, not git dir" '
+ try_case $N "$here" .git \
+ "$absgit" "$here" "$here" $N/ &&
+ try_case $N .. .git \
+ "$absgit" "$here" "$here" $N/ &&
+ try_case $N .. "$here/$N/.git" \
+ "$absgit" "$here" "$here" $N/ &&
+ try_case $N "$here" "$here/$N/.git" \
+ "$absgit" "$here" "$here" $N/
+ '
+
+ test_expect_success "#$N: chdir_to_toplevel uses worktree (from subdir)" '
+ try_case $N/sub/sub "$here" ../../.git \
+ "$absgit" "$here" "$here" $N/sub/sub/ &&
+ try_case $N/sub/sub ../../.. ../../.git \
+ "$absgit" "$here" "$here" $N/sub/sub/ &&
+ try_case $N/sub/sub ../../../ "$here/$N/.git" \
+ "$absgit" "$here" "$here" $N/sub/sub/ &&
+ try_case $N/sub/sub "$here" "$here/$N/.git" \
+ "$absgit" "$here" "$here" $N/sub/sub/
+ '
+}
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 .git "$TRASH_DIRECTORY/27/wt"
-'
+# try_repo #c GIT_WORK_TREE GIT_DIR core.worktree .gitfile? core.bare \
+# (git dir) (work tree) (cwd) (prefix) \ <-- at toplevel
+# (git dir) (work tree) (cwd) (prefix) <-- from subdir
+try_repo () {
+ name=$1 worktreeenv=$2 gitdirenv=$3 &&
+ setup_repo "$name" "$4" "$5" "$6" &&
+ shift 6 &&
+ try_case "$name" "$worktreeenv" "$gitdirenv" \
+ "$1" "$2" "$3" "$4" &&
+ shift 4 &&
+ case "$gitdirenv" in
+ /* | ?:/* | unset) ;;
+ *)
+ gitdirenv=../$gitdirenv ;;
+ esac &&
+ try_case "$name/sub" "$worktreeenv" "$gitdirenv" \
+ "$1" "$2" "$3" "$4"
+}
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 .git wt
-'
+# Bit 0 = GIT_WORK_TREE
+# Bit 1 = GIT_DIR
+# Bit 2 = core.worktree
+# Bit 3 = .git is a file
+# Bit 4 = bare repo
+# Case# = encoding of the above 5 bits
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" wt
+test_expect_success '#0: nonbare repo, no explicit configuration' '
+ try_repo 0 unset unset unset "" unset \
+ .git "$here/0" "$here/0" "(null)" \
+ .git "$here/0" "$here/0" sub/ 2>message &&
+ ! test -s message
'
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27
-setup: prefix: (null)
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY/27/wt"
+test_expect_success '#1: GIT_WORK_TREE without explicit GIT_DIR is accepted' '
+ mkdir -p wt &&
+ try_repo 1 "$here" unset unset "" unset \
+ "$here/1/.git" "$here" "$here" 1/ \
+ "$here/1/.git" "$here" "$here" 1/sub/ 2>message &&
+ ! test -s message
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 27/sub/sub ../../.git "$TRASH_DIRECTORY/27/wt"
+test_expect_success '#2: worktree defaults to cwd with explicit GIT_DIR' '
+ try_repo 2 unset "$here/2/.git" unset "" unset \
+ "$here/2/.git" "$here/2" "$here/2" "(null)" \
+ "$here/2/.git" "$here/2/sub" "$here/2/sub" "(null)"
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 27/sub/sub ../../.git ../../wt
+test_expect_success '#2b: relative GIT_DIR' '
+ try_repo 2b unset ".git" unset "" unset \
+ ".git" "$here/2b" "$here/2b" "(null)" \
+ "../.git" "$here/2b/sub" "$here/2b/sub" "(null)"
'
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" ../../wt
+test_expect_success '#3: setup' '
+ setup_repo 3 unset "" unset &&
+ mkdir -p 3/sub/sub 3/wt/sub
+'
+run_wt_tests 3
+
+test_expect_success '#4: core.worktree without GIT_DIR set is accepted' '
+ setup_repo 4 ../sub "" unset &&
+ mkdir -p 4/sub sub &&
+ try_case 4 unset unset \
+ .git "$here/4/sub" "$here/4" "(null)" \
+ "$here/4/.git" "$here/4/sub" "$here/4/sub" "(null)" 2>message &&
+ ! test -s message
+'
+
+test_expect_success '#5: core.worktree + GIT_WORK_TREE is accepted' '
+ # or: you cannot intimidate away the lack of GIT_DIR setting
+ try_repo 5 "$here" unset "$here/5" "" unset \
+ "$here/5/.git" "$here" "$here" 5/ \
+ "$here/5/.git" "$here" "$here" 5/sub/ 2>message &&
+ try_repo 5a .. unset "$here/5a" "" unset \
+ "$here/5a/.git" "$here" "$here" 5a/ \
+ "$here/5a/.git" "$here/5a" "$here/5a" sub/ &&
+ ! test -s message
+'
+
+test_expect_success '#6: setting GIT_DIR brings core.worktree to life' '
+ setup_repo 6 "$here/6" "" unset &&
+ try_case 6 unset .git \
+ .git "$here/6" "$here/6" "(null)" &&
+ try_case 6 unset "$here/6/.git" \
+ "$here/6/.git" "$here/6" "$here/6" "(null)" &&
+ try_case 6/sub/sub unset ../../.git \
+ "$here/6/.git" "$here/6" "$here/6" sub/sub/ &&
+ try_case 6/sub/sub unset "$here/6/.git" \
+ "$here/6/.git" "$here/6" "$here/6" sub/sub/
+'
+
+test_expect_success '#6b: GIT_DIR set, core.worktree relative' '
+ setup_repo 6b .. "" unset &&
+ try_case 6b unset .git \
+ .git "$here/6b" "$here/6b" "(null)" &&
+ try_case 6b unset "$here/6b/.git" \
+ "$here/6b/.git" "$here/6b" "$here/6b" "(null)" &&
+ try_case 6b/sub/sub unset ../../.git \
+ "$here/6b/.git" "$here/6b" "$here/6b" sub/sub/ &&
+ try_case 6b/sub/sub unset "$here/6b/.git" \
+ "$here/6b/.git" "$here/6b" "$here/6b" sub/sub/
+'
+
+test_expect_success '#6c: GIT_DIR set, core.worktree=../wt (absolute)' '
+ setup_repo 6c "$here/6c/wt" "" unset &&
+ mkdir -p 6c/wt/sub &&
+
+ try_case 6c unset .git \
+ .git "$here/6c/wt" "$here/6c" "(null)" &&
+ try_case 6c unset "$here/6c/.git" \
+ "$here/6c/.git" "$here/6c/wt" "$here/6c" "(null)" &&
+ try_case 6c/sub/sub unset ../../.git \
+ ../../.git "$here/6c/wt" "$here/6c/sub/sub" "(null)" &&
+ try_case 6c/sub/sub unset "$here/6c/.git" \
+ "$here/6c/.git" "$here/6c/wt" "$here/6c/sub/sub" "(null)"
+'
+
+test_expect_success '#6d: GIT_DIR set, core.worktree=../wt (relative)' '
+ setup_repo 6d "$here/6d/wt" "" unset &&
+ mkdir -p 6d/wt/sub &&
+
+ try_case 6d unset .git \
+ .git "$here/6d/wt" "$here/6d" "(null)" &&
+ try_case 6d unset "$here/6d/.git" \
+ "$here/6d/.git" "$here/6d/wt" "$here/6d" "(null)" &&
+ try_case 6d/sub/sub unset ../../.git \
+ ../../.git "$here/6d/wt" "$here/6d/sub/sub" "(null)" &&
+ try_case 6d/sub/sub unset "$here/6d/.git" \
+ "$here/6d/.git" "$here/6d/wt" "$here/6d/sub/sub" "(null)"
+'
+
+test_expect_success '#6e: GIT_DIR set, core.worktree=../.. (absolute)' '
+ setup_repo 6e "$here" "" unset &&
+ try_case 6e unset .git \
+ "$here/6e/.git" "$here" "$here" 6e/ &&
+ try_case 6e unset "$here/6e/.git" \
+ "$here/6e/.git" "$here" "$here" 6e/ &&
+ try_case 6e/sub/sub unset ../../.git \
+ "$here/6e/.git" "$here" "$here" 6e/sub/sub/ &&
+ try_case 6e/sub/sub unset "$here/6e/.git" \
+ "$here/6e/.git" "$here" "$here" 6e/sub/sub/
+'
+
+test_expect_success '#6f: GIT_DIR set, core.worktree=../.. (relative)' '
+ setup_repo 6f ../../ "" unset &&
+ try_case 6f unset .git \
+ "$here/6f/.git" "$here" "$here" 6f/ &&
+ try_case 6f unset "$here/6f/.git" \
+ "$here/6f/.git" "$here" "$here" 6f/ &&
+ try_case 6f/sub/sub unset ../../.git \
+ "$here/6f/.git" "$here" "$here" 6f/sub/sub/ &&
+ try_case 6f/sub/sub unset "$here/6f/.git" \
+ "$here/6f/.git" "$here" "$here" 6f/sub/sub/
+'
+
+# case #7: GIT_WORK_TREE overrides core.worktree.
+test_expect_success '#7: setup' '
+ setup_repo 7 non-existent "" unset &&
+ mkdir -p 7/sub/sub 7/wt/sub
'
+run_wt_tests 7
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY/27/wt
-setup: cwd: $TRASH_DIRECTORY/27/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY/27/wt"
+test_expect_success '#8: gitfile, easy case' '
+ try_repo 8 unset unset unset gitfile unset \
+ "$here/8.git" "$here/8" "$here/8" "(null)" \
+ "$here/8.git" "$here/8" "$here/8" sub/
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/
-EOF
- test_repo 27 .git "$TRASH_DIRECTORY"
+test_expect_success '#9: GIT_WORK_TREE accepted with gitfile' '
+ mkdir -p 9/wt &&
+ try_repo 9 wt unset unset gitfile unset \
+ "$here/9.git" "$here/9/wt" "$here/9" "(null)" \
+ "$here/9.git" "$here/9/sub/wt" "$here/9/sub" "(null)" 2>message &&
+ ! test -s message
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/
-EOF
- test_repo 27 .git ..
+test_expect_success '#10: GIT_DIR can point to gitfile' '
+ try_repo 10 unset "$here/10/.git" unset gitfile unset \
+ "$here/10.git" "$here/10" "$here/10" "(null)" \
+ "$here/10.git" "$here/10/sub" "$here/10/sub" "(null)"
'
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" ..
+test_expect_success '#10b: relative GIT_DIR can point to gitfile' '
+ try_repo 10b unset .git unset gitfile unset \
+ "$here/10b.git" "$here/10b" "$here/10b" "(null)" \
+ "$here/10b.git" "$here/10b/sub" "$here/10b/sub" "(null)"
'
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >27/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/
-EOF
- test_repo 27 "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY"
+# case #11: GIT_WORK_TREE works, gitfile case.
+test_expect_success '#11: setup' '
+ setup_repo 11 unset gitfile unset &&
+ mkdir -p 11/sub/sub 11/wt/sub
+'
+run_wt_tests 11 gitfile
+
+test_expect_success '#12: core.worktree with gitfile is accepted' '
+ try_repo 12 unset unset "$here/12" gitfile unset \
+ "$here/12.git" "$here/12" "$here/12" "(null)" \
+ "$here/12.git" "$here/12" "$here/12" sub/ 2>message &&
+ ! test -s message
+'
+
+test_expect_success '#13: core.worktree+GIT_WORK_TREE accepted (with gitfile)' '
+ # or: you cannot intimidate away the lack of GIT_DIR setting
+ try_repo 13 non-existent-too unset non-existent gitfile unset \
+ "$here/13.git" "$here/13/non-existent-too" "$here/13" "(null)" \
+ "$here/13.git" "$here/13/sub/non-existent-too" "$here/13/sub" "(null)" 2>message &&
+ ! test -s message
+'
+
+# case #14.
+# If this were more table-driven, it could share code with case #6.
+
+test_expect_success '#14: core.worktree with GIT_DIR pointing to gitfile' '
+ setup_repo 14 "$here/14" gitfile unset &&
+ try_case 14 unset .git \
+ "$here/14.git" "$here/14" "$here/14" "(null)" &&
+ try_case 14 unset "$here/14/.git" \
+ "$here/14.git" "$here/14" "$here/14" "(null)" &&
+ try_case 14/sub/sub unset ../../.git \
+ "$here/14.git" "$here/14" "$here/14" sub/sub/ &&
+ try_case 14/sub/sub unset "$here/14/.git" \
+ "$here/14.git" "$here/14" "$here/14" sub/sub/ &&
+
+ setup_repo 14c "$here/14c/wt" gitfile unset &&
+ mkdir -p 14c/wt/sub &&
+
+ try_case 14c unset .git \
+ "$here/14c.git" "$here/14c/wt" "$here/14c" "(null)" &&
+ try_case 14c unset "$here/14c/.git" \
+ "$here/14c.git" "$here/14c/wt" "$here/14c" "(null)" &&
+ try_case 14c/sub/sub unset ../../.git \
+ "$here/14c.git" "$here/14c/wt" "$here/14c/sub/sub" "(null)" &&
+ try_case 14c/sub/sub unset "$here/14c/.git" \
+ "$here/14c.git" "$here/14c/wt" "$here/14c/sub/sub" "(null)" &&
+
+ setup_repo 14d "$here/14d/wt" gitfile unset &&
+ mkdir -p 14d/wt/sub &&
+
+ try_case 14d unset .git \
+ "$here/14d.git" "$here/14d/wt" "$here/14d" "(null)" &&
+ try_case 14d unset "$here/14d/.git" \
+ "$here/14d.git" "$here/14d/wt" "$here/14d" "(null)" &&
+ try_case 14d/sub/sub unset ../../.git \
+ "$here/14d.git" "$here/14d/wt" "$here/14d/sub/sub" "(null)" &&
+ try_case 14d/sub/sub unset "$here/14d/.git" \
+ "$here/14d.git" "$here/14d/wt" "$here/14d/sub/sub" "(null)" &&
+
+ setup_repo 14e "$here" gitfile unset &&
+ try_case 14e unset .git \
+ "$here/14e.git" "$here" "$here" 14e/ &&
+ try_case 14e unset "$here/14e/.git" \
+ "$here/14e.git" "$here" "$here" 14e/ &&
+ try_case 14e/sub/sub unset ../../.git \
+ "$here/14e.git" "$here" "$here" 14e/sub/sub/ &&
+ try_case 14e/sub/sub unset "$here/14e/.git" \
+ "$here/14e.git" "$here" "$here" 14e/sub/sub/
+'
+
+test_expect_success '#14b: core.worktree is relative to actual git dir' '
+ setup_repo 14b ../14b gitfile unset &&
+ try_case 14b unset .git \
+ "$here/14b.git" "$here/14b" "$here/14b" "(null)" &&
+ try_case 14b unset "$here/14b/.git" \
+ "$here/14b.git" "$here/14b" "$here/14b" "(null)" &&
+ try_case 14b/sub/sub unset ../../.git \
+ "$here/14b.git" "$here/14b" "$here/14b" sub/sub/ &&
+ try_case 14b/sub/sub unset "$here/14b/.git" \
+ "$here/14b.git" "$here/14b" "$here/14b" sub/sub/ &&
+
+ setup_repo 14f ../ gitfile unset &&
+ try_case 14f unset .git \
+ "$here/14f.git" "$here" "$here" 14f/ &&
+ try_case 14f unset "$here/14f/.git" \
+ "$here/14f.git" "$here" "$here" 14f/ &&
+ try_case 14f/sub/sub unset ../../.git \
+ "$here/14f.git" "$here" "$here" 14f/sub/sub/ &&
+ try_case 14f/sub/sub unset "$here/14f/.git" \
+ "$here/14f.git" "$here" "$here" 14f/sub/sub/
+'
+
+# case #15: GIT_WORK_TREE overrides core.worktree (gitfile case).
+test_expect_success '#15: setup' '
+ setup_repo 15 non-existent gitfile unset &&
+ mkdir -p 15/sub/sub 15/wt/sub
+'
+run_wt_tests 15 gitfile
+
+test_expect_success '#16a: implicitly bare repo (cwd inside .git dir)' '
+ setup_repo 16a unset "" unset &&
+ mkdir -p 16a/.git/wt/sub &&
+
+ try_case 16a/.git unset unset \
+ . "(null)" "$here/16a/.git" "(null)" &&
+ try_case 16a/.git/wt unset unset \
+ "$here/16a/.git" "(null)" "$here/16a/.git/wt" "(null)" &&
+ try_case 16a/.git/wt/sub unset unset \
+ "$here/16a/.git" "(null)" "$here/16a/.git/wt/sub" "(null)"
+'
+
+test_expect_success '#16b: bare .git (cwd inside .git dir)' '
+ setup_repo 16b unset "" true &&
+ mkdir -p 16b/.git/wt/sub &&
+
+ try_case 16b/.git unset unset \
+ . "(null)" "$here/16b/.git" "(null)" &&
+ try_case 16b/.git/wt unset unset \
+ "$here/16b/.git" "(null)" "$here/16b/.git/wt" "(null)" &&
+ try_case 16b/.git/wt/sub unset unset \
+ "$here/16b/.git" "(null)" "$here/16b/.git/wt/sub" "(null)"
+'
+
+test_expect_success '#16c: bare .git has no worktree' '
+ try_repo 16c unset unset unset "" true \
+ .git "(null)" "$here/16c" "(null)" \
+ "$here/16c/.git" "(null)" "$here/16c/sub" "(null)"
+'
+
+test_expect_success '#17: GIT_WORK_TREE without explicit GIT_DIR is accepted (bare case)' '
+ # Just like #16.
+ setup_repo 17a unset "" true &&
+ setup_repo 17b unset "" true &&
+ mkdir -p 17a/.git/wt/sub &&
+ mkdir -p 17b/.git/wt/sub &&
+
+ try_case 17a/.git "$here/17a" unset \
+ "$here/17a/.git" "$here/17a" "$here/17a" .git/ \
+ 2>message &&
+ try_case 17a/.git/wt "$here/17a" unset \
+ "$here/17a/.git" "$here/17a" "$here/17a" .git/wt/ &&
+ try_case 17a/.git/wt/sub "$here/17a" unset \
+ "$here/17a/.git" "$here/17a" "$here/17a" .git/wt/sub/ &&
+
+ try_case 17b/.git "$here/17b" unset \
+ "$here/17b/.git" "$here/17b" "$here/17b" .git/ &&
+ try_case 17b/.git/wt "$here/17b" unset \
+ "$here/17b/.git" "$here/17b" "$here/17b" .git/wt/ &&
+ try_case 17b/.git/wt/sub "$here/17b" unset \
+ "$here/17b/.git" "$here/17b" "$here/17b" .git/wt/sub/ &&
+
+ try_repo 17c "$here/17c" unset unset "" true \
+ .git "$here/17c" "$here/17c" "(null)" \
+ "$here/17c/.git" "$here/17c" "$here/17c" sub/ 2>message &&
+ ! test -s message
+'
+
+test_expect_success '#18: bare .git named by GIT_DIR has no worktree' '
+ try_repo 18 unset .git unset "" true \
+ .git "(null)" "$here/18" "(null)" \
+ ../.git "(null)" "$here/18/sub" "(null)" &&
+ try_repo 18b unset "$here/18b/.git" unset "" true \
+ "$here/18b/.git" "(null)" "$here/18b" "(null)" \
+ "$here/18b/.git" "(null)" "$here/18b/sub" "(null)"
+'
+
+# Case #19: GIT_DIR + GIT_WORK_TREE suppresses bareness.
+test_expect_success '#19: setup' '
+ setup_repo 19 unset "" true &&
+ mkdir -p 19/sub/sub 19/wt/sub
+'
+run_wt_tests 19
+
+test_expect_success '#20a: core.worktree without GIT_DIR accepted (inside .git)' '
+ # Unlike case #16a.
+ setup_repo 20a "$here/20a" "" unset &&
+ mkdir -p 20a/.git/wt/sub &&
+ try_case 20a/.git unset unset \
+ "$here/20a/.git" "$here/20a" "$here/20a" .git/ 2>message &&
+ try_case 20a/.git/wt unset unset \
+ "$here/20a/.git" "$here/20a" "$here/20a" .git/wt/ &&
+ try_case 20a/.git/wt/sub unset unset \
+ "$here/20a/.git" "$here/20a" "$here/20a" .git/wt/sub/ &&
+ ! test -s message
+'
+
+test_expect_success '#20b/c: core.worktree and core.bare conflict' '
+ setup_repo 20b non-existent "" true &&
+ mkdir -p 20b/.git/wt/sub &&
+ (
+ cd 20b/.git &&
+ test_must_fail git symbolic-ref HEAD >/dev/null
+ ) 2>message &&
+ grep "core.bare and core.worktree" message
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/sub/sub/
-EOF
- test_repo 27/sub/sub ../../.git "$TRASH_DIRECTORY"
+# Case #21: core.worktree/GIT_WORK_TREE overrides core.bare' '
+test_expect_success '#21: setup, core.worktree warns before overriding core.bare' '
+ setup_repo 21 non-existent "" unset &&
+ mkdir -p 21/.git/wt/sub &&
+ (
+ cd 21/.git &&
+ GIT_WORK_TREE="$here/21" &&
+ export GIT_WORK_TREE &&
+ git symbolic-ref HEAD >/dev/null
+ ) 2>message &&
+ ! test -s message
+
+'
+run_wt_tests 21
+
+test_expect_success '#22a: core.worktree = GIT_DIR = .git dir' '
+ # like case #6.
+
+ setup_repo 22a "$here/22a/.git" "" unset &&
+ setup_repo 22ab . "" unset
+ mkdir -p 22a/.git/sub 22a/sub &&
+ mkdir -p 22ab/.git/sub 22ab/sub &&
+ try_case 22a/.git unset . \
+ . "$here/22a/.git" "$here/22a/.git" "(null)" &&
+ try_case 22a/.git unset "$here/22a/.git" \
+ "$here/22a/.git" "$here/22a/.git" "$here/22a/.git" "(null)" &&
+ try_case 22a/.git/sub unset .. \
+ "$here/22a/.git" "$here/22a/.git" "$here/22a/.git" sub/ &&
+ try_case 22a/.git/sub unset "$here/22a/.git" \
+ "$here/22a/.git" "$here/22a/.git" "$here/22a/.git" sub/ &&
+
+ try_case 22ab/.git unset . \
+ . "$here/22ab/.git" "$here/22ab/.git" "(null)" &&
+ try_case 22ab/.git unset "$here/22ab/.git" \
+ "$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" "(null)" &&
+ try_case 22ab/.git/sub unset .. \
+ "$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" sub/ &&
+ try_case 22ab/.git unset "$here/22ab/.git" \
+ "$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" "(null)"
+'
+
+test_expect_success '#22b: core.worktree child of .git, GIT_DIR=.git' '
+ setup_repo 22b "$here/22b/.git/wt" "" unset &&
+ setup_repo 22bb wt "" unset &&
+ mkdir -p 22b/.git/sub 22b/sub 22b/.git/wt/sub 22b/wt/sub &&
+ mkdir -p 22bb/.git/sub 22bb/sub 22bb/.git/wt 22bb/wt &&
+
+ try_case 22b/.git unset . \
+ . "$here/22b/.git/wt" "$here/22b/.git" "(null)" &&
+ try_case 22b/.git unset "$here/22b/.git" \
+ "$here/22b/.git" "$here/22b/.git/wt" "$here/22b/.git" "(null)" &&
+ try_case 22b/.git/sub unset .. \
+ .. "$here/22b/.git/wt" "$here/22b/.git/sub" "(null)" &&
+ try_case 22b/.git/sub unset "$here/22b/.git" \
+ "$here/22b/.git" "$here/22b/.git/wt" "$here/22b/.git/sub" "(null)" &&
+
+ try_case 22bb/.git unset . \
+ . "$here/22bb/.git/wt" "$here/22bb/.git" "(null)" &&
+ try_case 22bb/.git unset "$here/22bb/.git" \
+ "$here/22bb/.git" "$here/22bb/.git/wt" "$here/22bb/.git" "(null)" &&
+ try_case 22bb/.git/sub unset .. \
+ .. "$here/22bb/.git/wt" "$here/22bb/.git/sub" "(null)" &&
+ try_case 22bb/.git/sub unset "$here/22bb/.git" \
+ "$here/22bb/.git" "$here/22bb/.git/wt" "$here/22bb/.git/sub" "(null)"
+'
+
+test_expect_success '#22c: core.worktree = .git/.., GIT_DIR=.git' '
+ setup_repo 22c "$here/22c" "" unset &&
+ setup_repo 22cb .. "" unset &&
+ mkdir -p 22c/.git/sub 22c/sub &&
+ mkdir -p 22cb/.git/sub 22cb/sub &&
+
+ try_case 22c/.git unset . \
+ "$here/22c/.git" "$here/22c" "$here/22c" .git/ &&
+ try_case 22c/.git unset "$here/22c/.git" \
+ "$here/22c/.git" "$here/22c" "$here/22c" .git/ &&
+ try_case 22c/.git/sub unset .. \
+ "$here/22c/.git" "$here/22c" "$here/22c" .git/sub/ &&
+ try_case 22c/.git/sub unset "$here/22c/.git" \
+ "$here/22c/.git" "$here/22c" "$here/22c" .git/sub/ &&
+
+ try_case 22cb/.git unset . \
+ "$here/22cb/.git" "$here/22cb" "$here/22cb" .git/ &&
+ try_case 22cb/.git unset "$here/22cb/.git" \
+ "$here/22cb/.git" "$here/22cb" "$here/22cb" .git/ &&
+ try_case 22cb/.git/sub unset .. \
+ "$here/22cb/.git" "$here/22cb" "$here/22cb" .git/sub/ &&
+ try_case 22cb/.git/sub unset "$here/22cb/.git" \
+ "$here/22cb/.git" "$here/22cb" "$here/22cb" .git/sub/
+'
+
+test_expect_success '#22.2: core.worktree and core.bare conflict' '
+ setup_repo 22 "$here/22" "" true &&
+ (
+ cd 22/.git &&
+ GIT_DIR=. &&
+ export GIT_DIR &&
+ test_must_fail git symbolic-ref HEAD 2>result
+ ) &&
+ (
+ cd 22 &&
+ GIT_DIR=.git &&
+ export GIT_DIR &&
+ test_must_fail git symbolic-ref HEAD 2>result
+ ) &&
+ grep "core.bare and core.worktree" 22/.git/result &&
+ grep "core.bare and core.worktree" 22/result
'
-test_expect_success '#27: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/sub/sub/
-EOF
- test_repo 27/sub/sub ../../.git ../../..
+# Case #23: GIT_DIR + GIT_WORK_TREE(+core.worktree) suppresses bareness.
+test_expect_success '#23: setup' '
+ setup_repo 23 non-existent "" true &&
+ mkdir -p 23/sub/sub 23/wt/sub
'
+run_wt_tests 23
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/sub/sub/
-EOF
- test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" ../../../
+test_expect_success '#24: bare repo has no worktree (gitfile case)' '
+ try_repo 24 unset unset unset gitfile true \
+ "$here/24.git" "(null)" "$here/24" "(null)" \
+ "$here/24.git" "(null)" "$here/24/sub" "(null)"
'
-test_expect_success '#27: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >27/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/27.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 27/sub/sub/
-EOF
- test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY"
+test_expect_success '#25: GIT_WORK_TREE accepted if GIT_DIR unset (bare gitfile case)' '
+ try_repo 25 "$here/25" unset unset gitfile true \
+ "$here/25.git" "$here/25" "$here/25" "(null)" \
+ "$here/25.git" "$here/25" "$here/25" "sub/" 2>message &&
+ ! test -s message
'
-#
-# case #28
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# core.worktree is ignored -> #24
-
-test_expect_success '#28: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 28 28/sub &&
- cd 28 &&
- git init &&
- git config core.bare true &&
- git config core.worktree non-existent &&
- mv .git ../28.git &&
- echo gitdir: ../28.git >.git &&
- cd ..
+test_expect_success '#26: bare repo has no worktree (GIT_DIR -> gitfile case)' '
+ try_repo 26 unset "$here/26/.git" unset gitfile true \
+ "$here/26.git" "(null)" "$here/26" "(null)" \
+ "$here/26.git" "(null)" "$here/26/sub" "(null)" &&
+ try_repo 26b unset .git unset gitfile true \
+ "$here/26b.git" "(null)" "$here/26b" "(null)" \
+ "$here/26b.git" "(null)" "$here/26b/sub" "(null)"
'
-test_expect_success '#28: at root' '
- cat >28/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/28.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/28
-setup: prefix: (null)
-EOF
- test_repo 28
+# Case #27: GIT_DIR + GIT_WORK_TREE suppresses bareness (with gitfile).
+test_expect_success '#27: setup' '
+ setup_repo 27 unset gitfile true &&
+ mkdir -p 27/sub/sub 27/wt/sub
'
+run_wt_tests 27 gitfile
-test_expect_success '#28: in subdir' '
- cat >28/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/28.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/28/sub
-setup: prefix: (null)
-EOF
- test_repo 28/sub
+test_expect_success '#28: core.worktree and core.bare conflict (gitfile case)' '
+ setup_repo 28 "$here/28" gitfile true &&
+ (
+ cd 28 &&
+ test_must_fail git symbolic-ref HEAD
+ ) 2>message &&
+ ! grep "^warning:" message &&
+ grep "core.bare and core.worktree" message
'
-#
-# case #29
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is not set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# GIT_WORK_TREE/core.worktree are ignored -> #28
-
+# Case #29: GIT_WORK_TREE(+core.worktree) overrides core.bare (gitfile case).
test_expect_success '#29: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 29 29/sub &&
- cd 29 &&
- git init &&
- git config core.bare true &&
- GIT_WORK_TREE=non-existent &&
- export GIT_WORK_TREE &&
- mv .git ../29.git &&
- echo gitdir: ../29.git >.git &&
- cd ..
-'
-
-test_expect_success '#29: at root' '
- cat >29/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/29.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/29
-setup: prefix: (null)
-EOF
- test_repo 29
-'
-
-test_expect_success '#29: in subdir' '
- cat >29/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/29.git
-setup: worktree: (null)
-setup: cwd: $TRASH_DIRECTORY/29/sub
-setup: prefix: (null)
-EOF
- test_repo 29/sub
-'
-
-#
-# case #30
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is not set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# core.worktree and core.bare conflict, won't fly.
-
-test_expect_success '#30: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 30 &&
- cd 30 &&
- git init &&
- git config core.bare true &&
- git config core.worktree non-existent &&
- mv .git ../30.git &&
- echo gitdir: ../30.git >.git &&
- cd ..
-'
-
-test_expect_success '#30: at root' '
+ setup_repo 29 non-existent gitfile true &&
+ mkdir -p 29/sub/sub 29/wt/sub
(
- cd 30 &&
- GIT_DIR=.git &&
- export GIT_DIR &&
- test_must_fail git symbolic-ref HEAD 2>result &&
- grep "core.bare and core.worktree do not make sense" result
- )
+ cd 29 &&
+ GIT_WORK_TREE="$here/29" &&
+ export GIT_WORK_TREE &&
+ git symbolic-ref HEAD >/dev/null
+ ) 2>message &&
+ ! test -s message
+'
+run_wt_tests 29 gitfile
+
+test_expect_success '#30: core.worktree and core.bare conflict (gitfile version)' '
+ # Just like case #22.
+ setup_repo 30 "$here/30" gitfile true &&
+ (
+ cd 30 &&
+ GIT_DIR=.git &&
+ export GIT_DIR &&
+ test_must_fail git symbolic-ref HEAD 2>result
+ ) &&
+ grep "core.bare and core.worktree" 30/result
'
-#
-# case #31
-#
-############################################################
-#
-# Input:
-#
-# - GIT_WORK_TREE is set
-# - GIT_DIR is set
-# - core.worktree is set
-# - .git is a file
-# - core.bare is set
-#
-# Output:
-#
-# #23 except git_dir is set according to .git file
-
+# Case #31: GIT_DIR + GIT_WORK_TREE(+core.worktree) suppresses
+# bareness (gitfile version).
test_expect_success '#31: setup' '
- sane_unset GIT_DIR GIT_WORK_TREE &&
- mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub &&
- cd 31 &&
- git init &&
- git config core.bare true &&
- git config core.worktree non-existent &&
- mv .git ../31.git &&
- echo gitdir: ../31.git >.git &&
- cd ..
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=root at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 .git "$TRASH_DIRECTORY/31"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=root(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 .git .
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=root at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY/31"
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=root(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" .
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORKTREE=root in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: sub/sub/
-EOF
- test_repo 31/sub/sub ../../.git "$TRASH_DIRECTORY/31"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORKTREE=root(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: sub/sub/
-EOF
- test_repo 31/sub/sub ../../.git ../..
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORKTREE=root in subdir' '
- cat >31/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: sub/
-EOF
- test_repo 31/sub "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY/31"
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORKTREE=root(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: sub/sub/
-EOF
- test_repo 31/sub/sub "$TRASH_DIRECTORY/31/.git" ../..
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=wt at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 .git "$TRASH_DIRECTORY/31/wt"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 .git wt
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=wt(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" wt
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=wt at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31
-setup: prefix: (null)
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY/31/wt"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=wt in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 31/sub/sub ../../.git "$TRASH_DIRECTORY/31/wt"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=wt(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 31/sub/sub ../../.git ../../wt
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=wt(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 31/sub/sub "$TRASH_DIRECTORY/31/.git" ../../wt
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=wt in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY/31/wt
-setup: cwd: $TRASH_DIRECTORY/31/sub/sub
-setup: prefix: (null)
-EOF
- test_repo 31/sub/sub "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY/31/wt"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=.. at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/
-EOF
- test_repo 31 .git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=..(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/
-EOF
- test_repo 31 .git ..
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=..(rel) at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" ..
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=.. at root' '
- cat >31/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/
-EOF
- test_repo 31 "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=.. in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/sub/sub/
-EOF
- test_repo 31/sub/sub ../../.git "$TRASH_DIRECTORY"
-'
-
-test_expect_success '#31: GIT_DIR(rel), GIT_WORK_TREE=..(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/sub/sub/
-EOF
- test_repo 31/sub/sub ../../.git ../../..
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=..(rel) in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/sub/sub/
-EOF
- test_repo 31/sub/sub "$TRASH_DIRECTORY/31/.git" ../../../
-'
-
-test_expect_success '#31: GIT_DIR, GIT_WORK_TREE=.. in subdir' '
- cat >31/sub/sub/expected <<EOF &&
-setup: git_dir: $TRASH_DIRECTORY/31.git
-setup: worktree: $TRASH_DIRECTORY
-setup: cwd: $TRASH_DIRECTORY
-setup: prefix: 31/sub/sub/
-EOF
- test_repo 31/sub/sub "$TRASH_DIRECTORY/31/.git" "$TRASH_DIRECTORY"
+ setup_repo 31 non-existent gitfile true &&
+ mkdir -p 31/sub/sub 31/wt/sub
'
+run_wt_tests 31 gitfile
test_done
diff --git a/t/t2019-checkout-amiguous-ref.sh b/t/t2019-checkout-amiguous-ref.sh
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+test_description='checkout handling of ambiguous (branch/tag) refs'
+. ./test-lib.sh
+
+test_expect_success 'setup ambiguous refs' '
+ test_commit branch file &&
+ git branch ambiguity &&
+ git branch vagueness &&
+ test_commit tag file &&
+ git tag ambiguity &&
+ git tag vagueness HEAD:file &&
+ test_commit other file
+'
+
+test_expect_success 'checkout ambiguous ref succeeds' '
+ git checkout ambiguity >stdout 2>stderr
+'
+
+test_expect_success 'checkout produces ambiguity warning' '
+ grep "warning.*ambiguous" stderr
+'
+
+test_expect_success 'checkout chooses branch over tag' '
+ echo refs/heads/ambiguity >expect &&
+ git symbolic-ref HEAD >actual &&
+ test_cmp expect actual &&
+ echo branch >expect &&
+ test_cmp expect file
+'
+
+test_expect_success 'checkout reports switch to branch' '
+ grep "Switched to branch" stderr &&
+ ! grep "^HEAD is now at" stderr
+'
+
+test_expect_success 'checkout vague ref succeeds' '
+ git checkout vagueness >stdout 2>stderr &&
+ test_set_prereq VAGUENESS_SUCCESS
+'
+
+test_expect_success VAGUENESS_SUCCESS 'checkout produces ambiguity warning' '
+ grep "warning.*ambiguous" stderr
+'
+
+test_expect_success VAGUENESS_SUCCESS 'checkout chooses branch over tag' '
+ echo refs/heads/vagueness >expect &&
+ git symbolic-ref HEAD >actual &&
+ test_cmp expect actual &&
+ echo branch >expect &&
+ test_cmp expect file
+'
+
+test_expect_success VAGUENESS_SUCCESS 'checkout reports switch to branch' '
+ grep "Switched to branch" stderr &&
+ ! grep "^HEAD is now at" stderr
+'
+
+test_done
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 0692427cb69c62327da52061de6238ca8e12169d..64182d92055569d54386f6bcbb01179a7ffcae77 100755 (executable)
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
'
-test_expect_success 'add -n -u should not add but just report' '
+test_expect_success NO_GETTEXT_POISON 'add -n -u should not add but just report' '
(
echo "add '\''check'\''" &&
diff --git a/t/t2204-add-ignored.sh b/t/t2204-add-ignored.sh
index 24afdabab7e30feaf583079a75a756d267181bb9..be66e2db0a0b85f49dab43d35d528f1a3986f3c3 100755 (executable)
--- a/t/t2204-add-ignored.sh
+++ b/t/t2204-add-ignored.sh
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i output" '
+ grep -e "Use -f if" err
'
test_expect_success "complaints for ignored $i with unignored file" '
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ '
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i with unignored file output" '
+ grep -e "Use -f if" err
'
done
cd dir &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ )
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in dir output" '
+ (
+ cd dir &&
+ grep -e "Use -f if" err
)
'
done
cd sub &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ )
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in sub output" '
+ (
+ cd sub &&
+ grep -e "Use -f if" err
)
'
done
index 34794f8a70e1c9b71384363e022d08da4ac8872e..d441036e6b83134e926cf281c09c6145da5e8348 100755 (executable)
'
-test_expect_success 'fail if the index has unresolved entries' '
+test_expect_success NO_GETTEXT_POISON 'fail if the index has unresolved entries' '
rm -fr [abcd] &&
git checkout -f "$c1" &&
index 44f5421be45579b10c5556a958404ad2daa02002..2b17311cb0870ea210d9b5cbe167363d13641d67 100755 (executable)
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote
'
+test_expect_success 'naive cherry-pick fails' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git cherry-pick --no-commit remote &&
+ git read-tree --reset -u HEAD &&
+ test_must_fail git cherry-pick remote &&
+ test_must_fail git update-index --refresh &&
+ grep "<<<<<<" text.txt
+'
+
+test_expect_success '-Xignore-space-change makes cherry-pick succeed' '
+ git read-tree --reset -u HEAD &&
+ git cherry-pick --no-commit -Xignore-space-change remote
+'
+
test_expect_success '--ignore-space-change: our w/s-only change wins' '
q_to_cr <<-\EOF >expected &&
justice and holiness and is the nurse of his age and theQ
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index f308235f5dd28da2c19d91dc63803312aacd2cda..70702d48aacdd01fea4a920d84c38910a7af4e00 100755 (executable)
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
test -z "$(git config branch.my7.remote)" &&
test -z "$(git config branch.my7.merge)"'
-test_expect_success 'test deleting branch without config' \
+test_expect_success NO_GETTEXT_POISON 'test deleting branch without config' \
'git branch my7 s &&
sha1=$(git rev-parse my7 | cut -c 1-7) &&
test "$(git branch -d my7 2>&1)" = "Deleted branch my7 (was $sha1)."'
test "z$(git config branch.myr20.rebase)" = z
'
+test_expect_success 'autosetuprebase always on detached HEAD' '
+ git config branch.autosetupmerge always &&
+ test_when_finished git checkout master &&
+ git checkout HEAD^0 &&
+ git branch my11 &&
+ test -z "$(git config branch.my11.remote)" &&
+ test -z "$(git config branch.my11.merge)"
+'
+
test_expect_success 'detect misconfigured autosetuprebase (bad value)' '
git config branch.autosetuprebase garbage &&
test_must_fail git branch
index 6028748c6cecaedb087c35182de172ca0e93fe08..cf04bb25f0dc8d0ca193ceb0ee27119d7a051a3e 100755 (executable)
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
branch-two
master
EOF
-test_expect_success 'git branch shows detached HEAD properly' '
+test_expect_success NO_GETTEXT_POISON 'git branch shows detached HEAD properly' '
git checkout HEAD^0 &&
git branch >actual &&
test_cmp expect actual
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 64446e3db3afed68e970de6fc3c0780db25c85d1..826500bd18a520a37e3490b9deeca94fb9e14405 100755 (executable)
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
test_must_fail git rebase master
'
+test_expect_success 'rebase --skip can not be used with other options' '
+ test_must_fail git rebase -v --skip &&
+ test_must_fail git rebase --skip -v
+'
+
test_expect_success 'rebase --skip with am -3' '
git rebase --skip
'
index e573dc845b3d72004b2a96f344528c68977c52e1..a6a6c40a98512b190f8610391aa153a294e4b5cb 100755 (executable)
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
test_cmp reflog_before reflog_after &&
rm reflog_before reflog_after
'
+
+ test_expect_success 'rebase --abort can not be used with other options' '
+ cd "$work_dir" &&
+ # Clean up the state from the previous one
+ git reset --hard pre-rebase &&
+ test_must_fail git rebase$type master &&
+ test_must_fail git rebase -v --abort &&
+ test_must_fail git rebase --abort -v &&
+ git rebase --abort
+ '
}
testrebase "" .git/rebase-apply
index 3b0d27350e8a0fe43bb7735bc614462347aed3e0..1e855cdae55ff46cbb878b724328b57cdb8069ce 100755 (executable)
git rebase --continue
'
+test_expect_success 'rebase --continue can not be used with other options' '
+ test_must_fail git rebase -v --continue &&
+ test_must_fail git rebase --continue -v
+'
+
+test_expect_success 'rebase --continue remembers merge strategy and options' '
+ rm -fr .git/rebase-* &&
+ git reset --hard commit-new-file-F2-on-topic-branch &&
+ test_commit "commit-new-file-F3-on-topic-branch" F3 32 &&
+ test_when_finished "rm -fr test-bin funny.was.run" &&
+ mkdir test-bin &&
+ cat >test-bin/git-merge-funny <<-EOF
+ #!$SHELL_PATH
+ case "\$1" in --opt) ;; *) exit 2 ;; esac
+ shift &&
+ >funny.was.run &&
+ exec git merge-recursive "\$@"
+ EOF
+ chmod +x test-bin/git-merge-funny &&
+ (
+ PATH=./test-bin:$PATH
+ test_must_fail git rebase -s funny -Xopt master topic
+ ) &&
+ test -f funny.was.run &&
+ rm funny.was.run &&
+ echo "Resolved" >F2 &&
+ git add F2 &&
+ (
+ PATH=./test-bin:$PATH
+ git rebase --continue
+ ) &&
+ test -f funny.was.run
+'
+
+test_expect_success 'rebase --continue remembers --rerere-autoupdate' '
+ rm -fr .git/rebase-* &&
+ git reset --hard commit-new-file-F3-on-topic-branch &&
+ git checkout master
+ test_commit "commit-new-file-F3" F3 3 &&
+ git config rerere.enabled true &&
+ test_must_fail git rebase -m master topic &&
+ echo "Resolved" >F2 &&
+ git add F2 &&
+ test_must_fail git rebase --continue &&
+ echo "Resolved" >F3 &&
+ git add F3 &&
+ git rebase --continue &&
+ git reset --hard topic@{1} &&
+ test_must_fail git rebase -m --rerere-autoupdate master &&
+ test "$(cat F2)" = "Resolved" &&
+ test_must_fail git rebase --continue &&
+ test "$(cat F3)" = "Resolved" &&
+ git rebase --continue
+'
+
test_done
index 043954422c82d9afbb318bcb7d1aa5685a391c85..76d3252c89ae53e522bf77c9bd6d260504c53f34 100755 (executable)
)
'
-test_expect_success 'revert forbidden on dirty working tree' '
+test_expect_success NO_GETTEXT_POISON 'revert forbidden on dirty working tree' '
echo content >extra_file &&
git add extra_file &&
index 607bf25d8ff7720407c2b15e4808c575b5f36093..bf664ece091c6eff305f60390c521e3b0b8da1e1 100755 (executable)
test "$head" = "$newhead"
'
-test_expect_success 'advice from failed cherry-pick' "
+test_expect_success NO_GETTEXT_POISON 'advice from failed cherry-pick' "
git checkout -f initial^0 &&
git read-tree -u --reset HEAD &&
git clean -d -f -f -q -x &&
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index ec7108358e7b7f54f0b5e7530c8368e4a56576af..95071915815e2879551be52467cc1a9363f36321 100755 (executable)
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
test_expect_success 'git add --dry-run of non-existing file' "
echo ignored-file >>.gitignore &&
test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 &&
- echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual
+ echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect
+"
+
+test_expect_success NO_GETTEXT_POISON 'git add --dry-run of an existing file output' "
+ test_cmp expect actual
"
cat >expect.err <<\EOF
EOF
test_expect_success 'git add --dry-run --ignore-missing of non-existing file' '
- test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err &&
+ test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err
+'
+
+test_expect_success NO_GETTEXT_POISON 'git add --dry-run --ignore-missing of non-existing file output' '
test_cmp expect.out actual.out &&
test_cmp expect.err actual.err
'
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index 71bac83dd5e42a19e3b1a7e869df0e7143371c99..d42c0770a7de3029a059dc564f0caf225288e9ab 100755 (executable)
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
'validate the output.' \
'compare_diff_patch current expected'
-test_expect_success 'favour same basenames over different ones' '
+test_expect_success NO_GETTEXT_POISON 'favour same basenames over different ones' '
cp path1 another-path &&
git add another-path &&
git commit -m 1 &&
git mv another-path subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
-test_expect_success 'favour same basenames even with minor differences' '
+test_expect_success NO_GETTEXT_POISON 'favour same basenames even with minor differences' '
git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
index 94df7ae53a0ef47c0ef10ca6b3215ffdf38fa399..fbc8cd8f05f4debeb30b935c1b1db86e94e49f0e 100755 (executable)
--- a/t/t4010-diff-pathspec.sh
+++ b/t/t4010-diff-pathspec.sh
test_cmp expected current
'
+EMPTY_TREE=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+
+test_expect_success 'diff-tree with wildcard shows dir also matches' '
+ git diff-tree --name-only $EMPTY_TREE $tree -- "f*" >result &&
+ echo file0 >expected &&
+ test_cmp expected result
+'
+
+test_expect_success 'diff-tree -r with wildcard' '
+ git diff-tree -r --name-only $EMPTY_TREE $tree -- "*file1" >result &&
+ echo path1/file1 >expected &&
+ test_cmp expected result
+'
+
+test_expect_success 'diff-tree with wildcard shows dir also matches' '
+ git diff-tree --name-only $tree $tree2 -- "path1/f*" >result &&
+ echo path1 >expected &&
+ test_cmp expected result
+'
+
+test_expect_success 'diff-tree -r with wildcard from beginning' '
+ git diff-tree -r --name-only $tree $tree2 -- "path1/*file1" >result &&
+ echo path1/file1 >expected &&
+ test_cmp expected result
+'
+
+test_expect_success 'diff-tree -r with wildcard' '
+ git diff-tree -r --name-only $tree $tree2 -- "path1/f*" >result &&
+ echo path1/file1 >expected &&
+ test_cmp expected result
+'
+
test_done
index 027c13d52cd701ba28e3c5e29c5431acfccdad73..3b182f5e11970e4c48eb93208a0b6d9b6dd0b666 100755 (executable)
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
echo "fatal: --name-status does not make sense" > expect.name-status
echo "fatal: --check does not make sense" > expect.check
-test_expect_success 'options no longer allowed for format-patch' '
+test_expect_success NO_GETTEXT_POISON 'options no longer allowed for format-patch' '
test_must_fail git format-patch --name-only 2> output &&
test_cmp expect.name-only output &&
test_must_fail git format-patch --name-status 2> output &&
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 850fc96d1f07b19310cb4672ab44374b37b82d67..a96b03ebf11209100c5296f3524525d888af3b87 100755 (executable)
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
git checkout first &&
test_tick &&
sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
- git am <patchnl >output.out 2>&1 &&
+ git am <patchnl >output.out 2>&1
+'
+
+test_expect_success NO_GETTEXT_POISON 'output: am newline in subject' '
grep "^Applying: second \\\n foo$" output.out
'
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index c95c4ccc393d0863ad53b6a2a684893282d7d9e6..2d4a05590b3cbf5d3df51f7a94f44ee6620935ec 100755 (executable)
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
test_cmp expect actual
'
- test_expect_success "am$with3 --skip continue after failed am$with3" '
+ test_expect_success NO_GETTEXT_POISON "am$with3 --skip continue after failed am$with3" '
test_must_fail git am$with3 --skip >output &&
test "$(grep "^Applying" output)" = "Applying: 6" &&
test_cmp file-2-expect file-2 &&
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index b0c2a2c3aea811ec023423bdb486de5412fa79c5..b341d8b3de9d6c23d072c33e5fd2415f030eb8e7 100755 (executable)
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -128,11 +128,14 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
# push master too; this ensures there is at least one '"'push'"' command to
# the remote helper and triggers interaction with the helper.
- test_must_fail git push -v origin +master master:retsam >output 2>&1 &&
+ test_must_fail git push -v origin +master master:retsam >output 2>&1'
+test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '
grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
- grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
+ grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output
+'
+test_expect_success NO_GETTEXT_POISON 'push fails for non-fast-forward refs unmatched by remote helper: our output' '
grep "To prevent you from losing history, non-fast-forward updates were rejected" \
output
'
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 987e0c846309a8a49dbe31ce292edd55342217b3..ecb499d8aa97e66bf8fffce217da96744e9eaaf3 100755 (executable)
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
'
-test_expect_success 'output from clone' '
+test_expect_success NO_GETTEXT_POISON 'output from clone' '
rm -fr dst &&
git clone -n "file://$(pwd)/src" dst >output &&
test $(grep Clon output | wc -l) = 1
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh
--- /dev/null
+++ b/t/t6000-rev-list-misc.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+test_description='miscellaneous rev-list tests'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ echo content1 >wanted_file &&
+ echo content2 >unwanted_file &&
+ git add wanted_file unwanted_file &&
+ git commit -m one
+'
+
+test_expect_success 'rev-list --objects heeds pathspecs' '
+ git rev-list --objects HEAD -- wanted_file >output &&
+ grep wanted_file output &&
+ ! grep unwanted_file output
+'
+
+test_expect_success 'rev-list --objects with pathspecs and deeper paths' '
+ mkdir foo &&
+ >foo/file &&
+ git add foo/file &&
+ git commit -m two &&
+
+ git rev-list --objects HEAD -- foo >output &&
+ grep foo/file output &&
+
+ git rev-list --objects HEAD -- foo/file >output &&
+ grep foo/file output &&
+ ! grep unwanted_file output
+'
+
+test_expect_success 'rev-list --objects with pathspecs and copied files' '
+ git checkout --orphan junio-testcase &&
+ git rm -rf . &&
+
+ mkdir two &&
+ echo frotz >one &&
+ cp one two/three &&
+ git add one two/three &&
+ test_tick &&
+ git commit -m that &&
+
+ ONE=$(git rev-parse HEAD:one)
+ git rev-list --objects HEAD two >output &&
+ grep "$ONE two/three" output &&
+ ! grep one output
+'
+
+test_done
index 1e0447f615c55ecf98ae341553ea60f10a956ae3..d508a199591a3b5e0a145b8918a99d00b53f7879 100755 (executable)
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
b4 ahead 2
EOF
-test_expect_success 'branch -v' '
+test_expect_success NO_GETTEXT_POISON 'branch -v' '
(
cd test &&
git branch -v
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 876d1ab7430c2054ddc69bd3712ff769de52e774..210b9a2fad58cf73dae95c23253c040ee46cc9df 100755 (executable)
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
warning: tag 'A' is really 'Q' here
EOF
check_describe A-* HEAD
-test_expect_success 'warning was displayed for Q' '
+test_expect_success NO_GETTEXT_POISON 'warning was displayed for Q' '
test_cmp err.expect err.actual
'
test_expect_success 'rename tag Q back to A' '
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 3e7baaf89f9bada46fc084e568544ce9df833594..99d1fbc5e0fb87540c810c444cb2e094480f3fe1 100755 (executable)
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
'
test_expect_success \
+ NO_GETTEXT_POISON \
'message in editor has initial comment: first line' '
# check the first line --- should be empty
echo >first.expect &&
index 582d0b54f1f1a32459727e59932e95c4b466951f..6fccd9108623f92404efe32606e6f94ed9bf5c4e 100755 (executable)
Would remove expected
Would remove result
EOF
-test_expect_success 'git-clean, absent case' '
+test_expect_success NO_GETTEXT_POISON 'git-clean, absent case' '
setup_absent &&
git clean -n > result &&
test_cmp expected result
'
-test_expect_success 'git-clean, dirty case' '
+test_expect_success NO_GETTEXT_POISON 'git-clean, dirty case' '
setup_dirty &&
git clean -n > result &&
test_cmp expected result
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index fcac4725982096af98414c5d40df2d4c14be9454..720515478865fcecaee0de5853aa85ec48855201 100755 (executable)
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
no changes added to commit (use "git add" and/or "git commit -a")
EOF
-test_expect_success 'M/D conflict does not segfault' '
+test_expect_success NO_GETTEXT_POISON 'M/D conflict does not segfault' '
mkdir mdconflict &&
(
cd mdconflict &&
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index b8cf2603a195af406d3606712e45fd1195c1588f..1370949ca49fedf655f09c791cd97dbb4daa937c 100755 (executable)
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
M file2
EOF
-test_expect_success '--mixed refreshes the index' '
+test_expect_success NO_GETTEXT_POISON '--mixed refreshes the index' '
echo 123 >> file2 &&
git reset --mixed HEAD > output &&
test_cmp expect output
diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
index 70cdd8e618c648f7ee6550997d68c40d912c8db9..8e54f0c5f8d457eece2a50bd5044039d5a66c5a1 100755 (executable)
--- a/t/t7110-reset-merge.sh
+++ b/t/t7110-reset-merge.sh
# working index HEAD target working index HEAD
# ----------------------------------------------------
# file1: X U B C --keep (disallowed)
-test_expect_success '"reset --keep HEAD^" fails with pending merge' '
+test_expect_success NO_GETTEXT_POISON '"reset --keep HEAD^" fails with pending merge' '
git reset --hard third &&
test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD^ 2>err.log &&
# working index HEAD target working index HEAD
# ----------------------------------------------------
# file1: X U B B --keep (disallowed)
-test_expect_success '"reset --keep HEAD" fails with pending merge' '
+test_expect_success NO_GETTEXT_POISON '"reset --keep HEAD" fails with pending merge' '
git reset --hard third &&
test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD 2>err.log &&
git diff --exit-code --cached
'
-test_expect_success '--keep fails with added/deleted merge' '
+test_expect_success NO_GETTEXT_POISON '--keep fails with added/deleted merge' '
git reset --hard third &&
rm -f file2 &&
test_must_fail git merge branch3 &&
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 1337fa5a2209d489c43f0a34c95a89053d3fd8bf..fe7536be260d5e221c8401c13ee166f874d11238 100755 (executable)
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
test_cmp two expect
'
-test_expect_success 'checkout to detach HEAD (with advice declined)' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD (with advice declined)' '
git config advice.detachedHead false &&
git checkout -f renamer && git clean -f &&
fi
'
-test_expect_success 'checkout to detach HEAD' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD' '
git config advice.detachedHead true &&
git checkout -f renamer && git clean -f &&
git checkout renamer^ 2>messages &&
fi
'
-test_expect_success 'checkout to detach HEAD with branchname^' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with branchname^' '
git checkout -f master && git clean -f &&
git checkout renamer^ &&
fi
'
-test_expect_success 'checkout to detach HEAD with :/message' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with :/message' '
git checkout -f master && git clean -f &&
git checkout ":/Initial" &&
fi
'
-test_expect_success 'checkout to detach HEAD with HEAD^0' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with HEAD^0' '
git checkout -f master && git clean -f &&
git checkout HEAD^0 &&
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 02f67b73b762850f3c7f0faf0886bf4011f57308..70d8168f581cf9620afafefc2e8e7196c26fdc6e 100755 (executable)
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
'
-test_expect_success 'git clean with relative prefix' '
+test_expect_success NO_GETTEXT_POISON 'git clean with relative prefix' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
}
'
-test_expect_success 'git clean with absolute path' '
+test_expect_success NO_GETTEXT_POISON 'git clean with absolute path' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
'
-test_expect_success 'core.excludesfile' '
+test_expect_success NO_GETTEXT_POISON 'core.excludesfile' '
echo excludes >excludes &&
echo included >included &&
index 874279e32da98ac2c20137a207a0d115f073e444..04e78cca34fa53ed1aef042001e99e9c47e2e882 100755 (executable)
test_cmp empty untracked
'
-test_expect_success 'submodule add to .gitignored path fails' '
+test_expect_success NO_GETTEXT_POISON 'submodule add to .gitignored path fails' '
(
cd addtest-ignore &&
cat <<-\EOF >expect &&
test_cmp empty staged
'
-test_expect_success 'update --init' '
+test_expect_success NO_GETTEXT_POISON 'update --init' '
mv init init2 &&
git config -f .gitmodules submodule.example.url "$(pwd)/init2" &&
git config --remove-section submodule.example &&
index 7d7fde057b04e4615e32b0ddc71fd3b07968a129..3592f9f245dc22bb7521fa51c005ed31b51ac356 100755 (executable)
rm -f sm1 &&
mv sm1-bak sm1
-test_expect_success 'typechanged submodule(submodule->blob), --cached' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob), --cached' "
git submodule summary --cached >actual &&
cat >expected <<-EOF &&
* sm1 $head4(submodule)->$head5(blob) (3):
test_cmp actual expected
"
-test_expect_success 'typechanged submodule(submodule->blob), --files' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob), --files' "
git submodule summary --files >actual &&
cat >expected <<-EOF &&
* sm1 $head5(blob)->$head4(submodule) (3):
rm -rf sm1 &&
git checkout-index sm1
-test_expect_success 'typechanged submodule(submodule->blob)' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob)' "
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 $head4(submodule)->$head5(blob):
rm -f sm1 &&
test_create_repo sm1 &&
head6=$(add_file sm1 foo6 foo7)
-test_expect_success 'nonexistent commit' "
+test_expect_success NO_GETTEXT_POISON 'nonexistent commit' "
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 $head4...$head6:
"
commit_file
-test_expect_success 'typechanged submodule(blob->submodule)' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(blob->submodule)' "
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 $head5(blob)->$head6(submodule) (2):
test_cmp expected actual
"
-test_expect_success '--for-status' "
+test_expect_success NO_GETTEXT_POISON '--for-status' "
git submodule summary --for-status HEAD^ >actual &&
- test_cmp actual - <<EOF
+ test_cmp actual - <<EOF
# Submodule changes to be committed:
#
# * sm1 $head6...0000000:
index d8ad25036f325ecdcc71257614e19b5e6ab2cdc5..1367309485eca96b8312733c5f8573471afcc0b4 100755 (executable)
$pwd/clone-foo3-sub3-$sub3sha1
EOF
-test_expect_success 'test basic "submodule foreach" usage' '
+test_expect_success NO_GETTEXT_POISON 'test basic "submodule foreach" usage' '
git clone super clone &&
(
cd clone &&
Entering 'sub3'
EOF
-test_expect_success 'test messages from "foreach --recursive"' '
+test_expect_success NO_GETTEXT_POISON 'test messages from "foreach --recursive"' '
(
cd clone2 &&
git submodule foreach --recursive "true" > ../actual
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 162527c2114955df2c55db9bf37db59d05fe75f8..1732f7160b55fd13ec53bc21a29e0ae697c9cd4c 100755 (executable)
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
)
'
-test_expect_success 'adding real content to a template should commit' '
+test_expect_success NO_GETTEXT_POISON 'adding real content to a template should commit' '
(
test_set_editor "$TEST_DIRECTORY"/t7500/add-content &&
git commit --template "$TEMPLATE"
commit_msg_is "template linecommit message"
'
-test_expect_success '-t option should be short for --template' '
+test_expect_success NO_GETTEXT_POISON '-t option should be short for --template' '
echo "short template" > "$TEMPLATE" &&
echo "new content" >> foo &&
git add foo &&
commit_msg_is "short templatecommit message"
'
-test_expect_success 'config-specified template should commit' '
+test_expect_success NO_GETTEXT_POISON 'config-specified template should commit' '
echo "new template" > "$TEMPLATE" &&
git config commit.template "$TEMPLATE" &&
echo "more content" >> foo &&
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 8980738c7540b79eaa566d6054f3e76b202bd27e..9f6e852b28a28c71cfb82a35ce23d39fe13e3ed8 100755 (executable)
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
test_expect_success \
"initial status" \
"echo 'bongo bongo' >file &&
- git add file && \
- git status | grep 'Initial commit'"
+ git add file"
+
+test_expect_success NO_GETTEXT_POISON \
+ "Constructing initial commit" \
+ "git status | grep 'Initial commit'"
test_expect_success \
"fail initial amend" \
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 50da034cd3934d0509e67a6f20e514a18e5659d4..d7c4280e8fcc79e6f3e4109ec61c553a0ed3a182 100755 (executable)
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
SUMMARY_POSTFIX="$(git log -1 --pretty='format:%h')"
echo "[$SUMMARY_PREFIX $SUMMARY_POSTFIX] $2" >exp &&
- test_cmp exp act
+ if test_have_prereq NO_GETTEXT_POISON
+ then
+ test_cmp exp act
+ fi
}
test_expect_success 'output summary format' '
check_summary_oneline "root-commit" "initial" &&
echo change >>file1 &&
- git add file1 &&
+ git add file1
+'
+
+test_expect_success 'output summary format: root-commit' '
check_summary_oneline "" "a change"
'
'
-echo "sample
-
-# Please enter the commit message for your changes. Lines starting
-# with '#' will be ignored, and an empty message aborts the commit." >expect
-
test_expect_success 'cleanup commit messages (strip,-F,-e)' '
echo >>negative &&
{ echo;echo sample;echo; } >text &&
git commit -e -F text -a &&
- head -n 4 .git/COMMIT_EDITMSG >actual &&
- test_cmp expect actual
+ head -n 4 .git/COMMIT_EDITMSG >actual
+'
+
+echo "sample
+
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit." >expect
+test_expect_success NO_GETTEXT_POISON 'cleanup commit messages (strip,-F,-e): output' '
+ test_cmp expect actual
'
echo "#
# Author: $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>
#" >> expect
-test_expect_success 'author different from committer' '
+test_expect_success NO_GETTEXT_POISON 'author different from committer' '
echo >>negative &&
git commit -e -m "sample"
- head -n 7 .git/COMMIT_EDITMSG >actual &&
+ head -n 7 .git/COMMIT_EDITMSG >actual
+'
+
+test_expect_success NO_GETTEXT_POISON 'author different from committer: output' '
test_cmp expect actual
'
echo "# Committer:
#" >> expect
-test_expect_success 'committer is automatic' '
+test_expect_success NO_GETTEXT_POISON 'committer is automatic' '
echo >>negative &&
(
test_must_fail git commit -e -m "sample"
) &&
head -n 8 .git/COMMIT_EDITMSG | \
- sed "s/^# Committer: .*/# Committer:/" >actual &&
+ sed "s/^# Committer: .*/# Committer:/" >actual
+'
+
+test_expect_success NO_GETTEXT_POISON 'committer is automatic: output' '
test_cmp expect actual
'
try_commit_status_combo () {
- test_expect_success 'commit' '
+ test_expect_success NO_GETTEXT_POISON 'commit' '
clear_config commit.status &&
try_commit "" &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit' '
+ test_expect_success NO_GETTEXT_POISON 'commit' '
clear_config commit.status &&
try_commit "" &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --status' '
+ test_expect_success NO_GETTEXT_POISON 'commit --status' '
clear_config commit.status &&
try_commit --status &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --no-status' '
+ test_expect_success NO_GETTEXT_POISON 'commit --no-status' '
clear_config commit.status &&
try_commit --no-status &&
! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit with commit.status = yes' '
+ test_expect_success NO_GETTEXT_POISON 'commit with commit.status = yes' '
clear_config commit.status &&
git config commit.status yes &&
try_commit "" &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit with commit.status = no' '
+ test_expect_success NO_GETTEXT_POISON 'commit with commit.status = no' '
clear_config commit.status &&
git config commit.status no &&
try_commit "" &&
! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --status with commit.status = yes' '
+ test_expect_success NO_GETTEXT_POISON 'commit --status with commit.status = yes' '
clear_config commit.status &&
git config commit.status yes &&
try_commit --status &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --no-status with commit.status = yes' '
+ test_expect_success NO_GETTEXT_POISON 'commit --no-status with commit.status = yes' '
clear_config commit.status &&
git config commit.status yes &&
try_commit --no-status &&
! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --status with commit.status = no' '
+ test_expect_success NO_GETTEXT_POISON 'commit --status with commit.status = no' '
clear_config commit.status &&
git config commit.status no &&
try_commit --status &&
grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
- test_expect_success 'commit --no-status with commit.status = no' '
+ test_expect_success NO_GETTEXT_POISON 'commit --no-status with commit.status = no' '
clear_config commit.status &&
git config commit.status no &&
try_commit --no-status &&
index 3d4f85d74f6f378d76bde77e581273af010ba452..2347451496c4300973b0739342c720ef13c6cd2c 100755 (executable)
git commit -m "Add submodule sub"
'
-test_expect_success 'status clean' '
+test_expect_success NO_GETTEXT_POISON 'status clean' '
git status >output &&
grep "nothing to commit" output
'
-test_expect_success 'commit --dry-run -a clean' '
+test_expect_success NO_GETTEXT_POISON 'commit --dry-run -a clean' '
test_must_fail git commit --dry-run -a >output &&
grep "nothing to commit" output
'
-test_expect_success 'status with modified file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with modified file in submodule' '
(cd sub && git reset --hard) &&
echo "changed" >sub/foo &&
git status >output &&
EOF
'
-test_expect_success 'status with added file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (modified content)" output
EOF
'
-test_expect_success 'status with untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with untracked file in submodule' '
(cd sub && git reset --hard) &&
echo "content" >sub/new-file &&
git status >output &&
grep "modified: sub (untracked content)" output
'
-test_expect_success 'status -uno with untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status -uno with untracked file in submodule' '
git status -uno >output &&
grep "^nothing to commit" output
'
EOF
'
-test_expect_success 'status with added and untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added and untracked file in submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
echo "content" >sub/new-file &&
git status >output &&
EOF
'
-test_expect_success 'status with modified file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with modified file in modified submodule' '
(cd sub && git reset --hard) &&
rm sub/new-file &&
(cd sub && echo "next change" >foo && git commit -m "next change" foo) &&
@@ -113,7 +113,7 @@ test_expect_success 'status with modified file in modified submodule (porcelain)
EOF
'
-test_expect_success 'status with added file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in modified submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (new commits, modified content)" output
@@ -127,7 +127,7 @@ test_expect_success 'status with added file in modified submodule (porcelain)' '
EOF
'
-test_expect_success 'status with untracked file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with untracked file in modified submodule' '
(cd sub && git reset --hard) &&
echo "content" >sub/new-file &&
git status >output &&
@@ -141,7 +141,7 @@ test_expect_success 'status with untracked file in modified submodule (porcelain
EOF
'
-test_expect_success 'status with added and untracked file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added and untracked file in modified submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
echo "content" >sub/new-file &&
git status >output &&
git commit -m "added .real to .gitignore" .gitignore
'
-test_expect_success 'status with added file in modified submodule with .git file' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in modified submodule with .git file' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (new commits, modified content)" output
rm -rf sub/* sub/.git
'
-test_expect_success 'status clean (empty submodule dir)' '
+test_expect_success NO_GETTEXT_POISON 'status clean (empty submodule dir)' '
git status >output &&
grep "nothing to commit" output
'
-test_expect_success 'status -a clean (empty submodule dir)' '
+test_expect_success NO_GETTEXT_POISON 'status -a clean (empty submodule dir)' '
test_must_fail git commit --dry-run -a >output &&
grep "nothing to commit" output
'
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index f1dc5c3b6a36507e664e624bf9cebb1634bce335..d79737faead773d964a28f485e8c0856ce06ced9 100755 (executable)
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
git add dir2/added
'
-test_expect_success 'status (1)' '
+test_expect_success NO_GETTEXT_POISON 'status (1)' '
grep "use \"git rm --cached <file>\.\.\.\" to unstage" output
# untracked
EOF
-test_expect_success 'status (2)' '
+test_expect_success NO_GETTEXT_POISON 'status (2)' '
git status >output &&
test_cmp expect output
git config advice.statusHints false
-test_expect_success 'status (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status (advice.statusHints false)' '
git status >output &&
test_cmp expect output
'
+test_expect_success 'setup dir3' '
+ mkdir dir3 &&
+ : >dir3/untracked1 &&
+ : >dir3/untracked2
+'
+
cat >expect <<EOF
# On branch master
# Changes to be committed:
#
# Untracked files not listed (use -u option to show untracked files)
EOF
-test_expect_success 'status -uno' '
- mkdir dir3 &&
- : >dir3/untracked1 &&
- : >dir3/untracked2 &&
+test_expect_success NO_GETTEXT_POISON 'status -uno' '
git status -uno >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles no)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles no)' '
git config status.showuntrackedfiles no
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
test_cmp expect output
'
# Untracked files not listed
EOF
git config advice.statusHints false
-test_expect_success 'status -uno (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status -uno (advice.statusHints false)' '
git status -uno >output &&
test_cmp expect output
'
A dir2/added
EOF
test_expect_success 'status -s -uno' '
- git config --unset status.showuntrackedfiles
git status -s -uno >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status -unormal' '
+test_expect_success NO_GETTEXT_POISON 'status -unormal' '
git status -unormal >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles normal)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles normal)' '
git config status.showuntrackedfiles normal
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
test_cmp expect output
'
?? untracked
EOF
test_expect_success 'status -s -unormal' '
- git config --unset status.showuntrackedfiles
git status -s -unormal >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status -uall' '
+test_expect_success NO_GETTEXT_POISON 'status -uall' '
git status -uall >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles all)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles all)' '
git config status.showuntrackedfiles all
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
- rm -rf dir3 &&
- git config --unset status.showuntrackedfiles &&
test_cmp expect output
'
+test_expect_success 'teardown dir3' '
+ rm -rf dir3
+'
+
cat >expect <<EOF
M dir1/modified
A dir2/added
# ../untracked
EOF
-test_expect_success 'status with relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status with relative paths' '
(cd dir1 && git status) >output &&
test_cmp expect output
# <BLUE>untracked<RESET>
EOF
-test_expect_success 'status with color.ui' '
+test_expect_success NO_GETTEXT_POISON 'status with color.ui' '
git config color.ui always &&
+ test_when_finished "git config --unset color.ui" &&
git status | test_decode_color >output &&
test_cmp expect output
'
-test_expect_success 'status with color.status' '
+test_expect_success NO_GETTEXT_POISON 'status with color.status' '
- git config --unset color.ui &&
git config color.status always &&
+ test_when_finished "git config --unset color.status" &&
git status | test_decode_color >output &&
test_cmp expect output
test_expect_success 'status -s with color.ui' '
- git config --unset color.status &&
git config color.ui always &&
git status -s | test_decode_color >output &&
test_cmp expect output
EOF
-test_expect_success 'status without relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status without relative paths' '
- git config status.relativePaths false
+ git config status.relativePaths false &&
+ test_when_finished "git config --unset status.relativePaths" &&
(cd dir1 && git status) >output &&
test_cmp expect output
test_expect_success 'status -s without relative paths' '
+ git config status.relativePaths false &&
+ test_when_finished "git config --unset status.relativePaths" &&
(cd dir1 && git status -s) >output &&
test_cmp expect output
# untracked
EOF
test_expect_success 'dry-run of partial commit excluding new file in index' '
- git commit --dry-run dir1/modified >output &&
+ git commit --dry-run dir1/modified >output
+'
+
+test_expect_success NO_GETTEXT_POISON 'dry-run of partial commit excluding new file in index: output' '
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status submodule summary is disabled by default' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary is disabled by default' '
git status >output &&
test_cmp expect output
'
# we expect the same as the previous test
-test_expect_success 'status --untracked-files=all does not show submodule' '
+test_expect_success NO_GETTEXT_POISON 'status --untracked-files=all does not show submodule' '
git status --untracked-files=all >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status submodule summary' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary' '
git config status.submodulesummary 10 &&
git status >output &&
test_cmp expect output
# untracked
no changes added to commit (use "git add" and/or "git commit -a")
EOF
-test_expect_success 'status submodule summary (clean submodule)' '
- git commit -m "commit submodule" &&
+test_expect_success 'status submodule summary (clean submodule): commit' '
+ git commit -m "commit submodule"
+'
+
+test_expect_success NO_GETTEXT_POISON 'status submodule summary (clean submodule): output' '
git config status.submodulesummary 10 &&
test_must_fail git commit --dry-run >output &&
test_cmp expect output &&
# output
# untracked
EOF
-test_expect_success 'commit --dry-run submodule summary (--amend)' '
+test_expect_success NO_GETTEXT_POISON 'commit --dry-run submodule summary (--amend)' '
git config status.submodulesummary 10 &&
git commit --dry-run --amend >output &&
test_cmp expect output
# untracked
EOF
-test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=untracked suppresses submodules with untracked content' '
echo modified > sm/untracked &&
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=untracked suppresses submodules with untracked content' '
git config diff.ignoreSubmodules dirty &&
git status >output &&
test_cmp expect output &&
@@ -885,7 +900,7 @@ test_expect_success '.gitmodules ignore=untracked suppresses submodules with unt
git config --unset diff.ignoreSubmodules
'
-test_expect_success '.git/config ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=untracked suppresses submodules with untracked content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
@@ -896,12 +911,12 @@ test_expect_success '.git/config ignore=untracked suppresses submodules with unt
git config --remove-section -f .gitmodules submodule.subname
'
-test_expect_success '--ignore-submodules=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with untracked content' '
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with untracked content' '
git config diff.ignoreSubmodules dirty &&
git status >output &&
! test -s actual &&
@@ -913,7 +928,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with untrack
git config --unset diff.ignoreSubmodules
'
-test_expect_success '.git/config ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with untracked content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
@@ -924,13 +939,13 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with untrack
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success '--ignore-submodules=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with modified content' '
echo modified > sm/foo &&
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with modified content' '
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -938,7 +953,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with modifie
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success '.git/config ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with modified content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
# untracked
EOF
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
git config --add -f .gitmodules submodule.subname.ignore untracked &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -994,7 +1009,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules wi
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodules with modified content" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
# untracked
EOF
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodule summary" '
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore untracked &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -1056,7 +1071,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule sum
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
@@ -1067,11 +1082,11 @@ test_expect_success ".git/config ignore=untracked doesn't suppress submodule sum
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success "--ignore-submodules=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=dirty doesn't suppress submodule summary" '
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=dirty doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -1079,7 +1094,7 @@ test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=dirty doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
no changes added to commit (use "git add" and/or "git commit -a")
EOF
-test_expect_success "--ignore-submodules=all suppresses submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=all suppresses submodule summary" '
git status --ignore-submodules=all > output &&
test_cmp expect output
'
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index b147a1bd69e96e48d3808028a3775a609471639a..3aafdda5dfbc42825e924fcc3279127431be278a 100755 (executable)
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
test_debug 'git log --graph --decorate --oneline --all'
-test_expect_success 'in-index merge' '
+test_expect_success NO_GETTEXT_POISON 'in-index merge' '
git reset --hard c0 &&
git merge --no-ff -s resolve c1 >out &&
grep "Wonderful." out &&
index 4d5ce4e682c1ea69034c3f7789a8ac0c89b12466..5f731a1177267e76f19dbe1605a4d0f2e8e749bd 100755 (executable)
test_cmp important c0.c
'
+test_expect_success 'set up unborn branch and content' '
+ git symbolic-ref HEAD refs/heads/unborn &&
+ rm -f .git/index &&
+ echo foo > tracked-file &&
+ git add tracked-file &&
+ echo bar > untracked-file
+'
+
+test_expect_failure 'will not clobber WT/index when merging into unborn' '
+ git merge master &&
+ grep foo tracked-file &&
+ git show :tracked-file >expect &&
+ grep foo expect &&
+ grep bar untracked-file
+'
+
test_done
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index c8777589ca1c89825b570cfc05405a39df39aaba..8a7788dc39f236b15e60912c384d835fd1db5a28 100755 (executable)
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
test_cmp expected actual
'
+ test_expect_success "grep --max-depth 0 -- . t $L" '
+ {
+ echo ${HC}t/v:1:vvv
+ echo ${HC}v:1:vvv
+ } >expected &&
+ git grep --max-depth 0 -n -e vvv $H -- . t >actual &&
+ test_cmp expected actual
+ '
+
+ test_expect_success "grep --max-depth 0 -- t . $L" '
+ {
+ echo ${HC}t/v:1:vvv
+ echo ${HC}v:1:vvv
+ } >expected &&
+ git grep --max-depth 0 -n -e vvv $H -- t . >actual &&
+ test_cmp expected actual
+ '
+
done
cat >expected <<EOF
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index 568a6f2b69ab5003c00f206806c3fe6289f63a98..3aa544c34b3511d8f57b7625cf5324cf89bc5ee6 100755 (executable)
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
test_cmp empty out
'
-test_expect_success 'git grep -O --cached' '
+test_expect_success NO_GETTEXT_POISON 'git grep -O --cached' '
test_must_fail git grep --cached -O GREP_PATTERN >out 2>msg &&
grep open-files-in-pager msg
'
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 222d1059ef99879d3db387be798f973fb093f53e..52ac0e56dce12016ab03155bd16b2b66b062fca3 100755 (executable)
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
git diff-tree -C --find-copies-harder -r N4 N6 >actual &&
compare_diff_raw expect actual'
+test_expect_success \
+ 'N: delete directory by copying' \
+ 'cat >expect <<-\EOF &&
+ OBJID
+ :100644 000000 OBJID OBJID D foo/bar/qux
+ OBJID
+ :000000 100644 OBJID OBJID A foo/bar/baz
+ :000000 100644 OBJID OBJID A foo/bar/qux
+ EOF
+ empty_tree=$(git mktree </dev/null) &&
+ cat >input <<-INPUT_END &&
+ commit refs/heads/N-delete
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ collect data to be deleted
+ COMMIT
+
+ deleteall
+ M 100644 inline foo/bar/baz
+ data <<DATA_END
+ hello
+ DATA_END
+ C "foo/bar/baz" "foo/bar/qux"
+ C "foo/bar/baz" "foo/bar/quux/1"
+ C "foo/bar/baz" "foo/bar/quuux"
+ M 040000 $empty_tree foo/bar/quux
+ M 040000 $empty_tree foo/bar/quuux
+
+ commit refs/heads/N-delete
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ delete subdirectory
+ COMMIT
+
+ M 040000 $empty_tree foo/bar/qux
+ INPUT_END
+ git fast-import <input &&
+ git rev-list N-delete |
+ git diff-tree -r --stdin --root --always |
+ sed -e "s/$_x40/OBJID/g" >actual &&
+ test_cmp expect actual'
+
test_expect_success \
'N: modify copied tree' \
'cat >expect <<-\EOF &&
'cat input | git fast-import --export-marks=other.marks &&
grep :1 other.marks'
+test_expect_success 'R: catch typo in marks file name' '
+ test_must_fail git fast-import --import-marks=nonexistent.marks </dev/null &&
+ echo "feature import-marks=nonexistent.marks" |
+ test_must_fail git fast-import
+'
+
+test_expect_success 'R: import and output marks can be the same file' '
+ rm -f io.marks &&
+ blob=$(echo hi | git hash-object --stdin) &&
+ cat >expect <<-EOF &&
+ :1 $blob
+ :2 $blob
+ EOF
+ git fast-import --export-marks=io.marks <<-\EOF &&
+ blob
+ mark :1
+ data 3
+ hi
+
+ EOF
+ git fast-import --import-marks=io.marks --export-marks=io.marks <<-\EOF &&
+ blob
+ mark :2
+ data 3
+ hi
+
+ EOF
+ test_cmp expect io.marks
+'
+
+test_expect_success 'R: --import-marks=foo --output-marks=foo to create foo fails' '
+ rm -f io.marks &&
+ test_must_fail git fast-import --import-marks=io.marks --export-marks=io.marks <<-\EOF
+ blob
+ mark :1
+ data 3
+ hi
+
+ EOF
+'
+
+test_expect_success 'R: --import-marks-if-exists' '
+ rm -f io.marks &&
+ blob=$(echo hi | git hash-object --stdin) &&
+ echo ":1 $blob" >expect &&
+ git fast-import --import-marks-if-exists=io.marks --export-marks=io.marks <<-\EOF &&
+ blob
+ mark :1
+ data 3
+ hi
+
+ EOF
+ test_cmp expect io.marks
+'
+
cat >input << EOF
feature import-marks=marks.out
feature export-marks=marks.new
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 42f2f144969a0671b3431f21f659beaff2c53b3d..0db3d1bf66665364001bf62f754fda32ed04929e 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
# For repeatability, reset the environment to known value.
LANG=C
LC_ALL=C
+LANGUAGE=C
PAGER=cat
TZ=UTC
TERM=dumb
unset GIT_NOTES_DISPLAY_REF
unset GIT_NOTES_REWRITE_REF
unset GIT_NOTES_REWRITE_MODE
+unset GIT_REFLOG_ACTION
+unset GIT_CHERRY_PICK_HELP
+unset GIT_QUIET
GIT_MERGE_VERBOSITY=5
export GIT_MERGE_VERBOSITY
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
test -z "$NO_PERL" && test_set_prereq PERL
test -z "$NO_PYTHON" && test_set_prereq PYTHON
+test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
+if test -z "$GETTEXT_POISON"
+then
+ test_set_prereq NO_GETTEXT_POISON
+else
+ test_set_prereq GETTEXT_POISON
+ GIT_INTERNAL_GETTEXT_GETTEXT_POISON=YesPlease
+ export GIT_INTERNAL_GETTEXT_GETTEXT_POISON
+fi
# test whether the filesystem supports symbolic links
ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
diff --git a/test-mktemp.c b/test-mktemp.c
--- /dev/null
+++ b/test-mktemp.c
@@ -0,0 +1,14 @@
+/*
+ * test-mktemp.c: code to exercise the creation of temporary files
+ */
+#include "git-compat-util.h"
+
+int main(int argc, char *argv[])
+{
+ if (argc != 2)
+ usage("Expected 1 parameter defining the temporary file template");
+
+ xmkstemp(xstrdup(argv[1]));
+
+ return 0;
+}
diff --git a/tree-diff.c b/tree-diff.c
index 12c9a88884ec3bb70a1744e44235c578a44e08e6..3954281f509bbed9a9b095ed92d24b67275fed82 100644 (file)
--- a/tree-diff.c
+++ b/tree-diff.c
#include "diffcore.h"
#include "tree.h"
-static char *malloc_base(const char *base, int baselen, const char *path, int pathlen)
-{
- char *newbase = xmalloc(baselen + pathlen + 2);
- memcpy(newbase, base, baselen);
- memcpy(newbase + baselen, path, pathlen);
- memcpy(newbase + baselen + pathlen, "/", 2);
- return newbase;
-}
+static void show_entry(struct diff_options *opt, const char *prefix,
+ struct tree_desc *desc, struct strbuf *base);
-static char *malloc_fullname(const char *base, int baselen, const char *path, int pathlen)
-{
- char *fullname = xmalloc(baselen + pathlen + 1);
- memcpy(fullname, base, baselen);
- memcpy(fullname + baselen, path, pathlen);
- fullname[baselen + pathlen] = 0;
- return fullname;
-}
-
-static void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,
- const char *base, int baselen);
-
-static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const char *base, int baselen, struct diff_options *opt)
+static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2,
+ struct strbuf *base, struct diff_options *opt)
{
unsigned mode1, mode2;
const char *path1, *path2;
const unsigned char *sha1, *sha2;
int cmp, pathlen1, pathlen2;
- char *fullname;
+ int old_baselen = base->len;
+ int retval = 0;
sha1 = tree_entry_extract(t1, &path1, &mode1);
sha2 = tree_entry_extract(t2, &path2, &mode2);
pathlen2 = tree_entry_len(path2, sha2);
cmp = base_name_compare(path1, pathlen1, mode1, path2, pathlen2, mode2);
if (cmp < 0) {
- show_entry(opt, "-", t1, base, baselen);
+ show_entry(opt, "-", t1, base);
return -1;
}
if (cmp > 0) {
- show_entry(opt, "+", t2, base, baselen);
+ show_entry(opt, "+", t2, base);
return 1;
}
if (!DIFF_OPT_TST(opt, FIND_COPIES_HARDER) && !hashcmp(sha1, sha2) && mode1 == mode2)
@@ -57,149 +41,29 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const
* file, we need to consider it a remove and an add.
*/
if (S_ISDIR(mode1) != S_ISDIR(mode2)) {
- show_entry(opt, "-", t1, base, baselen);
- show_entry(opt, "+", t2, base, baselen);
+ show_entry(opt, "-", t1, base);
+ show_entry(opt, "+", t2, base);
return 0;
}
+ strbuf_add(base, path1, pathlen1);
if (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode1)) {
- int retval;
- char *newbase = malloc_base(base, baselen, path1, pathlen1);
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
- newbase[baselen + pathlen1] = 0;
opt->change(opt, mode1, mode2,
- sha1, sha2, newbase, 0, 0);
- newbase[baselen + pathlen1] = '/';
+ sha1, sha2, base->buf, 0, 0);
}
- retval = diff_tree_sha1(sha1, sha2, newbase, opt);
- free(newbase);
- return retval;
+ strbuf_addch(base, '/');
+ retval = diff_tree_sha1(sha1, sha2, base->buf, opt);
+ } else {
+ opt->change(opt, mode1, mode2, sha1, sha2, base->buf, 0, 0);
}
-
- fullname = malloc_fullname(base, baselen, path1, pathlen1);
- opt->change(opt, mode1, mode2, sha1, sha2, fullname, 0, 0);
- free(fullname);
+ strbuf_setlen(base, old_baselen);
return 0;
}
-/*
- * Is a tree entry interesting given the pathspec we have?
- *
- * Pre-condition: baselen == 0 || base[baselen-1] == '/'
- *
- * Return:
- * - 2 for "yes, and all subsequent entries will be"
- * - 1 for yes
- * - zero for no
- * - negative for "no, and no subsequent entries will be either"
- */
-static int tree_entry_interesting(struct tree_desc *desc, const char *base, int baselen, struct diff_options *opt)
-{
- const char *path;
- const unsigned char *sha1;
- unsigned mode;
- int i;
- int pathlen;
- int never_interesting = -1;
-
- if (!opt->nr_paths)
- return 2;
-
- sha1 = tree_entry_extract(desc, &path, &mode);
-
- pathlen = tree_entry_len(path, sha1);
-
- for (i = 0; i < opt->nr_paths; i++) {
- const char *match = opt->paths[i];
- int matchlen = opt->pathlens[i];
- int m = -1; /* signals that we haven't called strncmp() */
-
- if (baselen >= matchlen) {
- /* If it doesn't match, move along... */
- if (strncmp(base, match, matchlen))
- continue;
-
- /*
- * If the base is a subdirectory of a path which
- * was specified, all of them are interesting.
- */
- if (!matchlen ||
- base[matchlen] == '/' ||
- match[matchlen - 1] == '/')
- return 2;
-
- /* Just a random prefix match */
- continue;
- }
-
- /* Does the base match? */
- if (strncmp(base, match, baselen))
- continue;
-
- match += baselen;
- matchlen -= baselen;
-
- if (never_interesting) {
- /*
- * We have not seen any match that sorts later
- * than the current path.
- */
-
- /*
- * Does match sort strictly earlier than path
- * with their common parts?
- */
- m = strncmp(match, path,
- (matchlen < pathlen) ? matchlen : pathlen);
- if (m < 0)
- continue;
-
- /*
- * If we come here even once, that means there is at
- * least one pathspec that would sort equal to or
- * later than the path we are currently looking at.
- * In other words, if we have never reached this point
- * after iterating all pathspecs, it means all
- * pathspecs are either outside of base, or inside the
- * base but sorts strictly earlier than the current
- * one. In either case, they will never match the
- * subsequent entries. In such a case, we initialized
- * the variable to -1 and that is what will be
- * returned, allowing the caller to terminate early.
- */
- never_interesting = 0;
- }
-
- if (pathlen > matchlen)
- continue;
-
- if (matchlen > pathlen) {
- if (match[pathlen] != '/')
- continue;
- if (!S_ISDIR(mode))
- continue;
- }
-
- if (m == -1)
- /*
- * we cheated and did not do strncmp(), so we do
- * that here.
- */
- m = strncmp(match, path, pathlen);
-
- /*
- * If common part matched earlier then it is a hit,
- * because we rejected the case where path is not a
- * leading directory and is shorter than match.
- */
- if (!m)
- return 1;
- }
- return never_interesting; /* No matches */
-}
-
/* A whole sub-tree went away or appeared */
-static void show_tree(struct diff_options *opt, const char *prefix, struct tree_desc *desc, const char *base, int baselen)
+static void show_tree(struct diff_options *opt, const char *prefix,
+ struct tree_desc *desc, struct strbuf *base)
{
int all_interesting = 0;
while (desc->size) {
@@ -208,31 +72,32 @@ static void show_tree(struct diff_options *opt, const char *prefix, struct tree_
if (all_interesting)
show = 1;
else {
- show = tree_entry_interesting(desc, base, baselen,
- opt);
+ show = tree_entry_interesting(&desc->entry, base, 0,
+ &opt->pathspec);
if (show == 2)
all_interesting = 1;
}
if (show < 0)
break;
if (show)
- show_entry(opt, prefix, desc, base, baselen);
+ show_entry(opt, prefix, desc, base);
update_tree_entry(desc);
}
}
/* A file entry went away or appeared */
-static void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,
- const char *base, int baselen)
+static void show_entry(struct diff_options *opt, const char *prefix,
+ struct tree_desc *desc, struct strbuf *base)
{
unsigned mode;
const char *path;
const unsigned char *sha1 = tree_entry_extract(desc, &path, &mode);
int pathlen = tree_entry_len(path, sha1);
+ int old_baselen = base->len;
+ strbuf_add(base, path, pathlen);
if (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode)) {
enum object_type type;
- char *newbase = malloc_base(base, baselen, path, pathlen);
struct tree_desc inner;
void *tree;
unsigned long size;
@@ -241,28 +106,25 @@ static void show_entry(struct diff_options *opt, const char *prefix, struct tree
if (!tree || type != OBJ_TREE)
die("corrupt tree sha %s", sha1_to_hex(sha1));
- if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
- newbase[baselen + pathlen] = 0;
- opt->add_remove(opt, *prefix, mode, sha1, newbase, 0);
- newbase[baselen + pathlen] = '/';
- }
+ if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE))
+ opt->add_remove(opt, *prefix, mode, sha1, base->buf, 0);
- init_tree_desc(&inner, tree, size);
- show_tree(opt, prefix, &inner, newbase, baselen + 1 + pathlen);
+ strbuf_addch(base, '/');
+ init_tree_desc(&inner, tree, size);
+ show_tree(opt, prefix, &inner, base);
free(tree);
- free(newbase);
- } else {
- char *fullname = malloc_fullname(base, baselen, path, pathlen);
- opt->add_remove(opt, prefix[0], mode, sha1, fullname, 0);
- free(fullname);
- }
+ } else
+ opt->add_remove(opt, prefix[0], mode, sha1, base->buf, 0);
+
+ strbuf_setlen(base, old_baselen);
}
-static void skip_uninteresting(struct tree_desc *t, const char *base, int baselen, struct diff_options *opt, int *all_interesting)
+static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
+ struct diff_options *opt, int *all_interesting)
{
while (t->size) {
- int show = tree_entry_interesting(t, base, baselen, opt);
+ int show = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
if (show == 2)
*all_interesting = 1;
if (!show) {
@@ -276,37 +138,44 @@ static void skip_uninteresting(struct tree_desc *t, const char *base, int basele
}
}
-int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, struct diff_options *opt)
+int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
+ const char *base_str, struct diff_options *opt)
{
- int baselen = strlen(base);
+ struct strbuf base;
+ int baselen = strlen(base_str);
int all_t1_interesting = 0;
int all_t2_interesting = 0;
+ /* Enable recursion indefinitely */
+ opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE);
+ opt->pathspec.max_depth = -1;
+
+ strbuf_init(&base, PATH_MAX);
+ strbuf_add(&base, base_str, baselen);
+
for (;;) {
if (DIFF_OPT_TST(opt, QUICK) &&
DIFF_OPT_TST(opt, HAS_CHANGES))
break;
- if (opt->nr_paths) {
+ if (opt->pathspec.nr) {
if (!all_t1_interesting)
- skip_uninteresting(t1, base, baselen, opt,
- &all_t1_interesting);
+ skip_uninteresting(t1, &base, opt, &all_t1_interesting);
if (!all_t2_interesting)
- skip_uninteresting(t2, base, baselen, opt,
- &all_t2_interesting);
+ skip_uninteresting(t2, &base, opt, &all_t2_interesting);
}
if (!t1->size) {
if (!t2->size)
break;
- show_entry(opt, "+", t2, base, baselen);
+ show_entry(opt, "+", t2, &base);
update_tree_entry(t2);
continue;
}
if (!t2->size) {
- show_entry(opt, "-", t1, base, baselen);
+ show_entry(opt, "-", t1, &base);
update_tree_entry(t1);
continue;
}
- switch (compare_tree_entry(t1, t2, base, baselen, opt)) {
+ switch (compare_tree_entry(t1, t2, &base, opt)) {
case -1:
update_tree_entry(t1);
continue;
@@ -319,6 +188,8 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, stru
}
die("git diff-tree: internal error");
}
+
+ strbuf_release(&base);
return 0;
}
@@ -349,7 +220,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
DIFF_OPT_SET(&diff_opts, RECURSIVE);
DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
- diff_opts.single_follow = opt->paths[0];
+ diff_opts.single_follow = opt->pathspec.raw[0];
diff_opts.break_opt = opt->break_opt;
paths[0] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
@@ -369,15 +240,16 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
* diff_queued_diff, we will also use that as the path in
* the future!
*/
- if ((p->status == 'R' || p->status == 'C') && !strcmp(p->two->path, opt->paths[0])) {
+ if ((p->status == 'R' || p->status == 'C') &&
+ !strcmp(p->two->path, opt->pathspec.raw[0])) {
/* Switch the file-pairs around */
q->queue[i] = choice;
choice = p;
/* Update the path we use from now on.. */
diff_tree_release_paths(opt);
- opt->paths[0] = xstrdup(p->one->path);
- diff_tree_setup_paths(opt->paths, opt);
+ opt->pathspec.raw[0] = xstrdup(p->one->path);
+ diff_tree_setup_paths(opt->pathspec.raw, opt);
/*
* The caller expects us to return a set of vanilla
@@ -452,36 +324,12 @@ int diff_root_tree_sha1(const unsigned char *new, const char *base, struct diff_
return retval;
}
-static int count_paths(const char **paths)
-{
- int i = 0;
- while (*paths++)
- i++;
- return i;
-}
-
void diff_tree_release_paths(struct diff_options *opt)
{
- free(opt->pathlens);
+ free_pathspec(&opt->pathspec);
}
void diff_tree_setup_paths(const char **p, struct diff_options *opt)
{
- opt->nr_paths = 0;
- opt->pathlens = NULL;
- opt->paths = NULL;
-
- if (p) {
- int i;
-
- opt->paths = p;
- opt->nr_paths = count_paths(p);
- if (opt->nr_paths == 0) {
- opt->pathlens = NULL;
- return;
- }
- opt->pathlens = xmalloc(opt->nr_paths * sizeof(int));
- for (i=0; i < opt->nr_paths; i++)
- opt->pathlens[i] = strlen(p[i]);
- }
+ init_pathspec(&opt->pathspec, p);
}
diff --git a/tree-walk.c b/tree-walk.c
index a9bbf4e2354df5ce6b010873b419731343a12c7d..ddcf50c30a25e5c3695b41363c050d1c1f6580bf 100644 (file)
--- a/tree-walk.c
+++ b/tree-walk.c
#include "cache.h"
#include "tree-walk.h"
#include "unpack-trees.h"
+#include "dir.h"
#include "tree.h"
static const char *get_mode(const char *str, unsigned int *modep)
@@ -455,3 +456,185 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch
free(tree);
return retval;
}
+
+static int match_entry(const struct name_entry *entry, int pathlen,
+ const char *match, int matchlen,
+ int *never_interesting)
+{
+ int m = -1; /* signals that we haven't called strncmp() */
+
+ if (*never_interesting) {
+ /*
+ * We have not seen any match that sorts later
+ * than the current path.
+ */
+
+ /*
+ * Does match sort strictly earlier than path
+ * with their common parts?
+ */
+ m = strncmp(match, entry->path,
+ (matchlen < pathlen) ? matchlen : pathlen);
+ if (m < 0)
+ return 0;
+
+ /*
+ * If we come here even once, that means there is at
+ * least one pathspec that would sort equal to or
+ * later than the path we are currently looking at.
+ * In other words, if we have never reached this point
+ * after iterating all pathspecs, it means all
+ * pathspecs are either outside of base, or inside the
+ * base but sorts strictly earlier than the current
+ * one. In either case, they will never match the
+ * subsequent entries. In such a case, we initialized
+ * the variable to -1 and that is what will be
+ * returned, allowing the caller to terminate early.
+ */
+ *never_interesting = 0;
+ }
+
+ if (pathlen > matchlen)
+ return 0;
+
+ if (matchlen > pathlen) {
+ if (match[pathlen] != '/')
+ return 0;
+ if (!S_ISDIR(entry->mode))
+ return 0;
+ }
+
+ if (m == -1)
+ /*
+ * we cheated and did not do strncmp(), so we do
+ * that here.
+ */
+ m = strncmp(match, entry->path, pathlen);
+
+ /*
+ * If common part matched earlier then it is a hit,
+ * because we rejected the case where path is not a
+ * leading directory and is shorter than match.
+ */
+ if (!m)
+ return 1;
+
+ return 0;
+}
+
+static int match_dir_prefix(const char *base, int baselen,
+ const char *match, int matchlen)
+{
+ if (strncmp(base, match, matchlen))
+ return 0;
+
+ /*
+ * If the base is a subdirectory of a path which
+ * was specified, all of them are interesting.
+ */
+ if (!matchlen ||
+ base[matchlen] == '/' ||
+ match[matchlen - 1] == '/')
+ return 1;
+
+ /* Just a random prefix match */
+ return 0;
+}
+
+/*
+ * Is a tree entry interesting given the pathspec we have?
+ *
+ * Pre-condition: baselen == 0 || base[baselen-1] == '/'
+ *
+ * Return:
+ * - 2 for "yes, and all subsequent entries will be"
+ * - 1 for yes
+ * - zero for no
+ * - negative for "no, and no subsequent entries will be either"
+ */
+int tree_entry_interesting(const struct name_entry *entry,
+ struct strbuf *base, int base_offset,
+ const struct pathspec *ps)
+{
+ int i;
+ int pathlen, baselen = base->len - base_offset;
+ int never_interesting = ps->has_wildcard ? 0 : -1;
+
+ if (!ps->nr) {
+ if (!ps->recursive || ps->max_depth == -1)
+ return 1;
+ return !!within_depth(base->buf + base_offset, baselen,
+ !!S_ISDIR(entry->mode),
+ ps->max_depth);
+ }
+
+ pathlen = tree_entry_len(entry->path, entry->sha1);
+
+ for (i = ps->nr-1; i >= 0; i--) {
+ const struct pathspec_item *item = ps->items+i;
+ const char *match = item->match;
+ const char *base_str = base->buf + base_offset;
+ int matchlen = item->len;
+
+ if (baselen >= matchlen) {
+ /* If it doesn't match, move along... */
+ if (!match_dir_prefix(base_str, baselen, match, matchlen))
+ goto match_wildcards;
+
+ if (!ps->recursive || ps->max_depth == -1)
+ return 2;
+
+ return !!within_depth(base_str + matchlen + 1,
+ baselen - matchlen - 1,
+ !!S_ISDIR(entry->mode),
+ ps->max_depth);
+ }
+
+ /* Does the base match? */
+ if (!strncmp(base_str, match, baselen)) {
+ if (match_entry(entry, pathlen,
+ match + baselen, matchlen - baselen,
+ &never_interesting))
+ return 1;
+
+ if (ps->items[i].has_wildcard) {
+ if (!fnmatch(match + baselen, entry->path, 0))
+ return 1;
+
+ /*
+ * Match all directories. We'll try to
+ * match files later on.
+ */
+ if (ps->recursive && S_ISDIR(entry->mode))
+ return 1;
+ }
+
+ continue;
+ }
+
+match_wildcards:
+ if (!ps->items[i].has_wildcard)
+ continue;
+
+ /*
+ * Concatenate base and entry->path into one and do
+ * fnmatch() on it.
+ */
+
+ strbuf_add(base, entry->path, pathlen);
+
+ if (!fnmatch(match, base->buf + base_offset, 0)) {
+ strbuf_setlen(base, base_offset + baselen);
+ return 1;
+ }
+ strbuf_setlen(base, base_offset + baselen);
+
+ /*
+ * Match all directories. We'll try to match files
+ * later on.
+ */
+ if (ps->recursive && S_ISDIR(entry->mode))
+ return 1;
+ }
+ return never_interesting; /* No matches */
+}
diff --git a/tree-walk.h b/tree-walk.h
index 7e3e0b5ad16710c06464726ac04d2b1c48af3708..39524b7dba6a1d0b63c4cd2b42db59a27a030b21 100644 (file)
--- a/tree-walk.h
+++ b/tree-walk.h
return info->pathlen + tree_entry_len(n->path, n->sha1);
}
+extern int tree_entry_interesting(const struct name_entry *, struct strbuf *, int, const struct pathspec *ps);
+
#endif
diff --git a/unpack-trees.c b/unpack-trees.c
index 1ca41b1a6986559a7c5ddc3983d751d75a0d23ff..149bc5d3585196e7d9b7e773b5e3d875fa6967d4 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
static int unpack_index_entry(struct cache_entry *ce,
struct unpack_trees_options *o)
{
- struct cache_entry *src[5] = { NULL };
+ struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, };
int ret;
src[0] = ce;
return ret;
}
-static int traverse_trees_recursive(int n, unsigned long dirmask, unsigned long df_conflicts, struct name_entry *names, struct traverse_info *info)
+static int fast_forward_merge(int n, unsigned long dirmask,
+ struct name_entry *names,
+ struct traverse_info *info);
+
+static int traverse_trees_recursive(int n, unsigned long dirmask,
+ unsigned long df_conflicts,
+ struct name_entry *names,
+ struct traverse_info *info)
{
int i, ret, bottom;
struct tree_desc t[MAX_UNPACK_TREES];
@@ -435,6 +442,11 @@ static int traverse_trees_recursive(int n, unsigned long dirmask, unsigned long
struct traverse_info newinfo;
struct name_entry *p;
+ if (!df_conflicts) {
+ int status = fast_forward_merge(n, dirmask, names, info);
+ if (status)
+ return status;
+ }
p = names;
while (!p->mode)
p++;
return NULL;
}
+static int fast_forward_merge(int n, unsigned long dirmask,
+ struct name_entry *names,
+ struct traverse_info *info)
+{
+ int i;
+ struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, };
+ struct unpack_trees_options *o = info->data;
+
+ /* merging two or more trees with an identical subdirectory? */
+ if ((n < 2) || ((1UL << n) - 1) != dirmask ||
+ !o->merge || o->reset || o->initial_checkout)
+ return 0;
+ for (i = 1; i < n; i++)
+ if (hashcmp(names[i-1].sha1, names[i].sha1))
+ return 0;
+
+ /*
+ * Instead of descending into the directory, keep the contents
+ * of the current index.
+ */
+ while (1) {
+ struct cache_entry *ce;
+ ce = next_cache_entry(o);
+ if (!ce)
+ break;
+ /* Is the entry still in that directory? */
+ if (do_compare_entry(ce, info, names))
+ break;
+ /*
+ * Note: we do not just run unpack_index_entry() here,
+ * as the callback may want to compare what is in the
+ * index with what are from the HEAD and the other tree
+ * and reject the merge. We pretend that ancestors, the
+ * HEAD and the other tree all have the same contents as
+ * the current index, which is a lie, but it works.
+ */
+ for (i = 0; i < n + 1; i++)
+ src[i] = ce;
+ mark_ce_used(ce, o);
+ if (call_unpack_fn(src, o) < 0)
+ return unpack_failed(o, NULL);
+ if (ce_stage(ce))
+ mark_ce_used_same_name(ce, o);
+ }
+ return dirmask;
+}
+
static void debug_path(struct traverse_info *info)
{
if (info->prev) {
@@ -1105,6 +1164,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
}
if (o->result.cache_nr && empty_worktree) {
+ /* dubious---why should this fail??? */
ret = unpack_failed(o, "Sparse checkout leaves no entry on working directory");
goto done;
}
char path[PATH_MAX + 1];
memcpy(path, ce->name, len);
path[len] = 0;
- lstat(path, &st);
+ if (lstat(path, &st))
+ return error("cannot stat '%s': %s", path,
+ strerror(errno));
return check_ok_to_remove(path, len, DT_UNKNOWN, NULL, &st,
error_type, o);
- } else if (!lstat(ce->name, &st))
+ } else if (lstat(ce->name, &st)) {
+ if (errno != ENOENT)
+ return error("cannot stat '%s': %s", ce->name,
+ strerror(errno));
+ return 0;
+ } else {
return check_ok_to_remove(ce->name, ce_namelen(ce),
- ce_to_dtype(ce), ce, &st,
- error_type, o);
-
- return 0;
+ ce_to_dtype(ce), ce, &st,
+ error_type, o);
+ }
}
static int verify_absent(struct cache_entry *ce,
diff --git a/upload-pack.c b/upload-pack.c
index b40a43f27d0e16f0305153f984741938b3a6ab89..f35d37bb5e182bf7934831d7c41fb05cbff8228a 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
#include "revision.h"
#include "list-objects.h"
#include "run-command.h"
+#include "gettext.h"
static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=<n>] <dir>";
int i;
int strict = 0;
+ git_setup_gettext();
+
git_extract_argv0_path(argv[0]);
read_replace_refs = 0;
diff --git a/userdiff.c b/userdiff.c
index 3a1c392bbd76b167847f7a3b164f0135eb66740e..1ff47977d549992ada8c1236187d4516b648ee7d 100644 (file)
--- a/userdiff.c
+++ b/userdiff.c
"|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
"|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
PATTERNS("pascal",
- "^((procedure|function|constructor|destructor|interface|"
+ "^(((class[ \t]+)?(procedure|function)|constructor|destructor|interface|"
"implementation|initialization|finalization)[ \t]*.*)$"
"\n"
"^(.*=[ \t]*(class|record).*)$",
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index fa580e62de05f832e7d7474cc1a457cd7379cef2..2ad2c307dd6e8f4bddf5cbd9c588973a085bf870 100644 (file)
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
if (key == keys.svn_fs_dump_format_version) {
dump_ctx.version = atoi(val);
if (dump_ctx.version > 2)
- die("expected svn dump format version <= 2, found %d",
+ die("expected svn dump format version <= 2, found %"PRIu32,
dump_ctx.version);
} else if (key == keys.uuid) {
dump_ctx.uuid = pool_intern(val);
diff --git a/wrapper.c b/wrapper.c
index 8d7dd31c4ba5439652d11e5ada06e0d52bc04e4f..55b074ec46b0a222b03f8bea42f4d5cdd9811293 100644 (file)
--- a/wrapper.c
+++ b/wrapper.c
int xmkstemp(char *template)
{
int fd;
+ char origtemplate[PATH_MAX];
+ strlcpy(origtemplate, template, sizeof(origtemplate));
fd = mkstemp(template);
- if (fd < 0)
- die_errno("Unable to create temporary file");
+ if (fd < 0) {
+ int saved_errno = errno;
+ const char *nonrelative_template;
+
+ if (!template[0])
+ template = origtemplate;
+
+ nonrelative_template = make_nonrelative_path(template);
+ errno = saved_errno;
+ die_errno("Unable to create temporary file '%s'",
+ nonrelative_template);
+ }
return fd;
}
int xmkstemp_mode(char *template, int mode)
{
int fd;
+ char origtemplate[PATH_MAX];
+ strlcpy(origtemplate, template, sizeof(origtemplate));
fd = git_mkstemp_mode(template, mode);
- if (fd < 0)
- die_errno("Unable to create temporary file");
+ if (fd < 0) {
+ int saved_errno = errno;
+ const char *nonrelative_template;
+
+ if (!template[0])
+ template = origtemplate;
+
+ nonrelative_template = make_nonrelative_path(template);
+ errno = saved_errno;
+ die_errno("Unable to create temporary file '%s'",
+ nonrelative_template);
+ }
return fd;
}
diff --git a/wt-status.c b/wt-status.c
index 123582b6cbdff90f4665fbf8db2c92d701680e4d..57bf1033bb665dd4580abda7d7f6f78422506005 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
-#include "cache.h"
+#include "builtin.h"
#include "wt-status.h"
#include "object.h"
#include "dir.h"
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# Unmerged paths:");
+ color_fprintf_ln(s->fp, c, _("# Unmerged paths:"));
if (!advice_status_hints)
return;
if (s->in_merge)
;
else if (!s->is_initial)
- color_fprintf_ln(s->fp, c, "# (use \"git reset %s <file>...\" to unstage)", s->reference);
+ color_fprintf_ln(s->fp, c, _("# (use \"git reset %s <file>...\" to unstage)"), s->reference);
else
- color_fprintf_ln(s->fp, c, "# (use \"git rm --cached <file>...\" to unstage)");
- color_fprintf_ln(s->fp, c, "# (use \"git add/rm <file>...\" as appropriate to mark resolution)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached <file>...\" to unstage)"));
+ color_fprintf_ln(s->fp, c, _("# (use \"git add/rm <file>...\" as appropriate to mark resolution)"));
color_fprintf_ln(s->fp, c, "#");
}
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# Changes to be committed:");
+ color_fprintf_ln(s->fp, c, _("# Changes to be committed:"));
if (!advice_status_hints)
return;
if (s->in_merge)
; /* NEEDSWORK: use "git reset --unresolve"??? */
else if (!s->is_initial)
- color_fprintf_ln(s->fp, c, "# (use \"git reset %s <file>...\" to unstage)", s->reference);
+ color_fprintf_ln(s->fp, c, _("# (use \"git reset %s <file>...\" to unstage)"), s->reference);
else
- color_fprintf_ln(s->fp, c, "# (use \"git rm --cached <file>...\" to unstage)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached <file>...\" to unstage)"));
color_fprintf_ln(s->fp, c, "#");
}
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
+ color_fprintf_ln(s->fp, c, _("# Changes not staged for commit:"));
if (!advice_status_hints)
return;
if (!has_deleted)
- color_fprintf_ln(s->fp, c, "# (use \"git add <file>...\" to update what will be committed)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git add <file>...\" to update what will be committed)"));
else
- color_fprintf_ln(s->fp, c, "# (use \"git add/rm <file>...\" to update what will be committed)");
- color_fprintf_ln(s->fp, c, "# (use \"git checkout -- <file>...\" to discard changes in working directory)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git add/rm <file>...\" to update what will be committed)"));
+ color_fprintf_ln(s->fp, c, _("# (use \"git checkout -- <file>...\" to discard changes in working directory)"));
if (has_dirty_submodules)
- color_fprintf_ln(s->fp, c, "# (commit or discard the untracked or modified content in submodules)");
+ color_fprintf_ln(s->fp, c, _("# (commit or discard the untracked or modified content in submodules)"));
color_fprintf_ln(s->fp, c, "#");
}
const char *how)
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# %s files:", what);
+ color_fprintf_ln(s->fp, c, _("# %s files:"), what);
if (!advice_status_hints)
return;
- color_fprintf_ln(s->fp, c, "# (use \"git %s <file>...\" to include in what will be committed)", how);
+ color_fprintf_ln(s->fp, c, _("# (use \"git %s <file>...\" to include in what will be committed)"), how);
color_fprintf_ln(s->fp, c, "#");
}
const char *c = color(WT_STATUS_UNMERGED, s);
struct wt_status_change_data *d = it->util;
struct strbuf onebuf = STRBUF_INIT;
- const char *one, *how = "bug";
+ const char *one, *how = _("bug");
one = quote_path(it->string, -1, &onebuf, s->prefix);
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "#\t");
switch (d->stagemask) {
- case 1: how = "both deleted:"; break;
- case 2: how = "added by us:"; break;
- case 3: how = "deleted by them:"; break;
- case 4: how = "added by them:"; break;
- case 5: how = "deleted by us:"; break;
- case 6: how = "both added:"; break;
- case 7: how = "both modified:"; break;
+ case 1: how = _("both deleted:"); break;
+ case 2: how = _("added by us:"); break;
+ case 3: how = _("deleted by them:"); break;
+ case 4: how = _("added by them:"); break;
+ case 5: how = _("deleted by us:"); break;
+ case 6: how = _("both added:"); break;
+ case 7: how = _("both modified:"); break;
}
color_fprintf(s->fp, c, "%-20s%s\n", how, one);
strbuf_release(&onebuf);
if (d->new_submodule_commits || d->dirty_submodule) {
strbuf_addstr(&extra, " (");
if (d->new_submodule_commits)
- strbuf_addf(&extra, "new commits, ");
+ strbuf_addf(&extra, _("new commits, "));
if (d->dirty_submodule & DIRTY_SUBMODULE_MODIFIED)
- strbuf_addf(&extra, "modified content, ");
+ strbuf_addf(&extra, _("modified content, "));
if (d->dirty_submodule & DIRTY_SUBMODULE_UNTRACKED)
- strbuf_addf(&extra, "untracked content, ");
+ strbuf_addf(&extra, _("untracked content, "));
strbuf_setlen(&extra, extra.len - 2);
strbuf_addch(&extra, ')');
}
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "#\t");
switch (status) {
case DIFF_STATUS_ADDED:
- color_fprintf(s->fp, c, "new file: %s", one);
+ color_fprintf(s->fp, c, _("new file: %s"), one);
break;
case DIFF_STATUS_COPIED:
- color_fprintf(s->fp, c, "copied: %s -> %s", one, two);
+ color_fprintf(s->fp, c, _("copied: %s -> %s"), one, two);
break;
case DIFF_STATUS_DELETED:
- color_fprintf(s->fp, c, "deleted: %s", one);
+ color_fprintf(s->fp, c, _("deleted: %s"), one);
break;
case DIFF_STATUS_MODIFIED:
- color_fprintf(s->fp, c, "modified: %s", one);
+ color_fprintf(s->fp, c, _("modified: %s"), one);
break;
case DIFF_STATUS_RENAMED:
- color_fprintf(s->fp, c, "renamed: %s -> %s", one, two);
+ color_fprintf(s->fp, c, _("renamed: %s -> %s"), one, two);
break;
case DIFF_STATUS_TYPE_CHANGED:
- color_fprintf(s->fp, c, "typechange: %s", one);
+ color_fprintf(s->fp, c, _("typechange: %s"), one);
break;
case DIFF_STATUS_UNKNOWN:
- color_fprintf(s->fp, c, "unknown: %s", one);
+ color_fprintf(s->fp, c, _("unknown: %s"), one);
break;
case DIFF_STATUS_UNMERGED:
- color_fprintf(s->fp, c, "unmerged: %s", one);
+ color_fprintf(s->fp, c, _("unmerged: %s"), one);
break;
default:
- die("bug: unhandled diff status %c", status);
+ die(_("bug: unhandled diff status %c"), status);
}
if (extra.len) {
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "%s", extra.buf);
}
rev.diffopt.format_callback = wt_status_collect_changed_cb;
rev.diffopt.format_callback_data = s;
- rev.prune_data = s->pathspec;
+ init_pathspec(&rev.prune_data, s->pathspec);
run_diff_files(&rev, 0);
}
rev.diffopt.detect_rename = 1;
rev.diffopt.rename_limit = 200;
rev.diffopt.break_opt = 0;
- rev.prune_data = s->pathspec;
+ init_pathspec(&rev.prune_data, s->pathspec);
run_diff_index(&rev, 1);
}
static void wt_status_collect_changes_initial(struct wt_status *s)
{
+ struct pathspec pathspec;
int i;
+ init_pathspec(&pathspec, s->pathspec);
for (i = 0; i < active_nr; i++) {
struct string_list_item *it;
struct wt_status_change_data *d;
struct cache_entry *ce = active_cache[i];
- if (!ce_path_match(ce, s->pathspec))
+ if (!ce_path_match(ce, &pathspec))
continue;
it = string_list_insert(&s->change, ce->name);
d = it->util;
else
d->index_status = DIFF_STATUS_ADDED;
}
+ free_pathspec(&pathspec);
}
static void wt_status_collect_untracked(struct wt_status *s)
const char *branch_status_color = color(WT_STATUS_HEADER, s);
if (s->branch) {
- const char *on_what = "On branch ";
+ const char *on_what = _("On branch ");
const char *branch_name = s->branch;
if (!prefixcmp(branch_name, "refs/heads/"))
branch_name += 11;
else if (!strcmp(branch_name, "HEAD")) {
branch_name = "";
branch_status_color = color(WT_STATUS_NOBRANCH, s);
- on_what = "Not currently on any branch.";
+ on_what = _("Not currently on any branch.");
}
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "# ");
color_fprintf(s->fp, branch_status_color, "%s", on_what);
if (s->is_initial) {
color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "#");
- color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "# Initial commit");
+ color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), _("# Initial commit"));
color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "#");
}
wt_status_print_submodule_summary(s, 1); /* unstaged */
}
if (s->show_untracked_files) {
- wt_status_print_other(s, &s->untracked, "Untracked", "add");
+ wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
if (s->show_ignored_files)
- wt_status_print_other(s, &s->ignored, "Ignored", "add -f");
+ wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
} else if (s->commitable)
- fprintf(s->fp, "# Untracked files not listed%s\n",
+ fprintf(s->fp, _("# Untracked files not listed%s\n"),
advice_status_hints
- ? " (use -u option to show untracked files)" : "");
+ ? _(" (use -u option to show untracked files)") : "");
if (s->verbose)
wt_status_print_verbose(s);
if (!s->commitable) {
if (s->amend)
- fprintf(s->fp, "# No changes\n");
+ fprintf(s->fp, _("# No changes\n"));
else if (s->nowarn)
; /* nothing */
else if (s->workdir_dirty)
- printf("no changes added to commit%s\n",
+ printf(_("no changes added to commit%s\n"),
advice_status_hints
- ? " (use \"git add\" and/or \"git commit -a\")" : "");
+ ? _(" (use \"git add\" and/or \"git commit -a\")") : "");
else if (s->untracked.nr)
- printf("nothing added to commit but untracked files present%s\n",
+ printf(_("nothing added to commit but untracked files present%s\n"),
advice_status_hints
- ? " (use \"git add\" to track)" : "");
+ ? _(" (use \"git add\" to track)") : "");
else if (s->is_initial)
- printf("nothing to commit%s\n", advice_status_hints
- ? " (create/copy files and use \"git add\" to track)" : "");
+ printf(_("nothing to commit%s\n"), advice_status_hints
+ ? _(" (create/copy files and use \"git add\" to track)") : "");
else if (!s->show_untracked_files)
- printf("nothing to commit%s\n", advice_status_hints
- ? " (use -u to show untracked files)" : "");
+ printf(_("nothing to commit%s\n"), advice_status_hints
+ ? _(" (use -u to show untracked files)") : "");
else
- printf("nothing to commit%s\n", advice_status_hints
- ? " (working directory clean)" : "");
+ printf(_("nothing to commit%s\n"), advice_status_hints
+ ? _(" (working directory clean)") : "");
}
}
if (!prefixcmp(branch_name, "refs/heads/"))
branch_name += 11;
else if (!strcmp(branch_name, "HEAD")) {
- branch_name = "HEAD (no branch)";
+ branch_name = _("HEAD (no branch)");
branch_color_local = color(WT_STATUS_NOBRANCH, s);
}
branch = branch_get(s->branch + 11);
if (s->is_initial)
- color_fprintf(s->fp, header_color, "Initial commit on ");
+ color_fprintf(s->fp, header_color, _("Initial commit on "));
if (!stat_tracking_info(branch, &num_ours, &num_theirs)) {
color_fprintf_ln(s->fp, branch_color_local,
"%s", branch_name);
color_fprintf(s->fp, header_color, " [");
if (!num_ours) {
- color_fprintf(s->fp, header_color, "behind ");
+ color_fprintf(s->fp, header_color, _("behind "));
color_fprintf(s->fp, branch_color_remote, "%d", num_theirs);
} else if (!num_theirs) {
- color_fprintf(s->fp, header_color, "ahead ");
+ color_fprintf(s->fp, header_color, _("ahead "));
color_fprintf(s->fp, branch_color_local, "%d", num_ours);
} else {
- color_fprintf(s->fp, header_color, "ahead ");
+ color_fprintf(s->fp, header_color, _("ahead "));
color_fprintf(s->fp, branch_color_local, "%d", num_ours);
- color_fprintf(s->fp, header_color, ", behind ");
+ color_fprintf(s->fp, header_color, _(", behind "));
color_fprintf(s->fp, branch_color_remote, "%d", num_theirs);
}