-include ../config.mak.autogen
-include ../config.mak
-#
-# For asciidoc ...
-# -7.1.2, set ASCIIDOC7
-# 8.0-, no extra settings are needed
-#
-
#
# For docbook-xsl ...
# -1.68.1, no extra settings are needed?
# 1.73.0-, no extra settings are needed
#
-ifndef ASCIIDOC7
-ASCIIDOC_EXTRA += -a asciidoc7compatible
-endif
ifdef DOCBOOK_XSL_172
ASCIIDOC_EXTRA += -a git-asciidoc-no-roff
MANPAGE_XSL = manpage-1.72.xsl
ASCIIDOC_EXTRA += -a 'git-default-editor=$(DEFAULT_EDITOR_SQ)'
endif
-#
-# Please note that there is a minor bug in asciidoc.
-# The version after 6.0.3 _will_ include the patch found here:
-# http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
-#
-# Until that version is released you may have to apply the patch
-# yourself - yes, all 6 characters of it!
-#
-
QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
QUIET_SUBDIR1 =
--- /dev/null
+Git v1.7.10.5 Release Notes
+===========================
+
+Fixes since v1.7.10.4
+---------------------
+
+ * "git fast-export" did not give a readable error message when the
+ same mark erroneously appeared twice in the --import-marks input.
+
+ * "git rebase -p" used to pay attention to rebase.autosquash which
+ was wrong. "git rebase -p -i" should, but "git rebase -p" by
+ itself should not.
--- /dev/null
+Git v1.7.11.1 Release Notes
+===========================
+
+Fixes since v1.7.11
+-------------------
+
+ * The cross links in the HTML version of manual pages were broken.
+
+Also contains minor typofixes and documentation updates.
instance of the external tool once per a file pair.
* The "fmt-merge-msg" command learned to list the primary contributors
- involved in the side topic you are merging.
+ involved in the side topic you are merging in a comment in the merge
+ commit template.
* "git rebase" learned to optionally keep commits that do not
introduce any change in the original history.
releases are contained in this release (see release notes to them for
details).
- * "git rebase -p" used to pay attention to rebase.autosquash which
- was wrong. "git rebase -p -i" should, but "git rebase -p" by
- itself should not.
- (cherry-pick 8a6dae1 vr/rebase-autosquash-does-not-imply-i later to maint).
-
* "git submodule init" used to report "registered for path ..."
even for submodules that were registered earlier.
(cherry-pick c1c259e jl/submodule-report-new-path-once later to maint).
--- /dev/null
+Git v1.7.12 Release Notes
+=========================
+
+Updates since v1.7.11
+---------------------
+
+UI, Workflows & Features
+
+ * "git help" used to always default to "man" format even on platforms
+ where "man" viewer is not widely available.
+
+ * "git clone --local $path" started its life as an experiment to
+ optionally use link/copy when cloning a repository on the disk, but
+ we didn't deprecate it after we made the option a no-op to always
+ use the optimization. The command learned "--no-local" option to
+ turn this off, as a more explicit alternative over use of file://
+ URL.
+
+ * git native protocol agents learned to show software version over
+ the wire, so that the server log can be examined to see the vintage
+ distribution of clients.
+
+
+Foreign Interface
+
+
+Performance, Internal Implementation, etc. (please report possible regressions)
+
+ * Some tests showed false failures caused by a bug in ecryptofs.
+
+ * We no longer use AsciiDoc7 syntax in our documentation and favor a
+ more modern style.
+
+
+Also contains minor documentation updates and code clean-ups.
+
+
+Fixes since v1.7.11
+-------------------
+
+Unless otherwise noted, all the fixes since v1.7.11 in the maintenance
+releases are contained in this release (see release notes to them for
+details).
+
+ * The documentation for "git cherry-pick A B..C" was misleading.
+ (merge b98878e cn/cherry-pick-range-docs later to maint).
+
+ * "git archive" incorrectly computed the header checksum; the symptom
+ was observed only when using pathnames with hi-bit set.
+ (merge a5a46eb jc/ustar-checksum-is-unsigned later to maint).
+
+ * Running "git bundle verify" on a bundle that records a complete
+ history said "it requires these 0 commits".
+ (merge 8c3710f jc/bundle-complete-notice later to maint).
+
+ * "git ls-files --exclude=t -i" did not consider anything under t/ as
+ excluded, as it did not pay attention to exclusion of leading paths
+ while walking the index. Other two users of excluded() are also
+ updated.
+ (merge 0d316f0 jc/ls-files-i-dir later to maint).
+
+ * "git request-pull $url dev" when the tip of "dev" branch was tagged
+ with "ext4-for-linus" used the contents from the tag in the output
+ but still asked the "dev" branch to be pulled, not the tag.
+ (merge 682853e jc/request-pull-match-tagname later to maint).
endif::doctype-manpage[]
ifdef::backend-xhtml11[]
+[attributes]
+git-relative-html-prefix=
[linkgit-inlinemacro]
<a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
diff.statGraphWidth::
Limit the width of the graph part in --stat output. If set, applies
- to all commands generating --stat outuput except format-patch.
+ to all commands generating --stat output except format-patch.
diff.external::
If this config variable is set, diff generation is not
Generate a diffstat. By default, as much space as necessary
will be used for the filename part, and the rest for the graph
part. Maximum width defaults to terminal width, or 80 columns
- if not connected to a terminal, and can be overriden by
+ if not connected to a terminal, and can be overridden by
`<width>`. The width of the filename part can be limited by
giving another width `<name-width>` after a comma. The width
of the graph part can be limited by using
linkgit:gitrevisions[7].
Sets of commits can be passed but no traversal is done by
default, as if the '--no-walk' option was specified, see
- linkgit:git-rev-list[1].
+ linkgit:git-rev-list[1]. Note that specifying a range will
+ feed all <commit>... arguments to a single revision walk
+ (see a later example that uses 'maint master..next').
-e::
--edit::
Apply the changes introduced by all commits that are ancestors
of master but not of HEAD to produce new commits.
+`git cherry-pick maint next ^master`::
+`git cherry-pick maint master..next`::
+
+ Apply the changes introduced by all commits that are
+ ancestors of maint or next, but not master or any of its
+ ancestors. Note that the latter does not mean `maint` and
+ everything between `master` and `next`; specifically,
+ `maint` will not be used if it is included in `master`.
+
`git cherry-pick master~4 master~2`::
Apply the changes introduced by the fifth and third last
mechanism and clones the repository by making a copy of
HEAD and everything under objects and refs directories.
The files under `.git/objects/` directory are hardlinked
- to save space when possible. This is now the default when
- the source repository is specified with `/path/to/repo`
- syntax, so it essentially is a no-op option. To force
- copying instead of hardlinking (which may be desirable
- if you are trying to make a back-up of your repository),
- but still avoid the usual "git aware" transport
- mechanism, `--no-hardlinks` can be used.
+ to save space when possible.
++
+If the repository is specified as a local path (e.g., `/path/to/repo`),
+this is the default, and --local is essentially a no-op. If the
+repository is specified as a URL, then this flag is ignored (and we
+never use the local optimizations). Specifying `--no-local` will
+override the default when `/path/to/repo` is given, using the regular
+git transport instead.
++
+To force copying instead of hardlinking (which may be desirable if you
+are trying to make a back-up of your repository), but still avoid the
+usual "git aware" transport mechanism, `--no-hardlinks` can be used.
--no-hardlinks::
Optimize the cloning process from a repository on a
--------
[verse]
'git column' [--command=<name>] [--[raw-]mode=<mode>] [--width=<width>]
- [--indent=<string>] [--nl=<string>] [--pading=<n>]
+ [--indent=<string>] [--nl=<string>] [--padding=<n>]
DESCRIPTION
-----------
--------
[verse]
'git commit-tree' <tree> [(-p <parent>)...] < changelog
-'git commit-tree' [(-p <parent>)...] [(-m <message>)...] [(-F <file>)...] <tree>
+'git commit-tree' <tree> [(-p <parent>)...] [(-m <message>)...] [(-F <file>)...]
DESCRIPTION
-----------
Each '-p' indicates the id of a parent commit object.
-m <message>::
- A paragraph in the commig log message. This can be given more than
+ A paragraph in the commit log message. This can be given more than
once and each <message> becomes its own paragraph.
-F <file>::
When doing a dry-run, give the output in the short-format. See
linkgit:git-status[1] for details. Implies `--dry-run`.
+--branch::
+ Show the branch and tracking info even in short-format.
+
--porcelain::
When doing a dry-run, give the output in a porcelain-ready
format. See linkgit:git-status[1] for details. Implies
`--dry-run`.
-z::
+--null::
When showing `short` or `porcelain` status output, terminate
entries in the status output with NUL, instead of LF. If no
format is given, implies the `--porcelain` output format.
current tip -- if it was a merge, it will have the parents of
the current tip as parents -- so the current top commit is
discarded.
+
+--no-post-rewrite::
+ Bypass the post-rewrite hook.
+
+
--
It is a rough equivalent for:
checkout the commit specified in the index of the containing repository.
This will make the submodules HEAD be detached unless `--rebase` or
`--merge` is specified or the key `submodule.$name.update` is set to
- `rebase`, `merge` or `none`. `none` can be overriden by specifying
+ `rebase`, `merge` or `none`. `none` can be overridden by specifying
`--checkout`.
+
If the submodule is not yet initialized, and you just want to use the
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.7.10.4/git.html[documentation for release 1.7.10.4]
+* link:v1.7.11.1/git.html[documentation for release 1.7.11.1]
* release notes for
+ link:RelNotes/1.7.11.1.txt[1.7.11.1],
+ link:RelNotes/1.7.11.txt[1.7.11].
+
+* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
+
+* release notes for
+ link:RelNotes/1.7.10.5.txt[1.7.10.5],
link:RelNotes/1.7.10.4.txt[1.7.10.4],
link:RelNotes/1.7.10.3.txt[1.7.10.3],
link:RelNotes/1.7.10.2.txt[1.7.10.2],
'GIT_EDITOR'::
This environment variable overrides `$EDITOR` and `$VISUAL`.
- It is used by several git comands when, on interactive mode,
+ It is used by several git commands when, on interactive mode,
an editor is to be launched. See also linkgit:git-var[1]
and the `core.editor` option in linkgit:git-config[1].
By default set to 'highlight'; set it to full path to highlight
executable if it is not installed on your web server's PATH.
Note that 'highlight' feature must be set for gitweb to actually
- use syntax hightlighting.
+ use syntax highlighting.
+
*NOTE*: if you want to add support for new file type (supported by
"highlight" but not used by gitweb), you need to modify `%highlight_ext`
--no-walk::
Only show the given revs, but do not traverse their ancestors.
+ This has no effect if a range is specified.
--do-walk::
The `helpers` member of the struct is a `string_list` of helpers. Each
string specifies an external helper which will be run, in order, to
either acquire or store credentials. See the section on credential
-helpers below.
+helpers below. This list is filled-in by the API functions
+according to the corresponding configuration variables before
+consulting helpers, so there usually is no need for a caller to
+modify the helpers field at all.
+
This struct should always be initialized with `CREDENTIAL_INIT` or
`credential_init`.
You will see informational messages on dangling objects. They are objects
that still exist in the repository but are no longer referenced by any of
your branches, and can (and will) be removed after a while with "gc".
-You can run `git fsck --no-dangling` to supress these messages, and still
+You can run `git fsck --no-dangling` to suppress these messages, and still
view real errors.
[[recovering-lost-changes]]
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.7.11-rc2
+DEF_VER=v1.7.11.GIT
LF='
'
# Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
# field that counts the on-disk footprint in 512-byte blocks.
#
-# Define ASCIIDOC7 if you want to format documentation with AsciiDoc 7
-#
# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72
# (not v1.73 or v1.71).
#
# the diff algorithm. It gives a nice speedup if your processor has
# fast unaligned word loads. Does NOT work on big-endian systems!
# Enabled by default on x86_64.
+#
+# Define GIT_USER_AGENT if you want to change how git identifies itself during
+# network interactions. The default is "git/$(GIT_VERSION)".
+#
+# Define DEFAULT_HELP_FORMAT to "man", "info" or "html"
+# (defaults to "man") if you want to have a different default when
+# "git help" is called without a parameter specifying the format.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
LIB_OBJS += userdiff.o
LIB_OBJS += utf8.o
LIB_OBJS += varint.o
+LIB_OBJS += version.o
LIB_OBJS += walker.o
LIB_OBJS += wrapper.o
LIB_OBJS += write_or_die.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
+GIT_USER_AGENT = git/$(GIT_VERSION)
+
#
# Platform specific tweaks
#
BLK_SHA1 = YesPlease
NO_POSIX_GOODIES = UnfortunatelyYes
NATIVE_CRLF = YesPlease
+ DEFAULT_HELP_FORMAT = html
CC = compat/vcbuild/scripts/clink.pl
AR = compat/vcbuild/scripts/lib.pl
endif
endif
-ifdef ASCIIDOC7
- export ASCIIDOC7
-endif
-
ifdef NO_INSTALL_HARDLINKS
export NO_INSTALL_HARDLINKS
endif
BASIC_CFLAGS += -DSHELL_PATH='$(SHELL_PATH_CQ_SQ)'
endif
+GIT_USER_AGENT_SQ = $(subst ','\'',$(GIT_USER_AGENT))
+GIT_USER_AGENT_CQ = "$(subst ",\",$(subst \,\\,$(GIT_USER_AGENT)))"
+GIT_USER_AGENT_CQ_SQ = $(subst ','\'',$(GIT_USER_AGENT_CQ))
+BASIC_CFLAGS += -DGIT_USER_AGENT='$(GIT_USER_AGENT_CQ_SQ)'
+
+ifdef DEFAULT_HELP_FORMAT
+BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"'
+endif
+
ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS)
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
-git.sp git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \
+git.sp git.s git.o: EXTRA_CPPFLAGS = \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
+version.sp version.s version.o: EXTRA_CPPFLAGS = \
+ '-DGIT_VERSION="$(GIT_VERSION)"'
+
$(BUILT_INS): git$X
$(QUIET_BUILT_IN)$(RM) $@ && \
ln git$X $@ 2>/dev/null || \
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@@DIFF@@|$(DIFF_SQ)|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's|@@GIT_USER_AGENT@@|$(GIT_USER_AGENT_SQ)|g' \
-e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
-e 's/@@USE_GETTEXT_SCHEME@@/$(USE_GETTEXT_SCHEME)/g' \
$(RM) $<+
# These can record GIT_VERSION
-git.o git.spec http.o \
+version.o git.spec \
$(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE
gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
-DGIT_LOCALE_PATH='"$(localedir_SQ)"'
-http.sp http.s http.o: EXTRA_CPPFLAGS = \
- -DGIT_HTTP_USER_AGENT='"git/$(GIT_VERSION)"'
-
ifdef NO_EXPAT
http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
-Documentation/RelNotes/1.7.11.txt
\ No newline at end of file
+Documentation/RelNotes/1.7.12.txt
\ No newline at end of file
static unsigned int ustar_header_chksum(const struct ustar_header *header)
{
- const char *p = (const char *)header;
+ const unsigned char *p = (const unsigned char *)header;
unsigned int chksum = 0;
- while (p < header->chksum)
+ while (p < (const unsigned char *)header->chksum)
chksum += *p++;
chksum += sizeof(header->chksum) * ' ';
p += sizeof(header->chksum);
- while (p < (const char *)header + sizeof(struct ustar_header))
+ while (p < (const unsigned char *)header + sizeof(struct ustar_header))
chksum += *p++;
return chksum;
}
strbuf_addf(&key, "branch.%s.rebase", local);
git_config_set(key.buf, "true");
}
+ strbuf_release(&key);
if (flag & BRANCH_CONFIG_VERBOSE) {
- strbuf_reset(&key);
-
- strbuf_addstr(&key, origin ? "remote" : "local");
-
- /* Are we tracking a proper "branch"? */
- if (remote_is_branch) {
- strbuf_addf(&key, " branch %s", shortname);
- if (origin)
- strbuf_addf(&key, " from %s", origin);
- }
+ if (remote_is_branch && origin)
+ printf(rebasing ?
+ "Branch %s set up to track remote branch %s from %s by rebasing.\n" :
+ "Branch %s set up to track remote branch %s from %s.\n",
+ local, shortname, origin);
+ else if (remote_is_branch && !origin)
+ printf(rebasing ?
+ "Branch %s set up to track local branch %s by rebasing.\n" :
+ "Branch %s set up to track local branch %s.\n",
+ local, shortname);
+ else if (!remote_is_branch && origin)
+ printf(rebasing ?
+ "Branch %s set up to track remote ref %s by rebasing.\n" :
+ "Branch %s set up to track remote ref %s.\n",
+ local, remote);
+ else if (!remote_is_branch && !origin)
+ printf(rebasing ?
+ "Branch %s set up to track local ref %s by rebasing.\n" :
+ "Branch %s set up to track local ref %s.\n",
+ local, remote);
else
- strbuf_addf(&key, " ref %s", remote);
- printf("Branch %s set up to track %s%s.\n",
- local, key.buf,
- rebasing ? " by rebasing" : "");
+ die("BUG: impossible combination of %d and %p",
+ remote_is_branch, origin);
}
- strbuf_release(&key);
}
/*
#define DEFAULT_MERGE_LOG_LEN 20
-extern const char git_version_string[];
extern const char git_usage_string[];
extern const char git_more_info_string[];
void finish_copy_notes_for_rewrite(struct notes_rewrite_cfg *c);
extern int check_pager_config(const char *cmd);
+struct diff_options;
+extern void setup_diff_pager(struct diff_options *);
extern int textconv_object(const char *path, unsigned mode, const unsigned char *sha1, char **buf, unsigned long *buf_size);
extern int cmd_grep(int argc, const char **argv, const char *prefix);
extern int cmd_hash_object(int argc, const char **argv, const char *prefix);
extern int cmd_help(int argc, const char **argv, const char *prefix);
-extern int cmd_http_fetch(int argc, const char **argv, const char *prefix);
extern int cmd_index_pack(int argc, const char **argv, const char *prefix);
extern int cmd_init_db(int argc, const char **argv, const char *prefix);
extern int cmd_log(int argc, const char **argv, const char *prefix);
extern int cmd_pack_objects(int argc, const char **argv, const char *prefix);
extern int cmd_pack_redundant(int argc, const char **argv, const char *prefix);
extern int cmd_patch_id(int argc, const char **argv, const char *prefix);
-extern int cmd_pickaxe(int argc, const char **argv, const char *prefix);
extern int cmd_prune(int argc, const char **argv, const char *prefix);
extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
extern int cmd_push(int argc, const char **argv, const char *prefix);
extern int cmd_update_server_info(int argc, const char **argv, const char *prefix);
extern int cmd_upload_archive(int argc, const char **argv, const char *prefix);
extern int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix);
-extern int cmd_upload_tar(int argc, const char **argv, const char *prefix);
extern int cmd_var(int argc, const char **argv, const char *prefix);
extern int cmd_verify_tag(int argc, const char **argv, const char *prefix);
extern int cmd_version(int argc, const char **argv, const char *prefix);
if (pathspec) {
int i;
+ struct path_exclude_check check;
+
+ path_exclude_check_init(&check, &dir);
if (!seen)
seen = find_used_pathspec(pathspec);
for (i = 0; pathspec[i]; i++) {
&& !file_exists(pathspec[i])) {
if (ignore_missing) {
int dtype = DT_UNKNOWN;
- if (excluded(&dir, pathspec[i], &dtype))
+ if (path_excluded(&check, pathspec[i], -1, &dtype))
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
} else
die(_("pathspec '%s' did not match any files"),
}
}
free(seen);
+ path_exclude_check_clear(&check);
}
plug_bulk_checkin();
};
static int option_no_checkout, option_bare, option_mirror, option_single_branch = -1;
-static int option_local, option_no_hardlinks, option_shared, option_recursive;
+static int option_local = -1, option_no_hardlinks, option_shared, option_recursive;
static char *option_template, *option_depth;
static char *option_origin = NULL;
static char *option_branch = NULL;
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
OPT_BOOLEAN(0, "mirror", &option_mirror,
"create a mirror repository (implies bare)"),
- OPT_BOOLEAN('l', "local", &option_local,
- "to clone from a local repository"),
+ OPT_BOOL('l', "local", &option_local,
+ "to clone from a local repository"),
OPT_BOOLEAN(0, "no-hardlinks", &option_no_hardlinks,
"don't use local hardlinks, always copy"),
OPT_BOOLEAN('s', "shared", &option_shared,
if (!option_no_hardlinks) {
if (!link(src->buf, dest->buf))
continue;
- if (option_local)
+ if (option_local > 0)
die_errno(_("failed to create link '%s'"), dest->buf);
option_no_hardlinks = 1;
}
die(_("repository '%s' does not exist"), repo_name);
else
repo = repo_name;
- is_local = path && !is_bundle;
+ is_local = option_local != 0 && path && !is_bundle;
if (is_local && option_depth)
warning(_("--depth is ignored in local clones; use file:// instead."));
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
- /*
- * If the user asked for our exit code then don't start a
- * pager or we would end up reporting its exit code instead.
- */
- if (!DIFF_OPT_TST(&rev.diffopt, EXIT_WITH_STATUS) &&
- check_pager_config("diff") != 0)
- setup_pager();
+ setup_diff_pager(&rev.diffopt);
/*
* Do we have --cached and not have a pending object, then
refresh_index_quietly();
return result;
}
+
+void setup_diff_pager(struct diff_options *opt)
+{
+ /*
+ * If the user asked for our exit code, then either they want --quiet
+ * or --exit-code. We should definitely not bother with a pager in the
+ * former case, as we will generate no output. Since we still properly
+ * report our exit code even when a pager is run, we _could_ run a
+ * pager with --exit-code. But since we have not done so historically,
+ * and because it is easy to find people oneline advising "git diff
+ * --exit-code" in hooks and other scripts, we do not do so.
+ */
+ if (!DIFF_OPT_TST(opt, EXIT_WITH_STATUS) &&
+ check_pager_config("diff") != 0)
+ setup_pager();
+}
die ("Could not read blob %s", sha1_to_hex(sha1));
if (object->flags & SHOWN)
- error("Object %s already has a mark", sha1);
+ error("Object %s already has a mark", sha1_to_hex(sha1));
mark_object(object, mark);
if (last_idnum < mark)
const char *me;
if (kind == 'a') {
- label = "\nBy ";
+ label = "\n# By ";
me = git_author_info(IDENT_NO_DATE);
} else {
- label = "\nvia ";
+ label = "\n# Via ";
me = git_committer_info(IDENT_NO_DATE);
}
if (!seen_dashdash) {
int j;
for (j = i; j < argc; j++)
- verify_filename(prefix, argv[j]);
+ verify_filename(prefix, argv[j], j == i);
}
paths = get_pathspec(prefix, argv + i);
#include "column.h"
#include "help.h"
+#ifndef DEFAULT_HELP_FORMAT
+#define DEFAULT_HELP_FORMAT "man"
+#endif
+
static struct man_viewer_list {
struct man_viewer_list *next;
char name[FLEX_ARRAY];
if (parsed_help_format != HELP_FORMAT_NONE)
help_format = parsed_help_format;
+ if (help_format == HELP_FORMAT_NONE)
+ help_format = parse_help_format(DEFAULT_HELP_FORMAT);
alias = alias_lookup(argv[0]);
if (alias && !is_git_command(argv[0])) {
#include "progress.h"
#include "fsck.h"
#include "exec_cmd.h"
+#include "streaming.h"
#include "thread-utils.h"
static const char index_pack_usage[] =
free_base_data(c);
}
-static void *unpack_entry_data(unsigned long offset, unsigned long size)
+static int is_delta_type(enum object_type type)
+{
+ return (type == OBJ_REF_DELTA || type == OBJ_OFS_DELTA);
+}
+
+static void *unpack_entry_data(unsigned long offset, unsigned long size,
+ enum object_type type, unsigned char *sha1)
{
+ static char fixed_buf[8192];
int status;
git_zstream stream;
- void *buf = xmalloc(size);
+ void *buf;
+ git_SHA_CTX c;
+ char hdr[32];
+ int hdrlen;
+
+ if (!is_delta_type(type)) {
+ hdrlen = sprintf(hdr, "%s %lu", typename(type), size) + 1;
+ git_SHA1_Init(&c);
+ git_SHA1_Update(&c, hdr, hdrlen);
+ } else
+ sha1 = NULL;
+ if (type == OBJ_BLOB && size > big_file_threshold)
+ buf = fixed_buf;
+ else
+ buf = xmalloc(size);
memset(&stream, 0, sizeof(stream));
git_inflate_init(&stream);
stream.next_out = buf;
- stream.avail_out = size;
+ stream.avail_out = buf == fixed_buf ? sizeof(fixed_buf) : size;
do {
+ unsigned char *last_out = stream.next_out;
stream.next_in = fill(1);
stream.avail_in = input_len;
status = git_inflate(&stream, 0);
use(input_len - stream.avail_in);
+ if (sha1)
+ git_SHA1_Update(&c, last_out, stream.next_out - last_out);
+ if (buf == fixed_buf) {
+ stream.next_out = buf;
+ stream.avail_out = sizeof(fixed_buf);
+ }
} while (status == Z_OK);
if (stream.total_out != size || status != Z_STREAM_END)
bad_object(offset, _("inflate returned %d"), status);
git_inflate_end(&stream);
- return buf;
+ if (sha1)
+ git_SHA1_Final(sha1, &c);
+ return buf == fixed_buf ? NULL : buf;
}
-static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_base)
+static void *unpack_raw_entry(struct object_entry *obj,
+ union delta_base *delta_base,
+ unsigned char *sha1)
{
unsigned char *p;
unsigned long size, c;
}
obj->hdr_size = consumed_bytes - obj->idx.offset;
- data = unpack_entry_data(obj->idx.offset, obj->size);
+ data = unpack_entry_data(obj->idx.offset, obj->size, obj->type, sha1);
obj->idx.crc32 = input_crc32;
return data;
}
-static void *get_data_from_pack(struct object_entry *obj)
+static void *unpack_data(struct object_entry *obj,
+ int (*consume)(const unsigned char *, unsigned long, void *),
+ void *cb_data)
{
off_t from = obj[0].idx.offset + obj[0].hdr_size;
unsigned long len = obj[1].idx.offset - from;
git_zstream stream;
int status;
- data = xmalloc(obj->size);
+ data = xmalloc(consume ? 64*1024 : obj->size);
inbuf = xmalloc((len < 64*1024) ? len : 64*1024);
memset(&stream, 0, sizeof(stream));
git_inflate_init(&stream);
stream.next_out = data;
- stream.avail_out = obj->size;
+ stream.avail_out = consume ? 64*1024 : obj->size;
do {
+ unsigned char *last_out = stream.next_out;
ssize_t n = (len < 64*1024) ? len : 64*1024;
n = pread(pack_fd, inbuf, n, from);
if (n < 0)
stream.next_in = inbuf;
stream.avail_in = n;
status = git_inflate(&stream, 0);
+ if (consume) {
+ if (consume(last_out, stream.next_out - last_out, cb_data)) {
+ free(inbuf);
+ free(data);
+ return NULL;
+ }
+ stream.next_out = data;
+ stream.avail_out = 64*1024;
+ }
} while (len && status == Z_OK && !stream.avail_in);
/* This has been inflated OK when first encountered, so... */
git_inflate_end(&stream);
free(inbuf);
+ if (consume) {
+ free(data);
+ data = NULL;
+ }
return data;
}
+static void *get_data_from_pack(struct object_entry *obj)
+{
+ return unpack_data(obj, NULL, NULL);
+}
+
static int compare_delta_bases(const union delta_base *base1,
const union delta_base *base2,
enum object_type type1,
*last_index = last;
}
-static void sha1_object(const void *data, unsigned long size,
- enum object_type type, unsigned char *sha1)
+struct compare_data {
+ struct object_entry *entry;
+ struct git_istream *st;
+ unsigned char *buf;
+ unsigned long buf_size;
+};
+
+static int compare_objects(const unsigned char *buf, unsigned long size,
+ void *cb_data)
+{
+ struct compare_data *data = cb_data;
+
+ if (data->buf_size < size) {
+ free(data->buf);
+ data->buf = xmalloc(size);
+ data->buf_size = size;
+ }
+
+ while (size) {
+ ssize_t len = read_istream(data->st, data->buf, size);
+ if (len == 0)
+ die(_("SHA1 COLLISION FOUND WITH %s !"),
+ sha1_to_hex(data->entry->idx.sha1));
+ if (len < 0)
+ die(_("unable to read %s"),
+ sha1_to_hex(data->entry->idx.sha1));
+ if (memcmp(buf, data->buf, len))
+ die(_("SHA1 COLLISION FOUND WITH %s !"),
+ sha1_to_hex(data->entry->idx.sha1));
+ size -= len;
+ buf += len;
+ }
+ return 0;
+}
+
+static int check_collison(struct object_entry *entry)
+{
+ struct compare_data data;
+ enum object_type type;
+ unsigned long size;
+
+ if (entry->size <= big_file_threshold || entry->type != OBJ_BLOB)
+ return -1;
+
+ memset(&data, 0, sizeof(data));
+ data.entry = entry;
+ data.st = open_istream(entry->idx.sha1, &type, &size, NULL);
+ if (!data.st)
+ return -1;
+ if (size != entry->size || type != entry->type)
+ die(_("SHA1 COLLISION FOUND WITH %s !"),
+ sha1_to_hex(entry->idx.sha1));
+ unpack_data(entry, compare_objects, &data);
+ close_istream(data.st);
+ free(data.buf);
+ return 0;
+}
+
+static void sha1_object(const void *data, struct object_entry *obj_entry,
+ unsigned long size, enum object_type type,
+ const unsigned char *sha1)
{
- hash_sha1_file(data, size, typename(type), sha1);
+ void *new_data = NULL;
+ int collision_test_needed;
+
+ assert(data || obj_entry);
+
read_lock();
- if (has_sha1_file(sha1)) {
+ collision_test_needed = has_sha1_file(sha1);
+ read_unlock();
+
+ if (collision_test_needed && !data) {
+ read_lock();
+ if (!check_collison(obj_entry))
+ collision_test_needed = 0;
+ read_unlock();
+ }
+ if (collision_test_needed) {
void *has_data;
enum object_type has_type;
unsigned long has_size;
+ read_lock();
+ has_type = sha1_object_info(sha1, &has_size);
+ if (has_type != type || has_size != size)
+ die(_("SHA1 COLLISION FOUND WITH %s !"), sha1_to_hex(sha1));
has_data = read_sha1_file(sha1, &has_type, &has_size);
read_unlock();
+ if (!data)
+ data = new_data = get_data_from_pack(obj_entry);
if (!has_data)
die(_("cannot read existing object %s"), sha1_to_hex(sha1));
if (size != has_size || type != has_type ||
memcmp(data, has_data, size) != 0)
die(_("SHA1 COLLISION FOUND WITH %s !"), sha1_to_hex(sha1));
free(has_data);
- } else
- read_unlock();
+ }
if (strict) {
read_lock();
int eaten;
void *buf = (void *) data;
+ if (!buf)
+ buf = new_data = get_data_from_pack(obj_entry);
+
/*
* we do not need to free the memory here, as the
* buf is deleted by the caller.
}
read_unlock();
}
-}
-static int is_delta_type(enum object_type type)
-{
- return (type == OBJ_REF_DELTA || type == OBJ_OFS_DELTA);
+ free(new_data);
}
/*
free(delta_data);
if (!result->data)
bad_object(delta_obj->idx.offset, _("failed to apply delta"));
- sha1_object(result->data, result->size, delta_obj->real_type,
+ hash_sha1_file(result->data, result->size,
+ typename(delta_obj->real_type), delta_obj->idx.sha1);
+ sha1_object(result->data, NULL, result->size, delta_obj->real_type,
delta_obj->idx.sha1);
counter_lock();
nr_resolved_deltas++;
*/
static void parse_pack_objects(unsigned char *sha1)
{
- int i;
+ int i, nr_delays = 0;
struct delta_entry *delta = deltas;
struct stat st;
nr_objects);
for (i = 0; i < nr_objects; i++) {
struct object_entry *obj = &objects[i];
- void *data = unpack_raw_entry(obj, &delta->base);
+ void *data = unpack_raw_entry(obj, &delta->base, obj->idx.sha1);
obj->real_type = obj->type;
if (is_delta_type(obj->type)) {
nr_deltas++;
delta->obj_no = i;
delta++;
+ } else if (!data) {
+ /* large blobs, check later */
+ obj->real_type = OBJ_BAD;
+ nr_delays++;
} else
- sha1_object(data, obj->size, obj->type, obj->idx.sha1);
+ sha1_object(data, NULL, obj->size, obj->type, obj->idx.sha1);
free(data);
display_progress(progress, i+1);
}
if (S_ISREG(st.st_mode) &&
lseek(input_fd, 0, SEEK_CUR) - input_len != st.st_size)
die(_("pack has junk at the end"));
+
+ for (i = 0; i < nr_objects; i++) {
+ struct object_entry *obj = &objects[i];
+ if (obj->real_type != OBJ_BAD)
+ continue;
+ obj->real_type = obj->type;
+ sha1_object(NULL, obj, obj->size, obj->type, obj->idx.sha1);
+ nr_delays--;
+ }
+ if (nr_delays)
+ die(_("confusion beyond insanity in parse_pack_objects()"));
}
/*
#include "parse-options.h"
#include "branch.h"
#include "streaming.h"
+#include "version.h"
/* Set a default date-time format for git log ("log.date" config variable) */
static const char *default_date_mode = NULL;
}
}
+static int ce_excluded(struct path_exclude_check *check, struct cache_entry *ce)
+{
+ int dtype = ce_to_dtype(ce);
+ return path_excluded(check, ce->name, ce_namelen(ce), &dtype);
+}
+
static void show_files(struct dir_struct *dir)
{
int i;
+ struct path_exclude_check check;
+
+ if ((dir->flags & DIR_SHOW_IGNORED))
+ path_exclude_check_init(&check, dir);
/* For cached/deleted files we don't need to even do the readdir */
if (show_others || show_killed) {
if (show_cached | show_stage) {
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
- int dtype = ce_to_dtype(ce);
- if (dir->flags & DIR_SHOW_IGNORED &&
- !excluded(dir, ce->name, &dtype))
+ if ((dir->flags & DIR_SHOW_IGNORED) &&
+ !ce_excluded(&check, ce))
continue;
if (show_unmerged && !ce_stage(ce))
continue;
struct cache_entry *ce = active_cache[i];
struct stat st;
int err;
- int dtype = ce_to_dtype(ce);
- if (dir->flags & DIR_SHOW_IGNORED &&
- !excluded(dir, ce->name, &dtype))
+ if ((dir->flags & DIR_SHOW_IGNORED) &&
+ !ce_excluded(&check, ce))
continue;
if (ce->ce_flags & CE_UPDATE)
continue;
show_ce_entry(tag_modified, ce);
}
}
+
+ if ((dir->flags & DIR_SHOW_IGNORED))
+ path_exclude_check_clear(&check);
}
/*
#include "list-objects.h"
#include "progress.h"
#include "refs.h"
+#include "streaming.h"
#include "thread-utils.h"
static const char *pack_usage[] = {
return stream.total_out;
}
+static unsigned long write_large_blob_data(struct git_istream *st, struct sha1file *f,
+ const unsigned char *sha1)
+{
+ git_zstream stream;
+ unsigned char ibuf[1024 * 16];
+ unsigned char obuf[1024 * 16];
+ unsigned long olen = 0;
+
+ memset(&stream, 0, sizeof(stream));
+ git_deflate_init(&stream, pack_compression_level);
+
+ for (;;) {
+ ssize_t readlen;
+ int zret = Z_OK;
+ readlen = read_istream(st, ibuf, sizeof(ibuf));
+ if (readlen == -1)
+ die(_("unable to read %s"), sha1_to_hex(sha1));
+
+ stream.next_in = ibuf;
+ stream.avail_in = readlen;
+ while ((stream.avail_in || readlen == 0) &&
+ (zret == Z_OK || zret == Z_BUF_ERROR)) {
+ stream.next_out = obuf;
+ stream.avail_out = sizeof(obuf);
+ zret = git_deflate(&stream, readlen ? 0 : Z_FINISH);
+ sha1write(f, obuf, stream.next_out - obuf);
+ olen += stream.next_out - obuf;
+ }
+ if (stream.avail_in)
+ die(_("deflate error (%d)"), zret);
+ if (readlen == 0) {
+ if (zret != Z_STREAM_END)
+ die(_("deflate error (%d)"), zret);
+ break;
+ }
+ }
+ git_deflate_end(&stream);
+ return olen;
+}
+
/*
* we are going to reuse the existing object data as is. make
* sure it is not corrupt.
unsigned hdrlen;
enum object_type type;
void *buf;
+ struct git_istream *st = NULL;
if (!usable_delta) {
- buf = read_sha1_file(entry->idx.sha1, &type, &size);
- if (!buf)
- die("unable to read %s", sha1_to_hex(entry->idx.sha1));
+ if (entry->type == OBJ_BLOB &&
+ entry->size > big_file_threshold &&
+ (st = open_istream(entry->idx.sha1, &type, &size, NULL)) != NULL)
+ buf = NULL;
+ else {
+ buf = read_sha1_file(entry->idx.sha1, &type, &size);
+ if (!buf)
+ die(_("unable to read %s"), sha1_to_hex(entry->idx.sha1));
+ }
/*
* make sure no cached delta data remains from a
* previous attempt before a pack split occurred.
OBJ_OFS_DELTA : OBJ_REF_DELTA;
}
- if (entry->z_delta_size)
+ if (st) /* large blob case, just assume we don't compress well */
+ datalen = size;
+ else if (entry->z_delta_size)
datalen = entry->z_delta_size;
else
datalen = do_compress(&buf, size);
while (ofs >>= 7)
dheader[--pos] = 128 | (--ofs & 127);
if (limit && hdrlen + sizeof(dheader) - pos + datalen + 20 >= limit) {
+ if (st)
+ close_istream(st);
free(buf);
return 0;
}
* an additional 20 bytes for the base sha1.
*/
if (limit && hdrlen + 20 + datalen + 20 >= limit) {
+ if (st)
+ close_istream(st);
free(buf);
return 0;
}
hdrlen += 20;
} else {
if (limit && hdrlen + datalen + 20 >= limit) {
+ if (st)
+ close_istream(st);
free(buf);
return 0;
}
sha1write(f, header, hdrlen);
}
- sha1write(f, buf, datalen);
- free(buf);
+ if (st) {
+ datalen = write_large_blob_data(st, f, entry->idx.sha1);
+ close_istream(st);
+ } else {
+ sha1write(f, buf, datalen);
+ free(buf);
+ }
return hdrlen + datalen;
}
printf("keep %s", message);
return 0;
prune:
- if (!cb->newlog || cb->cmd->verbose)
- printf("%sprune %s", cb->newlog ? "" : "would ", message);
+ if (!cb->newlog)
+ printf("would prune %s", message);
+ else if (cb->cmd->verbose)
+ printf("prune %s", message);
return 0;
}
rev = argv[i++];
} else {
/* Otherwise we treat this as a filename */
- verify_filename(prefix, argv[i]);
+ verify_filename(prefix, argv[i], 1);
}
}
if (as_is) {
if (show_file(arg) && as_is < 2)
- verify_filename(prefix, arg);
+ verify_filename(prefix, arg, 0);
continue;
}
if (!strcmp(arg,"-n")) {
as_is = 1;
if (!show_file(arg))
continue;
- verify_filename(prefix, arg);
+ verify_filename(prefix, arg, 1);
}
if (verify) {
if (revs_count == 1) {
if (S_ISDIR(st.st_mode))
return process_directory(path, len, &st);
- /*
- * Process a regular file
- */
- if (ce && S_ISGITLINK(ce->ce_mode))
- return error("%s is already a gitlink, not replacing", path);
-
return add_one_path(ce, path, len, &st);
}
r->nr),
r->nr);
list_refs(r, 0, NULL);
- r = &header->prerequisites;
- printf_ln(Q_("The bundle requires this ref",
- "The bundle requires these %d refs",
- r->nr),
- r->nr);
- list_refs(r, 0, NULL);
+ if (!r->nr) {
+ printf_ln(_("The bundle records a complete history."));
+ } else {
+ r = &header->prerequisites;
+ printf_ln(Q_("The bundle requires this ref",
+ "The bundle requires these %d refs",
+ r->nr),
+ r->nr);
+ list_refs(r, 0, NULL);
+ }
}
return ret;
}
extern char *prefix_path(const char *prefix, int len, const char *path);
extern const char *prefix_filename(const char *prefix, int len, const char *path);
extern int check_filename(const char *prefix, const char *name);
-extern void verify_filename(const char *prefix, const char *name);
+extern void verify_filename(const char *prefix,
+ const char *name,
+ int diagnose_misspelt_rev);
extern void verify_non_filename(const char *prefix, const char *name);
#define INIT_DB_QUIET 0x0001
Thanks to Dmitry Chichkov for reporting this. Futher thanks to Aleksey Sanin.
* Fixed realloc(0, <size>) segfaulting. Thanks to Dmitry Chichkov for
reporting this.
- * Made config defines #ifndef so they can be overriden by the build system.
+ * Made config defines #ifndef so they can be overridden by the build system.
Thanks to Aleksey Sanin for suggesting this.
* Fixed deadlock in nedprealloc() due to unnecessary locking of preferred
thread mspace when mspace_realloc() always uses the original block's mspace
export exec_prefix mandir
export srcdir VPATH
-ASCIIDOC7=@ASCIIDOC7@
NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
NO_OPENSSL=@NO_OPENSSL@
NO_CURL=@NO_CURL@
AC_MSG_CHECKING([for asciidoc version])
asciidoc_version=`$ASCIIDOC --version 2>/dev/null`
case "${asciidoc_version}" in
- asciidoc' '7*)
- ASCIIDOC7=YesPlease
- AC_MSG_RESULT([${asciidoc_version} > 7])
- ;;
asciidoc' '8*)
- ASCIIDOC7=
AC_MSG_RESULT([${asciidoc_version}])
;;
*)
- ASCIIDOC7=
AC_MSG_RESULT([${asciidoc_version} (unknown)])
;;
esac
fi
-AC_SUBST(ASCIIDOC7)
## Checks for libraries.
* Add support for ssh port: ssh://host.xy:<port>/...
*/
if (protocol == PROTO_SSH && host != url)
- port = get_port(host);
+ port = get_port(end);
if (protocol == PROTO_GIT) {
/* These underlying connection commands die() if they
checkout-index) : plumbing;;
commit-tree) : plumbing;;
count-objects) : infrequent;;
+ credential-cache) : credentials helper;;
+ credential-store) : credentials helper;;
cvsexportcommit) : export;;
cvsimport) : import;;
cvsserver) : daemon;;
_git_log
}
-_main_git ()
+__git_main ()
{
local i c=1 command __git_dir
fi
}
-_main_gitk ()
+__gitk_main ()
{
__git_has_doubledash && return
# wrapper for backwards compatibility
_git ()
{
- __git_wrap_main_git
+ __git_wrap__git_main
}
# wrapper for backwards compatibility
_gitk ()
{
- __git_wrap_main_gitk
+ __git_wrap__gitk_main
}
-__git_complete git _main_git
-__git_complete gitk _main_gitk
+__git_complete git __git_main
+__git_complete gitk __gitk_main
# The following are necessary only for Cygwin, and only are needed
# when the user has tab-completed the executable name and consequently
# included the '.exe' suffix.
#
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
-__git_complete git.exe _main_git
+__git_complete git.exe __git_main
fi
(defun git-blame-cleanup ()
"Remove all blame properties"
- (mapcar 'delete-overlay git-blame-overlays)
+ (mapc 'delete-overlay git-blame-overlays)
(setq git-blame-overlays nil)
(remove-git-blame-text-properties (point-min) (point-max)))
(defvar in-blame-filter nil)
(defun git-blame-filter (proc str)
- (save-excursion
- (set-buffer (process-buffer proc))
- (goto-char (process-mark proc))
- (insert-before-markers str)
- (goto-char 0)
- (unless in-blame-filter
- (let ((more t)
- (in-blame-filter t))
- (while more
- (setq more (git-blame-parse)))))))
+ (with-current-buffer (process-buffer proc)
+ (save-excursion
+ (goto-char (process-mark proc))
+ (insert-before-markers str)
+ (goto-char (point-min))
+ (unless in-blame-filter
+ (let ((more t)
+ (in-blame-filter t))
+ (while more
+ (setq more (git-blame-parse))))))))
(defun git-blame-parse ()
(cond ((looking-at "\\([0-9a-f]\\{40\\}\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\)\n")
info))))
(defun git-blame-create-overlay (info start-line num-lines)
- (save-excursion
- (set-buffer git-blame-file)
- (let ((inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t))
- (goto-line start-line)
- (let* ((start (point))
- (end (progn (forward-line num-lines) (point)))
- (ovl (make-overlay start end))
- (hash (car info))
- (spec `((?h . ,(substring hash 0 6))
- (?H . ,hash)
- (?a . ,(git-blame-get-info info 'author))
- (?A . ,(git-blame-get-info info 'author-mail))
- (?c . ,(git-blame-get-info info 'committer))
- (?C . ,(git-blame-get-info info 'committer-mail))
- (?s . ,(git-blame-get-info info 'summary)))))
- (push ovl git-blame-overlays)
- (overlay-put ovl 'git-blame info)
- (overlay-put ovl 'help-echo
- (format-spec git-blame-mouseover-format spec))
- (if git-blame-use-colors
- (overlay-put ovl 'face (list :background
- (cdr (assq 'color (cdr info))))))
- (overlay-put ovl 'line-prefix
- (propertize (format-spec git-blame-prefix-format spec)
- 'face 'git-blame-prefix-face))))))
+ (with-current-buffer git-blame-file
+ (save-excursion
+ (let ((inhibit-point-motion-hooks t)
+ (inhibit-modification-hooks t))
+ (goto-char (point-min))
+ (forward-line (1- start-line))
+ (let* ((start (point))
+ (end (progn (forward-line num-lines) (point)))
+ (ovl (make-overlay start end))
+ (hash (car info))
+ (spec `((?h . ,(substring hash 0 6))
+ (?H . ,hash)
+ (?a . ,(git-blame-get-info info 'author))
+ (?A . ,(git-blame-get-info info 'author-mail))
+ (?c . ,(git-blame-get-info info 'committer))
+ (?C . ,(git-blame-get-info info 'committer-mail))
+ (?s . ,(git-blame-get-info info 'summary)))))
+ (push ovl git-blame-overlays)
+ (overlay-put ovl 'git-blame info)
+ (overlay-put ovl 'help-echo
+ (format-spec git-blame-mouseover-format spec))
+ (if git-blame-use-colors
+ (overlay-put ovl 'face (list :background
+ (cdr (assq 'color (cdr info))))))
+ (overlay-put ovl 'line-prefix
+ (propertize (format-spec git-blame-prefix-format spec)
+ 'face 'git-blame-prefix-face)))))))
(defun git-blame-add-info (info key value)
(nconc info (list (cons (intern key) value))))
}
}
- /*
- * If the user asked for our exit code then don't start a
- * pager or we would end up reporting its exit code instead.
- */
- if (!DIFF_OPT_TST(&revs->diffopt, EXIT_WITH_STATUS))
- setup_pager();
-
if (prefix) {
int len = strlen(prefix);
const char *paths[3];
if (!revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
- DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
DIFF_OPT_SET(&revs->diffopt, NO_INDEX);
revs->max_count = -2;
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
+ setup_diff_pager(&revs->diffopt);
+ DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
+
if (queue_diff(&revs->diffopt, revs->diffopt.pathspec.raw[0],
revs->diffopt.pathspec.raw[1]))
exit(1);
continue;
if (!data->files[i]->is_renamed && (added + deleted == 0)) {
total_files--;
- } else {
+ } else if (!data->files[i]->is_binary) { /* don't count bytes */
adds += added;
dels += deleted;
}
return retval;
}
+/*
+ * Return the length of the "simple" part of a path match limiter.
+ */
+static int simple_length(const char *match)
+{
+ int len = -1;
+
+ for (;;) {
+ unsigned char c = *match++;
+ len++;
+ if (c == '\0' || is_glob_special(c))
+ return len;
+ }
+}
+
static int no_wildcard(const char *string)
{
- return string[strcspn(string, "*?[{\\")] == '\0';
+ return string[simple_length(string)] == '\0';
}
void add_exclude(const char *string, const char *base,
x->flags = flags;
if (!strchr(string, '/'))
x->flags |= EXC_FLAG_NODIR;
- if (no_wildcard(string))
- x->flags |= EXC_FLAG_NOWILDCARD;
+ x->nowildcardlen = simple_length(string);
if (*string == '*' && no_wildcard(string+1))
x->flags |= EXC_FLAG_ENDSWITH;
ALLOC_GROW(which->excludes, which->nr + 1, which->alloc);
{
int i;
- if (el->nr) {
- for (i = el->nr - 1; 0 <= i; i--) {
- struct exclude *x = el->excludes[i];
- const char *exclude = x->pattern;
- int to_exclude = x->to_exclude;
-
- if (x->flags & EXC_FLAG_MUSTBEDIR) {
- if (*dtype == DT_UNKNOWN)
- *dtype = get_dtype(NULL, pathname, pathlen);
- if (*dtype != DT_DIR)
- continue;
- }
+ if (!el->nr)
+ return -1; /* undefined */
- if (x->flags & EXC_FLAG_NODIR) {
- /* match basename */
- if (x->flags & EXC_FLAG_NOWILDCARD) {
- if (!strcmp_icase(exclude, basename))
- return to_exclude;
- } else if (x->flags & EXC_FLAG_ENDSWITH) {
- if (x->patternlen - 1 <= pathlen &&
- !strcmp_icase(exclude + 1, pathname + pathlen - x->patternlen + 1))
- return to_exclude;
- } else {
- if (fnmatch_icase(exclude, basename, 0) == 0)
- return to_exclude;
- }
- }
- else {
- /* match with FNM_PATHNAME:
- * exclude has base (baselen long) implicitly
- * in front of it.
- */
- int baselen = x->baselen;
- if (*exclude == '/')
- exclude++;
-
- if (pathlen < baselen ||
- (baselen && pathname[baselen-1] != '/') ||
- strncmp_icase(pathname, x->base, baselen))
- continue;
-
- if (x->flags & EXC_FLAG_NOWILDCARD) {
- if (!strcmp_icase(exclude, pathname + baselen))
- return to_exclude;
- } else {
- if (fnmatch_icase(exclude, pathname+baselen,
- FNM_PATHNAME) == 0)
- return to_exclude;
- }
+ for (i = el->nr - 1; 0 <= i; i--) {
+ struct exclude *x = el->excludes[i];
+ const char *name, *exclude = x->pattern;
+ int to_exclude = x->to_exclude;
+ int namelen, prefix = x->nowildcardlen;
+
+ if (x->flags & EXC_FLAG_MUSTBEDIR) {
+ if (*dtype == DT_UNKNOWN)
+ *dtype = get_dtype(NULL, pathname, pathlen);
+ if (*dtype != DT_DIR)
+ continue;
+ }
+
+ if (x->flags & EXC_FLAG_NODIR) {
+ /* match basename */
+ if (prefix == x->patternlen) {
+ if (!strcmp_icase(exclude, basename))
+ return to_exclude;
+ } else if (x->flags & EXC_FLAG_ENDSWITH) {
+ if (x->patternlen - 1 <= pathlen &&
+ !strcmp_icase(exclude + 1, pathname + pathlen - x->patternlen + 1))
+ return to_exclude;
+ } else {
+ if (fnmatch_icase(exclude, basename, 0) == 0)
+ return to_exclude;
}
+ continue;
+ }
+
+ /* match with FNM_PATHNAME:
+ * exclude has base (baselen long) implicitly in front of it.
+ */
+ if (*exclude == '/') {
+ exclude++;
+ prefix--;
+ }
+
+ if (pathlen < x->baselen ||
+ (x->baselen && pathname[x->baselen-1] != '/') ||
+ strncmp_icase(pathname, x->base, x->baselen))
+ continue;
+
+ namelen = x->baselen ? pathlen - x->baselen : pathlen;
+ name = pathname + pathlen - namelen;
+
+ /* if the non-wildcard part is longer than the
+ remaining pathname, surely it cannot match */
+ if (prefix > namelen)
+ continue;
+
+ if (prefix) {
+ if (strncmp_icase(exclude, name, prefix))
+ continue;
+ exclude += prefix;
+ name += prefix;
+ namelen -= prefix;
}
+
+ if (!namelen || !fnmatch_icase(exclude, name, FNM_PATHNAME))
+ return to_exclude;
}
return -1; /* undecided */
}
-int excluded(struct dir_struct *dir, const char *pathname, int *dtype_p)
+static int excluded(struct dir_struct *dir, const char *pathname, int *dtype_p)
{
int pathlen = strlen(pathname);
int st;
return 0;
}
+void path_exclude_check_init(struct path_exclude_check *check,
+ struct dir_struct *dir)
+{
+ check->dir = dir;
+ strbuf_init(&check->path, 256);
+}
+
+void path_exclude_check_clear(struct path_exclude_check *check)
+{
+ strbuf_release(&check->path);
+}
+
+/*
+ * Is this name excluded? This is for a caller like show_files() that
+ * do not honor directory hierarchy and iterate through paths that are
+ * possibly in an ignored directory.
+ *
+ * A path to a directory known to be excluded is left in check->path to
+ * optimize for repeated checks for files in the same excluded directory.
+ */
+int path_excluded(struct path_exclude_check *check,
+ const char *name, int namelen, int *dtype)
+{
+ int i;
+ struct strbuf *path = &check->path;
+
+ /*
+ * we allow the caller to pass namelen as an optimization; it
+ * must match the length of the name, as we eventually call
+ * excluded() on the whole name string.
+ */
+ if (namelen < 0)
+ namelen = strlen(name);
+
+ if (path->len &&
+ path->len <= namelen &&
+ !memcmp(name, path->buf, path->len) &&
+ (!name[path->len] || name[path->len] == '/'))
+ return 1;
+
+ strbuf_setlen(path, 0);
+ for (i = 0; name[i]; i++) {
+ int ch = name[i];
+
+ if (ch == '/') {
+ int dt = DT_DIR;
+ if (excluded(check->dir, path->buf, &dt))
+ return 1;
+ }
+ strbuf_addch(path, ch);
+ }
+
+ /* An entry in the index; cannot be a directory with subentries */
+ strbuf_setlen(path, 0);
+
+ return excluded(check->dir, name, dtype);
+}
+
static struct dir_entry *dir_entry_new(const char *pathname, int len)
{
struct dir_entry *ent;
e2->name, e2->len);
}
-/*
- * Return the length of the "simple" part of a path match limiter.
- */
-static int simple_length(const char *match)
-{
- int len = -1;
-
- for (;;) {
- unsigned char c = *match++;
- len++;
- if (c == '\0' || is_glob_special(c))
- return len;
- }
-}
-
static struct path_simplify *create_simplify(const char **pathspec)
{
int nr, alloc = 0;
#ifndef DIR_H
#define DIR_H
+#include "strbuf.h"
+
struct dir_entry {
unsigned int len;
char name[FLEX_ARRAY]; /* more */
};
#define EXC_FLAG_NODIR 1
-#define EXC_FLAG_NOWILDCARD 2
#define EXC_FLAG_ENDSWITH 4
#define EXC_FLAG_MUSTBEDIR 8
struct exclude {
const char *pattern;
int patternlen;
+ int nowildcardlen;
const char *base;
int baselen;
int to_exclude;
extern int excluded_from_list(const char *pathname, int pathlen, const char *basename,
int *dtype, struct exclude_list *el);
-extern int excluded(struct dir_struct *, const char *, int *);
struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len);
+
+/*
+ * The excluded() API is meant for callers that check each level of leading
+ * directory hierarchies with excluded() to avoid recursing into excluded
+ * directories. Callers that do not do so should use this API instead.
+ */
+struct path_exclude_check {
+ struct dir_struct *dir;
+ struct strbuf path;
+};
+extern void path_exclude_check_init(struct path_exclude_check *, struct dir_struct *);
+extern void path_exclude_check_clear(struct path_exclude_check *);
+extern int path_excluded(struct path_exclude_check *, const char *, int namelen, int *dtype);
+
+
extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
char **buf_p, struct exclude_list *which, int check_index);
extern void add_excludes_from_file(struct dir_struct *, const char *fname);
}
sub diff_applies {
- my $fh;
return run_git_apply($patch_mode_flavour{APPLY_CHECK} . ' --check',
map { @{$_->{TEXT}} } @_);
}
}
if (@result) {
- my $fh;
my @patch = reassemble_patch($head->{TEXT}, @result);
my $apply_routine = $patch_mode_flavour{APPLY};
&$apply_routine(@patch);
merge_base=$(git merge-base $baserev $headrev) ||
die "fatal: No commits in common between $base and $head"
-# $head is the token given from the command line. If a ref with that
-# name exists at the remote and their values match, we should use it.
-# Otherwise find a ref that matches $headrev.
+# $head is the token given from the command line, and $tag_name, if
+# exists, is the tag we are going to show the commit information for.
+# If that tag exists at the remote and it points at the commit, use it.
+# Otherwise, if a branch with the same name as $head exists at the remote
+# and their values match, use that instead.
+#
+# Otherwise find a random ref that matches $headrev.
find_matching_ref='
sub abbr {
my $ref = shift;
}
}
- my ($exact, $found);
+ my ($tagged, $branch, $found);
while (<STDIN>) {
my ($sha1, $ref, $deref) = /^(\S+)\s+(\S+?)(\^\{\})?$/;
next unless ($sha1 eq $ARGV[1]);
$found = abbr($ref);
+ if ($deref && $ref eq "tags/$ARGV[2]") {
+ $tagged = $found;
+ last;
+ }
if ($ref =~ m|/\Q$ARGV[0]\E$|) {
$exact = $found;
- last;
}
}
- if ($exact) {
+ if ($tagged) {
+ print "$tagged\n";
+ } elsif ($exact) {
print "$exact\n";
} elsif ($found) {
print "$found\n";
}
'
-ref=$(git ls-remote "$url" | perl -e "$find_matching_ref" "$head" "$headrev")
+ref=$(git ls-remote "$url" | perl -e "$find_matching_ref" "$head" "$headrev" "$tag_name")
url=$(git ls-remote --get-url "$url")
if test -n "$tag_name"
then
+ if test -z "$ref" || test "$ref" != "tags/$tag_name"
+ then
+ echo >&2 "warn: You locally have $tag_name but it does not (yet)"
+ echo >&2 "warn: appear to be at $url"
+ echo >&2 "warn: Do you want to push it there, perhaps?"
+ fi
git cat-file tag "$tag_name" |
sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p
echo
#!/bin/sh
#
-# git-submodules.sh: add, init, update or list git submodules
+# git-submodule.sh: add, init, update or list git submodules
#
# Copyright (c) 2007 Lars Hjemli
}
}
my $can_compress = eval { require Compress::Zlib; 1};
-push @Git::SVN::Ra::ISA, 'SVN::Ra';
-push @Git::SVN::Editor::ISA, 'SVN::Delta::Editor';
use Carp qw/croak/;
use Digest::MD5;
use IO::File qw//;
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
use IPC::Open3;
use Git;
+use Git::SVN::Editor qw//;
use Git::SVN::Fetcher qw//;
+use Git::SVN::Ra qw//;
use Git::SVN::Prompt qw//;
use Memoize; # core since 5.8.0, Jul 2002
foreach (qw/command command_oneline command_noisy command_output_pipe
command_input_pipe command_close_pipe
command_bidi_pipe command_close_bidi_pipe/) {
- for my $package ( qw(Git::SVN::Editor
- Git::SVN::Migration Git::SVN::Log Git::SVN),
+ for my $package ( qw(Git::SVN::Migration Git::SVN::Log Git::SVN),
__PACKAGE__) {
*{"${package}::$_"} = \&{"Git::$_"};
}
" with the --destination argument.\n";
}
foreach my $g (@{$allglobs}) {
- # Git::SVN::Editor could probably be moved to Git.pm..
my $re = Git::SVN::Editor::glob2pat($g->{path}->{left});
if ($_branch_dest =~ /$re/) {
$glob = $g;
use Memoize; # core since 5.8.0, Jul 2002
use Memoize::Storable;
use POSIX qw(:signal_h);
+my $can_use_yaml;
+BEGIN {
+ $can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
+}
my ($_gc_nr, $_gc_period);
command_oneline("rev-parse", "$commit~1^{tree}"));
}
+sub tie_for_persistent_memoization {
+ my $hash = shift;
+ my $path = shift;
+
+ if ($can_use_yaml) {
+ tie %$hash => 'Git::SVN::Memoize::YAML', "$path.yaml";
+ } else {
+ tie %$hash => 'Memoize::Storable', "$path.db", 'nstore';
+ }
+}
+
# The GIT_DIR environment variable is not always set until after the command
# line arguments are processed, so we can't memoize in a BEGIN block.
{
my $cache_path = "$ENV{GIT_DIR}/svn/.caches/";
mkpath([$cache_path]) unless -d $cache_path;
- tie my %lookup_svn_merge_cache => 'Memoize::Storable',
- "$cache_path/lookup_svn_merge.db", 'nstore';
+ my %lookup_svn_merge_cache;
+ my %check_cherry_pick_cache;
+ my %has_no_changes_cache;
+
+ tie_for_persistent_memoization(\%lookup_svn_merge_cache,
+ "$cache_path/lookup_svn_merge");
memoize 'lookup_svn_merge',
SCALAR_CACHE => 'FAULT',
LIST_CACHE => ['HASH' => \%lookup_svn_merge_cache],
;
- tie my %check_cherry_pick_cache => 'Memoize::Storable',
- "$cache_path/check_cherry_pick.db", 'nstore';
+ tie_for_persistent_memoization(\%check_cherry_pick_cache,
+ "$cache_path/check_cherry_pick");
memoize 'check_cherry_pick',
SCALAR_CACHE => 'FAULT',
LIST_CACHE => ['HASH' => \%check_cherry_pick_cache],
;
- tie my %has_no_changes_cache => 'Memoize::Storable',
- "$cache_path/has_no_changes.db", 'nstore';
+ tie_for_persistent_memoization(\%has_no_changes_cache,
+ "$cache_path/has_no_changes");
memoize 'has_no_changes',
SCALAR_CACHE => ['HASH' => \%has_no_changes_cache],
LIST_CACHE => 'FAULT',
$_[0] =~ s{^([^:]*://)[^@]+@}{$1};
}
-package Git::SVN::Editor;
-use vars qw/@ISA $_rmdir $_cp_similarity $_find_copies_harder $_rename_limit/;
-use strict;
-use warnings;
-use Carp qw/croak/;
-use IO::File;
-
-sub new {
- my ($class, $opts) = @_;
- foreach (qw/svn_path r ra tree_a tree_b log editor_cb/) {
- die "$_ required!\n" unless (defined $opts->{$_});
- }
-
- my $pool = SVN::Pool->new;
- my $mods = generate_diff($opts->{tree_a}, $opts->{tree_b});
- my $types = check_diff_paths($opts->{ra}, $opts->{svn_path},
- $opts->{r}, $mods);
-
- # $opts->{ra} functions should not be used after this:
- my @ce = $opts->{ra}->get_commit_editor($opts->{log},
- $opts->{editor_cb}, $pool);
- my $self = SVN::Delta::Editor->new(@ce, $pool);
- bless $self, $class;
- foreach (qw/svn_path r tree_a tree_b/) {
- $self->{$_} = $opts->{$_};
- }
- $self->{url} = $opts->{ra}->{url};
- $self->{mods} = $mods;
- $self->{types} = $types;
- $self->{pool} = $pool;
- $self->{bat} = { '' => $self->open_root($self->{r}, $self->{pool}) };
- $self->{rm} = { };
- $self->{path_prefix} = length $self->{svn_path} ?
- "$self->{svn_path}/" : '';
- $self->{config} = $opts->{config};
- $self->{mergeinfo} = $opts->{mergeinfo};
- return $self;
-}
-
-sub generate_diff {
- my ($tree_a, $tree_b) = @_;
- my @diff_tree = qw(diff-tree -z -r);
- if ($_cp_similarity) {
- push @diff_tree, "-C$_cp_similarity";
- } else {
- push @diff_tree, '-C';
- }
- push @diff_tree, '--find-copies-harder' if $_find_copies_harder;
- push @diff_tree, "-l$_rename_limit" if defined $_rename_limit;
- push @diff_tree, $tree_a, $tree_b;
- my ($diff_fh, $ctx) = command_output_pipe(@diff_tree);
- local $/ = "\0";
- my $state = 'meta';
- my @mods;
- while (<$diff_fh>) {
- chomp $_; # this gets rid of the trailing "\0"
- if ($state eq 'meta' && /^:(\d{6})\s(\d{6})\s
- ($::sha1)\s($::sha1)\s
- ([MTCRAD])\d*$/xo) {
- push @mods, { mode_a => $1, mode_b => $2,
- sha1_a => $3, sha1_b => $4,
- chg => $5 };
- if ($5 =~ /^(?:C|R)$/) {
- $state = 'file_a';
- } else {
- $state = 'file_b';
- }
- } elsif ($state eq 'file_a') {
- my $x = $mods[$#mods] or croak "Empty array\n";
- if ($x->{chg} !~ /^(?:C|R)$/) {
- croak "Error parsing $_, $x->{chg}\n";
- }
- $x->{file_a} = $_;
- $state = 'file_b';
- } elsif ($state eq 'file_b') {
- my $x = $mods[$#mods] or croak "Empty array\n";
- if (exists $x->{file_a} && $x->{chg} !~ /^(?:C|R)$/) {
- croak "Error parsing $_, $x->{chg}\n";
- }
- if (!exists $x->{file_a} && $x->{chg} =~ /^(?:C|R)$/) {
- croak "Error parsing $_, $x->{chg}\n";
- }
- $x->{file_b} = $_;
- $state = 'meta';
- } else {
- croak "Error parsing $_\n";
- }
- }
- command_close_pipe($diff_fh, $ctx);
- \@mods;
-}
-
-sub check_diff_paths {
- my ($ra, $pfx, $rev, $mods) = @_;
- my %types;
- $pfx .= '/' if length $pfx;
-
- sub type_diff_paths {
- my ($ra, $types, $path, $rev) = @_;
- my @p = split m#/+#, $path;
- my $c = shift @p;
- unless (defined $types->{$c}) {
- $types->{$c} = $ra->check_path($c, $rev);
- }
- while (@p) {
- $c .= '/' . shift @p;
- next if defined $types->{$c};
- $types->{$c} = $ra->check_path($c, $rev);
- }
- }
-
- foreach my $m (@$mods) {
- foreach my $f (qw/file_a file_b/) {
- next unless defined $m->{$f};
- my ($dir) = ($m->{$f} =~ m#^(.*?)/?(?:[^/]+)$#);
- if (length $pfx.$dir && ! defined $types{$dir}) {
- type_diff_paths($ra, \%types, $pfx.$dir, $rev);
- }
- }
- }
- \%types;
-}
-
-sub split_path {
- return ($_[0] =~ m#^(.*?)/?([^/]+)$#);
-}
-
-sub repo_path {
- my ($self, $path) = @_;
- if (my $enc = $self->{pathnameencoding}) {
- require Encode;
- Encode::from_to($path, $enc, 'UTF-8');
- }
- $self->{path_prefix}.(defined $path ? $path : '');
-}
-
-sub url_path {
- my ($self, $path) = @_;
- if ($self->{url} =~ m#^https?://#) {
- $path =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
- }
- $self->{url} . '/' . $self->repo_path($path);
-}
-
-sub rmdirs {
- my ($self) = @_;
- my $rm = $self->{rm};
- delete $rm->{''}; # we never delete the url we're tracking
- return unless %$rm;
-
- foreach (keys %$rm) {
- my @d = split m#/#, $_;
- my $c = shift @d;
- $rm->{$c} = 1;
- while (@d) {
- $c .= '/' . shift @d;
- $rm->{$c} = 1;
- }
- }
- delete $rm->{$self->{svn_path}};
- delete $rm->{''}; # we never delete the url we're tracking
- return unless %$rm;
-
- my ($fh, $ctx) = command_output_pipe(qw/ls-tree --name-only -r -z/,
- $self->{tree_b});
- local $/ = "\0";
- while (<$fh>) {
- chomp;
- my @dn = split m#/#, $_;
- while (pop @dn) {
- delete $rm->{join '/', @dn};
- }
- unless (%$rm) {
- close $fh;
- return;
- }
- }
- command_close_pipe($fh, $ctx);
-
- my ($r, $p, $bat) = ($self->{r}, $self->{pool}, $self->{bat});
- foreach my $d (sort { $b =~ tr#/#/# <=> $a =~ tr#/#/# } keys %$rm) {
- $self->close_directory($bat->{$d}, $p);
- my ($dn) = ($d =~ m#^(.*?)/?(?:[^/]+)$#);
- print "\tD+\t$d/\n" unless $::_q;
- $self->SUPER::delete_entry($d, $r, $bat->{$dn}, $p);
- delete $bat->{$d};
- }
-}
-
-sub open_or_add_dir {
- my ($self, $full_path, $baton, $deletions) = @_;
- my $t = $self->{types}->{$full_path};
- if (!defined $t) {
- die "$full_path not known in r$self->{r} or we have a bug!\n";
- }
- {
- no warnings 'once';
- # SVN::Node::none and SVN::Node::file are used only once,
- # so we're shutting up Perl's warnings about them.
- if ($t == $SVN::Node::none || defined($deletions->{$full_path})) {
- return $self->add_directory($full_path, $baton,
- undef, -1, $self->{pool});
- } elsif ($t == $SVN::Node::dir) {
- return $self->open_directory($full_path, $baton,
- $self->{r}, $self->{pool});
- } # no warnings 'once'
- print STDERR "$full_path already exists in repository at ",
- "r$self->{r} and it is not a directory (",
- ($t == $SVN::Node::file ? 'file' : 'unknown'),"/$t)\n";
- } # no warnings 'once'
- exit 1;
-}
-
-sub ensure_path {
- my ($self, $path, $deletions) = @_;
- my $bat = $self->{bat};
- my $repo_path = $self->repo_path($path);
- return $bat->{''} unless (length $repo_path);
-
- my @p = split m#/+#, $repo_path;
- my $c = shift @p;
- $bat->{$c} ||= $self->open_or_add_dir($c, $bat->{''}, $deletions);
- while (@p) {
- my $c0 = $c;
- $c .= '/' . shift @p;
- $bat->{$c} ||= $self->open_or_add_dir($c, $bat->{$c0}, $deletions);
- }
- return $bat->{$c};
-}
-
-# Subroutine to convert a globbing pattern to a regular expression.
-# From perl cookbook.
-sub glob2pat {
- my $globstr = shift;
- my %patmap = ('*' => '.*', '?' => '.', '[' => '[', ']' => ']');
- $globstr =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
- return '^' . $globstr . '$';
-}
-
-sub check_autoprop {
- my ($self, $pattern, $properties, $file, $fbat) = @_;
- # Convert the globbing pattern to a regular expression.
- my $regex = glob2pat($pattern);
- # Check if the pattern matches the file name.
- if($file =~ m/($regex)/) {
- # Parse the list of properties to set.
- my @props = split(/;/, $properties);
- foreach my $prop (@props) {
- # Parse 'name=value' syntax and set the property.
- if ($prop =~ /([^=]+)=(.*)/) {
- my ($n,$v) = ($1,$2);
- for ($n, $v) {
- s/^\s+//; s/\s+$//;
- }
- $self->change_file_prop($fbat, $n, $v);
- }
- }
- }
-}
-
-sub apply_autoprops {
- my ($self, $file, $fbat) = @_;
- my $conf_t = ${$self->{config}}{'config'};
- no warnings 'once';
- # Check [miscellany]/enable-auto-props in svn configuration.
- if (SVN::_Core::svn_config_get_bool(
- $conf_t,
- $SVN::_Core::SVN_CONFIG_SECTION_MISCELLANY,
- $SVN::_Core::SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS,
- 0)) {
- # Auto-props are enabled. Enumerate them to look for matches.
- my $callback = sub {
- $self->check_autoprop($_[0], $_[1], $file, $fbat);
- };
- SVN::_Core::svn_config_enumerate(
- $conf_t,
- $SVN::_Core::SVN_CONFIG_SECTION_AUTO_PROPS,
- $callback);
- }
-}
-
-sub A {
- my ($self, $m, $deletions) = @_;
- my ($dir, $file) = split_path($m->{file_b});
- my $pbat = $self->ensure_path($dir, $deletions);
- my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- undef, -1);
- print "\tA\t$m->{file_b}\n" unless $::_q;
- $self->apply_autoprops($file, $fbat);
- $self->chg_file($fbat, $m);
- $self->close_file($fbat,undef,$self->{pool});
-}
-
-sub C {
- my ($self, $m, $deletions) = @_;
- my ($dir, $file) = split_path($m->{file_b});
- my $pbat = $self->ensure_path($dir, $deletions);
- my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
- print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
- $self->chg_file($fbat, $m);
- $self->close_file($fbat,undef,$self->{pool});
-}
-
-sub delete_entry {
- my ($self, $path, $pbat) = @_;
- my $rpath = $self->repo_path($path);
- my ($dir, $file) = split_path($rpath);
- $self->{rm}->{$dir} = 1;
- $self->SUPER::delete_entry($rpath, $self->{r}, $pbat, $self->{pool});
-}
-
-sub R {
- my ($self, $m, $deletions) = @_;
- my ($dir, $file) = split_path($m->{file_b});
- my $pbat = $self->ensure_path($dir, $deletions);
- my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
- print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
- $self->apply_autoprops($file, $fbat);
- $self->chg_file($fbat, $m);
- $self->close_file($fbat,undef,$self->{pool});
-
- ($dir, $file) = split_path($m->{file_a});
- $pbat = $self->ensure_path($dir, $deletions);
- $self->delete_entry($m->{file_a}, $pbat);
-}
-
-sub M {
- my ($self, $m, $deletions) = @_;
- my ($dir, $file) = split_path($m->{file_b});
- my $pbat = $self->ensure_path($dir, $deletions);
- my $fbat = $self->open_file($self->repo_path($m->{file_b}),
- $pbat,$self->{r},$self->{pool});
- print "\t$m->{chg}\t$m->{file_b}\n" unless $::_q;
- $self->chg_file($fbat, $m);
- $self->close_file($fbat,undef,$self->{pool});
-}
-
-sub T { shift->M(@_) }
-
-sub change_file_prop {
- my ($self, $fbat, $pname, $pval) = @_;
- $self->SUPER::change_file_prop($fbat, $pname, $pval, $self->{pool});
-}
-
-sub change_dir_prop {
- my ($self, $pbat, $pname, $pval) = @_;
- $self->SUPER::change_dir_prop($pbat, $pname, $pval, $self->{pool});
-}
-
-sub _chg_file_get_blob ($$$$) {
- my ($self, $fbat, $m, $which) = @_;
- my $fh = $::_repository->temp_acquire("git_blob_$which");
- if ($m->{"mode_$which"} =~ /^120/) {
- print $fh 'link ' or croak $!;
- $self->change_file_prop($fbat,'svn:special','*');
- } elsif ($m->{mode_a} =~ /^120/ && $m->{"mode_$which"} !~ /^120/) {
- $self->change_file_prop($fbat,'svn:special',undef);
- }
- my $blob = $m->{"sha1_$which"};
- return ($fh,) if ($blob =~ /^0{40}$/);
- my $size = $::_repository->cat_blob($blob, $fh);
- croak "Failed to read object $blob" if ($size < 0);
- $fh->flush == 0 or croak $!;
- seek $fh, 0, 0 or croak $!;
-
- my $exp = ::md5sum($fh);
- seek $fh, 0, 0 or croak $!;
- return ($fh, $exp);
-}
-
-sub chg_file {
- my ($self, $fbat, $m) = @_;
- if ($m->{mode_b} =~ /755$/ && $m->{mode_a} !~ /755$/) {
- $self->change_file_prop($fbat,'svn:executable','*');
- } elsif ($m->{mode_b} !~ /755$/ && $m->{mode_a} =~ /755$/) {
- $self->change_file_prop($fbat,'svn:executable',undef);
- }
- my ($fh_a, $exp_a) = _chg_file_get_blob $self, $fbat, $m, 'a';
- my ($fh_b, $exp_b) = _chg_file_get_blob $self, $fbat, $m, 'b';
- my $pool = SVN::Pool->new;
- my $atd = $self->apply_textdelta($fbat, $exp_a, $pool);
- if (-s $fh_a) {
- my $txstream = SVN::TxDelta::new ($fh_a, $fh_b, $pool);
- my $res = SVN::TxDelta::send_txstream($txstream, @$atd, $pool);
- if (defined $res) {
- die "Unexpected result from send_txstream: $res\n",
- "(SVN::Core::VERSION: $SVN::Core::VERSION)\n";
- }
- } else {
- my $got = SVN::TxDelta::send_stream($fh_b, @$atd, $pool);
- die "Checksum mismatch\nexpected: $exp_b\ngot: $got\n"
- if ($got ne $exp_b);
- }
- Git::temp_release($fh_b, 1);
- Git::temp_release($fh_a, 1);
- $pool->clear;
-}
-
-sub D {
- my ($self, $m, $deletions) = @_;
- my ($dir, $file) = split_path($m->{file_b});
- my $pbat = $self->ensure_path($dir, $deletions);
- print "\tD\t$m->{file_b}\n" unless $::_q;
- $self->delete_entry($m->{file_b}, $pbat);
-}
-
-sub close_edit {
- my ($self) = @_;
- my ($p,$bat) = ($self->{pool}, $self->{bat});
- foreach (sort { $b =~ tr#/#/# <=> $a =~ tr#/#/# } keys %$bat) {
- next if $_ eq '';
- $self->close_directory($bat->{$_}, $p);
- }
- $self->close_directory($bat->{''}, $p);
- $self->SUPER::close_edit($p);
- $p->clear;
-}
-
-sub abort_edit {
- my ($self) = @_;
- $self->SUPER::abort_edit($self->{pool});
-}
-
-sub DESTROY {
- my $self = shift;
- $self->SUPER::DESTROY(@_);
- $self->{pool}->clear;
-}
-
-# this drives the editor
-sub apply_diff {
- my ($self) = @_;
- my $mods = $self->{mods};
- my %o = ( D => 0, C => 1, R => 2, A => 3, M => 4, T => 5 );
- my %deletions;
-
- foreach my $m (@$mods) {
- if ($m->{chg} eq "D") {
- $deletions{$m->{file_b}} = 1;
- }
- }
-
- foreach my $m (sort { $o{$a->{chg}} <=> $o{$b->{chg}} } @$mods) {
- my $f = $m->{chg};
- if (defined $o{$f}) {
- $self->$f($m, \%deletions);
- } else {
- fatal("Invalid change type: $f");
- }
- }
-
- if (defined($self->{mergeinfo})) {
- $self->change_dir_prop($self->{bat}{''}, "svn:mergeinfo",
- $self->{mergeinfo});
- }
- $self->rmdirs if $_rmdir;
- if (@$mods == 0 && !defined($self->{mergeinfo})) {
- $self->abort_edit;
- } else {
- $self->close_edit;
- }
- return scalar @$mods;
-}
-
-package Git::SVN::Ra;
-use vars qw/@ISA $config_dir $_ignore_refs_regex $_log_window_size/;
-use strict;
-use warnings;
-my ($ra_invalid, $can_do_switch, %ignored_err, $RA);
-
-BEGIN {
- # enforce temporary pool usage for some simple functions
- no strict 'refs';
- for my $f (qw/rev_proplist get_latest_revnum get_uuid get_repos_root
- get_file/) {
- my $SUPER = "SUPER::$f";
- *$f = sub {
- my $self = shift;
- my $pool = SVN::Pool->new;
- my @ret = $self->$SUPER(@_,$pool);
- $pool->clear;
- wantarray ? @ret : $ret[0];
- };
- }
-}
-
-sub _auth_providers () {
- my @rv = (
- SVN::Client::get_simple_provider(),
- SVN::Client::get_ssl_server_trust_file_provider(),
- SVN::Client::get_simple_prompt_provider(
- \&Git::SVN::Prompt::simple, 2),
- SVN::Client::get_ssl_client_cert_file_provider(),
- SVN::Client::get_ssl_client_cert_prompt_provider(
- \&Git::SVN::Prompt::ssl_client_cert, 2),
- SVN::Client::get_ssl_client_cert_pw_file_provider(),
- SVN::Client::get_ssl_client_cert_pw_prompt_provider(
- \&Git::SVN::Prompt::ssl_client_cert_pw, 2),
- SVN::Client::get_username_provider(),
- SVN::Client::get_ssl_server_trust_prompt_provider(
- \&Git::SVN::Prompt::ssl_server_trust),
- SVN::Client::get_username_prompt_provider(
- \&Git::SVN::Prompt::username, 2)
- );
-
- # earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
- # this function
- if (::compare_svn_version('1.6.15') >= 0) {
- my $config = SVN::Core::config_get_config($config_dir);
- my ($p, @a);
- # config_get_config returns all config files from
- # ~/.subversion, auth_get_platform_specific_client_providers
- # just wants the config "file".
- @a = ($config->{'config'}, undef);
- $p = SVN::Core::auth_get_platform_specific_client_providers(@a);
- # Insert the return value from
- # auth_get_platform_specific_providers
- unshift @rv, @$p;
- }
- \@rv;
-}
-
-sub escape_uri_only {
- my ($uri) = @_;
- my @tmp;
- foreach (split m{/}, $uri) {
- s/([^~\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
- push @tmp, $_;
- }
- join('/', @tmp);
-}
-
-sub escape_url {
- my ($url) = @_;
- if ($url =~ m#^(https?)://([^/]+)(.*)$#) {
- my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
- $url = "$scheme://$domain$uri";
- }
- $url;
-}
-
-sub new {
- my ($class, $url) = @_;
- $url =~ s!/+$!!;
- return $RA if ($RA && $RA->{url} eq $url);
-
- ::_req_svn();
-
- SVN::_Core::svn_config_ensure($config_dir, undef);
- my ($baton, $callbacks) = SVN::Core::auth_open_helper(_auth_providers);
- my $config = SVN::Core::config_get_config($config_dir);
- $RA = undef;
- my $dont_store_passwords = 1;
- my $conf_t = ${$config}{'config'};
- {
- no warnings 'once';
- # The usage of $SVN::_Core::SVN_CONFIG_* variables
- # produces warnings that variables are used only once.
- # I had not found the better way to shut them up, so
- # the warnings of type 'once' are disabled in this block.
- if (SVN::_Core::svn_config_get_bool($conf_t,
- $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
- $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,
- 1) == 0) {
- SVN::_Core::svn_auth_set_parameter($baton,
- $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,
- bless (\$dont_store_passwords, "_p_void"));
- }
- if (SVN::_Core::svn_config_get_bool($conf_t,
- $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
- $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,
- 1) == 0) {
- $Git::SVN::Prompt::_no_auth_cache = 1;
- }
- } # no warnings 'once'
- my $self = SVN::Ra->new(url => escape_url($url), auth => $baton,
- config => $config,
- pool => SVN::Pool->new,
- auth_provider_callbacks => $callbacks);
- $self->{url} = $url;
- $self->{svn_path} = $url;
- $self->{repos_root} = $self->get_repos_root;
- $self->{svn_path} =~ s#^\Q$self->{repos_root}\E(/|$)##;
- $self->{cache} = { check_path => { r => 0, data => {} },
- get_dir => { r => 0, data => {} } };
- $RA = bless $self, $class;
-}
-
-sub check_path {
- my ($self, $path, $r) = @_;
- my $cache = $self->{cache}->{check_path};
- if ($r == $cache->{r} && exists $cache->{data}->{$path}) {
- return $cache->{data}->{$path};
- }
- my $pool = SVN::Pool->new;
- my $t = $self->SUPER::check_path($path, $r, $pool);
- $pool->clear;
- if ($r != $cache->{r}) {
- %{$cache->{data}} = ();
- $cache->{r} = $r;
- }
- $cache->{data}->{$path} = $t;
-}
-
-sub get_dir {
- my ($self, $dir, $r) = @_;
- my $cache = $self->{cache}->{get_dir};
- if ($r == $cache->{r}) {
- if (my $x = $cache->{data}->{$dir}) {
- return wantarray ? @$x : $x->[0];
- }
- }
- my $pool = SVN::Pool->new;
- my ($d, undef, $props) = $self->SUPER::get_dir($dir, $r, $pool);
- my %dirents = map { $_ => { kind => $d->{$_}->kind } } keys %$d;
- $pool->clear;
- if ($r != $cache->{r}) {
- %{$cache->{data}} = ();
- $cache->{r} = $r;
- }
- $cache->{data}->{$dir} = [ \%dirents, $r, $props ];
- wantarray ? (\%dirents, $r, $props) : \%dirents;
-}
-
-sub DESTROY {
- # do not call the real DESTROY since we store ourselves in $RA
-}
-
-# get_log(paths, start, end, limit,
-# discover_changed_paths, strict_node_history, receiver)
-sub get_log {
- my ($self, @args) = @_;
- my $pool = SVN::Pool->new;
-
- # svn_log_changed_path_t objects passed to get_log are likely to be
- # overwritten even if only the refs are copied to an external variable,
- # so we should dup the structures in their entirety. Using an
- # externally passed pool (instead of our temporary and quickly cleared
- # pool in Git::SVN::Ra) does not help matters at all...
- my $receiver = pop @args;
- my $prefix = "/".$self->{svn_path};
- $prefix =~ s#/+($)##;
- my $prefix_regex = qr#^\Q$prefix\E#;
- push(@args, sub {
- my ($paths) = $_[0];
- return &$receiver(@_) unless $paths;
- $_[0] = ();
- foreach my $p (keys %$paths) {
- my $i = $paths->{$p};
- # Make path relative to our url, not repos_root
- $p =~ s/$prefix_regex//;
- my %s = map { $_ => $i->$_; }
- qw/copyfrom_path copyfrom_rev action/;
- if ($s{'copyfrom_path'}) {
- $s{'copyfrom_path'} =~ s/$prefix_regex//;
- }
- $_[0]{$p} = \%s;
- }
- &$receiver(@_);
- });
-
-
- # the limit parameter was not supported in SVN 1.1.x, so we
- # drop it. Therefore, the receiver callback passed to it
- # is made aware of this limitation by being wrapped if
- # the limit passed to is being wrapped.
- if (::compare_svn_version('1.2.0') <= 0) {
- my $limit = splice(@args, 3, 1);
- if ($limit > 0) {
- my $receiver = pop @args;
- push(@args, sub { &$receiver(@_) if (--$limit >= 0) });
- }
- }
- my $ret = $self->SUPER::get_log(@args, $pool);
- $pool->clear;
- $ret;
-}
-
-sub trees_match {
- my ($self, $url1, $rev1, $url2, $rev2) = @_;
- my $ctx = SVN::Client->new(auth => _auth_providers);
- my $out = IO::File->new_tmpfile;
-
- # older SVN (1.1.x) doesn't take $pool as the last parameter for
- # $ctx->diff(), so we'll create a default one
- my $pool = SVN::Pool->new_default_sub;
-
- $ra_invalid = 1; # this will open a new SVN::Ra connection to $url1
- $ctx->diff([], $url1, $rev1, $url2, $rev2, 1, 1, 0, $out, $out);
- $out->flush;
- my $ret = (($out->stat)[7] == 0);
- close $out or croak $!;
-
- $ret;
-}
-
-sub get_commit_editor {
- my ($self, $log, $cb, $pool) = @_;
-
- my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef, 0) : ();
- $self->SUPER::get_commit_editor($log, $cb, @lock, $pool);
-}
-
-sub gs_do_update {
- my ($self, $rev_a, $rev_b, $gs, $editor) = @_;
- my $new = ($rev_a == $rev_b);
- my $path = $gs->{path};
-
- if ($new && -e $gs->{index}) {
- unlink $gs->{index} or die
- "Couldn't unlink index: $gs->{index}: $!\n";
- }
- my $pool = SVN::Pool->new;
- $editor->set_path_strip($path);
- my (@pc) = split m#/#, $path;
- my $reporter = $self->do_update($rev_b, (@pc ? shift @pc : ''),
- 1, $editor, $pool);
- my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
-
- # Since we can't rely on svn_ra_reparent being available, we'll
- # just have to do some magic with set_path to make it so
- # we only want a partial path.
- my $sp = '';
- my $final = join('/', @pc);
- while (@pc) {
- $reporter->set_path($sp, $rev_b, 0, @lock, $pool);
- $sp .= '/' if length $sp;
- $sp .= shift @pc;
- }
- die "BUG: '$sp' != '$final'\n" if ($sp ne $final);
-
- $reporter->set_path($sp, $rev_a, $new, @lock, $pool);
-
- $reporter->finish_report($pool);
- $pool->clear;
- $editor->{git_commit_ok};
-}
-
-# this requires SVN 1.4.3 or later (do_switch didn't work before 1.4.3, and
-# svn_ra_reparent didn't work before 1.4)
-sub gs_do_switch {
- my ($self, $rev_a, $rev_b, $gs, $url_b, $editor) = @_;
- my $path = $gs->{path};
- my $pool = SVN::Pool->new;
-
- my $full_url = $self->{url};
- my $old_url = $full_url;
- $full_url .= '/' . $path if length $path;
- my ($ra, $reparented);
-
- if ($old_url =~ m#^svn(\+ssh)?://# ||
- ($full_url =~ m#^https?://# &&
- escape_url($full_url) ne $full_url)) {
- $_[0] = undef;
- $self = undef;
- $RA = undef;
- $ra = Git::SVN::Ra->new($full_url);
- $ra_invalid = 1;
- } elsif ($old_url ne $full_url) {
- SVN::_Ra::svn_ra_reparent($self->{session}, $full_url, $pool);
- $self->{url} = $full_url;
- $reparented = 1;
- }
-
- $ra ||= $self;
- $url_b = escape_url($url_b);
- my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
- my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
- $reporter->set_path('', $rev_a, 0, @lock, $pool);
- $reporter->finish_report($pool);
-
- if ($reparented) {
- SVN::_Ra::svn_ra_reparent($self->{session}, $old_url, $pool);
- $self->{url} = $old_url;
- }
-
- $pool->clear;
- $editor->{git_commit_ok};
-}
-
-sub longest_common_path {
- my ($gsv, $globs) = @_;
- my %common;
- my $common_max = scalar @$gsv;
-
- foreach my $gs (@$gsv) {
- my @tmp = split m#/#, $gs->{path};
- my $p = '';
- foreach (@tmp) {
- $p .= length($p) ? "/$_" : $_;
- $common{$p} ||= 0;
- $common{$p}++;
- }
- }
- $globs ||= [];
- $common_max += scalar @$globs;
- foreach my $glob (@$globs) {
- my @tmp = split m#/#, $glob->{path}->{left};
- my $p = '';
- foreach (@tmp) {
- $p .= length($p) ? "/$_" : $_;
- $common{$p} ||= 0;
- $common{$p}++;
- }
- }
-
- my $longest_path = '';
- foreach (sort {length $b <=> length $a} keys %common) {
- if ($common{$_} == $common_max) {
- $longest_path = $_;
- last;
- }
- }
- $longest_path;
-}
-
-sub gs_fetch_loop_common {
- my ($self, $base, $head, $gsv, $globs) = @_;
- return if ($base > $head);
- my $inc = $_log_window_size;
- my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);
- my $longest_path = longest_common_path($gsv, $globs);
- my $ra_url = $self->{url};
- my $find_trailing_edge;
- while (1) {
- my %revs;
- my $err;
- my $err_handler = $SVN::Error::handler;
- $SVN::Error::handler = sub {
- ($err) = @_;
- skip_unknown_revs($err);
- };
- sub _cb {
- my ($paths, $r, $author, $date, $log) = @_;
- [ $paths,
- { author => $author, date => $date, log => $log } ];
- }
- $self->get_log([$longest_path], $min, $max, 0, 1, 1,
- sub { $revs{$_[1]} = _cb(@_) });
- if ($err) {
- print "Checked through r$max\r";
- } else {
- $find_trailing_edge = 1;
- }
- if ($err and $find_trailing_edge) {
- print STDERR "Path '$longest_path' ",
- "was probably deleted:\n",
- $err->expanded_message,
- "\nWill attempt to follow ",
- "revisions r$min .. r$max ",
- "committed before the deletion\n";
- my $hi = $max;
- while (--$hi >= $min) {
- my $ok;
- $self->get_log([$longest_path], $min, $hi,
- 0, 1, 1, sub {
- $ok = $_[1];
- $revs{$_[1]} = _cb(@_) });
- if ($ok) {
- print STDERR "r$min .. r$ok OK\n";
- last;
- }
- }
- $find_trailing_edge = 0;
- }
- $SVN::Error::handler = $err_handler;
-
- my %exists = map { $_->{path} => $_ } @$gsv;
- foreach my $r (sort {$a <=> $b} keys %revs) {
- my ($paths, $logged) = @{$revs{$r}};
-
- foreach my $gs ($self->match_globs(\%exists, $paths,
- $globs, $r)) {
- if ($gs->rev_map_max >= $r) {
- next;
- }
- next unless $gs->match_paths($paths, $r);
- $gs->{logged_rev_props} = $logged;
- if (my $last_commit = $gs->last_commit) {
- $gs->assert_index_clean($last_commit);
- }
- my $log_entry = $gs->do_fetch($paths, $r);
- if ($log_entry) {
- $gs->do_git_commit($log_entry);
- }
- $INDEX_FILES{$gs->{index}} = 1;
- }
- foreach my $g (@$globs) {
- my $k = "svn-remote.$g->{remote}." .
- "$g->{t}-maxRev";
- Git::SVN::tmp_config($k, $r);
- }
- if ($ra_invalid) {
- $_[0] = undef;
- $self = undef;
- $RA = undef;
- $self = Git::SVN::Ra->new($ra_url);
- $ra_invalid = undef;
- }
- }
- # pre-fill the .rev_db since it'll eventually get filled in
- # with '0' x40 if something new gets committed
- foreach my $gs (@$gsv) {
- next if $gs->rev_map_max >= $max;
- next if defined $gs->rev_map_get($max);
- $gs->rev_map_set($max, 0 x40);
- }
- foreach my $g (@$globs) {
- my $k = "svn-remote.$g->{remote}.$g->{t}-maxRev";
- Git::SVN::tmp_config($k, $max);
- }
- last if $max >= $head;
- $min = $max + 1;
- $max += $inc;
- $max = $head if ($max > $head);
- }
- Git::SVN::gc();
-}
-
-sub get_dir_globbed {
- my ($self, $left, $depth, $r) = @_;
-
- my @x = eval { $self->get_dir($left, $r) };
- return unless scalar @x == 3;
- my $dirents = $x[0];
- my @finalents;
- foreach my $de (keys %$dirents) {
- next if $dirents->{$de}->{kind} != $SVN::Node::dir;
- if ($depth > 1) {
- my @args = ("$left/$de", $depth - 1, $r);
- foreach my $dir ($self->get_dir_globbed(@args)) {
- push @finalents, "$de/$dir";
- }
- } else {
- push @finalents, $de;
- }
- }
- @finalents;
-}
-
-# return value: 0 -- don't ignore, 1 -- ignore
-sub is_ref_ignored {
- my ($g, $p) = @_;
- my $refname = $g->{ref}->full_path($p);
- return 1 if defined($g->{ignore_refs_regex}) &&
- $refname =~ m!$g->{ignore_refs_regex}!;
- return 0 unless defined($_ignore_refs_regex);
- return 1 if $refname =~ m!$_ignore_refs_regex!o;
- return 0;
-}
-
-sub match_globs {
- my ($self, $exists, $paths, $globs, $r) = @_;
-
- sub get_dir_check {
- my ($self, $exists, $g, $r) = @_;
-
- my @dirs = $self->get_dir_globbed($g->{path}->{left},
- $g->{path}->{depth},
- $r);
-
- foreach my $de (@dirs) {
- my $p = $g->{path}->full_path($de);
- next if $exists->{$p};
- next if (length $g->{path}->{right} &&
- ($self->check_path($p, $r) !=
- $SVN::Node::dir));
- next unless $p =~ /$g->{path}->{regex}/;
- $exists->{$p} = Git::SVN->init($self->{url}, $p, undef,
- $g->{ref}->full_path($de), 1);
- }
- }
- foreach my $g (@$globs) {
- if (my $path = $paths->{"/$g->{path}->{left}"}) {
- if ($path->{action} =~ /^[AR]$/) {
- get_dir_check($self, $exists, $g, $r);
- }
- }
- foreach (keys %$paths) {
- if (/$g->{path}->{left_regex}/ &&
- !/$g->{path}->{regex}/) {
- next if $paths->{$_}->{action} !~ /^[AR]$/;
- get_dir_check($self, $exists, $g, $r);
- }
- next unless /$g->{path}->{regex}/;
- my $p = $1;
- my $pathname = $g->{path}->full_path($p);
- next if is_ref_ignored($g, $p);
- next if $exists->{$pathname};
- next if ($self->check_path($pathname, $r) !=
- $SVN::Node::dir);
- $exists->{$pathname} = Git::SVN->init(
- $self->{url}, $pathname, undef,
- $g->{ref}->full_path($p), 1);
- }
- my $c = '';
- foreach (split m#/#, $g->{path}->{left}) {
- $c .= "/$_";
- next unless ($paths->{$c} &&
- ($paths->{$c}->{action} =~ /^[AR]$/));
- get_dir_check($self, $exists, $g, $r);
- }
- }
- values %$exists;
-}
-
-sub minimize_url {
- my ($self) = @_;
- return $self->{url} if ($self->{url} eq $self->{repos_root});
- my $url = $self->{repos_root};
- my @components = split(m!/!, $self->{svn_path});
- my $c = '';
- do {
- $url .= "/$c" if length $c;
- eval {
- my $ra = (ref $self)->new($url);
- my $latest = $ra->get_latest_revnum;
- $ra->get_log("", $latest, 0, 1, 0, 1, sub {});
- };
- } while ($@ && ($c = shift @components));
- $url;
-}
-
-sub can_do_switch {
- my $self = shift;
- unless (defined $can_do_switch) {
- my $pool = SVN::Pool->new;
- my $rep = eval {
- $self->do_switch(1, '', 0, $self->{url},
- SVN::Delta::Editor->new, $pool);
- };
- if ($@) {
- $can_do_switch = 0;
- } else {
- $rep->abort_report($pool);
- $can_do_switch = 1;
- }
- $pool->clear;
- }
- $can_do_switch;
-}
-
-sub skip_unknown_revs {
- my ($err) = @_;
- my $errno = $err->apr_err();
- # Maybe the branch we're tracking didn't
- # exist when the repo started, so it's
- # not an error if it doesn't, just continue
- #
- # Wonderfully consistent library, eh?
- # 160013 - svn:// and file://
- # 175002 - http(s)://
- # 175007 - http(s):// (this repo required authorization, too...)
- # More codes may be discovered later...
- if ($errno == 175007 || $errno == 175002 || $errno == 160013) {
- my $err_key = $err->expanded_message;
- # revision numbers change every time, filter them out
- $err_key =~ s/\d+/\0/g;
- $err_key = "$errno\0$err_key";
- unless ($ignored_err{$err_key}) {
- warn "W: Ignoring error from SVN, path probably ",
- "does not exist: ($errno): ",
- $err->expanded_message,"\n";
- warn "W: Do not be alarmed at the above message ",
- "git-svn is just searching aggressively for ",
- "old history.\n",
- "This may take a while on large repositories\n";
- $ignored_err{$err_key} = 1;
- }
- return;
- }
- die "Error from SVN, ($errno): ", $err->expanded_message,"\n";
-}
-
package Git::SVN::Log;
use strict;
use warnings;
return ret;
}
-const char git_version_string[] = GIT_VERSION;
-
#define RUN_SETUP (1<<0)
#define RUN_SETUP_GENTLY (1<<1)
#define USE_PAGER (1<<2)
#include "common-cmds.h"
#include "string-list.h"
#include "column.h"
+#include "version.h"
void add_cmdname(struct cmdnames *cmds, const char *name, int len)
{
#include "run-command.h"
#include "url.h"
#include "credential.h"
+#include "version.h"
int active_requests;
int http_is_verbose;
curl_easy_setopt(result, CURLOPT_VERBOSE, 1);
curl_easy_setopt(result, CURLOPT_USERAGENT,
- user_agent ? user_agent : GIT_HTTP_USER_AGENT);
+ user_agent ? user_agent : git_user_agent());
if (curl_ftp_no_epsv)
curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
free(changes);
if (o->verbosity >= 4)
- printf("Merge result: %i unmerged notes and a %s notes tree\n",
- conflicts, t->dirty ? "dirty" : "clean");
+ printf(t->dirty ?
+ "Merge result: %i unmerged notes and a dirty notes tree\n" :
+ "Merge result: %i unmerged notes and a clean notes tree\n",
+ conflicts);
return conflicts ? -1 : 1;
}
--- /dev/null
+package Git::SVN::Editor;
+use vars qw/@ISA $_rmdir $_cp_similarity $_find_copies_harder $_rename_limit/;
+use strict;
+use warnings;
+use SVN::Core;
+use SVN::Delta;
+use Carp qw/croak/;
+use IO::File;
+use Git qw/command command_oneline command_noisy command_output_pipe
+ command_input_pipe command_close_pipe
+ command_bidi_pipe command_close_bidi_pipe/;
+BEGIN {
+ @ISA = qw(SVN::Delta::Editor);
+}
+
+sub new {
+ my ($class, $opts) = @_;
+ foreach (qw/svn_path r ra tree_a tree_b log editor_cb/) {
+ die "$_ required!\n" unless (defined $opts->{$_});
+ }
+
+ my $pool = SVN::Pool->new;
+ my $mods = generate_diff($opts->{tree_a}, $opts->{tree_b});
+ my $types = check_diff_paths($opts->{ra}, $opts->{svn_path},
+ $opts->{r}, $mods);
+
+ # $opts->{ra} functions should not be used after this:
+ my @ce = $opts->{ra}->get_commit_editor($opts->{log},
+ $opts->{editor_cb}, $pool);
+ my $self = SVN::Delta::Editor->new(@ce, $pool);
+ bless $self, $class;
+ foreach (qw/svn_path r tree_a tree_b/) {
+ $self->{$_} = $opts->{$_};
+ }
+ $self->{url} = $opts->{ra}->{url};
+ $self->{mods} = $mods;
+ $self->{types} = $types;
+ $self->{pool} = $pool;
+ $self->{bat} = { '' => $self->open_root($self->{r}, $self->{pool}) };
+ $self->{rm} = { };
+ $self->{path_prefix} = length $self->{svn_path} ?
+ "$self->{svn_path}/" : '';
+ $self->{config} = $opts->{config};
+ $self->{mergeinfo} = $opts->{mergeinfo};
+ return $self;
+}
+
+sub generate_diff {
+ my ($tree_a, $tree_b) = @_;
+ my @diff_tree = qw(diff-tree -z -r);
+ if ($_cp_similarity) {
+ push @diff_tree, "-C$_cp_similarity";
+ } else {
+ push @diff_tree, '-C';
+ }
+ push @diff_tree, '--find-copies-harder' if $_find_copies_harder;
+ push @diff_tree, "-l$_rename_limit" if defined $_rename_limit;
+ push @diff_tree, $tree_a, $tree_b;
+ my ($diff_fh, $ctx) = command_output_pipe(@diff_tree);
+ local $/ = "\0";
+ my $state = 'meta';
+ my @mods;
+ while (<$diff_fh>) {
+ chomp $_; # this gets rid of the trailing "\0"
+ if ($state eq 'meta' && /^:(\d{6})\s(\d{6})\s
+ ($::sha1)\s($::sha1)\s
+ ([MTCRAD])\d*$/xo) {
+ push @mods, { mode_a => $1, mode_b => $2,
+ sha1_a => $3, sha1_b => $4,
+ chg => $5 };
+ if ($5 =~ /^(?:C|R)$/) {
+ $state = 'file_a';
+ } else {
+ $state = 'file_b';
+ }
+ } elsif ($state eq 'file_a') {
+ my $x = $mods[$#mods] or croak "Empty array\n";
+ if ($x->{chg} !~ /^(?:C|R)$/) {
+ croak "Error parsing $_, $x->{chg}\n";
+ }
+ $x->{file_a} = $_;
+ $state = 'file_b';
+ } elsif ($state eq 'file_b') {
+ my $x = $mods[$#mods] or croak "Empty array\n";
+ if (exists $x->{file_a} && $x->{chg} !~ /^(?:C|R)$/) {
+ croak "Error parsing $_, $x->{chg}\n";
+ }
+ if (!exists $x->{file_a} && $x->{chg} =~ /^(?:C|R)$/) {
+ croak "Error parsing $_, $x->{chg}\n";
+ }
+ $x->{file_b} = $_;
+ $state = 'meta';
+ } else {
+ croak "Error parsing $_\n";
+ }
+ }
+ command_close_pipe($diff_fh, $ctx);
+ \@mods;
+}
+
+sub check_diff_paths {
+ my ($ra, $pfx, $rev, $mods) = @_;
+ my %types;
+ $pfx .= '/' if length $pfx;
+
+ sub type_diff_paths {
+ my ($ra, $types, $path, $rev) = @_;
+ my @p = split m#/+#, $path;
+ my $c = shift @p;
+ unless (defined $types->{$c}) {
+ $types->{$c} = $ra->check_path($c, $rev);
+ }
+ while (@p) {
+ $c .= '/' . shift @p;
+ next if defined $types->{$c};
+ $types->{$c} = $ra->check_path($c, $rev);
+ }
+ }
+
+ foreach my $m (@$mods) {
+ foreach my $f (qw/file_a file_b/) {
+ next unless defined $m->{$f};
+ my ($dir) = ($m->{$f} =~ m#^(.*?)/?(?:[^/]+)$#);
+ if (length $pfx.$dir && ! defined $types{$dir}) {
+ type_diff_paths($ra, \%types, $pfx.$dir, $rev);
+ }
+ }
+ }
+ \%types;
+}
+
+sub split_path {
+ return ($_[0] =~ m#^(.*?)/?([^/]+)$#);
+}
+
+sub repo_path {
+ my ($self, $path) = @_;
+ if (my $enc = $self->{pathnameencoding}) {
+ require Encode;
+ Encode::from_to($path, $enc, 'UTF-8');
+ }
+ $self->{path_prefix}.(defined $path ? $path : '');
+}
+
+sub url_path {
+ my ($self, $path) = @_;
+ if ($self->{url} =~ m#^https?://#) {
+ $path =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
+ }
+ $self->{url} . '/' . $self->repo_path($path);
+}
+
+sub rmdirs {
+ my ($self) = @_;
+ my $rm = $self->{rm};
+ delete $rm->{''}; # we never delete the url we're tracking
+ return unless %$rm;
+
+ foreach (keys %$rm) {
+ my @d = split m#/#, $_;
+ my $c = shift @d;
+ $rm->{$c} = 1;
+ while (@d) {
+ $c .= '/' . shift @d;
+ $rm->{$c} = 1;
+ }
+ }
+ delete $rm->{$self->{svn_path}};
+ delete $rm->{''}; # we never delete the url we're tracking
+ return unless %$rm;
+
+ my ($fh, $ctx) = command_output_pipe(qw/ls-tree --name-only -r -z/,
+ $self->{tree_b});
+ local $/ = "\0";
+ while (<$fh>) {
+ chomp;
+ my @dn = split m#/#, $_;
+ while (pop @dn) {
+ delete $rm->{join '/', @dn};
+ }
+ unless (%$rm) {
+ close $fh;
+ return;
+ }
+ }
+ command_close_pipe($fh, $ctx);
+
+ my ($r, $p, $bat) = ($self->{r}, $self->{pool}, $self->{bat});
+ foreach my $d (sort { $b =~ tr#/#/# <=> $a =~ tr#/#/# } keys %$rm) {
+ $self->close_directory($bat->{$d}, $p);
+ my ($dn) = ($d =~ m#^(.*?)/?(?:[^/]+)$#);
+ print "\tD+\t$d/\n" unless $::_q;
+ $self->SUPER::delete_entry($d, $r, $bat->{$dn}, $p);
+ delete $bat->{$d};
+ }
+}
+
+sub open_or_add_dir {
+ my ($self, $full_path, $baton, $deletions) = @_;
+ my $t = $self->{types}->{$full_path};
+ if (!defined $t) {
+ die "$full_path not known in r$self->{r} or we have a bug!\n";
+ }
+ {
+ no warnings 'once';
+ # SVN::Node::none and SVN::Node::file are used only once,
+ # so we're shutting up Perl's warnings about them.
+ if ($t == $SVN::Node::none || defined($deletions->{$full_path})) {
+ return $self->add_directory($full_path, $baton,
+ undef, -1, $self->{pool});
+ } elsif ($t == $SVN::Node::dir) {
+ return $self->open_directory($full_path, $baton,
+ $self->{r}, $self->{pool});
+ } # no warnings 'once'
+ print STDERR "$full_path already exists in repository at ",
+ "r$self->{r} and it is not a directory (",
+ ($t == $SVN::Node::file ? 'file' : 'unknown'),"/$t)\n";
+ } # no warnings 'once'
+ exit 1;
+}
+
+sub ensure_path {
+ my ($self, $path, $deletions) = @_;
+ my $bat = $self->{bat};
+ my $repo_path = $self->repo_path($path);
+ return $bat->{''} unless (length $repo_path);
+
+ my @p = split m#/+#, $repo_path;
+ my $c = shift @p;
+ $bat->{$c} ||= $self->open_or_add_dir($c, $bat->{''}, $deletions);
+ while (@p) {
+ my $c0 = $c;
+ $c .= '/' . shift @p;
+ $bat->{$c} ||= $self->open_or_add_dir($c, $bat->{$c0}, $deletions);
+ }
+ return $bat->{$c};
+}
+
+# Subroutine to convert a globbing pattern to a regular expression.
+# From perl cookbook.
+sub glob2pat {
+ my $globstr = shift;
+ my %patmap = ('*' => '.*', '?' => '.', '[' => '[', ']' => ']');
+ $globstr =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
+ return '^' . $globstr . '$';
+}
+
+sub check_autoprop {
+ my ($self, $pattern, $properties, $file, $fbat) = @_;
+ # Convert the globbing pattern to a regular expression.
+ my $regex = glob2pat($pattern);
+ # Check if the pattern matches the file name.
+ if($file =~ m/($regex)/) {
+ # Parse the list of properties to set.
+ my @props = split(/;/, $properties);
+ foreach my $prop (@props) {
+ # Parse 'name=value' syntax and set the property.
+ if ($prop =~ /([^=]+)=(.*)/) {
+ my ($n,$v) = ($1,$2);
+ for ($n, $v) {
+ s/^\s+//; s/\s+$//;
+ }
+ $self->change_file_prop($fbat, $n, $v);
+ }
+ }
+ }
+}
+
+sub apply_autoprops {
+ my ($self, $file, $fbat) = @_;
+ my $conf_t = ${$self->{config}}{'config'};
+ no warnings 'once';
+ # Check [miscellany]/enable-auto-props in svn configuration.
+ if (SVN::_Core::svn_config_get_bool(
+ $conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_MISCELLANY,
+ $SVN::_Core::SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS,
+ 0)) {
+ # Auto-props are enabled. Enumerate them to look for matches.
+ my $callback = sub {
+ $self->check_autoprop($_[0], $_[1], $file, $fbat);
+ };
+ SVN::_Core::svn_config_enumerate(
+ $conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_AUTO_PROPS,
+ $callback);
+ }
+}
+
+sub A {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
+ my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
+ undef, -1);
+ print "\tA\t$m->{file_b}\n" unless $::_q;
+ $self->apply_autoprops($file, $fbat);
+ $self->chg_file($fbat, $m);
+ $self->close_file($fbat,undef,$self->{pool});
+}
+
+sub C {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
+ my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
+ $self->url_path($m->{file_a}), $self->{r});
+ print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
+ $self->chg_file($fbat, $m);
+ $self->close_file($fbat,undef,$self->{pool});
+}
+
+sub delete_entry {
+ my ($self, $path, $pbat) = @_;
+ my $rpath = $self->repo_path($path);
+ my ($dir, $file) = split_path($rpath);
+ $self->{rm}->{$dir} = 1;
+ $self->SUPER::delete_entry($rpath, $self->{r}, $pbat, $self->{pool});
+}
+
+sub R {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
+ my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
+ $self->url_path($m->{file_a}), $self->{r});
+ print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
+ $self->apply_autoprops($file, $fbat);
+ $self->chg_file($fbat, $m);
+ $self->close_file($fbat,undef,$self->{pool});
+
+ ($dir, $file) = split_path($m->{file_a});
+ $pbat = $self->ensure_path($dir, $deletions);
+ $self->delete_entry($m->{file_a}, $pbat);
+}
+
+sub M {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
+ my $fbat = $self->open_file($self->repo_path($m->{file_b}),
+ $pbat,$self->{r},$self->{pool});
+ print "\t$m->{chg}\t$m->{file_b}\n" unless $::_q;
+ $self->chg_file($fbat, $m);
+ $self->close_file($fbat,undef,$self->{pool});
+}
+
+sub T { shift->M(@_) }
+
+sub change_file_prop {
+ my ($self, $fbat, $pname, $pval) = @_;
+ $self->SUPER::change_file_prop($fbat, $pname, $pval, $self->{pool});
+}
+
+sub change_dir_prop {
+ my ($self, $pbat, $pname, $pval) = @_;
+ $self->SUPER::change_dir_prop($pbat, $pname, $pval, $self->{pool});
+}
+
+sub _chg_file_get_blob ($$$$) {
+ my ($self, $fbat, $m, $which) = @_;
+ my $fh = $::_repository->temp_acquire("git_blob_$which");
+ if ($m->{"mode_$which"} =~ /^120/) {
+ print $fh 'link ' or croak $!;
+ $self->change_file_prop($fbat,'svn:special','*');
+ } elsif ($m->{mode_a} =~ /^120/ && $m->{"mode_$which"} !~ /^120/) {
+ $self->change_file_prop($fbat,'svn:special',undef);
+ }
+ my $blob = $m->{"sha1_$which"};
+ return ($fh,) if ($blob =~ /^0{40}$/);
+ my $size = $::_repository->cat_blob($blob, $fh);
+ croak "Failed to read object $blob" if ($size < 0);
+ $fh->flush == 0 or croak $!;
+ seek $fh, 0, 0 or croak $!;
+
+ my $exp = ::md5sum($fh);
+ seek $fh, 0, 0 or croak $!;
+ return ($fh, $exp);
+}
+
+sub chg_file {
+ my ($self, $fbat, $m) = @_;
+ if ($m->{mode_b} =~ /755$/ && $m->{mode_a} !~ /755$/) {
+ $self->change_file_prop($fbat,'svn:executable','*');
+ } elsif ($m->{mode_b} !~ /755$/ && $m->{mode_a} =~ /755$/) {
+ $self->change_file_prop($fbat,'svn:executable',undef);
+ }
+ my ($fh_a, $exp_a) = _chg_file_get_blob $self, $fbat, $m, 'a';
+ my ($fh_b, $exp_b) = _chg_file_get_blob $self, $fbat, $m, 'b';
+ my $pool = SVN::Pool->new;
+ my $atd = $self->apply_textdelta($fbat, $exp_a, $pool);
+ if (-s $fh_a) {
+ my $txstream = SVN::TxDelta::new ($fh_a, $fh_b, $pool);
+ my $res = SVN::TxDelta::send_txstream($txstream, @$atd, $pool);
+ if (defined $res) {
+ die "Unexpected result from send_txstream: $res\n",
+ "(SVN::Core::VERSION: $SVN::Core::VERSION)\n";
+ }
+ } else {
+ my $got = SVN::TxDelta::send_stream($fh_b, @$atd, $pool);
+ die "Checksum mismatch\nexpected: $exp_b\ngot: $got\n"
+ if ($got ne $exp_b);
+ }
+ Git::temp_release($fh_b, 1);
+ Git::temp_release($fh_a, 1);
+ $pool->clear;
+}
+
+sub D {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
+ print "\tD\t$m->{file_b}\n" unless $::_q;
+ $self->delete_entry($m->{file_b}, $pbat);
+}
+
+sub close_edit {
+ my ($self) = @_;
+ my ($p,$bat) = ($self->{pool}, $self->{bat});
+ foreach (sort { $b =~ tr#/#/# <=> $a =~ tr#/#/# } keys %$bat) {
+ next if $_ eq '';
+ $self->close_directory($bat->{$_}, $p);
+ }
+ $self->close_directory($bat->{''}, $p);
+ $self->SUPER::close_edit($p);
+ $p->clear;
+}
+
+sub abort_edit {
+ my ($self) = @_;
+ $self->SUPER::abort_edit($self->{pool});
+}
+
+sub DESTROY {
+ my $self = shift;
+ $self->SUPER::DESTROY(@_);
+ $self->{pool}->clear;
+}
+
+# this drives the editor
+sub apply_diff {
+ my ($self) = @_;
+ my $mods = $self->{mods};
+ my %o = ( D => 0, C => 1, R => 2, A => 3, M => 4, T => 5 );
+ my %deletions;
+
+ foreach my $m (@$mods) {
+ if ($m->{chg} eq "D") {
+ $deletions{$m->{file_b}} = 1;
+ }
+ }
+
+ foreach my $m (sort { $o{$a->{chg}} <=> $o{$b->{chg}} } @$mods) {
+ my $f = $m->{chg};
+ if (defined $o{$f}) {
+ $self->$f($m, \%deletions);
+ } else {
+ fatal("Invalid change type: $f");
+ }
+ }
+
+ if (defined($self->{mergeinfo})) {
+ $self->change_dir_prop($self->{bat}{''}, "svn:mergeinfo",
+ $self->{mergeinfo});
+ }
+ $self->rmdirs if $_rmdir;
+ if (@$mods == 0 && !defined($self->{mergeinfo})) {
+ $self->abort_edit;
+ } else {
+ $self->close_edit;
+ }
+ return scalar @$mods;
+}
+
+1;
+__END__
+
+Git::SVN::Editor - commit driver for "git svn set-tree" and dcommit
+
+=head1 SYNOPSIS
+
+ use Git::SVN::Editor;
+ use Git::SVN::Ra;
+
+ my $ra = Git::SVN::Ra->new($url);
+ my %opts = (
+ r => 19,
+ log => "log message",
+ ra => $ra,
+ config => SVN::Core::config_get_config($svn_config_dir),
+ tree_a => "$commit^",
+ tree_b => "$commit",
+ editor_cb => sub { print "Committed r$_[0]\n"; },
+ mergeinfo => "/branches/foo:1-10",
+ svn_path => "trunk"
+ );
+ Git::SVN::Editor->new(\%opts)->apply_diff or print "No changes\n";
+
+ my $re = Git::SVN::Editor::glob2pat("trunk/*");
+ if ($branchname =~ /$re/) {
+ print "matched!\n";
+ }
+
+=head1 DESCRIPTION
+
+This module is an implementation detail of the "git svn" command.
+Do not use it unless you are developing git-svn.
+
+This module adapts the C<SVN::Delta::Editor> object returned by
+C<SVN::Delta::get_commit_editor> and drives it to convey the
+difference between two git tree objects to a remote Subversion
+repository.
+
+The interface will change as git-svn evolves.
+
+=head1 DEPENDENCIES
+
+Subversion perl bindings,
+the core L<Carp> and L<IO::File> modules,
+and git's L<Git> helper module.
+
+C<Git::SVN::Editor> has not been tested using callers other than
+B<git-svn> itself.
+
+=head1 SEE ALSO
+
+L<SVN::Delta>,
+L<Git::SVN::Fetcher>.
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+=head1 BUGS
+
+None.
=head1 SEE ALSO
-L<SVN::Delta>.
+L<SVN::Delta>,
+L<Git::SVN::Editor>.
=head1 INCOMPATIBILITIES
--- /dev/null
+package Git::SVN::Memoize::YAML;
+use warnings;
+use strict;
+use YAML::Any ();
+
+# based on Memoize::Storable.
+
+sub TIEHASH {
+ my $package = shift;
+ my $filename = shift;
+ my $truehash = (-e $filename) ? YAML::Any::LoadFile($filename) : {};
+ my $self = {FILENAME => $filename, H => $truehash};
+ bless $self => $package;
+}
+
+sub STORE {
+ my $self = shift;
+ $self->{H}{$_[0]} = $_[1];
+}
+
+sub FETCH {
+ my $self = shift;
+ $self->{H}{$_[0]};
+}
+
+sub EXISTS {
+ my $self = shift;
+ exists $self->{H}{$_[0]};
+}
+
+sub DESTROY {
+ my $self = shift;
+ YAML::Any::DumpFile($self->{FILENAME}, $self->{H});
+}
+
+sub SCALAR {
+ my $self = shift;
+ scalar(%{$self->{H}});
+}
+
+sub FIRSTKEY {
+ 'Fake hash from Git::SVN::Memoize::YAML';
+}
+
+sub NEXTKEY {
+ undef;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Git::SVN::Memoize::YAML - store Memoized data in YAML format
+
+=head1 SYNOPSIS
+
+ use Memoize;
+ use Git::SVN::Memoize::YAML;
+
+ tie my %cache => 'Git::SVN::Memoize::YAML', $filename;
+ memoize('slow_function', SCALAR_CACHE => [HASH => \%cache]);
+ slow_function(arguments);
+
+=head1 DESCRIPTION
+
+This module provides a class that can be used to tie a hash to a
+YAML file. The file is read when the hash is initialized and
+rewritten when the hash is destroyed.
+
+The intent is to allow L<Memoize> to back its cache with a file in
+YAML format, just like L<Memoize::Storable> allows L<Memoize> to
+back its cache with a file in Storable format. Unlike the Storable
+format, the YAML format is platform-independent and fairly stable.
+
+Carps on error.
+
+=head1 DIAGNOSTICS
+
+See L<YAML::Any>.
+
+=head1 DEPENDENCIES
+
+L<YAML::Any> from CPAN.
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+=head1 BUGS
+
+The entire cache is read into a Perl hash when loading the file,
+so this is not very scalable.
--- /dev/null
+package Git::SVN::Ra;
+use vars qw/@ISA $config_dir $_ignore_refs_regex $_log_window_size/;
+use strict;
+use warnings;
+use SVN::Client;
+use SVN::Ra;
+BEGIN {
+ @ISA = qw(SVN::Ra);
+}
+
+my ($ra_invalid, $can_do_switch, %ignored_err, $RA);
+
+BEGIN {
+ # enforce temporary pool usage for some simple functions
+ no strict 'refs';
+ for my $f (qw/rev_proplist get_latest_revnum get_uuid get_repos_root
+ get_file/) {
+ my $SUPER = "SUPER::$f";
+ *$f = sub {
+ my $self = shift;
+ my $pool = SVN::Pool->new;
+ my @ret = $self->$SUPER(@_,$pool);
+ $pool->clear;
+ wantarray ? @ret : $ret[0];
+ };
+ }
+}
+
+sub _auth_providers () {
+ my @rv = (
+ SVN::Client::get_simple_provider(),
+ SVN::Client::get_ssl_server_trust_file_provider(),
+ SVN::Client::get_simple_prompt_provider(
+ \&Git::SVN::Prompt::simple, 2),
+ SVN::Client::get_ssl_client_cert_file_provider(),
+ SVN::Client::get_ssl_client_cert_prompt_provider(
+ \&Git::SVN::Prompt::ssl_client_cert, 2),
+ SVN::Client::get_ssl_client_cert_pw_file_provider(),
+ SVN::Client::get_ssl_client_cert_pw_prompt_provider(
+ \&Git::SVN::Prompt::ssl_client_cert_pw, 2),
+ SVN::Client::get_username_provider(),
+ SVN::Client::get_ssl_server_trust_prompt_provider(
+ \&Git::SVN::Prompt::ssl_server_trust),
+ SVN::Client::get_username_prompt_provider(
+ \&Git::SVN::Prompt::username, 2)
+ );
+
+ # earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
+ # this function
+ if (::compare_svn_version('1.6.15') >= 0) {
+ my $config = SVN::Core::config_get_config($config_dir);
+ my ($p, @a);
+ # config_get_config returns all config files from
+ # ~/.subversion, auth_get_platform_specific_client_providers
+ # just wants the config "file".
+ @a = ($config->{'config'}, undef);
+ $p = SVN::Core::auth_get_platform_specific_client_providers(@a);
+ # Insert the return value from
+ # auth_get_platform_specific_providers
+ unshift @rv, @$p;
+ }
+ \@rv;
+}
+
+sub escape_uri_only {
+ my ($uri) = @_;
+ my @tmp;
+ foreach (split m{/}, $uri) {
+ s/([^~\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
+ push @tmp, $_;
+ }
+ join('/', @tmp);
+}
+
+sub escape_url {
+ my ($url) = @_;
+ if ($url =~ m#^(https?)://([^/]+)(.*)$#) {
+ my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
+ $url = "$scheme://$domain$uri";
+ }
+ $url;
+}
+
+sub new {
+ my ($class, $url) = @_;
+ $url =~ s!/+$!!;
+ return $RA if ($RA && $RA->{url} eq $url);
+
+ ::_req_svn();
+
+ SVN::_Core::svn_config_ensure($config_dir, undef);
+ my ($baton, $callbacks) = SVN::Core::auth_open_helper(_auth_providers);
+ my $config = SVN::Core::config_get_config($config_dir);
+ $RA = undef;
+ my $dont_store_passwords = 1;
+ my $conf_t = ${$config}{'config'};
+ {
+ no warnings 'once';
+ # The usage of $SVN::_Core::SVN_CONFIG_* variables
+ # produces warnings that variables are used only once.
+ # I had not found the better way to shut them up, so
+ # the warnings of type 'once' are disabled in this block.
+ if (SVN::_Core::svn_config_get_bool($conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
+ $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,
+ 1) == 0) {
+ SVN::_Core::svn_auth_set_parameter($baton,
+ $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,
+ bless (\$dont_store_passwords, "_p_void"));
+ }
+ if (SVN::_Core::svn_config_get_bool($conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
+ $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,
+ 1) == 0) {
+ $Git::SVN::Prompt::_no_auth_cache = 1;
+ }
+ } # no warnings 'once'
+ my $self = SVN::Ra->new(url => escape_url($url), auth => $baton,
+ config => $config,
+ pool => SVN::Pool->new,
+ auth_provider_callbacks => $callbacks);
+ $self->{url} = $url;
+ $self->{svn_path} = $url;
+ $self->{repos_root} = $self->get_repos_root;
+ $self->{svn_path} =~ s#^\Q$self->{repos_root}\E(/|$)##;
+ $self->{cache} = { check_path => { r => 0, data => {} },
+ get_dir => { r => 0, data => {} } };
+ $RA = bless $self, $class;
+}
+
+sub check_path {
+ my ($self, $path, $r) = @_;
+ my $cache = $self->{cache}->{check_path};
+ if ($r == $cache->{r} && exists $cache->{data}->{$path}) {
+ return $cache->{data}->{$path};
+ }
+ my $pool = SVN::Pool->new;
+ my $t = $self->SUPER::check_path($path, $r, $pool);
+ $pool->clear;
+ if ($r != $cache->{r}) {
+ %{$cache->{data}} = ();
+ $cache->{r} = $r;
+ }
+ $cache->{data}->{$path} = $t;
+}
+
+sub get_dir {
+ my ($self, $dir, $r) = @_;
+ my $cache = $self->{cache}->{get_dir};
+ if ($r == $cache->{r}) {
+ if (my $x = $cache->{data}->{$dir}) {
+ return wantarray ? @$x : $x->[0];
+ }
+ }
+ my $pool = SVN::Pool->new;
+ my ($d, undef, $props) = $self->SUPER::get_dir($dir, $r, $pool);
+ my %dirents = map { $_ => { kind => $d->{$_}->kind } } keys %$d;
+ $pool->clear;
+ if ($r != $cache->{r}) {
+ %{$cache->{data}} = ();
+ $cache->{r} = $r;
+ }
+ $cache->{data}->{$dir} = [ \%dirents, $r, $props ];
+ wantarray ? (\%dirents, $r, $props) : \%dirents;
+}
+
+sub DESTROY {
+ # do not call the real DESTROY since we store ourselves in $RA
+}
+
+# get_log(paths, start, end, limit,
+# discover_changed_paths, strict_node_history, receiver)
+sub get_log {
+ my ($self, @args) = @_;
+ my $pool = SVN::Pool->new;
+
+ # svn_log_changed_path_t objects passed to get_log are likely to be
+ # overwritten even if only the refs are copied to an external variable,
+ # so we should dup the structures in their entirety. Using an
+ # externally passed pool (instead of our temporary and quickly cleared
+ # pool in Git::SVN::Ra) does not help matters at all...
+ my $receiver = pop @args;
+ my $prefix = "/".$self->{svn_path};
+ $prefix =~ s#/+($)##;
+ my $prefix_regex = qr#^\Q$prefix\E#;
+ push(@args, sub {
+ my ($paths) = $_[0];
+ return &$receiver(@_) unless $paths;
+ $_[0] = ();
+ foreach my $p (keys %$paths) {
+ my $i = $paths->{$p};
+ # Make path relative to our url, not repos_root
+ $p =~ s/$prefix_regex//;
+ my %s = map { $_ => $i->$_; }
+ qw/copyfrom_path copyfrom_rev action/;
+ if ($s{'copyfrom_path'}) {
+ $s{'copyfrom_path'} =~ s/$prefix_regex//;
+ }
+ $_[0]{$p} = \%s;
+ }
+ &$receiver(@_);
+ });
+
+
+ # the limit parameter was not supported in SVN 1.1.x, so we
+ # drop it. Therefore, the receiver callback passed to it
+ # is made aware of this limitation by being wrapped if
+ # the limit passed to is being wrapped.
+ if (::compare_svn_version('1.2.0') <= 0) {
+ my $limit = splice(@args, 3, 1);
+ if ($limit > 0) {
+ my $receiver = pop @args;
+ push(@args, sub { &$receiver(@_) if (--$limit >= 0) });
+ }
+ }
+ my $ret = $self->SUPER::get_log(@args, $pool);
+ $pool->clear;
+ $ret;
+}
+
+sub trees_match {
+ my ($self, $url1, $rev1, $url2, $rev2) = @_;
+ my $ctx = SVN::Client->new(auth => _auth_providers);
+ my $out = IO::File->new_tmpfile;
+
+ # older SVN (1.1.x) doesn't take $pool as the last parameter for
+ # $ctx->diff(), so we'll create a default one
+ my $pool = SVN::Pool->new_default_sub;
+
+ $ra_invalid = 1; # this will open a new SVN::Ra connection to $url1
+ $ctx->diff([], $url1, $rev1, $url2, $rev2, 1, 1, 0, $out, $out);
+ $out->flush;
+ my $ret = (($out->stat)[7] == 0);
+ close $out or croak $!;
+
+ $ret;
+}
+
+sub get_commit_editor {
+ my ($self, $log, $cb, $pool) = @_;
+
+ my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef, 0) : ();
+ $self->SUPER::get_commit_editor($log, $cb, @lock, $pool);
+}
+
+sub gs_do_update {
+ my ($self, $rev_a, $rev_b, $gs, $editor) = @_;
+ my $new = ($rev_a == $rev_b);
+ my $path = $gs->{path};
+
+ if ($new && -e $gs->{index}) {
+ unlink $gs->{index} or die
+ "Couldn't unlink index: $gs->{index}: $!\n";
+ }
+ my $pool = SVN::Pool->new;
+ $editor->set_path_strip($path);
+ my (@pc) = split m#/#, $path;
+ my $reporter = $self->do_update($rev_b, (@pc ? shift @pc : ''),
+ 1, $editor, $pool);
+ my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
+
+ # Since we can't rely on svn_ra_reparent being available, we'll
+ # just have to do some magic with set_path to make it so
+ # we only want a partial path.
+ my $sp = '';
+ my $final = join('/', @pc);
+ while (@pc) {
+ $reporter->set_path($sp, $rev_b, 0, @lock, $pool);
+ $sp .= '/' if length $sp;
+ $sp .= shift @pc;
+ }
+ die "BUG: '$sp' != '$final'\n" if ($sp ne $final);
+
+ $reporter->set_path($sp, $rev_a, $new, @lock, $pool);
+
+ $reporter->finish_report($pool);
+ $pool->clear;
+ $editor->{git_commit_ok};
+}
+
+# this requires SVN 1.4.3 or later (do_switch didn't work before 1.4.3, and
+# svn_ra_reparent didn't work before 1.4)
+sub gs_do_switch {
+ my ($self, $rev_a, $rev_b, $gs, $url_b, $editor) = @_;
+ my $path = $gs->{path};
+ my $pool = SVN::Pool->new;
+
+ my $full_url = $self->{url};
+ my $old_url = $full_url;
+ $full_url .= '/' . $path if length $path;
+ my ($ra, $reparented);
+
+ if ($old_url =~ m#^svn(\+ssh)?://# ||
+ ($full_url =~ m#^https?://# &&
+ escape_url($full_url) ne $full_url)) {
+ $_[0] = undef;
+ $self = undef;
+ $RA = undef;
+ $ra = Git::SVN::Ra->new($full_url);
+ $ra_invalid = 1;
+ } elsif ($old_url ne $full_url) {
+ SVN::_Ra::svn_ra_reparent($self->{session}, $full_url, $pool);
+ $self->{url} = $full_url;
+ $reparented = 1;
+ }
+
+ $ra ||= $self;
+ $url_b = escape_url($url_b);
+ my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
+ my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
+ $reporter->set_path('', $rev_a, 0, @lock, $pool);
+ $reporter->finish_report($pool);
+
+ if ($reparented) {
+ SVN::_Ra::svn_ra_reparent($self->{session}, $old_url, $pool);
+ $self->{url} = $old_url;
+ }
+
+ $pool->clear;
+ $editor->{git_commit_ok};
+}
+
+sub longest_common_path {
+ my ($gsv, $globs) = @_;
+ my %common;
+ my $common_max = scalar @$gsv;
+
+ foreach my $gs (@$gsv) {
+ my @tmp = split m#/#, $gs->{path};
+ my $p = '';
+ foreach (@tmp) {
+ $p .= length($p) ? "/$_" : $_;
+ $common{$p} ||= 0;
+ $common{$p}++;
+ }
+ }
+ $globs ||= [];
+ $common_max += scalar @$globs;
+ foreach my $glob (@$globs) {
+ my @tmp = split m#/#, $glob->{path}->{left};
+ my $p = '';
+ foreach (@tmp) {
+ $p .= length($p) ? "/$_" : $_;
+ $common{$p} ||= 0;
+ $common{$p}++;
+ }
+ }
+
+ my $longest_path = '';
+ foreach (sort {length $b <=> length $a} keys %common) {
+ if ($common{$_} == $common_max) {
+ $longest_path = $_;
+ last;
+ }
+ }
+ $longest_path;
+}
+
+sub gs_fetch_loop_common {
+ my ($self, $base, $head, $gsv, $globs) = @_;
+ return if ($base > $head);
+ my $inc = $_log_window_size;
+ my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);
+ my $longest_path = longest_common_path($gsv, $globs);
+ my $ra_url = $self->{url};
+ my $find_trailing_edge;
+ while (1) {
+ my %revs;
+ my $err;
+ my $err_handler = $SVN::Error::handler;
+ $SVN::Error::handler = sub {
+ ($err) = @_;
+ skip_unknown_revs($err);
+ };
+ sub _cb {
+ my ($paths, $r, $author, $date, $log) = @_;
+ [ $paths,
+ { author => $author, date => $date, log => $log } ];
+ }
+ $self->get_log([$longest_path], $min, $max, 0, 1, 1,
+ sub { $revs{$_[1]} = _cb(@_) });
+ if ($err) {
+ print "Checked through r$max\r";
+ } else {
+ $find_trailing_edge = 1;
+ }
+ if ($err and $find_trailing_edge) {
+ print STDERR "Path '$longest_path' ",
+ "was probably deleted:\n",
+ $err->expanded_message,
+ "\nWill attempt to follow ",
+ "revisions r$min .. r$max ",
+ "committed before the deletion\n";
+ my $hi = $max;
+ while (--$hi >= $min) {
+ my $ok;
+ $self->get_log([$longest_path], $min, $hi,
+ 0, 1, 1, sub {
+ $ok = $_[1];
+ $revs{$_[1]} = _cb(@_) });
+ if ($ok) {
+ print STDERR "r$min .. r$ok OK\n";
+ last;
+ }
+ }
+ $find_trailing_edge = 0;
+ }
+ $SVN::Error::handler = $err_handler;
+
+ my %exists = map { $_->{path} => $_ } @$gsv;
+ foreach my $r (sort {$a <=> $b} keys %revs) {
+ my ($paths, $logged) = @{$revs{$r}};
+
+ foreach my $gs ($self->match_globs(\%exists, $paths,
+ $globs, $r)) {
+ if ($gs->rev_map_max >= $r) {
+ next;
+ }
+ next unless $gs->match_paths($paths, $r);
+ $gs->{logged_rev_props} = $logged;
+ if (my $last_commit = $gs->last_commit) {
+ $gs->assert_index_clean($last_commit);
+ }
+ my $log_entry = $gs->do_fetch($paths, $r);
+ if ($log_entry) {
+ $gs->do_git_commit($log_entry);
+ }
+ $Git::SVN::INDEX_FILES{$gs->{index}} = 1;
+ }
+ foreach my $g (@$globs) {
+ my $k = "svn-remote.$g->{remote}." .
+ "$g->{t}-maxRev";
+ Git::SVN::tmp_config($k, $r);
+ }
+ if ($ra_invalid) {
+ $_[0] = undef;
+ $self = undef;
+ $RA = undef;
+ $self = Git::SVN::Ra->new($ra_url);
+ $ra_invalid = undef;
+ }
+ }
+ # pre-fill the .rev_db since it'll eventually get filled in
+ # with '0' x40 if something new gets committed
+ foreach my $gs (@$gsv) {
+ next if $gs->rev_map_max >= $max;
+ next if defined $gs->rev_map_get($max);
+ $gs->rev_map_set($max, 0 x40);
+ }
+ foreach my $g (@$globs) {
+ my $k = "svn-remote.$g->{remote}.$g->{t}-maxRev";
+ Git::SVN::tmp_config($k, $max);
+ }
+ last if $max >= $head;
+ $min = $max + 1;
+ $max += $inc;
+ $max = $head if ($max > $head);
+ }
+ Git::SVN::gc();
+}
+
+sub get_dir_globbed {
+ my ($self, $left, $depth, $r) = @_;
+
+ my @x = eval { $self->get_dir($left, $r) };
+ return unless scalar @x == 3;
+ my $dirents = $x[0];
+ my @finalents;
+ foreach my $de (keys %$dirents) {
+ next if $dirents->{$de}->{kind} != $SVN::Node::dir;
+ if ($depth > 1) {
+ my @args = ("$left/$de", $depth - 1, $r);
+ foreach my $dir ($self->get_dir_globbed(@args)) {
+ push @finalents, "$de/$dir";
+ }
+ } else {
+ push @finalents, $de;
+ }
+ }
+ @finalents;
+}
+
+# return value: 0 -- don't ignore, 1 -- ignore
+sub is_ref_ignored {
+ my ($g, $p) = @_;
+ my $refname = $g->{ref}->full_path($p);
+ return 1 if defined($g->{ignore_refs_regex}) &&
+ $refname =~ m!$g->{ignore_refs_regex}!;
+ return 0 unless defined($_ignore_refs_regex);
+ return 1 if $refname =~ m!$_ignore_refs_regex!o;
+ return 0;
+}
+
+sub match_globs {
+ my ($self, $exists, $paths, $globs, $r) = @_;
+
+ sub get_dir_check {
+ my ($self, $exists, $g, $r) = @_;
+
+ my @dirs = $self->get_dir_globbed($g->{path}->{left},
+ $g->{path}->{depth},
+ $r);
+
+ foreach my $de (@dirs) {
+ my $p = $g->{path}->full_path($de);
+ next if $exists->{$p};
+ next if (length $g->{path}->{right} &&
+ ($self->check_path($p, $r) !=
+ $SVN::Node::dir));
+ next unless $p =~ /$g->{path}->{regex}/;
+ $exists->{$p} = Git::SVN->init($self->{url}, $p, undef,
+ $g->{ref}->full_path($de), 1);
+ }
+ }
+ foreach my $g (@$globs) {
+ if (my $path = $paths->{"/$g->{path}->{left}"}) {
+ if ($path->{action} =~ /^[AR]$/) {
+ get_dir_check($self, $exists, $g, $r);
+ }
+ }
+ foreach (keys %$paths) {
+ if (/$g->{path}->{left_regex}/ &&
+ !/$g->{path}->{regex}/) {
+ next if $paths->{$_}->{action} !~ /^[AR]$/;
+ get_dir_check($self, $exists, $g, $r);
+ }
+ next unless /$g->{path}->{regex}/;
+ my $p = $1;
+ my $pathname = $g->{path}->full_path($p);
+ next if is_ref_ignored($g, $p);
+ next if $exists->{$pathname};
+ next if ($self->check_path($pathname, $r) !=
+ $SVN::Node::dir);
+ $exists->{$pathname} = Git::SVN->init(
+ $self->{url}, $pathname, undef,
+ $g->{ref}->full_path($p), 1);
+ }
+ my $c = '';
+ foreach (split m#/#, $g->{path}->{left}) {
+ $c .= "/$_";
+ next unless ($paths->{$c} &&
+ ($paths->{$c}->{action} =~ /^[AR]$/));
+ get_dir_check($self, $exists, $g, $r);
+ }
+ }
+ values %$exists;
+}
+
+sub minimize_url {
+ my ($self) = @_;
+ return $self->{url} if ($self->{url} eq $self->{repos_root});
+ my $url = $self->{repos_root};
+ my @components = split(m!/!, $self->{svn_path});
+ my $c = '';
+ do {
+ $url .= "/$c" if length $c;
+ eval {
+ my $ra = (ref $self)->new($url);
+ my $latest = $ra->get_latest_revnum;
+ $ra->get_log("", $latest, 0, 1, 0, 1, sub {});
+ };
+ } while ($@ && ($c = shift @components));
+ $url;
+}
+
+sub can_do_switch {
+ my $self = shift;
+ unless (defined $can_do_switch) {
+ my $pool = SVN::Pool->new;
+ my $rep = eval {
+ $self->do_switch(1, '', 0, $self->{url},
+ SVN::Delta::Editor->new, $pool);
+ };
+ if ($@) {
+ $can_do_switch = 0;
+ } else {
+ $rep->abort_report($pool);
+ $can_do_switch = 1;
+ }
+ $pool->clear;
+ }
+ $can_do_switch;
+}
+
+sub skip_unknown_revs {
+ my ($err) = @_;
+ my $errno = $err->apr_err();
+ # Maybe the branch we're tracking didn't
+ # exist when the repo started, so it's
+ # not an error if it doesn't, just continue
+ #
+ # Wonderfully consistent library, eh?
+ # 160013 - svn:// and file://
+ # 175002 - http(s)://
+ # 175007 - http(s):// (this repo required authorization, too...)
+ # More codes may be discovered later...
+ if ($errno == 175007 || $errno == 175002 || $errno == 160013) {
+ my $err_key = $err->expanded_message;
+ # revision numbers change every time, filter them out
+ $err_key =~ s/\d+/\0/g;
+ $err_key = "$errno\0$err_key";
+ unless ($ignored_err{$err_key}) {
+ warn "W: Ignoring error from SVN, path probably ",
+ "does not exist: ($errno): ",
+ $err->expanded_message,"\n";
+ warn "W: Do not be alarmed at the above message ",
+ "git-svn is just searching aggressively for ",
+ "old history.\n",
+ "This may take a while on large repositories\n";
+ $ignored_err{$err_key} = 1;
+ }
+ return;
+ }
+ die "Error from SVN, ($errno): ", $err->expanded_message,"\n";
+}
+
+1;
+__END__
+
+Git::SVN::Ra - Subversion remote access functions for git-svn
+
+=head1 SYNOPSIS
+
+ use Git::SVN::Ra;
+
+ my $ra = Git::SVN::Ra->new($branchurl);
+ my ($dirents, $fetched_revnum, $props) =
+ $ra->get_dir('.', $SVN::Core::INVALID_REVNUM);
+
+=head1 DESCRIPTION
+
+This is a wrapper around the L<SVN::Ra> module for use by B<git-svn>.
+It fills in some default parameters (such as the authentication
+scheme), smooths over incompatibilities between libsvn versions, adds
+caching, and implements some functions specific to B<git-svn>.
+
+Do not use it unless you are developing git-svn. The interface will
+change as git-svn evolves.
+
+=head1 DEPENDENCIES
+
+Subversion perl bindings,
+L<Git::SVN>.
+
+C<Git::SVN::Ra> has not been tested using callers other than
+B<git-svn> itself.
+
+=head1 SEE ALSO
+
+L<SVN::Ra>.
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+=head1 BUGS
+
+None.
# Makefile for perl support modules and routine
#
makfile:=perl.mak
+modules =
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
prefix_SQ = $(subst ','\'',$(prefix))
ifdef NO_PERL_MAKEMAKER
instdir_SQ = $(subst ','\'',$(prefix)/lib)
+
+modules += Git
+modules += Git/I18N
+modules += Git/SVN/Memoize/YAML
+modules += Git/SVN/Fetcher
+modules += Git/SVN/Editor
+modules += Git/SVN/Prompt
+modules += Git/SVN/Ra
+
$(makfile): ../GIT-CFLAGS Makefile
echo all: private-Error.pm Git.pm Git/I18N.pm > $@
- echo ' mkdir -p blib/lib/Git' >> $@
- echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
- echo ' $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
+ echo ' mkdir -p blib/lib/Git/SVN/Memoize' >> $@
+ set -e; \
+ for i in $(modules); \
+ do \
+ echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
+ echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
+ done
echo ' $(RM) blib/lib/Error.pm' >> $@
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
echo install: >> $@
- echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
- echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
- echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
- echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
+ echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git/SVN/Memoize"' >> $@
+ set -e; \
+ for i in $(modules); \
+ do \
+ echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+ echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+ done
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
MAKE_FRAG
}
+# XXX. When editing this list:
+#
+# * Please update perl/Makefile, too.
+# * Don't forget to test with NO_PERL_MAKEMAKER=YesPlease
my %pm = (
'Git.pm' => '$(INST_LIBDIR)/Git.pm',
'Git/I18N.pm' => '$(INST_LIBDIR)/Git/I18N.pm',
+ 'Git/SVN/Memoize/YAML.pm' => '$(INST_LIBDIR)/Git/SVN/Memoize/YAML.pm',
'Git/SVN/Fetcher.pm' => '$(INST_LIBDIR)/Git/SVN/Fetcher.pm',
+ 'Git/SVN/Editor.pm' => '$(INST_LIBDIR)/Git/SVN/Editor.pm',
'Git/SVN/Prompt.pm' => '$(INST_LIBDIR)/Git/SVN/Prompt.pm',
+ 'Git/SVN/Ra.pm' => '$(INST_LIBDIR)/Git/SVN/Ra.pm',
);
# We come with our own bundled Error.pm. It's not in the set of default
Language: it (Italian)
Repository: https://github.com/quizzlo/git-po-it/
-Leader: Marco Paolone <marcopaolone@gmail.com>
+Leader: Marco Paolone <marcopaolone AT gmail.com>
+Members: Stefano Lattarini <stefano.lattarini AT gmail.com>
Language: nl (Dutch)
Repository: https://github.com/vfr-nl/git-po/
msgstr ""
"Project-Id-Version: git 1.7.11\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2012-06-02 07:03+0800\n"
+"POT-Creation-Date: 2012-06-08 10:20+0800\n"
"PO-Revision-Date: 2012-03-28 18:46+0200\n"
"Last-Translator: Ralf Thielow <ralf.thielow@googlemail.com>\n"
"Language-Team: German\n"
msgid "You need to set your committer info first"
msgstr "Du musst zuerst die Informationen des Eintragenden setzen."
+#: git-am.sh:95
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+"Du scheinst seit dem letzten gescheiterten 'am' die Zweigspitze (HEAD)\n"
+"geändert zu haben.\n"
+"Keine Zurücksetzung zu ORIG_HEAD."
+
+#: git-am.sh:105
+#, 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 ""
+"Wenn du das Problem aufgelöst hast, führe \"$cmdline --resolved\" aus.\n"
+"Falls du diesen Patch auslassen möchtest, führe stattdessen "
+"\"$cmdline --skip\" aus.\n"
+"Um den ursprünglichen Zweig wiederherzustellen und die Anwendung der Patches\n"
+"abzubrechen, führe \"$cmdline --abort\" aus."
+
+#: git-am.sh:121
+msgid "Cannot fall back to three-way merge."
+msgstr "Kann nicht zu 3-Wege-Zusammenführung zurückfallen."
+
#: git-am.sh:137
msgid "Repository lacks necessary blobs to fall back on 3-way merge."
msgstr ""
msgstr ""
"Unsaubere Bereitstellung: kann Patches nicht anwenden (unsauber: $files)"
+#: git-am.sh:671
+#, 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 ""
+"Patch ist leer. Wurde er falsch aufgeteilt?\n"
+"Wenn du diesen Patch auslassen möchtest, führe stattdessen "
+"\"$cmdline --skip\" aus.\n"
+"Um den ursprünglichen Zweig wiederherzustellen und die Anwendung der Patches\n"
+"abzubrechen, führe \"$cmdline --abort\" aus."
+
+#: git-am.sh:708
+msgid "Patch does not have a valid e-mail address."
+msgstr "Patch enthält keine gültige eMail-Adresse."
+
#: git-am.sh:755
msgid "cannot be interactive without stdin connected to a terminal."
msgstr ""
"Kann nicht interaktiv sein, ohne dass die Standard-Eingabe mit einem "
"Terminal verbunden ist."
+#: git-am.sh:759
+msgid "Commit Body is:"
+msgstr "Beschreibung der Eintragung 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.
msgid "Applying: $FIRSTLINE"
msgstr "Wende an: $FIRSTLINE"
+#: git-am.sh:823
+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 - hast du vergessen 'git add' zu benutzen?\n"
+"Wenn keine Änderungen mehr zum Bereitstellen vorhanden sind, könnten\n"
+"diese bereits anderweitig eingefügt worden sein; du könntest diesen Patch\n"
+"auslassen."
+
+#: git-am.sh:831
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+"Du hast immer noch nicht zusammengeführte Pfade in der Bereitstellung.\n"
+"Hast du vergessen 'git add' zu benutzen?"
+
#: git-am.sh:847
msgid "No changes -- Patch already applied."
msgstr "Keine Änderungen -- Patches bereits angewendet."
+#: git-am.sh:857
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "Anwendung des Patches fehlgeschlagen bei $msgnum $FIRSTLINE"
+
#: git-am.sh:873
msgid "applying to an empty history"
msgstr "wende zu leerer Historie an"
+#: git-bisect.sh:48
+msgid "You need to start by \"git bisect start\""
+msgstr "Du musst mit \"git bisect start\" beginnen."
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
msgid "'git bisect bad' can take only one argument."
msgstr "'git bisect bad' kann nur ein Argument entgegennehmen."
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:273
+msgid "Warning: bisecting only with a bad commit."
+msgstr "Warnung: halbiere nur mit einer fehlerhaften Version"
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
msgid "Are you sure [Y/n]? "
msgstr "Bist du sicher [Y/n]? "
+#: git-bisect.sh:289
+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 ""
+"Du musst mindestens eine korrekte und eine fehlerhafte Version angeben.\n"
+"(Du kannst dafür \"git bisect bad\" und \"git bisect good\" benutzen.)"
+
+#: git-bisect.sh:292
+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 ""
+"Du musst mit \"git bisect start\" beginnen.\n"
+"Danach musst du mindestens eine korrekte und eine fehlerhafte Version "
+"angeben.\n"
+"(Du kannst dafür \"git bisect bad\" und \"git bisect good\" benutzen.)"
+
+#: git-bisect.sh:347 git-bisect.sh:474
+msgid "We are not bisecting."
+msgstr "Wir sind nicht beim Halbieren."
+
#: git-bisect.sh:354
#, sh-format
msgid "'$invalid' is not a valid commit"
msgid "?? what are you talking about?"
msgstr "?? Was redest du da?"
-#: git-bisect.sh:474
-msgid "We are not bisecting."
-msgstr "Wir sind nicht beim Halbieren."
+#: git-bisect.sh:420
+#, sh-format
+msgid "running $command"
+msgstr "führe $command aus"
+
+#: git-bisect.sh:427
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+"Ausführung der Halbierung fehlgeschlagen:\n"
+"Rückkehrwert $res von '$command' ist < 0 oder >= 128"
+
+#: git-bisect.sh:453
+msgid "bisect run cannot continue any more"
+msgstr "Ausführung der Halbierung kann nicht mehr fortgesetzt werden"
+
+#: git-bisect.sh:459
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+"Ausführung der Halbierung fehlgeschlagen:\n"
+"'bisect_state $state' wurde mit Fehlerwert $res beendet"
+
+#: git-bisect.sh:466
+msgid "bisect run success"
+msgstr "Halbierung erfolgreich ausgeführt"
#: git-pull.sh:21
msgid ""
"Aktualisiere eine ungeborenen Zweig mit Änderungen, die zur Bereitstellung "
"hinzugefügt wurden"
+#. 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:228
+#, 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: Die Anforderung aktualisierte die Spitze des aktuellen Zweiges.\n"
+"Warnung: Spule deinen Arbeitszweig von Version $orig_head vor."
+
#: git-pull.sh:253
msgid "Cannot merge multiple branches into empty head"
msgstr "Kann nicht mehrere Zweige in einen ungeborenen Zweig zusammenführen"
msgid "Cannot record working tree state"
msgstr "Kann Zustand des Arbeitsbaumes nicht aufzeichnen"
+#. 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. E.g. in
+#. English this is:
+#.
+#. $ git stash save --blah-blah 2>&1 | head -n 2
+#. error: unknown option for 'stash save': --blah-blah
+#. To provide a message, use git stash save -- '--blah-blah'
+#: git-stash.sh:202
+#, sh-format
+msgid ""
+"error: unknown option for 'stash save': $option\n"
+" To provide a message, use git stash save -- '$option'"
+msgstr ""
+"Fehler: unbekannte Option für 'stash save': $option\n"
+" Um eine Beschreibung anzugeben, benutze \"git stash save -- "
+"'$option'\""
+
#: git-stash.sh:223
msgid "No local changes to save"
msgstr "Keine lokalen Änderungen zum Speichern"
msgid "Cannot unstage modified files"
msgstr "Kann geänderte Dateien nicht aus der Bereitstellung herausnehmen"
+#: git-stash.sh:474
+msgid "Index was not unstashed."
+msgstr "Bereitstellung wurde nicht ausgelagert."
+
#: git-stash.sh:491
#, sh-format
msgid "Dropped ${REV} ($s)"
msgid "'$sm_path' already exists in the index"
msgstr "'$sm_path' existiert bereits in der Bereitstellung"
+#: git-submodule.sh:270
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$sm_path\n"
+"Use -f if you really want to add it."
+msgstr ""
+"Der folgende Pfad wird durch eine deiner \".gitignore\" Dateien "
+"ignoriert:\n"
+"$sm_path\n"
+"Benutze -f wenn du diesen wirklich hinzufügen möchtest."
+
+#: git-submodule.sh:281
+#, sh-format
+msgid "Adding existing repo at '$sm_path' to the index"
+msgstr "Füge existierendes Projektarchiv in '$sm_path' der Bereitstellung "
+"hinzu."
+
#: git-submodule.sh:283
#, sh-format
msgid "'$sm_path' already exists and is not a valid git repo"
msgstr "Fehler bei Rekursion in Unterprojekt-Pfad '$sm_path'"
#: git-submodule.sh:713
-msgid "--"
-msgstr "--"
+msgid "--cached cannot be used with --files"
+msgstr "--cached kann nicht mit --files benutzt werden"
+
+#. unexpected type
+#: git-submodule.sh:753
+#, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "unerwarteter Modus $mod_dst"
#: git-submodule.sh:771
#, sh-format
msgid "submodule"
msgstr "Unterprojekt"
+#: git-submodule.sh:840
+msgid "# Submodules changed but not updated:"
+msgstr "# Unterprojekte geändert, aber nicht aktualisiert:"
+
+#: git-submodule.sh:842
+msgid "# Submodule changes to be committed:"
+msgstr "# Änderungen in Unterprojekt zum Eintragen:"
+
#: git-submodule.sh:974
#, sh-format
msgid "Synchronizing submodule url for '$name'"
msgstr "Synchronisiere Unterprojekt-URL für '$name'"
+#~ msgid "--"
+#~ msgstr "--"
+
#~ msgid "Could not extract email from committer identity."
#~ msgstr "Konnte E-Mail-Adresse des Einreichers nicht extrahieren."
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2012-06-02 07:03+0800\n"
+"POT-Creation-Date: 2012-06-08 10:20+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "You need to set your committer info first"
msgstr ""
+#: git-am.sh:95
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+
+#: git-am.sh:105
+#, 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:121
+msgid "Cannot fall back to three-way merge."
+msgstr ""
+
#: git-am.sh:137
msgid "Repository lacks necessary blobs to fall back on 3-way merge."
msgstr ""
msgid "Dirty index: cannot apply patches (dirty: $files)"
msgstr ""
+#: git-am.sh:671
+#, 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:708
+msgid "Patch does not have a valid e-mail address."
+msgstr ""
+
#: git-am.sh:755
msgid "cannot be interactive without stdin connected to a terminal."
msgstr ""
+#: git-am.sh:759
+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.
msgid "Applying: $FIRSTLINE"
msgstr ""
+#: git-am.sh:823
+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:831
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+
#: git-am.sh:847
msgid "No changes -- Patch already applied."
msgstr ""
+#: git-am.sh:857
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr ""
+
#: git-am.sh:873
msgid "applying to an empty history"
msgstr ""
+#: git-bisect.sh:48
+msgid "You need to start by \"git bisect start\""
+msgstr ""
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
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:273
+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.
msgid "Are you sure [Y/n]? "
msgstr ""
+#: git-bisect.sh:289
+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:292
+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:347 git-bisect.sh:474
+msgid "We are not bisecting."
+msgstr ""
+
#: git-bisect.sh:354
#, sh-format
msgid "'$invalid' is not a valid commit"
msgid "?? what are you talking about?"
msgstr ""
-#: git-bisect.sh:474
-msgid "We are not bisecting."
+#: git-bisect.sh:420
+#, sh-format
+msgid "running $command"
+msgstr ""
+
+#: git-bisect.sh:427
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+
+#: git-bisect.sh:453
+msgid "bisect run cannot continue any more"
+msgstr ""
+
+#: git-bisect.sh:459
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+
+#: git-bisect.sh:466
+msgid "bisect run success"
msgstr ""
#: git-pull.sh:21
msgid "updating an unborn branch with changes added to the index"
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:228
+#, 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:253
msgid "Cannot merge multiple branches into empty head"
msgstr ""
msgid "Cannot record working tree state"
msgstr ""
+#. 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. E.g. in
+#. English this is:
+#.
+#. $ git stash save --blah-blah 2>&1 | head -n 2
+#. error: unknown option for 'stash save': --blah-blah
+#. To provide a message, use git stash save -- '--blah-blah'
+#: git-stash.sh:202
+#, sh-format
+msgid ""
+"error: unknown option for 'stash save': $option\n"
+" To provide a message, use git stash save -- '$option'"
+msgstr ""
+
#: git-stash.sh:223
msgid "No local changes to save"
msgstr ""
msgid "Cannot unstage modified files"
msgstr ""
+#: git-stash.sh:474
+msgid "Index was not unstashed."
+msgstr ""
+
#: git-stash.sh:491
#, sh-format
msgid "Dropped ${REV} ($s)"
msgid "'$sm_path' already exists in the index"
msgstr ""
+#: git-submodule.sh:270
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$sm_path\n"
+"Use -f if you really want to add it."
+msgstr ""
+
+#: git-submodule.sh:281
+#, sh-format
+msgid "Adding existing repo at '$sm_path' to the index"
+msgstr ""
+
#: git-submodule.sh:283
#, sh-format
msgid "'$sm_path' already exists and is not a valid git repo"
msgstr ""
#: git-submodule.sh:713
-msgid "--"
+msgid "--cached cannot be used with --files"
+msgstr ""
+
+#. unexpected type
+#: git-submodule.sh:753
+#, sh-format
+msgid "unexpected mode $mod_dst"
msgstr ""
#: git-submodule.sh:771
msgid "submodule"
msgstr ""
+#: git-submodule.sh:840
+msgid "# Submodules changed but not updated:"
+msgstr ""
+
+#: git-submodule.sh:842
+msgid "# Submodule changes to be committed:"
+msgstr ""
+
#: git-submodule.sh:974
#, sh-format
msgid "Synchronizing submodule url for '$name'"
# Italian translations for Git.
# Copyright (C) 2012 Marco Paolone <marcopaolone@gmail.com>
# This file is distributed under the same license as the Git package.
-
msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2012-05-21 08:57+0800\n"
-"PO-Revision-Date: 2012-05-29 22:58+0200\n"
+"POT-Creation-Date: 2012-06-08 10:20+0800\n"
+"PO-Revision-Date: 2012-06-14 14:13+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: Italian\n"
"Language: it\n"
msgstr ""
#: bundle.c:63
-#, c-format, fuzzy
+#, c-format
msgid "unrecognized header: %s%s (%d)"
msgstr "header non riconosciuto: %s%s (%d)"
-#: bundle.c:89 builtin/commit.c:697
+#: bundle.c:89 builtin/commit.c:696
#, c-format
msgid "could not open '%s'"
msgstr "non è stato possibile aprire '%s'"
msgid "Repository lacks these prerequisite commits:"
msgstr ""
-#: bundle.c:164 sequencer.c:533 sequencer.c:965 builtin/log.c:289
-#: builtin/log.c:719 builtin/log.c:1335 builtin/log.c:1554 builtin/merge.c:347
+#: bundle.c:164 sequencer.c:550 sequencer.c:982 builtin/log.c:289
+#: builtin/log.c:720 builtin/log.c:1309 builtin/log.c:1528 builtin/merge.c:347
#: builtin/shortlog.c:181
msgid "revision walk setup failed"
msgstr ""
msgid "rev-list died"
msgstr ""
-#: bundle.c:296 builtin/log.c:1231 builtin/shortlog.c:284
+#: bundle.c:296 builtin/log.c:1205 builtin/shortlog.c:284
#, c-format
msgid "unrecognized argument: %s"
msgstr "argomento non riconosciuto: %s"
#: bundle.c:331
#, c-format
msgid "ref '%s' is excluded by the rev-list options"
-msgstr ""
+msgstr "il ref '%s' è escluso dalle opzioni di rev-list"
#: bundle.c:376
msgid "Refusing to create empty bundle."
#: commit.c:48
#, c-format
msgid "could not parse %s"
-msgstr ""
+msgstr "non è stato possibile analizzare %s"
#: commit.c:50
#, c-format
#: compat/obstack.c:406 compat/obstack.c:408
msgid "memory exhausted"
-msgstr ""
+msgstr "memoria esaurita"
#: connected.c:39
msgid "Could not run 'git rev-list'"
-msgstr "Impossibile eseguire 'git-rev-list'"
+msgstr "Non è stato possibile eseguire 'git-rev-list'"
#: connected.c:48
-#, c-format, fuzzy
+#, c-format
msgid "failed write to rev-list: %s"
-msgstr "impossibile salvare nella rev-list: %s"
+msgstr "scrittura nella rev-list non riuscita: %s"
#: connected.c:56
#, c-format
"Found errors in 'diff.dirstat' config variable:\n"
"%s"
msgstr ""
-"Errori trovati nella variabile di configurazione 'diff.dirstat':\n"
+"Trovati errori nella variabile di configurazione 'diff.dirstat':\n"
"%s"
#: diff.c:1400
#, c-format
msgid ", %d insertion(+)"
msgid_plural ", %d insertions(+)"
-msgstr[0] ", %d aggiunta(+)"
-msgstr[1] ", %d aggiunte(+)<"
+msgstr[0] ", %d inserzione(+)"
+msgstr[1] ", %d inserzioni(+)"
#: diff.c:1432
#, c-format
msgid ", %d deletion(-)"
msgid_plural ", %d deletions(-)"
-msgstr[0] ". %d eliminato(-)"
-msgstr[1] ", %d eliminati(-)"
+msgstr[0] ". %d rimozione(-)"
+msgstr[1] ", %d rimozioni(-)"
#: diff.c:3478
-#, c-format, fuzzy
+#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
"%s"
msgstr ""
-"Errore nel parametro dell'opzione --dirstat/-X:\n"
+"Analisi del parametro dell'opzione --dirstat/-X non riuscita:\n"
"%s"
#: gpg-interface.c:59
msgid "could not run gpg."
-msgstr "impossibile eseguire gpg."
+msgstr "non è stato possibile eseguire gpg."
#: gpg-interface.c:71
msgid "gpg did not accept the data"
msgid "gpg failed to sign the data"
msgstr "gpg non è riuscito a firmare i dati"
-#: grep.c:1280
+#: grep.c:1320
#, c-format
msgid "'%s': unable to read %s"
msgstr "'%s': impossibile leggere %s"
-#: grep.c:1297
+#: grep.c:1337
#, c-format
msgid "'%s': %s"
msgstr "'%s': %s"
-#: grep.c:1308
+#: grep.c:1348
#, c-format
msgid "'%s': short read %s"
msgstr ""
#: help.c:214
msgid "git commands available from elsewhere on your $PATH"
-msgstr "i comandi git sono disponibili in un altro percorso nel tuo $PATH"
+msgstr "comandi git disponibili altrove nel tuo $PATH"
#: help.c:270
#, c-format
"able to execute it. Maybe git-%s is broken?"
msgstr ""
"'%s' sembra essere un comando git, ma non è stato\n"
-"possibile eseguirlo. Fore git-%s è corrotto?"
+"possibile eseguirlo. Forse git-%s è corrotto?"
#: help.c:327
msgid "Uh oh. Your system reports no Git commands at all."
-msgstr "Oh oh. Il sistema non riporta alcun comando Git."
+msgstr "Oh oh. Il tuo sistema non riporta alcun comando Git."
#: help.c:349
#, c-format
#: help.c:361
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
-msgstr "git: '%s' non è un comando git. Consultare 'git --help'."
+msgstr "git: '%s' non è un comando git. Vedi 'git --help'."
#: help.c:365
msgid ""
msgid_plural ""
"\n"
"Did you mean one of these?"
-msgstr[0] "\nSi intendeva questo?"
-msgstr[1] "\nSi intendeva uno di questi?"
+msgstr[0] ""
+"\n"
+"Intendevi questo?"
+msgstr[1] ""
+"\n"
+"Intendevi uno di questi?"
#: parse-options.c:493
msgid "..."
msgid " %s"
msgstr " %s"
-#: remote.c:1607
+#: remote.c:1629
#, c-format
msgid "Your branch is ahead of '%s' by %d commit.\n"
msgid_plural "Your branch is ahead of '%s' by %d commits.\n"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Il tuo branch è avanti rispetto a '%s' di %d commit.\n"
+msgstr[1] "Il tuo branch è avanti rispetto a '%s' di %d commit.\n"
-#: remote.c:1613
+#: remote.c:1635
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: remote.c:1621
+#: remote.c:1643
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
#: builtin/merge.c:1088 builtin/merge.c:1098
#, c-format
msgid "Could not open '%s' for writing"
-msgstr "Impossibile aprire '%s' per la scrittura"
+msgstr "Non è stato possibile aprire '%s' per la scrittura"
#: sequencer.c:123 builtin/merge.c:333 builtin/merge.c:868
#: builtin/merge.c:1090 builtin/merge.c:1103
"after resolving the conflicts, mark the corrected paths\n"
"with 'git add <paths>' or 'git rm <paths>'"
msgstr ""
-"dopo aver risolto i conflitti, segnare i percorsi corretti\n"
-"con 'git add <percorso>' o 'git rm <percorso>'"
+"dopo aver risolto i conflitti, segna i path corretti\n"
+"con 'git add <path>' o 'git rm <path>'"
#: sequencer.c:147
msgid ""
"with 'git add <paths>' or 'git rm <paths>'\n"
"and commit the result with 'git commit'"
msgstr ""
-"dopo aver risolto i conflitti, segnare i percorsi corretti\n"
-"con 'git add <percorso>' o 'git rm <percorso>' ed effettuare\n"
+"dopo aver risolto i conflitti, segna i path corretti\n"
+"con 'git add <path>' o 'git rm <path>' ed eseguire\n"
"il commit del risultato con 'git commit'"
-#: sequencer.c:160 sequencer.c:741 sequencer.c:824
+#: sequencer.c:160 sequencer.c:758 sequencer.c:841
#, c-format
msgid "Could not write to %s"
msgstr "Non è stato possibile scrivere su %s"
#: sequencer.c:178
msgid "Your local changes would be overwritten by cherry-pick."
-msgstr "Le modifiche locali verranno sovrascritte da cherry-pick"
+msgstr "Le tue modifiche locali verranno sovrascritte da cherry-pick"
#: sequencer.c:180
msgid "Your local changes would be overwritten by revert."
-msgstr "Le modifiche locali verranno sovrascritte da revert."
+msgstr "Le tue modifiche locali verranno sovrascritte da revert."
#: sequencer.c:183
msgid "Commit your changes or stash them to proceed."
-msgstr "Effettuare il commit delle modifiche o annullarle per procedere."
+msgstr ""
#. TRANSLATORS: %s will be "revert" or "cherry-pick"
#: sequencer.c:233
#, c-format
msgid "%s: Unable to write new index file"
-msgstr "%s: non è stato possibile scrivere il nuovo file indice"
+msgstr "%s: impossibile scrivere il nuovo index file"
#: sequencer.c:261
msgid "Could not resolve HEAD commit\n"
#: sequencer.c:282
msgid "Unable to update cache tree\n"
-msgstr "Impossibile aggiornare la cache dell'albero\n"
+msgstr ""
-#: sequencer.c:323
+#: sequencer.c:324
#, c-format
msgid "Could not parse commit %s\n"
-msgstr ""
+msgstr "Non è stato possibile analizzare il commit %s\n"
-#: sequencer.c:328
+#: sequencer.c:329
#, c-format
msgid "Could not parse parent commit %s\n"
msgstr ""
-#: sequencer.c:358
+#: sequencer.c:395
msgid "Your index file is unmerged."
msgstr ""
-#: sequencer.c:361
+#: sequencer.c:398
msgid "You do not have a valid HEAD"
-msgstr ""
+msgstr "Non hai un HEAD valido"
-#: sequencer.c:376
+#: sequencer.c:413
#, c-format
msgid "Commit %s is a merge but no -m option was given."
-msgstr "Il commit %s è un merge ma non è stata fornita l'opzione -m."
+msgstr "Il commit %s è un merge ma non è stata specificata l'opzione -m."
-#: sequencer.c:384
+#: sequencer.c:421
#, c-format
msgid "Commit %s does not have parent %d"
msgstr ""
-#: sequencer.c:388
+#: sequencer.c:425
#, c-format
msgid "Mainline was specified but commit %s is not a merge."
msgstr ""
#. TRANSLATORS: The first %s will be "revert" or
#. "cherry-pick", the second %s a SHA1
-#: sequencer.c:399
+#: sequencer.c:436
#, c-format
msgid "%s: cannot parse parent commit %s"
msgstr ""
-#: sequencer.c:403
-#, c-format, fuzzy
+#: sequencer.c:440
+#, c-format
msgid "Cannot get commit message for %s"
-msgstr "Non è possibile prelevare il messaggio di commit per %s"
+msgstr "Impossibile ottenere il messaggio di commit per %s"
-#: sequencer.c:491
+#: sequencer.c:524
#, c-format
msgid "could not revert %s... %s"
msgstr "non è stato possibile eseguire il revert di %s... %s"
-#: sequencer.c:492
+#: sequencer.c:525
#, c-format
msgid "could not apply %s... %s"
msgstr "non è stato possibile applicare %s... %s"
-#: sequencer.c:536
+#: sequencer.c:553
msgid "empty commit set passed"
msgstr "è stato passato un set di commit vuoto"
-#: sequencer.c:544
+#: sequencer.c:561
#, c-format
msgid "git %s: failed to read the index"
-msgstr "git %s: lettura dell'indice non riuscita"
+msgstr "git %s: lettura di index non riuscita"
-#: sequencer.c:549
+#: sequencer.c:566
#, c-format
msgid "git %s: failed to refresh the index"
-msgstr "git %s: aggiornamento dell'indice non riuscito"
+msgstr "git %s: aggiornamento di index non riuscito"
-#: sequencer.c:607
+#: sequencer.c:624
#, c-format
msgid "Cannot %s during a %s"
msgstr ""
-#: sequencer.c:629
+#: sequencer.c:646
#, c-format
msgid "Could not parse line %d."
-msgstr ""
+msgstr "Non è stato possibile analizzare la riga %d."
-#: sequencer.c:634
+#: sequencer.c:651
msgid "No commits parsed."
-msgstr ""
+msgstr "Nessun commit analizzato."
-#: sequencer.c:647
+#: sequencer.c:664
#, c-format
msgid "Could not open %s"
msgstr "Non è stato possibile aprire %s"
-#: sequencer.c:651
+#: sequencer.c:668
#, c-format
msgid "Could not read %s."
-msgstr ""
+msgstr "Non è stato possibile leggere %s."
-#: sequencer.c:658
+#: sequencer.c:675
#, c-format
msgid "Unusable instruction sheet: %s"
msgstr ""
-#: sequencer.c:686
+#: sequencer.c:703
#, c-format
msgid "Invalid key: %s"
msgstr "Chiave non valida: %s"
-#: sequencer.c:689
+#: sequencer.c:706
#, c-format
msgid "Invalid value for %s: %s"
msgstr "Valore non valido per %s: %s"
-#: sequencer.c:701
+#: sequencer.c:718
#, c-format
msgid "Malformed options sheet: %s"
msgstr ""
-#: sequencer.c:722
+#: sequencer.c:739
msgid "a cherry-pick or revert is already in progress"
msgstr "è già in corso un'operazione di cherry-pick o di revert"
-#: sequencer.c:723
+#: sequencer.c:740
msgid "try \"git cherry-pick (--continue | --quit | --abort)\""
-msgstr "provare \"git cherry-pick (--continue | --quit | -- abort)\""
+msgstr "prova \"git cherry-pick (--continue | --quit | -- abort)\""
-#: sequencer.c:727
+#: sequencer.c:744
#, c-format
msgid "Could not create sequencer directory %s"
msgstr ""
-#: sequencer.c:743 sequencer.c:828
+#: sequencer.c:760 sequencer.c:845
#, c-format
msgid "Error wrapping up %s."
msgstr ""
-#: sequencer.c:762 sequencer.c:896
+#: sequencer.c:779 sequencer.c:913
msgid "no cherry-pick or revert in progress"
msgstr "nessuna operazione di cherry-pick o revert in corso"
-#: sequencer.c:764
+#: sequencer.c:781
msgid "cannot resolve HEAD"
-msgstr "non è possibile risolvere HEAD"
+msgstr "impossibile risolvere HEAD"
-#: sequencer.c:766
+#: sequencer.c:783
msgid "cannot abort from a branch yet to be born"
msgstr ""
-#: sequencer.c:788 builtin/apply.c:3689
+#: sequencer.c:805 builtin/apply.c:3697
#, c-format
msgid "cannot open %s: %s"
-msgstr "non è possibile aprire %s: %s"
+msgstr "impossibile aprire %s: %s"
-#: sequencer.c:791
+#: sequencer.c:808
#, c-format
msgid "cannot read %s: %s"
-msgstr "non è possibile leggere %s: %s"
+msgstr "impossibile leggere %s: %s"
-#: sequencer.c:792
+#: sequencer.c:809
msgid "unexpected end of file"
msgstr "fine del file inattesa"
-#: sequencer.c:798
+#: sequencer.c:815
#, c-format
msgid "stored pre-cherry-pick HEAD file '%s' is corrupt"
msgstr ""
-#: sequencer.c:821
+#: sequencer.c:838
#, c-format
msgid "Could not format %s."
msgstr ""
-#: sequencer.c:983
+#: sequencer.c:1000
msgid "Can't revert as initial commit"
-msgstr ""
+msgstr "Impossibile eseguire il revert come commit iniziale"
-#: sequencer.c:984
+#: sequencer.c:1001
msgid "Can't cherry-pick into empty head"
msgstr ""
#: sha1_name.c:864
msgid "HEAD does not point to a branch"
-msgstr "HEAD non punta ad un ramo"
+msgstr "HEAD non punta ad un branch"
#: sha1_name.c:867
#, c-format
msgid "No such branch: '%s'"
-msgstr "Nessun ramo esistente: '%s'"
+msgstr "Nessun branch esistente: '%s'"
#: sha1_name.c:869
#, c-format
msgid "Upstream branch '%s' not stored as a remote-tracking branch"
msgstr ""
+#: wrapper.c:413
+#, c-format
+msgid "unable to look up current user in the passwd file: %s"
+msgstr "impossibile trovare l'utente corrente nel file passwd: %s"
+
+#: wrapper.c:414
+msgid "no such user"
+msgstr "utente non esistente"
+
#: wt-status.c:135
msgid "Unmerged paths:"
msgstr ""
#: wt-status.c:141 wt-status.c:158
#, c-format
msgid " (use \"git reset %s <file>...\" to unstage)"
-msgstr " (usare \"git reset %s <file>...\" per rimuoverlo dallo stage)"
+msgstr ""
#: wt-status.c:143 wt-status.c:160
msgid " (use \"git rm --cached <file>...\" to unstage)"
-msgstr " (usare \"git rm --cached <file>...\" per rimuoverlo dallo stage)"
+msgstr ""
#: wt-status.c:144
msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)"
-msgstr ""
+msgstr " (usa \"git add/rm <file>...\" come appropriato per la risoluzione)"
#: wt-status.c:152
msgid "Changes to be committed:"
-msgstr "Modifiche di cui effettuare il commit:"
+msgstr ""
#: wt-status.c:170
msgid "Changes not staged for commit:"
-msgstr "Modifiche non pronte per il commit:"
+msgstr ""
#: wt-status.c:174
msgid " (use \"git add <file>...\" to update what will be committed)"
#: wt-status.c:253
msgid "untracked content, "
-msgstr "contenuto non tracciato, "
+msgstr ""
#: wt-status.c:267
#, c-format
#: wt-status.c:737
msgid "On branch "
-msgstr "Sul ramo "
+msgstr "Sul branch "
#: wt-status.c:744
msgid "Not currently on any branch."
-msgstr "Al momento non si è su alcun ramo."
+msgstr ""
#: wt-status.c:755
msgid "Initial commit"
#: wt-status.c:769
msgid "Untracked"
-msgstr "Non tracciato"
+msgstr ""
#: wt-status.c:771
msgid "Ignored"
#: wt-status.c:775
msgid " (use -u option to show untracked files)"
-msgstr " (usare l'opzione -u per visualizzare i file non tracciati)"
+msgstr ""
#: wt-status.c:781
msgid "No changes"
#: wt-status.c:787
msgid " (use \"git add\" and/or \"git commit -a\")"
-msgstr " (usare \"git add\" e/o \"git commit -a\")"
+msgstr " (usa \"git add\" e/o \"git commit -a\")"
#: wt-status.c:789
#, c-format
#: wt-status.c:791
msgid " (use \"git add\" to track)"
-msgstr " (usare \"git add\" per tracciare)"
+msgstr ""
#: wt-status.c:793 wt-status.c:796 wt-status.c:799
#, c-format
#: wt-status.c:794
msgid " (create/copy files and use \"git add\" to track)"
-msgstr " (crea/copia file e usa \"git add\" per tracciarli)"
+msgstr ""
#: wt-status.c:797
msgid " (use -u to show untracked files)"
-msgstr " (usare -u per mostrare i file non tracciati)"
+msgstr ""
#: wt-status.c:800
msgid " (working directory clean)"
-msgstr " (cartella di lavoro pulita)"
+msgstr ""
#: wt-status.c:908
msgid "HEAD (no branch)"
-msgstr "HEAD (nessun ramo)"
+msgstr "HEAD (nessun branch)"
#: wt-status.c:914
msgid "Initial commit on "
#: wt-status.c:929
msgid "behind "
-msgstr ""
+msgstr "indietro "
#: wt-status.c:932 wt-status.c:935
msgid "ahead "
-msgstr ""
+msgstr "avanti "
#: wt-status.c:937
msgid ", behind "
-msgstr ""
+msgstr ", indietro "
#: builtin/add.c:62
-#, c-format, fuzzy
+#, c-format
msgid "unexpected diff status %c"
msgstr "status diff %c inatteso"
#: builtin/add.c:176
#, c-format
msgid "Path '%s' is in submodule '%.*s'"
-msgstr ""
+msgstr "Il path '%s' è nel sottomodulo '%.*s'"
#: builtin/add.c:192
msgid "Unstaged changes after refreshing the index:"
#: builtin/add.c:276
msgid "Could not read the index"
-msgstr "Impossibile leggere l'indice"
+msgstr "Non è stato possibile leggere index"
#: builtin/add.c:286
#, c-format
msgid "Could not open '%s' for writing."
-msgstr "Impossibile aprire '%s' per la scrittura."
+msgstr "Non è stato possibile aprire '%s' per la scrittura."
#: builtin/add.c:290
msgid "Could not write patch"
#: builtin/add.c:295
#, c-format
msgid "Could not stat '%s'"
-msgstr ""
+msgstr "Non è stato possibile eseguire lo stat di '%s'"
#: builtin/add.c:297
msgid "Empty patch. Aborted."
-msgstr "Patch vuota. Operazione terminata."
+msgstr "Patch vuota. Operazione interrotta."
#: builtin/add.c:303
#, c-format
msgid "Could not apply '%s'"
-msgstr "Impossibile applicare '%s'"
+msgstr "Non è stato possibile applicare '%s'"
#: builtin/add.c:312
msgid "The following paths are ignored by one of your .gitignore files:\n"
-msgstr "I seguenti percorsi sono stati ignorati da uno o più file .gitignore:\n"
+msgstr "I seguenti path sono stati ignorati da uno o più dei tuoi file .gitignore:\n"
#: builtin/add.c:352
#, c-format
msgid "Use -f if you really want to add them.\n"
-msgstr "Usare -f se si desidera davvero aggiungerli.\n"
+msgstr "Usa -f se vuoi davvero aggiungerli.\n"
#: builtin/add.c:353
msgid "no files added"
#: builtin/add.c:393
msgid "Option --ignore-missing can only be used together with --dry-run"
-msgstr "L'opzione --ignore-missing può essere usata solo in combinazione con --dry-run"
+msgstr "L'opzione --ignore-missing può essere usata solo con --dry-run"
#: builtin/add.c:413
#, c-format
msgid "Nothing specified, nothing added.\n"
-msgstr "Non è stato specificato nulla, non è stato aggiunto nulla.\n"
+msgstr ""
#: builtin/add.c:414
#, c-format
msgid "Maybe you wanted to say 'git add .'?\n"
-msgstr "Forse si intendeva dire 'git add .'?\n"
+msgstr "Forse intendevi dire 'git add .'?\n"
#: builtin/add.c:420 builtin/clean.c:95 builtin/commit.c:286 builtin/mv.c:82
#: builtin/rm.c:162
msgid "index file corrupt"
-msgstr "indice del file corrotto"
+msgstr "index file corrotto"
-#: builtin/add.c:476 builtin/apply.c:4100 builtin/mv.c:229 builtin/rm.c:260
+#: builtin/add.c:476 builtin/apply.c:4108 builtin/mv.c:229 builtin/rm.c:260
msgid "Unable to write new index file"
-msgstr "Impossibile scrivere il nuovo file di indice"
+msgstr "Impossibile scrivere il nuovo index file"
#: builtin/apply.c:53
msgid "git apply [options] [<patch>...]"
#: builtin/apply.c:824
#, c-format
msgid "regexec returned %d for input: %s"
-msgstr ""
+msgstr "regexec ha restituito %d per l'input: %s"
#: builtin/apply.c:905
#, c-format
msgid "unable to find filename in patch at line %d"
-msgstr "non è possibile trovare il nome del file nella patch alla riga %d"
+msgstr "impossibile trovare il nome del file nella patch alla riga %d"
#: builtin/apply.c:937
#, c-format
#: builtin/apply.c:941
#, c-format
msgid "git apply: bad git-diff - inconsistent new filename on line %d"
-msgstr "git apply: git-diff errato - nuovo nome del file incosistente alla riga %d"
+msgstr "git apply: git-diff errato - nuovo nome del file inconsistente alla riga %d"
#: builtin/apply.c:942
#, c-format
#: builtin/apply.c:1656
#, c-format
msgid "corrupt patch at line %d"
-msgstr "patch corrotta alla riga %d"
+msgstr ""
#: builtin/apply.c:1692
#, c-format
#: builtin/apply.c:1958
#, c-format
msgid "patch with only garbage at line %d"
-msgstr "patch con sola spazzatura alla riga %d"
+msgstr ""
#: builtin/apply.c:2048
#, c-format
msgstr "dati della patch binaria mancanti per '%s'"
#: builtin/apply.c:2903
-#, c-format, fuzzy
+#, c-format
msgid "binary patch does not apply to '%s'"
msgstr "la patch binaria non può essere applicata a '%s'"
#: builtin/apply.c:2930
#, c-format
msgid "patch failed: %s:%ld"
-msgstr "patch non riuscito: %s:%ld"
+msgstr "patch non riuscita: %s:%ld"
#: builtin/apply.c:3045
#, c-format
#: builtin/apply.c:3105
#, c-format
msgid "%s: already exists in working directory"
-msgstr "%s: esiste già nella cartella di lavoro"
+msgstr "%s: esiste già nella directory di lavoro"
#: builtin/apply.c:3143
#, c-format
msgid "%s: has been deleted/renamed"
-msgstr "%s: è stato eliminato/rinominato"
+msgstr "%s: è stata eliminata/rinominata"
#: builtin/apply.c:3148 builtin/apply.c:3179
#, c-format
#: builtin/apply.c:3159
#, c-format
msgid "%s: does not exist in index"
-msgstr "%s: non esiste nell'indice"
+msgstr "%s: non esiste in index"
#: builtin/apply.c:3173
#, c-format
msgid "%s: does not match index"
-msgstr "%s: non corrisponde all'indice"
+msgstr "%s: non corrisponde a index"
#: builtin/apply.c:3190
#, c-format
#: builtin/apply.c:3247
#, c-format
msgid "%s: already exists in index"
-msgstr "%s: esiste già nell'indice"
+msgstr "%s: esiste già in index"
-#: builtin/apply.c:3266
+#: builtin/apply.c:3267
#, c-format
-msgid "new mode (%o) of %s does not match old mode (%o)%s%s"
-msgstr "la nuova modalità (%o) di %s non corrisponde alla modalità precedente (%o)%s%s"
+msgid "new mode (%o) of %s does not match old mode (%o)"
+msgstr ""
#: builtin/apply.c:3272
#, c-format
+msgid "new mode (%o) of %s does not match old mode (%o) of %s"
+msgstr ""
+
+#: builtin/apply.c:3280
+#, c-format
msgid "%s: patch does not apply"
msgstr "%s: la patch non può essere applicata"
-#: builtin/apply.c:3285
+#: builtin/apply.c:3293
#, c-format
msgid "Checking patch %s..."
-msgstr "Verifica della patch %s..."
+msgstr "Controllo della patch %s..."
-#: builtin/apply.c:3340 builtin/checkout.c:212 builtin/reset.c:158
+#: builtin/apply.c:3348 builtin/checkout.c:212 builtin/reset.c:158
#, c-format
msgid "make_cache_entry failed for path '%s'"
-msgstr "make_cache_entry non riuscito per il percorso '%s'"
+msgstr "make_cache_entry non riuscito per il path '%s'"
-#: builtin/apply.c:3483
+#: builtin/apply.c:3491
#, c-format
msgid "unable to remove %s from index"
-msgstr "impossibile rimuovere %s dall'indice"
+msgstr "impossibile rimuovere %s da index"
-#: builtin/apply.c:3510
+#: builtin/apply.c:3518
#, c-format
msgid "corrupt patch for subproject %s"
-msgstr ""
+msgstr "patch corrotta per il sottoprogetto %s"
-#: builtin/apply.c:3514
+#: builtin/apply.c:3522
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr "impossibile eseguire lo stat del file appena creato '%s'"
-#: builtin/apply.c:3519
+#: builtin/apply.c:3527
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr ""
-#: builtin/apply.c:3522
+#: builtin/apply.c:3530
#, c-format
msgid "unable to add cache entry for %s"
msgstr "impossibile aggiungere la voce della cache per %s"
-#: builtin/apply.c:3555
+#: builtin/apply.c:3563
#, c-format
msgid "closing file '%s'"
msgstr "chiusura del file '%s'"
-#: builtin/apply.c:3604
+#: builtin/apply.c:3612
#, c-format
msgid "unable to write file '%s' mode %o"
-msgstr "non è possibile scrivere il file '%s' in modalità %o"
+msgstr "impossibile scrivere il file '%s' in modalità %o"
-#: builtin/apply.c:3660
+#: builtin/apply.c:3668
#, c-format
msgid "Applied patch %s cleanly."
-msgstr ""
+msgstr "Patch %s applicata correttamente."
-#: builtin/apply.c:3668
+#: builtin/apply.c:3676
msgid "internal error"
msgstr "errore interno"
#. Say this even without --verbose
-#: builtin/apply.c:3671
+#: builtin/apply.c:3679
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:3681
+#: builtin/apply.c:3689
#, c-format
msgid "truncating .rej filename to %.*s.rej"
msgstr ""
-#: builtin/apply.c:3702
+#: builtin/apply.c:3710
#, c-format
msgid "Hunk #%d applied cleanly."
-msgstr ""
+msgstr "Frammento #%d applicato correttamente."
-#: builtin/apply.c:3705
+#: builtin/apply.c:3713
#, c-format
msgid "Rejected hunk #%d."
-msgstr ""
+msgstr "Frammento #%d respinto."
-#: builtin/apply.c:3836
+#: builtin/apply.c:3844
msgid "unrecognized input"
msgstr "input non riconosciuto"
-#: builtin/apply.c:3847
+#: builtin/apply.c:3855
msgid "unable to read index file"
-msgstr "impossibile leggere il file dell'indice"
+msgstr "impossibile leggere index file"
-#: builtin/apply.c:3962 builtin/apply.c:3965
+#: builtin/apply.c:3970 builtin/apply.c:3973
msgid "path"
-msgstr "percorso"
+msgstr "path"
-#: builtin/apply.c:3963
+#: builtin/apply.c:3971
msgid "don't apply changes matching the given path"
-msgstr ""
+msgstr "non applica le modifiche corrispondenti al path specificato"
-#: builtin/apply.c:3966
+#: builtin/apply.c:3974
msgid "apply changes matching the given path"
-msgstr ""
+msgstr "applica le modifiche corrispondenti al path specificato"
-#: builtin/apply.c:3968
+#: builtin/apply.c:3976
msgid "num"
msgstr "num"
-#: builtin/apply.c:3969
+#: builtin/apply.c:3977
msgid "remove <num> leading slashes from traditional diff paths"
msgstr ""
-#: builtin/apply.c:3972
+#: builtin/apply.c:3980
msgid "ignore additions made by the patch"
-msgstr ""
+msgstr "ignora le aggiunte create dalla patch"
-#: builtin/apply.c:3974
+#: builtin/apply.c:3982
msgid "instead of applying the patch, output diffstat for the input"
msgstr "invece di applicare la patch, mostra l'output di diffstat per l'input"
-#: builtin/apply.c:3978
+#: builtin/apply.c:3986
msgid "shows number of added and deleted lines in decimal notation"
msgstr "mostra il numero di righe aggiunte e eliminate in notazione decimale"
-#: builtin/apply.c:3980
+#: builtin/apply.c:3988
msgid "instead of applying the patch, output a summary for the input"
msgstr "invece di applicare la patch, mostra un riassunto per l'input"
-#: builtin/apply.c:3982
+#: builtin/apply.c:3990
msgid "instead of applying the patch, see if the patch is applicable"
msgstr "invece di applicare la patch, verifica se può essere applicata"
-#: builtin/apply.c:3984
+#: builtin/apply.c:3992
msgid "make sure the patch is applicable to the current index"
-msgstr "assicura che la patch sia applicabile all'indice corrente"
+msgstr "assicura che la patch sia applicabile all'attuale index"
-#: builtin/apply.c:3986
+#: builtin/apply.c:3994
msgid "apply a patch without touching the working tree"
-msgstr "applica una patch senza modificare l'albero di lavoro"
+msgstr ""
-#: builtin/apply.c:3988
+#: builtin/apply.c:3996
msgid "also apply the patch (use with --stat/--summary/--check)"
-msgstr "applica anche la patch (usare con --stat/--summary/--check)"
+msgstr "applica anche la patch (da usare con --stat/--summary/--check)"
-#: builtin/apply.c:3990
+#: builtin/apply.c:3998
msgid "build a temporary index based on embedded index information"
-msgstr "crea un indice temporaneo basato sulle informazioni incorporate dell'indice"
+msgstr ""
-#: builtin/apply.c:3992
+#: builtin/apply.c:4000
msgid "paths are separated with NUL character"
-msgstr "i percorsi sono separati con un carattere NUL"
+msgstr "i path sono separati con un carattere NUL"
-#: builtin/apply.c:3995
+#: builtin/apply.c:4003
msgid "ensure at least <n> lines of context match"
msgstr "assicura almeno <n> righe di contesto corrispondente"
-#: builtin/apply.c:3996
+#: builtin/apply.c:4004
msgid "action"
msgstr "azione"
-#: builtin/apply.c:3997
+#: builtin/apply.c:4005
msgid "detect new or modified lines that have whitespace errors"
msgstr "rileva righe nuove o modificate che hanno errori di spazi bianchi"
-#: builtin/apply.c:4000 builtin/apply.c:4003
+#: builtin/apply.c:4008 builtin/apply.c:4011
msgid "ignore changes in whitespace when finding context"
msgstr ""
-#: builtin/apply.c:4006
+#: builtin/apply.c:4014
msgid "apply the patch in reverse"
msgstr "applica la patch in maniera inversa"
-#: builtin/apply.c:4008
+#: builtin/apply.c:4016
msgid "don't expect at least one line of context"
msgstr ""
-#: builtin/apply.c:4010
+#: builtin/apply.c:4018
msgid "leave the rejected hunks in corresponding *.rej files"
-msgstr ""
+msgstr "lascia i frammenti respinti nei file .rej corrispondenti"
-#: builtin/apply.c:4012
+#: builtin/apply.c:4020
msgid "allow overlapping hunks"
-msgstr ""
+msgstr "consente la sovrapposizione dei frammenti"
-#: builtin/apply.c:4013
+#: builtin/apply.c:4021
msgid "be verbose"
msgstr "dettagliato"
-#: builtin/apply.c:4015
+#: builtin/apply.c:4023
msgid "tolerate incorrectly detected missing new-line at the end of file"
msgstr ""
-#: builtin/apply.c:4018
+#: builtin/apply.c:4026
msgid "do not trust the line counts in the hunk headers"
msgstr ""
-#: builtin/apply.c:4020
+#: builtin/apply.c:4028
msgid "root"
msgstr "radice"
-#: builtin/apply.c:4021
+#: builtin/apply.c:4029
msgid "prepend <root> to all filenames"
msgstr "antepone <root> a tutti i nomi file"
-#: builtin/apply.c:4042
+#: builtin/apply.c:4050
msgid "--index outside a repository"
-msgstr "--index al di fuori di un deposito"
+msgstr "--index al di fuori di un repository"
-#: builtin/apply.c:4045
+#: builtin/apply.c:4053
msgid "--cached outside a repository"
-msgstr "--cached al di fuori di un deposito"
+msgstr "--cached al di fuori di un repository"
-#: builtin/apply.c:4061
+#: builtin/apply.c:4069
#, c-format
msgid "can't open patch '%s'"
msgstr "impossibile aprire la patch '%s'"
-#: builtin/apply.c:4075
+#: builtin/apply.c:4083
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
msgstr[0] ""
msgstr[1] ""
-#: builtin/apply.c:4081 builtin/apply.c:4091
+#: builtin/apply.c:4089 builtin/apply.c:4099
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "%d riga aggiunge errori di spazi bianchi."
+msgstr[1] "%d righe aggiungono errori di spazi bianchi."
#: builtin/archive.c:17
#, c-format
msgid "could not create archive file '%s'"
-msgstr "impossibile creare il file dell'archivio '%s'"
+msgstr "non è stato possibile creare il file del repository '%s'"
#: builtin/archive.c:20
msgid "could not redirect output"
-msgstr "impossibile redirigere l'output"
+msgstr "non è stato possibile redirigere l'output"
#: builtin/archive.c:37
msgid "git archive: Remote with no URL"
-msgstr "git archive: Remote non ha una URL"
+msgstr "git archive: Remote non ha un URL"
#: builtin/archive.c:58
msgid "git archive: expected ACK/NAK, got EOF"
#: builtin/archive.c:71
msgid "git archive: expected a flush"
-msgstr ""
+msgstr "git archive: atteso un flush"
#: builtin/branch.c:144
#, c-format
#: builtin/branch.c:202
#, c-format
msgid "remote branch '%s' not found."
-msgstr "il ramo remoto '%s' non è stato trovato."
+msgstr "il branch remoto '%s' non è stato trovato."
#: builtin/branch.c:203
#, c-format
msgid "branch '%s' not found."
-msgstr "ramo '%s' non trovato."
+msgstr "branch '%s' non trovato."
#: builtin/branch.c:210
#, c-format
#: builtin/branch.c:225
#, c-format
msgid "Error deleting remote branch '%s'"
-msgstr "Errore nella rimozione del ramo remoto '%s'"
+msgstr "Errore nella rimozione del branch remoto '%s'"
#: builtin/branch.c:226
#, c-format
msgid "Error deleting branch '%s'"
-msgstr "Errore nella rimozione del ramo '%s'"
+msgstr "Errore nella rimozione del branch '%s'"
#: builtin/branch.c:233
#, c-format
#: builtin/branch.c:337
#, c-format
msgid "branch '%s' does not point at a commit"
-msgstr "il ramo '%s' non punta ad un commit"
+msgstr "il branch '%s' non punta ad un commit"
#: builtin/branch.c:409
#, c-format
#: builtin/branch.c:535
msgid "(no branch)"
-msgstr "(nessun ramo)"
+msgstr "(nessun branch)"
#: builtin/branch.c:600
msgid "some refs could not be read"
#: builtin/branch.c:623
#, c-format
msgid "Invalid branch name: '%s'"
-msgstr "Nome del ramo non valido: '%s'"
+msgstr "Nome del branch non valido: '%s'"
#: builtin/branch.c:638
msgid "Branch rename failed"
#: builtin/branch.c:653
msgid "Branch is renamed, but update of config-file failed"
-msgstr "Il ramo è stato rinominato, ma l'aggiornamento del file di configurazione è fallito"
+msgstr ""
+"Il branch è stato rinominato, ma l'aggiornamento del file di configurazione "
+"è fallito"
#: builtin/branch.c:668
#, c-format
msgid "malformed object name %s"
-msgstr "nome dell'oggetto %s non corretto"
+msgstr "nome dell'oggetto %s errato"
#: builtin/branch.c:692
#, c-format
#: builtin/branch.c:857
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
-msgstr "le opzioni -a e -r per 'git branch' non hanno senso con il nome di un ramo"
+msgstr ""
+"le opzioni -a e -r per 'git branch' non hanno senso con il nome di un branch"
#: builtin/bundle.c:47
#, c-format
#: builtin/checkout.c:113 builtin/checkout.c:146
#, c-format
msgid "path '%s' does not have our version"
-msgstr "il percorso '%s' non ha la nostra versione"
+msgstr "il path '%s' non ha la nostra versione"
#: builtin/checkout.c:115 builtin/checkout.c:148
#, c-format
msgid "path '%s' does not have their version"
-msgstr "il percorso '%s' non ha la loro versione"
+msgstr "il path '%s' non ha la loro versione"
#: builtin/checkout.c:131
#, c-format
#: builtin/checkout.c:175
#, c-format
msgid "path '%s' does not have necessary versions"
-msgstr "il percorso '%s' non ha le versioni necessarie"
+msgstr "il path '%s' non ha le versioni necessarie"
#: builtin/checkout.c:192
#, c-format
#: builtin/checkout.c:234 builtin/checkout.c:392
msgid "corrupt index file"
-msgstr "file indice corrotto"
+msgstr "file index corrotto"
#: builtin/checkout.c:264 builtin/checkout.c:271
#, c-format
#: builtin/checkout.c:302 builtin/checkout.c:498 builtin/clone.c:583
#: builtin/merge.c:812
msgid "unable to write new index file"
-msgstr "impossibile scrivere il nuovo file di indice"
+msgstr "impossibile scrivere il nuovo file index"
#: builtin/checkout.c:319 builtin/diff.c:302 builtin/merge.c:408
msgid "diff_setup_done failed"
#: builtin/checkout.c:414
msgid "you need to resolve your current index first"
-msgstr "è necessario risolvere prima l'indice corrente"
+msgstr "è necessario risolvere prima l'attuale index"
#: builtin/checkout.c:533
#, c-format
#: builtin/checkout.c:573
#, c-format
msgid "Reset branch '%s'\n"
-msgstr "Ripristina il ramo '%s'\n"
+msgstr "Ripristina il branch '%s'\n"
#: builtin/checkout.c:576
#, c-format
#: builtin/checkout.c:584
#, c-format
msgid "Switched to branch '%s'\n"
-msgstr "Si è passati al ramo '%s'\n"
+msgstr "Si è passati al branch '%s'\n"
#: builtin/checkout.c:640
#, c-format
" git branch new_branch_name %s\n"
"\n"
msgstr ""
-"Se si desidera mantenerle creando un nuovo ramo, questo potrebbe essere\n"
+"Se si vuole mantenerle creando un nuovo branch, questo potrebbe essere\n"
"un buon momento per farlo con:\n"
"\n"
-" git branch nuovo_nome_ramo %s\n"
+" git branch nuovo_nome_branch %s\n"
"\n"
#: builtin/checkout.c:694
#: builtin/checkout.c:894
#, c-format
msgid "reference is not a tree: %s"
-msgstr "il riferimento non è un albero: %s"
+msgstr ""
#: builtin/checkout.c:974
msgid "-B cannot be used with -b"
#: builtin/checkout.c:983
msgid "--patch is incompatible with all other options"
-msgstr "--patch è incompatibile con tutte le altre opzioni"
+msgstr "--patch non è compatibile con tutte le altre opzioni"
#: builtin/checkout.c:986
msgid "--detach cannot be used with -b/-B/--orphan"
-msgstr "--detach non può essere usato con -b/-B/--orphan"
+msgstr "--detach non può essere usata con -b/-B/--orphan"
#: builtin/checkout.c:988
msgid "--detach cannot be used with -t"
-msgstr "--detach non può essere usato con -t"
+msgstr "--detach non può essere usata con -t"
#: builtin/checkout.c:994
msgid "--track needs a branch name"
-msgstr "--track necessita del nome di un ramo"
+msgstr "--track necessita del nome di un branch"
#: builtin/checkout.c:1001
msgid "Missing branch name; try -b"
-msgstr "Nome del ramo mancante; provare con -b"
+msgstr "Nome del branch mancante; prova con -b"
#: builtin/checkout.c:1007
msgid "--orphan and -b|-B are mutually exclusive"
#: builtin/checkout.c:1009
msgid "--orphan cannot be used with -t"
-msgstr "--orphan non può essere usato con -t"
+msgstr "--orphan non può essere usata con -t"
#: builtin/checkout.c:1019
msgid "git checkout: -f and -m are incompatible"
#: builtin/checkout.c:1068
msgid "git checkout: --detach does not take a path argument"
-msgstr ""
+msgstr "git checkout: --detach non prende un path come argomento"
#: builtin/checkout.c:1071
msgid ""
#: builtin/checkout.c:1093
msgid "--ours/--theirs is incompatible with switching branches."
-msgstr ""
+msgstr "--ours/--theirs non sono compatibili con il passaggio ai branch."
#: builtin/clean.c:78
msgid "-x and -X cannot be used together"
msgid ""
"clean.requireForce set to true and neither -n nor -f given; refusing to clean"
msgstr ""
+"clean.requireForce è impostato a vero, ma né -n né -f sono state specificate; "
+"clean interrotto"
#: builtin/clean.c:85
msgid ""
"clean.requireForce defaults to true and neither -n nor -f given; refusing to "
"clean"
msgstr ""
+"clean.requireForce è vero per default, ma né -n né -f sono state specificate; "
+"clean interrotto"
#: builtin/clean.c:155 builtin/clean.c:176
#, c-format
#: builtin/clone.c:243
#, c-format
msgid "reference repository '%s' is not a local directory."
-msgstr "l'archivio di riferimento '%s' non è una cartella locale."
+msgstr "il repository di riferimento '%s' non è una directory locale."
#: builtin/clone.c:302
#, c-format
#: builtin/clone.c:306
#, c-format
msgid "failed to create directory '%s'"
-msgstr "creazione della cartella '%s' non riuscita"
+msgstr "creazione della directory '%s' non riuscita"
#: builtin/clone.c:308 builtin/diff.c:75
#, c-format
#: builtin/clone.c:310
#, c-format
msgid "%s exists and is not a directory"
-msgstr "%s esiste e non è una cartella"
+msgstr "%s esiste e non è una directory"
#: builtin/clone.c:324
#, c-format
msgstr "stat di %s non riuscito\n"
#: builtin/clone.c:341
-#, c-format, fuzzy
+#, c-format
msgid "failed to unlink '%s'"
msgstr "rimozione del link '%s' non riuscita"
#: builtin/clone.c:440
#, c-format
msgid "Could not find remote branch %s to clone."
-msgstr "Impossibile trovare il ramo remoto %s da clonare."
+msgstr "Non è stato possibile trovare il branch remoto %s da clonare."
#: builtin/clone.c:549
-#, fuzzy
msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
msgstr ""
-"l'HEAD remoto si riferisce ad un ref inesistente, impossibile eseguire il\n"
+"l'HEAD remoto si riferisce ad un ref inesistente, impossibile eseguire il "
"checkout.\n"
#: builtin/clone.c:639
#: builtin/clone.c:643
msgid "You must specify a repository to clone."
-msgstr "È necessario specificare un archivio da clonare."
+msgstr "Devi specificare un repository da clonare."
#: builtin/clone.c:654
#, c-format
#: builtin/clone.c:668
#, c-format
msgid "repository '%s' does not exist"
-msgstr "l'archivio '%s' non esiste"
+msgstr "il repository '%s' non esiste"
#: builtin/clone.c:673
msgid "--depth is ignored in local clones; use file:// instead."
-msgstr "--depth è ingnorato nei cloni locali; usare file:// invece."
+msgstr ""
#: builtin/clone.c:683
#, c-format
msgid "destination path '%s' already exists and is not an empty directory."
-msgstr "il percorso di destinazione '%s' esiste già e non è una cartella vuota."
+msgstr ""
+"il path di destinazione '%s' esiste già e non è una directory vuota."
#: builtin/clone.c:693
#, c-format
msgid "working tree '%s' already exists."
-msgstr "l'albero di lavoro '%s' esiste già."
+msgstr ""
#: builtin/clone.c:706 builtin/clone.c:720
#, c-format
#: builtin/clone.c:728
#, c-format
msgid "Cloning into bare repository '%s'...\n"
-msgstr ""
+msgstr "Clone nel repository spoglio '%s'...\n"
#: builtin/clone.c:730
#, c-format
#: builtin/clone.c:835
#, c-format
msgid "Remote branch %s not found in upstream %s"
-msgstr "Il ramo remoto %s non è stato trovato in upstream %s"
+msgstr "Il branch remoto %s non è stato trovato in upstream %s"
#: builtin/clone.c:842
msgid "You appear to have cloned an empty repository."
-msgstr "Sembra che sia stato clonato un archivio vuoto."
+msgstr "Sembra che tu abbia clonato un repository vuoto."
#: builtin/column.c:51
msgid "--command must be the first argument"
"\n"
" git commit --amend --reset-author\n"
msgstr ""
-"Il nome e l'indirizzo email sono stati configurati automaticamente usando\n"
-"il nome utente ed il nome host. Per favore, verificare che siano esatti.\n"
+"Il tuo nome e l'indirizzo email sono stati configurati automaticamente usando\n"
+"il tuo nome utente ed il nome host. Per favore, verifica che siano esatti.\n"
"È possibile eliminare questo messaggio impostandoli esplicitamente:\n"
"\n"
" git config --global user.name \"Tuo Nome\"\n"
" git config --global user.email tu@esempio.com\n"
"\n"
-"Dopo questa operazione, per ripristinare l'identità usata in questo commit:\n"
+"Dopo questa operazione, puoi ripristinare l'identità usata in questo commit con:\n"
"\n"
" git commit --amend --reset-author\n"
#: builtin/commit.c:301
msgid "interactive add failed"
-msgstr ""
+msgstr "add interattivo non riuscito"
#: builtin/commit.c:334 builtin/commit.c:355 builtin/commit.c:405
msgid "unable to write new_index file"
-msgstr "non è possibile scrivere il file new_index"
+msgstr "impossibile scrivere il file new_index"
#: builtin/commit.c:386
msgid "cannot do a partial commit during a merge."
-msgstr "non è possibile eseguire un commit parziale durante un merge."
+msgstr "impossibile eseguire un commit parziale durante un merge."
#: builtin/commit.c:388
msgid "cannot do a partial commit during a cherry-pick."
-msgstr "non è possibile eseguire un commit parziale durante un cherry-pick."
+msgstr "impossibile eseguire un commit parziale durante un cherry-pick."
#: builtin/commit.c:398
msgid "cannot read the index"
-msgstr "non è possibile leggere l'indice"
+msgstr "impossibile leggere index"
#: builtin/commit.c:418
msgid "unable to write temporary index file"
-msgstr "scrittura del file di indice temporaneo non riuscita"
+msgstr ""
#: builtin/commit.c:493 builtin/commit.c:499
#, c-format
#: builtin/commit.c:522
msgid "malformed --author parameter"
-msgstr "parametro --author non corretto"
+msgstr "parametro --author malformato"
-#: builtin/commit.c:583
+#: builtin/commit.c:582
#, c-format
msgid "Malformed ident string: '%s'"
msgstr ""
-#: builtin/commit.c:621 builtin/commit.c:654 builtin/commit.c:968
+#: builtin/commit.c:620 builtin/commit.c:653 builtin/commit.c:967
#, c-format
msgid "could not lookup commit %s"
-msgstr ""
+msgstr "non è stato possibile trovare il commit %s"
-#: builtin/commit.c:633 builtin/shortlog.c:296
+#: builtin/commit.c:632 builtin/shortlog.c:296
#, c-format
msgid "(reading log message from standard input)\n"
msgstr "(lettura del messaggio di log dallo standard input)\n"
-#: builtin/commit.c:635
+#: builtin/commit.c:634
msgid "could not read log from standard input"
-msgstr "impossibile leggere il log dallo standard input"
+msgstr "non è stato possibile leggere il log dallo standard input"
-#: builtin/commit.c:639
+#: builtin/commit.c:638
#, c-format
msgid "could not read log file '%s'"
-msgstr "impossibile leggere il file di log '%s'"
+msgstr "non è stato possibile leggere il file di log '%s'"
-#: builtin/commit.c:645
+#: builtin/commit.c:644
msgid "commit has empty message"
msgstr "il commit ha un messaggio vuoto"
-#: builtin/commit.c:661
+#: builtin/commit.c:660
msgid "could not read MERGE_MSG"
-msgstr "impossibile leggere MERGE_MSG"
+msgstr "non è stato possibile leggere MERGE_MSG"
-#: builtin/commit.c:665
+#: builtin/commit.c:664
msgid "could not read SQUASH_MSG"
-msgstr "impossibile leggere SQUASH_MSG"
+msgstr "non è stato possibile leggere SQUASH_MSG"
-#: builtin/commit.c:669
+#: builtin/commit.c:668
#, c-format
msgid "could not read '%s'"
-msgstr "impossibile leggere '%s'"
+msgstr "non è stato possibile leggere '%s'"
-#: builtin/commit.c:721
+#: builtin/commit.c:720
msgid "could not write commit template"
msgstr "non è stato possibile scrivere il modello di commit"
-#: builtin/commit.c:732
+#: builtin/commit.c:731
#, c-format
msgid ""
"\n"
msgstr ""
"\n"
"Sembra che si stia eseguendo il commit di un merge.\n"
-"Se l'operazione non è corretta, per favore eliminare il file\n"
+"Se l'operazione non è corretta, per favore elimina il file\n"
"\t%s\n"
-"e riprovare.\n"
+"e riprova.\n"
-#: builtin/commit.c:737
+#: builtin/commit.c:736
#, c-format
msgid ""
"\n"
"\t%s\n"
"and try again.\n"
msgstr ""
+"\n"
+"Sembra che si stia eseguendo il commit di un cherry-pick.\n"
+"Se l'operazione non è corretta, per favore rimuovi il file\n"
+"\t%s\n"
+"e riprova.\n"
-#: builtin/commit.c:749
-#, fuzzy
+#: builtin/commit.c:748
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '#' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
-"Per favore, inserire il messaggio di commit per le modifiche effettuate.\n"
-"Le righe che iniziano con '#' verranno ignorate, ed un messaggio vuoto\n"
-"annulla il commit.\n"
+"Per favore inserisci il messaggio di commit per le modifiche. Le righe\n"
+"che iniziano con '#' verranno ignorate, e un messaggio vuoto annulla il commit.\n"
-#: builtin/commit.c:754
-#, fuzzy
+#: builtin/commit.c:753
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '#' will be kept; you may remove them yourself if you want to.\n"
"An empty message aborts the commit.\n"
msgstr ""
-"Per favore, inserire il messaggio di commit per le modifiche effettuate.\n"
-"Le righe che iniziano con '#' verranno mantenute; possono essere rimosse\n"
-"manualmente se si vuole. Un messaggio vuoto annulla il commit.\n"
+"Per favore inserisci il messaggio di commit per le modifiche. Le\n"
+"righe che iniziano con '#' verranno mantenute; possono comunque essere\n"
+"rimosse manualmente. Un messaggio vuoto annulla il commit.\n"
-#: builtin/commit.c:767
+#: builtin/commit.c:766
#, c-format
msgid "%sAuthor: %s"
msgstr "%sAutore: %s"
-#: builtin/commit.c:774
+#: builtin/commit.c:773
#, c-format
msgid "%sCommitter: %s"
msgstr "%sCommitter: %s"
-#: builtin/commit.c:794
+#: builtin/commit.c:793
msgid "Cannot read index"
-msgstr "Impossibile leggere l'indice"
+msgstr "Impossibile leggere index"
-#: builtin/commit.c:831
+#: builtin/commit.c:830
msgid "Error building trees"
-msgstr "Errore nella creazione degli alberi"
+msgstr ""
-#: builtin/commit.c:846 builtin/tag.c:361
+#: builtin/commit.c:845 builtin/tag.c:361
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
-msgstr "Per favore, fornire il messaggio usando l'opzione -m o -F.\n"
+msgstr "Per favore, specifica il messaggio usando l'opzione -m o -F.\n"
-#: builtin/commit.c:943
+#: builtin/commit.c:942
#, c-format
msgid "No existing author found with '%s'"
msgstr "Nessun autore esistente trovato con '%s'"
-#: builtin/commit.c:958 builtin/commit.c:1158
+#: builtin/commit.c:957 builtin/commit.c:1157
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr ""
-#: builtin/commit.c:998
+#: builtin/commit.c:997
msgid "Using both --reset-author and --author does not make sense"
msgstr "L'uso di entrambe le opzioni --reset-author e --author non ha senso"
-#: builtin/commit.c:1009
+#: builtin/commit.c:1008
msgid "You have nothing to amend."
-msgstr "Non c'è nulla da riparare."
+msgstr ""
-#: builtin/commit.c:1012
+#: builtin/commit.c:1011
msgid "You are in the middle of a merge -- cannot amend."
-msgstr "Si è nel mezzo di un merge -- non è possibile riparare."
+msgstr ""
-#: builtin/commit.c:1014
+#: builtin/commit.c:1013
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr ""
-#: builtin/commit.c:1017
+#: builtin/commit.c:1016
msgid "Options --squash and --fixup cannot be used together"
msgstr "Le opzioni --squash e --fixup non possono essere usate insieme"
-#: builtin/commit.c:1027
+#: builtin/commit.c:1026
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "Solo una delle opzioni -c/-C/-F/--fixup può essere usata."
-#: builtin/commit.c:1029
+#: builtin/commit.c:1028
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "L'opzione -m non può essere combinata con -c/-C/-F/--fixup."
-#: builtin/commit.c:1037
+#: builtin/commit.c:1036
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr "L'opzione --reset-author può essere usata solo con -C, -c o --amend."
-#: builtin/commit.c:1054
+#: builtin/commit.c:1053
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
-msgstr "Può essere usata solo una delle opzioni --include/--only/--all/--interactive/--patch ."
+msgstr ""
+"Può essere usata solo una delle opzioni --include/--only/--all/--"
+"interactive/--patch ."
-#: builtin/commit.c:1056
+#: builtin/commit.c:1055
msgid "No paths with --include/--only does not make sense."
-msgstr ""
+msgstr "Devi specificare un path se usi --include/--only."
-#: builtin/commit.c:1058
-#, fuzzy
+#: builtin/commit.c:1057
msgid "Clever... amending the last one with dirty index."
-msgstr "Furbo... riparare l'ultimo con un indice errato."
+msgstr ""
-#: builtin/commit.c:1060
+#: builtin/commit.c:1059
msgid "Explicit paths specified without -i nor -o; assuming --only paths..."
msgstr ""
-#: builtin/commit.c:1070 builtin/tag.c:577
+#: builtin/commit.c:1069 builtin/tag.c:577
#, c-format
msgid "Invalid cleanup mode %s"
msgstr ""
-#: builtin/commit.c:1075
+#: builtin/commit.c:1074
msgid "Paths with -a does not make sense."
-msgstr ""
+msgstr "I path con -a non hanno senso."
-#: builtin/commit.c:1258
+#: builtin/commit.c:1257
msgid "couldn't look up newly created commit"
-msgstr ""
+msgstr "non è stato possibile trovare il commit appena creato"
-#: builtin/commit.c:1260
+#: builtin/commit.c:1259
msgid "could not parse newly created commit"
-msgstr ""
+msgstr "non è stato possibile analizzare il commit appena creato"
-#: builtin/commit.c:1301
+#: builtin/commit.c:1300
msgid "detached HEAD"
msgstr ""
-#: builtin/commit.c:1303
+#: builtin/commit.c:1302
msgid " (root-commit)"
-msgstr ""
+msgstr " (root-commit)"
-#: builtin/commit.c:1447
+#: builtin/commit.c:1446
msgid "could not parse HEAD commit"
-msgstr ""
+msgstr "non è stato possibile analizzare il commit HEAD"
-#: builtin/commit.c:1485 builtin/merge.c:509
+#: builtin/commit.c:1484 builtin/merge.c:509
#, c-format
msgid "could not open '%s' for reading"
msgstr "non è stato possibile aprire '%s' per la lettura"
-#: builtin/commit.c:1492
+#: builtin/commit.c:1491
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "File MERGE_HEAD corrotto (%s)"
-#: builtin/commit.c:1499
+#: builtin/commit.c:1498
msgid "could not read MERGE_MODE"
msgstr "non è stato possibile leggere MERGE_MODE"
-#: builtin/commit.c:1518
+#: builtin/commit.c:1517
#, c-format
msgid "could not read commit message: %s"
msgstr "non è stato possibile leggere il messaggio di commit: %s"
-#: builtin/commit.c:1532
+#: builtin/commit.c:1531
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
-msgstr "Commit annullato; il messaggio non è stato modificato.\n"
+msgstr "Commit interrotto; il messaggio non è stato modificato.\n"
-#: builtin/commit.c:1537
+#: builtin/commit.c:1536
#, c-format
msgid "Aborting commit due to empty commit message.\n"
-msgstr "Annullamento del commit a causa di un messaggio di commit vuoto.\n"
+msgstr "Interruzione del commit a causa di un messaggio di commit vuoto.\n"
-#: builtin/commit.c:1552 builtin/merge.c:936 builtin/merge.c:961
+#: builtin/commit.c:1551 builtin/merge.c:936 builtin/merge.c:961
msgid "failed to write commit object"
msgstr "scrittura dell'oggetto di commit non riuscita"
-#: builtin/commit.c:1573
+#: builtin/commit.c:1572
msgid "cannot lock HEAD ref"
msgstr ""
-#: builtin/commit.c:1577
+#: builtin/commit.c:1576
msgid "cannot update HEAD ref"
msgstr ""
-#: builtin/commit.c:1588
+#: builtin/commit.c:1587
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 ""
-"L'archivio è stato aggiornato, ma non è stato possibile scrivere il file\n"
-"new_index. Verificare che l'unità disco non sia piena o che la quota non sia\n"
-"stata superata, ed eseguire \"git reset HEAD\"ccc per il ripristino."
+"Il repository è stato aggiornato, ma non è stato possibile scrivere il file\n"
+"new_index. Verifica che l'unità disco non sia piena o che la quota non sia\n"
+"stata superata, ed esegui \"git reset HEAD\" per il ripristino."
#: builtin/describe.c:234
#, c-format
#: builtin/describe.c:240
#, c-format
msgid "tag '%s' is really '%s' here"
-msgstr ""
+msgstr "il tag '%s' è davvero '%s' qui"
#: builtin/describe.c:267
-#, c-format, fuzzy
+#, c-format
msgid "Not a valid object name %s"
msgstr "Non è il nome di un oggetto valido %s"
msgstr "%s non è un oggetto '%s' valido"
#: builtin/describe.c:287
-#, c-format, fuzzy
+#, c-format
msgid "no tag exactly matches '%s'"
msgstr "nessun tag corrisponde esattamente a '%s'"
"Try --always, or create some tags."
msgstr ""
"Nessun tag può descrivere '%s'.\n"
-"Provare con --always, o creare dei tag."
+"Prova con --always, o crea dei tag."
#: builtin/describe.c:378
#, c-format
#: builtin/diff.c:297
msgid "Not a git repository"
-msgstr "Non è un archivio git"
+msgstr "Non è un repository git"
#: builtin/diff.c:347
#, c-format
msgid "invalid object '%s' given."
-msgstr ""
+msgstr "oggetto non valido '%s' specificato."
#: builtin/diff.c:352
#, c-format
#: builtin/diff.c:362
#, c-format
msgid "more than two blobs given: '%s'"
-msgstr ""
+msgstr "più di due blob specificati: '%s'"
#: builtin/diff.c:370
#, c-format
msgid "unhandled object '%s' given."
-msgstr ""
+msgstr "oggetto non gestito '%s' specificato."
#: builtin/fetch.c:200
msgid "Couldn't find remote ref HEAD"
#: builtin/fetch.c:285
msgid "[tag update]"
-msgstr ""
+msgstr "[tag aggiornata]"
#: builtin/fetch.c:287 builtin/fetch.c:322 builtin/fetch.c:340
msgid " (unable to update local ref)"
-msgstr ""
+msgstr " (impossibile aggiornare il ref locale)"
#: builtin/fetch.c:305
-#, fuzzy
msgid "[new tag]"
msgstr "[nuova tag]"
#: builtin/fetch.c:308
msgid "[new branch]"
-msgstr "[nuovo ramo]"
+msgstr "[nuovo branch]"
#: builtin/fetch.c:311
msgid "[new ref]"
-msgstr ""
+msgstr "[nuovo ref]"
#: builtin/fetch.c:356
msgid "unable to update local ref"
-msgstr ""
+msgstr "impossibile aggiornare il ref locale"
#: builtin/fetch.c:356
msgid "forced update"
-msgstr ""
+msgstr "aggiornamento forzato"
#: builtin/fetch.c:362
msgid "(non-fast-forward)"
"some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
+"non è stato possibile aggiornare alcuni ref locali; prova con\n"
+" 'git remote prune %s' per rimuovere ogni branch che vada in conflitto"
#: builtin/fetch.c:549
#, c-format
#: builtin/fetch.c:789
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
-msgstr ""
+msgstr "L'opzione \"%s\" è ignorata per %s\n"
#: builtin/fetch.c:888
#, c-format
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
msgstr ""
+"Nessun repository remoto specificato. Per favore, specifica un URL o\n"
+"il nome di un remote da cui prelevare nuove revisioni."
#: builtin/fetch.c:927
-#, fuzzy
msgid "You need to specify a tag name."
-msgstr "È necessario specificare il nome di un tag."
+msgstr "Devi specificare il nome di un tag."
#: builtin/fetch.c:979
msgid "fetch --all does not take a repository argument"
-msgstr "fetch --all non richiede l'archivio come argomento"
+msgstr "fetch --all non richiede il repository come argomento"
#: builtin/fetch.c:981
msgid "fetch --all does not make sense with refspecs"
#: builtin/gc.c:63
#, c-format
msgid "Invalid %s: '%s'"
-msgstr ""
+msgstr "%s non valido: '%s'"
#: builtin/gc.c:90
#, c-format
#: builtin/grep.c:216
#, c-format
msgid "grep: failed to create thread: %s"
-msgstr ""
+msgstr "grep: creazione del thread non riuscita: %s"
#: builtin/grep.c:402
#, c-format
#: builtin/grep.c:478 builtin/grep.c:512
#, c-format
msgid "unable to read tree (%s)"
-msgstr ""
+msgstr "impossibile leggere il tree (%s)"
#: builtin/grep.c:526
#, c-format
#: builtin/grep.c:584
#, c-format
msgid "switch `%c' expects a numerical value"
-msgstr ""
+msgstr "switch '%c' richiede un valore numerico"
#: builtin/grep.c:601
#, c-format
msgid "cannot open '%s'"
msgstr "impossibile aprire '%s'"
-#: builtin/grep.c:888
+#: builtin/grep.c:885
msgid "no pattern given."
-msgstr ""
+msgstr "nessun modello specificato."
-#: builtin/grep.c:902
+#: builtin/grep.c:899
#, c-format
msgid "bad object %s"
msgstr "oggetto %s errato"
-#: builtin/grep.c:943
+#: builtin/grep.c:940
msgid "--open-files-in-pager only works on the worktree"
-msgstr "--open-files-in-pager funziona solo nell'albero di lavoro"
+msgstr ""
-#: builtin/grep.c:966
+#: builtin/grep.c:963
msgid "--cached or --untracked cannot be used with --no-index."
msgstr "--cached o --untracked non può essere usato con --no-index."
-#: builtin/grep.c:971
+#: builtin/grep.c:968
msgid "--no-index or --untracked cannot be used with revs."
-msgstr ""
+msgstr "--no-index o --untracked non possono essere usate con le revisioni."
-#: builtin/grep.c:974
+#: builtin/grep.c:971
msgid "--[no-]exclude-standard cannot be used for tracked contents."
-msgstr "--[no-]exclude-standard non può essere usato per il contenuto tracciato."
+msgstr ""
-#: builtin/grep.c:982
+#: builtin/grep.c:979
msgid "both --cached and trees are given."
msgstr ""
#: builtin/help.c:108
#, c-format
msgid "emacsclient version '%d' too old (< 22)."
-msgstr "la versione '%d' di emacsclient è vecchia (<22)."
+msgstr "la versione '%d' di emacsclient è troppo vecchia (<22)."
#: builtin/help.c:126 builtin/help.c:154 builtin/help.c:163 builtin/help.c:171
#, c-format
"'%s': path for unsupported man viewer.\n"
"Please consider using 'man.<tool>.cmd' instead."
msgstr ""
-"'%s': percorso ad un visualizzatore man non supportato.\n"
-"Utilizzare invece 'man.<tool>.cmd'."
+"'%s': path ad un visualizzatore man pages non supportato.\n"
+"Usa invece 'man.<tool>.cmd'."
#: builtin/help.c:223
#, c-format
"'%s': cmd for supported man viewer.\n"
"Please consider using 'man.<tool>.path' instead."
msgstr ""
+"'%s': comando per visualizzatore man pages supportato.\n"
+"Per favore usa 'man.<tool>.path' invece."
#: builtin/help.c:287
msgid "The most commonly used git commands are:"
#: builtin/help.c:355
#, c-format
msgid "'%s': unknown man viewer."
-msgstr "'%s': visualizzatore mano sconosciuto."
+msgstr "'%s': visualizzatore man sconosciuto."
#: builtin/help.c:372
msgid "no man viewer handled the request"
#: builtin/help.c:391
#, c-format
msgid "'%s': not a documentation directory."
-msgstr "'%s': non è una cartella della documentazione."
+msgstr "'%s': non è una directory della documentazione."
#: builtin/help.c:432 builtin/help.c:439
#, c-format
#: builtin/index-pack.c:256
msgid "pack too large for current definition of off_t"
-msgstr ""
+msgstr "pack troppo largo per la definizione corrente di off_t"
#: builtin/index-pack.c:272
#, c-format
msgid "unable to create '%s'"
-msgstr "non è possibile creare '%s'"
+msgstr "impossibile creare '%s'"
#: builtin/index-pack.c:277
#, c-format
msgid "cannot open packfile '%s'"
-msgstr ""
+msgstr "impossibile aprire il file pack '%s'"
#: builtin/index-pack.c:291
-#, fuzzy
msgid "pack signature mismatch"
msgstr "la firma del pack non coincide"
#: builtin/index-pack.c:598
#, c-format
msgid "invalid blob object %s"
-msgstr ""
+msgstr "oggetto blob %s non valido"
#: builtin/index-pack.c:610
-#, c-format, fuzzy
+#, c-format
msgid "invalid %s"
msgstr "%s non valido"
msgstr "Indicizzazione degli oggetti"
#: builtin/index-pack.c:872
-#, fuzzy
msgid "pack is corrupted (SHA1 mismatch)"
msgstr "il pack è corrotto (SHA1 non corrisponde)"
#, c-format
msgid "pack has %d unresolved delta"
msgid_plural "pack has %d unresolved deltas"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "pack ha %d delta irrisolto"
+msgstr[1] "pack ha %d delta irrisolti"
#: builtin/index-pack.c:998
#, c-format
#: builtin/index-pack.c:1077
#, c-format
msgid "local object %s is corrupt"
-msgstr ""
+msgstr "l'oggetto locale %s è corrotto"
#: builtin/index-pack.c:1101
-#, fuzzy
msgid "error while closing pack file"
-msgstr "errore durante la chiusura del file pack"
+msgstr "errore nella chiusura del file pack"
#: builtin/index-pack.c:1114
-#, c-format, fuzzy
+#, c-format
msgid "cannot write keep file '%s'"
-msgstr "non è stato possibile scrivere il keep file '%s'"
+msgstr "impossibile scrivere il file keep '%s'"
#: builtin/index-pack.c:1122
#, c-format
#: builtin/index-pack.c:1135
msgid "cannot store pack file"
-msgstr ""
+msgstr "impossibile archiviare il file pack"
#: builtin/index-pack.c:1146
msgid "cannot store index file"
-msgstr ""
+msgstr "impossibile archiviare index file"
#: builtin/index-pack.c:1247
#, c-format
msgid "Cannot open existing pack file '%s'"
-msgstr ""
+msgstr "Impossibile aprire il file pack '%s' esistente"
#: builtin/index-pack.c:1249
#, c-format
msgstr ""
#: builtin/index-pack.c:1296
-#, c-format, fuzzy
+#, c-format
msgid "non delta: %d object"
msgid_plural "non delta: %d objects"
msgstr[0] "non delta: %d oggetto"
msgstr[1] "non delta: %d oggetti"
#: builtin/index-pack.c:1303
-#, c-format, fuzzy
+#, c-format
msgid "chain length = %d: %lu object"
msgid_plural "chain length = %d: %lu objects"
msgstr[0] "lunghezza della catena = %d: %lu oggetto"
msgstr "--fix-thin non può essere usato senza --stdin"
#: builtin/index-pack.c:1411 builtin/index-pack.c:1421
-#, c-format, fuzzy
+#, c-format
msgid "packfile name '%s' does not end with '.pack'"
msgstr "il nome del file pack '%s' non termina con '.pack'"
#: builtin/index-pack.c:1430
-#, fuzzy
msgid "--verify with no packfile name given"
-msgstr "--verify senza un nome del file pack fornito"
+msgstr "--verify senza un nome del file pack specificato"
#: builtin/init-db.c:35
#, c-format
msgid "Could not make %s writable by group"
-msgstr ""
+msgstr "Non è stato possible rendere %s scrivibile dal gruppo"
#: builtin/init-db.c:62
#, c-format
#: builtin/init-db.c:67
#, c-format
msgid "cannot stat '%s'"
-msgstr "non è stato possibile eseguire lo stat di '%s'"
+msgstr "impossibile eseguire lo stat di '%s'"
#: builtin/init-db.c:73
#, c-format
#: builtin/init-db.c:354
#, c-format
msgid "unable to handle file type %d"
-msgstr ""
+msgstr "impossibile gestire il tipo di file %d"
#: builtin/init-db.c:357
#, c-format
msgid "unable to move %s to %s"
-msgstr "non è stato possibile spostare %s in %s"
+msgstr "impossibile spostare %s in %s"
#: builtin/init-db.c:362
#, c-format
msgid "Could not create git link %s"
-msgstr ""
+msgstr "Non è stato possibile creare il link git %s"
#.
#. * TRANSLATORS: The first '%s' is either "Reinitialized
#: builtin/init-db.c:419
#, c-format
msgid "%s%s Git repository in %s%s\n"
-msgstr "%s%s archivio Git in %s%s\n"
+msgstr "%s%s repository Git in %s%s\n"
#: builtin/init-db.c:420
-#, fuzzy
msgid "Reinitialized existing"
msgstr "Reinizializzato un esistente"
#: builtin/init-db.c:420
-#, fuzzy
msgid "Initialized empty"
-msgstr "Inizializzato un vuoto"
+msgstr "Inizializzato un"
#: builtin/init-db.c:421
msgid " shared"
"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
"dir=<directory>)"
msgstr ""
-"%s (o --work-tree=<cartella>) non consentito senza specificare %s (o --git-"
-"dir=<cartella>)"
+"%s (o --work-tree=<directory>) non consentito senza specificare %s (o --git-"
+"dir=<directory>)"
#: builtin/init-db.c:578
msgid "Cannot access current working directory"
-msgstr "Non è stato possibile accedere alla cartella di lavoro corrente"
+msgstr "Impossibile accedere alla directory di lavoro corrente"
#: builtin/init-db.c:585
#, c-format
msgid "Cannot access work tree '%s'"
-msgstr "Non è stato possibile accedere all'albero di lavoro '%s'"
+msgstr ""
#: builtin/log.c:188
#, c-format
msgid "Final output: %d %s\n"
-msgstr ""
+msgstr "Output finale: %d %s\n"
#: builtin/log.c:401 builtin/log.c:489
#, c-format
msgid "format.headers without value"
msgstr "format.headers non ha alcun valore"
-#: builtin/log.c:675
+#: builtin/log.c:676
msgid "name of output directory is too long"
-msgstr "il nome della cartella di output è troppo lungo"
+msgstr "il nome della directory di output è troppo lungo"
-#: builtin/log.c:686
+#: builtin/log.c:687
#, c-format
msgid "Cannot open patch file %s"
-msgstr "Non è possibile aprire il file patch %s"
+msgstr "Impossibile aprire il file patch %s"
-#: builtin/log.c:700
+#: builtin/log.c:701
msgid "Need exactly one range."
msgstr ""
-#: builtin/log.c:708
+#: builtin/log.c:709
msgid "Not a range."
msgstr ""
-#: builtin/log.c:745
-msgid "Could not extract email from committer identity."
-msgstr "Non è stato possibile estrarre l'indirizzo email dall'identità del committer."
-
-#: builtin/log.c:791
+#: builtin/log.c:786
msgid "Cover letter needs email format"
msgstr ""
-#: builtin/log.c:885
+#: builtin/log.c:859
#, c-format
msgid "insane in-reply-to: %s"
msgstr ""
-#: builtin/log.c:958
+#: builtin/log.c:932
msgid "Two output directories?"
-msgstr "Due cartelle di output?"
+msgstr "Due directory di output?"
-#: builtin/log.c:1179
+#: builtin/log.c:1153
#, c-format
msgid "bogus committer info %s"
msgstr ""
-#: builtin/log.c:1224
+#: builtin/log.c:1198
msgid "-n and -k are mutually exclusive."
msgstr ""
-#: builtin/log.c:1226
+#: builtin/log.c:1200
msgid "--subject-prefix and -k are mutually exclusive."
msgstr ""
-#: builtin/log.c:1234
+#: builtin/log.c:1208
msgid "--name-only does not make sense"
msgstr "--name-only non ha senso"
-#: builtin/log.c:1236
+#: builtin/log.c:1210
msgid "--name-status does not make sense"
msgstr "--name-status non ha senso"
-#: builtin/log.c:1238
+#: builtin/log.c:1212
msgid "--check does not make sense"
msgstr "--check non ha senso"
-#: builtin/log.c:1261
+#: builtin/log.c:1235
msgid "standard output, or directory, which one?"
-msgstr "standard output, o cartella, quale dei due?"
+msgstr "standard output, o directory, quale dei due?"
-#: builtin/log.c:1263
+#: builtin/log.c:1237
#, c-format
msgid "Could not create directory '%s'"
-msgstr "Non è stato possibile creare la cartella '%s'"
+msgstr "Non è stato possibile creare la directory '%s'"
-#: builtin/log.c:1416
+#: builtin/log.c:1390
msgid "Failed to create output files"
msgstr "Creazione dei file di output non riuscita"
-#: builtin/log.c:1520
+#: builtin/log.c:1494
#, c-format
msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
msgstr ""
-#: builtin/log.c:1536 builtin/log.c:1538 builtin/log.c:1550
+#: builtin/log.c:1510 builtin/log.c:1512 builtin/log.c:1524
#, c-format
msgid "Unknown commit %s"
msgstr "Commit %s sconosciuto"
#: builtin/merge.c:629
msgid "git write-tree failed to write a tree"
-msgstr "git write-tree non è riuscito a scrivere un albero"
+msgstr ""
#: builtin/merge.c:679
msgid "failed to read the cache"
#: builtin/merge.c:697
msgid "Unable to write index."
-msgstr "Non è possibile scrivere l'indice."
+msgstr "Impossibile scrivere index."
#: builtin/merge.c:710
msgid "Not handling anything other than two heads merge."
msgstr "Splendido.\n"
#: builtin/merge.c:993
-#, c-format, fuzzy
+#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
-"Merge automatico fallito; risolvere i conflitti ed effettuare il commit del\n"
-"risultato.\n"
+"Merge automatico fallito; risolvi i conflitti ed eseguire il commit\n"
+"del risultato.\n"
#: builtin/merge.c:1009
#, c-format
#: builtin/merge.c:1050
msgid "No current branch."
-msgstr "Nessun ramo corrente."
+msgstr "Nessun branch corrente."
#: builtin/merge.c:1052
msgid "No remote for the current branch."
-msgstr ""
+msgstr "Nessun remote per il branch corrente."
#: builtin/merge.c:1054
-#, fuzzy
msgid "No default upstream defined for the current branch."
-msgstr "Nessun upstream di default definito per il ramo corrente."
+msgstr "Nessun upstream di default definito per il branch corrente."
#: builtin/merge.c:1059
#, c-format
msgstr ""
#: builtin/merge.c:1146 builtin/merge.c:1303
-#, c-format, fuzzy
+#, c-format
msgid "%s - not something we can merge"
-msgstr "%s - non è qualcosa per cui effettuare il merge"
+msgstr "%s - non è qualcosa per cui possiamo eseguire il merge"
#: builtin/merge.c:1214
msgid "There is no merge to abort (MERGE_HEAD missing)."
-msgstr ""
+msgstr "Non c'è nessun merge da interrompere (manca MERGE_HEAD)"
#: builtin/merge.c:1230 git-pull.sh:31
msgid ""
"Please, commit your changes before you can merge."
msgstr ""
"Il merge non è stato concluso (esiste MERGE_HEAD).\n"
-"Per favore, effettuare il commit delle modifiche prima del merge."
+"Per favore, esegui il commit delle modifiche prima del merge."
#: builtin/merge.c:1233 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
"Please, commit your changes before you can merge."
msgstr ""
"Il cherry-pick non è stato concluso (esiste CHERRY_PICK_HEAD).\n"
-"Per favore, eseguire il commit delle modifiche prima del merge."
+"Per favore, esegui il commit delle modifiche prima del merge."
#: builtin/merge.c:1240
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
-msgstr ""
+msgstr "Il tuo cherry-pick non è stato concluso (CHERRY_PICK_HEAD esiste)."
#: builtin/merge.c:1249
msgid "You cannot combine --squash with --no-ff."
-msgstr "Non è possibile combinare --squash con --no-off."
+msgstr "Impossibile combinare --squash con --no-off."
#: builtin/merge.c:1254
msgid "You cannot combine --no-ff with --ff-only."
-msgstr "Non è possibile combinare --no-ff con --ff-only."
+msgstr "Impossibile combinare --no-ff con --ff-only."
#: builtin/merge.c:1261
msgid "No commit specified and merge.defaultToUpstream not set."
#: builtin/merge.c:1490
msgid "Not possible to fast-forward, aborting."
-msgstr ""
+msgstr "Fast-forward non possibile, stop."
#: builtin/merge.c:1513 builtin/merge.c:1592
#, c-format
#: builtin/merge.c:1517
#, c-format
msgid "Trying merge strategy %s...\n"
-msgstr ""
+msgstr "Tentativo con la strategia di merge %s...\n"
#: builtin/merge.c:1583
#, c-format
msgid "No merge strategy handled the merge.\n"
-msgstr ""
+msgstr "Nessuna strategia di merge ha gestito il merge.\n"
#: builtin/merge.c:1585
#, c-format
msgid "Merge with strategy %s failed.\n"
-msgstr ""
+msgstr "Merge con la strategia %s fallito.\n"
#: builtin/merge.c:1594
#, c-format
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
+"Il merge automatico è andato a buon fine; fermato prima del commit come "
+"richiesto\n"
#: builtin/mv.c:108
#, c-format
#: builtin/mv.c:115
msgid "can not move directory into itself"
-msgstr ""
+msgstr "non è possibile spostare la directory in sé stessa"
#: builtin/mv.c:118
msgid "cannot move directory over file"
-msgstr ""
+msgstr "non è possibile spostare la directory su un file"
#: builtin/mv.c:128
#, c-format
msgid "Huh? %.*s is in index?"
-msgstr "Eh? %.*s si trova nell'indice?"
+msgstr "Eh? %.*s si trova in index?"
#: builtin/mv.c:140
msgid "source directory is empty"
-msgstr "la cartella sorgente è vuota"
+msgstr "la directory sorgente è vuota"
#: builtin/mv.c:171
msgid "not under version control"
-msgstr "non si trova nel sistema di controllo versione"
+msgstr "non è sotto controllo di versione"
#: builtin/mv.c:173
msgid "destination exists"
#: builtin/mv.c:184
msgid "Cannot overwrite"
-msgstr ""
+msgstr "Impossibile sovrascrivere"
#: builtin/mv.c:187
msgid "multiple sources for the same target"
#: builtin/mv.c:215 builtin/remote.c:731
#, c-format
msgid "renaming '%s' failed"
-msgstr ""
+msgstr "rinomina di '%s' non riuscita"
#: builtin/notes.c:139
#, c-format
msgid "unable to start 'show' for object '%s'"
-msgstr ""
+msgstr "impossibile avviare 'show' per l'oggetto '%s'"
#: builtin/notes.c:145
msgid "can't fdopen 'show' output fd"
#: builtin/notes.c:175 builtin/tag.c:347
#, c-format
msgid "could not create file '%s'"
-msgstr ""
+msgstr "non è stato possibile creare il file '%s'"
#: builtin/notes.c:189
msgid "Please supply the note contents using either -m or -F option"
-msgstr ""
+msgstr "Per favore specifica il contenuto delle note usando le opzioni -m o -F"
#: builtin/notes.c:210 builtin/notes.c:973
#, c-format
msgid "Removing note for object %s\n"
-msgstr ""
+msgstr "Rimozione della nota per l'oggetto %s\n"
#: builtin/notes.c:215
msgid "unable to write note object"
-msgstr ""
+msgstr "impossibile scrivere l'oggetto nota"
#: builtin/notes.c:217
#, c-format
msgid "The note contents has been left in %s"
-msgstr ""
+msgstr "Il contenuto della nota è stato lasciato in %s"
#: builtin/notes.c:251 builtin/tag.c:542
#, c-format
msgid "cannot read '%s'"
-msgstr ""
+msgstr "impossibile leggere '%s'"
#: builtin/notes.c:253 builtin/tag.c:545
#, c-format
msgid "could not open or read '%s'"
-msgstr ""
+msgstr "non è stato possibile aprire o leggere '%s'"
#: builtin/notes.c:272 builtin/notes.c:445 builtin/notes.c:447
#: builtin/notes.c:507 builtin/notes.c:561 builtin/notes.c:644
#: builtin/notes.c:275
#, c-format
msgid "Failed to read object '%s'."
-msgstr ""
+msgstr "Lettura dell'oggetto '%s' non riuscita."
#: builtin/notes.c:299
msgid "Cannot commit uninitialized/unreferenced notes tree"
#: builtin/notes.c:350
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
-msgstr ""
+msgstr "Impossibile riscrivere le note in %s (al di fuori di refs/notes/)"
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
#: builtin/notes.c:441
#, c-format
msgid "Malformed input line: '%s'."
-msgstr ""
+msgstr "Riga di input malformata: '%s'."
#: builtin/notes.c:456
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
-msgstr ""
+msgstr "Copia delle note da '%s' a '%s' non riuscita"
#: builtin/notes.c:500 builtin/notes.c:554 builtin/notes.c:627
#: builtin/notes.c:639 builtin/notes.c:712 builtin/notes.c:759
#: builtin/notes.c:585 builtin/notes.c:662
#, c-format
msgid "Overwriting existing notes for object %s\n"
-msgstr ""
+msgstr "Sovrascrittura delle note esistenti per l'oggetto %s\n"
#: builtin/notes.c:635
msgid "too few parameters"
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
"existing notes"
msgstr ""
+"Impossibile copiare le note. Trovate note esistenti per l'oggetto %s. Usa "
+"'-f' per sovrascrivere le note esistenti"
#: builtin/notes.c:668
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
-msgstr ""
+msgstr "Note mancanti per l'oggetto sorgente %s. Impossibile copiare."
#: builtin/notes.c:717
#, c-format
"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 ""
+"Le opzioni -m/-F/-c/-C per il sottocomando 'edit' sono deprecate.\n"
+"Per favore usa 'git notes add -f -m/-F/-c/-C' invece.\n"
#: builtin/notes.c:971
#, c-format
#: builtin/notes.c:1103 builtin/remote.c:1598
#, c-format
msgid "Unknown subcommand: %s"
-msgstr ""
+msgstr "Sottocomando sconosciuto: %s"
-#: builtin/pack-objects.c:2315
+#: builtin/pack-objects.c:2337
#, c-format
msgid "unsupported index version %s"
-msgstr ""
+msgstr "versione %s di index non supportata"
-#: builtin/pack-objects.c:2319
+#: builtin/pack-objects.c:2341
#, c-format
msgid "bad index version '%s'"
-msgstr "versione dell'indice '%s' errata"
+msgstr "versione '%s' di index errata"
-#: builtin/pack-objects.c:2342
+#: builtin/pack-objects.c:2364
#, c-format
msgid "option %s does not accept negative form"
msgstr "l'opzione %s non accetta forme negative"
-#: builtin/pack-objects.c:2346
+#: builtin/pack-objects.c:2368
#, c-format
msgid "unable to parse value '%s' for option %s"
-msgstr ""
+msgstr "impossibile analizzare il valore '%s' per l'opzione %s"
#: builtin/push.c:45
msgid "tag shorthand without <tag>"
#: builtin/push.c:64
msgid "--delete only accepts plain target ref names"
-msgstr ""
+msgstr "--delete accetta solo nomi dei ref di destinazione in chiaro"
#: builtin/push.c:99
msgid ""
"\n"
" git push --set-upstream %s %s\n"
msgstr ""
+"Il branch corrente %s non ha alcun branch upstream.\n"
+"Per eseguire il push del branch corrente ed impostare remote come upstream, usa\n"
+"\n"
+" git push --set-upstream %s %s\n"
#: builtin/push.c:136
#, c-format
msgid "The current branch %s has multiple upstream branches, refusing to push."
-msgstr ""
+msgstr "Il branch corrente %s ha branch multipli in upstream; push non eseguito."
#: builtin/push.c:139
#, c-format
msgid ""
"You didn't specify any refspecs to push, and push.default is \"nothing\"."
msgstr ""
+"Non è stato specificato alcun refspec per il push, e push.default è \"nothing\"."
#: builtin/push.c:181
msgid ""
#: builtin/push.c:269
#, c-format
msgid "bad repository '%s'"
-msgstr "archivio '%s' errato"
+msgstr "repository '%s' errato"
#: builtin/push.c:270
msgid ""
"\n"
" git push <name>\n"
msgstr ""
+"Nessuna destinazione per il push configurata.\n"
+"Specifica un URL dalla riga di comando oppure configurare un repository "
+"remoto usando\n"
+"\n"
+" git remote add <nome> <url>\n"
+"\n"
+"e poi eseguire il push usando il nome del remote\n"
+"\n"
+" git push <nome>\n"
#: builtin/push.c:285
msgid "--all and --tags are incompatible"
-msgstr "--all e tags non sono compatibili"
+msgstr "--all e --tags non sono compatibili"
#: builtin/push.c:286
msgid "--all can't be combined with refspecs"
#: builtin/push.c:291
msgid "--mirror and --tags are incompatible"
-msgstr ""
+msgstr "--mirror e --tags non sono compatibili"
#: builtin/push.c:292
msgid "--mirror can't be combined with refspecs"
#: builtin/push.c:387
msgid "--delete doesn't make sense without any refs"
-msgstr ""
+msgstr "--delete non ha senso senza alcun ref"
#: builtin/remote.c:98
#, c-format
"\t use --mirror=fetch or --mirror=push instead"
msgstr ""
"--mirror è pericoloso e deprecato; per favore\n"
-"\t usare invece --mirror-fetch o --mirror-push"
+"\t usa invece --mirror-fetch o --mirror-push"
#: builtin/remote.c:147
#, c-format
msgid "unknown mirror argument: %s"
-msgstr ""
+msgstr "argomento di mirror sconosciuto: %s"
#: builtin/remote.c:185
msgid "specifying a master branch makes no sense with --mirror"
-msgstr ""
+msgstr "specificare un branch master con --mirror non ha senso"
#: builtin/remote.c:187
msgid "specifying branches to track makes sense only with fetch mirrors"
#: builtin/remote.c:195 builtin/remote.c:646
#, c-format
msgid "remote %s already exists."
-msgstr ""
+msgstr "il remoto %s esiste già."
#: builtin/remote.c:199 builtin/remote.c:650
#, c-format
msgid "'%s' is not a valid remote name"
-msgstr ""
+msgstr "'%s' non è un nome di remoto valido"
#: builtin/remote.c:243
#, c-format
msgid "Could not setup master '%s'"
-msgstr ""
+msgstr "Non è stato possibile configurare il master '%s'"
#: builtin/remote.c:299
#, c-format
msgid "more than one %s"
-msgstr ""
+msgstr "più di un %s"
#: builtin/remote.c:339
#, c-format
#: builtin/remote.c:440 builtin/remote.c:448
msgid "(matching)"
-msgstr ""
+msgstr "(corrispondente)"
#: builtin/remote.c:452
msgid "(delete)"
-msgstr ""
+msgstr "(elimina)"
#: builtin/remote.c:595 builtin/remote.c:601 builtin/remote.c:607
#, c-format
msgid "Could not append '%s' to '%s'"
-msgstr ""
+msgstr "Non è stato possibile aggiungere '%s' a '%s'"
#: builtin/remote.c:639 builtin/remote.c:792 builtin/remote.c:890
#, c-format
msgid "No such remote: %s"
-msgstr ""
+msgstr "Remote non esistente: %s"
#: builtin/remote.c:656
-#, c-format, fuzzy
+#, c-format
msgid "Could not rename config section '%s' to '%s'"
-msgstr "Non è stato possibile rinominare la sezione di configurazione '%s' in '%s'"
+msgstr "Non è stato possibile rinominare la sezione di configurazione da '%s' in '%s'"
#: builtin/remote.c:662 builtin/remote.c:799
#, c-format
#: builtin/remote.c:677
#, c-format
msgid ""
-"Not updating non-default fetch respec\n"
+"Not updating non-default fetch refspec\n"
"\t%s\n"
"\tPlease update the configuration manually if necessary."
msgstr ""
#: builtin/remote.c:694
#, c-format
msgid "Could not set '%s'"
-msgstr ""
+msgstr "Non è stato possibile impostare '%s'"
#: builtin/remote.c:716
#, c-format
msgid "deleting '%s' failed"
-msgstr "eliminazione di '%s' fallita"
+msgstr "eliminazione di '%s' non riuscita"
#: builtin/remote.c:750
#, c-format
#: builtin/remote.c:764
#, c-format
msgid "Could not remove branch %s"
-msgstr "Non è stato possibile rimuovere il ramo %s"
+msgstr "Non è stato possibile rimuovere il branch %s"
#: builtin/remote.c:834
msgid ""
"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
"to delete them, use:"
msgstr[0] ""
+"Nota: un branch al di fuori della gerarchia refs/remotes/ non è stato "
+"eliminato;\n"
+"per eliminarlo, usare:"
msgstr[1] ""
+"Nota: alcuni branch al di fuori della gerarchia refs/remotes/ non sono stati "
+"eliminati;\n"
+"per eliminarli, usare:"
#: builtin/remote.c:943
#, c-format
#: builtin/remote.c:948
msgid " stale (use 'git remote prune' to remove)"
-msgstr ""
+msgstr " vecchio (usare 'git remote prune' per rimuoverlo)"
#: builtin/remote.c:950
msgid " ???"
-msgstr ""
+msgstr "???"
#: builtin/remote.c:991
#, c-format
msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch"
msgstr ""
+"branch.%s.merge non valido; impossibile eseguire il rebase su > 1 branch"
#: builtin/remote.c:998
#, c-format
#: builtin/remote.c:1001
#, c-format
msgid " merges with remote %s"
-msgstr ""
+msgstr " merge con il remote %s"
#: builtin/remote.c:1002
msgid " and with remote"
-msgstr ""
+msgstr " e con il remote"
#: builtin/remote.c:1004
#, c-format
msgid "merges with remote %s"
-msgstr ""
+msgstr "merge con il remote %s"
#: builtin/remote.c:1005
msgid " and with remote"
#: builtin/remote.c:1051
msgid "create"
-msgstr ""
+msgstr "crea"
#: builtin/remote.c:1054
msgid "delete"
-msgstr ""
+msgstr "elimina"
#: builtin/remote.c:1058
msgid "up to date"
-msgstr ""
+msgstr "aggiornato"
#: builtin/remote.c:1061
msgid "fast-forwardable"
#: builtin/remote.c:1064
msgid "local out of date"
-msgstr ""
+msgstr "locale non aggiornato"
#: builtin/remote.c:1071
#, c-format
#: builtin/remote.c:1081
#, c-format
msgid " %-*s pushes to %s"
-msgstr ""
+msgstr " %-*s esegue il push su %s"
#: builtin/remote.c:1118
#, c-format
msgid "* remote %s"
-msgstr ""
+msgstr "* remote %s"
#: builtin/remote.c:1119
#, c-format
#: builtin/remote.c:1133 builtin/remote.c:1135 builtin/remote.c:1137
#, c-format
msgid " HEAD branch: %s"
-msgstr " ramo HEAD: %s"
+msgstr " branch HEAD: %s"
#: builtin/remote.c:1139
#, c-format
msgid ""
" HEAD branch (remote HEAD is ambiguous, may be one of the following):\n"
msgstr ""
+" branch HEAD (l'HEAD remoto è ambiguo, potrebbe essere uno dei seguenti):\n"
#: builtin/remote.c:1151
#, c-format
msgid " Remote branch:%s"
msgid_plural " Remote branches:%s"
-msgstr[0] " Ramo remoto:%s"
-msgstr[1] " Rami remoti:%s"
+msgstr[0] " Branch remoto:%s"
+msgstr[1] " Branch remoti:%s"
#: builtin/remote.c:1154 builtin/remote.c:1181
msgid " (status not queried)"
#: builtin/remote.c:1163
msgid " Local branch configured for 'git pull':"
msgid_plural " Local branches configured for 'git pull':"
-msgstr[0] " Ramo locale configurato per 'git pull':"
-msgstr[1] " Rami locali configurati per 'git pull':"
+msgstr[0] " Branch locale configurato per 'git pull':"
+msgstr[1] " Branch locali configurati per 'git pull':"
#: builtin/remote.c:1171
msgid " Local refs will be mirrored by 'git push'"
#, c-format
msgid " Local ref configured for 'git push'%s:"
msgid_plural " Local refs configured for 'git push'%s:"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] " Ref locale configurato per 'git push'%s:"
+msgstr[1] " Ref locali configurati per 'git push'%s:"
#: builtin/remote.c:1216
msgid "Cannot determine remote HEAD"
-msgstr ""
+msgstr "Impossibile determinare l'HEAD remoto"
#: builtin/remote.c:1218
msgid "Multiple remote HEAD branches. Please choose one explicitly with:"
#: builtin/remote.c:1228
#, c-format
msgid "Could not delete %s"
-msgstr ""
+msgstr "Non è stato possibile eliminare %s"
#: builtin/remote.c:1236
#, c-format
msgid "Not a valid ref: %s"
-msgstr ""
+msgstr "Non è un ref valido: %s"
#: builtin/remote.c:1238
#, c-format
msgid "Could not setup %s"
-msgstr ""
+msgstr "Non è stato possibile configurare %s"
#: builtin/remote.c:1274
#, c-format
#: builtin/remote.c:1282
#, c-format
msgid "URL: %s"
-msgstr ""
+msgstr "URL: %s"
#: builtin/remote.c:1295
#, c-format
#: builtin/remote.c:1387 builtin/remote.c:1461
#, c-format
msgid "No such remote '%s'"
-msgstr ""
+msgstr "Remote '%s' non esistente"
#: builtin/remote.c:1414
msgid "no remote specified"
-msgstr ""
+msgstr "nessun remote specificato"
#: builtin/remote.c:1447
msgid "--add --delete doesn't make sense"
#: builtin/reset.c:85
#, c-format
msgid "Failed to find tree of %s."
-msgstr "Ricerca dell'albero di %s non riuscita."
+msgstr ""
#: builtin/reset.c:96
msgid "Could not write new index file."
-msgstr "Non è stato possibile scrivere il nuovo file indice."
+msgstr "Non è stato possibile scrivere il nuovo index file."
#: builtin/reset.c:106
-#, c-format, fuzzy
+#, c-format
msgid "HEAD is now at %s"
msgstr "HEAD ora si trova a %s"
#: builtin/reset.c:130
msgid "Could not read index"
-msgstr "Non è possibile leggere l'indice"
+msgstr "Non è stato possibile leggere index"
#: builtin/reset.c:133
msgid "Unstaged changes after reset:"
#: builtin/reset.c:223
#, c-format
msgid "Cannot do a %s reset in the middle of a merge."
-msgstr ""
+msgstr "Impossibile eseguire un %s reset nel corso di un merge."
#: builtin/reset.c:297
#, c-format
msgid "Could not parse object '%s'."
-msgstr ""
+msgstr "Non è stato possibile analizzare l'oggetto '%s'."
#: builtin/reset.c:302
msgid "--patch is incompatible with --{hard,mixed,soft}"
#: builtin/reset.c:311
msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
-msgstr "--mixed con i percorsi è deprecata; usare invece 'git reset -- <percorso>'."
+msgstr "--mixed con i path è deprecata; usa invece 'git reset -- <path>'."
#: builtin/reset.c:313
#, c-format
msgstr ""
#: builtin/reset.c:325
-#, c-format, fuzzy
+#, c-format
msgid "%s reset is not allowed in a bare repository"
-msgstr "%s reset non è consentito in un archivio scoperto #FIXME: bare"
+msgstr "%s reset non è consentito in un repository spoglio"
#: builtin/reset.c:341
-#, c-format, fuzzy
+#, c-format
msgid "Could not reset index file to revision '%s'."
-msgstr "Non è possibile ripristinare il file indice alla revisione '%s'."
+msgstr ""
+"Non è stato possibile ripristinare index file "
+"alla revisione '%s'."
#: builtin/revert.c:70 builtin/revert.c:92
#, c-format
msgid "%s: %s cannot be used with %s"
-msgstr "%s: %s non può essere usato con %s"
+msgstr "%s: %s non può essere usata con %s"
#: builtin/revert.c:131
msgid "program error"
msgstr "errore del programma"
#: builtin/revert.c:221
-#, fuzzy
msgid "revert failed"
msgstr "revert non riuscito"
#: builtin/revert.c:236
-#, fuzzy
msgid "cherry-pick failed"
msgstr "cherry-pick non riuscito"
"(use --cached to keep the file, or -f to force removal)"
msgstr ""
"'%s' contiene delle modifiche locali\n"
-"(usare --cached per mantenere il file, o -f per forzare la rimozione)"
+"(usa --cached per mantenere il file, o -f per forzare la rimozione)"
#: builtin/rm.c:194
#, c-format
msgstr ""
#: builtin/tag.c:207
-#, c-format, fuzzy
+#, c-format
msgid "tag name too long: %.*s..."
msgstr "nome tag troppo lungo: %.*s..."
#: builtin/tag.c:239
#, c-format
msgid "could not verify the tag '%s'"
-msgstr "non è possibile verificare il tag '%s'"
+msgstr "non è stato possibile verificare il tag '%s'"
#: builtin/tag.c:249
msgid ""
"# Lines starting with '#' will be ignored.\n"
"#\n"
msgstr ""
+"\n"
+"#\n"
+"# Scrivere un messaggio associato al tag\n"
+"# Le righe che iniziano con '#' verranno ignorate.\n"
+"#\n"
#: builtin/tag.c:256
msgid ""
"want to.\n"
"#\n"
msgstr ""
+"\n"
+"#\n"
+"# Scrivere un messaggio associato al tag\n"
+"# Le righe che iniziano con '#' verranno mantenute; possono essere comunque "
+"rimosse manualmente.\n"
+"#\n"
#: builtin/tag.c:298
msgid "unable to sign the tag"
-msgstr "non è possibile firmare il tag"
+msgstr "impossibile firmare il tag"
#: builtin/tag.c:300
msgid "unable to write tag file"
-msgstr ""
+msgstr "impossibile scrivere il file di tag"
#: builtin/tag.c:325
-#, fuzzy
msgid "bad object type."
msgstr "tipo di oggetto errato."
#: builtin/tag.c:338
-#, fuzzy
msgid "tag header too big."
-msgstr "intestazione del tag troppo grande"
+msgstr "intestazione del tag troppo grande."
#: builtin/tag.c:370
-#, fuzzy
msgid "no tag message?"
msgstr "nessun messaggio per il tag?"
#: builtin/tag.c:376
-#, c-format, fuzzy
+#, c-format
msgid "The tag message has been left in %s\n"
-msgstr "Il messaggio tag è stato lasciato in %s\n"
+msgstr "Il messaggio del tag è stato lasciato in %s\n"
#: builtin/tag.c:425
-#, fuzzy
msgid "switch 'points-at' requires an object"
msgstr "lo switch 'points-at' richiede un oggetto"
#: builtin/tag.c:427
#, c-format
msgid "malformed object name '%s'"
-msgstr ""
+msgstr "nome oggetto '%s' malformato"
#: builtin/tag.c:506
msgid "--column and -n are incompatible"
msgstr "troppi parametri"
#: builtin/tag.c:561
-#, c-format, fuzzy
+#, c-format
msgid "'%s' is not a valid tag name."
msgstr "'%s' non è un nome tag valido."
#: builtin/tag.c:584
#, c-format
msgid "%s: cannot lock the ref"
-msgstr ""
+msgstr "%s: impossibile riservare il ref"
#: builtin/tag.c:586
#, c-format
msgid "%s: cannot update the ref"
-msgstr ""
+msgstr "%s: impossibile aggiornare il ref"
#: builtin/tag.c:588
#, c-format
#: git.c:16
msgid "See 'git help <command>' for more information on a specific command."
-msgstr "Consultare 'git help <comando> per maggiori informazioni su un comando specifico."
+msgstr ""
+"Vedi 'git help <comando> per maggiori informazioni su un comando "
+"specifico."
#: parse-options.h:133 parse-options.h:235
msgid "n"
msgstr "n"
#: parse-options.h:141
-#, fuzzy
msgid "time"
msgstr "tempo"
msgstr "meno dettagliato"
#: parse-options.h:236
-#, fuzzy
msgid "use <n> digits to display SHA-1s"
-msgstr "usa <n> cifre per mostrare SHA-1"
+msgstr "usare <n> cifre per mostrare gli hash SHA-1"
#: common-cmds.h:8
-#, fuzzy
msgid "Add file contents to the index"
-msgstr "Aggiunge il contenuto del file all'indice"
+msgstr "Aggiunge il contenuto del file a index"
#: common-cmds.h:9
msgid "Find by binary search the change that introduced a bug"
-msgstr ""
+msgstr "Cerca mediante ricerca binaria la modifica che ha introdotto un bug"
#: common-cmds.h:10
msgid "List, create, or delete branches"
-msgstr "Elenca, crea o elimina rami"
+msgstr "Elenca, crea o elimina branch"
#: common-cmds.h:11
msgid "Checkout a branch or paths to the working tree"
#: common-cmds.h:12
msgid "Clone a repository into a new directory"
-msgstr "Clona un archivio in una nuova cartella"
+msgstr "Clona un repository in una nuova directory"
#: common-cmds.h:13
-#, fuzzy
msgid "Record changes to the repository"
-msgstr "Registra modifiche nell'archivio"
+msgstr "Registra modifiche nel repository"
#: common-cmds.h:14
msgid "Show changes between commits, commit and working tree, etc"
-msgstr "Mostra le modifiche tra i commit, commit e albero di lavoro, ecc"
+msgstr ""
#: common-cmds.h:15
msgid "Download objects and refs from another repository"
-msgstr ""
+msgstr "Scarica oggetti e ref da un altro repository"
#: common-cmds.h:16
msgid "Print lines matching a pattern"
#: common-cmds.h:17
msgid "Create an empty git repository or reinitialize an existing one"
-msgstr "Crea un archivio git vuoto o reinizializza uno esistente"
+msgstr "Crea un repository git vuoto o reinizializza uno esistente"
#: common-cmds.h:18
msgid "Show commit logs"
msgstr "Mostra log del commit"
#: common-cmds.h:19
-#, fuzzy
msgid "Join two or more development histories together"
-msgstr "Unisce due o più cronologie di sviluppo insieme"
+msgstr "Unisce due o più cronologie di sviluppo"
#: common-cmds.h:20
msgid "Move or rename a file, a directory, or a symlink"
-msgstr "Sposta o rinomina un file, una cartella o un link simbolico"
+msgstr "Sposta o rinomina un file, una directory o un link simbolico"
#: common-cmds.h:21
-#, fuzzy
msgid "Fetch from and merge with another repository or a local branch"
-msgstr "Preleva e applica da un altro archivio o un ramo locale"
+msgstr "Combina fetche + merge da un altro repository o un branch locale"
#: common-cmds.h:22
msgid "Update remote refs along with associated objects"
-msgstr ""
+msgstr "Aggiorna i ref remoti insieme agli oggetti associati"
#: common-cmds.h:23
msgid "Forward-port local commits to the updated upstream head"
msgstr ""
#: common-cmds.h:24
-#, fuzzy
msgid "Reset current HEAD to the specified state"
msgstr "Ripristina l'HEAD corrente allo stato specificato"
#: common-cmds.h:25
msgid "Remove files from the working tree and from the index"
-msgstr "Rimuove file dall'albero di lavoro e dall'indice"
+msgstr ""
#: common-cmds.h:26
msgid "Show various types of objects"
#: common-cmds.h:27
msgid "Show the working tree status"
-msgstr "Mostra lo stato dell'albero di lavoro"
+msgstr ""
#: common-cmds.h:28
-#, fuzzy
msgid "Create, list, delete or verify a tag object signed with GPG"
-msgstr "Crea, elenca. elimina o verifica un oggetto tag firmato con GPG"
+msgstr "Crea, elenca, elimina o verifica un oggetto tag firmato con GPG"
#: git-am.sh:50
-#, fuzzy
msgid "You need to set your committer info first"
msgstr "È necessario impostare le informazioni sul committer"
+#: git-am.sh:95
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+
+#: git-am.sh:105
+#, 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 ""
+"Quando hai risolto il problema esegui \"$cmdline --resolved\".\n"
+"Se vuoi saltare questa patch, esegui invece \"$cmdline --skip\".\n"
+"Per ripristinare il branch originale e interrompere l'applicazione delle "
+"patch esegui \"$cmdline --abort\"."
+
+#: git-am.sh:121
+msgid "Cannot fall back to three-way merge."
+msgstr ""
+
#: git-am.sh:137
msgid "Repository lacks necessary blobs to fall back on 3-way merge."
msgstr ""
"Did you hand edit your patch?\n"
"It does not apply to blobs recorded in its index."
msgstr ""
+"La tua patch è stata modificata manualmente?\n"
+"Non può essere applicata ai blob registrati nel proprio index."
#: git-am.sh:163
msgid "Falling back to patching base and 3-way merge..."
msgstr ""
#: git-am.sh:275
-#, fuzzy
msgid "Only one StGIT patch series can be applied at once"
msgstr "Può essere applicata solo una serie di patch StGIT per volta"
#: git-am.sh:364
msgid "Patch format detection failed."
-msgstr ""
+msgstr "Rilevamento del formato della patch non riuscito."
#: git-am.sh:418
msgid "-d option is no longer supported. Do not use."
msgstr ""
#: git-am.sh:486
-#, fuzzy
msgid "Please make up your mind. --skip or --abort?"
-msgstr "Per favore, decidetevi. --skip o --abort?"
+msgstr "Per favore, deciditi. --skip o --abort?"
#: git-am.sh:513
msgid "Resolve operation not in progress, we are not resuming."
msgid "Dirty index: cannot apply patches (dirty: $files)"
msgstr ""
+#: git-am.sh:671
+#, 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:708
+msgid "Patch does not have a valid e-mail address."
+msgstr "La patch non contiene un indirizzo email valido."
+
#: git-am.sh:755
-#, fuzzy
msgid "cannot be interactive without stdin connected to a terminal."
msgstr ""
-"non è possibile passare in modalità interattiva senza uno standard input connesso ad\n"
-"un terminale"
+
+#: git-am.sh:759
+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:766
-#, fuzzy
msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
-msgstr "Applicare? [s]ì/[n]o/[m]odifica/[v]isualizza/mostra [p]atch/[a]ccetta tutto "
+msgstr "Applicare? sì[y]/no[n]/modifica[e]/visualizza patch[v]/accetta tutto[a] "
#: git-am.sh:802
#, sh-format
msgid "Applying: $FIRSTLINE"
msgstr ""
+#: git-am.sh:823
+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:831
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+
#: git-am.sh:847
msgid "No changes -- Patch already applied."
msgstr "Nessuna modifica -- patch già applicata."
+#: git-am.sh:857
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "Patch non riuscita a $msgnum $FIRSTLINE"
+
#: git-am.sh:873
msgid "applying to an empty history"
msgstr ""
+#: git-bisect.sh:48
+msgid "You need to start by \"git bisect start\""
+msgstr "Devi iniziare con \"git bisect start\""
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
#: git-bisect.sh:54
-#, fuzzy
msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Volete che me ne occupi io [S/n]? "
+msgstr "Vuoi che me ne occupi io [Y/n]? "
#: git-bisect.sh:95
#, sh-format
msgid "unrecognised option: '$arg'"
-msgstr "opzione non riconoscitua: '$arg'"
+msgstr "opzione non riconosciuta: '$arg'"
#: git-bisect.sh:99
#, sh-format
msgid "'$arg' does not appear to be a valid revision"
-msgstr ""
+msgstr "'$arg' non sembra essere una revisione valida"
#: git-bisect.sh:117
-#, fuzzy
msgid "Bad HEAD - I need a HEAD"
-msgstr "HEAD errata - ho bisogno di una HEAD"
+msgstr ""
#: git-bisect.sh:130
#, sh-format
msgid ""
"Checking out '$start_head' failed. Try 'git bisect reset <validbranch>'."
msgstr ""
+"Checkout di '$start_head' non riuscito. Prova 'git bisect reset "
+"<branch-valido>'."
#: git-bisect.sh:140
msgid "won't bisect on seeked tree"
#: git-bisect.sh:144
msgid "Bad HEAD - strange symbolic ref"
-msgstr ""
+msgstr "HEAD errato - strano ref simbolico"
#: git-bisect.sh:189
#, sh-format
msgid "Bad bisect_write argument: $state"
-msgstr ""
+msgstr "Argomento bisect_write errato: $state"
#: git-bisect.sh:218
#, sh-format
#: git-bisect.sh:232
msgid "Please call 'bisect_state' with at least one argument."
-msgstr "Per favore, chiamare 'bisect_state' con almeno un argomento."
+msgstr "Per favore, chiama 'bisect_state' con almeno un argomento."
#: git-bisect.sh:244
#, sh-format
msgid "'git bisect bad' can take only one argument."
msgstr "'git bisect bad' può prendere un solo argomento."
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:273
+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:279
msgid "Are you sure [Y/n]? "
-msgstr "Si è sicuri? [S/n] "
+msgstr "Sei sicuro? [Y/n] "
+
+#: git-bisect.sh:289
+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 ""
+"Devi specificare almeno una revisione corretta ed una errata.\n"
+"(Puoi usare \"git bisect bad\" e \"git bisect good\" per questo scopo.)"
+
+#: git-bisect.sh:292
+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:347 git-bisect.sh:474
+msgid "We are not bisecting."
+msgstr "Non stiamo eseguendo un bisect."
#: git-bisect.sh:354
#, sh-format
#: git-bisect.sh:408
msgid "?? what are you talking about?"
+msgstr "?? di cosa si sta parlando?"
+
+#: git-bisect.sh:420
+#, sh-format
+msgid "running $command"
+msgstr "sto eseguendo $command"
+
+#: git-bisect.sh:427
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
msgstr ""
+"bisect run non riuscito:\n"
+"il codice di uscita $res da '$command' è < 0 oppure >= 128"
-#: git-bisect.sh:474
-#, fuzzy
-msgid "We are not bisecting."
-msgstr "Non stiamo eseguendo il bisect."
+#: git-bisect.sh:453
+msgid "bisect run cannot continue any more"
+msgstr "bisect run non può più proseguire"
+
+#: git-bisect.sh:459
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+"bisect run non riuscito:\n"
+"bisect_state $state è uscito con il codice di errore $res"
+
+#: git-bisect.sh:466
+msgid "bisect run success"
+msgstr "bisect run eseguito con successo"
#: git-pull.sh:21
msgid ""
#: git-pull.sh:25
msgid "Pull is not possible because you have unmerged files."
msgstr ""
+"Il pull non è possibile perché ci sono file di cui non è stato eseguito il "
+"merge."
#: git-pull.sh:197
msgid "updating an unborn branch with changes added to the index"
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:228
+#, 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:253
msgid "Cannot merge multiple branches into empty head"
-msgstr ""
+msgstr "Impossibile eseguire il merge di branch multipli in un head vuoto"
#: git-pull.sh:257
msgid "Cannot rebase onto multiple branches"
-msgstr "Non è possibile eseguire il rebase su rami multipli"
+msgstr "Impossibile eseguire il rebase su branch multipli"
#: git-stash.sh:51
-#, fuzzy
msgid "git stash clear with parameters is unimplemented"
msgstr "git stash clear con parametri non è implementato"
#: git-stash.sh:74
msgid "You do not have the initial commit yet"
-msgstr "Non esiste ancora un commit iniziale"
+msgstr "Non hai ancora un commit iniziale"
#: git-stash.sh:89
-#, fuzzy
msgid "Cannot save the current index state"
-msgstr "Non è possibile salvare lo stato corrente dell'indice"
+msgstr "Impossibile salvare lo stato corrente di index"
#: git-stash.sh:123 git-stash.sh:136
-#, fuzzy
msgid "Cannot save the current worktree state"
-msgstr "Non è possibile salvare lo stato dell'albero di lavoro corrente"
+msgstr ""
#: git-stash.sh:140
msgid "No changes selected"
msgstr ""
#: git-stash.sh:156
-#, fuzzy
msgid "Cannot record working tree state"
-msgstr "Non è possbile registrare lo stato dell'albero di lavoro"
+msgstr ""
+
+#. 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. E.g. in
+#. English this is:
+#.
+#. $ git stash save --blah-blah 2>&1 | head -n 2
+#. error: unknown option for 'stash save': --blah-blah
+#. To provide a message, use git stash save -- '--blah-blah'
+#: git-stash.sh:202
+#, sh-format
+msgid ""
+"error: unknown option for 'stash save': $option\n"
+" To provide a message, use git stash save -- '$option'"
+msgstr ""
+"errore: opzione sconosciuta per 'stash save': $option\n"
+" Per aggiungere un messaggio, usare git stash save -- '$option'"
#: git-stash.sh:223
msgid "No local changes to save"
#: git-stash.sh:227
msgid "Cannot initialize stash"
-msgstr "Non è possibile inizializzare stash"
+msgstr "Impossibile inizializzare stash"
#: git-stash.sh:235
-#, fuzzy
msgid "Cannot save the current status"
-msgstr "Non è possibile salvare lo stato attuale"
+msgstr "Impossibile salvare lo stato attuale"
#: git-stash.sh:253
-#, fuzzy
msgid "Cannot remove worktree changes"
-msgstr "Non è possibile rimuovere le modifiche all'albero di lavoro"
+msgstr ""
#: git-stash.sh:352
msgid "No stash found."
msgstr "Nessuno stash trovato."
#: git-stash.sh:359
-#, sh-format, fuzzy
+#, sh-format
msgid "Too many revisions specified: $REV"
msgstr "Troppe revisioni specificate: $REV"
msgstr "'$args' non è un commit di tipo stash"
#: git-stash.sh:404
-#, sh-format, fuzzy
+#, sh-format
msgid "'$args' is not a stash reference"
-msgstr "'$args' non è un riferimento a stash"
+msgstr "'$args' non è un referimento a uno stash"
#: git-stash.sh:412
msgid "unable to refresh index"
-msgstr "non è stato possibile aggiornare l'indice"
+msgstr "impossibile aggiornare index"
#: git-stash.sh:416
msgid "Cannot apply a stash in the middle of a merge"
-msgstr "Non è possibile applicare uno stash nel mezzo di un merge"
+msgstr "Impossibile applicare uno stash nel mezzo di un merge"
#: git-stash.sh:424
-#, fuzzy
msgid "Conflicts in index. Try without --index."
-msgstr "Ci sono conflitti nell'indice. Provare senza --index."
+msgstr "Ci sono conflitti in index. Prova senza --index."
#: git-stash.sh:426
msgid "Could not save index tree"
-msgstr "Non è stato possibile salvare l'indice dell'albero"
+msgstr ""
#: git-stash.sh:460
msgid "Cannot unstage modified files"
msgstr ""
+#: git-stash.sh:474
+msgid "Index was not unstashed."
+msgstr ""
+
#: git-stash.sh:491
#, sh-format
msgid "Dropped ${REV} ($s)"
-msgstr ""
+msgstr "${REV} eliminata ($s)"
#: git-stash.sh:492
#, sh-format
msgid "${REV}: Could not drop stash entry"
-msgstr ""
+msgstr "${REV}: non è stato possibile rimuovere la voce di stash"
#: git-stash.sh:499
-#, fuzzy
msgid "No branch name specified"
-msgstr "Nessun nome del ramo specificato"
+msgstr "Nome del branch non specificato"
#: git-stash.sh:570
msgid "(To restore them type \"git stash apply\")"
-msgstr "(Per ripristinarli digitare \"git stash apply\")"
+msgstr "(Per ripristinarli digita \"git stash apply\")"
#: git-submodule.sh:56
#, sh-format
#: git-submodule.sh:249
#, sh-format
msgid "repo URL: '$repo' must be absolute or begin with ./|../"
-msgstr ""
+msgstr "repo URL: '$repo' deve essere assoluto o iniziare con ./|../"
#: git-submodule.sh:266
#, sh-format
msgid "'$sm_path' already exists in the index"
+msgstr "'$sm_path' esiste già in index"
+
+#: git-submodule.sh:270
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$sm_path\n"
+"Use -f if you really want to add it."
+msgstr ""
+"Il seguente path è ignorato da uno dei tuoi file .gitignore:\n"
+"$sm_path\n"
+"Usa -f se vuoi davvero aggiungerlo."
+
+#: git-submodule.sh:281
+#, sh-format
+msgid "Adding existing repo at '$sm_path' to the index"
msgstr ""
#: git-submodule.sh:283
#, sh-format
msgid "'$sm_path' already exists and is not a valid git repo"
-msgstr ""
+msgstr "'$sm_path' esiste già e non è un repository git valido"
#: git-submodule.sh:297
#, sh-format
#, sh-format
msgid "Stopping at '$sm_path'; script returned non-zero status."
msgstr ""
+"Interruzione a '$sm_path'; lo script ha restituito uno stato diverso da zero."
-#: git-submodule.sh:405
+#: git-submodule.sh:406
#, sh-format
msgid "No url found for submodule path '$sm_path' in .gitmodules"
msgstr ""
-#: git-submodule.sh:414
+#: git-submodule.sh:415
#, sh-format
msgid "Failed to register url for submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:422
+#: git-submodule.sh:417
#, sh-format
-msgid "Failed to register update mode for submodule path '$sm_path'"
+msgid "Submodule '$name' ($url) registered for path '$sm_path'"
msgstr ""
-#: git-submodule.sh:424
+#: git-submodule.sh:425
#, sh-format
-msgid "Submodule '$name' ($url) registered for path '$sm_path'"
+msgid "Failed to register update mode for submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:523
+#: git-submodule.sh:524
#, sh-format
msgid ""
"Submodule path '$sm_path' not initialized\n"
"Maybe you want to use 'update --init'?"
msgstr ""
-#: git-submodule.sh:536
+#: git-submodule.sh:537
#, sh-format
msgid "Unable to find current revision in submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:555
+#: git-submodule.sh:556
#, sh-format
msgid "Unable to fetch in submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:569
+#: git-submodule.sh:570
#, sh-format
msgid "Unable to rebase '$sha1' in submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:570
+#: git-submodule.sh:571
#, sh-format
msgid "Submodule path '$sm_path': rebased into '$sha1'"
msgstr ""
-#: git-submodule.sh:575
+#: git-submodule.sh:576
#, sh-format
msgid "Unable to merge '$sha1' in submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:576
+#: git-submodule.sh:577
#, sh-format
msgid "Submodule path '$sm_path': merged in '$sha1'"
msgstr ""
-#: git-submodule.sh:581
+#: git-submodule.sh:582
#, sh-format
msgid "Unable to checkout '$sha1' in submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:582
+#: git-submodule.sh:583
#, sh-format
msgid "Submodule path '$sm_path': checked out '$sha1'"
msgstr ""
-#: git-submodule.sh:604 git-submodule.sh:927
+#: git-submodule.sh:605 git-submodule.sh:928
#, sh-format
msgid "Failed to recurse into submodule path '$sm_path'"
msgstr ""
-#: git-submodule.sh:712
-msgid "--"
-msgstr "--"
+#: git-submodule.sh:713
+msgid "--cached cannot be used with --files"
+msgstr "--cached non può essere usata con --files"
+
+#. unexpected type
+#: git-submodule.sh:753
+#, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "modalità $mod_dst inattesa"
-#: git-submodule.sh:770
+#: git-submodule.sh:771
#, sh-format
msgid " Warn: $name doesn't contain commit $sha1_src"
msgstr " Attenzione: $name non contiene commit $sha1_src"
-#: git-submodule.sh:773
+#: git-submodule.sh:774
#, sh-format
msgid " Warn: $name doesn't contain commit $sha1_dst"
msgstr " Attenzione: $name non contiene commit $sha1_dst"
-#: git-submodule.sh:776
+#: git-submodule.sh:777
#, sh-format
msgid " Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
msgstr " Attenzione: $name non contiene commit $sha1_src e $sha1_dst"
-#: git-submodule.sh:801
+#: git-submodule.sh:802
msgid "blob"
-msgstr ""
+msgstr "blob"
-#: git-submodule.sh:802
+#: git-submodule.sh:803
msgid "submodule"
+msgstr "sottomodulo"
+
+#: git-submodule.sh:840
+msgid "# Submodules changed but not updated:"
+msgstr ""
+
+#: git-submodule.sh:842
+msgid "# Submodule changes to be committed:"
msgstr ""
-#: git-submodule.sh:973
+#: git-submodule.sh:974
#, sh-format
msgid "Synchronizing submodule url for '$name'"
msgstr ""
+
+#~ msgid "--"
+#~ msgstr "--"
+
+#~ msgid "Could not extract email from committer identity."
+#~ msgstr ""
+#~ "Non è stato possibile estrarre l'indirizzo email dall'identità del "
+#~ "committer."
#
msgid ""
msgstr ""
-"Project-Id-Version: git-1.7.11-rc0-100-g5498c\n"
+"Project-Id-Version: git-1.7.11.rc2.2.gb694fbb\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2012-06-02 07:03+0800\n"
-"PO-Revision-Date: 2012-06-03 07:13+0700\n"
+"POT-Creation-Date: 2012-06-08 10:20+0800\n"
+"PO-Revision-Date: 2012-06-09 14:08+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
msgid "You need to set your committer info first"
msgstr "Bạn cần đặt thông tin về người chuyển giao mã nguồn trước đã"
+#: git-am.sh:95
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+"Bạn có lẽ đã có HEAD đã bị di chuyển đi kể từ lần 'am' thất bại cuối cùng.\n"
+"Không thể chuyển tới ORIG_HEAD"
+
+#: git-am.sh:105
+#, 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 ""
+"Khi bạn cần giải quyết vấn đề này hãy chạy lệnh \"$cmdline --resolved\".\n"
+"Nếu bạn có ý định bỏ qua miếng vá, thay vào đó bạn chạy \"$cmdline --skip\".\n"
+"Để phục hồi lại thành nhánh nguyên bản và dừng việc vá lại thì chạy \"$cmdline --abort\"."
+
+#: git-am.sh:121
+msgid "Cannot fall back to three-way merge."
+msgstr "Đang trở lại để hòa trộn kiểu 'three-way'."
+
#: git-am.sh:137
msgid "Repository lacks necessary blobs to fall back on 3-way merge."
msgstr "Kho thiếu đối tượng blob cần thiết để trở về trên '3-way merge'."
msgid "Dirty index: cannot apply patches (dirty: $files)"
msgstr "Bảng mục lục sai: không thể áp dụng các miếng vá (sai: $files)"
+#: git-am.sh:671
+#, 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 ""
+"Miếng vá trống rỗng. Nó đã bị chia cắt sai phải không?\n"
+"Nếu bạn thích bỏ qua miếng vá này, hãy chạy lệnh sau để thay thế \"$cmdline --skip\".\n"
+"Để phục hồi lại nhánh nguyên bản và dừng vá lại hãy chạy lệnh \"$cmdline --abort\"."
+
+#: git-am.sh:708
+msgid "Patch does not have a valid e-mail address."
+msgstr "Miếng vá không có địa chỉ e-mail hợp lệ."
+
#: git-am.sh:755
msgid "cannot be interactive without stdin connected to a terminal."
msgstr "không thể được tương tác mà không có stdin kết nối với một thiết bị cuối"
+#: git-am.sh:759
+msgid "Commit Body is:"
+msgstr "Thân của lần chuyển giao (commit) là:"
+
#. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
#. in your translation. The program will only accept English
#. input at this point.
msgid "Applying: $FIRSTLINE"
msgstr "Đang áp dụng (miếng vá): $FIRSTLINE"
+#: git-am.sh:823
+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 ""
+"Không có thay đổi nào - bạn đã quên sử dụng lệnh 'git add' à?\n"
+"Nếu ở đây không có gì còn lại stage, tình cờ là có một số thứ khác\n"
+"đã sẵn được đưa vào với cùng nội dung thay đổi; bạn có lẽ muốn bỏ qua miếng vá này."
+
+#: git-am.sh:831
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+"Bạn vẫn có những đường dẫn chưa được hòa trộn trong bảng mục lục của mình\n"
+"bạn đã quên sử dụng lệnh 'git add' à?"
+
#: git-am.sh:847
msgid "No changes -- Patch already applied."
msgstr "Không thay đổi gì cả -- Miếng vá đã được áp dụng rồi."
+#: git-am.sh:857
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "Vá gặp lỗi tại $msgnum $FIRSTLINE"
+
#: git-am.sh:873
msgid "applying to an empty history"
msgstr "áp dụng vào một lịch sử trống rỗng"
+#: git-bisect.sh:48
+msgid "You need to start by \"git bisect start\""
+msgstr "Bạn cần khởi đầu bằng \"git bisect start\""
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
msgid "'git bisect bad' can take only one argument."
msgstr "'git bisect bad' có thể lấy chỉ một đối số."
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:273
+msgid "Warning: bisecting only with a bad commit."
+msgstr "Cảnh báo: chỉ thực hiện việc bisect với một lần chuyển giao (commit) sai."
+
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
#. at this point.
msgid "Are you sure [Y/n]? "
msgstr "Bạn có chắc chắn chưa [Y/n]?"
+#: git-bisect.sh:289
+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 ""
+"Bạn phải chỉ cho tôi ít nhất một điểm xét duyệt tốt và một điểm sai.\n"
+"(Bạn có thể sử dụng \"git bisect bad\" và \"git bisect good\" cho cái đó.)"
+
+#: git-bisect.sh:292
+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 ""
+"Bạn cần bắt đầu bằng lệnh \"git bisect start\".\n"
+"Bạn sau đó cần phải chỉ cho tôi ít nhất một điểm xét duyệt đúng và một điểm sai.\n"
+"(Bạn có thể sử dụng \"git bisect bad\" và \"git bisect good\" cho chúng.)"
+
+#: git-bisect.sh:347
+#: git-bisect.sh:474
+msgid "We are not bisecting."
+msgstr "Chúng tôi không bisect."
+
#: git-bisect.sh:354
#, sh-format
msgid "'$invalid' is not a valid commit"
msgid "?? what are you talking about?"
msgstr "?? bạn đang nói gì thế?"
-#: git-bisect.sh:474
-msgid "We are not bisecting."
-msgstr "Chúng tôi không bisect."
+#: git-bisect.sh:420
+#, sh-format
+msgid "running $command"
+msgstr "đang chạy lệnh $command"
+
+#: git-bisect.sh:427
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+"chạy bisect gặp lỗi:\n"
+"mã trả về $res từ lệnh '$command' là < 0 hoặc >= 128"
+
+#: git-bisect.sh:453
+msgid "bisect run cannot continue any more"
+msgstr "bisect không thể tiếp tục thêm được nữa"
+
+#: git-bisect.sh:459
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+"chạy bisect gặp lỗi:\n"
+"'bisect_state $state' đã thoát ra với mã lỗi $res"
+
+#: git-bisect.sh:466
+msgid "bisect run success"
+msgstr "bisect chạy thành công"
#: git-pull.sh:21
msgid ""
msgid "updating an unborn branch with changes added to the index"
msgstr "đang cập nhật một nhánh chưa được sinh ra với các thay đổi được thêm vào bảng mục lục"
+#. 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:228
+#, sh-format
+msgid ""
+"Warning: fetch updated the current branch head.\n"
+"Warning: fast-forwarding your working tree from\n"
+"Warning: commit $orig_head."
+msgstr ""
+"Cảnh báo: fetch đã cập nhật head nhánh hiện tại.\n"
+"Cảnh báo: đang fast-forward cây làm việc của bạn từ\n"
+"Cảnh báo: commit $orig_head."
+
#: git-pull.sh:253
msgid "Cannot merge multiple branches into empty head"
msgstr "Không thể hòa trộn nhiều nhánh và trong một head trống rỗng"
msgid "Cannot record working tree state"
msgstr "Không thể ghi lại trạng thái cây làm việc hiện hành"
+#. 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. E.g. in
+#. English this is:
+#.
+#. $ git stash save --blah-blah 2>&1 | head -n 2
+#. error: unknown option for 'stash save': --blah-blah
+#. To provide a message, use git stash save -- '--blah-blah'
+#: git-stash.sh:202
+#, sh-format
+msgid ""
+"error: unknown option for 'stash save': $option\n"
+" To provide a message, use git stash save -- '$option'"
+msgstr ""
+"lỗi: không hiểu tùy chọn cho 'stash save': $option\n"
+" Để cung cấp một thông điệp, sử dụng git stash save -- '$option'"
+
#: git-stash.sh:223
msgid "No local changes to save"
msgstr "Không có thay đổi nội bộ nào được ghi lại"
msgid "Cannot unstage modified files"
msgstr "Không thể bỏ trạng thía của các tập tin đã được sửa chữa"
+#: git-stash.sh:474
+msgid "Index was not unstashed."
+msgstr "Bảng mục lục đã không được bỏ stash."
+
#: git-stash.sh:491
#, sh-format
msgid "Dropped ${REV} ($s)"
msgid "'$sm_path' already exists in the index"
msgstr "'$sm_path' thực sự đã tồn tại ở bảng mục lục rồi"
+#: git-submodule.sh:270
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$sm_path\n"
+"Use -f if you really want to add it."
+msgstr ""
+"Các đường dẫn theo sau đây sẽ bị lờ đi bởi một trong các tập tin .gitignore của bạn:\n"
+"$sm_path\n"
+"Sử dụng -f nếu bạn thực sự muốn thêm nó vào."
+
+#: git-submodule.sh:281
+#, sh-format
+msgid "Adding existing repo at '$sm_path' to the index"
+msgstr "Đang thêm repo có sẵn tại '$sm_path' vào bảng mục lục"
+
#: git-submodule.sh:283
#, sh-format
msgid "'$sm_path' already exists and is not a valid git repo"
msgstr "Gặp lỗi khi đệ quy vào trong đường dẫn mô-đun-con '$sm_path'"
#: git-submodule.sh:713
-msgid "--"
-msgstr "--"
+msgid "--cached cannot be used with --files"
+msgstr "--cached không thể được sử dụng cùng với --files"
+
+#. unexpected type
+#: git-submodule.sh:753
+#, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "chế độ không như mong chờ $mod_dst"
#: git-submodule.sh:771
#, sh-format
msgid "submodule"
msgstr "mô-đun con"
+#: git-submodule.sh:840
+msgid "# Submodules changed but not updated:"
+msgstr "# Những mô-đun-con đã bị thay đổi nhưng chưa được cập nhật:"
+
+#: git-submodule.sh:842
+msgid "# Submodule changes to be committed:"
+msgstr "# Những thay đổi mô-đun-con được chuyển giao (commit):"
+
#: git-submodule.sh:974
#, sh-format
msgid "Synchronizing submodule url for '$name'"
msgstr "Đang đồng bộ hóa url mô-đun-con cho '$name'"
+#~ msgid "--"
+#~ msgstr "--"
+
#~ msgid "Could not extract email from committer identity."
#~ msgstr ""
#~ "Không thể rút trích địa chỉ thư điện tử từ định danh người chuyển giao"
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2012-06-02 07:03+0800\n"
-"PO-Revision-Date: 2012-06-02 17:05+0800\n"
+"POT-Creation-Date: 2012-06-08 10:20+0800\n"
+"PO-Revision-Date: 2012-06-08 12:24+0800\n"
"Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n"
"Language-Team: GitHub <https://github.com/gotgit/git/>\n"
"Language: zh_CN\n"
msgid "You need to set your committer info first"
msgstr "您需要先设置你的提交者信息"
+#: git-am.sh:95
+msgid ""
+"You seem to have moved HEAD since the last 'am' failure.\n"
+"Not rewinding to ORIG_HEAD"
+msgstr ""
+"您好像在上一次 'am' 失败后移动了 HEAD。未回退至 ORIG_HEAD"
+
+#: git-am.sh:105
+#, 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 ""
+"当您解决了此问题后,执行 \"$cmdline --resolved\"。\n"
+"如果您想跳过此补丁,则执行 \"$cmdline --skip\"。\n"
+"要恢复原分支并停止打补丁,执行 \"$cmdline --abort\"。"
+
+#: git-am.sh:121
+msgid "Cannot fall back to three-way merge."
+msgstr "无法求助于三路合并。"
+
#: git-am.sh:137
msgid "Repository lacks necessary blobs to fall back on 3-way merge."
msgstr "版本库缺乏必要的 blob 数据以进行三路合并。"
#: git-am.sh:163
msgid "Falling back to patching base and 3-way merge..."
-msgstr "回退到补丁基础版本并使用三路合并..."
+msgstr "转而在基础版本上打补丁及进行三路合并..."
#: git-am.sh:275
msgid "Only one StGIT patch series can be applied at once"
msgid "Dirty index: cannot apply patches (dirty: $files)"
msgstr "脏的索引:不能应用补丁(脏文件:$files)"
+#: git-am.sh:671
+#, 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 ""
+"补丁为空。是不是切分错误?\n"
+"如果您想要跳过这个补丁,执行 \"$cmdline --skip\"。\n"
+"要恢复原分支并停止打补丁,执行 \"$cmdline --abort\"。"
+
+#: git-am.sh:708
+msgid "Patch does not have a valid e-mail address."
+msgstr "补丁中没有一个有效的邮件地址。"
+
#: git-am.sh:755
msgid "cannot be interactive without stdin connected to a terminal."
msgstr "标准输入没有和终端关联,不能进行交互式操作。"
+#: git-am.sh:759
+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
msgid "Applying: $FIRSTLINE"
msgstr "正应用:$FIRSTLINE"
+#: git-am.sh:823
+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 add'?\n"
+"如果没有什么要添加到暂存区的,则很可能是其它提交已经引入了相同的变更。\n"
+"您也许想要跳过这个补丁。"
+
+#: git-am.sh:831
+msgid ""
+"You still have unmerged paths in your index\n"
+"did you forget to use 'git add'?"
+msgstr ""
+"您的索引中仍有未合并的路径。您是否忘了执行 'git add'?"
+
#: git-am.sh:847
msgid "No changes -- Patch already applied."
msgstr "没有变更 -- 补丁已经应用过。"
+#: git-am.sh:857
+#, sh-format
+msgid "Patch failed at $msgnum $FIRSTLINE"
+msgstr "补丁失败于 $msgnum $FIRSTLINE"
+
#: git-am.sh:873
msgid "applying to an empty history"
msgstr "正应用到一个空历史上"
+#: git-bisect.sh:48
+msgid "You need to start by \"git bisect start\""
+msgstr "您需要执行 \"git bisect start\" 来开始"
+
# 译者:注意保持句尾空格
#. TRANSLATORS: Make sure to include [Y] and [n] in your
#. translation. The program will only accept English input
msgid "'git bisect bad' can take only one argument."
msgstr "'git bisect bad' 只能带一个参数。"
+#. have bad but not good. we could bisect although
+#. this is less optimum.
+#: git-bisect.sh:273
+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
msgid "Are you sure [Y/n]? "
msgstr "您确认么[Y/n]? "
+#: git-bisect.sh:289
+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 ""
+"您需要给我至少一个好版本和一个坏版本。\n"
+"(您可以用 \"git bisect bad\" 和 \"git bisect good\" 命令来标识。)"
+
+#: git-bisect.sh:292
+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 start\" 来开始。\n"
+"然后需要提供我至少一个好版本和一个坏版本。\n"
+"(您可以用 \"git bisect bad\" 和 \"git bisect good\" 命令来标识。)"
+
+#: git-bisect.sh:347 git-bisect.sh:474
+msgid "We are not bisecting."
+msgstr "我们没有在二分查找。"
+
#: git-bisect.sh:354
#, sh-format
msgid "'$invalid' is not a valid commit"
msgid "?? what are you talking about?"
msgstr "?? 您在说什么?"
-#: git-bisect.sh:474
-msgid "We are not bisecting."
-msgstr "我们没有在二分查找。"
+#: git-bisect.sh:420
+#, sh-format
+msgid "running $command"
+msgstr "运行 $command"
+
+#: git-bisect.sh:427
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"exit code $res from '$command' is < 0 or >= 128"
+msgstr ""
+"二分查找运行失败:\n"
+"命令 '$command' 的退出码 $res 或者小于 0 或者大于等于 128"
+
+#: git-bisect.sh:453
+msgid "bisect run cannot continue any more"
+msgstr "二分查找不能继续运行"
+
+#: git-bisect.sh:459
+#, sh-format
+msgid ""
+"bisect run failed:\n"
+"'bisect_state $state' exited with error code $res"
+msgstr ""
+"二分查找运行失败:\n"
+"'bisect_state $state' 退出码为 $res"
+
+#: git-bisect.sh:466
+msgid "bisect run success"
+msgstr "二分查找运行成功"
#: git-pull.sh:21
msgid ""
msgid "updating an unborn branch with changes added to the index"
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:228
+#, sh-format
+msgid ""
+"Warning: fetch updated the current branch head.\n"
+"Warning: fast-forwarding your working tree from\n"
+"Warning: commit $orig_head."
+msgstr ""
+"警告:fetch 更新了当前的分支。您的工作区\n"
+"警告:从原提交 $orig_head 快进。"
+
#: git-pull.sh:253
msgid "Cannot merge multiple branches into empty head"
msgstr "无法将多个分支合并到空分支"
msgid "Cannot record working tree state"
msgstr "不能记录工作区状态"
+#. 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. E.g. in
+#. English this is:
+#.
+#. $ git stash save --blah-blah 2>&1 | head -n 2
+#. error: unknown option for 'stash save': --blah-blah
+#. To provide a message, use git stash save -- '--blah-blah'
+#: git-stash.sh:202
+#, sh-format
+msgid ""
+"error: unknown option for 'stash save': $option\n"
+" To provide a message, use git stash save -- '$option'"
+msgstr ""
+"错误:'stash save' 的未知选项:$option\n"
+" 要提供一个描述信息,使用 git stash save -- '$option'"
+
#: git-stash.sh:223
msgid "No local changes to save"
msgstr "没有要保存的本地修改"
msgid "Cannot unstage modified files"
msgstr "无法还原修改的文件"
+#: git-stash.sh:474
+msgid "Index was not unstashed."
+msgstr "索引的进度没有被恢复。"
+
#: git-stash.sh:491
#, sh-format
msgid "Dropped ${REV} ($s)"
msgid "'$sm_path' already exists in the index"
msgstr "'$sm_path' 已经存在于索引中"
+#: git-submodule.sh:270
+#, sh-format
+msgid ""
+"The following path is ignored by one of your .gitignore files:\n"
+"$sm_path\n"
+"Use -f if you really want to add it."
+msgstr ""
+"以下路径被您的一个 .gitignore 文件所忽略:\n"
+"$sm_path\n"
+"如果您确实想添加它,使用 -f 参数。"
+
+#: git-submodule.sh:281
+#, sh-format
+msgid "Adding existing repo at '$sm_path' to the index"
+msgstr "添加位于 '$sm_path' 的现存版本库到索引"
+
#: git-submodule.sh:283
#, sh-format
msgid "'$sm_path' already exists and is not a valid git repo"
msgstr "无法递归进子模组路径 '$sm_path'"
#: git-submodule.sh:713
-msgid "--"
-msgstr "--"
+msgid "--cached cannot be used with --files"
+msgstr "--cached 不能和 --files 共用"
+
+#. unexpected type
+#: git-submodule.sh:753
+#, sh-format
+msgid "unexpected mode $mod_dst"
+msgstr "意外的模式 $mod_dst"
# 译者:注意保持前导空格
#: git-submodule.sh:771
msgid "submodule"
msgstr "子模组"
+#: git-submodule.sh:840
+msgid "# Submodules changed but not updated:"
+msgstr "# 子模组已修改但尚未更新:"
+
+#: git-submodule.sh:842
+msgid "# Submodule changes to be committed:"
+msgstr "要提交的子模组变更:"
+
#: git-submodule.sh:974
#, sh-format
msgid "Synchronizing submodule url for '$name'"
msgstr "为 '$name' 同步子模组 url"
-
-#~ msgid "Could not extract email from committer identity."
-#~ msgstr "不能从提交者身份中提取邮件地址。"
-
-#~ msgid "cherry-pick"
-#~ msgstr "拣选"
-
-#~ msgid "Please enter the commit message for your changes."
-#~ msgstr "请为您的修改输入提交说明。"
-
-#~ msgid "Too many options specified"
-#~ msgstr "指定了太多的选项"
if (has_rerere_resolution(name)) {
if (!merge(name, path)) {
- if (rerere_autoupdate)
+ const char *msg;
+ if (rerere_autoupdate) {
string_list_insert(&update, path);
- fprintf(stderr,
- "%s '%s' using previous resolution.\n",
- rerere_autoupdate
- ? "Staged" : "Resolved",
- path);
+ msg = "Staged '%s' using previous resolution.\n";
+ } else
+ msg = "Resolved '%s' using previous resolution.\n";
+ fprintf(stderr, msg, path);
goto mark_resolved;
}
}
* but the latter we have checked in the main loop.
*/
for (j = i; j < argc; j++)
- verify_filename(revs->prefix, argv[j]);
+ verify_filename(revs->prefix, argv[j], j == i);
append_prune_data(&prune_data, argv + i);
break;
die_errno("failed to stat '%s'", arg);
}
-static void NORETURN die_verify_filename(const char *prefix, const char *arg)
+static void NORETURN die_verify_filename(const char *prefix,
+ const char *arg,
+ int diagnose_misspelt_rev)
{
unsigned char sha1[20];
unsigned mode;
+ if (!diagnose_misspelt_rev)
+ die("%s: no such path in the working tree.\n"
+ "Use '-- <path>...' to specify paths that do not exist locally.",
+ arg);
/*
* Saying "'(icase)foo' does not exist in the index" when the
* user gave us ":(icase)foo" is just stupid. A magic pathspec
* as true, because even if such a filename were to exist, we want
* it to be preceded by the "--" marker (or we want the user to
* use a format like "./-filename")
+ *
+ * The "diagnose_misspelt_rev" is used to provide a user-friendly
+ * diagnosis when dying upon finding that "name" is not a pathname.
+ * If set to 1, the diagnosis will try to diagnose "name" as an
+ * invalid object name (e.g. HEAD:foo). If set to 0, the diagnosis
+ * will only complain about an inexisting file.
+ *
+ * This function is typically called to check that a "file or rev"
+ * argument is unambiguous. In this case, the caller will want
+ * diagnose_misspelt_rev == 1 when verifying the first non-rev
+ * argument (which could have been a revision), and
+ * diagnose_misspelt_rev == 0 for the next ones (because we already
+ * saw a filename, there's not ambiguity anymore).
*/
-void verify_filename(const char *prefix, const char *arg)
+void verify_filename(const char *prefix,
+ const char *arg,
+ int diagnose_misspelt_rev)
{
if (*arg == '-')
die("bad flag '%s' used after filename", arg);
if (check_filename(prefix, arg))
return;
- die_verify_filename(prefix, arg);
+ die_verify_filename(prefix, arg, diagnose_misspelt_rev);
}
/*
if (new_filename)
filename = new_filename;
ret = get_tree_entry(tree_sha1, filename, sha1, &oc->mode);
- if (only_to_die) {
+ if (ret && only_to_die) {
diagnose_invalid_sha1_path(prefix, filename,
tree_sha1, object_name);
free(object_name);
'
+test_expect_success 'index-pack' '
+ git clone file://"`pwd`"/.git foo &&
+ GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
+'
+
test_expect_success 'repack' '
git repack -ad
'
+test_expect_success 'pack-objects with large loose object' '
+ SHA1=`git hash-object huge` &&
+ test_create_repo loose &&
+ echo $SHA1 | git pack-objects --stdout |
+ GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects &&
+ echo $SHA1 | GIT_DIR=loose/.git git pack-objects pack &&
+ test_create_repo packed &&
+ mv pack-* packed/.git/objects/pack &&
+ GIT_DIR=packed/.git git cat-file blob $SHA1 >actual &&
+ cmp huge actual
+'
+
test_expect_success 'tar achiving' '
git archive --format=tar HEAD >/dev/null
'
# We need an arbitrary other user give permission to using ACLs. root
# is a good candidate: exists on all unices, and it has permission
# anyway, so we don't create a security hole running the testsuite.
-
-setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
-setfacl_ret=$?
-
-if test $setfacl_ret != 0
-then
- say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
-else
- test_set_prereq SETFACL
-fi
+test_expect_success 'checking for a working acl setup' '
+ if setfacl -m d:m:rwx -m u:root:rwx . &&
+ getfacl . | grep user:root:rwx &&
+ touch should-have-readable-acl &&
+ getfacl should-have-readable-acl | egrep "mask::?rw-"
+ then
+ test_set_prereq SETFACL
+ fi
+'
if test -z "$LOGNAME"
then
grep "BUG: startup_info struct is not initialized." error
'
+test_expect_success '<commit>:file correctly diagnosed after a pathname' '
+ test_must_fail git rev-parse file.txt HEAD:file.txt 1>actual 2>error &&
+ test_i18ngrep ! "exists on disk" error &&
+ test_i18ngrep "no such path in the working tree" error &&
+ cat >expect <<-\EOF &&
+ file.txt
+ HEAD:file.txt
+ EOF
+ test_cmp expect actual
+'
+
test_done
test_i18ncmp expected current
'
+test_expect_success 'diff --shortstat output for binary file change' '
+ echo " 4 files changed, 2 insertions(+), 2 deletions(-)" >expected &&
+ git diff --shortstat >current &&
+ test_i18ncmp expected current
+'
+
+test_expect_success 'diff --shortstat output for binary file change only' '
+ echo " 1 file changed, 0 insertions(+), 0 deletions(-)" >expected &&
+ git diff --shortstat -- b >current &&
+ test_i18ncmp expected current
+'
+
test_expect_success 'apply --numstat notices binary file change' '
git diff >diff &&
git apply --numstat <diff >current &&
git diff --exit-code master
'
-test_expect_success 'am with dos files config am.keepcr overriden by --no-keep-cr' '
+test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' '
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr-override initial &&
git format-patch -k initial..master &&
git diff --exit-code master
'
-test_expect_success 'am with unix files config am.keepcr overriden by --no-keep-cr' '
+test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' '
git config am.keepcr 1 &&
git checkout -b unixfiles-conf-keepcr-override initial &&
cp -f file1 file &&
'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
grep "SHA1 COLLISION FOUND" msg'
+test_expect_success \
+ 'make sure index-pack detects the SHA1 collision (large blobs)' \
+ 'test_must_fail git -c core.bigfilethreshold=1 index-pack -o bad.idx test-3.pack 2>msg &&
+ grep "SHA1 COLLISION FOUND" msg'
+
test_done
test_must_fail git clone not-a-git-repo not-a-git-repo-clone
'
+test_expect_success 'cloning file:// does not hardlink' '
+ git clone --bare file://"$(pwd)"/a non-local &&
+ ! repo_is_hardlinked non-local
+'
+
+test_expect_success 'cloning a local path with --no-local does not hardlink' '
+ git clone --bare --no-local a force-nonlocal &&
+ ! repo_is_hardlinked force-nonlocal
+'
+
test_done
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left:
Left #5
Left #4
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left: (5 commits)
Left #5
Left #4
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left:
Left #5
Left #4
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left: (5 commits)
Left #5
Left #4
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left:
Left #5
Left #4
cat >expected.log <<-EOF &&
Sync with left
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* ${apos}left${apos} of $(pwd):
Left #5
Left #4
cat >expected <<-EOF
Merge branches ${apos}left${apos} and ${apos}right${apos}
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left:
Left #5
Left #4
Common #2
Common #1
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* tag ${apos}tag-l5${apos}:
Left #5
Left #4
Common #2
Common #1
- By Another Author (3) and A U Thor (2)
- via Another Committer
+ # By Another Author (3) and A U Thor (2)
+ # Via Another Committer
* left:
Left #5
Left #4
grep :1 git.marks'
test_expect_success \
- 'R: export-marks options can be overriden by commandline options' \
+ 'R: export-marks options can be overridden by commandline options' \
'cat input | git fast-import --export-marks=other.marks &&
grep :1 other.marks'
. ./gitweb-lib.sh
+#
+# Gitweb only provides the functionality tested by the 'modification times'
+# tests if it can access a date parser from one of these modules:
+#
+perl -MHTTP::Date -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER
+perl -MTime::ParseDate -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER
+
# ----------------------------------------------------------------------
# snapshot settings
# ----------------------------------------------------------------------
# modification times (Last-Modified and If-Modified-Since)
-test_expect_success 'modification: feed last-modified' '
+test_expect_success DATE_PARSER 'modification: feed last-modified' '
gitweb_run "p=.git;a=atom;h=master" &&
grep "Status: 200 OK" gitweb.headers &&
grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: feed if-modified-since (modified)' '
+test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)' '
export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
gitweb_run "p=.git;a=atom;h=master" &&
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: feed if-modified-since (unmodified)' '
+test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodified)' '
export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
gitweb_run "p=.git;a=atom;h=master" &&
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: snapshot last-modified' '
+test_expect_success DATE_PARSER 'modification: snapshot last-modified' '
gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
grep "Status: 200 OK" gitweb.headers &&
grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: snapshot if-modified-since (modified)' '
+test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modified)' '
export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: snapshot if-modified-since (unmodified)' '
+test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmodified)' '
export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
'
test_debug 'cat gitweb.headers'
-test_expect_success 'modification: tree snapshot' '
+test_expect_success DATE_PARSER 'modification: tree snapshot' '
ID=`git rev-parse --verify HEAD^{tree}` &&
export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
local _cword
_words=( $1 )
(( _cword = ${#_words[@]} - 1 ))
- __git_wrap_main_git && print_comp
+ __git_wrap__git_main && print_comp
}
test_completion ()
o->el = ⪙
}
+ if (o->dir) {
+ o->path_exclude_check = xmalloc(sizeof(struct path_exclude_check));
+ path_exclude_check_init(o->path_exclude_check, o->dir);
+ }
memset(&o->result, 0, sizeof(o->result));
o->result.initialized = 1;
o->result.timestamp.sec = o->src_index->timestamp.sec;
done:
free_excludes(&el);
+ if (o->path_exclude_check) {
+ path_exclude_check_clear(o->path_exclude_check);
+ free(o->path_exclude_check);
+ }
return ret;
return_failed:
if (ignore_case && icase_exists(o, name, len, st))
return 0;
- if (o->dir && excluded(o->dir, name, &dtype))
+ if (o->dir &&
+ path_excluded(o->path_exclude_check, name, -1, &dtype))
/*
* ce->name is explicitly excluded, so it is Ok to
* overwrite it.
const char *prefix;
int cache_bottom;
struct dir_struct *dir;
+ struct path_exclude_check *path_exclude_check;
struct pathspec *pathspec;
merge_fn_t fn;
const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
--- /dev/null
+#include "git-compat-util.h"
+#include "version.h"
+
+const char git_version_string[] = GIT_VERSION;
+
+const char *git_user_agent(void)
+{
+ static const char *agent = NULL;
+
+ if (!agent) {
+ agent = getenv("GIT_USER_AGENT");
+ if (!agent)
+ agent = GIT_USER_AGENT;
+ }
+
+ return agent;
+}
--- /dev/null
+#ifndef VERSION_H
+#define VERSION_H
+
+extern const char git_version_string[];
+
+const char *git_user_agent(void);
+
+#endif /* VERSION_H */