diff options
103 files changed, 2505 insertions, 1196 deletions
diff --git a/Documentation/RelNotes/1.8.4.1.txt b/Documentation/RelNotes/1.8.4.1.txt new file mode 100644 index 0000000000..3aa25a2743 --- /dev/null +++ b/Documentation/RelNotes/1.8.4.1.txt @@ -0,0 +1,71 @@ +Git v1.8.4.1 Release Notes +======================== + +Fixes since v1.8.4 +------------------ + + * Some old versions of bash do not grok some constructs like + 'printf -v varname' which the prompt and completion code started + to use recently. The completion and prompt scripts have been + adjusted to work better with these old versions of bash. + + * In FreeBSD's and NetBSD's "sh", a return in a dot script in a + function returns from the function, not only in the dot script, + breaking "git rebase" on these platforms (regression introduced + in 1.8.4-rc1). + + * "git rebase -i" and other scripted commands were feeding a + random, data dependant error message to 'echo' and expecting it + to come out literally. + + * Setting the "submodule.<name>.path" variable to the empty + "true" caused the configuration parser to segfault. + + * Output from "git log --full-diff -- <pathspec>" looked strange + because comparison was done with the previous ancestor that + touched the specified <pathspec>, causing the patches for paths + outside the pathspec to show more than the single commit has + changed. + + * The auto-tag-following code in "git fetch" tries to reuse the + same transport twice when the serving end does not cooperate and + does not give tags that point to commits that are asked for as + part of the primary transfer. Unfortunately, Git-aware transport + helper interface is not designed to be used more than once, hence + this did not work over smart-http transfer. Fixed. + + * Send a large request to read(2)/write(2) as a smaller but still + reasonably large chunks, which would improve the latency when the + operation needs to be killed and incidentally works around broken + 64-bit systems that cannot take a 2GB write or read in one go. + + * A ".mailmap" file that ends with an incomplete line, when read + from a blob, was not handled properly. + + * The recent "short-cut clone connectivity check" topic broke a + shallow repository when a fetch operation tries to auto-follow + tags. + + * When send-email comes up with an error message to die with upon + failure to start an SSL session, it tried to read the error + string from a wrong place. + + * A call to xread() was used without a loop to cope with short + read in the codepath to stream large blobs to a pack. + + * On platforms with fgetc() and friends defined as macros, the + configuration parser did not compile. + + * New versions of MediaWiki introduced a new API for returning + more than 500 results in response to a query, which would cause + the MediaWiki remote helper to go into an infinite loop. + + * Subversion's serf access method (the only one available in + Subversion 1.8) for http and https URLs in skelta mode tells its + caller to open multiple files at a time, which made "git svn + fetch" complain that "Temp file with moniker 'svn_delta' already + in use" instead of fetching. + + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.4.2.txt b/Documentation/RelNotes/1.8.4.2.txt new file mode 100644 index 0000000000..9adccb1efb --- /dev/null +++ b/Documentation/RelNotes/1.8.4.2.txt @@ -0,0 +1,77 @@ +Git v1.8.4.2 Release Notes +======================== + +Fixes since v1.8.4.1 +-------------------- + + * "git clone" gave some progress messages to the standard output, not + to the standard error, and did not allow suppressing them with the + "--no-progress" option. + + * "format-patch --from=<whom>" forgot to omit unnecessary in-body + from line, i.e. when <whom> is the same as the real author. + + * "git shortlog" used to choke and die when there is a malformed + commit (e.g. missing authors); it now simply ignore such a commit + and keeps going. + + * "git merge-recursive" did not parse its "--diff-algorithm=" command + line option correctly. + + * "git branch --track" had a minor regression in v1.8.3.2 and later + that made it impossible to base your local work on anything but a + local branch of the upstream repository you are tracking from. + + * "git ls-files -k" needs to crawl only the part of the working tree + that may overlap the paths in the index to find killed files, but + shared code with the logic to find all the untracked files, which + made it unnecessarily inefficient. + + * When there is no sufficient overlap between old and new history + during a "git fetch" into a shallow repository, objects that the + sending side knows the receiving end has were unnecessarily sent. + + * When running "fetch -q", a long silence while the sender side + computes the set of objects to send can be mistaken by proxies as + dropped connection. The server side has been taught to send a + small empty messages to keep the connection alive. + + * When the webserver responds with "405 Method Not Allowed", "git + http-backend" should tell the client what methods are allowed with + the "Allow" header. + + * "git cvsserver" computed the permission mode bits incorrectly for + executable files. + + * The implementation of "add -i" has a crippling code to work around + ActiveState Perl limitation but it by mistake also triggered on Git + for Windows where MSYS perl is used. + + * We made sure that we notice the user-supplied GIT_DIR is actually a + gitfile, but did not do the same when the default ".git" is a + gitfile. + + * When an object is not found after checking the packfiles and then + loose object directory, read_sha1_file() re-checks the packfiles to + prevent racing with a concurrent repacker; teach the same logic to + has_sha1_file(). + + * "git commit --author=$name", when $name is not in the canonical + "A. U. Thor <au.thor@example.xz>" format, looks for a matching name + from existing history, but did not consult mailmap to grab the + preferred author name. + + * The commit object names in the insn sheet that was prepared at the + beginning of "rebase -i" session can become ambiguous as the + rebasing progresses and the repository gains more commits. Make + sure the internal record is kept with full 40-hex object names. + + * "git rebase --preserve-merges" internally used the merge machinery + and as a side effect, left merge summary message in the log, but + when rebasing, there should not be a need for merge summary. + + * "git rebase -i" forgot that the comment character can be + configurable while reading its insn sheet. + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.4.3.txt b/Documentation/RelNotes/1.8.4.3.txt new file mode 100644 index 0000000000..afb33598d0 --- /dev/null +++ b/Documentation/RelNotes/1.8.4.3.txt @@ -0,0 +1,36 @@ +Git v1.8.4.3 Release Notes +======================== + +Fixes since v1.8.4.2 +-------------------- + + * "git rev-list --objects ^v1.0^ v1.0" gave v1.0 tag itself in the + output, but "git rev-list --objects v1.0^..v1.0" did not. + + * The fall-back parsing of commit objects with broken author or + committer lines were less robust than ideal in picking up the + timestamps. + + * Bash prompting code to deal with an SVN remote as an upstream + were coded in a way not supported by older Bash versions (3.x). + + * "git checkout topic", when there is not yet a local "topic" branch + but there is a unique remote-tracking branch for a remote "topic" + branch, pretended as if "git checkout -t -b topic remote/$r/topic" + (for that unique remote $r) was run. This hack however was not + implemented for "git checkout topic --". + + * Coloring around octopus merges in "log --graph" output was screwy. + + * We did not generate HTML version of documentation to "git subtree" + in contrib/. + + * The synopsis section of "git unpack-objects" documentation has been + clarified a bit. + + * An ancient How-To on serving Git repositories on an HTTP server + lacked a warning that it has been mostly superseded with more + modern way. + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/config.txt b/Documentation/config.txt index ec57a15ac5..6b35578711 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2216,6 +2216,17 @@ uploadpack.allowtipsha1inwant:: of a hidden ref (by default, such a request is rejected). see also `uploadpack.hiderefs`. +uploadpack.keepalive:: + When `upload-pack` has started `pack-objects`, there may be a + quiet period while `pack-objects` prepares the pack. Normally + it would output progress information, but if `--quiet` was used + for the fetch, `pack-objects` will output nothing at all until + the pack data begins. Some clients and networks may consider + the server to be hung and give up. Setting this option instructs + `upload-pack` to send an empty keepalive packet every + `uploadpack.keepalive` seconds. Setting this option to 0 + disables keepalive packets entirely. The default is 5 seconds. + url.<base>.insteadOf:: Any URL that starts with this value will be rewritten to start, instead, with <base>. In cases where some site serves a diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b7cb625b89..311b33674e 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -48,7 +48,8 @@ working tree to it; use "git checkout <newbranch>" to switch to the new branch. When a local branch is started off a remote-tracking branch, Git sets up the -branch so that 'git pull' will appropriately merge from +branch (specifically the `branch.<name>.remote` and `branch.<name>.merge` +configuration entries) so that 'git pull' will appropriately merge from the remote-tracking branch. This behavior may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options, and @@ -156,7 +157,8 @@ This option is only applicable in non-verbose mode. -t:: --track:: - When creating a new branch, set up configuration to mark the + When creating a new branch, set up `branch.<name>.remote` and + `branch.<name>.merge` configuration entries to mark the start-point branch as "upstream" from the new branch. This configuration will tell git to show the relationship between the two branches in `git status` and `git branch -v`. Furthermore, diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 8c7f2f66d8..439545926e 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] - [-s <strategy>] [-X <strategy-option>] + [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]] [--[no-]rerere-autoupdate] [-m <msg>] [<commit>...] 'git merge' <msg> HEAD <commit>... 'git merge' --abort @@ -65,6 +65,10 @@ OPTIONS ------- include::merge-options.txt[] +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: + GPG-sign the resulting merge commit. + -m <msg>:: Set the commit message to be used for the merge commit (in case one is created). @@ -186,11 +190,11 @@ In such a case, you can "unwrap" the tag yourself before feeding it to `git merge`, or pass `--ff-only` when you do not have any work on your own. e.g. ---- +---- git fetch origin git merge v1.2.3^0 git merge --ff-only v1.2.3 ---- +---- HOW CONFLICTS ARE PRESENTED diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index 80dc022ede..6738055bd3 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -14,7 +14,7 @@ SYNOPSIS DESCRIPTION ----------- -This program searches the `$GIT_OBJECT_DIR` for all objects that currently +This program searches the `$GIT_OBJECT_DIRECTORY` for all objects that currently exist in a pack file as well as the independent object directories. All such extra objects are removed. diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt index ff23494e70..12cb108b85 100644 --- a/Documentation/git-unpack-objects.txt +++ b/Documentation/git-unpack-objects.txt @@ -9,7 +9,7 @@ git-unpack-objects - Unpack objects from a packed archive SYNOPSIS -------- [verse] -'git unpack-objects' [-n] [-q] [-r] [--strict] <pack-file +'git unpack-objects' [-n] [-q] [-r] [--strict] < <pack-file> DESCRIPTION diff --git a/Documentation/git.txt b/Documentation/git.txt index dca11cc96e..90c5f37ceb 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,9 +43,11 @@ unreleased) version of Git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.8.4/git.html[documentation for release 1.8.4] +* link:v1.8.4.2/git.html[documentation for release 1.8.4.2] * release notes for + link:RelNotes/1.8.4.2.txt[1.8.4.2], + link:RelNotes/1.8.4.1.txt[1.8.4.1], link:RelNotes/1.8.4.txt[1.8.4]. * link:v1.8.3.4/git.html[documentation for release 1.8.3.4] diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index 54e334e3af..f971960512 100644 --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@ -113,12 +113,12 @@ full pathname may have special meaning: - A leading "`**`" followed by a slash means match in all directories. For example, "`**/foo`" matches file or directory - "`foo`" anywhere, the same as pattern "`foo`". "**/foo/bar" + "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`" matches file or directory "`bar`" anywhere that is directly under directory "`foo`". - - A trailing "/**" matches everything inside. For example, - "abc/**" matches all files inside directory "abc", relative + - A trailing "`/**`" matches everything inside. For example, + "`abc/**`" matches all files inside directory "`abc`", relative to the location of the `.gitignore` file, with infinite depth. - A slash followed by two consecutive asterisks then a slash diff --git a/Documentation/howto/setup-git-server-over-http.txt b/Documentation/howto/setup-git-server-over-http.txt index 7f4943e102..c8036492e6 100644 --- a/Documentation/howto/setup-git-server-over-http.txt +++ b/Documentation/howto/setup-git-server-over-http.txt @@ -6,6 +6,10 @@ Content-type: text/asciidoc How to setup Git server over http ================================= +NOTE: This document is from 2006. A lot has happened since then, and this +document is now relevant mainly if your web host is not CGI capable. +Almost everyone else should instead look at linkgit:git-http-backend[1]. + Since Apache is one of those packages people like to compile themselves while others prefer the bureaucrat's dream Debian, it is impossible to give guidelines which will work for everyone. Just send diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 06026eaed7..d801493b23 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.8.4 +DEF_VER=v1.8.4.2 LF=' ' @@ -69,9 +69,6 @@ all:: # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt # doesn't support GNU extensions like --check and --statistics # -# Define NEEDS_CLIPPED_WRITE if your write(2) cannot write more than -# INT_MAX bytes at once (e.g. MacOS X). -# # Define HAVE_PATHS_H if you have paths.h and want to use the default PATH # it specifies. # @@ -1493,11 +1490,6 @@ ifndef NO_MSGFMT_EXTENDED_OPTIONS MSGFMT += --check --statistics endif -ifdef NEEDS_CLIPPED_WRITE - BASIC_CFLAGS += -DNEEDS_CLIPPED_WRITE - COMPAT_OBJS += compat/clipped-write.o -endif - ifneq (,$(XDL_FAST_HASH)) BASIC_CFLAGS += -DXDL_FAST_HASH endif @@ -1 +1 @@ -Documentation/RelNotes/1.8.4.txt
\ No newline at end of file +Documentation/RelNotes/1.8.4.3.txt
\ No newline at end of file @@ -624,7 +624,7 @@ static void bisect_common(struct rev_info *revs) if (prepare_revision_walk(revs)) die("revision walk setup failed"); if (revs->tree_objects) - mark_edges_uninteresting(revs->commits, revs, NULL); + mark_edges_uninteresting(revs, NULL); } static void exit_if_skipped_commits(struct commit_list *tried, @@ -203,8 +203,7 @@ static int check_tracking_branch(struct remote *remote, void *cb_data) struct refspec query; memset(&query, 0, sizeof(struct refspec)); query.dst = tracking_branch; - return !(remote_find_tracking(remote, &query) || - prefixcmp(query.src, "refs/heads/")); + return !remote_find_tracking(remote, &query); } static int validate_remote_tracking_branch(char *ref) diff --git a/builtin/checkout.c b/builtin/checkout.c index 7025938ae3..22cc7fcb59 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -880,7 +880,9 @@ static int parse_branchname_arg(int argc, const char **argv, int argcount = 0; unsigned char branch_rev[20]; const char *arg; - int has_dash_dash; + int dash_dash_pos; + int has_dash_dash = 0; + int i; /* * case 1: git checkout <ref> -- [<paths>] @@ -892,20 +894,30 @@ static int parse_branchname_arg(int argc, const char **argv, * * everything after the '--' must be paths. * - * case 3: git checkout <something> [<paths>] + * case 3: git checkout <something> [--] * - * With no paths, if <something> is a commit, that is to - * switch to the branch or detach HEAD at it. As a special case, - * if <something> is A...B (missing A or B means HEAD but you can - * omit at most one side), and if there is a unique merge base - * between A and B, A...B names that merge base. + * (a) If <something> is a commit, that is to + * switch to the branch or detach HEAD at it. As a special case, + * if <something> is A...B (missing A or B means HEAD but you can + * omit at most one side), and if there is a unique merge base + * between A and B, A...B names that merge base. * - * With no paths, if <something> is _not_ a commit, no -t nor -b - * was given, and there is a tracking branch whose name is - * <something> in one and only one remote, then this is a short-hand - * to fork local <something> from that remote-tracking branch. + * (b) If <something> is _not_ a commit, either "--" is present + * or <something> is not a path, no -t nor -b was given, and + * and there is a tracking branch whose name is <something> + * in one and only one remote, then this is a short-hand to + * fork local <something> from that remote-tracking branch. * - * Otherwise <something> shall not be ambiguous. + * (c) Otherwise, if "--" is present, treat it like case (1). + * + * (d) Otherwise : + * - if it's a reference, treat it like case (1) + * - else if it's a path, treat it like case (2) + * - else: fail. + * + * case 4: git checkout <something> <paths> + * + * The first argument must not be ambiguous. * - If it's *only* a reference, treat it like case (1). * - If it's only a path, treat it like case (2). * - else: fail. @@ -914,28 +926,59 @@ static int parse_branchname_arg(int argc, const char **argv, if (!argc) return 0; - if (!strcmp(argv[0], "--")) /* case (2) */ - return 1; - arg = argv[0]; - has_dash_dash = (argc > 1) && !strcmp(argv[1], "--"); + dash_dash_pos = -1; + for (i = 0; i < argc; i++) { + if (!strcmp(argv[i], "--")) { + dash_dash_pos = i; + break; + } + } + if (dash_dash_pos == 0) + return 1; /* case (2) */ + else if (dash_dash_pos == 1) + has_dash_dash = 1; /* case (3) or (1) */ + else if (dash_dash_pos >= 2) + die(_("only one reference expected, %d given."), dash_dash_pos); if (!strcmp(arg, "-")) arg = "@{-1}"; if (get_sha1_mb(arg, rev)) { - if (has_dash_dash) /* case (1) */ - die(_("invalid reference: %s"), arg); - if (dwim_new_local_branch_ok && - !check_filename(NULL, arg) && - argc == 1) { + /* + * Either case (3) or (4), with <something> not being + * a commit, or an attempt to use case (1) with an + * invalid ref. + * + * It's likely an error, but we need to find out if + * we should auto-create the branch, case (3).(b). + */ + int recover_with_dwim = dwim_new_local_branch_ok; + + if (check_filename(NULL, arg) && !has_dash_dash) + recover_with_dwim = 0; + /* + * Accept "git checkout foo" and "git checkout foo --" + * as candidates for dwim. + */ + if (!(argc == 1 && !has_dash_dash) && + !(argc == 2 && has_dash_dash)) + recover_with_dwim = 0; + + if (recover_with_dwim) { const char *remote = unique_tracking_name(arg, rev); - if (!remote) - return argcount; - *new_branch = arg; - arg = remote; - /* DWIMmed to create local branch */ - } else { + if (remote) { + *new_branch = arg; + arg = remote; + /* DWIMmed to create local branch, case (3).(b) */ + } else { + recover_with_dwim = 0; + } + } + + if (!recover_with_dwim) { + if (has_dash_dash) + die(_("invalid reference: %s"), arg); return argcount; } } @@ -965,7 +1008,7 @@ static int parse_branchname_arg(int argc, const char **argv, if (!*source_tree) /* case (1): want a tree */ die(_("reference is not a tree: %s"), arg); - if (!has_dash_dash) {/* case (3 -> 1) */ + if (!has_dash_dash) {/* case (3).(d) -> (1) */ /* * Do not complain the most common case * git checkout branch diff --git a/builtin/clone.c b/builtin/clone.c index 63f298be9c..552f3409e3 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -944,6 +944,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) our_head_points_at = remote_head_points_at; } else { + if (option_branch) + die(_("Remote branch %s not found in upstream %s"), + option_branch, option_origin); + warning(_("You appear to have cloned an empty repository.")); mapped_refs = NULL; our_head_points_at = NULL; diff --git a/builtin/commit.c b/builtin/commit.c index 10acc53f80..a48a7fe59c 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -30,6 +30,7 @@ #include "column.h" #include "sequencer.h" #include "notes-utils.h" +#include "mailmap.h" static const char * const builtin_commit_usage[] = { N_("git commit [options] [--] <pathspec>..."), @@ -935,6 +936,7 @@ static const char *find_author_by_nickname(const char *name) struct rev_info revs; struct commit *commit; struct strbuf buf = STRBUF_INIT; + struct string_list mailmap = STRING_LIST_INIT_NODUP; const char *av[20]; int ac = 0; @@ -945,13 +947,17 @@ static const char *find_author_by_nickname(const char *name) av[++ac] = buf.buf; av[++ac] = NULL; setup_revisions(ac, av, &revs, NULL); + revs.mailmap = &mailmap; + read_mailmap(revs.mailmap, NULL); + prepare_revision_walk(&revs); commit = get_revision(&revs); if (commit) { struct pretty_print_context ctx = {0}; ctx.date_mode = DATE_NORMAL; strbuf_release(&buf); - format_commit_message(commit, "%an <%ae>", &buf, &ctx); + format_commit_message(commit, "%aN <%aE>", &buf, &ctx); + clear_mailmap(&mailmap); return strbuf_detach(&buf, NULL); } die(_("No existing author found with '%s'"), name); diff --git a/builtin/fetch.c b/builtin/fetch.c index d784b2e694..564705555b 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -36,7 +36,8 @@ static int tags = TAGS_DEFAULT, unshallow; static const char *depth; static const char *upload_pack; static struct strbuf default_rla = STRBUF_INIT; -static struct transport *transport; +static struct transport *gtransport; +static struct transport *gsecondary; static const char *submodule_prefix = ""; static const char *recurse_submodules_default; @@ -95,8 +96,10 @@ static struct option builtin_fetch_options[] = { static void unlock_pack(void) { - if (transport) - transport_unlock_pack(transport); + if (gtransport) + transport_unlock_pack(gtransport); + if (gsecondary) + transport_unlock_pack(gsecondary); } static void unlock_pack_on_signal(int signo) @@ -720,6 +723,48 @@ static int truncate_fetch_head(void) return 0; } +static void set_option(struct transport *transport, const char *name, const char *value) +{ + int r = transport_set_option(transport, name, value); + if (r < 0) + die(_("Option \"%s\" value \"%s\" is not valid for %s"), + name, value, transport->url); + if (r > 0) + warning(_("Option \"%s\" is ignored for %s\n"), + name, transport->url); +} + +static struct transport *prepare_transport(struct remote *remote) +{ + struct transport *transport; + transport = transport_get(remote, NULL); + transport_set_verbosity(transport, verbosity, progress); + if (upload_pack) + set_option(transport, TRANS_OPT_UPLOADPACK, upload_pack); + if (keep) + set_option(transport, TRANS_OPT_KEEP, "yes"); + if (depth) + set_option(transport, TRANS_OPT_DEPTH, depth); + return transport; +} + +static void backfill_tags(struct transport *transport, struct ref *ref_map) +{ + if (transport->cannot_reuse) { + gsecondary = prepare_transport(transport->remote); + transport = gsecondary; + } + + transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, NULL); + transport_set_option(transport, TRANS_OPT_DEPTH, "0"); + fetch_refs(transport, ref_map); + + if (gsecondary) { + transport_disconnect(gsecondary); + gsecondary = NULL; + } +} + static int do_fetch(struct transport *transport, struct refspec *refs, int ref_count) { @@ -803,11 +848,8 @@ static int do_fetch(struct transport *transport, struct ref **tail = &ref_map; ref_map = NULL; find_non_local_tags(transport, &ref_map, &tail); - if (ref_map) { - transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, NULL); - transport_set_option(transport, TRANS_OPT_DEPTH, "0"); - fetch_refs(transport, ref_map); - } + if (ref_map) + backfill_tags(transport, ref_map); free_refs(ref_map); } @@ -816,17 +858,6 @@ static int do_fetch(struct transport *transport, return retcode; } -static void set_option(const char *name, const char *value) -{ - int r = transport_set_option(transport, name, value); - if (r < 0) - die(_("Option \"%s\" value \"%s\" is not valid for %s"), - name, value, transport->url); - if (r > 0) - warning(_("Option \"%s\" is ignored for %s\n"), - name, transport->url); -} - static int get_one_remote_for_fetch(struct remote *remote, void *priv) { struct string_list *list = priv; @@ -949,15 +980,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) die(_("No remote repository specified. Please, specify either a URL or a\n" "remote name from which new revisions should be fetched.")); - transport = transport_get(remote, NULL); - transport_set_verbosity(transport, verbosity, progress); - if (upload_pack) - set_option(TRANS_OPT_UPLOADPACK, upload_pack); - if (keep) - set_option(TRANS_OPT_KEEP, "yes"); - if (depth) - set_option(TRANS_OPT_DEPTH, depth); - + gtransport = prepare_transport(remote); if (argc > 0) { int j = 0; refs = xcalloc(argc + 1, sizeof(const char *)); @@ -983,10 +1006,10 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) sigchain_push_common(unlock_pack_on_signal); atexit(unlock_pack); refspec = parse_fetch_refspec(ref_nr, refs); - exit_code = do_fetch(transport, refspec, ref_nr); + exit_code = do_fetch(gtransport, refspec, ref_nr); free_refspec(ref_nr, refspec); - transport_disconnect(transport); - transport = NULL; + transport_disconnect(gtransport); + gtransport = NULL; return exit_code; } diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 5cf3e31370..85004460bd 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -219,6 +219,8 @@ static void show_files(struct dir_struct *dir) /* For cached/deleted files we don't need to even do the readdir */ if (show_others || show_killed) { + if (!show_others) + dir->flags |= DIR_COLLECT_KILLED_ONLY; fill_directory(dir, pathspec); if (show_others) show_other_files(dir); diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f069462cb0..dd117b379a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2378,7 +2378,7 @@ static void get_object_list(int ac, const char **av) if (prepare_revision_walk(&revs)) die("revision walk setup failed"); - mark_edges_uninteresting(revs.commits, &revs, show_edge); + mark_edges_uninteresting(&revs, show_edge); traverse_commit_list(&revs, show_commit, show_object, NULL); if (keep_unreachable) diff --git a/builtin/rev-list.c b/builtin/rev-list.c index a5ec30d74e..4fc1616637 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -336,7 +336,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if (prepare_revision_walk(&revs)) die("revision walk setup failed"); if (revs.tree_objects) - mark_edges_uninteresting(revs.commits, &revs, show_edge); + mark_edges_uninteresting(&revs, show_edge); if (bisect_list) { int reaches = reaches, all = all; diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 1434f8fee4..84ffbb798e 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -127,9 +127,11 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit) author = buffer + 7; buffer = eol; } - if (!author) - die(_("Missing author: %s"), + if (!author) { + warning(_("Missing author: %s"), sha1_to_hex(commit->object.sha1)); + return; + } if (log->user_format) { struct pretty_print_context ctx = {0}; ctx.fmt = CMIT_FMT_USERFORMAT; diff --git a/bulk-checkin.c b/bulk-checkin.c index 6b0b6d4904..118c62528b 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -114,7 +114,7 @@ static int stream_to_pack(struct bulk_checkin_state *state, if (size && !s.avail_in) { ssize_t rsize = size < sizeof(ibuf) ? size : sizeof(ibuf); - if (xread(fd, ibuf, rsize) != rsize) + if (read_in_full(fd, ibuf, rsize) != rsize) die("failed to read %d bytes from '%s'", (int)rsize, path); offset += rsize; @@ -966,6 +966,15 @@ struct ident_split { */ extern int split_ident_line(struct ident_split *, const char *, int); +/* + * Compare split idents for equality or strict ordering. Note that we + * compare only the ident part of the line, ignoring any timestamp. + * + * Because there are two fields, we must choose one as the primary key; we + * currently arbitrarily pick the email. + */ +extern int ident_cmp(const struct ident_split *, const struct ident_split *); + struct checkout { const char *base_dir; int base_dir_len; diff --git a/combine-diff.c b/combine-diff.c index 88525b37cf..4fc16ad4f3 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -10,6 +10,7 @@ #include "refs.h" #include "userdiff.h" #include "sha1-array.h" +#include "revision.h" static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr, int n, int num_parent) { @@ -1383,7 +1384,7 @@ void diff_tree_combined(const unsigned char *sha1, void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev) { - struct commit_list *parent = commit->parents; + struct commit_list *parent = get_saved_parents(rev, commit); struct sha1_array parents = SHA1_ARRAY_INIT; while (parent) { @@ -377,6 +377,22 @@ unsigned commit_list_count(const struct commit_list *l) return c; } +struct commit_list *copy_commit_list(struct commit_list *list) +{ + struct commit_list *head = NULL; + struct commit_list **pp = &head; + while (list) { + struct commit_list *new; + new = xmalloc(sizeof(struct commit_list)); + new->item = list->item; + new->next = NULL; + *pp = new; + pp = &new->next; + list = list->next; + } + return head; +} + void free_commit_list(struct commit_list *list) { while (list) { @@ -62,6 +62,9 @@ struct commit_list *commit_list_insert_by_date(struct commit *item, struct commit_list **list); void commit_list_sort_by_date(struct commit_list **list); +/* Shallow copy of the input list */ +struct commit_list *copy_commit_list(struct commit_list *list); + void free_commit_list(struct commit_list *list); /* Commit formats */ @@ -198,6 +201,10 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads, int depth, int shallow_flag, int not_shallow_flag); extern void check_shallow_file_for_update(void); extern void set_alternate_shallow_file(const char *path); +extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol); +extern void setup_alternate_shallow(struct lock_file *shallow_lock, + const char **alternate_shallow_file); +extern char *setup_temporary_shallow(void); int is_descendant_of(struct commit *, struct commit_list *); int in_merge_bases(struct commit *, struct commit *); diff --git a/compat/clipped-write.c b/compat/clipped-write.c deleted file mode 100644 index b8f98ff77f..0000000000 --- a/compat/clipped-write.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "../git-compat-util.h" -#undef write - -/* - * Version of write that will write at most INT_MAX bytes. - * Workaround a xnu bug on Mac OS X - */ -ssize_t clipped_write(int fildes, const void *buf, size_t nbyte) -{ - if (nbyte > INT_MAX) - nbyte = INT_MAX; - return write(fildes, buf, nbyte); -} @@ -27,9 +27,9 @@ struct config_source { struct strbuf value; struct strbuf var; - int (*fgetc)(struct config_source *c); - int (*ungetc)(int c, struct config_source *conf); - long (*ftell)(struct config_source *c); + int (*do_fgetc)(struct config_source *c); + int (*do_ungetc)(int c, struct config_source *conf); + long (*do_ftell)(struct config_source *c); }; static struct config_source *cf; @@ -217,13 +217,13 @@ int git_config_from_parameters(config_fn_t fn, void *data) static int get_next_char(void) { - int c = cf->fgetc(cf); + int c = cf->do_fgetc(cf); if (c == '\r') { /* DOS like systems */ - c = cf->fgetc(cf); + c = cf->do_fgetc(cf); if (c != '\n') { - cf->ungetc(c, cf); + cf->do_ungetc(c, cf); c = '\r'; } } @@ -992,9 +992,9 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data) top.u.file = f; top.name = filename; top.die_on_error = 1; - top.fgetc = config_file_fgetc; - top.ungetc = config_file_ungetc; - top.ftell = config_file_ftell; + top.do_fgetc = config_file_fgetc; + top.do_ungetc = config_file_ungetc; + top.do_ftell = config_file_ftell; ret = do_config_from(&top, fn, data); @@ -1013,9 +1013,9 @@ int git_config_from_buf(config_fn_t fn, const char *name, const char *buf, top.u.buf.pos = 0; top.name = name; top.die_on_error = 0; - top.fgetc = config_buf_fgetc; - top.ungetc = config_buf_ungetc; - top.ftell = config_buf_ftell; + top.do_fgetc = config_buf_fgetc; + top.do_ungetc = config_buf_ungetc; + top.do_ftell = config_buf_ftell; return do_config_from(&top, fn, data); } @@ -1196,7 +1196,7 @@ static int store_aux(const char *key, const char *value, void *cb) return 1; } - store.offset[store.seen] = cf->ftell(cf); + store.offset[store.seen] = cf->do_ftell(cf); store.seen++; } break; @@ -1223,19 +1223,19 @@ static int store_aux(const char *key, const char *value, void *cb) * Do not increment matches: this is no match, but we * just made sure we are in the desired section. */ - store.offset[store.seen] = cf->ftell(cf); + store.offset[store.seen] = cf->do_ftell(cf); /* fallthru */ case SECTION_END_SEEN: case START: if (matches(key, value)) { - store.offset[store.seen] = cf->ftell(cf); + store.offset[store.seen] = cf->do_ftell(cf); store.state = KEY_SEEN; store.seen++; } else { if (strrchr(key, '.') - key == store.baselen && !strncmp(key, store.key, store.baselen)) { store.state = SECTION_SEEN; - store.offset[store.seen] = cf->ftell(cf); + store.offset[store.seen] = cf->do_ftell(cf); } } } diff --git a/config.mak.uname b/config.mak.uname index b27f51d486..7d615314f4 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -95,7 +95,6 @@ ifeq ($(uname_S),Darwin) NO_MEMMEM = YesPlease USE_ST_TIMESPEC = YesPlease HAVE_DEV_TTY = YesPlease - NEEDS_CLIPPED_WRITE = YesPlease COMPAT_OBJS += compat/precompose_utf8.o BASIC_CFLAGS += -DPRECOMPOSE_UNICODE endif diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5da920ecd9..e1b7313072 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2580,7 +2580,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then --*=*|*.) ;; *) c="$c " ;; esac - array[$#array+1]="$c" + array[${#array[@]}+1]="$c" done compset -P '*[=:]' compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index a81ef5a482..998722cf7f 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -84,6 +84,10 @@ # the colored output of "git status -sb" and are available only when # using __git_ps1 for PROMPT_COMMAND or precmd. +# check whether printf supports -v +__git_printf_supports_v= +printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1 + # stores the divergence from upstream in $p # used by GIT_PS1_SHOWUPSTREAM __git_ps1_show_upstream () @@ -106,7 +110,7 @@ __git_ps1_show_upstream () ;; svn-remote.*.url) svn_remote[$((${#svn_remote[@]} + 1))]="$value" - svn_url_pattern+="\\|$value" + svn_url_pattern="$svn_url_pattern\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; esac @@ -433,7 +437,7 @@ __git_ps1 () local gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p" if [ $pcmode = yes ]; then - if [[ -n ${ZSH_VERSION-} ]]; then + if [ "${__git_printf_supports_v-}" != yes ]; then gitstring=$(printf -- "$printf_format" "$gitstring") else printf -v gitstring -- "$printf_format" "$gitstring" diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index f8d7d2ca6c..85d0c42296 100755 --- a/contrib/mw-to-git/git-remote-mediawiki.perl +++ b/contrib/mw-to-git/git-remote-mediawiki.perl @@ -622,6 +622,9 @@ sub fetch_mw_revisions_for_page { rvstartid => $fetch_from, rvlimit => 500, pageids => $id, + + # Let MediaWiki know that we support the latest API. + continue => '', }; my $revnum = 0; @@ -637,8 +640,15 @@ sub fetch_mw_revisions_for_page { push(@page_revs, $page_rev_ids); $revnum++; } - last if (!$result->{'query-continue'}); - $query->{rvstartid} = $result->{'query-continue'}->{revisions}->{rvstartid}; + + if ($result->{'query-continue'}) { # For legacy APIs + $query->{rvstartid} = $result->{'query-continue'}->{revisions}->{rvstartid}; + } elsif ($result->{continue}) { # For newer APIs + $query->{rvstartid} = $result->{continue}->{rvcontinue}; + $query->{continue} = $result->{continue}->{continue}; + } else { + last; + } } if ($shallow_import && @page_revs) { print {*STDERR} " Found 1 revision (shallow import).\n"; diff --git a/contrib/mw-to-git/t/t9365-continuing-queries.sh b/contrib/mw-to-git/t/t9365-continuing-queries.sh new file mode 100755 index 0000000000..27e267f532 --- /dev/null +++ b/contrib/mw-to-git/t/t9365-continuing-queries.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +test_description='Test the Git Mediawiki remote helper: queries w/ more than 500 results' + +. ./test-gitmw-lib.sh +. $TEST_DIRECTORY/test-lib.sh + +test_check_precond + +test_expect_success 'creating page w/ >500 revisions' ' + wiki_reset && + for i in `test_seq 501` + do + echo "creating revision $i" && + wiki_editpage foo "revision $i<br/>" true + done +' + +test_expect_success 'cloning page w/ >500 revisions' ' + git clone mediawiki::'"$WIKI_URL"' mw_dir +' + +test_done diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile index 435b2dea29..4030a16898 100644 --- a/contrib/subtree/Makefile +++ b/contrib/subtree/Makefile @@ -21,13 +21,14 @@ GIT_SUBTREE := git-subtree GIT_SUBTREE_DOC := git-subtree.1 GIT_SUBTREE_XML := git-subtree.xml GIT_SUBTREE_TXT := git-subtree.txt +GIT_SUBTREE_HTML := git-subtree.html all: $(GIT_SUBTREE) $(GIT_SUBTREE): $(GIT_SUBTREE_SH) cp $< $@ && chmod +x $@ -doc: $(GIT_SUBTREE_DOC) +doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML) install: $(GIT_SUBTREE) $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir) @@ -46,6 +47,10 @@ $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT) asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \ -agit_version=$(gitver) $^ +$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT) + asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \ + -agit_version=$(gitver) $^ + test: $(MAKE) -C t/ test @@ -472,15 +472,14 @@ static void *read_skip_worktree_file_from_index(const char *path, size_t *size) unsigned long sz; enum object_type type; void *data; - struct index_state *istate = &the_index; len = strlen(path); - pos = index_name_pos(istate, path, len); + pos = cache_name_pos(path, len); if (pos < 0) return NULL; - if (!ce_skip_worktree(istate->cache[pos])) + if (!ce_skip_worktree(active_cache[pos])) return NULL; - data = read_sha1_file(istate->cache[pos]->sha1, &type, &sz); + data = read_sha1_file(active_cache[pos]->sha1, &type, &sz); if (!data || type != OBJ_BLOB) { free(data); return NULL; @@ -927,13 +926,13 @@ enum exist_status { }; /* - * Do not use the alphabetically stored index to look up + * Do not use the alphabetically sorted index to look up * the directory name; instead, use the case insensitive * name hash. */ static enum exist_status directory_exists_in_index_icase(const char *dirname, int len) { - const struct cache_entry *ce = index_name_exists(&the_index, dirname, len + 1, ignore_case); + const struct cache_entry *ce = cache_name_exists(dirname, len + 1, ignore_case); unsigned char endchar; if (!ce) @@ -1175,14 +1174,51 @@ static enum path_treatment treat_one_path(struct dir_struct *dir, int dtype, struct dirent *de) { int exclude; + int has_path_in_index = !!cache_name_exists(path->buf, path->len, ignore_case); + if (dtype == DT_UNKNOWN) dtype = get_dtype(de, path->buf, path->len); /* Always exclude indexed files */ - if (dtype != DT_DIR && - cache_name_exists(path->buf, path->len, ignore_case)) + if (dtype != DT_DIR && has_path_in_index) return path_none; + /* + * When we are looking at a directory P in the working tree, + * there are three cases: + * + * (1) P exists in the index. Everything inside the directory P in + * the working tree needs to go when P is checked out from the + * index. + * + * (2) P does not exist in the index, but there is P/Q in the index. + * We know P will stay a directory when we check out the contents + * of the index, but we do not know yet if there is a directory + * P/Q in the working tree to be killed, so we need to recurse. + * + * (3) P does not exist in the index, and there is no P/Q in the index + * to require P to be a directory, either. Only in this case, we + * know that everything inside P will not be killed without + * recursing. + */ + if ((dir->flags & DIR_COLLECT_KILLED_ONLY) && + (dtype == DT_DIR) && + !has_path_in_index) { + /* + * NEEDSWORK: directory_exists_in_index_icase() + * assumes that one byte past the given path is + * readable and has '/', which needs to be fixed, but + * until then, work it around in the caller. + */ + strbuf_addch(path, '/'); + if (directory_exists_in_index(path->buf, path->len - 1) == + index_nonexistent) { + strbuf_setlen(path, path->len - 1); + return path_none; + } + strbuf_setlen(path, path->len - 1); + } + exclude = is_excluded(dir, path->buf, &dtype); /* @@ -80,7 +80,8 @@ struct dir_struct { DIR_HIDE_EMPTY_DIRECTORIES = 1<<2, DIR_NO_GITLINKS = 1<<3, DIR_COLLECT_IGNORED = 1<<4, - DIR_SHOW_IGNORED_TOO = 1<<5 + DIR_SHOW_IGNORED_TOO = 1<<5, + DIR_COLLECT_KILLED_ONLY = 1<<6 } flags; struct dir_entry **entries; struct dir_entry **ignored; diff --git a/environment.c b/environment.c index 5398c36dd4..378254c77a 100644 --- a/environment.c +++ b/environment.c @@ -123,14 +123,13 @@ static char *expand_namespace(const char *raw_namespace) static void setup_git_env(void) { + const char *gitfile; + git_dir = getenv(GIT_DIR_ENVIRONMENT); - git_dir = git_dir ? xstrdup(git_dir) : NULL; - if (!git_dir) { - git_dir = read_gitfile(DEFAULT_GIT_DIR_ENVIRONMENT); - git_dir = git_dir ? xstrdup(git_dir) : NULL; - } if (!git_dir) git_dir = DEFAULT_GIT_DIR_ENVIRONMENT; + gitfile = read_gitfile(git_dir); + git_dir = xstrdup(gitfile ? gitfile : git_dir); git_object_dir = getenv(DB_ENVIRONMENT); if (!git_object_dir) { git_object_dir = xmalloc(strlen(git_dir) + 9); diff --git a/fetch-pack.c b/fetch-pack.c index 6684348c0e..aff4f5abab 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -184,36 +184,6 @@ static void consume_shallow_list(struct fetch_pack_args *args, int fd) } } -struct write_shallow_data { - struct strbuf *out; - int use_pack_protocol; - int count; -}; - -static int write_one_shallow(const struct commit_graft *graft, void *cb_data) -{ - struct write_shallow_data *data = cb_data; - const char *hex = sha1_to_hex(graft->sha1); - data->count++; - if (data->use_pack_protocol) - packet_buf_write(data->out, "shallow %s", hex); - else { - strbuf_addstr(data->out, hex); - strbuf_addch(data->out, '\n'); - } - return 0; -} - -static int write_shallow_commits(struct strbuf *out, int use_pack_protocol) -{ - struct write_shallow_data data; - data.out = out; - data.use_pack_protocol = use_pack_protocol; - data.count = 0; - for_each_commit_graft(write_one_shallow, &data); - return data.count; -} - static enum ack_type get_ack(int fd, unsigned char *result_sha1) { int len; @@ -795,27 +765,6 @@ static int cmp_ref_by_name(const void *a_, const void *b_) return strcmp(a->name, b->name); } -static void setup_alternate_shallow(void) -{ - struct strbuf sb = STRBUF_INIT; - int fd; - - check_shallow_file_for_update(); - fd = hold_lock_file_for_update(&shallow_lock, git_path("shallow"), - LOCK_DIE_ON_ERROR); - if (write_shallow_commits(&sb, 0)) { - if (write_in_full(fd, sb.buf, sb.len) != sb.len) - die_errno("failed to write to %s", shallow_lock.filename); - alternate_shallow_file = shallow_lock.filename; - } else - /* - * is_repository_shallow() sees empty string as "no - * shallow file". - */ - alternate_shallow_file = ""; - strbuf_release(&sb); -} - static struct ref *do_fetch_pack(struct fetch_pack_args *args, int fd[2], const struct ref *orig_ref, @@ -896,7 +845,9 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args, if (args->stateless_rpc) packet_flush(fd[1]); if (args->depth > 0) - setup_alternate_shallow(); + setup_alternate_shallow(&shallow_lock, &alternate_shallow_file); + else + alternate_shallow_file = NULL; if (get_pack(args, fd, pack_lockfile)) die("git fetch-pack: fetch failed."); @@ -987,7 +938,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args, } ref_cpy = do_fetch_pack(args, fd, ref, sought, nr_sought, pack_lockfile); - if (alternate_shallow_file) { + if (args->depth > 0 && alternate_shallow_file) { if (*alternate_shallow_file == '\0') { /* --unshallow */ unlink_or_warn(git_path("shallow")); rollback_lock_file(&shallow_lock); diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 75a991f7ec..51563840f4 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -169,7 +169,7 @@ my %patch_modes = ( my %patch_mode_flavour = %{$patch_modes{stage}}; sub run_cmd_pipe { - if ($^O eq 'MSWin32' || $^O eq 'msys') { + if ($^O eq 'MSWin32') { my @invalid = grep {m/[":*]/} @_; die "$^O does not support: @invalid\n" if @invalid; my @args = map { m/ /o ? "\"$_\"": $_ } @_; diff --git a/git-compat-util.h b/git-compat-util.h index 115cb1da42..96d888165b 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -185,11 +185,6 @@ typedef unsigned long uintptr_t; #define probe_utf8_pathname_composition(a,b) #endif -#ifdef NEEDS_CLIPPED_WRITE -ssize_t clipped_write(int fildes, const void *buf, size_t nbyte); -#define write(x,y,z) clipped_write((x),(y),(z)) -#endif - #ifdef MKDIR_WO_TRAILING_SLASH #define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b)) extern int compat_mkdir_wo_trailing_slash(const char*, mode_t); diff --git a/git-cvsserver.perl b/git-cvsserver.perl index a0d796e570..67b1e7b463 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -4167,7 +4167,7 @@ sub convertToDbMode # this half-converted form, but it isn't currently worth the # backwards compatibility headaches. - $mode=~/^\d\d(\d)\d{3}$/; + $mode=~/^\d{3}(\d)\d\d$/; my $userBits=$1; my $dbMode = ""; diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 83d6d4676b..10bf318d0d 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -352,8 +352,9 @@ pick_one_preserving_merges () { msg_content="$(commit_message $sha1)" # No point in merging the first parent, that's HEAD new_parents=${new_parents# $first_parent} + merge_args="--no-log --no-ff" if ! do_with_author output eval \ - 'git merge --no-ff $strategy_args -m "$msg_content" $new_parents' + 'git merge $merge_args $strategy_args -m "$msg_content" $new_parents' then printf "%s\n" "$msg_content" > "$GIT_DIR"/MERGE_MSG die_with_patch $sha1 "Error redoing merge $sha1" @@ -671,7 +672,7 @@ skip_unnecessary_picks () { ;; esac ;; - 3,#*|3,) + 3,"$comment_char"*|3,) # copy comments ;; *) @@ -689,6 +690,32 @@ skip_unnecessary_picks () { die "Could not skip unnecessary pick commands" } +transform_todo_ids () { + while read -r command rest + do + case "$command" in + "$comment_char"* | exec) + # Be careful for oddball commands like 'exec' + # that do not have a SHA-1 at the beginning of $rest. + ;; + *) + sha1=$(git rev-parse --verify --quiet "$@" ${rest%% *}) && + rest="$sha1 ${rest#* }" + ;; + esac + printf '%s\n' "$command${rest:+ }$rest" + done <"$todo" >"$todo.new" && + mv -f "$todo.new" "$todo" +} + +expand_todo_ids() { + transform_todo_ids +} + +collapse_todo_ids() { + transform_todo_ids --short=7 +} + # Rearrange the todo list that has both "pick sha1 msg" and # "pick sha1 fixup!/squash! msg" appears in it so that the latter # comes immediately after the former, and change "pick" to @@ -841,6 +868,7 @@ skip) edit-todo) git stripspace --strip-comments <"$todo" >"$todo".new mv -f "$todo".new "$todo" + collapse_todo_ids append_todo_help git stripspace --comment-lines >>"$todo" <<\EOF @@ -852,6 +880,7 @@ EOF git_sequence_editor "$todo" || die "Could not execute editor" + expand_todo_ids exit ;; @@ -1008,6 +1037,8 @@ git_sequence_editor "$todo" || has_action "$todo" || die_abort "Nothing to do" +expand_todo_ids + test -d "$rewritten" || test -n "$force_rebase" || skip_unnecessary_picks GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $onto_name" diff --git a/git-rebase.sh b/git-rebase.sh index 8d7659a22c..226752fbff 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -167,13 +167,22 @@ You can run "git stash pop" or "git stash drop" at any time. rm -rf "$state_dir" } -run_specific_rebase () { +run_specific_rebase_internal () { if [ "$interactive_rebase" = implied ]; then GIT_EDITOR=: export GIT_EDITOR autosquash= fi + # On FreeBSD, the shell's "return" returns from the current + # function, not from the current file inclusion. + # run_specific_rebase_internal has the file inclusion as a + # last statement, so POSIX and FreeBSD's return will do the + # same thing. . git-rebase--$type +} + +run_specific_rebase () { + run_specific_rebase_internal ret=$? if test $ret -eq 0 then diff --git a/git-send-email.perl b/git-send-email.perl index 2162478392..3782c3b0cb 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1234,7 +1234,7 @@ X-Mailer: git-send-email $gitversion if ($smtp->code == 220) { $smtp = Net::SMTP::SSL->start_SSL($smtp, ssl_verify_params()) - or die "STARTTLS failed! ".$smtp->message; + or die "STARTTLS failed! ".IO::Socket::SSL::errstr(); $smtp_encryption = ''; # Send EHLO again to receive fresh # supported commands diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 7a964ad2ff..e15be51636 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -53,7 +53,7 @@ die () { die_with_status () { status=$1 shift - echo >&2 "$*" + printf >&2 '%s\n' "$*" exit "$status" } @@ -801,10 +801,10 @@ static int graph_draw_octopus_merge(struct git_graph *graph, int num_dashes = ((graph->num_parents - dashless_commits) * 2) - 1; for (i = 0; i < num_dashes; i++) { - col_num = (i / 2) + dashless_commits; + col_num = (i / 2) + dashless_commits + graph->commit_index; strbuf_write_column(sb, &graph->new_columns[col_num], '-'); } - col_num = (i / 2) + dashless_commits; + col_num = (i / 2) + dashless_commits + graph->commit_index; strbuf_write_column(sb, &graph->new_columns[col_num], '.'); return num_dashes + 1; } diff --git a/http-backend.c b/http-backend.c index 0324417297..8c464bd805 100644 --- a/http-backend.c +++ b/http-backend.c @@ -594,9 +594,11 @@ int main(int argc, char **argv) if (strcmp(method, c->method)) { const char *proto = getenv("SERVER_PROTOCOL"); - if (proto && !strcmp(proto, "HTTP/1.1")) + if (proto && !strcmp(proto, "HTTP/1.1")) { http_status(405, "Method Not Allowed"); - else + hdr_str("Allow", !strcmp(c->method, "GET") ? + "GET, HEAD" : c->method); + } else http_status(400, "Bad Request"); hdr_nocache(); end_headers(); diff --git a/http-push.c b/http-push.c index 6dad188b5f..b1e74d2086 100644 --- a/http-push.c +++ b/http-push.c @@ -1543,7 +1543,7 @@ static int remote_exists(const char *path) sprintf(url, "%s%s", repo->url, path); - switch (http_get_strbuf(url, NULL, NULL, 0)) { + switch (http_get_strbuf(url, NULL, NULL)) { case HTTP_OK: ret = 1; break; @@ -1567,7 +1567,7 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1) url = xmalloc(strlen(repo->url) + strlen(path) + 1); sprintf(url, "%s%s", repo->url, path); - if (http_get_strbuf(url, NULL, &buffer, 0) != HTTP_OK) + if (http_get_strbuf(url, &buffer, NULL) != HTTP_OK) die("Couldn't get %s for remote symref\n%s", url, curl_errorstr); free(url); @@ -1976,7 +1976,7 @@ int main(int argc, char **argv) pushing = 0; if (prepare_revision_walk(&revs)) die("revision walk setup failed"); - mark_edges_uninteresting(revs.commits, &revs, NULL); + mark_edges_uninteresting(&revs, NULL); objects_to_send = get_delta(&revs, ref_lock); finish_all_active_slots(); @@ -45,7 +45,7 @@ static long curl_low_speed_time = -1; static int curl_ftp_no_epsv; static const char *curl_http_proxy; static const char *curl_cookie_file; -static struct credential http_auth = CREDENTIAL_INIT; +struct credential http_auth = CREDENTIAL_INIT; static int http_proactive_auth; static const char *user_agent; @@ -806,7 +806,6 @@ int handle_curl_result(struct slot_results *results) credential_reject(&http_auth); return HTTP_NOAUTH; } else { - credential_fill(&http_auth); return HTTP_REAUTH; } } else { @@ -820,12 +819,25 @@ int handle_curl_result(struct slot_results *results) } } +static CURLcode curlinfo_strbuf(CURL *curl, CURLINFO info, struct strbuf *buf) +{ + char *ptr; + CURLcode ret; + + strbuf_reset(buf); + ret = curl_easy_getinfo(curl, info, &ptr); + if (!ret && ptr) + strbuf_addstr(buf, ptr); + return ret; +} + /* http_request() targets */ #define HTTP_REQUEST_STRBUF 0 #define HTTP_REQUEST_FILE 1 -static int http_request(const char *url, struct strbuf *type, - void *result, int target, int options) +static int http_request(const char *url, + void *result, int target, + const struct http_get_options *options) { struct active_request_slot *slot; struct slot_results results; @@ -858,9 +870,9 @@ static int http_request(const char *url, struct strbuf *type, } strbuf_addstr(&buf, "Pragma:"); - if (options & HTTP_NO_CACHE) + if (options && options->no_cache) strbuf_addstr(&buf, " no-cache"); - if (options & HTTP_KEEP_ERROR) + if (options && options->keep_error) curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0); headers = curl_slist_append(headers, buf.buf); @@ -878,13 +890,13 @@ static int http_request(const char *url, struct strbuf *type, ret = HTTP_START_FAILED; } - if (type) { - char *t; - strbuf_reset(type); - curl_easy_getinfo(slot->curl, CURLINFO_CONTENT_TYPE, &t); - if (t) - strbuf_addstr(type, t); - } + if (options && options->content_type) + curlinfo_strbuf(slot->curl, CURLINFO_CONTENT_TYPE, + options->content_type); + + if (options && options->effective_url) + curlinfo_strbuf(slot->curl, CURLINFO_EFFECTIVE_URL, + options->effective_url); curl_slist_free_all(headers); strbuf_release(&buf); @@ -892,12 +904,71 @@ static int http_request(const char *url, struct strbuf *type, return ret; } +/* + * Update the "base" url to a more appropriate value, as deduced by + * redirects seen when requesting a URL starting with "url". + * + * The "asked" parameter is a URL that we asked curl to access, and must begin + * with "base". + * + * The "got" parameter is the URL that curl reported to us as where we ended + * up. + * + * Returns 1 if we updated the base url, 0 otherwise. + * + * Our basic strategy is to compare "base" and "asked" to find the bits + * specific to our request. We then strip those bits off of "got" to yield the + * new base. So for example, if our base is "http://example.com/foo.git", + * and we ask for "http://example.com/foo.git/info/refs", we might end up + * with "https://other.example.com/foo.git/info/refs". We would want the + * new URL to become "https://other.example.com/foo.git". + * + * Note that this assumes a sane redirect scheme. It's entirely possible + * in the example above to end up at a URL that does not even end in + * "info/refs". In such a case we simply punt, as there is not much we can + * do (and such a scheme is unlikely to represent a real git repository, + * which means we are likely about to abort anyway). + */ +static int update_url_from_redirect(struct strbuf *base, + const char *asked, + const struct strbuf *got) +{ + const char *tail; + size_t tail_len; + + if (!strcmp(asked, got->buf)) + return 0; + + if (prefixcmp(asked, base->buf)) + die("BUG: update_url_from_redirect: %s is not a superset of %s", + asked, base->buf); + + tail = asked + base->len; + tail_len = strlen(tail); + + if (got->len < tail_len || + strcmp(tail, got->buf + got->len - tail_len)) + return 0; /* insane redirect scheme */ + + strbuf_reset(base); + strbuf_add(base, got->buf, got->len - tail_len); + return 1; +} + static int http_request_reauth(const char *url, - struct strbuf *type, void *result, int target, - int options) + struct http_get_options *options) { - int ret = http_request(url, type, result, target, options); + int ret = http_request(url, result, target, options); + + if (options && options->effective_url && options->base_url) { + if (update_url_from_redirect(options->base_url, + url, options->effective_url)) { + credential_from_url(&http_auth, options->base_url->buf); + url = options->effective_url->buf; + } + } + if (ret != HTTP_REAUTH) return ret; @@ -907,7 +978,7 @@ static int http_request_reauth(const char *url, * making our next request. We only know how to do this for * the strbuf case, but that is enough to satisfy current callers. */ - if (options & HTTP_KEEP_ERROR) { + if (options && options->keep_error) { switch (target) { case HTTP_REQUEST_STRBUF: strbuf_reset(result); @@ -916,15 +987,17 @@ static int http_request_reauth(const char *url, die("BUG: HTTP_KEEP_ERROR is only supported with strbufs"); } } - return http_request(url, type, result, target, options); + + credential_fill(&http_auth); + + return http_request(url, result, target, options); } int http_get_strbuf(const char *url, - struct strbuf *type, - struct strbuf *result, int options) + struct strbuf *result, + struct http_get_options *options) { - return http_request_reauth(url, type, result, - HTTP_REQUEST_STRBUF, options); + return http_request_reauth(url, result, HTTP_REQUEST_STRBUF, options); } /* @@ -933,7 +1006,8 @@ int http_get_strbuf(const char *url, * If a previous interrupted download is detected (i.e. a previous temporary * file is still around) the download is resumed. */ -static int http_get_file(const char *url, const char *filename, int options) +static int http_get_file(const char *url, const char *filename, + struct http_get_options *options) { int ret; struct strbuf tmpfile = STRBUF_INIT; @@ -941,16 +1015,16 @@ static int http_get_file(const char *url, const char *filename, int options) strbuf_addf(&tmpfile, "%s.temp", filename); result = fopen(tmpfile.buf, "a"); - if (! result) { + if (!result) { error("Unable to open local file %s", tmpfile.buf); ret = HTTP_ERROR; goto cleanup; } - ret = http_request_reauth(url, NULL, result, HTTP_REQUEST_FILE, options); + ret = http_request_reauth(url, result, HTTP_REQUEST_FILE, options); fclose(result); - if ((ret == HTTP_OK) && move_temp_to_file(tmpfile.buf, filename)) + if (ret == HTTP_OK && move_temp_to_file(tmpfile.buf, filename)) ret = HTTP_ERROR; cleanup: strbuf_release(&tmpfile); @@ -959,12 +1033,15 @@ cleanup: int http_fetch_ref(const char *base, struct ref *ref) { + struct http_get_options options = {0}; char *url; struct strbuf buffer = STRBUF_INIT; int ret = -1; + options.no_cache = 1; + url = quote_ref_url(base, ref->name); - if (http_get_strbuf(url, NULL, &buffer, HTTP_NO_CACHE) == HTTP_OK) { + if (http_get_strbuf(url, &buffer, &options) == HTTP_OK) { strbuf_rtrim(&buffer); if (buffer.len == 40) ret = get_sha1_hex(buffer.buf, ref->old_sha1); @@ -995,7 +1072,7 @@ static char *fetch_pack_index(unsigned char *sha1, const char *base_url) strbuf_addf(&buf, "%s.temp", sha1_pack_index_name(sha1)); tmp = strbuf_detach(&buf, NULL); - if (http_get_file(url, tmp, 0) != HTTP_OK) { + if (http_get_file(url, tmp, NULL) != HTTP_OK) { error("Unable to get pack index %s", url); free(tmp); tmp = NULL; @@ -1048,6 +1125,7 @@ add_pack: int http_get_info_packs(const char *base_url, struct packed_git **packs_head) { + struct http_get_options options = {0}; int ret = 0, i = 0; char *url, *data; struct strbuf buf = STRBUF_INIT; @@ -1057,7 +1135,8 @@ int http_get_info_packs(const char *base_url, struct packed_git **packs_head) strbuf_addstr(&buf, "objects/info/packs"); url = strbuf_detach(&buf, NULL); - ret = http_get_strbuf(url, NULL, &buf, HTTP_NO_CACHE); + options.no_cache = 1; + ret = http_get_strbuf(url, &buf, &options); if (ret != HTTP_OK) goto cleanup; @@ -102,6 +102,7 @@ extern void http_cleanup(void); extern int active_requests; extern int http_is_verbose; extern size_t http_post_buffer; +extern struct credential http_auth; extern char curl_errorstr[CURL_ERROR_SIZE]; @@ -125,11 +126,30 @@ extern void append_remote_object_url(struct strbuf *buf, const char *url, extern char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix); -/* Options for http_request_*() */ -#define HTTP_NO_CACHE 1 -#define HTTP_KEEP_ERROR 2 +/* Options for http_get_*() */ +struct http_get_options { + unsigned no_cache:1, + keep_error:1; + + /* If non-NULL, returns the content-type of the response. */ + struct strbuf *content_type; + + /* + * If non-NULL, returns the URL we ended up at, including any + * redirects we followed. + */ + struct strbuf *effective_url; + + /* + * If both base_url and effective_url are non-NULL, the base URL will + * be munged to reflect any redirections going from the requested url + * to effective_url. See the definition of update_url_from_redirect + * for details. + */ + struct strbuf *base_url; +}; -/* Return values for http_request_*() */ +/* Return values for http_get_*() */ #define HTTP_OK 0 #define HTTP_MISSING_TARGET 1 #define HTTP_ERROR 2 @@ -142,7 +162,7 @@ extern char *get_remote_object_url(const char *url, const char *hex, * * If the result pointer is NULL, a HTTP HEAD request is made instead of GET. */ -int http_get_strbuf(const char *url, struct strbuf *content_type, struct strbuf *result, int options); +int http_get_strbuf(const char *url, struct strbuf *result, struct http_get_options *options); extern int http_fetch_ref(const char *base, struct ref *ref); @@ -233,7 +233,21 @@ int split_ident_line(struct ident_split *split, const char *line, int len) if (!split->mail_end) return status; - for (cp = split->mail_end + 1; cp < line + len && isspace(*cp); cp++) + /* + * Look from the end-of-line to find the trailing ">" of the mail + * address, even though we should already know it as split->mail_end. + * This can help in cases of broken idents with an extra ">" somewhere + * in the email address. Note that we are assuming the timestamp will + * never have a ">" in it. + * + * Note that we will always find some ">" before going off the front of + * the string, because will always hit the split->mail_end closing + * bracket. + */ + for (cp = line + len - 1; *cp != '>'; cp--) + ; + + for (cp = cp + 1; cp < line + len && isspace(*cp); cp++) ; if (line + len <= cp) goto person_only; @@ -402,3 +416,32 @@ int git_ident_config(const char *var, const char *value, void *data) return 0; } + +static int buf_cmp(const char *a_begin, const char *a_end, + const char *b_begin, const char *b_end) +{ + int a_len = a_end - a_begin; + int b_len = b_end - b_begin; + int min = a_len < b_len ? a_len : b_len; + int cmp; + + cmp = memcmp(a_begin, b_begin, min); + if (cmp) + return cmp; + + return a_len - b_len; +} + +int ident_cmp(const struct ident_split *a, + const struct ident_split *b) +{ + int cmp; + + cmp = buf_cmp(a->mail_begin, a->mail_end, + b->mail_begin, b->mail_end); + if (cmp) + return cmp; + + return buf_cmp(a->name_begin, a->name_end, + b->name_begin, b->name_end); +} diff --git a/list-objects.c b/list-objects.c index 3dd4a96019..05c8c5c616 100644 --- a/list-objects.c +++ b/list-objects.c @@ -145,19 +145,35 @@ static void mark_edge_parents_uninteresting(struct commit *commit, } } -void mark_edges_uninteresting(struct commit_list *list, - struct rev_info *revs, - show_edge_fn show_edge) +void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge) { - for ( ; list; list = list->next) { + struct commit_list *list; + int i; + + for (list = revs->commits; list; list = list->next) { struct commit *commit = list->item; if (commit->object.flags & UNINTERESTING) { mark_tree_uninteresting(commit->tree); + if (revs->edge_hint && !(commit->object.flags & SHOWN)) { + commit->object.flags |= SHOWN; + show_edge(commit); + } continue; } mark_edge_parents_uninteresting(commit, revs, show_edge); } + for (i = 0; i < revs->cmdline.nr; i++) { + struct object *obj = revs->cmdline.rev[i].item; + struct commit *commit = (struct commit *)obj; + if (obj->type != OBJ_COMMIT || !(obj->flags & UNINTERESTING)) + continue; + mark_tree_uninteresting(commit->tree); + if (revs->edge_hint && !(obj->flags & SHOWN)) { + obj->flags |= SHOWN; + show_edge(commit); + } + } } static void add_pending_tree(struct rev_info *revs, struct tree *tree) diff --git a/list-objects.h b/list-objects.h index 3db7bb6fa3..136a1da5a6 100644 --- a/list-objects.h +++ b/list-objects.h @@ -6,6 +6,6 @@ typedef void (*show_object_fn)(struct object *, const struct name_path *, const void traverse_commit_list(struct rev_info *, show_commit_fn, show_object_fn, void *); typedef void (*show_edge_fn)(struct commit *); -void mark_edges_uninteresting(struct commit_list *, struct rev_info *, show_edge_fn); +void mark_edges_uninteresting(struct rev_info *, show_edge_fn); #endif diff --git a/log-tree.c b/log-tree.c index a49d8e895d..8534d91826 100644 --- a/log-tree.c +++ b/log-tree.c @@ -738,7 +738,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log sha1 = commit->tree->object.sha1; /* Root commit? */ - parents = commit->parents; + parents = get_saved_parents(opt, commit); if (!parents) { if (opt->show_root_diff) { diff_root_tree_sha1(sha1, "", &opt->diffopt); @@ -193,20 +193,17 @@ static int read_mailmap_file(struct string_list *map, const char *filename, return 0; } -static void read_mailmap_buf(struct string_list *map, - const char *buf, unsigned long len, - char **repo_abbrev) +static void read_mailmap_string(struct string_list *map, char *buf, + char **repo_abbrev) { - while (len) { - const char *end = strchrnul(buf, '\n'); - unsigned long linelen = end - buf + 1; - char *line = xmemdupz(buf, linelen); + while (*buf) { + char *end = strchrnul(buf, '\n'); - read_mailmap_line(map, line, repo_abbrev); + if (*end) + *end++ = '\0'; - free(line); - buf += linelen; - len -= linelen; + read_mailmap_line(map, buf, repo_abbrev); + buf = end; } } @@ -230,7 +227,7 @@ static int read_mailmap_blob(struct string_list *map, if (type != OBJ_BLOB) return error("mailmap is not a blob: %s", name); - read_mailmap_buf(map, buf, size, repo_abbrev); + read_mailmap_string(map, buf, repo_abbrev); free(buf); return 0; diff --git a/merge-recursive.c b/merge-recursive.c index f95933b0aa..fc2f00176c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2069,8 +2069,8 @@ int parse_merge_opt(struct merge_options *o, const char *s) o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF); else if (!strcmp(s, "histogram")) o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF); - else if (!strcmp(s, "diff-algorithm=")) { - long value = parse_algorithm_value(s+15); + else if (!prefixcmp(s, "diff-algorithm=")) { + long value = parse_algorithm_value(s + strlen("diff-algorithm=")); if (value < 0) return -1; /* clear out previous settings */ diff --git a/perl/Git.pm b/perl/Git.pm index 7a252ef872..204fdc6737 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -61,7 +61,7 @@ require Exporter; remote_refs prompt get_tz_offset credential credential_read credential_write - temp_acquire temp_release temp_reset temp_path); + temp_acquire temp_is_locked temp_release temp_reset temp_path); =head1 DESCRIPTION @@ -1206,6 +1206,35 @@ sub temp_acquire { $temp_fd; } +=item temp_is_locked ( NAME ) + +Returns true if the internal lock created by a previous C<temp_acquire()> +call with C<NAME> is still in effect. + +When temp_acquire is called on a C<NAME>, it internally locks the temporary +file mapped to C<NAME>. That lock will not be released until C<temp_release()> +is called with either the original C<NAME> or the L<File::Handle> that was +returned from the original call to temp_acquire. + +Subsequent attempts to call C<temp_acquire()> with the same C<NAME> will fail +unless there has been an intervening C<temp_release()> call for that C<NAME> +(or its corresponding L<File::Handle> that was returned by the original +C<temp_acquire()> call). + +If true is returned by C<temp_is_locked()> for a C<NAME>, an attempt to +C<temp_acquire()> the same C<NAME> will cause an error unless +C<temp_release> is first called on that C<NAME> (or its corresponding +L<File::Handle> that was returned by the original C<temp_acquire()> call). + +=cut + +sub temp_is_locked { + my ($self, $name) = _maybe_self(@_); + my $temp_fd = \$TEMP_FILEMAP{$name}; + + defined $$temp_fd && $$temp_fd->opened && $TEMP_FILES{$$temp_fd}{locked}; +} + =item temp_release ( NAME ) =item temp_release ( FILEHANDLE ) diff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm index bd174189b9..10edb27732 100644 --- a/perl/Git/SVN/Fetcher.pm +++ b/perl/Git/SVN/Fetcher.pm @@ -315,11 +315,13 @@ sub change_file_prop { sub apply_textdelta { my ($self, $fb, $exp) = @_; return undef if $self->is_path_ignored($fb->{path}); - my $fh = $::_repository->temp_acquire('svn_delta'); + my $suffix = 0; + ++$suffix while $::_repository->temp_is_locked("svn_delta_${$}_$suffix"); + my $fh = $::_repository->temp_acquire("svn_delta_${$}_$suffix"); # $fh gets auto-closed() by SVN::TxDelta::apply(), # (but $base does not,) so dup() it for reading in close_file open my $dup, '<&', $fh or croak $!; - my $base = $::_repository->temp_acquire('git_blob'); + my $base = $::_repository->temp_acquire("git_blob_${$}_$suffix"); if ($fb->{blob}) { my ($base_is_link, $size); @@ -15,6 +15,7 @@ Members: Thomas Rast <trast@student.ethz.ch> Language: fr (French) Repository: https://github.com/jnavila/git Leader: Jean-Noël Avila <jn.avila@free.fr> +Members: Sébastien Helleu <flashcode@flashtux.org> Language: is (Icelandic) Leader: Ævar Arnfjörð Bjarmason <avarab@gmail.com> @@ -4694,12 +4694,12 @@ msgstr "git describe [Optionen] --dirty" #: builtin/describe.c:237 #, c-format msgid "annotated tag %s not available" -msgstr "annotierter Tag %s ist nicht verfügbar" +msgstr "annotiertes Tag %s ist nicht verfügbar" #: builtin/describe.c:241 #, c-format msgid "annotated tag %s has no embedded name" -msgstr "annotierter Tag %s hat keinen eingebetteten Namen" +msgstr "annotiertes Tag %s hat keinen eingebetteten Namen" #: builtin/describe.c:243 #, c-format @@ -4765,7 +4765,7 @@ msgstr "" #: builtin/describe.c:409 msgid "find the tag that comes after the commit" -msgstr "findet den Tag, die nach Commit kommt" +msgstr "findet das Tag, das nach Commit kommt" #: builtin/describe.c:410 msgid "debug search strategy on stderr" @@ -4777,7 +4777,7 @@ msgstr "verwendet alle Referenzen" #: builtin/describe.c:412 msgid "use any tag, even unannotated" -msgstr "verwendet jeden Tag, auch nicht-annotierte" +msgstr "verwendet jedes Tag, auch nicht-annotierte" #: builtin/describe.c:413 msgid "always use long format" @@ -4880,7 +4880,7 @@ msgstr "Importiert Kennzeichen von dieser Datei" #: builtin/fast-export.c:678 msgid "Fake a tagger when tags lack one" -msgstr "erzeugt künstlich einen Tag-Ersteller, wenn der Tag keinen hat" +msgstr "erzeugt künstlich einen Tag-Ersteller, wenn das Tag keinen hat" #: builtin/fast-export.c:680 msgid "Output full tree for each commit" @@ -5013,7 +5013,7 @@ msgstr " (kann lokale Referenz nicht aktualisieren)" #: builtin/fetch.c:324 msgid "[new tag]" -msgstr "[neuer Tag]" +msgstr "[neues Tag]" #: builtin/fetch.c:327 msgid "[new branch]" @@ -7831,7 +7831,7 @@ msgstr "" #: builtin/push.c:257 msgid "Updates were rejected because the tag already exists in the remote." msgstr "" -"Aktualisierungen wurden zurückgewiesen, weil der Tag bereits\n" +"Aktualisierungen wurden zurückgewiesen, weil das Tag bereits\n" "im Remote-Repository existiert." #: builtin/push.c:260 @@ -9244,7 +9244,7 @@ msgstr "Optionen für Erstellung von Tags" #: builtin/tag.c:454 msgid "annotated tag, needs a message" -msgstr "annotierter Tag, benötigt eine Beschreibung" +msgstr "annotiertes Tag, benötigt eine Beschreibung" #: builtin/tag.c:456 msgid "tag message" @@ -9252,15 +9252,15 @@ msgstr "Tag-Beschreibung" #: builtin/tag.c:458 msgid "annotated and GPG-signed tag" -msgstr "annotierter und GPG-signierter Tag" +msgstr "annotiertes und GPG-signiertes Tag" #: builtin/tag.c:462 msgid "use another key to sign the tag" -msgstr "verwendet einen anderen Schlüssel um den Tag zu signieren" +msgstr "verwendet einen anderen Schlüssel um das Tag zu signieren" #: builtin/tag.c:463 msgid "replace the tag if exists" -msgstr "ersetzt den Tag, wenn er existiert" +msgstr "ersetzt das Tag, wenn es existiert" #: builtin/tag.c:464 msgid "show tag list in columns" @@ -1,15 +1,63 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# French translations for Git. +# Copyright (C) 2013 Jean-Noël Avila <jn.avila@free.fr> +# This file is distributed under the same license as the Git package. +# Jean-Noël Avila <jn.avila@free.fr>, 2013. +# Sébastien Helleu <flashcode@flashtux.org>, 2013. +# +# French translations of common Git words used in this file: +# +# English | French +# -----------------+--------------------------------- +# #NN | n°NN +# a commit | un commit +# backward | +# compatibility | rétrocompatibilité +# bare repository | dépôt nu +# bisect | bissection +# blob | blob +# bug | bogue +# bundle | colis +# cherry-pick | picorer +# dangling | en suspens +# debugging | débogage +# fast-forward | avance rapide +# fast-forwarded | mis à jour en avance rapide +# glob | glob +# hash | hachage +# HEAD | HEAD (genre féminin) +# hook | hook +# hunk | section +# merge | fusion +# pattern | motif +# repository | dépôt +# remote | distante (ou serveur distant) +# revision | révision +# stash | remisage +# tag | étiquette +# template | modèle +# to checkout | extraire +# to commit | valider +# to fetch | rapatrier +# to prune | élaguer +# to push | pousser +# to rebase | rebaser +# to stash | remiser +# to track | suivre +# to unstage | désindexer +# tree-ish | arbre +# upstream | amont +# worktree / | +# work(ing) tree | copie de travail # msgid "" -msgstr "Project-Id-Version: git\n" +msgstr "" +"Project-Id-Version: git\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" "POT-Creation-Date: 2013-04-30 08:25+0800\n" -"PO-Revision-Date: 2013-07-02 22:28+0100\n" -"Last-Translator: Jean-Noël Avila <jn.avila@free.fr>\n" +"PO-Revision-Date: 2013-08-27 19:43+0200\n" +"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: Jean-Noël Avila <jn.avila@free.fr>\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,7 +67,7 @@ msgstr "Project-Id-Version: git\n" #: advice.c:53 #, c-format msgid "hint: %.*s\n" -msgstr "astuce: %*s\n" +msgstr "astuce: %.*s\n" #. #. * Message used both when 'git commit' fails and when @@ -31,8 +79,9 @@ msgid "" "and then use 'git add/rm <file>' as\n" "appropriate to mark resolution and make a commit,\n" "or use 'git commit -a'." -msgstr "Corrigez-les dans l'espace de travail,\n" -"et utilisez 'git add/rm <fichier>' comme\n" +msgstr "" +"Corrigez-les dans la copie de travail,\n" +"et utilisez 'git add/rm <fichier>' si\n" "nécessaire pour marquer la résolution et valider,\n" "ou utilisez 'git commit -a'." @@ -47,7 +96,7 @@ msgstr "git archive --list" #: archive.c:12 msgid "" "git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]" -msgstr "git archive --remote <dépot> [--exec <commande>] [options] <arbre> [<chemin>...]" +msgstr "git archive --remote <dépôt> [--exec <commande>] [options] <arbre> [<chemin>...]" #: archive.c:13 msgid "git archive --remote <repo> [--exec <cmd>] --list" @@ -67,7 +116,7 @@ msgstr "préfixe" #: archive.c:325 msgid "prepend prefix to each pathname in the archive" -msgstr "Préfixer chaque chemin de fichier dans l'archive" +msgstr "préfixer chaque chemin de fichier dans l'archive" #: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 #: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 @@ -79,7 +128,7 @@ msgstr "fichier" #: archive.c:327 builtin/archive.c:89 msgid "write the archive to this file" -msgstr "Écrire l'archive dans ce fichier" +msgstr "écrire l'archive dans ce fichier" #: archive.c:329 msgid "read .gitattributes in working directory" @@ -125,8 +174,9 @@ msgstr "chemin vers la commande distante git-upload-archive" msgid "" "Negative patterns are ignored in git attributes\n" "Use '\\!' for literal leading exclamation." -msgstr "Les patrons négatifs sont ignorés dans les attributs git\n" -"Utilisez '\\!' pour un point d'exclamation littéral" +msgstr "" +"Les motifs de négation sont ignorés dans les attributs git\n" +"Utilisez '\\!' pour un point d'exclamation littéral." #: branch.c:60 #, c-format @@ -217,30 +267,30 @@ msgid "" "If you are planning to push out a new local branch that\n" "will track its remote counterpart, you may want to use\n" "\"git push -u\" to set the upstream config as you push." -msgstr "\n" +msgstr "" +"\n" "Si vous comptez baser votre travail sur une branche\n" "amont qui existe déjà sur le serveur distant, vous pourriez\n" "devoir lancer \"git fetch\" pour la récupérer.\n" "\n" -"Si vous comptez pousser une nouvelle branche locale\n" -"qui suivra sa jumelle distante, vous souhaiterez utiliser\n" -"\"git push -u\" pour paramétrer le suivi distant en même\n" -"temps que vous poussez." +"Si vous comptez pousser une nouvelle branche locale qui suivra\n" +"sa jumelle distante, vous souhaiterez utiliser \"git push -u\"\n" +"pour paramétrer le suivi distant en même temps que vous poussez." #: branch.c:250 #, c-format msgid "Not a valid object name: '%s'." -msgstr "Nom d'objet invalide : '%s'" +msgstr "Nom d'objet invalide : '%s'." #: branch.c:270 #, c-format msgid "Ambiguous object name: '%s'." -msgstr "Nom d'objet ambigu : '%s'" +msgstr "Nom d'objet ambigu : '%s'." #: branch.c:275 #, c-format msgid "Not a valid branch point: '%s'." -msgstr "Point d'embranchement invalide : '%s'" +msgstr "Point d'embranchement invalide : '%s'." #: branch.c:281 msgid "Failed to lock ref for update" @@ -258,7 +308,7 @@ msgstr "'%s' ne semble pas être un fichier bundle v2" #: bundle.c:63 #, c-format msgid "unrecognized header: %s%s (%d)" -msgstr "entête non reconnu : %s %s (%d)" +msgstr "en-tête non reconnu : %s%s (%d)" #: bundle.c:89 builtin/commit.c:676 #, c-format @@ -284,13 +334,13 @@ msgstr[1] "Le colis contient ces %d références :" #: bundle.c:193 msgid "The bundle records a complete history." -msgstr "Le bundle enregistre l'historique complet." +msgstr "Le colis enregistre l'historique complet." #: bundle.c:195 #, c-format msgid "The bundle requires this ref:" msgid_plural "The bundle requires these %d refs:" -msgstr[0] "Le colis exige cette référence" +msgstr[0] "Le colis exige cette référence :" msgstr[1] "Le colis exige ces %d références :" #: bundle.c:294 @@ -305,11 +355,11 @@ msgstr "argument non reconnu : %s" #: bundle.c:335 #, c-format msgid "ref '%s' is excluded by the rev-list options" -msgstr "ref '%s' est exclus par les options de rev-list" +msgstr "la référence '%s' est exclue par les options de rev-list" #: bundle.c:380 msgid "Refusing to create empty bundle." -msgstr "Refus de créer un bundle vide" +msgstr "Refus de créer un colis vide." #: bundle.c:398 msgid "Could not spawn pack-objects" @@ -340,16 +390,16 @@ msgstr "%s %s n'est pas un commit !" #: compat/obstack.c:406 compat/obstack.c:408 msgid "memory exhausted" -msgstr "Plus de mémoire" +msgstr "plus de mémoire" #: connected.c:39 msgid "Could not run 'git rev-list'" -msgstr "impossible de lancer 'git rev-list'" +msgstr "Impossible de lancer 'git rev-list'" #: connected.c:48 #, c-format msgid "failed write to rev-list: %s" -msgstr "impossible d'écrire la rev-list : %s" +msgstr "impossible d'écrire dans la rev-list : %s" #: connected.c:56 #, c-format @@ -507,14 +557,16 @@ msgstr "commandes git disponibles depuis un autre endroit de votre $PATH" #: help.c:235 msgid "The most commonly used git commands are:" -msgstr "Les commandes git les plus usitées sont :" +msgstr "Les commandes git les plus utilisées sont :" #: help.c:292 #, c-format msgid "" "'%s' appears to be a git command, but we were not\n" "able to execute it. Maybe git-%s is broken?" -msgstr "'%s' semble être une commande git, mais elle n'a pas pu être éxecutée. Peut-être git-%s est-il cassé ?" +msgstr "" +"'%s' semble être une commande git, mais elle n'a pas pu\n" +"être exécutée. Peut-être git-%s est-elle cassée ?" #: help.c:349 msgid "Uh oh. Your system reports no Git commands at all." @@ -526,17 +578,17 @@ msgid "" "WARNING: You called a Git command named '%s', which does not exist.\n" "Continuing under the assumption that you meant '%s'" msgstr "ATTENTION : vous avez invoqué une commande Git nommée '%s' qui n'existe pas.\n" -"Poursuite avec l'hypothèse que vous avez voulu dire '%s'" +"Poursuite en supposant que vous avez voulu dire '%s'" #: help.c:376 #, c-format msgid "in %0.1f seconds automatically..." -msgstr "dans %01f secondes automatiquement..." +msgstr "dans %0.1f secondes automatiquement..." #: help.c:383 #, c-format msgid "git: '%s' is not a git command. See 'git --help'." -msgstr "git : '%s' n'est pas une commande git. Référez-vous à 'git --help'" +msgstr "git : '%s' n'est pas une commande git. Voir 'git --help'." #: help.c:387 msgid "" @@ -547,8 +599,7 @@ msgid_plural "" "Did you mean one of these?" msgstr[0] "\n" "Vouliez-vous dire cela ?" -msgstr[1] "\n" -"Vouliez-vous dire un de cela ?" +msgstr[1] "\nVouliez-vous dire un de ceux-là ?" #: merge.c:56 msgid "failed to read the cache" @@ -567,11 +618,11 @@ msgstr "(mauvais commit)\n" #: merge-recursive.c:206 #, c-format msgid "addinfo_cache failed for path '%s'" -msgstr "Échec de addinfo_cache pour le chemin '%s'" +msgstr "échec de addinfo_cache pour le chemin '%s'" #: merge-recursive.c:268 msgid "error building trees" -msgstr "Erreur à la construction des arbres" +msgstr "erreur de construction des arbres" #: merge-recursive.c:672 #, c-format @@ -607,12 +658,12 @@ msgstr "blob attendu pour %s '%s'" #: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" -msgstr "Échec à l'ouverture de '%s'" +msgstr "échec à l'ouverture de '%s'" #: merge-recursive.c:781 #, c-format msgid "failed to symlink '%s'" -msgstr "Échec à la création du lien symbolique '%s'" +msgstr "échec à la création du lien symbolique '%s'" #: merge-recursive.c:784 #, c-format @@ -644,7 +695,7 @@ msgstr "CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version % msgid "" "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left " "in tree at %s." -msgstr "CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans%s. Version %s de %s laissée dans l'arbre dans le fichier %s." +msgstr "CONFLIT (%s/suppression) : %s supprimé dans %s et %s dans %s. Version %s de %s laissée dans l'arbre dans le fichier %s." #: merge-recursive.c:1081 msgid "rename" @@ -664,7 +715,7 @@ msgstr "%s est un répertoire dans %s ajouté plutôt comme %s" msgid "" "CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s" "\"->\"%s\" in \"%s\"%s" -msgstr "CONFLIT (renommage/renommage) : Renommage de '%s'->'%s' dans la branche '%s' et renommage '%s'->'%s' dans '%s'%s" +msgstr "CONFLIT (renommage/renommage) : Renommage de \"%s\"->\"%s\" dans la branche \"%s\" et renommage \"%s\"->\"%s\" dans \"%s\"%s" #: merge-recursive.c:1164 msgid " (left unresolved)" @@ -678,12 +729,12 @@ msgstr "CONFLIT (renommage/renommage) : renommage '%s'->'%s' dans %s. Renommage #: merge-recursive.c:1248 #, c-format msgid "Renaming %s to %s and %s to %s instead" -msgstr "Renommage préféré de %s en %s et de %s en %s" +msgstr "Renommage de %s en %s et de %s en %s à la place" #: merge-recursive.c:1447 #, c-format msgid "CONFLICT (rename/add): Rename %s->%s in %s. %s added in %s" -msgstr "CONFLIT (renommage/ajout) : renommage de '%s'->'%s' dans ' %s. %s ajouté dans %s" +msgstr "CONFLIT (renommage/ajout) : Renommage de %s->%s dans %s. %s ajouté dans %s" #: merge-recursive.c:1457 #, c-format @@ -729,7 +780,7 @@ msgstr "%s ignoré (fusion identique à l'existant)" #: merge-recursive.c:1629 #, c-format msgid "Auto-merging %s" -msgstr "fusion automatique de %s" +msgstr "Fusion automatique de %s" #: merge-recursive.c:1633 git-submodule.sh:1029 msgid "submodule" @@ -738,7 +789,7 @@ msgstr "sous-module" #: merge-recursive.c:1634 #, c-format msgid "CONFLICT (%s): Merge conflict in %s" -msgstr "CONFLIT (%s) : conflit de fusion dans %s" +msgstr "CONFLIT (%s) : Conflit de fusion dans %s" #: merge-recursive.c:1724 #, c-format @@ -774,7 +825,7 @@ msgstr "Déjà à jour !" #: merge-recursive.c:1815 #, c-format msgid "merging of trees %s and %s failed" -msgstr "Échec de fusion des arbres %s et %s" +msgstr "échec de fusion des arbres %s et %s" #: merge-recursive.c:1845 #, c-format @@ -808,7 +859,7 @@ msgstr "Impossible d'écrire l'index." #: object.c:195 #, c-format msgid "unable to parse object: %s" -msgstr "Impossible d'analyser l'objet '%s'" +msgstr "impossible d'analyser l'objet : %s" #: parse-options.c:489 msgid "..." @@ -849,24 +900,24 @@ msgstr "'%s' est au delà d'un lien symbolique" #, 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] "Votre branche est en avance sur '%s' par %d commit.\n" -msgstr[1] "Votre branche est en avance sur '%s' par %d commits.\n" +msgstr[0] "Votre branche est en avance sur '%s' de %d commit.\n" +msgstr[1] "Votre branche est en avance sur '%s' de %d commits.\n" #: remote.c:1787 msgid " (use \"git push\" to publish your local commits)\n" -msgstr " (utilisez 'git push' pour publier vos commits locaux)\n" +msgstr " (utilisez \"git push\" pour publier vos commits locaux)\n" #: remote.c:1790 #, c-format msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n" msgid_plural "" "Your branch is behind '%s' by %d commits, and can be fast-forwarded.\n" -msgstr[0] "Votre branche est en retard sur '%s' par %d commit, et peut être mise à jour en avance rapide.\n" -msgstr[1] "Votre branche est en retard sur '%s' par %d commits, et peut être mise à jour en avance rapide.\n" +msgstr[0] "Votre branche est en retard sur '%s' de %d commit, et peut être mise à jour en avance rapide.\n" +msgstr[1] "Votre branche est en retard sur '%s' de %d commits, et peut être mise à jour en avance rapide.\n" #: remote.c:1798 msgid " (use \"git pull\" to update your local branch)\n" -msgstr " ( utilisez 'git pull' pour mettre à jour votre branche locale)\n" +msgstr " (utilisez \"git pull\" pour mettre à jour votre branche locale)\n" #: remote.c:1801 #, c-format @@ -909,7 +960,8 @@ msgid "" "after resolving the conflicts, mark the corrected paths\n" "with 'git add <paths>' or 'git rm <paths>'\n" "and commit the result with 'git commit'" -msgstr "après résolution des conflits, marquez les chemins corrigés\n" +msgstr "" +"après résolution des conflits, marquez les chemins corrigés\n" "avec 'git add <chemins>' ou 'git rm <chemins>'\n" "puis validez le résultat avec 'git commit'" @@ -925,7 +977,7 @@ msgstr "Erreur à l'emballage de %s" #: sequencer.c:263 msgid "Your local changes would be overwritten by cherry-pick." -msgstr "Vos modifications locales serait écrasées par cherry-pick." +msgstr "Vos modifications locales seraient écrasées par cherry-pick." #: sequencer.c:265 msgid "Your local changes would be overwritten by revert." @@ -939,7 +991,7 @@ msgstr "Validez vos modifications ou remisez-les pour continuer." #: sequencer.c:319 #, c-format msgid "%s: Unable to write new index file" -msgstr "%s: impossiblde d'écrire le nouveau fichier index" +msgstr "%s: Impossible d'écrire le nouveau fichier index" #: sequencer.c:350 msgid "Could not resolve HEAD commit\n" @@ -971,7 +1023,7 @@ msgstr "Le commit %s est une fusion mais l'option -m n'a pas été spécifiée." #: sequencer.c:514 #, c-format msgid "Commit %s does not have parent %d" -msgstr "Le commit %s n'a pas %d pour parent" +msgstr "Le commit %s n'a pas le parent %d" #: sequencer.c:518 #, c-format @@ -1060,7 +1112,7 @@ msgstr "Feuille d'options malformée : %s" #: sequencer.c:840 msgid "a cherry-pick or revert is already in progress" -msgstr "Un picorage ou un retour est déjà en cours" +msgstr "un picorage ou un retour est déjà en cours" #: sequencer.c:841 msgid "try \"git cherry-pick (--continue | --quit | --abort)\"" @@ -1105,7 +1157,7 @@ msgstr "fin de fichier inattendue" #: sequencer.c:916 #, c-format msgid "stored pre-cherry-pick HEAD file '%s' is corrupt" -msgstr "Le fichier HEAD de préparation de picorage '%s' est corrompu" +msgstr "le fichier HEAD de préparation de picorage '%s' est corrompu" #: sequencer.c:939 #, c-format @@ -1120,7 +1172,7 @@ msgstr "%s : impossible de picorer un %s" #: sequencer.c:1085 #, c-format msgid "%s: bad revision" -msgstr "%s: mauvaise révision" +msgstr "%s : mauvaise révision" #: sequencer.c:1119 msgid "Can't revert as initial commit" @@ -1128,7 +1180,7 @@ msgstr "Impossible d'annuler en tant que commit initial" #: sequencer.c:1120 msgid "Can't cherry-pick into empty head" -msgstr "Impossible de picorer vers un HEAD vide" +msgstr "Impossible de picorer vers une HEAD vide" #: sha1_name.c:1036 msgid "HEAD does not point to a branch" @@ -1183,15 +1235,15 @@ msgstr " (utilisez \"git rm --cached <fichier>...\" pour désindexer)" #: wt-status.c:173 msgid " (use \"git add <file>...\" to mark resolution)" -msgstr " (utilisez \"git add <fichier>...\" pour marquer résolu)" +msgstr " (utilisez \"git add <fichier>...\" pour marquer comme résolu)" #: wt-status.c:175 wt-status.c:179 msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)" -msgstr " (utilisez \"git add/rm <fichier>...\" selon le cas pour marquer résolu)" +msgstr " (utilisez \"git add/rm <fichier>...\" si nécessaire pour marquer comme résolu)" #: wt-status.c:177 msgid " (use \"git rm <file>...\" to mark resolution)" -msgstr " (utilisez \"git rm <fichier>...\" pour marquer résolu)" +msgstr " (utilisez \"git rm <fichier>...\" pour marquer comme résolu)" #: wt-status.c:188 msgid "Changes to be committed:" @@ -1216,7 +1268,7 @@ msgstr " (utilisez \"git checkout -- <fichier>...\" pour annuler les modificati #: wt-status.c:215 msgid " (commit or discard the untracked or modified content in submodules)" -msgstr " (valider out annuler le contenu non suivi our modifié dans les sous-modules)" +msgstr " (valider ou annuler le contenu non suivi ou modifié dans les sous-modules)" #: wt-status.c:227 #, c-format @@ -1229,7 +1281,7 @@ msgstr "bogue" #: wt-status.c:249 msgid "both deleted:" -msgstr "effacé des deux côtés :" +msgstr "supprimé des deux côtés :" #: wt-status.c:250 msgid "added by us:" @@ -1237,7 +1289,7 @@ msgstr "ajouté par nous :" #: wt-status.c:251 msgid "deleted by them:" -msgstr "effacé par eux :" +msgstr "supprimé par eux :" #: wt-status.c:252 msgid "added by them:" @@ -1245,11 +1297,11 @@ msgstr "ajouté par eux :" #: wt-status.c:253 msgid "deleted by us:" -msgstr "effacé par nous :" +msgstr "supprimé par nous :" #: wt-status.c:254 msgid "both added:" -msgstr "Ajouté de deux côtés :" +msgstr "ajouté de deux côtés :" #: wt-status.c:255 msgid "both modified:" @@ -1270,42 +1322,42 @@ msgstr "contenu non suivi, " #: wt-status.c:306 #, c-format msgid "new file: %s" -msgstr "nouveau : %s" +msgstr "nouveau : %s" #: wt-status.c:309 #, c-format msgid "copied: %s -> %s" -msgstr "copié : %s->%s" +msgstr "copié : %s -> %s" #: wt-status.c:312 #, c-format msgid "deleted: %s" -msgstr "effacé : %s" +msgstr "supprimé : %s" #: wt-status.c:315 #, c-format msgid "modified: %s" -msgstr "modifié : %s" +msgstr "modifié : %s" #: wt-status.c:318 #, c-format msgid "renamed: %s -> %s" -msgstr "renommé : %s -> %s" +msgstr "renommé : %s -> %s" #: wt-status.c:321 #, c-format msgid "typechange: %s" -msgstr "nv type : %s" +msgstr "nv type : %s" #: wt-status.c:324 #, c-format msgid "unknown: %s" -msgstr "inconnu : %s" +msgstr "inconnu : %s" #: wt-status.c:327 #, c-format msgid "unmerged: %s" -msgstr "non fus : %s" +msgstr "non fus. : %s" #: wt-status.c:330 #, c-format @@ -1346,7 +1398,7 @@ msgstr " (utilisez \"git am --skip\" pour sauter ce patch)" #: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" -msgstr " (utilisez \"git am --abort\" pour restaurer la branche originelle)" +msgstr " (utilisez \"git am --abort\" pour restaurer la branche d'origine)" #: wt-status.c:893 wt-status.c:910 #, c-format @@ -1416,7 +1468,7 @@ msgstr " (tous les conflits sont résolus : lancez \"git commit\")" #: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." -msgstr "Vous êtes actuellement en train de rétablir un commit %s." +msgstr "Vous êtes actuellement en train de rétablir le commit %s." #: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" @@ -1441,7 +1493,7 @@ msgstr "Vous êtes en cours de bissection." #: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" -msgstr " (utilisez \"git bisect reset\" pour revenir à la branche de départ)" +msgstr " (utilisez \"git bisect reset\" pour revenir à la branche d'origine)" #: wt-status.c:1173 msgid "On branch " @@ -1449,11 +1501,11 @@ msgstr "Sur la branche " #: wt-status.c:1184 msgid "HEAD detached at " -msgstr "HEAD détaché sur " +msgstr "HEAD détachée sur " #: wt-status.c:1186 msgid "HEAD detached from " -msgstr "HEAD détaché depuis " +msgstr "HEAD détachée depuis " #: wt-status.c:1189 msgid "Not currently on any branch." @@ -1461,7 +1513,7 @@ msgstr "Actuellement sur aucun branche." #: wt-status.c:1206 msgid "Initial commit" -msgstr "Validation initiale." +msgstr "Validation initiale" #: wt-status.c:1220 msgid "Untracked files" @@ -1484,7 +1536,7 @@ msgstr "L'énumération des fichiers non suivis a duré %.2f secondes. 'status - #: wt-status.c:1232 #, c-format msgid "Untracked files not listed%s" -msgstr "Les fichiers non suivis ne sont pas listés %s" +msgstr "Fichiers non suivis non listés%s" #: wt-status.c:1234 msgid " (use -u option to show untracked files)" @@ -1497,29 +1549,29 @@ msgstr "Aucune modification" #: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" -msgstr "aucune modification n'a été ajoutée au commit (utilisez \"git add\" ou \"git commit -a\")\n" +msgstr "aucune modification n'a été ajoutée à la validation (utilisez \"git add\" ou \"git commit -a\")\n" #: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" -msgstr "aucune modification indexée\n" +msgstr "aucune modification ajoutée à la validation\n" #: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " "track)\n" -msgstr "Aucune modification indexée mais des fichiers non suivis sont présents (utilisez \"git add\" pour les suivre)\n" +msgstr "aucune modification ajoutée à la validation mais des fichiers non suivis sont présents (utilisez \"git add\" pour les suivre)\n" #: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" -msgstr "Aucune modification indexée mais des fichiers non-suivis sont présents\n" +msgstr "aucune modification ajoutée à la validation mais des fichiers non suivis sont présents\n" #: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" -msgstr "rien à valider (créez/copiez des fichiers et utilisez \"git add\" pour le suivre)\n" +msgstr "rien à valider (créez/copiez des fichiers et utilisez \"git add\" pour les suivre)\n" #: wt-status.c:1260 wt-status.c:1265 #, c-format @@ -1593,10 +1645,10 @@ msgid "" "\n" "With the current Git version, the command is restricted to the current " "directory.\n" -msgstr "Le comportement de 'git add %s (ou %s)' sans argument de chemin\n" -"depuis un sous-répertoire du projet va changer dans Git 2.0. Cet usage\n" -"est déconseillé.\n" -"Pour ajouter du contenu pour tout le projet, lancez :\n" +msgstr "" +"Le comportement de 'git add %s (ou %s)' sans argument de chemin depuis un\n" +"sous-répertoire du projet va changer dans Git 2.0 et ne doit plus être utilisé.\n" +"Pour ajouter le contenu de toute l'arborescence, lancez :\n" "\n" " git add %s :/\n" " (ou git add %s :/)\n" @@ -1622,15 +1674,18 @@ msgid "" "* 'git add --all <pathspec>' will let you also record the removals.\n" "\n" "Run 'git status' to check the paths you removed from your working tree.\n" -msgstr "Vous avez lancé 'git add' sans '-A (--all)' ni '--ignore-removal',\n" -"Le comportement vis à vis des fichiers supprimés va changer dans Git 2.0.\n" -"Les chemins tels que '%s' qui ont été retirés de votre copie de travail sont\n" -"actuellement ignorés.\n" +msgstr "" +"Vous avez lancé 'git add' sans '-A (--all)' ni '--ignore-removal',\n" +"dont le comportement va changer dans Git 2.0 avec le respect des chemins que vous supprimez.\n" +"Les chemins tels que '%s' qui ont été\n" +"retirés de votre copie de travail sont ignorés avec cette version de Git.\n" "\n" -" 'git add --ignore-removal <chemin>', est l'option par défaut actuelle qui\n" -" ignore les chemins que vous avez supprimé de votre copie de travail.\n" +"* 'git add --ignore-removal <chemin>', qui est l'option par défaut actuelle,\n" +" ignore les chemins que vous avez supprimés de votre copie de travail.\n" "\n" "* 'git add --all <chemin>' permet d'enregistrer aussi les suppressions.\n" +"\n" +"Lancez 'git status' pour vérifier les chemins que vous avez supprimés de votre copie de travail.\n" #: builtin/add.c:144 #, c-format @@ -1639,16 +1694,16 @@ msgstr "status de diff inattendu %c" #: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" -msgstr "echec de la mise à jour des fichiers" +msgstr "échec de la mise à jour des fichiers" #: builtin/add.c:163 #, c-format msgid "remove '%s'\n" -msgstr "retrait de '%s'\n" +msgstr "suppression de '%s'\n" #: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" -msgstr "Modifications non indexées après rafraîchissement de l'index" +msgstr "Modifications non indexées après rafraîchissement de l'index :" #: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format @@ -1716,7 +1771,7 @@ msgstr "permettre l'ajout de fichiers ignorés" #: builtin/add.c:400 msgid "update tracked files" -msgstr "mise à jour des fichiers suivis" +msgstr "mettre à jour les fichiers suivis" #: builtin/add.c:401 msgid "record only the fact that the path will be added later" @@ -1724,7 +1779,7 @@ msgstr "enregistrer seulement le fait que le chemin sera ajouté plus tard" #: builtin/add.c:402 msgid "add changes from all tracked and untracked files" -msgstr "ajouter les modifications de tous les fichiers suivis et non-suivis" +msgstr "ajouter les modifications de tous les fichiers suivis et non suivis" #. takes no arguments #: builtin/add.c:405 @@ -1741,7 +1796,7 @@ msgstr "sauter seulement les fichiers qui ne peuvent pas être ajoutés du fait #: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" -msgstr "vérifier à vide si des fichiers, même manquants, sont ignorés" +msgstr "vérifier si des fichiers - même manquants - sont ignorés, à vide" #: builtin/add.c:431 #, c-format @@ -1754,7 +1809,7 @@ msgstr "aucun fichier ajouté" #: builtin/add.c:438 msgid "adding files failed" -msgstr "echec de l'ajout de fichiers" +msgstr "échec de l'ajout de fichiers" #: builtin/add.c:477 msgid "-A and -u are mutually incompatible" @@ -1762,17 +1817,17 @@ msgstr "-A et -u sont mutuellement incompatibles" #: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" -msgstr "L'option --ignore-missing ne peut être utilisée qu'en complément de --dry-run" +msgstr "L'option --ignore-missing ne peut être utilisée qu'en complément de --dry-run" #: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" -msgstr "Spécification vide, riien à ajouter.\n" +msgstr "Rien de spécifié, rien n'a été ajouté.\n" #: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" -msgstr "Vous voulez sûrement dire 'git add .' ?\n" +msgstr "Vous vouliez sûrement dire 'git add .' ?\n" #: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 @@ -1785,17 +1840,17 @@ msgstr "Impossible d'écrire le nouveau fichier d'index" #: builtin/apply.c:57 msgid "git apply [options] [<patch>...]" -msgstr "git apply [option] [<patch>...]" +msgstr "git apply [options] [<patch>...]" #: builtin/apply.c:110 #, c-format msgid "unrecognized whitespace option '%s'" -msgstr "option d'espaces non reconnue '%s'" +msgstr "option d'espace non reconnue '%s'" #: builtin/apply.c:125 #, c-format msgid "unrecognized whitespace ignore option '%s'" -msgstr "option d'espaces ignorés non reconnue '%s'" +msgstr "option d'ignorance d'espce non reconnue '%s'" #: builtin/apply.c:823 #, c-format @@ -1805,32 +1860,32 @@ msgstr "Impossible de préparer la regexp d'horodatage %s" #: builtin/apply.c:832 #, c-format msgid "regexec returned %d for input: %s" -msgstr "regexec a retourné %d pour l'entrée %s" +msgstr "regexec a retourné %d pour l'entrée : %s" #: builtin/apply.c:913 #, c-format msgid "unable to find filename in patch at line %d" -msgstr "nom de fichier du patch introuvable ligne %d" +msgstr "nom de fichier du patch introuvable à la ligne %d" #: builtin/apply.c:945 #, c-format msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d" -msgstr "git apply : mauvais format de git-diff - /dev/null attendu, %s trouvé ligne %d" +msgstr "git apply : mauvais format de git-diff - /dev/null attendu, %s trouvé à la ligne %d" #: builtin/apply.c:949 #, c-format msgid "git apply: bad git-diff - inconsistent new filename on line %d" -msgstr "git apply : mauvais format de git-diff - nouveau nom de fichier inconsistant ligne %d" +msgstr "git apply : mauvais format de git-diff - nouveau nom de fichier inconsistant à la ligne %d" #: builtin/apply.c:950 #, c-format msgid "git apply: bad git-diff - inconsistent old filename on line %d" -msgstr "git apply : mauvais format de git-diff - ancien nom de fichier inconsistant ligne %d" +msgstr "git apply : mauvais format de git-diff - ancien nom de fichier inconsistant à la ligne %d" #: builtin/apply.c:957 #, c-format msgid "git apply: bad git-diff - expected /dev/null on line %d" -msgstr "git apply : mauvais format de git-diff - /dev/null attendu ligne %d" +msgstr "git apply : mauvais format de git-diff - /dev/null attendu à la ligne %d" #: builtin/apply.c:1422 #, c-format @@ -1840,7 +1895,7 @@ msgstr "recount : ligne inattendue : %.*s" #: builtin/apply.c:1479 #, c-format msgid "patch fragment without header at line %d: %.*s" -msgstr "fragment de patch sans entête ligne %d : %.*s" +msgstr "fragment de patch sans en-tête à la ligne %d : %.*s" #: builtin/apply.c:1496 #, c-format @@ -1850,8 +1905,8 @@ msgid "" msgid_plural "" "git diff header lacks filename information when removing %d leading pathname " "components (line %d)" -msgstr[0] "information de nom de fichier manquante dans l'entête de git diff lors de la suppression de %d composant de préfix de chemin (ligne %d)" -msgstr[1] "information de nom de fichier manquante dans l'entête de git diff lors de la suppression de %d composants de préfix de chemin (ligne %d)" +msgstr[0] "information de nom de fichier manquante dans l'en-tête de git diff lors de la suppression de %d composant de préfixe de chemin (ligne %d)" +msgstr[1] "information de nom de fichier manquante dans l'en-tête de git diff lors de la suppression de %d composants de préfixe de chemin (ligne %d)" #: builtin/apply.c:1656 msgid "new file depends on old contents" @@ -1879,28 +1934,28 @@ msgstr "le fichier supprimé %s a encore du contenu" #: builtin/apply.c:1725 #, c-format msgid "** warning: file %s becomes empty but is not deleted" -msgstr "** attention : le fichier %s devient vide mais n'est pas effacé" +msgstr "** attention : le fichier %s devient vide mais n'est pas supprimé" #: builtin/apply.c:1871 #, c-format msgid "corrupt binary patch at line %d: %.*s" -msgstr "patch binaire corrompu ligne %d : %.*s" +msgstr "patch binaire corrompu à la ligne %d : %.*s" #. there has to be one hunk (forward hunk) #: builtin/apply.c:1900 #, c-format msgid "unrecognized binary patch at line %d" -msgstr "patch binaire non reconnu ligne %d" +msgstr "patch binaire non reconnu à la ligne %d" #: builtin/apply.c:1986 #, c-format msgid "patch with only garbage at line %d" -msgstr "patch totalement incompréhensible ligne %d" +msgstr "patch totalement incompréhensible à la ligne %d" #: builtin/apply.c:2076 #, c-format msgid "unable to read symlink %s" -msgstr "lecture du symlink %s impossible" +msgstr "lecture du lien symbolique %s impossible" #: builtin/apply.c:2080 #, c-format @@ -1916,8 +1971,8 @@ msgstr "début de ligne invalide : '%c'" #, c-format msgid "Hunk #%d succeeded at %d (offset %d line)." msgid_plural "Hunk #%d succeeded at %d (offset %d lines)." -msgstr[0] "La section #%d a réussi à la ligne %d (offset %d ligne)" -msgstr[1] "La section #%d a réussi à la ligne %d (offset %d lignes)" +msgstr[0] "La section n°%d a réussi à la ligne %d (offset %d ligne)." +msgstr[1] "La section n°%d a réussi à la ligne %d (offset %d lignes)." #: builtin/apply.c:2818 #, c-format @@ -1950,7 +2005,7 @@ msgstr "le patch binaire sur '%s' crée un résultat incorrect (%s attendu, mais #: builtin/apply.c:2973 #, c-format msgid "patch failed: %s:%ld" -msgstr "le patch a échoué : %s : %ld" +msgstr "le patch a échoué : %s:%ld" #: builtin/apply.c:3095 #, c-format @@ -1965,7 +2020,7 @@ msgstr "echec de la lecture de %s" #: builtin/apply.c:3173 builtin/apply.c:3395 #, c-format msgid "path %s has been renamed/deleted" -msgstr "le fichier %s a été renommé/supprimé" +msgstr "le chemin %s a été renommé/supprimé" #: builtin/apply.c:3254 builtin/apply.c:3409 #, c-format @@ -2049,7 +2104,7 @@ msgstr "stat du fichier nouvellement créé '%s' impossible" #: builtin/apply.c:3859 #, c-format msgid "unable to create backing store for newly created file %s" -msgstr "création du magasin de sauvegard pour le fichier nouvellement créé %s impossible" +msgstr "création du magasin de stockage pour le fichier nouvellement créé %s impossible" #: builtin/apply.c:3862 builtin/apply.c:3970 #, c-format @@ -2059,7 +2114,7 @@ msgstr "ajout de l'entrée de cache %s impossible" #: builtin/apply.c:3895 #, c-format msgid "closing file '%s'" -msgstr "fermeture du ficheir '%s'" +msgstr "fermeture du fichier '%s'" #: builtin/apply.c:3944 #, c-format @@ -2091,12 +2146,12 @@ msgstr "troncature du nom de fichier .rej en %.*s.rej" #: builtin/apply.c:4073 #, c-format msgid "Hunk #%d applied cleanly." -msgstr "Section no %d appliqué proprement." +msgstr "Section n°%d appliquée proprement." #: builtin/apply.c:4076 #, c-format msgid "Rejected hunk #%d." -msgstr "Section no %d rejetée." +msgstr "Section n°%d rejetée." #: builtin/apply.c:4226 msgid "unrecognized input" @@ -2165,7 +2220,7 @@ msgstr "tenter une fusion à 3 points si le patch ne s'applique pas proprement" #: builtin/apply.c:4386 msgid "build a temporary index based on embedded index information" -msgstr "construire une index temporaire fondé sur l'information de l'index embarqué" +msgstr "construire un index temporaire fondé sur l'information de l'index embarqué" #: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" @@ -2185,15 +2240,15 @@ msgstr "détecter des lignes nouvelles ou modifiées qui contiennent des erreurs #: builtin/apply.c:4396 builtin/apply.c:4399 msgid "ignore changes in whitespace when finding context" -msgstr "ignorer des modifications d'espaces lors de la recherche de contexte" +msgstr "ignorer des modifications d'espace lors de la recherche de contexte" #: builtin/apply.c:4402 msgid "apply the patch in reverse" -msgstr "appliquer le patch en inverse" +msgstr "appliquer le patch en sens inverse" #: builtin/apply.c:4404 msgid "don't expect at least one line of context" -msgstr "accepter moins d'une ligne de contexte" +msgstr "ne pas s'attendre à au moins une ligne de contexte" #: builtin/apply.c:4406 msgid "leave the rejected hunks in corresponding *.rej files" @@ -2205,11 +2260,11 @@ msgstr "accepter les recouvrements de sections" #: builtin/apply.c:4411 msgid "tolerate incorrectly detected missing new-line at the end of file" -msgstr "tolérer faux positifs de retours chariot manquant en fin de fichier" +msgstr "tolérer des erreurs de détection de retours chariot manquants en fin de fichier" #: builtin/apply.c:4414 msgid "do not trust the line counts in the hunk headers" -msgstr "ne pas se fier au comptes de lignes dans les entêtes de section" +msgstr "ne pas se fier au compte de lignes dans les en-têtes de section" #: builtin/apply.c:4416 msgid "root" @@ -2225,7 +2280,7 @@ msgstr "--3way hors d'un dépôt" #: builtin/apply.c:4447 msgid "--index outside a repository" -msgstr "--index hors d'une dépôt" +msgstr "--index hors d'un dépôt" #: builtin/apply.c:4450 msgid "--cached outside a repository" @@ -2247,7 +2302,7 @@ msgstr[1] "%d erreurs d'espace ignorées" #, c-format msgid "%d line adds whitespace errors." msgid_plural "%d lines add whitespace errors." -msgstr[0] "%d ligne ont ajouté des erreurs d'espace." +msgstr[0] "%d ligne a ajouté des erreurs d'espace." msgstr[1] "%d lignes ont ajouté des erreurs d'espace." #: builtin/archive.c:17 @@ -2299,23 +2354,23 @@ msgstr "mettre à jour BISECT_HEAD au lieu d'extraire le commit actuel" #: builtin/blame.c:25 msgid "git blame [options] [rev-opts] [rev] [--] file" -msgstr "git blame [options] [option de révision] [rev] [--] file" +msgstr "git blame [options] [options-de-révision] [rev] [--] fichier" #: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" -msgstr "[rev-opts] sont documentés dans git-rev-list(1)" +msgstr "[options-de-révision] sont documentés dans git-rev-list(1)" #: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" -msgstr "Montrer les entrée de blame au fur et à mesure de leur découverte, incrémentalement" +msgstr "Montrer les entrée de blâme au fur et à mesure de leur découverte, de manière incrémentale" #: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" -msgstr "Montrer un SHA-1 blanc pour les commits de limite (défaut : désactivé)" +msgstr "Montrer un SHA-1 blanc pour les commits de limite (Défaut : désactivé)" #: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" -msgstr "Ne pas traiter les commits racine comme des limites (défaut : désactivé)" +msgstr "Ne pas traiter les commits racine comme des limites (Défaut : désactivé)" #: builtin/blame.c:2358 msgid "Show work cost statistics" @@ -2327,11 +2382,11 @@ msgstr "Montrer le score de sortie pour les entrées de blâme" #: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" -msgstr "Montrer les noms de fichier originaux (défaut : auto)" +msgstr "Montrer les noms de fichier originaux (Défaut : auto)" #: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" -msgstr "Montrer les numéros de lignes originaux (défaut : désactivé)" +msgstr "Montrer les numéros de lignes originaux (Défaut : désactivé)" #: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" @@ -2343,23 +2398,23 @@ msgstr "Afficher en format porcelaine avec l'information de commit par ligne" #: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" -msgstr "Utiliser le même mode de sortie que git-annotate (défaut : désactivé)" +msgstr "Utiliser le même mode de sortie que git-annotate (Défaut : désactivé)" #: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" -msgstr "Afficher les horodatages bruts (défaut: désactivé)" +msgstr "Afficher les horodatages bruts (Défaut: désactivé)" #: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" -msgstr "Afficher les SHA1 longs (defaut : désactivé)" +msgstr "Afficher les longs SHA1 de commits (Défaut : désactivé)" #: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" -msgstr "Supprimer le nom de l'auteur et l'horodatage (défaut : désactivé)" +msgstr "Supprimer le nom de l'auteur et l'horodatage (Défaut : désactivé)" #: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" -msgstr "Afficher l'e-mail de l'auteur au lieu du nom (défaut : désactivé)" +msgstr "Afficher l'e-mail de l'auteur au lieu du nom (Défaut : désactivé)" #: builtin/blame.c:2369 msgid "Ignore whitespace differences" @@ -2387,7 +2442,7 @@ msgstr "Trouver les copies de ligne dans et entre les fichiers" #: builtin/blame.c:2374 msgid "Find line movements within and across files" -msgstr "Trouver les mouvements dans et entre les fichiers" +msgstr "Trouver les mouvements de ligne dans et entre les fichiers" #: builtin/blame.c:2375 msgid "n,m" @@ -2411,23 +2466,25 @@ msgstr "git branch [options] [-r] (-d | -D) <nomdebranche>..." #: builtin/branch.c:27 msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" -msgstr "git branch [options] (-m | -M) [<anciennebranch>] <nouvellebranch>" +msgstr "git branch [options] (-m | -M) [<anciennebranche>] <nouvellebranche>" #: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD." -msgstr "suppression de la branche '%s' qui a été fusionnée dans\n" -" '%s', mais pas dans HEAD." +msgstr "" +"suppression de la branche '%s' qui a été fusionnée dans\n" +" '%s', mais pas dans HEAD." #: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" " '%s', even though it is merged to HEAD." -msgstr "branche '%s' non supprimée car elle n'a pas été fusionnée dans\n" -" '%s', mais dans HEAD." +msgstr "" +"branche '%s' non supprimée car elle n'a pas été fusionnée dans\n" +" '%s', même si elle est fusionnée dans HEAD." #: builtin/branch.c:168 #, c-format @@ -2439,12 +2496,13 @@ msgstr "Impossible de rechercher l'objet commit pour '%s'" msgid "" "The branch '%s' is not fully merged.\n" "If you are sure you want to delete it, run 'git branch -D %s'." -msgstr "La branche '%s' n'est pas totalement fusionnée.\n" -"Si vous êtes sur que vous voulez la supprimer, lancez 'git branch -D %s'" +msgstr "" +"La branche '%s' n'est pas totalement fusionnée.\n" +"Si vous êtes sur que vous voulez la supprimer, lancez 'git branch -D %s'." #: builtin/branch.c:185 msgid "Update of config-file failed" -msgstr "Echec de la mise à jour du fichier config" +msgstr "Échec de la mise à jour du fichier de config" #: builtin/branch.c:213 msgid "cannot use -a with -d" @@ -2457,7 +2515,7 @@ msgstr "Impossible de rechercher l'objet commit pour HEAD" #: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." -msgstr "Impossible d'effacer la branche '%s' qui est actuellement extraite" +msgstr "Impossible de supprimer la branche '%s' sur laquelle vous êtes." #: builtin/branch.c:240 #, c-format @@ -2482,12 +2540,12 @@ msgstr "Erreur lors de la suppression de la branche '%s'" #: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" -msgstr "Branche distante %s supprimée (précédemment %s)\n" +msgstr "Branche distante %s supprimée (précédemment %s).\n" #: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" -msgstr "Branche %s supprimée (précédemment %s)\n" +msgstr "Branche %s supprimée (précédemment %s).\n" #: builtin/branch.c:366 #, c-format @@ -2577,11 +2635,11 @@ msgstr "Renommage d'un branche mal nommée '%s'" #: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" -msgstr "La branche a été renommée '%s', mais HEAD n'est pas mis à jour !" +msgstr "La branche a été renommée en %s, mais HEAD n'est pas mise à jour !" #: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" -msgstr "La branche est renommée, mais echec de la mise à jour du fichier de config" +msgstr "La branche est renommée, mais la mise à jour du fichier de config a échoué" #: builtin/branch.c:737 #, c-format @@ -2599,7 +2657,7 @@ msgstr "Options génériques" #: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" -msgstr "afficher le condensé et le sujet, doublé pour la branche amont" +msgstr "afficher le hachage et le sujet, doublé pour la branche amont" #: builtin/branch.c:794 msgid "suppress informational messages" @@ -2619,7 +2677,7 @@ msgstr "utiliser la coloration dans la sortie" #: builtin/branch.c:802 msgid "act on remote-tracking branches" -msgstr "agir sur les branches de suivi distant" +msgstr "agir sur les branches de suivi distantes" #: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 #: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 @@ -2685,11 +2743,11 @@ msgstr "afficher les branches en colonnes" #: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." -msgstr "Echec de résolution de HEAD comme référence valide." +msgstr "Échec de résolution de HEAD comme référence valide." #: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" -msgstr "HEAD non trouvé sous refs/heads !" +msgstr "HEAD non trouvée sous refs/heads !" #: builtin/branch.c:883 msgid "--column and --verbose are incompatible" @@ -2697,11 +2755,11 @@ msgstr "--column et --verbose sont incompatibles" #: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" -msgstr "nom de branche exigé" +msgstr "le nom de branche est requis" #: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" -msgstr "Impossible de décrire HEAD détaché" +msgstr "Impossible de décrire une HEAD détachée" #: builtin/branch.c:909 msgid "cannot edit description of more than one branch" @@ -2710,7 +2768,7 @@ msgstr "impossible d'éditer la description de plus d'une branche" #: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." -msgstr "Aucun commit sur la branche '%s'" +msgstr "Aucun commit sur la branche '%s'." #: builtin/branch.c:919 #, c-format @@ -2734,12 +2792,12 @@ msgstr "impossible de spécifier une branche amont de HEAD par %s qui ne pointe #: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" -msgstr "branche inexistante '%s'" +msgstr "pas de branche '%s'" #: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" -msgstr "branche inexistante '%s'" +msgstr "la branche '%s' n'existe pas" #: builtin/branch.c:962 msgid "too many branches to unset upstream" @@ -2747,7 +2805,7 @@ msgstr "trop de branches pour désactiver un amont" #: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." -msgstr "impossible de désactiver une branche amont de HEAD qu'elle ne pointe sur aucune branche." +msgstr "impossible de désactiver une branche amont de HEAD quand elle ne pointe sur aucune branche." #: builtin/branch.c:972 #, c-format @@ -2792,15 +2850,15 @@ msgstr " git branch -set-upstream-to %s\n" #: builtin/bundle.c:47 #, c-format msgid "%s is okay\n" -msgstr "%s convient\n" +msgstr "%s est correct\n" #: builtin/bundle.c:56 msgid "Need a repository to create a bundle." -msgstr "La création d'un bundle requiert un dépôt." +msgstr "La création d'un colis requiert un dépôt." #: builtin/bundle.c:60 msgid "Need a repository to unbundle." -msgstr "Le dépaquetage d'un bundle requiert un dépôt." +msgstr "Le dépaquetage d'un colis requiert un dépôt." #: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" @@ -2820,7 +2878,7 @@ msgstr "afficher le type de l'objet" #: builtin/cat-file.c:197 msgid "show object size" -msgstr "affichier la taille de l'objet" +msgstr "afficher la taille de l'objet" #: builtin/cat-file.c:199 msgid "exit with zero when there's no error" @@ -2836,7 +2894,7 @@ msgstr "pour les objets blob, lancer textconv sur le contenu de l'objet" #: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" -msgstr "afficher l'information et le contenu des objets passé en entrée standard" +msgstr "afficher l'information et le contenu des objets passés en entrée standard" #: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" @@ -2868,11 +2926,11 @@ msgstr "les chemins en entrée sont terminés par le caractère nul" #: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" -msgstr "supprimer le rapport de progrès" +msgstr "supprimer l'état d'avancement" #: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" -msgstr "l'option --stdin et la spécification de chemin sont incompatibles" +msgstr "impossible de spécifier les chemins avec --stdin" #: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" @@ -2888,7 +2946,7 @@ msgstr "--quiet n'est valide qu'avec un seul chemin" #: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" -msgstr "les options --quiet et --verbose sont incompatibles" +msgstr "impossible d'avoir --quiet et --verbose" #: builtin/checkout-index.c:126 msgid "git checkout-index [options] [--] [<file>...]" @@ -2900,11 +2958,11 @@ msgstr "extraire tous les fichiers présents dans l'index" #: builtin/checkout-index.c:188 msgid "force overwrite of existing files" -msgstr "forcer l'écrasement des fichiers existant" +msgstr "forcer l'écrasement des fichiers existants" #: builtin/checkout-index.c:190 msgid "no warning for existing files and files not in index" -msgstr "éliminer les alertes pour les fichiers existant et les fichiers absents de l'index" +msgstr "pas d'avertissement pour les fichiers existants et les fichiers absents de l'index" #: builtin/checkout-index.c:192 msgid "don't checkout new files" @@ -2928,7 +2986,7 @@ msgstr "chaîne" #: builtin/checkout-index.c:204 msgid "when creating files, prepend <string>" -msgstr "lors de la création de fichiers, préfixer <chaîne>" +msgstr "lors de la création de fichiers, préfixer par <chaîne>" #: builtin/checkout-index.c:207 msgid "copy out the files from named stage" @@ -2965,7 +3023,7 @@ msgstr "le chemin '%s' n'a pas les versions nécessaires" #: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" -msgstr "impossible de fusionner le chemin '%s'" +msgstr "chemin '%s' : impossible de fusionner" #: builtin/checkout.c:213 #, c-format @@ -3008,7 +3066,7 @@ msgstr "Impossible de faire un reflog pour '%s'\n" #: builtin/checkout.c:634 msgid "HEAD is now at" -msgstr "HEAD est maintenant sur " +msgstr "HEAD est maintenant sur" #: builtin/checkout.c:641 #, c-format @@ -3053,12 +3111,14 @@ msgid_plural "" "any of your branches:\n" "\n" "%s\n" -msgstr[0] "Attention : vous laissez %d commit en retard, connectés à aucune de vos\n" -"branches :\n" +msgstr[0] "" +"Attention : vous laissez %d commit en retard, non connectés à\n" +"une branche :\n" "\n" "%s\n" -msgstr[1] "Attention : vous laissez %d commits en retard, connectés à aucune de vos\n" -"branches :\n" +msgstr[1] "" +"Attention : vous laissez %d commits en retard, non connectés à\n" +"une branche :\n" "\n" "%s\n" @@ -3070,7 +3130,9 @@ msgid "" "\n" " git branch new_branch_name %s\n" "\n" -msgstr "Si vous souhaitez les garder en créant une nouvelle branches, c'est le bon moment avec :\n" +msgstr "" +"Si vous souhaitez les garder en créant une nouvelle branche, c'est le bon moment\n" +"de le faire avec :\n" "\n" "git branche nouvelle_branche %s\n" "\n" @@ -3081,7 +3143,7 @@ msgstr "erreur interne lors du parcours des révisions" #: builtin/checkout.c:766 msgid "Previous HEAD position was" -msgstr "Lo position précédente de HEAD était " +msgstr "La position précédente de HEAD était" #: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" @@ -3106,13 +3168,13 @@ msgstr "impossible d'utiliser des chemins avec un basculement de branches" #: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" -msgstr "impossible d'utiliser '%s' avec un basculement de branches " +msgstr "'%s' ne peut pas être utilisé avec un basculement de branches" #: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 #: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" -msgstr "impossible d'utiliser '%s' avec '%s'" +msgstr "'%s' ne peut pas être utilisé avec '%s'" #: builtin/checkout.c:1023 #, c-format @@ -3126,11 +3188,11 @@ msgstr "branche" #: builtin/checkout.c:1046 msgid "create and checkout a new branch" -msgstr "créer et extrait une nouvelle branche" +msgstr "créer et extraire une nouvelle branche" #: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" -msgstr "créer/reinitialise et extrait une branche" +msgstr "créer/réinitialiser et extraire une branche" #: builtin/checkout.c:1049 msgid "create reflog for new branch" @@ -3138,11 +3200,11 @@ msgstr "créer un refog pour une nouvelle branche" #: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" -msgstr "détacher le HEAD au commit nommé" +msgstr "détacher la HEAD à la validation nommée" #: builtin/checkout.c:1051 msgid "set upstream info for new branch" -msgstr "paramètrer l'information de branche amont pour une nouvelle branche" +msgstr "paramétrer l'information de branche amont pour une nouvelle branche" #: builtin/checkout.c:1053 msgid "new branch" @@ -3162,7 +3224,7 @@ msgstr "extraire leur version pour les fichiers non fusionnés" #: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" -msgstr "forcer l'extraction (écraser les modifications locales)" +msgstr "forcer l'extraction (laisser tomber les modifications locales)" #: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" @@ -3194,11 +3256,11 @@ msgstr "-b, -B et --orphan sont mutuellement exclusifs" #: builtin/checkout.c:1108 msgid "--track needs a branch name" -msgstr "un nom de branche est nécessaire pour --track" +msgstr "--track requiert un nom de branche" #: builtin/checkout.c:1115 msgid "Missing branch name; try -b" -msgstr "Nom de branche manquant ; essayez avec -b" +msgstr "Nom de branche manquant ; essayez -b" #: builtin/checkout.c:1150 msgid "invalid path specification" @@ -3209,24 +3271,26 @@ msgstr "spécification de chemin invalide" msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" "Did you intend to checkout '%s' which can not be resolved as commit?" -msgstr "Impossible e mettre à jour les chemins et de basculer sur la branche '%s' en même temps.\n" +msgstr "" +"Impossible de mettre à jour les chemins et de basculer sur la branche '%s' en même temps.\n" "Souhaitiez-vous extraire '%s' qui ne peut être résolu comme commit ?" #: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" -msgstr "git checkout: --detach d'accepte pas un argument de chemin '%s'" +msgstr "git checkout: --detach n'accepte pas un argument de chemin '%s'" #: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." -msgstr "git checkout: --ours/--theirs, --force et --merge sont incompatible lors\n" +msgstr "" +"git checkout: --ours/--theirs, --force et --merge sont incompatibles lors\n" "de l'extraction de l'index." #: builtin/clean.c:20 msgid "git clean [-d] [-f] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..." -msgstr "git clean [-d] [-f] [-n] [-q] [-e <expression>] [-x | -X] [--] <chemins>..." +msgstr "git clean [-d] [-f] [-n] [-q] [-e <motif>] [-x | -X] [--] <chemins>..." #: builtin/clean.c:24 #, c-format @@ -3241,7 +3305,7 @@ msgstr "Supprimerait %s\n" #: builtin/clean.c:26 #, c-format msgid "Skipping repository %s\n" -msgstr "Dépôt %s ignoré\n" +msgstr "Ignore le dépôt %s\n" #: builtin/clean.c:27 #, c-format @@ -3251,7 +3315,7 @@ msgstr "Ignorerait le dépôt %s\n" #: builtin/clean.c:28 #, c-format msgid "failed to remove %s" -msgstr "echec de la suppression de %s" +msgstr "échec de la suppression de %s" #: builtin/clean.c:160 msgid "do not print names of files removed" @@ -3263,16 +3327,16 @@ msgstr "forcer" #: builtin/clean.c:164 msgid "remove whole directories" -msgstr "supprimer des répertoires entiers" +msgstr "supprimer les répertoires entiers" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 #: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" -msgstr "expression" +msgstr "motif" #: builtin/clean.c:166 msgid "add <pattern> to ignore rules" -msgstr "ajouter <expression> aux règles ignore" +msgstr "ajouter <motif> aux règles ignore" #: builtin/clean.c:167 msgid "remove ignored files, too" @@ -3284,7 +3348,7 @@ msgstr "supprimer seulement les fichiers ignorés" #: builtin/clean.c:187 msgid "-x and -X cannot be used together" -msgstr "-x et -X sont mutuellement exclusifs" +msgstr "-x et -X ne peuvent pas être utilisés ensemble" #: builtin/clean.c:191 msgid "" @@ -3304,7 +3368,7 @@ msgstr "git clone [options] [--] <dépôt> [<répertoire>]" #: builtin/clone.c:65 builtin/fetch.c:82 builtin/merge.c:214 #: builtin/push.c:436 msgid "force progress reporting" -msgstr "forcer l'affichage du progrès" +msgstr "forcer l'état d'avancement" #: builtin/clone.c:67 msgid "don't create a checkout" @@ -3324,11 +3388,11 @@ msgstr "pour cloner depuis un dépôt local" #: builtin/clone.c:77 msgid "don't use local hardlinks, always copy" -msgstr "ne pas utiliser de liens durs locaux, mais toujours copier" +msgstr "ne pas utiliser de liens durs locaux, toujours copier" #: builtin/clone.c:79 msgid "setup as shared repository" -msgstr "régler comme dépôt partager" +msgstr "régler comme dépôt partagé" #: builtin/clone.c:81 builtin/clone.c:83 msgid "initialize submodules in the clone" @@ -3352,11 +3416,11 @@ msgstr "nom" #: builtin/clone.c:89 msgid "use <name> instead of 'origin' to track upstream" -msgstr "utiliser <nom> au lieu de 'origin' pour traquer la branche amont" +msgstr "utiliser <nom> au lieu de 'origin' pour suivre la branche amont" #: builtin/clone.c:91 msgid "checkout <branch> instead of the remote's HEAD" -msgstr "extraire <branche> au lieu du HEAD du répertoire distant" +msgstr "extraire <branche> au lieu de la HEAD du répertoire distant" #: builtin/clone.c:93 msgid "path to git-upload-pack on the remote" @@ -3372,7 +3436,7 @@ msgstr "créer un clone superficiel de cette profondeur" #: builtin/clone.c:97 msgid "clone only one branch, HEAD or --branch" -msgstr "clonez seulement une branche, HEAD ou --branch" +msgstr "cloner seulement une branche, HEAD ou --branch" #: builtin/clone.c:98 builtin/init-db.c:494 msgid "gitdir" @@ -3393,37 +3457,37 @@ msgstr "régler la configuration dans le nouveau dépôt" #: builtin/clone.c:254 #, c-format msgid "reference repository '%s' is not a local repository." -msgstr "le dépôt de référence '%s' n'est pas un dépôt local" +msgstr "le dépôt de référence '%s' n'est pas un dépôt local." #: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" -msgstr "echec de la création du répertoire '%s'" +msgstr "échec de la création du répertoire '%s'" #: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" -msgstr "echec du stat de '%s'" +msgstr "échec du stat de '%s'" #: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" -msgstr "%s existe et n'est pas un répertoire" +msgstr "%s existe et n'est pas un répertoire" #: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" -msgstr "echec du stat de %s\n" +msgstr "échec du stat de %s\n" #: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" -msgstr "echec de la création du lien '%s'" +msgstr "échec de la création du lien '%s'" #: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" -msgstr "echec de la copie vers '%s'" +msgstr "échec de la copie vers '%s'" #: builtin/clone.c:384 #, c-format @@ -3450,15 +3514,15 @@ msgstr "le serveur distant n'a pas envoyé tous les objets nécessaires" #: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" -msgstr "le HEAD distant réfère à une référence non existante, impossible de l'extraire.\n" +msgstr "la HEAD distante réfère à une référence non existante, impossible de l'extraire.\n" #: builtin/clone.c:641 msgid "unable to checkout working tree" -msgstr "incapable d'extraire la copie de travail" +msgstr "inpossible d'extraire la copie de travail" #: builtin/clone.c:749 msgid "Too many arguments." -msgstr "Trop d'arguments" +msgstr "Trop d'arguments." #: builtin/clone.c:753 msgid "You must specify a repository to clone." @@ -3467,11 +3531,11 @@ msgstr "Vous devez spécifier un dépôt à cloner." #: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." -msgstr "les options --bare et --origin %s sont incompatibles" +msgstr "les options --bare et --origin %s sont incompatibles." #: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." -msgstr "les option --bare --separate-git-dir sont incompatibles." +msgstr "--bare et --separate-git-dir sont incompatibles." #: builtin/clone.c:780 #, c-format @@ -3480,12 +3544,12 @@ msgstr "le dépôt '%s' n'existe pas" #: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." -msgstr "--depth est ignoré dans les clones locaux : utilisez plutôt file://" +msgstr "--depth est ignoré dans les clones locaux : utilisez plutôt \"file://\"." #: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." -msgstr "le chemin de destination '%s' existe déjà et n'est pas un répertoire vide." +msgstr "le chemin de destination '%s' existe déjà et n'est pas un répertoire vide." #: builtin/clone.c:805 #, c-format @@ -3500,7 +3564,7 @@ msgstr "impossible de créer les répertoires de premier niveau dans '%s'" #: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." -msgstr "impossible de créer le répertoire de la copie de travail '%s'" +msgstr "impossible de créer le répertoire de la copie de travail '%s'." #: builtin/clone.c:840 #, c-format @@ -3510,12 +3574,12 @@ msgstr "Clonage dans le dépôt nu '%s'\n" #: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" -msgstr "Clonage dans '%s'\n" +msgstr "Clonage dans '%s'...\n" #: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" -msgstr "Je ne sais pas cloner '%s'" +msgstr "Je ne sais pas cloner %s" #: builtin/clone.c:926 #, c-format @@ -3544,15 +3608,15 @@ msgstr "Largeur maximale" #: builtin/column.c:30 msgid "Padding space on left border" -msgstr "Tabulation sur le côté gauche" +msgstr "Remplissage d'espace sur la bordure gauche" #: builtin/column.c:31 msgid "Padding space on right border" -msgstr "Tabulation sur le côté droit" +msgstr "Remplissage d'espace sur le côté droit" #: builtin/column.c:32 msgid "Padding space between columns" -msgstr "Tabulation entre colonnes" +msgstr "Remplissage d'espace entre les colonnes" #: builtin/column.c:51 msgid "--command must be the first argument" @@ -3560,11 +3624,11 @@ msgstr "--command doit être le premier argument" #: builtin/commit.c:34 msgid "git commit [options] [--] <pathspec>..." -msgstr "git commit [options] [--] <spécification de chemin>..." +msgstr "git commit [options] [--] <spécification-de-chemin>..." #: builtin/commit.c:39 msgid "git status [options] [--] <pathspec>..." -msgstr "git status [options] [--] <spécification de chemin>..." +msgstr "git status [options] [--] <spécification-de-chemin>..." #: builtin/commit.c:44 msgid "" @@ -3578,12 +3642,13 @@ msgid "" "After doing this, you may fix the identity used for this commit with:\n" "\n" " git commit --amend --reset-author\n" -msgstr "Votre nom et votre adresse e-mail ont été configurés automatiquement en se fondant\n" +msgstr "" +"Votre nom et votre adresse e-mail ont été configurés automatiquement en se fondant\n" "sur votre nom d'utilisateur et votre nom d'ordinateur. Veuillez vérifier qu'ils sont corrects.\n" "Vous pouvez supprimer ce message en les paramétrant explicitement :\n" "\n" " git config --global user.name \"Votre Nom\"\n" -" git config --global user.email \"vous@exemple.com\n" +" git config --global user.email vous@exemple.com\n" "\n" "Après ceci, vous pouvez corriger l'identité utilisée pour ce commit avec :\n" "\n" @@ -3606,7 +3671,8 @@ msgid "" " git commit --allow-empty\n" "\n" "Otherwise, please use 'git reset'\n" -msgstr "Le picorage précédent est à présent vide, vraisemblablement du à une résolution de conflit.\n" +msgstr "" +"Le picorage précédent est à présent vide, vraisemblablement dû à une résolution de conflit.\n" "Si vous souhaitez tout de même le valider, utilisez :\n" "\n" " git commit --allow-empty\n" @@ -3615,7 +3681,7 @@ msgstr "Le picorage précédent est à présent vide, vraisemblablement du à un #: builtin/commit.c:260 msgid "failed to unpack HEAD tree object" -msgstr "echec du dépaquetage de l'objet arbre HEAD" +msgstr "échec du dépaquetage de l'objet arbre HEAD" #: builtin/commit.c:302 msgid "unable to create temporary index" @@ -3623,7 +3689,7 @@ msgstr "impossible de créer l'index temporaire" #: builtin/commit.c:308 msgid "interactive add failed" -msgstr "echec de l'ajout interactif" +msgstr "échec de l'ajout interactif" #: builtin/commit.c:341 builtin/commit.c:362 builtin/commit.c:412 msgid "unable to write new_index file" @@ -3657,7 +3723,7 @@ msgstr "paramètre --author mal formé" #: builtin/commit.c:562 #, c-format msgid "Malformed ident string: '%s'" -msgstr "chaîne ident mal formée : '%s'" +msgstr "Chaîne ident mal formée : '%s'" #: builtin/commit.c:600 builtin/commit.c:633 builtin/commit.c:956 #, c-format @@ -3707,7 +3773,8 @@ msgid "" "If this is not correct, please remove the file\n" "\t%s\n" "and try again.\n" -msgstr "\n" +msgstr "" +"\n" "Il semble que vous validiez une fusion.\n" "Si ce n'est pas le cas, veuillez supprimer le fichier\n" "\t%s\n" @@ -3721,7 +3788,8 @@ msgid "" "If this is not correct, please remove the file\n" "\t%s\n" "and try again.\n" -msgstr "\n" +msgstr "" +"\n" "Il semble que vous validiez un picorage.\n" "Si ce n'est pas le cas, veuillez supprimer le fichier\n" "\t%s\n" @@ -3732,9 +3800,9 @@ msgstr "\n" msgid "" "Please enter the commit message for your changes. Lines starting\n" "with '%c' will be ignored, and an empty message aborts the commit.\n" -msgstr "Veuillez saisir le message de validation pour vos modifications. Les lignes\n" -"commençant par '%c' seront ignorées, et un message vide abandonne la\n" -"validation.\n" +msgstr "" +"Veuillez saisir le message de validation pour vos modifications. Les lignes\n" +"commençant par '%c' seront ignorées, et un message vide abandonne la validation.\n" #: builtin/commit.c:742 #, c-format @@ -3742,19 +3810,20 @@ msgid "" "Please enter the commit message for your changes. Lines starting\n" "with '%c' will be kept; you may remove them yourself if you want to.\n" "An empty message aborts the commit.\n" -msgstr "Veuillez saisir le message de validation pour vos modifications. Les lignes\n" -"commençant par '%c' seront conservées ; vous pouvez les supprimer vous-\n" -"même si vous le souhaitez. Un message vide abandonne la validation.\n" +msgstr "" +"Veuillez saisir le message de validation pour vos modifications. Les lignes\n" +"commençant par '%c' seront conservées ; vous pouvez les supprimer vous-même\n" +"si vous le souhaitez. Un message vide abandonne la validation.\n" #: builtin/commit.c:755 #, c-format msgid "%sAuthor: %s" -msgstr "%sAuteur : %s" +msgstr "%sAuteur : %s" #: builtin/commit.c:762 #, c-format msgid "%sCommitter: %s" -msgstr "%s Validateur: %s" +msgstr "%sValidateur : %s" #: builtin/commit.c:782 msgid "Cannot read index" @@ -3781,7 +3850,7 @@ msgstr "Mode de fichier non suivi invalide '%s'" #: builtin/commit.c:976 msgid "Using both --reset-author and --author does not make sense" -msgstr "L'utilisation concurrente de --reset-author et --author n'a pas de sens" +msgstr "L'utilisation simultanée de --reset-author et --author n'a pas de sens" #: builtin/commit.c:987 msgid "You have nothing to amend." @@ -3797,7 +3866,7 @@ msgstr "Vous êtes en plein picorage -- impossible de corriger (amend)." #: builtin/commit.c:995 msgid "Options --squash and --fixup cannot be used together" -msgstr "Les options --squash et --fixup sont incompatibles" +msgstr "Les options --squash et --fixup ne peuvent pas être utilisées ensemble" #: builtin/commit.c:1005 msgid "Only one of -c/-C/-F/--fixup can be used." @@ -3821,7 +3890,7 @@ msgstr "Aucun chemin avec les options --include/--only n'a pas de sens." #: builtin/commit.c:1036 msgid "Clever... amending the last one with dirty index." -msgstr "Malin... correction du dernier commit avec un index sale." +msgstr "Malin... correction du dernier avec un index sale." #: builtin/commit.c:1038 msgid "Explicit paths specified without -i nor -o; assuming --only paths..." @@ -7376,150 +7445,152 @@ msgstr "" #: builtin/remote.c:11 msgid "git remote [-v | --verbose]" -msgstr "" +msgstr "git remote [-v | --verbose]" #: builtin/remote.c:12 msgid "" "git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--" "mirror=<fetch|push>] <name> <url>" -msgstr "" +msgstr "git remote add [-t <branche>] [-m <maîtresse>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <nom> <URL>" #: builtin/remote.c:13 builtin/remote.c:32 msgid "git remote rename <old> <new>" -msgstr "" +msgstr "git remote rename <ancienne> <nouvelle>" #: builtin/remote.c:14 builtin/remote.c:37 msgid "git remote remove <name>" -msgstr "" +msgstr "git remote remove <nom>" #: builtin/remote.c:15 builtin/remote.c:42 msgid "git remote set-head <name> (-a | -d | <branch>)" -msgstr "" +msgstr "git remote set-head <nom> (-a | -d | <branche>)" #: builtin/remote.c:16 msgid "git remote [-v | --verbose] show [-n] <name>" -msgstr "" +msgstr "git remote [-v | --verbose] show [-n] <nom>" #: builtin/remote.c:17 msgid "git remote prune [-n | --dry-run] <name>" -msgstr "" +msgstr "git remote prune [-n | --dry-run] <nom>" #: builtin/remote.c:18 msgid "" "git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]" -msgstr "" +msgstr "git remote [-v | --verbose] update [-p | --prune] [(<groupe> | <distante>)...]" #: builtin/remote.c:19 msgid "git remote set-branches [--add] <name> <branch>..." -msgstr "" +msgstr "git remote set-branches [--add] <nom> <branche>..." #: builtin/remote.c:20 builtin/remote.c:68 msgid "git remote set-url [--push] <name> <newurl> [<oldurl>]" -msgstr "" +msgstr "git remote set-url [--push] <nom> <nouvelle-URL> [<ancienne-URL>]" #: builtin/remote.c:21 builtin/remote.c:69 msgid "git remote set-url --add <name> <newurl>" -msgstr "" +msgstr "git remote set-url --add <nom> <nouvelle-URL>" #: builtin/remote.c:22 builtin/remote.c:70 msgid "git remote set-url --delete <name> <url>" -msgstr "" +msgstr "git remote set-url --delete <nom> <URL>" #: builtin/remote.c:27 msgid "git remote add [<options>] <name> <url>" -msgstr "" +msgstr "git remote add [<options>] <nom> <URL>" #: builtin/remote.c:47 msgid "git remote set-branches <name> <branch>..." -msgstr "" +msgstr "git remote set-branches <nom> <branche>..." #: builtin/remote.c:48 msgid "git remote set-branches --add <name> <branch>..." -msgstr "" +msgstr "git remote set-branches --add <nom> <branche>..." #: builtin/remote.c:53 msgid "git remote show [<options>] <name>" -msgstr "" +msgstr "git remote show [<options>] <nom>" #: builtin/remote.c:58 msgid "git remote prune [<options>] <name>" -msgstr "" +msgstr "git remote prune [<options>] <nom>" #: builtin/remote.c:63 msgid "git remote update [<options>] [<group> | <remote>]..." -msgstr "" +msgstr "git remote update [<options>] [<groupe> | <distante>]..." #: builtin/remote.c:98 #, c-format msgid "Updating %s" -msgstr "" +msgstr "Mise à jour de %s" #: builtin/remote.c:130 msgid "" "--mirror is dangerous and deprecated; please\n" "\t use --mirror=fetch or --mirror=push instead" msgstr "" +"--mirror est dangereux et obsolète ; merci\n" +"\t d'utiliser --mirror=fetch ou --mirror=push à la place" #: builtin/remote.c:147 #, c-format msgid "unknown mirror argument: %s" -msgstr "" +msgstr "argument miroir inconnu : %s" #: builtin/remote.c:163 msgid "fetch the remote branches" -msgstr "" +msgstr "rapatrier les branches distantes" #: builtin/remote.c:165 msgid "import all tags and associated objects when fetching" -msgstr "" +msgstr "importer toutes les étiquettes et les objets associés lors du rapatriement" #: builtin/remote.c:168 msgid "or do not fetch any tag at all (--no-tags)" -msgstr "" +msgstr "ou ne rapatrier aucune étiquette (--no-tags)" #: builtin/remote.c:170 msgid "branch(es) to track" -msgstr "" +msgstr "branche(s) à suivre" #: builtin/remote.c:171 msgid "master branch" -msgstr "" +msgstr "branche maîtresse" #: builtin/remote.c:172 msgid "push|fetch" -msgstr "" +msgstr "push|fetch" #: builtin/remote.c:173 msgid "set up remote as a mirror to push to or fetch from" -msgstr "" +msgstr "paramétrer la distante comme miroir pour pousser ou pour rapatrier depuis" #: builtin/remote.c:185 msgid "specifying a master branch makes no sense with --mirror" -msgstr "" +msgstr "spécifier une branche maîtresse n'a pas de sens avec --mirror" #: builtin/remote.c:187 msgid "specifying branches to track makes sense only with fetch mirrors" -msgstr "" +msgstr "spécifier les branches à suivre n'a de sens qu'avec des miroirs de rapatriement" #: builtin/remote.c:195 builtin/remote.c:646 #, c-format msgid "remote %s already exists." -msgstr "" +msgstr "la distante %s existe déjà." #: builtin/remote.c:199 builtin/remote.c:650 #, c-format msgid "'%s' is not a valid remote name" -msgstr "" +msgstr "'%s' n'est pas un nom valide de distante" #: builtin/remote.c:243 #, c-format msgid "Could not setup master '%s'" -msgstr "" +msgstr "Impossible de paramétrer la maîtresse '%s'" #: builtin/remote.c:299 #, c-format msgid "more than one %s" -msgstr "" +msgstr "plus d'un %s" #: builtin/remote.c:339 #, c-format @@ -7528,31 +7599,31 @@ msgstr "" #: builtin/remote.c:440 builtin/remote.c:448 msgid "(matching)" -msgstr "" +msgstr "(correspond)" #: builtin/remote.c:452 msgid "(delete)" -msgstr "" +msgstr "(supprimer)" #: builtin/remote.c:595 builtin/remote.c:601 builtin/remote.c:607 #, c-format msgid "Could not append '%s' to '%s'" -msgstr "" +msgstr "Impossible d'ajouter '%s' à '%s'" #: builtin/remote.c:639 builtin/remote.c:792 builtin/remote.c:890 #, c-format msgid "No such remote: %s" -msgstr "" +msgstr "Distante inconnue : %s" #: builtin/remote.c:656 #, c-format msgid "Could not rename config section '%s' to '%s'" -msgstr "" +msgstr "Impossible de renommer la section de configuration '%s' en '%s'" #: builtin/remote.c:662 builtin/remote.c:799 #, c-format msgid "Could not remove config section '%s'" -msgstr "" +msgstr "Impossible de supprimer la section de configuration '%s'" #: builtin/remote.c:677 #, c-format @@ -7561,31 +7632,34 @@ msgid "" "\t%s\n" "\tPlease update the configuration manually if necessary." msgstr "" +"Pas de mise à jour du refspec de rapatriement qui n'est pas par défaut\n" +"\t%s\n" +"\tMerci de mettre à jour la configuration si nécessaire." #: builtin/remote.c:683 #, c-format msgid "Could not append '%s'" -msgstr "" +msgstr "Impossible d'ajouter '%s'" #: builtin/remote.c:694 #, c-format msgid "Could not set '%s'" -msgstr "" +msgstr "Impossible de définir '%s'" #: builtin/remote.c:716 #, c-format msgid "deleting '%s' failed" -msgstr "" +msgstr "échec de suppression de '%s'" #: builtin/remote.c:750 #, c-format msgid "creating '%s' failed" -msgstr "" +msgstr "échec de création de '%s'" #: builtin/remote.c:764 #, c-format msgid "Could not remove branch %s" -msgstr "" +msgstr "Impossible de supprimer la branche %s" #: builtin/remote.c:834 msgid "" @@ -7595,258 +7669,262 @@ msgid_plural "" "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" "to delete them, use:" msgstr[0] "" +"Note : Une branche en dehors de refs/remotes/ n'a pas été supprimée ;\n" +"pour la supprimer, utilisez :" msgstr[1] "" +"Note : Plusieurs branches en dehors de refs/remotes/ n'ont pas été supprimées ;\n" +"pour les supprimer, utilisez :" #: builtin/remote.c:943 #, c-format msgid " new (next fetch will store in remotes/%s)" -msgstr "" +msgstr " nouveau (le prochain rapatriement (fetch) stockera dans remotes/%s)" #: builtin/remote.c:946 msgid " tracked" -msgstr "" +msgstr " suivi" #: builtin/remote.c:948 msgid " stale (use 'git remote prune' to remove)" -msgstr "" +msgstr " dépassé (utilisez 'git remote prune' pour supprimer)" #: builtin/remote.c:950 msgid " ???" -msgstr "" +msgstr " ???" #: builtin/remote.c:991 #, c-format msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch" -msgstr "" +msgstr "branch.%s.merge invalide ; ne peut pas rebaser sur plus d'une branche" #: builtin/remote.c:998 #, c-format msgid "rebases onto remote %s" -msgstr "" +msgstr "rebase sur la distante %s" #: builtin/remote.c:1001 #, c-format msgid " merges with remote %s" -msgstr "" +msgstr " fusionne avec la distante %s" #: builtin/remote.c:1002 msgid " and with remote" -msgstr "" +msgstr " et avec la distante" #: builtin/remote.c:1004 #, c-format msgid "merges with remote %s" -msgstr "" +msgstr "fusionne avec la distante %s" #: builtin/remote.c:1005 msgid " and with remote" -msgstr "" +msgstr " et avec la distante" #: builtin/remote.c:1051 msgid "create" -msgstr "" +msgstr "créer" #: builtin/remote.c:1054 msgid "delete" -msgstr "" +msgstr "supprimer" #: builtin/remote.c:1058 msgid "up to date" -msgstr "" +msgstr "à jour" #: builtin/remote.c:1061 msgid "fast-forwardable" -msgstr "" +msgstr "peut être mis à jour en avance rapide" #: builtin/remote.c:1064 msgid "local out of date" -msgstr "" +msgstr "le local n'est pas à jour" #: builtin/remote.c:1071 #, c-format msgid " %-*s forces to %-*s (%s)" -msgstr "" +msgstr " %-*s force vers %-*s (%s)" #: builtin/remote.c:1074 #, c-format msgid " %-*s pushes to %-*s (%s)" -msgstr "" +msgstr " %-*s pousse vers %-*s (%s)" #: builtin/remote.c:1078 #, c-format msgid " %-*s forces to %s" -msgstr "" +msgstr " %-*s force vers %s" #: builtin/remote.c:1081 #, c-format msgid " %-*s pushes to %s" -msgstr "" +msgstr " %-*s pousse vers %s" #: builtin/remote.c:1091 msgid "do not query remotes" -msgstr "" +msgstr "ne pas interroger les distantes" #: builtin/remote.c:1118 #, c-format msgid "* remote %s" -msgstr "" +msgstr "* distante %s" #: builtin/remote.c:1119 #, c-format msgid " Fetch URL: %s" -msgstr "" +msgstr " URL de rapatriement : %s" #: builtin/remote.c:1120 builtin/remote.c:1285 msgid "(no URL)" -msgstr "" +msgstr "(pas d'URL)" #: builtin/remote.c:1129 builtin/remote.c:1131 #, c-format msgid " Push URL: %s" -msgstr "" +msgstr " URL push : %s" #: builtin/remote.c:1133 builtin/remote.c:1135 builtin/remote.c:1137 #, c-format msgid " HEAD branch: %s" -msgstr "" +msgstr " Branche HEAD : %s" #: builtin/remote.c:1139 #, c-format msgid "" " HEAD branch (remote HEAD is ambiguous, may be one of the following):\n" -msgstr "" +msgstr " Branche HEAD (la HEAD distante est ambiguë, peut être l'une des suivantes) :\n" #: builtin/remote.c:1151 #, c-format msgid " Remote branch:%s" msgid_plural " Remote branches:%s" -msgstr[0] "" -msgstr[1] "" +msgstr[0] " Branche distante :%s" +msgstr[1] " Branches distantes :%s" #: builtin/remote.c:1154 builtin/remote.c:1181 msgid " (status not queried)" -msgstr "" +msgstr " (statut non demandé)" #: builtin/remote.c:1163 msgid " Local branch configured for 'git pull':" msgid_plural " Local branches configured for 'git pull':" -msgstr[0] "" -msgstr[1] "" +msgstr[0] " Branche locale configurée pour 'git pull' :" +msgstr[1] " Branches locales configurées pour 'git pull' :" #: builtin/remote.c:1171 msgid " Local refs will be mirrored by 'git push'" -msgstr "" +msgstr " Les références locales seront reflétées par 'git push'" #: builtin/remote.c:1178 #, c-format msgid " Local ref configured for 'git push'%s:" msgid_plural " Local refs configured for 'git push'%s:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] " Référence locale configurée pour 'git push'%s :" +msgstr[1] " Références locales configurées pour 'git push'%s :" #: builtin/remote.c:1199 msgid "set refs/remotes/<name>/HEAD according to remote" -msgstr "" +msgstr "définir refs/remotes/<nom>/HEAD selon la distante" #: builtin/remote.c:1201 msgid "delete refs/remotes/<name>/HEAD" -msgstr "" +msgstr "supprimer refs/remotes/<nom>/HEAD" #: builtin/remote.c:1216 msgid "Cannot determine remote HEAD" -msgstr "" +msgstr "Impossible de déterminer la HEAD distante" #: builtin/remote.c:1218 msgid "Multiple remote HEAD branches. Please choose one explicitly with:" -msgstr "" +msgstr "Il y a de multiples branches HEAD distantes. Merci d'en choisir une explicitement avec :" #: builtin/remote.c:1228 #, c-format msgid "Could not delete %s" -msgstr "" +msgstr "Impossible de supprimer %s" #: builtin/remote.c:1236 #, c-format msgid "Not a valid ref: %s" -msgstr "" +msgstr "Référence non valide : %s" #: builtin/remote.c:1238 #, c-format msgid "Could not setup %s" -msgstr "" +msgstr "Impossible de paramétrer %s" #: builtin/remote.c:1274 #, c-format msgid " %s will become dangling!" -msgstr "" +msgstr " %s deviendra en suspens !" #: builtin/remote.c:1275 #, c-format msgid " %s has become dangling!" -msgstr "" +msgstr " %s est devenu en suspens !" #: builtin/remote.c:1281 #, c-format msgid "Pruning %s" -msgstr "" +msgstr "Élagage de %s" #: builtin/remote.c:1282 #, c-format msgid "URL: %s" -msgstr "" +msgstr "URL : %s" #: builtin/remote.c:1295 #, c-format msgid " * [would prune] %s" -msgstr "" +msgstr " * [serait élagué] %s" #: builtin/remote.c:1298 #, c-format msgid " * [pruned] %s" -msgstr "" +msgstr " * [élagué] %s" #: builtin/remote.c:1321 msgid "prune remotes after fetching" -msgstr "" +msgstr "élaguer les distants après le rapatriement" #: builtin/remote.c:1387 builtin/remote.c:1461 #, c-format msgid "No such remote '%s'" -msgstr "" +msgstr "Pas de serveur remote '%s'" #: builtin/remote.c:1407 msgid "add branch" -msgstr "" +msgstr "ajouter une branche" #: builtin/remote.c:1414 msgid "no remote specified" -msgstr "" +msgstr "pas de serveur distant spécifié" #: builtin/remote.c:1436 msgid "manipulate push URLs" -msgstr "" +msgstr "manipuler les URLs push" #: builtin/remote.c:1438 msgid "add URL" -msgstr "" +msgstr "ajouter une URL" #: builtin/remote.c:1440 msgid "delete URLs" -msgstr "" +msgstr "supprimer des URLs" #: builtin/remote.c:1447 msgid "--add --delete doesn't make sense" -msgstr "" +msgstr "--add --delete n'a aucun sens" #: builtin/remote.c:1487 #, c-format msgid "Invalid old URL pattern: %s" -msgstr "" +msgstr "Motif d'URL ancien invalide : %s" #: builtin/remote.c:1495 #, c-format msgid "No such URL found: %s" -msgstr "" +msgstr "Pas d'URL trouvée : %s" #: builtin/remote.c:1497 msgid "Will not delete all non-push URLs" @@ -7854,173 +7932,173 @@ msgstr "" #: builtin/remote.c:1569 msgid "be verbose; must be placed before a subcommand" -msgstr "" +msgstr "être verbeux : doit être placé avant une sous-commande" #: builtin/replace.c:17 msgid "git replace [-f] <object> <replacement>" -msgstr "" +msgstr "git replace [-f] <objet> <remplacement>" #: builtin/replace.c:18 msgid "git replace -d <object>..." -msgstr "" +msgstr "git replace -d <objet>..." #: builtin/replace.c:19 msgid "git replace -l [<pattern>]" -msgstr "" +msgstr "git replace -l [<motif>]" #: builtin/replace.c:121 msgid "list replace refs" -msgstr "" +msgstr "afficher les références de remplacement" #: builtin/replace.c:122 msgid "delete replace refs" -msgstr "" +msgstr "supprimer les références de remplacement" #: builtin/replace.c:123 msgid "replace the ref if it exists" -msgstr "" +msgstr "remplacer la référence si elle existe" #: builtin/rerere.c:11 msgid "git rerere [clear | forget path... | status | remaining | diff | gc]" -msgstr "" +msgstr "git rerere [clear | forget chemin... | status | remaining | diff | gc]" #: builtin/rerere.c:56 msgid "register clean resolutions in index" -msgstr "" +msgstr "enregistrer des résolutions propres dans l'index" #: builtin/reset.c:25 msgid "" "git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]" -msgstr "" +msgstr "git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]" #: builtin/reset.c:26 msgid "git reset [-q] <tree-ish> [--] <paths>..." -msgstr "" +msgstr "git reset [-q] <arbre> [--] <chemins>..." #: builtin/reset.c:27 msgid "git reset --patch [<tree-ish>] [--] [<paths>...]" -msgstr "" +msgstr "git reset --patch [<arbre>] [--] [<chemins>...]" #: builtin/reset.c:33 msgid "mixed" -msgstr "" +msgstr "mixed" #: builtin/reset.c:33 msgid "soft" -msgstr "" +msgstr "soft" #: builtin/reset.c:33 msgid "hard" -msgstr "" +msgstr "hard" #: builtin/reset.c:33 msgid "merge" -msgstr "" +msgstr "merge" #: builtin/reset.c:33 msgid "keep" -msgstr "" +msgstr "keep" #: builtin/reset.c:73 msgid "You do not have a valid HEAD." -msgstr "" +msgstr "Vous n'avez pas une HEAD valide." #: builtin/reset.c:75 msgid "Failed to find tree of HEAD." -msgstr "" +msgstr "Impossible de trouver l'arbre pour HEAD." #: builtin/reset.c:81 #, c-format msgid "Failed to find tree of %s." -msgstr "" +msgstr "Impossible de trouver l'arbre pour %s." #: builtin/reset.c:98 #, c-format msgid "HEAD is now at %s" -msgstr "" +msgstr "HEAD est maintenant à %s" #: builtin/reset.c:169 #, c-format msgid "Cannot do a %s reset in the middle of a merge." -msgstr "" +msgstr "Impossible de faire un \"reset %s\" au milieu d'une fusion." #: builtin/reset.c:248 msgid "be quiet, only report errors" -msgstr "" +msgstr "être silencieux, afficher seulement les erreurs" #: builtin/reset.c:250 msgid "reset HEAD and index" -msgstr "" +msgstr "réinitialiser HEAD et l'index" #: builtin/reset.c:251 msgid "reset only HEAD" -msgstr "" +msgstr "réinitialiser seulement HEAD" #: builtin/reset.c:253 builtin/reset.c:255 msgid "reset HEAD, index and working tree" -msgstr "" +msgstr "réinitialiser HEAD, l'index et la copie de travail" #: builtin/reset.c:257 msgid "reset HEAD but keep local changes" -msgstr "" +msgstr "réinitialiser HEAD mais garder les changements locaux" #: builtin/reset.c:275 #, c-format msgid "Failed to resolve '%s' as a valid revision." -msgstr "" +msgstr "Échec de résolution de '%s' comme une révision valide." #: builtin/reset.c:278 builtin/reset.c:286 #, c-format msgid "Could not parse object '%s'." -msgstr "" +msgstr "Impossible d'analyser l'objet '%s'." #: builtin/reset.c:283 #, c-format msgid "Failed to resolve '%s' as a valid tree." -msgstr "" +msgstr "Échec de résolution de '%s' comme un arbre valide." #: builtin/reset.c:292 msgid "--patch is incompatible with --{hard,mixed,soft}" -msgstr "" +msgstr "--patch est incompatible avec --{hard,mixed,soft}" #: builtin/reset.c:301 msgid "--mixed with paths is deprecated; use 'git reset -- <paths>' instead." -msgstr "" +msgstr "--mixed avec des chemins est obsolète ; utilisez 'git reset -- <paths>' à la place." #: builtin/reset.c:303 #, c-format msgid "Cannot do %s reset with paths." -msgstr "" +msgstr "Impossible de faire un \"%s reset\" avec des chemins." #: builtin/reset.c:313 #, c-format msgid "%s reset is not allowed in a bare repository" -msgstr "RAZ de %s n'est pas permis dans un dépôt nu" +msgstr "Le \"%s reset\" n'est pas permis dans un dépôt nu" #: builtin/reset.c:333 #, c-format msgid "Could not reset index file to revision '%s'." -msgstr "" +msgstr "Impossible de réinitialiser le fichier d'index à la révision '%s'." #: builtin/reset.c:339 msgid "Unstaged changes after reset:" -msgstr "" +msgstr "Modifications non indexées après reset :" #: builtin/reset.c:344 msgid "Could not write new index file." -msgstr "" +msgstr "Impossible d'écrire le nouveau fichier d'index." #: builtin/rev-parse.c:339 msgid "git rev-parse --parseopt [options] -- [<args>...]" -msgstr "" +msgstr "git rev-parse --parseopt [options] -- [<arguments>...]" #: builtin/rev-parse.c:344 msgid "keep the `--` passed as an arg" -msgstr "" +msgstr "garder le `--` passé en argument" #: builtin/rev-parse.c:346 msgid "stop parsing after the first non-option argument" -msgstr "" +msgstr "arrêt de l'analyse après le premier argument qui n'est pas une option" #: builtin/rev-parse.c:464 msgid "" @@ -8030,22 +8108,27 @@ msgid "" "\n" "Run \"git rev-parse --parseopt -h\" for more information on the first usage." msgstr "" +"git rev-parse --parseopt [options] -- [<arguments>...]\n" +" ou : git rev-parse --sq-quote [<argument>...]\n" +" ou : git rev-parse [options] [<argument>...]\n" +"\n" +"Lancez \"git rev-parse --parseopt -h\" pour plus d'information sur l'utilisation principale." #: builtin/revert.c:22 msgid "git revert [options] <commit-ish>..." -msgstr "" +msgstr "git revert [options] <commit>..." #: builtin/revert.c:23 msgid "git revert <subcommand>" -msgstr "" +msgstr "git revert <sous-commande>" #: builtin/revert.c:28 msgid "git cherry-pick [options] <commit-ish>..." -msgstr "" +msgstr "git cherry-pick [options] <commit>..." #: builtin/revert.c:29 msgid "git cherry-pick <subcommand>" -msgstr "" +msgstr "git cherry-pick <sous-commande>" #: builtin/revert.c:70 builtin/revert.c:92 #, c-format @@ -8054,75 +8137,75 @@ msgstr "%s : %s ne peut pas être utilisé avec %s" #: builtin/revert.c:103 msgid "end revert or cherry-pick sequence" -msgstr "" +msgstr "mettre fin au retour ou picorage" #: builtin/revert.c:104 msgid "resume revert or cherry-pick sequence" -msgstr "" +msgstr "reprendre le retour ou picorage" #: builtin/revert.c:105 msgid "cancel revert or cherry-pick sequence" -msgstr "" +msgstr "annuler le retour ou picorage" #: builtin/revert.c:106 msgid "don't automatically commit" -msgstr "" +msgstr "ne pas valider automatiquement" #: builtin/revert.c:107 msgid "edit the commit message" -msgstr "" +msgstr "éditer le message de validation" #: builtin/revert.c:110 msgid "parent number" -msgstr "" +msgstr "numéro de parent" #: builtin/revert.c:112 msgid "merge strategy" -msgstr "" +msgstr "stratégie de fusion" #: builtin/revert.c:113 msgid "option" -msgstr "" +msgstr "option" #: builtin/revert.c:114 msgid "option for merge strategy" -msgstr "" +msgstr "option pour la stratégie de fusion" #: builtin/revert.c:125 msgid "append commit name" -msgstr "" +msgstr "ajouter le nom de validation" #: builtin/revert.c:126 msgid "allow fast-forward" -msgstr "" +msgstr "autoriser l'avance rapide" #: builtin/revert.c:127 msgid "preserve initially empty commits" -msgstr "" +msgstr "préserver les validations vides initialement" #: builtin/revert.c:128 msgid "allow commits with empty messages" -msgstr "" +msgstr "autoriser les validations avec des messages vides" #: builtin/revert.c:129 msgid "keep redundant, empty commits" -msgstr "" +msgstr "garder les validations redondantes, vides" #: builtin/revert.c:133 msgid "program error" -msgstr "" +msgstr "erreur du programme" #: builtin/revert.c:223 msgid "revert failed" -msgstr "" +msgstr "revert a échoué" #: builtin/revert.c:238 msgid "cherry-pick failed" -msgstr "" +msgstr "le picorage a échoué" #: builtin/rm.c:15 msgid "git rm [options] [--] <file>..." -msgstr "" +msgstr "git rm [options] [--] <fichier>..." #: builtin/rm.c:64 builtin/rm.c:186 #, c-format @@ -8130,6 +8213,8 @@ msgid "" "submodule '%s' (or one of its nested submodules) uses a .git directory\n" "(use 'rm -rf' if you really want to remove it including all of its history)" msgstr "" +"le sous-module '%s' (ou un des sous-modules imbriqués) utilise un répertoire .git\n" +"(utilisez 'rm -rf' si vous souhaitez vraiment le supprimer avec tout son historique)" #: builtin/rm.c:174 #, c-format @@ -8137,6 +8222,8 @@ msgid "" "'%s' has staged content different from both the file and the HEAD\n" "(use -f to force removal)" msgstr "" +"'%s' a du contenu indexé différent du fichier et de HEAD\n" +"(utilisez -f pour forcer la suppression)" #: builtin/rm.c:180 #, c-format @@ -8144,6 +8231,8 @@ msgid "" "'%s' has changes staged in the index\n" "(use --cached to keep the file, or -f to force removal)" msgstr "" +"'%s' a des changements dans l'index\n" +"(utilisez --cached pour garder le fichier, ou -f pour forcer la suppression)" #: builtin/rm.c:191 #, c-format @@ -8151,65 +8240,67 @@ msgid "" "'%s' has local modifications\n" "(use --cached to keep the file, or -f to force removal)" msgstr "" +"'%s' a des modifications locales\n" +"(utilisez --cached pour garder le fichier, ou -f pour forcer la suppression)" #: builtin/rm.c:207 msgid "do not list removed files" -msgstr "" +msgstr "ne pas afficher les fichiers supprimés" #: builtin/rm.c:208 msgid "only remove from the index" -msgstr "" +msgstr "supprimer seulement de l'index" #: builtin/rm.c:209 msgid "override the up-to-date check" -msgstr "" +msgstr "outrepasser la vérification des fichiers à jour" #: builtin/rm.c:210 msgid "allow recursive removal" -msgstr "" +msgstr "autoriser la suppression récursive" #: builtin/rm.c:212 msgid "exit with a zero status even if nothing matched" -msgstr "" +msgstr "sortir avec un statut zéro même si rien ne correspondait" #: builtin/rm.c:283 #, c-format msgid "not removing '%s' recursively without -r" -msgstr "" +msgstr "pas de suppression récursive de '%s' sans -r" #: builtin/rm.c:322 #, c-format msgid "git rm: unable to remove %s" -msgstr "" +msgstr "git rm : impossible de supprimer %s" #: builtin/shortlog.c:13 msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" -msgstr "" +msgstr "git shortlog [<options>] [<intervalle révisions>] [[--] [<chemin>...]]" #: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" -msgstr "" +msgstr "Auteur manquant : %s" #: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" -msgstr "" +msgstr "trier la sortie sur le nombre de validations par auteur" #: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" -msgstr "" +msgstr "Supprimer les descriptions de validation, fournit seulement le nombre de validations" #: builtin/shortlog.c:231 msgid "Show the email address of each author" -msgstr "" +msgstr "Afficher l'adresse e-mail de chaque auteur" #: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" -msgstr "" +msgstr "w[,i1[,i2]]" #: builtin/shortlog.c:233 msgid "Linewrap output" -msgstr "" +msgstr "Couper les lignes" #: builtin/show-branch.c:9 msgid "" @@ -8217,31 +8308,31 @@ msgid "" "current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --" "independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | " "<glob>)...]" -msgstr "" +msgstr "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<quand>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<révision> | <glob>)...]" #: builtin/show-branch.c:10 msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" -msgstr "" +msgstr "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<référence>]" #: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" -msgstr "" +msgstr "afficher les branches de suivi distantes et les branches locales" #: builtin/show-branch.c:652 msgid "show remote-tracking branches" -msgstr "" +msgstr "afficher les branches de suivi distantes" #: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" -msgstr "" +msgstr "couleur '*!+-' correspondant à la branche" #: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" -msgstr "" +msgstr "afficher <n> validations de plus après l'ancêtre commun" #: builtin/show-branch.c:658 msgid "synonym to more=-1" -msgstr "" +msgstr "synonyme de more=-1" #: builtin/show-branch.c:659 msgid "suppress naming strings" @@ -8249,157 +8340,159 @@ msgstr "" #: builtin/show-branch.c:661 msgid "include the current branch" -msgstr "" +msgstr "inclure la branche courante" #: builtin/show-branch.c:663 msgid "name commits with their object names" -msgstr "" +msgstr "nommer les validations avec leurs noms d'objet" #: builtin/show-branch.c:665 msgid "show possible merge bases" -msgstr "" +msgstr "afficher les bases possibles de fusion" #: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" -msgstr "" +msgstr "afficher les références non accessibles depuis toute autre référence" #: builtin/show-branch.c:669 msgid "show commits in topological order" -msgstr "" +msgstr "afficher les validations dans l'ordre topologique" #: builtin/show-branch.c:671 msgid "show only commits not on the first branch" -msgstr "" +msgstr "afficher seulement les validations qui ne sont pas sur la première branche" #: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" -msgstr "" +msgstr "afficher les fusions accessibles depuis une seule pointe" #: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" -msgstr "" +msgstr "afficher les validations où aucun parent ne vient avant ses enfants" #: builtin/show-branch.c:677 msgid "<n>[,<base>]" -msgstr "" +msgstr "<n>[,<base>]" #: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" -msgstr "" +msgstr "afficher les <n> plus récentes entrées de ref-log en commençant à la base" #: builtin/show-ref.c:10 msgid "" "git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--" "hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*] " -msgstr "" +msgstr "git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [motif*] " #: builtin/show-ref.c:11 msgid "git show-ref --exclude-existing[=pattern] < ref-list" -msgstr "" +msgstr "git show-ref --exclude-existing[=motif] < liste-références" #: builtin/show-ref.c:165 msgid "only show tags (can be combined with heads)" -msgstr "" +msgstr "afficher seulement les étiquettes (peut être combiné avec des têtes)" #: builtin/show-ref.c:166 msgid "only show heads (can be combined with tags)" -msgstr "" +msgstr "afficher seulement les têtes (peut être combiné avec des étiquettes)" #: builtin/show-ref.c:167 msgid "stricter reference checking, requires exact ref path" -msgstr "" +msgstr "vérification de référence plus stricte, requiert un chemin de référence exact" #: builtin/show-ref.c:170 builtin/show-ref.c:172 msgid "show the HEAD reference" -msgstr "" +msgstr "afficher la référence HEAD" #: builtin/show-ref.c:174 msgid "dereference tags into object IDs" -msgstr "" +msgstr "déréférencer les étiquettes en IDs d'objet" #: builtin/show-ref.c:176 msgid "only show SHA1 hash using <n> digits" -msgstr "" +msgstr "afficher seulement le hachage SHA1 en utilisant <n> chiffres" #: builtin/show-ref.c:180 msgid "do not print results to stdout (useful with --verify)" -msgstr "" +msgstr "ne pas afficher les résultats sur la sortie standard (pratique avec --verify)" #: builtin/show-ref.c:182 msgid "show refs from stdin that aren't in local repository" -msgstr "" +msgstr "afficher les références de l'entrée standard qui ne sont pas dans le dépôt local" #: builtin/symbolic-ref.c:7 msgid "git symbolic-ref [options] name [ref]" -msgstr "" +msgstr "git symbolic-ref [options] nom [référence]" #: builtin/symbolic-ref.c:8 msgid "git symbolic-ref -d [-q] name" -msgstr "" +msgstr "git symbolic-ref -d [-q] nom" #: builtin/symbolic-ref.c:40 msgid "suppress error message for non-symbolic (detached) refs" -msgstr "" +msgstr "supprimer le message d'erreur pour une référence non symbolique (détachée)" #: builtin/symbolic-ref.c:41 msgid "delete symbolic ref" -msgstr "" +msgstr "supprimer la référence symbolique" #: builtin/symbolic-ref.c:42 msgid "shorten ref output" -msgstr "" +msgstr "raccourcir l'affichage de la référence" #: builtin/symbolic-ref.c:43 builtin/update-ref.c:18 msgid "reason" -msgstr "" +msgstr "raison" #: builtin/symbolic-ref.c:43 builtin/update-ref.c:18 msgid "reason of the update" -msgstr "" +msgstr "raison de la mise à jour" #: builtin/tag.c:22 msgid "" "git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]" -msgstr "" +msgstr "git tag [-a|-s|-u <id-clé>] [-f] [-m <msg>|-F <file>] <nométiquette> [<head>]" #: builtin/tag.c:23 msgid "git tag -d <tagname>..." -msgstr "" +msgstr "git tag -d <nométiquette>..." #: builtin/tag.c:24 msgid "" "git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>] \n" "\t\t[<pattern>...]" msgstr "" +"git tag -l [-n[<num>]] [--contains <commit>] [--points-at <objet>] \n" +"\t\t[<motif>...]" #: builtin/tag.c:26 msgid "git tag -v <tagname>..." -msgstr "" +msgstr "git tag -v <nométiquette>..." #: builtin/tag.c:60 #, c-format msgid "malformed object at '%s'" -msgstr "" +msgstr "objet malformé à '%s'" #: builtin/tag.c:207 #, c-format msgid "tag name too long: %.*s..." -msgstr "" +msgstr "nom d'étiquette trop long : %.*s..." #: builtin/tag.c:212 #, c-format msgid "tag '%s' not found." -msgstr "" +msgstr "étiquette '%s' non trouvée." #: builtin/tag.c:227 #, c-format msgid "Deleted tag '%s' (was %s)\n" -msgstr "" +msgstr "Étiquette '%s' supprimée (elle était %s)\n" #: builtin/tag.c:239 #, c-format msgid "could not verify the tag '%s'" -msgstr "" +msgstr "impossible de vérifier l'étiquette '%s'" #: builtin/tag.c:249 #, c-format @@ -8408,6 +8501,9 @@ msgid "" "Write a tag message\n" "Lines starting with '%c' will be ignored.\n" msgstr "" +"\n" +"Écrire un message pour l'étiquette\n" +"Les lignes commençant par '%c' seront ignorées.\n" #: builtin/tag.c:253 #, c-format @@ -8417,130 +8513,133 @@ msgid "" "Lines starting with '%c' will be kept; you may remove them yourself if you " "want to.\n" msgstr "" +"\n" +"Écrire un message pour l'étiquette\n" +"Les lignes commençant par '%c' seront gardées ; vous pouvez les retirer vous-même si vous le souhaitez.\n" #: builtin/tag.c:292 msgid "unable to sign the tag" -msgstr "" +msgstr "impossible de signer l'étiquette" #: builtin/tag.c:294 msgid "unable to write tag file" -msgstr "" +msgstr "impossible d'écrire le fichier d'étiquettes" #: builtin/tag.c:319 msgid "bad object type." -msgstr "" +msgstr "mauvais type d'objet." #: builtin/tag.c:332 msgid "tag header too big." -msgstr "" +msgstr "en-tête d'étiquette trop gros." #: builtin/tag.c:368 msgid "no tag message?" -msgstr "" +msgstr "pas de message pour l'étiquette ?" #: builtin/tag.c:374 #, c-format msgid "The tag message has been left in %s\n" -msgstr "" +msgstr "Le message pour l'étiquette a été laissé dans %s\n" #: builtin/tag.c:423 msgid "switch 'points-at' requires an object" -msgstr "" +msgstr "le commutateur 'points-at' requiert un objet" #: builtin/tag.c:425 #, c-format msgid "malformed object name '%s'" -msgstr "" +msgstr "nom d'objet malformé '%s'" #: builtin/tag.c:445 msgid "list tag names" -msgstr "" +msgstr "afficher les noms des étiquettes" #: builtin/tag.c:447 msgid "print <n> lines of each tag message" -msgstr "" +msgstr "affiche <n> lignes de chaque message d'étiquette" #: builtin/tag.c:449 msgid "delete tags" -msgstr "" +msgstr "supprimer des étiquettes" #: builtin/tag.c:450 msgid "verify tags" -msgstr "" +msgstr "vérifier des étiquettes" #: builtin/tag.c:452 msgid "Tag creation options" -msgstr "" +msgstr "Options de création de l'étiquette" #: builtin/tag.c:454 msgid "annotated tag, needs a message" -msgstr "" +msgstr "étiquette annotée, nécessite un message" #: builtin/tag.c:456 msgid "tag message" -msgstr "" +msgstr "message pour l'étiquette" #: builtin/tag.c:458 msgid "annotated and GPG-signed tag" -msgstr "" +msgstr "étiquette annotée et signée avec GPG" #: builtin/tag.c:462 msgid "use another key to sign the tag" -msgstr "" +msgstr "utiliser une autre clé pour signer l'étiquette" #: builtin/tag.c:463 msgid "replace the tag if exists" -msgstr "" +msgstr "remplacer l'étiquette si elle existe" #: builtin/tag.c:464 msgid "show tag list in columns" -msgstr "" +msgstr "afficher la liste des étiquettes sous forme de colonnes" #: builtin/tag.c:466 msgid "Tag listing options" -msgstr "" +msgstr "Options d'affichage des étiquettes" #: builtin/tag.c:469 msgid "print only tags that contain the commit" -msgstr "" +msgstr "afficher seulement les étiquettes qui contiennent la validation" #: builtin/tag.c:475 msgid "print only tags of the object" -msgstr "" +msgstr "afficher seulement les étiquettes de l'objet" #: builtin/tag.c:504 msgid "--column and -n are incompatible" -msgstr "" +msgstr "--column et -n sont incompatibles" #: builtin/tag.c:521 msgid "-n option is only allowed with -l." -msgstr "" +msgstr "l'option -n est autorisée seulement avec -l." #: builtin/tag.c:523 msgid "--contains option is only allowed with -l." -msgstr "" +msgstr "l'option --contains est autorisée seulement avec -l." #: builtin/tag.c:525 msgid "--points-at option is only allowed with -l." -msgstr "" +msgstr "l'option --points-at est autorisée seulement avec -l." #: builtin/tag.c:533 msgid "only one -F or -m option is allowed." -msgstr "" +msgstr "une seule option -F ou -m est autorisée." #: builtin/tag.c:553 msgid "too many params" -msgstr "" +msgstr "trop de paramètres" #: builtin/tag.c:559 #, c-format msgid "'%s' is not a valid tag name." -msgstr "" +msgstr "'%s' n'est pas un nom d'étiquette valide." #: builtin/tag.c:564 #, c-format msgid "tag '%s' already exists" -msgstr "" +msgstr "l'étiquette '%s' existe déjà" #: builtin/tag.c:582 #, c-format @@ -8555,63 +8654,63 @@ msgstr "%s : impossible de mettre à jour la référence" #: builtin/tag.c:586 #, c-format msgid "Updated tag '%s' (was %s)\n" -msgstr "" +msgstr "Étiquette '%s' mise à jour (elle était %s)\n" #: builtin/update-index.c:401 msgid "git update-index [options] [--] [<file>...]" -msgstr "" +msgstr "git update-index [options] [--] [<fichier>...]" #: builtin/update-index.c:718 msgid "continue refresh even when index needs update" -msgstr "" +msgstr "continuer de rafraîchir même si l'index a besoin d'une mise à jour" #: builtin/update-index.c:721 msgid "refresh: ignore submodules" -msgstr "" +msgstr "rafraîchir : ignorer les sous-modules" #: builtin/update-index.c:724 msgid "do not ignore new files" -msgstr "" +msgstr "ne pas ignorer les nouveaux fichiers" #: builtin/update-index.c:726 msgid "let files replace directories and vice-versa" -msgstr "" +msgstr "laisser les fichiers remplacer des répertoires et vice-versa" #: builtin/update-index.c:728 msgid "notice files missing from worktree" -msgstr "" +msgstr "aviser des fichiers manquants dans la copie de travail" #: builtin/update-index.c:730 msgid "refresh even if index contains unmerged entries" -msgstr "" +msgstr "rafraîchir même si l'index contient des entrées non fusionnées" #: builtin/update-index.c:733 msgid "refresh stat information" -msgstr "" +msgstr "rafraîchir l'information de stat" #: builtin/update-index.c:737 msgid "like --refresh, but ignore assume-unchanged setting" -msgstr "" +msgstr "comme --refresh, mais en ignorant l'option assume-unchanged" #: builtin/update-index.c:741 msgid "<mode> <object> <path>" -msgstr "" +msgstr "<mode> <objet> <chemin>" #: builtin/update-index.c:742 msgid "add the specified entry to the index" -msgstr "" +msgstr "ajouter l'entrée spécifiée dans l'index" #: builtin/update-index.c:746 msgid "(+/-)x" -msgstr "" +msgstr "(+/-)x" #: builtin/update-index.c:747 msgid "override the executable bit of the listed files" -msgstr "" +msgstr "outrepasser le bit exécutable pour les fichiers listés" #: builtin/update-index.c:751 msgid "mark files as \"not changing\"" -msgstr "" +msgstr "marquer les fichiers comme \"non changeants\"" #: builtin/update-index.c:754 msgid "clear assumed-unchanged bit" @@ -8619,7 +8718,7 @@ msgstr "" #: builtin/update-index.c:757 msgid "mark files as \"index-only\"" -msgstr "" +msgstr "marquer les fichiers comme \"index seulement\"" #: builtin/update-index.c:760 msgid "clear skip-worktree bit" @@ -8627,59 +8726,59 @@ msgstr "" #: builtin/update-index.c:763 msgid "add to index only; do not add content to object database" -msgstr "" +msgstr "ajouter seulement à l'index ; ne pas ajouter le contenu dans la base de données des objets" #: builtin/update-index.c:765 msgid "remove named paths even if present in worktree" -msgstr "" +msgstr "supprimer les chemins nommés même s'ils sont présents dans la copie de travail" #: builtin/update-index.c:767 msgid "with --stdin: input lines are terminated by null bytes" -msgstr "" +msgstr "avec --stdin : les lignes en entrée sont terminées par des octets nuls" #: builtin/update-index.c:769 msgid "read list of paths to be updated from standard input" -msgstr "" +msgstr "lire la liste des chemins à mettre à jour depuis l'entrée standard" #: builtin/update-index.c:773 msgid "add entries from standard input to the index" -msgstr "" +msgstr "ajouter les entrées depuis l'entrée standard à l'index" #: builtin/update-index.c:777 msgid "repopulate stages #2 and #3 for the listed paths" -msgstr "" +msgstr "repeupler les étapes n°2 et n°3 pour les chemins listés" #: builtin/update-index.c:781 msgid "only update entries that differ from HEAD" -msgstr "" +msgstr "mettre à jour seulement les entrées qui diffèrent de HEAD" #: builtin/update-index.c:785 msgid "ignore files missing from worktree" -msgstr "" +msgstr "ignorer les fichiers manquants dans la copie de travail" #: builtin/update-index.c:788 msgid "report actions to standard output" -msgstr "" +msgstr "afficher les actions sur la sortie standard" #: builtin/update-index.c:790 msgid "(for porcelains) forget saved unresolved conflicts" -msgstr "" +msgstr "(pour porcelaines) oublier les conflits sauvés et non résolus" #: builtin/update-index.c:794 msgid "write index in this format" -msgstr "" +msgstr "écrire l'index dans ce format" #: builtin/update-ref.c:7 msgid "git update-ref [options] -d <refname> [<oldval>]" -msgstr "" +msgstr "git update-ref [options] -d <nomréférence> [<anciennevaleur>]" #: builtin/update-ref.c:8 msgid "git update-ref [options] <refname> <newval> [<oldval>]" -msgstr "" +msgstr "git update-ref [options] <nomréférence> <nouvellevaleur> [<anciennevaleur>]" #: builtin/update-ref.c:19 msgid "delete the reference" -msgstr "" +msgstr "supprimer la référence" #: builtin/update-ref.c:21 msgid "update <refname> not the one it points to" @@ -8687,47 +8786,47 @@ msgstr "" #: builtin/update-server-info.c:6 msgid "git update-server-info [--force]" -msgstr "" +msgstr "git update-server-info [--force]" #: builtin/update-server-info.c:14 msgid "update the info files from scratch" -msgstr "" +msgstr "mettre à jour les fichiers d'information à partir de zéro" #: builtin/verify-pack.c:56 msgid "git verify-pack [-v|--verbose] [-s|--stat-only] <pack>..." -msgstr "" +msgstr "git verify-pack [-v|--verbose] [-s|--stat-only] <pack>..." #: builtin/verify-pack.c:66 msgid "verbose" -msgstr "" +msgstr "verbeux" #: builtin/verify-pack.c:68 msgid "show statistics only" -msgstr "" +msgstr "afficher seulement les statistiques" #: builtin/verify-tag.c:17 msgid "git verify-tag [-v|--verbose] <tag>..." -msgstr "" +msgstr "git verify-tag [-v|--verbose] <étiquette>..." #: builtin/verify-tag.c:73 msgid "print tag contents" -msgstr "" +msgstr "afficher le contenu de l'étiquette" #: builtin/write-tree.c:13 msgid "git write-tree [--missing-ok] [--prefix=<prefix>/]" -msgstr "" +msgstr "git write-tree [--missing-ok] [--prefix=<préfixe>/]" #: builtin/write-tree.c:26 msgid "<prefix>/" -msgstr "" +msgstr "<préfixe>/" #: builtin/write-tree.c:27 msgid "write tree object for a subdirectory <prefix>" -msgstr "" +msgstr "écrire l'objet arbre pour un sous-répertoire <préfixe>" #: builtin/write-tree.c:30 msgid "only useful for debugging" -msgstr "" +msgstr "seulement utile pour le débogage" #: git.c:16 msgid "" @@ -8735,116 +8834,121 @@ msgid "" "concept guides. See 'git help <command>' or 'git help <concept>'\n" "to read about a specific subcommand or concept." msgstr "" +"'git help -a' et 'git help -g' listent les sous-commandes disponibles et\n" +"quelques concepts. Voir 'git help <command>' ou 'git help <concept>'\n" +"pour en lire plus à propos d'une commande spécifique ou d'un concept." #: parse-options.h:156 msgid "no-op (backward compatibility)" -msgstr "" +msgstr "sans action (rétrocompatibilité)" #: parse-options.h:232 msgid "be more verbose" -msgstr "" +msgstr "être plus verbeux" #: parse-options.h:234 msgid "be more quiet" -msgstr "" +msgstr "être plus silencieux" #: parse-options.h:240 msgid "use <n> digits to display SHA-1s" -msgstr "" +msgstr "utiliser <n> chiffres pour afficher les SHA-1s" #: common-cmds.h:8 msgid "Add file contents to the index" -msgstr "" +msgstr "Ajouter le contenu du fichier dans l'index" #: common-cmds.h:9 msgid "Find by binary search the change that introduced a bug" -msgstr "" +msgstr "Rechercher de manière binaire le changement qui a introduit un bogue" #: common-cmds.h:10 msgid "List, create, or delete branches" -msgstr "" +msgstr "Lister, créer ou supprimer des branches" #: common-cmds.h:11 msgid "Checkout a branch or paths to the working tree" -msgstr "" +msgstr "Extraire une branche ou des chemins dans la copie de travail" #: common-cmds.h:12 msgid "Clone a repository into a new directory" -msgstr "" +msgstr "Cloner un dépôt dans un nouveau répertoire" #: common-cmds.h:13 msgid "Record changes to the repository" -msgstr "" +msgstr "Enregistrer les changements dans le dépôt" #: common-cmds.h:14 msgid "Show changes between commits, commit and working tree, etc" -msgstr "" +msgstr "Afficher les changements entre les validations, entre validation et copie de travail, etc" #: common-cmds.h:15 msgid "Download objects and refs from another repository" -msgstr "" +msgstr "Télécharger les objets et références depuis un autre dépôt" #: common-cmds.h:16 msgid "Print lines matching a pattern" -msgstr "" +msgstr "Afficher les lignes correspondant à un motif" #: common-cmds.h:17 msgid "Create an empty Git repository or reinitialize an existing one" -msgstr "" +msgstr "Créer un dépôt Git vide ou réinitialiser un existant" #: common-cmds.h:18 msgid "Show commit logs" -msgstr "" +msgstr "Afficher l'historique des validations" #: common-cmds.h:19 msgid "Join two or more development histories together" -msgstr "" +msgstr "Joindre deux ou plusieurs historiques de développement ensemble" #: common-cmds.h:20 msgid "Move or rename a file, a directory, or a symlink" -msgstr "" +msgstr "Déplacer ou renommer un fichier, un répertoire, ou un lien symbolique" #: common-cmds.h:21 msgid "Fetch from and merge with another repository or a local branch" -msgstr "" +msgstr "Rapatrier et fusionner avec un autre dépôt ou une branche locale" #: common-cmds.h:22 msgid "Update remote refs along with associated objects" -msgstr "" +msgstr "Mettre à jour les références distantes ainsi que les objets associés" #: common-cmds.h:23 msgid "Forward-port local commits to the updated upstream head" -msgstr "" +msgstr "Reporter en avant les validations locales dans la tête en amont mise à jour" #: common-cmds.h:24 msgid "Reset current HEAD to the specified state" -msgstr "" +msgstr "Réinitialiser la HEAD courante à l'état spécifié" #: common-cmds.h:25 msgid "Remove files from the working tree and from the index" -msgstr "" +msgstr "Supprimer les fichiers de la copie de travail et de l'index" #: common-cmds.h:26 msgid "Show various types of objects" -msgstr "" +msgstr "Afficher différents types d'objects" #: common-cmds.h:27 msgid "Show the working tree status" -msgstr "" +msgstr "Afficher le statut de la copie de travail" #: common-cmds.h:28 msgid "Create, list, delete or verify a tag object signed with GPG" -msgstr "" +msgstr "Créer, lister, supprimer ou vérifier un objet d'étiquette signé avec GPG" #: git-am.sh:50 msgid "You need to set your committer info first" -msgstr "" +msgstr "Vous devez d'abord définir vos informations de validateur" #: git-am.sh:95 msgid "" "You seem to have moved HEAD since the last 'am' failure.\n" "Not rewinding to ORIG_HEAD" msgstr "" +"Vous semblez avoir déplacé la HEAD depuis le dernier échec de 'am'.\n" +"Pas de retour à ORIG_HEAD" #: git-am.sh:105 #, sh-format @@ -8853,69 +8957,76 @@ msgid "" "If you prefer to skip this patch, run \"$cmdline --skip\" instead.\n" "To restore the original branch and stop patching, run \"$cmdline --abort\"." msgstr "" +"Lorsque vous aurez résolu ce problème, lancez \"$cmdline --resolved\".\n" +"Si vous préférez sauter ce patch, lancez \"$cmdline --skip\" à la place.\n" +"Pour restaurer la branche d'origine et stopper le patchage, lancez \"$cmdline --abort\"." #: git-am.sh:121 msgid "Cannot fall back to three-way merge." -msgstr "" +msgstr "Impossible de retourner à une fusion 3-way." #: git-am.sh:137 msgid "Repository lacks necessary blobs to fall back on 3-way merge." -msgstr "" +msgstr "Le dépôt n'a pas les blobs nécessaires pour un retour à une fusion 3-way." #: git-am.sh:139 msgid "Using index info to reconstruct a base tree..." -msgstr "" +msgstr "Utilisation de l'information de l'index pour reconstruire un arbre de base..." #: git-am.sh:154 msgid "" "Did you hand edit your patch?\n" "It does not apply to blobs recorded in its index." msgstr "" +"Avez-vous édité le patch à la main ?\n" +"Il ne s'applique pas aux blobs enregistrés dans son index." #: git-am.sh:163 msgid "Falling back to patching base and 3-way merge..." -msgstr "" +msgstr "Retour à un patch de la base et fusion 3-way..." #: git-am.sh:179 msgid "Failed to merge in the changes." -msgstr "" +msgstr "Échec de fusion dans les changements." #: git-am.sh:274 msgid "Only one StGIT patch series can be applied at once" -msgstr "" +msgstr "Seulement une série de patches StGIT peut être appliquée à la fois" #: git-am.sh:361 #, sh-format msgid "Patch format $patch_format is not supported." -msgstr "" +msgstr "Le format de patch $patch_format n'est pas supporté." #: git-am.sh:363 msgid "Patch format detection failed." -msgstr "" +msgstr "Échec de détection du format du patch." #: git-am.sh:389 msgid "" "The -b/--binary option has been a no-op for long time, and\n" "it will be removed. Please do not use it anymore." msgstr "" +"L'option -b/--binary ne fait plus rien depuis longtemps,\n" +"et elle sera supprimée. Merci de ne plus l'utiliser." #: git-am.sh:477 #, sh-format msgid "previous rebase directory $dotest still exists but mbox given." -msgstr "" +msgstr "le répertoire précédent de rebasage $dotest existe toujours mais mbox donnée." #: git-am.sh:482 msgid "Please make up your mind. --skip or --abort?" -msgstr "" +msgstr "Décidez-vous. --skip ou --abort ?" #: git-am.sh:509 msgid "Resolve operation not in progress, we are not resuming." -msgstr "" +msgstr "Pas de résolution de l'opération en cours, nous ne sommes pas dans une reprise." #: git-am.sh:575 #, sh-format msgid "Dirty index: cannot apply patches (dirty: $files)" -msgstr "" +msgstr "Index sale : impossible d'appliquer des patches (sales : $files)" #: git-am.sh:679 #, sh-format @@ -8924,30 +9035,33 @@ msgid "" "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 "" +"Le patch est vide. Était-il mal découpé ?\n" +"Si vous préférez sauter ce patch, lancez plutôt \"$cmdline --skip\".\n" +"Pour restaurer la branche d'origine et stopper le patchage, lancez \"$cmdline --abort\"." #: git-am.sh:706 msgid "Patch does not have a valid e-mail address." -msgstr "" +msgstr "Le patch n'a pas d'adresse e-mail valide." #: git-am.sh:753 msgid "cannot be interactive without stdin connected to a terminal." -msgstr "" +msgstr "impossible d'être interactif sans entrée standard connectée à un terminal." #: git-am.sh:757 msgid "Commit Body is:" -msgstr "" +msgstr "Le corps de la validation est :" #. 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:764 msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all " -msgstr "" +msgstr "Appliquer ? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all " #: git-am.sh:800 #, sh-format msgid "Applying: $FIRSTLINE" -msgstr "" +msgstr "Application : $FIRSTLINE" #: git-am.sh:821 msgid "" @@ -8961,15 +9075,17 @@ msgid "" "You still have unmerged paths in your index\n" "did you forget to use 'git add'?" msgstr "" +"Vous avez toujours des chemins non fusionnés dans votre index\n" +"auriez-vous oublié de faire 'git add' ?" #: git-am.sh:845 msgid "No changes -- Patch already applied." -msgstr "" +msgstr "Pas de changement -- Patch déjà appliqué." #: git-am.sh:855 #, sh-format msgid "Patch failed at $msgnum $FIRSTLINE" -msgstr "" +msgstr "Le patch a échoué à $msgnum $FIRSTLINE" #: git-am.sh:858 #, sh-format @@ -8977,26 +9093,28 @@ msgid "" "The copy of the patch that failed is found in:\n" " $dotest/patch" msgstr "" +"La copie du patch qui a échoué se trouve dans :\n" +" $dotest/patch" #: git-am.sh:876 msgid "applying to an empty history" -msgstr "" +msgstr "application à un historique vide" #: git-bisect.sh:48 msgid "You need to start by \"git bisect start\"" -msgstr "" +msgstr "Vous devez démarrer avec \"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 msgid "Do you want me to do it for you [Y/n]? " -msgstr "" +msgstr "Souhaitez-vous que je le fasse pour vous [Y/n] ? " #: git-bisect.sh:95 #, sh-format msgid "unrecognised option: '$arg'" -msgstr "" +msgstr "option inconnue : '$arg'" #: git-bisect.sh:99 #, sh-format @@ -9005,13 +9123,13 @@ msgstr "'$arg' ne semble être une révision valide" #: git-bisect.sh:117 msgid "Bad HEAD - I need a HEAD" -msgstr "" +msgstr "Mauvaise HEAD - j'ai besoin d'une HEAD" #: git-bisect.sh:130 #, sh-format msgid "" "Checking out '$start_head' failed. Try 'git bisect reset <validbranch>'." -msgstr "" +msgstr "L'extraction de '$start_head' a échoué. Essayez 'git bisect reset <branchevalide>'." #: git-bisect.sh:140 msgid "won't bisect on seeked tree" @@ -9019,49 +9137,51 @@ msgstr "" #: git-bisect.sh:144 msgid "Bad HEAD - strange symbolic ref" -msgstr "" +msgstr "Mauvaise HEAD - référence symbolique douteuse" #: git-bisect.sh:189 #, sh-format msgid "Bad bisect_write argument: $state" -msgstr "" +msgstr "Mauvais argument pour bisect_write : $state" #: git-bisect.sh:218 #, sh-format msgid "Bad rev input: $arg" -msgstr "" +msgstr "Mauvaise révision en entrée : $arg" #: git-bisect.sh:232 msgid "Please call 'bisect_state' with at least one argument." -msgstr "" +msgstr "Merci d'appeler 'bisect_state' avec au moins un argument." #: git-bisect.sh:244 #, sh-format msgid "Bad rev input: $rev" -msgstr "" +msgstr "Mauvaise révision en entrée : $rev" #: git-bisect.sh:250 msgid "'git bisect bad' can take only one argument." -msgstr "" +msgstr "'git bisect bad' n'accepte qu'un seul argument." #. 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 "" +msgstr "Attention : bissection avec seulement une mauvaise validation." #. 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 "" +msgstr "Êtes-vous sûr [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 "" +"Vous devez me donner au moins une bonne et une mauvaise révision.\n" +"(Vous pouvez utiliser \"git bisect bad\" et \"git bisect good\" pour cela.)" #: git-bisect.sh:292 msgid "" @@ -9069,15 +9189,18 @@ msgid "" "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 "" +"Vous devez démarrer avec \"git bisect start\".\n" +"Puis vous devez me donner au moins une bonne et une mauvaise révision.\n" +"(Vous pouvez utiliser \"git bisect bad\" et \"git bisect good\" pour cela.)" #: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." -msgstr "" +msgstr "Pas de bissection en cours." #: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" -msgstr "'$invalid' n'est pas un commit valide" +msgstr "'$invalid' n'est pas une validation valide" #: git-bisect.sh:379 #, sh-format @@ -9085,24 +9208,26 @@ msgid "" "Could not check out original HEAD '$branch'.\n" "Try 'git bisect reset <commit>'." msgstr "" +"Échec d'extraction de la HEAD d'origine '$branch'.\n" +"Essayez 'git bisect reset <commit>'." #: git-bisect.sh:406 msgid "No logfile given" -msgstr "" +msgstr "Pas de fichier de log donné" #: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" -msgstr "" +msgstr "impossible de lire $file pour rejouer" #: git-bisect.sh:424 msgid "?? what are you talking about?" -msgstr "" +msgstr "?? de quoi parlez-vous ?" #: git-bisect.sh:436 #, sh-format msgid "running $command" -msgstr "" +msgstr "lancement de $command" #: git-bisect.sh:443 #, sh-format @@ -9110,10 +9235,12 @@ msgid "" "bisect run failed:\n" "exit code $res from '$command' is < 0 or >= 128" msgstr "" +"la bissection a échoué :\n" +"le code retour $res de '$command' est < 0 ou >= 128" #: git-bisect.sh:469 msgid "bisect run cannot continue any more" -msgstr "" +msgstr "la bissection ne peut plus continuer" #: git-bisect.sh:475 #, sh-format @@ -9121,10 +9248,12 @@ msgid "" "bisect run failed:\n" "'bisect_state $state' exited with error code $res" msgstr "" +"la bissection a échoué :\n" +"'bisect_state $state' a retourné le code erreur $res" #: git-bisect.sh:482 msgid "bisect run success" -msgstr "" +msgstr "succès de la bissection" #: git-pull.sh:21 msgid "" @@ -9132,14 +9261,17 @@ msgid "" "Please, fix them up in the work tree, and then use 'git add/rm <file>'\n" "as appropriate to mark resolution, or use 'git commit -a'." msgstr "" +"Le pull n'est pas possible car vous avez des fichiers non fusionnés.\n" +"Merci de corriger dans votre copie de travail, et utilisez alors 'git add/rm <file>'\n" +"si nécessaire pour marquer comme résolu, ou utilisez 'git commit -a'." #: git-pull.sh:25 msgid "Pull is not possible because you have unmerged files." -msgstr "" +msgstr "Le pull n'est pas possible car vous avez des fichiers non fusionnés." #: git-pull.sh:203 msgid "updating an unborn branch with changes added to the index" -msgstr "" +msgstr "mise à jour d'une branche non encore créée avec les changements ajoutés dans l'index" #. The fetch involved updating the current branch. #. The working tree and the index file is still based on the @@ -9152,14 +9284,17 @@ msgid "" "Warning: fast-forwarding your working tree from\n" "Warning: commit $orig_head." msgstr "" +"Attention : fetch a mis à jour la tête de la branche courante.\n" +"Attention : mise à jour en avance rapide de votre copie de travail\n" +"Attention : depuis la validation $orig_head." #: git-pull.sh:260 msgid "Cannot merge multiple branches into empty head" -msgstr "" +msgstr "Impossible de fusionner de multiples branches sur une tête vide" #: git-pull.sh:264 msgid "Cannot rebase onto multiple branches" -msgstr "" +msgstr "Impossible de rebaser sur de multiples branches" #: git-rebase.sh:53 msgid "" @@ -9168,41 +9303,46 @@ msgid "" "To check out the original branch and stop rebasing, run \"git rebase --abort" "\"." msgstr "" +"Lorsque vous aurez résolu ce problème, lancez \"git rebase --continue\".\n" +"Si vous préférez sauter ce patch, lancez \"git rebase --skip\" à la place.\n" +"Pour extraire la branche d'origine et stopper le rebasage, lancez \"git rebase --abort\"." #: git-rebase.sh:160 msgid "The pre-rebase hook refused to rebase." -msgstr "" +msgstr "Le hook pre-rebase a refusé de rebaser." #: git-rebase.sh:165 msgid "It looks like git-am is in progress. Cannot rebase." -msgstr "" +msgstr "Il semble que git-am soit en cours. Impossible de rebaser." #: git-rebase.sh:296 msgid "The --exec option must be used with the --interactive option" -msgstr "" +msgstr "L'option --exec doit être utilisée avec l'option --interactive" #: git-rebase.sh:301 msgid "No rebase in progress?" -msgstr "" +msgstr "Pas de rebasage en cours ?" #: git-rebase.sh:312 msgid "The --edit-todo action can only be used during interactive rebase." -msgstr "" +msgstr "L'action --edit-todo peut seulement être utilisée lors d'un rebasage interactif." #: git-rebase.sh:319 msgid "Cannot read HEAD" -msgstr "" +msgstr "Impossible de lire HEAD" #: git-rebase.sh:322 msgid "" "You must edit all merge conflicts and then\n" "mark them as resolved using git add" msgstr "" +"Vous devez éditer tous les conflits de fusion et\n" +"les marquer comme résolus avec git add" #: git-rebase.sh:340 #, sh-format msgid "Could not move back to $head_name" -msgstr "" +msgstr "Impossible de revenir à $head_name" #: git-rebase.sh:359 #, sh-format @@ -9216,88 +9356,96 @@ msgid "" "and run me again. I am stopping in case you still have something\n" "valuable there." msgstr "" +"Il semble qu'il y ait déjà un répertoire $state_dir_base, et je me demande\n" +"si vous n'êtes pas au milieu d'un autre rebasage. Si c'est le cas,\n" +"merci d'essayer\n" +"\t$cmd_live_rebase\n" +"Si ça n'est pas le cas, merci de\n" +"\t$cmd_clear_stale_rebase\n" +"et relancer à nouveau. Je m'arrête au cas où vous auriez quelque chose\n" +"d'important ici." #: git-rebase.sh:404 #, sh-format msgid "invalid upstream $upstream_name" -msgstr "" +msgstr "invalide $upstream_name en amont" #: git-rebase.sh:428 #, sh-format msgid "$onto_name: there are more than one merge bases" -msgstr "" +msgstr "$onto_name : il y a plus d'une base de fusion" #: git-rebase.sh:431 git-rebase.sh:435 #, sh-format msgid "$onto_name: there is no merge base" -msgstr "" +msgstr "$onto_name : il n'y a pas de base de fusion" #: git-rebase.sh:440 #, sh-format msgid "Does not point to a valid commit: $onto_name" -msgstr "" +msgstr "Ne pointe pas sur une validation valide : $onto_name" #: git-rebase.sh:463 #, sh-format msgid "fatal: no such branch: $branch_name" -msgstr "" +msgstr "fatal : pas de branche : $branch_name" #: git-rebase.sh:483 msgid "Please commit or stash them." -msgstr "" +msgstr "Merci de les valider ou de les remiser." #: git-rebase.sh:501 #, sh-format msgid "Current branch $branch_name is up to date." -msgstr "" +msgstr "La branche courante $branch_name est à jour." #: git-rebase.sh:504 #, sh-format msgid "Current branch $branch_name is up to date, rebase forced." -msgstr "" +msgstr "La branche courante $branch_name est à jour, rebasage forcé." #: git-rebase.sh:515 #, sh-format msgid "Changes from $mb to $onto:" -msgstr "" +msgstr "Changements de $mb sur $onto :" #. Detach HEAD and reset the tree #: git-rebase.sh:524 msgid "First, rewinding head to replay your work on top of it..." -msgstr "" +msgstr "Premièrement, retour de head pour rejouer votre travail par-dessus..." #: git-rebase.sh:532 #, sh-format msgid "Fast-forwarded $branch_name to $onto_name." -msgstr "" +msgstr "$branch_name mise à jour en avance rapide sur $onto_name." #: git-stash.sh:51 msgid "git stash clear with parameters is unimplemented" -msgstr "" +msgstr "git stash clear avec des paramètres n'est pas implémenté" #: git-stash.sh:74 msgid "You do not have the initial commit yet" -msgstr "" +msgstr "Vous n'avez pas encore la validation initiale" #: git-stash.sh:89 msgid "Cannot save the current index state" -msgstr "" +msgstr "Impossible de sauver l'état courant de l'index" #: git-stash.sh:123 git-stash.sh:136 msgid "Cannot save the current worktree state" -msgstr "" +msgstr "Impossible de sauver l'état courant de la copie de travail" #: git-stash.sh:140 msgid "No changes selected" -msgstr "" +msgstr "Aucun changement sélectionné" #: git-stash.sh:143 msgid "Cannot remove temporary index (can't happen)" -msgstr "" +msgstr "Impossible de supprimer l'index temporaire (ne peut pas se produire)" #: git-stash.sh:156 msgid "Cannot record working tree state" -msgstr "" +msgstr "Impossible d'enregistrer l'état de la copie de travail" #. TRANSLATORS: $option is an invalid option, like #. `--blah-blah'. The 7 spaces at the beginning of the @@ -9315,41 +9463,43 @@ msgid "" "error: unknown option for 'stash save': $option\n" " To provide a message, use git stash save -- '$option'" msgstr "" +"erreur: option inconnue pour 'stash save': $option\n" +" Pour fournir un message, utilisez git stash save -- '$option'" #: git-stash.sh:223 msgid "No local changes to save" -msgstr "" +msgstr "Pas de changements en local à sauver" #: git-stash.sh:227 msgid "Cannot initialize stash" -msgstr "" +msgstr "Impossible d'initialiser le remisage" #: git-stash.sh:235 msgid "Cannot save the current status" -msgstr "" +msgstr "Impossible de sauver le statut courant" #: git-stash.sh:253 msgid "Cannot remove worktree changes" -msgstr "" +msgstr "Impossible de supprimer les changements de la copie de travail" #: git-stash.sh:352 msgid "No stash found." -msgstr "" +msgstr "Pas de remisage trouvé." #: git-stash.sh:359 #, sh-format msgid "Too many revisions specified: $REV" -msgstr "" +msgstr "Trop de révisions spécifiées : $REV" #: git-stash.sh:365 #, sh-format msgid "$reference is not valid reference" -msgstr "" +msgstr "$reference n'est pas une référence valide" #: git-stash.sh:393 #, sh-format msgid "'$args' is not a stash-like commit" -msgstr "'$args' n'est pas un commit de type remisage" +msgstr "'$args' n'est pas une validation de type remisage" #: git-stash.sh:404 #, sh-format @@ -9358,23 +9508,23 @@ msgstr "'$args' n'est pas une référence de remisage" #: git-stash.sh:412 msgid "unable to refresh index" -msgstr "" +msgstr "impossible de rafraîchir l'index" #: git-stash.sh:416 msgid "Cannot apply a stash in the middle of a merge" -msgstr "" +msgstr "Impossible d'appliquer un remisage au milieu d'une fusion" #: git-stash.sh:424 msgid "Conflicts in index. Try without --index." -msgstr "" +msgstr "Conflits dans l'index. Essayez sans --index." #: git-stash.sh:426 msgid "Could not save index tree" -msgstr "" +msgstr "Impossible de sauver l'arbre d'index" #: git-stash.sh:460 msgid "Cannot unstage modified files" -msgstr "" +msgstr "Impossible de désindexer les fichiers modifiés" #: git-stash.sh:475 msgid "Index was not unstashed." @@ -9383,50 +9533,50 @@ msgstr "" #: git-stash.sh:492 #, sh-format msgid "Dropped ${REV} ($s)" -msgstr "" +msgstr "${REV} supprimé ($s)" #: git-stash.sh:493 #, sh-format msgid "${REV}: Could not drop stash entry" -msgstr "" +msgstr "${REV}: Impossible de supprimer l'entrée de stash" #: git-stash.sh:500 msgid "No branch name specified" -msgstr "" +msgstr "Aucune branche spécifiée" #: git-stash.sh:571 msgid "(To restore them type \"git stash apply\")" -msgstr "" +msgstr "(Pour les restaurer tapez \"git stash apply\")" #: git-submodule.sh:91 #, sh-format msgid "cannot strip one component off url '$remoteurl'" -msgstr "" +msgstr "impossible de supprimer un composant de l'URL '$remoteurl'" #: git-submodule.sh:196 #, sh-format msgid "No submodule mapping found in .gitmodules for path '$sm_path'" -msgstr "" +msgstr "Pas de mappage du sous-module trouvé dans .gitmodules pour le chemin '$sm_path'" #: git-submodule.sh:239 #, sh-format msgid "Clone of '$url' into submodule path '$sm_path' failed" -msgstr "" +msgstr "Le clonage de '$url' dans le chemin de sous-module '$sm_path' a échoué" #: git-submodule.sh:251 #, sh-format msgid "Gitdir '$a' is part of the submodule path '$b' or vice versa" -msgstr "" +msgstr "Le répertoire Git '$a' fait partie du chemin de sous-module '$b' ou vice-versa" #: git-submodule.sh:349 #, sh-format msgid "repo URL: '$repo' must be absolute or begin with ./|../" -msgstr "" +msgstr "L'URL de dépôt '$repo' doit être absolu ou commencer par ./|../" #: git-submodule.sh:366 #, sh-format msgid "'$sm_path' already exists in the index" -msgstr "" +msgstr "'$sm_path' existe déjà dans l'index" #: git-submodule.sh:370 #, sh-format @@ -9435,11 +9585,14 @@ msgid "" "$sm_path\n" "Use -f if you really want to add it." msgstr "" +"Le chemin suivant est ignoré par un de vos fichiers .gitignore :\n" +"$sm_path\n" +"Utilisez -f si vous voulez vraiment l'ajouter." #: git-submodule.sh:388 #, sh-format msgid "Adding existing repo at '$sm_path' to the index" -msgstr "" +msgstr "Ajout du dépôt existant à '$sm_path' dans l'index" #: git-submodule.sh:390 #, sh-format @@ -9449,119 +9602,119 @@ msgstr "'$sm_path' existe déjà et n'est pas un dépôt git valide" #: git-submodule.sh:398 #, sh-format msgid "A git directory for '$sm_name' is found locally with remote(s):" -msgstr "" +msgstr "Un répertoire git pour '$sm_name' est trouvé en local avec le(s) serveur(s) distant(s) :" #: git-submodule.sh:400 #, sh-format msgid "" "If you want to reuse this local git directory instead of cloning again from" -msgstr "" +msgstr "Si vous voulez réutiliser ce répertoire git local au lieu de cloner à nouveau depuis" #: git-submodule.sh:402 #, sh-format msgid "" "use the '--force' option. If the local git directory is not the correct repo" -msgstr "" +msgstr "utilisez l'option '--force'. Si le répertoire local git n'est pas le dépôt correct" #: git-submodule.sh:403 #, sh-format msgid "" "or you are unsure what this means choose another name with the '--name' " "option." -msgstr "" +msgstr "ou vous ne savez pas ce que cela signifie de choisir un autre nom avec l'option '--name'." #: git-submodule.sh:405 #, sh-format msgid "Reactivating local git directory for submodule '$sm_name'." -msgstr "" +msgstr "Réactivation du répertoire git local pour le sous-module '$sm_name'." #: git-submodule.sh:417 #, sh-format msgid "Unable to checkout submodule '$sm_path'" -msgstr "" +msgstr "Impossible d'extraire le sous-module '$sm_path'" #: git-submodule.sh:422 #, sh-format msgid "Failed to add submodule '$sm_path'" -msgstr "" +msgstr "Échec d'ajout du sous-module '$sm_path'" #: git-submodule.sh:431 #, sh-format msgid "Failed to register submodule '$sm_path'" -msgstr "" +msgstr "Échec d'enregistrement du sous-module '$sm_path'" #: git-submodule.sh:474 #, sh-format msgid "Entering '$prefix$sm_path'" -msgstr "" +msgstr "Entrée dans '$prefix$sm_path'" #: git-submodule.sh:488 #, sh-format msgid "Stopping at '$sm_path'; script returned non-zero status." -msgstr "" +msgstr "Arrêt sur '$sm_path' ; le script a retourné un statut non nul." #: git-submodule.sh:532 #, sh-format msgid "No url found for submodule path '$sm_path' in .gitmodules" -msgstr "" +msgstr "URL non trouvé pour le chemin de sous-module '$sm_path' dans .gitmodules" #: git-submodule.sh:541 #, sh-format msgid "Failed to register url for submodule path '$sm_path'" -msgstr "" +msgstr "Échec d'enregistrement de l'URL pour le chemin de sous-module '$sm_path'" #: git-submodule.sh:543 #, sh-format msgid "Submodule '$name' ($url) registered for path '$sm_path'" -msgstr "" +msgstr "Sous-module '$name' ($url) enregistré pour le chemin '$sm_path'" #: git-submodule.sh:551 #, sh-format msgid "Failed to register update mode for submodule path '$sm_path'" -msgstr "" +msgstr "Échec d'enregistrement du mode de mise à jour pour le chemin de sous-module '$sm_path'" #: git-submodule.sh:588 #, sh-format msgid "Use '.' if you really want to deinitialize all submodules" -msgstr "" +msgstr "Utilisez '.' si vous voulez vraiment réinitialiser tous les sous-modules" #: git-submodule.sh:603 #, sh-format msgid "Submodule work tree '$sm_path' contains a .git directory" -msgstr "" +msgstr "La copie de travail du sous-module '$sm_path' contient un répertoire .git" #: git-submodule.sh:604 #, sh-format msgid "" "(use 'rm -rf' if you really want to remove it including all of its history)" -msgstr "" +msgstr "(utilisez 'rm -rf' si vous voulez vraiment le supprimer en incluant tout son historique)" #: git-submodule.sh:610 #, sh-format msgid "" "Submodule work tree '$sm_path' contains local modifications; use '-f' to " "discard them" -msgstr "" +msgstr "La copie de travail du sous-module '$sm_path' contient des modifications locales; utilisez '-f' pour les annuler" #: git-submodule.sh:613 #, sh-format msgid "Cleared directory '$sm_path'" -msgstr "" +msgstr "Répertoire '$sm_path' nettoyé" #: git-submodule.sh:614 #, sh-format msgid "Could not remove submodule work tree '$sm_path'" -msgstr "" +msgstr "Impossible de supprimer la copie de travail du sous-module '$sm_path'" #: git-submodule.sh:617 #, sh-format msgid "Could not create empty submodule directory '$sm_path'" -msgstr "" +msgstr "Impossible de créer le répertoire vide du sous-module '$sm_path'" #: git-submodule.sh:626 #, sh-format msgid "Submodule '$name' ($url) unregistered for path '$sm_path'" -msgstr "" +msgstr "Le sous-module '$name' ($url) n'est pas enregistré pour le chemin '$sm_path'" #: git-submodule.sh:731 #, sh-format @@ -9569,100 +9722,102 @@ msgid "" "Submodule path '$prefix$sm_path' not initialized\n" "Maybe you want to use 'update --init'?" msgstr "" +"Chemin de sous-module '$prefix$sm_path' non initialisé\n" +"Peut-être souhaitez-vous utiliser 'update --init' ?" #: git-submodule.sh:744 #, sh-format msgid "Unable to find current revision in submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Impossible de trouver la révision courante dans le chemin de sous-module '$prefix$sm_path'" #: git-submodule.sh:753 #, sh-format msgid "Unable to fetch in submodule path '$sm_path'" -msgstr "" +msgstr "Impossible de rapatrier dans le chemin de sous-module '$sm_path'" #: git-submodule.sh:777 #, sh-format msgid "Unable to fetch in submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Impossible de rapatrier dans le chemin de sous-module '$prefix$sm_path'" #: git-submodule.sh:791 #, sh-format msgid "Unable to rebase '$sha1' in submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Impossible de rebaser '$sha1' dans le chemin de sous-module '$prefix$sm_path'" #: git-submodule.sh:792 #, sh-format msgid "Submodule path '$prefix$sm_path': rebased into '$sha1'" -msgstr "" +msgstr "Chemin de sous-module '$prefix$sm_path' : rebasé dans '$sha1'" #: git-submodule.sh:797 #, sh-format msgid "Unable to merge '$sha1' in submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Impossible de fusionner '$sha1' dans le chemin de sous-module '$prefix$sm_path'" #: git-submodule.sh:798 #, sh-format msgid "Submodule path '$prefix$sm_path': merged in '$sha1'" -msgstr "" +msgstr "Chemin de sous-module '$prefix$sm_path' : fusionné dans '$sha1'" #: git-submodule.sh:803 #, sh-format msgid "Unable to checkout '$sha1' in submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Impossible d'extraire '$sha1' dans le chemin de sous-module '$prefix$sm_path'" #: git-submodule.sh:804 #, sh-format msgid "Submodule path '$prefix$sm_path': checked out '$sha1'" -msgstr "" +msgstr "Chemin de sous-module '$prefix$sm_path' : '$sha1' extrait" #: git-submodule.sh:831 #, sh-format msgid "Failed to recurse into submodule path '$prefix$sm_path'" -msgstr "" +msgstr "Échec de parcours dans le chemin du sous-module '$prefix$sm_path'" #: git-submodule.sh:939 msgid "The --cached option cannot be used with the --files option" -msgstr "" +msgstr "L'option --cached ne peut pas être utilisée avec l'option --files" #. unexpected type #: git-submodule.sh:979 #, sh-format msgid "unexpected mode $mod_dst" -msgstr "" +msgstr "mode $mod_dst inattendu" #: git-submodule.sh:997 #, sh-format msgid " Warn: $name doesn't contain commit $sha1_src" -msgstr "" +msgstr " Attention : $name ne contient pas la validation $sha1_src" #: git-submodule.sh:1000 #, sh-format msgid " Warn: $name doesn't contain commit $sha1_dst" -msgstr "" +msgstr " Attention : $name ne contient pas la validation $sha1_dst" #: git-submodule.sh:1003 #, sh-format msgid " Warn: $name doesn't contain commits $sha1_src and $sha1_dst" -msgstr "" +msgstr " Attention : $name ne contient pas les validations $sha1_src et $sha1_dst" #: git-submodule.sh:1028 msgid "blob" -msgstr "" +msgstr "blob" #: git-submodule.sh:1066 msgid "Submodules changed but not updated:" -msgstr "" +msgstr "Sous-modules modifiés mais non mis à jour :" #: git-submodule.sh:1068 msgid "Submodule changes to be committed:" -msgstr "" +msgstr "Changements du sous-module à valider :" #: git-submodule.sh:1153 #, sh-format msgid "Failed to recurse into submodule path '$sm_path'" -msgstr "" +msgstr "Échec de parcours dans le chemin du sous-module '$sm_path'" #: git-submodule.sh:1216 #, sh-format msgid "Synchronizing submodule url for '$prefix$sm_path'" -msgstr "" +msgstr "Synchronisation de l'URL sous-module pour '$prefix$sm_path'" @@ -432,7 +432,7 @@ void pp_user_info(struct pretty_print_context *pp, map_user(pp->mailmap, &mailbuf, &maillen, &namebuf, &namelen); if (pp->fmt == CMIT_FMT_EMAIL) { - if (pp->from_ident) { + if (pp->from_ident && ident_cmp(pp->from_ident, &ident)) { struct strbuf buf = STRBUF_INIT; strbuf_addstr(&buf, "From: "); diff --git a/remote-curl.c b/remote-curl.c index 5b3ce9eed2..ef1684b9df 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -8,9 +8,11 @@ #include "pkt-line.h" #include "sideband.h" #include "argv-array.h" +#include "credential.h" static struct remote *remote; -static const char *url; /* always ends with a trailing slash */ +/* always ends with a trailing slash */ +static struct strbuf url = STRBUF_INIT; struct options { int verbosity; @@ -111,7 +113,8 @@ static struct ref *parse_info_refs(struct discovery *heads) mid = &data[i]; if (data[i] == '\n') { if (mid - start != 40) - die("%sinfo/refs not valid: is this a git repository?", url); + die("%sinfo/refs not valid: is this a git repository?", + url.buf); data[i] = 0; ref_name = mid + 1; ref = xmalloc(sizeof(struct ref) + @@ -130,7 +133,7 @@ static struct ref *parse_info_refs(struct discovery *heads) } ref = alloc_ref("HEAD"); - if (!http_fetch_ref(url, ref) && + if (!http_fetch_ref(url.buf, ref) && !resolve_remote_symref(ref, refs)) { ref->next = refs; refs = ref; @@ -184,40 +187,47 @@ static struct discovery* discover_refs(const char *service, int for_push) struct strbuf exp = STRBUF_INIT; struct strbuf type = STRBUF_INIT; struct strbuf buffer = STRBUF_INIT; + struct strbuf refs_url = STRBUF_INIT; + struct strbuf effective_url = STRBUF_INIT; struct discovery *last = last_discovery; - char *refs_url; int http_ret, maybe_smart = 0; + struct http_get_options options; if (last && !strcmp(service, last->service)) return last; free_discovery(last); - strbuf_addf(&buffer, "%sinfo/refs", url); - if ((!prefixcmp(url, "http://") || !prefixcmp(url, "https://")) && + strbuf_addf(&refs_url, "%sinfo/refs", url.buf); + if ((!prefixcmp(url.buf, "http://") || !prefixcmp(url.buf, "https://")) && git_env_bool("GIT_SMART_HTTP", 1)) { maybe_smart = 1; - if (!strchr(url, '?')) - strbuf_addch(&buffer, '?'); + if (!strchr(url.buf, '?')) + strbuf_addch(&refs_url, '?'); else - strbuf_addch(&buffer, '&'); - strbuf_addf(&buffer, "service=%s", service); + strbuf_addch(&refs_url, '&'); + strbuf_addf(&refs_url, "service=%s", service); } - refs_url = strbuf_detach(&buffer, NULL); - http_ret = http_get_strbuf(refs_url, &type, &buffer, - HTTP_NO_CACHE | HTTP_KEEP_ERROR); + memset(&options, 0, sizeof(options)); + options.content_type = &type; + options.effective_url = &effective_url; + options.base_url = &url; + options.no_cache = 1; + options.keep_error = 1; + + http_ret = http_get_strbuf(refs_url.buf, &buffer, &options); switch (http_ret) { case HTTP_OK: break; case HTTP_MISSING_TARGET: show_http_message(&type, &buffer); - die("repository '%s' not found", url); + die("repository '%s' not found", url.buf); case HTTP_NOAUTH: show_http_message(&type, &buffer); - die("Authentication failed for '%s'", url); + die("Authentication failed for '%s'", url.buf); default: show_http_message(&type, &buffer); - die("unable to access '%s': %s", url, curl_errorstr); + die("unable to access '%s': %s", url.buf, curl_errorstr); } last= xcalloc(1, sizeof(*last_discovery)); @@ -258,9 +268,10 @@ static struct discovery* discover_refs(const char *service, int for_push) else last->refs = parse_info_refs(last); - free(refs_url); + strbuf_release(&refs_url); strbuf_release(&exp); strbuf_release(&type); + strbuf_release(&effective_url); strbuf_release(&buffer); last_discovery = last; return last; @@ -444,6 +455,8 @@ static int post_rpc(struct rpc_state *rpc) if (large_request) { do { err = probe_rpc(rpc); + if (err == HTTP_REAUTH) + credential_fill(&http_auth); } while (err == HTTP_REAUTH); if (err != HTTP_OK) return -1; @@ -543,8 +556,10 @@ retry: curl_easy_setopt(slot->curl, CURLOPT_FILE, rpc); err = run_slot(slot); - if (err == HTTP_REAUTH && !large_request) + if (err == HTTP_REAUTH && !large_request) { + credential_fill(&http_auth); goto retry; + } if (err != HTTP_OK) err = -1; @@ -579,7 +594,7 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads) rpc->out = client.out; strbuf_init(&rpc->result, 0); - strbuf_addf(&buf, "%s%s", url, svc); + strbuf_addf(&buf, "%s%s", url.buf, svc); rpc->service_url = strbuf_detach(&buf, NULL); strbuf_addf(&buf, "Content-Type: application/x-%s-request", svc); @@ -631,7 +646,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch) for (i = 0; i < nr_heads; i++) targets[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1)); - walker = get_http_walker(url); + walker = get_http_walker(url.buf); walker->get_all = 1; walker->get_tree = 1; walker->get_history = 1; @@ -676,7 +691,7 @@ static int fetch_git(struct discovery *heads, depth_arg = strbuf_detach(&buf, NULL); argv[argc++] = depth_arg; } - argv[argc++] = url; + argv[argc++] = url.buf; argv[argc++] = NULL; for (i = 0; i < nr_heads; i++) { @@ -774,7 +789,7 @@ static int push_dav(int nr_spec, char **specs) argv[argc++] = "--dry-run"; if (options.verbosity > 1) argv[argc++] = "--verbose"; - argv[argc++] = url; + argv[argc++] = url.buf; for (i = 0; i < nr_spec; i++) argv[argc++] = specs[i]; argv[argc++] = NULL; @@ -804,7 +819,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) else if (options.verbosity > 1) argv_array_push(&args, "--verbose"); argv_array_push(&args, options.progress ? "--progress" : "--no-progress"); - argv_array_push(&args, url); + argv_array_push(&args, url.buf); for (i = 0; i < nr_spec; i++) argv_array_push(&args, specs[i]); @@ -885,14 +900,12 @@ int main(int argc, const char **argv) remote = remote_get(argv[1]); if (argc > 2) { - end_url_with_slash(&buf, argv[2]); + end_url_with_slash(&url, argv[2]); } else { - end_url_with_slash(&buf, remote->url[0]); + end_url_with_slash(&url, remote->url[0]); } - url = strbuf_detach(&buf, NULL); - - http_init(remote, url, 0); + http_init(remote, url.buf, 0); do { if (strbuf_getline(&buf, stdin, '\n') == EOF) { diff --git a/revision.c b/revision.c index 84ccc0529b..f82b833fbc 100644 --- a/revision.c +++ b/revision.c @@ -15,6 +15,7 @@ #include "string-list.h" #include "line-log.h" #include "mailmap.h" +#include "commit-slab.h" volatile show_early_output_fn_t show_early_output; @@ -1419,26 +1420,40 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi } if (!get_sha1_committish(this, from_sha1) && !get_sha1_committish(next, sha1)) { - struct commit *a, *b; - struct commit_list *exclude; - - a = lookup_commit_reference(from_sha1); - b = lookup_commit_reference(sha1); - if (!a || !b) { - if (revs->ignore_missing) - return 0; - die(symmetric ? - "Invalid symmetric difference expression %s...%s" : - "Invalid revision range %s..%s", - arg, next); - } + struct object *a_obj, *b_obj; if (!cant_be_filename) { *dotdot = '.'; verify_non_filename(revs->prefix, arg); } - if (symmetric) { + a_obj = parse_object(from_sha1); + b_obj = parse_object(sha1); + if (!a_obj || !b_obj) { + missing: + if (revs->ignore_missing) + return 0; + die(symmetric + ? "Invalid symmetric difference expression %s" + : "Invalid revision range %s", arg); + } + + if (!symmetric) { + /* just A..B */ + a_flags = flags_exclude; + } else { + /* A...B -- find merge bases between the two */ + struct commit *a, *b; + struct commit_list *exclude; + + a = (a_obj->type == OBJ_COMMIT + ? (struct commit *)a_obj + : lookup_commit_reference(a_obj->sha1)); + b = (b_obj->type == OBJ_COMMIT + ? (struct commit *)b_obj + : lookup_commit_reference(b_obj->sha1)); + if (!a || !b) + goto missing; exclude = get_merge_bases(a, b, 1); add_rev_cmdline_list(revs, exclude, REV_CMD_MERGE_BASE, @@ -1446,17 +1461,18 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi add_pending_commit_list(revs, exclude, flags_exclude); free_commit_list(exclude); + a_flags = flags | SYMMETRIC_LEFT; - } else - a_flags = flags_exclude; - a->object.flags |= a_flags; - b->object.flags |= flags; - add_rev_cmdline(revs, &a->object, this, + } + + a_obj->flags |= a_flags; + b_obj->flags |= flags; + add_rev_cmdline(revs, a_obj, this, REV_CMD_LEFT, a_flags); - add_rev_cmdline(revs, &b->object, next, + add_rev_cmdline(revs, b_obj, next, REV_CMD_RIGHT, flags); - add_pending_object(revs, &a->object, this); - add_pending_object(revs, &b->object, next); + add_pending_object(revs, a_obj, this); + add_pending_object(revs, b_obj, next); return 0; } *dotdot = '.'; @@ -2763,7 +2779,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt) return retval; } -static inline int want_ancestry(struct rev_info *revs) +static inline int want_ancestry(const struct rev_info *revs) { return (revs->rewrite_parents || revs->children.name); } @@ -2820,6 +2836,14 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) if (action == commit_show && !revs->show_all && revs->prune && revs->dense && want_ancestry(revs)) { + /* + * --full-diff on simplified parents is no good: it + * will show spurious changes from the commits that + * were elided. So we save the parents on the side + * when --full-diff is in effect. + */ + if (revs->full_diff) + save_parents(revs, commit); if (rewrite_parents(revs, commit, rewrite_one) < 0) return commit_error; } @@ -2839,6 +2863,7 @@ static struct commit *get_revision_1(struct rev_info *revs) free(entry); if (revs->reflog_info) { + save_parents(revs, commit); fake_reflog_parent(revs->reflog_info, commit); commit->object.flags &= ~(ADDED | SEEN | SHOWN); } @@ -3038,6 +3063,8 @@ struct commit *get_revision(struct rev_info *revs) c = get_revision_internal(revs); if (c && revs->graph) graph_update(revs->graph, c); + if (!c) + free_saved_parents(revs); return c; } @@ -3069,3 +3096,54 @@ void put_revision_mark(const struct rev_info *revs, const struct commit *commit) fputs(mark, stdout); putchar(' '); } + +define_commit_slab(saved_parents, struct commit_list *); + +#define EMPTY_PARENT_LIST ((struct commit_list *)-1) + +void save_parents(struct rev_info *revs, struct commit *commit) +{ + struct commit_list **pp; + + if (!revs->saved_parents_slab) { + revs->saved_parents_slab = xmalloc(sizeof(struct saved_parents)); + init_saved_parents(revs->saved_parents_slab); + } + + pp = saved_parents_at(revs->saved_parents_slab, commit); + + /* + * When walking with reflogs, we may visit the same commit + * several times: once for each appearance in the reflog. + * + * In this case, save_parents() will be called multiple times. + * We want to keep only the first set of parents. We need to + * store a sentinel value for an empty (i.e., NULL) parent + * list to distinguish it from a not-yet-saved list, however. + */ + if (*pp) + return; + if (commit->parents) + *pp = copy_commit_list(commit->parents); + else + *pp = EMPTY_PARENT_LIST; +} + +struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit) +{ + struct commit_list *parents; + + if (!revs->saved_parents_slab) + return commit->parents; + + parents = *saved_parents_at(revs->saved_parents_slab, commit); + if (parents == EMPTY_PARENT_LIST) + return NULL; + return parents; +} + +void free_saved_parents(struct rev_info *revs) +{ + if (revs->saved_parents_slab) + clear_saved_parents(revs->saved_parents_slab); +} diff --git a/revision.h b/revision.h index 95859ba119..e7f1d211bf 100644 --- a/revision.h +++ b/revision.h @@ -25,6 +25,7 @@ struct rev_info; struct log_info; struct string_list; +struct saved_parents; struct rev_cmdline_info { unsigned int nr; @@ -187,6 +188,9 @@ struct rev_info { /* line level range that we are chasing */ struct decoration line_log_data; + + /* copies of the parent lists, for --full-diff display */ + struct saved_parents *saved_parents_slab; }; #define REV_TREE_SAME 0 @@ -273,4 +277,20 @@ typedef enum rewrite_result (*rewrite_parent_fn_t)(struct rev_info *revs, struct extern int rewrite_parents(struct rev_info *revs, struct commit *commit, rewrite_parent_fn_t rewrite_parent); + +/* + * Save a copy of the parent list, and return the saved copy. This is + * used by the log machinery to retrieve the original parents when + * commit->parents has been modified by history simpification. + * + * You may only call save_parents() once per commit (this is checked + * for non-root commits). + * + * get_saved_parents() will transparently return commit->parents if + * history simplification is off. + */ +extern void save_parents(struct rev_info *revs, struct commit *commit); +extern struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit); +extern void free_saved_parents(struct rev_info *revs); + #endif diff --git a/sha1_file.c b/sha1_file.c index 8e27db1bd2..613839db54 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2444,7 +2444,6 @@ static int sha1_loose_object_info(const unsigned char *sha1, return 0; } -/* returns enum object_type or negative */ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi) { struct cached_object *co; @@ -2493,6 +2492,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi) return 0; } +/* returns enum object_type or negative */ int sha1_object_info(const unsigned char *sha1, unsigned long *sizep) { enum object_type type; @@ -2925,7 +2925,10 @@ int has_sha1_file(const unsigned char *sha1) if (find_pack_entry(sha1, &e)) return 1; - return has_loose_object(sha1); + if (has_loose_object(sha1)) + return 1; + reprepare_packed_git(); + return find_pack_entry(sha1, &e); } static void check_tree(const void *buf, size_t size) @@ -1,6 +1,7 @@ #include "cache.h" #include "commit.h" #include "tag.h" +#include "pkt-line.h" static int is_shallow = -1; static struct stat shallow_stat; @@ -141,3 +142,81 @@ void check_shallow_file_for_update(void) ) die("shallow file was changed during fetch"); } + +struct write_shallow_data { + struct strbuf *out; + int use_pack_protocol; + int count; +}; + +static int write_one_shallow(const struct commit_graft *graft, void *cb_data) +{ + struct write_shallow_data *data = cb_data; + const char *hex = sha1_to_hex(graft->sha1); + if (graft->nr_parent != -1) + return 0; + data->count++; + if (data->use_pack_protocol) + packet_buf_write(data->out, "shallow %s", hex); + else { + strbuf_addstr(data->out, hex); + strbuf_addch(data->out, '\n'); + } + return 0; +} + +int write_shallow_commits(struct strbuf *out, int use_pack_protocol) +{ + struct write_shallow_data data; + data.out = out; + data.use_pack_protocol = use_pack_protocol; + data.count = 0; + for_each_commit_graft(write_one_shallow, &data); + return data.count; +} + +char *setup_temporary_shallow(void) +{ + struct strbuf sb = STRBUF_INIT; + int fd; + + if (write_shallow_commits(&sb, 0)) { + struct strbuf path = STRBUF_INIT; + strbuf_addstr(&path, git_path("shallow_XXXXXX")); + fd = xmkstemp(path.buf); + if (write_in_full(fd, sb.buf, sb.len) != sb.len) + die_errno("failed to write to %s", + path.buf); + close(fd); + strbuf_release(&sb); + return strbuf_detach(&path, NULL); + } + /* + * is_repository_shallow() sees empty string as "no shallow + * file". + */ + return xstrdup(""); +} + +void setup_alternate_shallow(struct lock_file *shallow_lock, + const char **alternate_shallow_file) +{ + struct strbuf sb = STRBUF_INIT; + int fd; + + check_shallow_file_for_update(); + fd = hold_lock_file_for_update(shallow_lock, git_path("shallow"), + LOCK_DIE_ON_ERROR); + if (write_shallow_commits(&sb, 0)) { + if (write_in_full(fd, sb.buf, sb.len) != sb.len) + die_errno("failed to write to %s", + shallow_lock->filename); + *alternate_shallow_file = shallow_lock->filename; + } else + /* + * is_repository_shallow() sees empty string as "no + * shallow file". + */ + *alternate_shallow_file = ""; + strbuf_release(&sb); +} diff --git a/submodule.c b/submodule.c index 3f0a3f9419..c0f93c208c 100644 --- a/submodule.c +++ b/submodule.c @@ -134,6 +134,9 @@ int parse_submodule_config_option(const char *var, const char *value) return 0; if (!strcmp(key, "path")) { + if (!value) + return config_error_nonbool(var); + config = unsorted_string_list_lookup(&config_name_for_path, value); if (config) free(config->util); @@ -151,6 +154,9 @@ int parse_submodule_config_option(const char *var, const char *value) } else if (!strcmp(key, "ignore")) { char *name_cstr; + if (!value) + return config_error_nonbool(var); + if (strcmp(value, "untracked") && strcmp(value, "dirty") && strcmp(value, "all") && strcmp(value, "none")) { warning("Invalid parameter \"%s\" for config option \"submodule.%s.ignore\"", value, var); diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index 895b9258b0..7059cc6c21 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -187,7 +187,8 @@ set_askpass() { } expect_askpass() { - dest=$HTTPD_DEST + dest=$HTTPD_DEST${3+/$3} + { case "$1" in none) diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index dd17e3a09d..4a261f13f5 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -102,6 +102,8 @@ ScriptAlias /broken_smart/ broken-smart-http.sh/ RewriteEngine on RewriteRule ^/smart-redir-perm/(.*)$ /smart/$1 [R=301] RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302] +RewriteRule ^/smart-redir-auth/(.*)$ /auth/smart/$1 [R=301] +RewriteRule ^/smart-redir-limited/(.*)/info/refs$ /smart/$1/info/refs [R=301] <IfDefine SSL> LoadModule ssl_module modules/mod_ssl.so diff --git a/t/t0001-init.sh b/t/t0001-init.sh index ad66410564..9fb582b192 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -379,6 +379,10 @@ test_expect_success 'init with separate gitdir' ' test -d realgitdir/refs ' +test_expect_success 're-init on .git file' ' + ( cd newdir && git init ) +' + test_expect_success 're-init to update git link' ' ( cd newdir && diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index e50f0f742f..b92e6cb046 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -190,4 +190,18 @@ test_expect_success 'required filter clean failure' ' test_must_fail git add test.fc ' +test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE + +test_expect_success EXPENSIVE 'filter large file' ' + git config filter.largefile.smudge cat && + git config filter.largefile.clean cat && + for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB && + echo "2GB filter=largefile" >.gitattributes && + git add 2GB 2>err && + ! test -s err && + rm -f 2GB && + git checkout -- 2GB 2>err && + ! test -s err +' + test_done diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh index 9a105fe21f..6f47c0dd0e 100755 --- a/t/t1411-reflog-show.sh +++ b/t/t1411-reflog-show.sh @@ -144,4 +144,26 @@ test_expect_success 'empty reflog file' ' test_cmp expect actual ' +# This guards against the alternative of showing the diffs vs. the +# reflog ancestor. The reflog used is designed to list the commits +# more than once, so as to exercise the corresponding logic. +test_expect_success 'git log -g -p shows diffs vs. parents' ' + test_commit two && + git branch flipflop && + git update-ref refs/heads/flipflop -m flip1 HEAD^ && + git update-ref refs/heads/flipflop -m flop1 HEAD && + git update-ref refs/heads/flipflop -m flip2 HEAD^ && + git log -g -p flipflop >reflog && + grep -v ^Reflog reflog >actual && + git log -1 -p HEAD^ >log.one && + git log -1 -p HEAD >log.two && + ( + cat log.one; echo + cat log.two; echo + cat log.one; echo + cat log.two + ) >expect && + test_cmp expect actual +' + test_done diff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh index 7cc0a3582e..87bdf9c96b 100755 --- a/t/t2010-checkout-ambiguous.sh +++ b/t/t2010-checkout-ambiguous.sh @@ -47,4 +47,10 @@ test_expect_success 'disambiguate checking out from a tree-ish' ' git diff --exit-code --quiet ' +test_expect_success 'accurate error message with more than one ref' ' + test_must_fail git checkout HEAD master -- 2>actual && + grep 2 actual && + test_i18ngrep "one reference expected, 2 given" actual +' + test_done diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh index dee55e428f..6ecb559465 100755 --- a/t/t2024-checkout-dwim.sh +++ b/t/t2024-checkout-dwim.sh @@ -104,7 +104,7 @@ test_expect_success 'setup more remotes with unconventional refspecs' ' cd repo_c && test_commit c_master && git checkout -b bar && - test_commit c_bar + test_commit c_bar && git checkout -b spam && test_commit c_spam ) && @@ -113,9 +113,9 @@ test_expect_success 'setup more remotes with unconventional refspecs' ' cd repo_d && test_commit d_master && git checkout -b baz && - test_commit f_baz + test_commit d_baz && git checkout -b eggs && - test_commit c_eggs + test_commit d_eggs ) && git remote add repo_c repo_c && git config remote.repo_c.fetch \ @@ -164,4 +164,25 @@ test_expect_success 'checkout of branch from a single remote succeeds #4' ' test_branch_upstream eggs repo_d eggs ' +test_expect_success 'checkout of branch with a file having the same name fails' ' + git checkout -B master && + test_might_fail git branch -D spam && + + >spam && + test_must_fail git checkout spam && + test_must_fail git rev-parse --verify refs/heads/spam && + test_branch master +' + +test_expect_success 'checkout <branch> -- succeeds, even if a file with the same name exists' ' + git checkout -B master && + test_might_fail git branch -D spam && + + >spam && + git checkout spam -- && + test_branch spam && + test_cmp_rev refs/remotes/extra_dir/repo_c/extra_dir/spam HEAD && + test_branch_upstream spam repo_c spam +' + test_done diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh index f611d799b6..6d3b828a95 100755 --- a/t/t3010-ls-files-killed-modified.sh +++ b/t/t3010-ls-files-killed-modified.sh @@ -11,6 +11,7 @@ This test prepares the following in the cache: path1 - a symlink path2/file2 - a file in a directory path3/file3 - a file in a directory + pathx/ju - a file in a directory submod1/ - a submodule submod2/ - another submodule @@ -23,6 +24,7 @@ and the following on the filesystem: path4 - a file path5 - a symlink path6/file6 - a file in a directory + pathx/ju/nk - a file in a directory to be killed submod1/ - a submodule (modified from the cache) submod2/ - a submodule (matches the cache) @@ -44,14 +46,15 @@ modified without reporting path9 and path10. submod1 is also modified. test_expect_success 'git update-index --add to add various paths.' ' date >path0 && test_ln_s_add xyzzy path1 && - mkdir path2 path3 && + mkdir path2 path3 pathx && date >path2/file2 && date >path3/file3 && + >pathx/ju && : >path7 && date >path8 && : >path9 && date >path10 && - git update-index --add -- path0 path?/file? path7 path8 path9 path10 && + git update-index --add -- path0 path?/file? pathx/ju path7 path8 path9 path10 && for i in 1 2 do git init submod$i && @@ -77,7 +80,7 @@ test_expect_success 'git ls-files -k to show killed files.' ' date >path3 && date >path5 fi && - mkdir path0 path1 path6 && + mkdir -p path0 path1 path6 pathx/ju && date >path0/file0 && date >path1/file1 && date >path6/file6 && @@ -85,16 +88,23 @@ test_expect_success 'git ls-files -k to show killed files.' ' : >path8 && : >path9 && touch path10 && - git ls-files -k >.output -' - -test_expect_success 'validate git ls-files -k output.' ' - cat >.expected <<-\EOF && + >pathx/ju/nk && + cat >.expected <<-\EOF path0/file0 path1/file1 path2 path3 + pathx/ju/nk EOF +' + +test_expect_success 'git ls-files -k output (w/o icase)' ' + git ls-files -k >.output + test_cmp .expected .output +' + +test_expect_success 'git ls-files -k output (w/ icase)' ' + git -c core.ignorecase=true ls-files -k >.output test_cmp .expected .output ' @@ -110,6 +120,7 @@ test_expect_success 'validate git ls-files -m output.' ' path3/file3 path7 path8 + pathx/ju submod1 EOF test_cmp .expected .output diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 44ec6a45f4..55c9ab0b6a 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -319,8 +319,9 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' ' test_expect_success 'tracking setup fails on non-matching refspec' ' git config remote.local.url . && - git config remote.local.fetch refs/heads/s:refs/remotes/local/s && + git config remote.local.fetch refs/heads/*:refs/remotes/local/* && (git show-ref -q refs/remotes/local/master || git fetch local) && + git config remote.local.fetch refs/heads/s:refs/remotes/local/s && test_must_fail git branch --track my5 local/master && test_must_fail git config branch.my5.remote && test_must_fail git config branch.my5.merge @@ -870,4 +871,39 @@ test_expect_success '--merged catches invalid object names' ' test_must_fail git branch --merged 0000000000000000000000000000000000000000 ' +test_expect_success 'tracking with unexpected .fetch refspec' ' + rm -rf a b c d && + git init a && + ( + cd a && + test_commit a + ) && + git init b && + ( + cd b && + test_commit b + ) && + git init c && + ( + cd c && + test_commit c && + git remote add a ../a && + git remote add b ../b && + git fetch --all + ) && + git init d && + ( + cd d && + git remote add c ../c && + git config remote.c.fetch "+refs/remotes/*:refs/remotes/*" && + git fetch c && + git branch --track local/a/master remotes/a/master && + test "$(git config branch.local/a/master.remote)" = "c" && + test "$(git config branch.local/a/master.merge)" = "refs/remotes/a/master" && + git rev-parse --verify a >expect && + git rev-parse --verify local/a/master >actual && + test_cmp expect actual + ) +' + test_done diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 49ccb38f88..50e22b1cad 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -29,8 +29,6 @@ Initial setup: . "$TEST_DIRECTORY"/lib-rebase.sh -set_fake_editor - # WARNING: Modifications to the initial repository can change the SHA ID used # in the expect2 file for the 'stop on conflicting pick' test. @@ -72,6 +70,7 @@ export SHELL test_expect_success 'rebase -i with the exec command' ' git checkout master && ( + set_fake_editor && FAKE_LINES="1 exec_>touch-one 2 exec_>touch-two exec_false exec_>touch-three 3 4 exec_>\"touch-file__name_with_spaces\";_>touch-after-semicolon 5" && @@ -93,6 +92,7 @@ test_expect_success 'rebase -i with the exec command' ' test_expect_success 'rebase -i with the exec command runs from tree root' ' git checkout master && mkdir subdir && (cd subdir && + set_fake_editor && FAKE_LINES="1 exec_>touch-subdir" \ git rebase -i HEAD^ ) && @@ -103,6 +103,7 @@ test_expect_success 'rebase -i with the exec command runs from tree root' ' test_expect_success 'rebase -i with the exec command checks tree cleanness' ' git checkout master && ( + set_fake_editor && FAKE_LINES="exec_echo_foo_>file1 1" && export FAKE_LINES && test_must_fail git rebase -i HEAD^ @@ -116,6 +117,7 @@ test_expect_success 'rebase -i with exec of inexistent command' ' git checkout master && test_when_finished "git rebase --abort" && ( + set_fake_editor && FAKE_LINES="exec_this-command-does-not-exist 1" && export FAKE_LINES && test_must_fail git rebase -i HEAD^ >actual 2>&1 @@ -125,6 +127,7 @@ test_expect_success 'rebase -i with exec of inexistent command' ' test_expect_success 'no changes are a nop' ' git checkout branch2 && + set_fake_editor && git rebase -i F && test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" && test $(git rev-parse I) = $(git rev-parse HEAD) @@ -134,6 +137,7 @@ test_expect_success 'test the [branch] option' ' git checkout -b dead-end && git rm file6 && git commit -m "stop here" && + set_fake_editor && git rebase -i F branch2 && test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" && test $(git rev-parse I) = $(git rev-parse branch2) && @@ -142,6 +146,7 @@ test_expect_success 'test the [branch] option' ' test_expect_success 'test --onto <branch>' ' git checkout -b test-onto branch2 && + set_fake_editor && git rebase -i --onto branch1 F && test "$(git symbolic-ref -q HEAD)" = "refs/heads/test-onto" && test $(git rev-parse HEAD^) = $(git rev-parse branch1) && @@ -151,6 +156,7 @@ test_expect_success 'test --onto <branch>' ' test_expect_success 'rebase on top of a non-conflicting commit' ' git checkout branch1 && git tag original-branch1 && + set_fake_editor && git rebase -i branch2 && test file6 = $(git diff --name-only original-branch1) && test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch1" && @@ -163,6 +169,7 @@ test_expect_success 'reflog for the branch shows state before rebase' ' ' test_expect_success 'exchange two commits' ' + set_fake_editor && FAKE_LINES="2 1" git rebase -i HEAD~2 && test H = $(git cat-file commit HEAD^ | sed -ne \$p) && test G = $(git cat-file commit HEAD | sed -ne \$p) @@ -188,6 +195,7 @@ EOF test_expect_success 'stop on conflicting pick' ' git tag new-branch1 && + set_fake_editor && test_must_fail git rebase -i master && test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" && test_cmp expect .git/rebase-merge/patch && @@ -208,6 +216,7 @@ test_expect_success 'abort' ' test_expect_success 'abort with error when new base cannot be checked out' ' git rm --cached file1 && git commit -m "remove file in base" && + set_fake_editor && test_must_fail git rebase -i master > output 2>&1 && grep "The following untracked working tree files would be overwritten by checkout:" \ output && @@ -222,6 +231,7 @@ test_expect_success 'retain authorship' ' test_tick && GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" && git tag twerp && + set_fake_editor && git rebase -i --onto master HEAD^ && git show HEAD | grep "^Author: Twerp Snog" ' @@ -232,6 +242,7 @@ test_expect_success 'squash' ' test_tick && GIT_AUTHOR_NAME="Nitfol" git commit -m "nitfol" file7 && echo "******************************" && + set_fake_editor && FAKE_LINES="1 squash 2" EXPECT_HEADER_COUNT=2 \ git rebase -i --onto master HEAD~2 && test B = $(cat file7) && @@ -244,6 +255,7 @@ test_expect_success 'retain authorship when squashing' ' test_expect_success '-p handles "no changes" gracefully' ' HEAD=$(git rev-parse HEAD) && + set_fake_editor && git rebase -i -p HEAD^ && git update-index --refresh && git diff-files --quiet && @@ -253,6 +265,7 @@ test_expect_success '-p handles "no changes" gracefully' ' test_expect_failure 'exchange two commits with -p' ' git checkout H && + set_fake_editor && FAKE_LINES="2 1" git rebase -i -p HEAD~2 && test H = $(git cat-file commit HEAD^ | sed -ne \$p) && test G = $(git cat-file commit HEAD | sed -ne \$p) @@ -287,6 +300,7 @@ test_expect_success 'preserve merges with -p' ' git commit -m M file1 && git checkout -b to-be-rebased && test_tick && + set_fake_editor && git rebase -i -p --onto branch1 master && git update-index --refresh && git diff-files --quiet && @@ -301,6 +315,7 @@ test_expect_success 'preserve merges with -p' ' ' test_expect_success 'edit ancestor with -p' ' + set_fake_editor && FAKE_LINES="1 2 edit 3 4" git rebase -i -p HEAD~3 && echo 2 > unrelated-file && test_tick && @@ -314,6 +329,7 @@ test_expect_success 'edit ancestor with -p' ' test_expect_success '--continue tries to commit' ' test_tick && + set_fake_editor && test_must_fail git rebase -i --onto new-branch1 HEAD^ && echo resolved > file1 && git add file1 && @@ -325,6 +341,7 @@ test_expect_success '--continue tries to commit' ' test_expect_success 'verbose flag is heeded, even after --continue' ' git reset --hard master@{1} && test_tick && + set_fake_editor && test_must_fail git rebase -v -i --onto new-branch1 HEAD^ && echo resolved > file1 && git add file1 && @@ -334,6 +351,7 @@ test_expect_success 'verbose flag is heeded, even after --continue' ' test_expect_success 'multi-squash only fires up editor once' ' base=$(git rev-parse HEAD~4) && + set_fake_editor && FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="1 squash 2 squash 3 squash 4" \ EXPECT_HEADER_COUNT=4 \ git rebase -i $base && @@ -344,6 +362,7 @@ test_expect_success 'multi-squash only fires up editor once' ' test_expect_success 'multi-fixup does not fire up editor' ' git checkout -b multi-fixup E && base=$(git rev-parse HEAD~4) && + set_fake_editor && FAKE_COMMIT_AMEND="NEVER" FAKE_LINES="1 fixup 2 fixup 3 fixup 4" \ git rebase -i $base && test $base = $(git rev-parse HEAD^) && @@ -355,6 +374,7 @@ test_expect_success 'multi-fixup does not fire up editor' ' test_expect_success 'commit message used after conflict' ' git checkout -b conflict-fixup conflict-branch && base=$(git rev-parse HEAD~4) && + set_fake_editor && ( FAKE_LINES="1 fixup 3 fixup 4" && export FAKE_LINES && @@ -373,6 +393,7 @@ test_expect_success 'commit message used after conflict' ' test_expect_success 'commit message retained after conflict' ' git checkout -b conflict-squash conflict-branch && base=$(git rev-parse HEAD~4) && + set_fake_editor && ( FAKE_LINES="1 fixup 3 squash 4" && export FAKE_LINES && @@ -399,6 +420,7 @@ EOF test_expect_success 'squash and fixup generate correct log messages' ' git checkout -b squash-fixup E && base=$(git rev-parse HEAD~4) && + set_fake_editor && FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="1 fixup 2 squash 3 fixup 4" \ EXPECT_HEADER_COUNT=4 \ git rebase -i $base && @@ -411,6 +433,7 @@ test_expect_success 'squash and fixup generate correct log messages' ' test_expect_success 'squash ignores comments' ' git checkout -b skip-comments E && base=$(git rev-parse HEAD~4) && + set_fake_editor && FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="# 1 # squash 2 # squash 3 # squash 4 #" \ EXPECT_HEADER_COUNT=4 \ git rebase -i $base && @@ -423,6 +446,7 @@ test_expect_success 'squash ignores comments' ' test_expect_success 'squash ignores blank lines' ' git checkout -b skip-blank-lines E && base=$(git rev-parse HEAD~4) && + set_fake_editor && FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="> 1 > squash 2 > squash 3 > squash 4 >" \ EXPECT_HEADER_COUNT=4 \ git rebase -i $base && @@ -435,6 +459,7 @@ test_expect_success 'squash ignores blank lines' ' test_expect_success 'squash works as expected' ' git checkout -b squash-works no-conflict-branch && one=$(git rev-parse HEAD~3) && + set_fake_editor && FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=2 \ git rebase -i HEAD~3 && test $one = $(git rev-parse HEAD~2) @@ -443,6 +468,7 @@ test_expect_success 'squash works as expected' ' test_expect_success 'interrupted squash works as expected' ' git checkout -b interrupted-squash conflict-branch && one=$(git rev-parse HEAD~3) && + set_fake_editor && ( FAKE_LINES="1 squash 3 2" && export FAKE_LINES && @@ -460,6 +486,7 @@ test_expect_success 'interrupted squash works as expected' ' test_expect_success 'interrupted squash works as expected (case 2)' ' git checkout -b interrupted-squash2 conflict-branch && one=$(git rev-parse HEAD~3) && + set_fake_editor && ( FAKE_LINES="3 squash 1 2" && export FAKE_LINES && @@ -484,6 +511,7 @@ test_expect_success '--continue tries to commit, even for "edit"' ' git commit -m "unrelated change" && parent=$(git rev-parse HEAD^) && test_tick && + set_fake_editor && FAKE_LINES="edit 1" git rebase -i HEAD^ && echo edited > file7 && git add file7 && @@ -496,6 +524,7 @@ test_expect_success '--continue tries to commit, even for "edit"' ' test_expect_success 'aborted --continue does not squash commits after "edit"' ' old=$(git rev-parse HEAD) && test_tick && + set_fake_editor && FAKE_LINES="edit 1" git rebase -i HEAD^ && echo "edited again" > file7 && git add file7 && @@ -510,6 +539,7 @@ test_expect_success 'aborted --continue does not squash commits after "edit"' ' test_expect_success 'auto-amend only edited commits after "edit"' ' test_tick && + set_fake_editor && FAKE_LINES="edit 1" git rebase -i HEAD^ && echo "edited again" > file7 && git add file7 && @@ -528,6 +558,7 @@ test_expect_success 'auto-amend only edited commits after "edit"' ' test_expect_success 'clean error after failed "exec"' ' test_tick && test_when_finished "git rebase --abort || :" && + set_fake_editor && ( FAKE_LINES="1 exec_false" && export FAKE_LINES && @@ -543,6 +574,7 @@ test_expect_success 'rebase a detached HEAD' ' grandparent=$(git rev-parse HEAD~2) && git checkout $(git rev-parse HEAD) && test_tick && + set_fake_editor && FAKE_LINES="2 1" git rebase -i HEAD~2 && test $grandparent = $(git rev-parse HEAD~2) ' @@ -559,6 +591,7 @@ test_expect_success 'rebase a commit violating pre-commit' ' test_must_fail git commit -m doesnt-verify file1 && git commit -m doesnt-verify --no-verify file1 && test_tick && + set_fake_editor && FAKE_LINES=2 git rebase -i HEAD~2 ' @@ -580,6 +613,7 @@ test_expect_success 'rebase with a file named HEAD in worktree' ' git commit -m "Add body" ) && + set_fake_editor && FAKE_LINES="1 squash 2" git rebase -i to-be-rebased && test "$(git show -s --pretty=format:%an)" = "Squashed Away" @@ -591,6 +625,7 @@ test_expect_success 'do "noop" when there is nothing to cherry-pick' ' GIT_EDITOR=: git commit --amend \ --author="Somebody else <somebody@else.com>" && test $(git rev-parse branch3) != $(git rev-parse branch4) && + set_fake_editor && git rebase -i branch3 && test $(git rev-parse branch3) = $(git rev-parse branch4) @@ -615,10 +650,12 @@ test_expect_success 'submodule rebase setup' ' git commit -a -m "submodule second" ) && test_tick && + set_fake_editor && git commit -a -m "Three changes submodule" ' test_expect_success 'submodule rebase -i' ' + set_fake_editor && FAKE_LINES="1 squash 2 3" git rebase -i A ' @@ -636,6 +673,7 @@ test_expect_success 'submodule conflict setup' ' ' test_expect_success 'rebase -i continue with only submodule staged' ' + set_fake_editor && test_must_fail git rebase -i submodule-base && git add sub && git rebase --continue && @@ -645,6 +683,7 @@ test_expect_success 'rebase -i continue with only submodule staged' ' test_expect_success 'rebase -i continue with unstaged submodule' ' git checkout submodule-topic && git reset --hard && + set_fake_editor && test_must_fail git rebase -i submodule-base && git reset && git rebase --continue && @@ -657,6 +696,7 @@ test_expect_success 'avoid unnecessary reset' ' test-chmtime =123456789 file3 && git update-index --refresh && HEAD=$(git rev-parse HEAD) && + set_fake_editor && git rebase -i HEAD~4 && test $HEAD = $(git rev-parse HEAD) && MTIME=$(test-chmtime -v +0 file3 | sed 's/[^0-9].*$//') && @@ -665,6 +705,7 @@ test_expect_success 'avoid unnecessary reset' ' test_expect_success 'reword' ' git checkout -b reword-branch master && + set_fake_editor && FAKE_LINES="1 2 3 reword 4" FAKE_COMMIT_MESSAGE="E changed" git rebase -i A && git show HEAD | grep "E changed" && test $(git rev-parse master) != $(git rev-parse HEAD) && @@ -684,6 +725,7 @@ test_expect_success 'rebase -i can copy notes' ' test_commit n2 && test_commit n3 && git notes add -m"a note" n3 && + set_fake_editor && git rebase -i --onto n1 n2 && test "a note" = "$(git notes show HEAD)" ' @@ -697,6 +739,7 @@ EOF test_expect_success 'rebase -i can copy notes over a fixup' ' git reset --hard n3 && git notes add -m"an earlier note" n2 && + set_fake_editor && GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 fixup 2" git rebase -i n1 && git notes show > output && test_cmp expect output @@ -706,6 +749,7 @@ test_expect_success 'rebase while detaching HEAD' ' git symbolic-ref HEAD && grandparent=$(git rev-parse HEAD~2) && test_tick && + set_fake_editor && FAKE_LINES="2 1" git rebase -i HEAD~2 HEAD^0 && test $grandparent = $(git rev-parse HEAD~2) && test_must_fail git symbolic-ref HEAD @@ -715,6 +759,7 @@ test_tick # Ensure that the rebased commits get a different timestamp. test_expect_success 'always cherry-pick with --no-ff' ' git checkout no-ff-branch && git tag original-no-ff-branch && + set_fake_editor && git rebase -i --no-ff A && touch empty && for p in 0 1 2 @@ -747,6 +792,7 @@ test_expect_success 'set up commits with funny messages' ' test_expect_success 'rebase-i history with funny messages' ' git rev-list A..funny >expect && test_tick && + set_fake_editor && FAKE_LINES="1 2 3 4" git rebase -i A && git rev-list A.. >actual && test_cmp expect actual @@ -763,6 +809,7 @@ test_expect_success 'prepare for rebase -i --exec' ' test_expect_success 'running "git rebase -i --exec git show HEAD"' ' + set_fake_editor && git rebase -i --exec "git show HEAD" HEAD~2 >actual && ( FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" && @@ -776,6 +823,7 @@ test_expect_success 'running "git rebase -i --exec git show HEAD"' ' test_expect_success 'running "git rebase --exec git show HEAD -i"' ' git reset --hard execute && + set_fake_editor && git rebase --exec "git show HEAD" -i HEAD~2 >actual && ( FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" && @@ -789,6 +837,7 @@ test_expect_success 'running "git rebase --exec git show HEAD -i"' ' test_expect_success 'running "git rebase -ix git show HEAD"' ' git reset --hard execute && + set_fake_editor && git rebase -ix "git show HEAD" HEAD~2 >actual && ( FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" && @@ -802,6 +851,7 @@ test_expect_success 'running "git rebase -ix git show HEAD"' ' test_expect_success 'rebase -ix with several <CMD>' ' git reset --hard execute && + set_fake_editor && git rebase -ix "git show HEAD; pwd" HEAD~2 >actual && ( FAKE_LINES="1 exec_git_show_HEAD;_pwd 2 exec_git_show_HEAD;_pwd" && @@ -815,6 +865,7 @@ test_expect_success 'rebase -ix with several <CMD>' ' test_expect_success 'rebase -ix with several instances of --exec' ' git reset --hard execute && + set_fake_editor && git rebase -i --exec "git show HEAD" --exec "pwd" HEAD~2 >actual && ( FAKE_LINES="1 exec_git_show_HEAD exec_pwd 2 @@ -836,6 +887,7 @@ test_expect_success 'rebase -ix with --autosquash' ' echo bis >bis.txt && git add bis.txt && git commit -m "fixup! two_exec" && + set_fake_editor && ( git checkout -b autosquash_actual && git rebase -i --exec "git show HEAD" --autosquash HEAD~4 >actual @@ -854,6 +906,7 @@ test_expect_success 'rebase -ix with --autosquash' ' test_expect_success 'rebase --exec without -i shows error message' ' git reset --hard execute && + set_fake_editor && test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual && echo "The --exec option must be used with the --interactive option" >expected && test_i18ncmp expected actual @@ -862,6 +915,7 @@ test_expect_success 'rebase --exec without -i shows error message' ' test_expect_success 'rebase -i --exec without <CMD>' ' git reset --hard execute && + set_fake_editor && test_must_fail git rebase -i --exec 2>tmp && sed -e "1d" tmp >actual && test_must_fail git rebase -h >expected && @@ -871,6 +925,7 @@ test_expect_success 'rebase -i --exec without <CMD>' ' test_expect_success 'rebase -i --root re-order and drop commits' ' git checkout E && + set_fake_editor && FAKE_LINES="3 1 2 5" git rebase -i --root && test E = $(git cat-file commit HEAD | sed -ne \$p) && test B = $(git cat-file commit HEAD^ | sed -ne \$p) && @@ -884,6 +939,7 @@ test_expect_success 'rebase -i --root retain root commit author and message' ' echo B >file7 && git add file7 && GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" && + set_fake_editor && FAKE_LINES="2" git rebase -i --root && git cat-file commit HEAD | grep -q "^author Twerp Snog" && git cat-file commit HEAD | grep -q "^different author$" @@ -892,6 +948,7 @@ test_expect_success 'rebase -i --root retain root commit author and message' ' test_expect_success 'rebase -i --root temporary sentinel commit' ' git checkout B && ( + set_fake_editor && FAKE_LINES="2" && export FAKE_LINES && test_must_fail git rebase -i --root @@ -902,6 +959,7 @@ test_expect_success 'rebase -i --root temporary sentinel commit' ' test_expect_success 'rebase -i --root fixup root commit' ' git checkout B && + set_fake_editor && FAKE_LINES="1 fixup 2" git rebase -i --root && test A = $(git cat-file commit HEAD | sed -ne \$p) && test B = $(git show HEAD:file1) && @@ -911,6 +969,7 @@ test_expect_success 'rebase -i --root fixup root commit' ' test_expect_success 'rebase --edit-todo does not works on non-interactive rebase' ' git reset --hard && git checkout conflict-branch && + set_fake_editor && test_must_fail git rebase --onto HEAD~2 HEAD~ && test_must_fail git rebase --edit-todo && git rebase --abort @@ -919,6 +978,7 @@ test_expect_success 'rebase --edit-todo does not works on non-interactive rebase test_expect_success 'rebase --edit-todo can be used to modify todo' ' git reset --hard && git checkout no-conflict-branch^0 && + set_fake_editor && FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 && FAKE_LINES="2 1" git rebase --edit-todo && git rebase --continue @@ -929,6 +989,7 @@ test_expect_success 'rebase --edit-todo can be used to modify todo' ' test_expect_success 'rebase -i produces readable reflog' ' git reset --hard && git branch -f branch-reflog-test H && + set_fake_editor && git rebase -i --onto I F branch-reflog-test && cat >expect <<-\EOF && rebase -i (start): checkout I @@ -976,4 +1037,41 @@ test_expect_success 'rebase -i with --strategy and -X' ' test $(cat file1) = Z ' +test_expect_success 'rebase -i error on commits with \ in message' ' + current_head=$(git rev-parse HEAD) + test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" && + test_commit TO-REMOVE will-conflict old-content && + test_commit "\temp" will-conflict new-content dummy && + ( + EDITOR=true && + export EDITOR && + test_must_fail git rebase -i HEAD^ --onto HEAD^^ 2>error + ) && + test_expect_code 1 grep " emp" error +' + +test_expect_success 'short SHA-1 setup' ' + test_when_finished "git checkout master" && + git checkout --orphan collide && + git rm -rf . && + ( + unset test_tick && + test_commit collide1 collide && + test_commit --notick collide2 collide && + test_commit --notick collide3 collide + ) +' + +test_expect_success 'short SHA-1 collide' ' + test_when_finished "reset_rebase && git checkout master" && + git checkout collide && + ( + unset test_tick && + test_tick && + set_fake_editor && + FAKE_COMMIT_MESSAGE="collide2 ac4f2ee" \ + FAKE_LINES="reword 1 2" git rebase -i HEAD~2 + ) +' + test_done diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh index 2e0c36415f..8c251c57a6 100755 --- a/t/t3409-rebase-preserve-merges.sh +++ b/t/t3409-rebase-preserve-merges.sh @@ -28,6 +28,8 @@ export GIT_AUTHOR_EMAIL # \--A3 <-- topic2 # \ # B2 <-- origin/topic +# +# Clone 4 (same as Clone 3) test_expect_success 'setup for merge-preserving rebase' \ 'echo First > A && @@ -64,6 +66,16 @@ test_expect_success 'setup for merge-preserving rebase' \ git merge --no-ff topic2 ) && + git clone ./. clone4 && + ( + cd clone4 && + git checkout -b topic2 origin/topic && + echo Sixth > A && + git commit -a -m "Modify A3" && + git checkout -b topic origin/topic && + git merge --no-ff topic2 + ) && + git checkout topic && echo Fourth >> B && git commit -a -m "Modify B2" @@ -96,4 +108,15 @@ test_expect_success 'rebase -p preserves no-ff merges' ' ) ' +test_expect_success 'rebase -p ignores merge.log config' ' + ( + cd clone4 && + git fetch && + git -c merge.log=1 rebase -p origin/topic && + echo >expected && + git log --format="%b" -1 >current && + test_cmp expected current + ) +' + test_done diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 668933bfb2..8f272bce84 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1000,6 +1000,16 @@ test_expect_success '--from uses committer ident' ' test_cmp expect patch.head ' +test_expect_success '--from omits redundant in-body header' ' + git format-patch -1 --stdout --from="A U Thor <author@example.com>" >patch && + cat >expect <<-\EOF && + From: A U Thor <author@example.com> + + EOF + sed -ne "/^From:/p; /^$/p; /^---$/q" <patch >patch.head && + test_cmp expect patch.head +' + test_expect_success 'in-body headers trigger content encoding' ' GIT_AUTHOR_NAME="éxötìc" test_commit exotic && test_when_finished "git reset --hard HEAD^" && diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 5493500ef1..42866992cf 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -172,4 +172,20 @@ test_expect_success 'shortlog encoding' ' git shortlog HEAD~2.. > out && test_cmp expect out' +test_expect_success 'shortlog ignores commits with missing authors' ' + git commit --allow-empty -m normal && + git commit --allow-empty -m soon-to-be-broken && + git cat-file commit HEAD >commit.tmp && + sed "/^author/d" commit.tmp >broken.tmp && + commit=$(git hash-object -w -t commit --stdin <broken.tmp) && + git update-ref HEAD $commit && + cat >expect <<-\EOF && + A U Thor (1): + normal + + EOF + git shortlog HEAD~2.. >actual && + test_cmp expect actual +' + test_done diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index baa4685dcc..0dd8b65d7c 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -202,7 +202,8 @@ test_expect_success 'setup mailmap blob tests' ' Blob Guy <author@example.com> Blob Guy <bugs@company.xx> EOF - git add just-bugs both && + printf "Tricky Guy <author@example.com>" >no-newline && + git add just-bugs both no-newline && git commit -m "my mailmaps" && echo "Repo Guy <author@example.com>" >.mailmap && echo "Internal Guy <author@example.com>" >internal.map @@ -286,6 +287,19 @@ test_expect_success 'mailmap.blob defaults to HEAD:.mailmap in bare repo' ' ) ' +test_expect_success 'mailmap.blob can handle blobs without trailing newline' ' + cat >expect <<-\EOF && + Tricky Guy (1): + initial + + nick1 (1): + second + + EOF + git -c mailmap.blob=map:no-newline shortlog HEAD >actual && + test_cmp expect actual +' + test_expect_success 'cleanup after mailmap.blob tests' ' rm -f .mailmap ' @@ -470,4 +484,15 @@ test_expect_success 'Blame output (complex mapping)' ' test_cmp expect actual.fuzz ' +cat >expect <<\EOF +Some Dude <some@dude.xx> +EOF + +test_expect_success 'commit --author honors mailmap' ' + test_must_fail git commit --author "nick" --allow-empty -meight && + git commit --author "Some Dude" --allow-empty -meight && + git show --pretty=format:"%an <%ae>%n" >actual && + test_cmp expect actual +' + test_done diff --git a/t/t4212-log-corrupt.sh b/t/t4212-log-corrupt.sh index ec5099b83d..93c7c366cf 100755 --- a/t/t4212-log-corrupt.sh +++ b/t/t4212-log-corrupt.sh @@ -13,11 +13,16 @@ test_expect_success 'setup' ' git update-ref refs/heads/broken_email $(cat broken_email.hash) ' +test_expect_success 'fsck notices broken commit' ' + git fsck 2>actual && + test_i18ngrep invalid.author actual +' + test_expect_success 'git log with broken author email' ' { echo commit $(cat broken_email.hash) echo "Author: A U Thor <author@example.com>" - echo "Date: Thu Jan 1 00:00:00 1970 +0000" + echo "Date: Thu Apr 7 15:13:13 2005 -0700" echo echo " foo" } >expect.out && @@ -30,7 +35,7 @@ test_expect_success 'git log with broken author email' ' ' test_expect_success 'git log --format with broken author email' ' - echo "A U Thor+author@example.com+" >expect.out && + echo "A U Thor+author@example.com+Thu Apr 7 15:13:13 2005 -0700" >expect.out && : >expect.err && git log --format="%an+%ae+%ad" broken_email >actual.out 2>actual.err && diff --git a/t/t4254-am-corrupt.sh b/t/t4254-am-corrupt.sh index b7da95fac5..85716dd6ec 100755 --- a/t/t4254-am-corrupt.sh +++ b/t/t4254-am-corrupt.sh @@ -3,20 +3,19 @@ test_description='git am with corrupt input' . ./test-lib.sh -# Note the missing "+++" line: -cat > bad-patch.diff <<'EOF' -From: A U Thor <au.thor@example.com> -diff --git a/f b/f -index 7898192..6178079 100644 ---- a/f -@@ -1 +1 @@ --a -+b -EOF - test_expect_success setup ' - test $? = 0 && - echo a > f && + # Note the missing "+++" line: + cat >bad-patch.diff <<-\EOF && + From: A U Thor <au.thor@example.com> + diff --git a/f b/f + index 7898192..6178079 100644 + --- a/f + @@ -1 +1 @@ + -a + +b + EOF + + echo a >f && git add f && test_tick && git commit -m initial @@ -26,17 +25,12 @@ test_expect_success setup ' # fatal: unable to write file '(null)' mode 100644: Bad address # Also, it had the unwanted side-effect of deleting f. test_expect_success 'try to apply corrupted patch' ' - git am bad-patch.diff 2> actual - test $? = 1 + test_must_fail git am bad-patch.diff 2>actual ' -cat > expected <<EOF -fatal: git diff header lacks filename information (line 4) -EOF - test_expect_success 'compare diagnostic; ensure file is still here' ' - test $? = 0 && - test -f f && + echo "fatal: git diff header lacks filename information (line 4)" >expected && + test_path_is_file f && test_cmp expected actual ' diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index fd2598e601..d87ddf73b7 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -393,6 +393,17 @@ test_expect_success 'fetch in shallow repo unreachable shallow objects' ' git fsck --no-dangling ) ' +test_expect_success 'fetch creating new shallow root' ' + ( + git clone "file://$(pwd)/." shallow10 && + git commit --allow-empty -m empty && + cd shallow10 && + git fetch --depth=1 --progress 2>actual && + # This should fetch only the empty commit, no tree or + # blob objects + grep "remote: Total 1" actual + ) +' test_expect_success 'setup tests for the --stdin parameter' ' for head in C D E F @@ -505,4 +516,20 @@ test_expect_success 'test --all, --depth, and explicit tag' ' ) >out-adt 2>error-adt ' +test_expect_success 'shallow fetch with tags does not break the repository' ' + mkdir repo1 && + ( + cd repo1 && + git init && + test_commit 1 && + test_commit 2 && + test_commit 3 && + mkdir repo2 && + cd repo2 && + git init && + git fetch --depth=2 ../.git master:branch && + git fsck + ) +' + test_done diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh index c983d3694c..3932e797f7 100755 --- a/t/t5530-upload-pack-error.sh +++ b/t/t5530-upload-pack-error.sh @@ -54,9 +54,6 @@ test_expect_success 'upload-pack fails due to error in rev-list' ' printf "0032want %s\n0034shallow %s00000009done\n0000" \ $(git rev-parse HEAD) $(git rev-parse HEAD^) >input && test_must_fail git upload-pack . <input >/dev/null 2>output.err && - # pack-objects survived - grep "Total.*, reused" output.err && - # but there was an error, which must have been in rev-list grep "bad tree object" output.err ' diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh index 55a866af80..1b71bb5156 100755 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@ -113,6 +113,10 @@ test_expect_success 'follow redirects (302)' ' git clone $HTTPD_URL/smart-redir-temp/repo.git --quiet repo-t ' +test_expect_success 'redirects re-root further requests' ' + git clone $HTTPD_URL/smart-redir-limited/repo.git repo-redir-limited +' + test_expect_success 'clone from password-protected repository' ' echo two >expect && set_askpass user@host && @@ -146,6 +150,13 @@ test_expect_success 'no-op half-auth fetch does not require a password' ' expect_askpass none ' +test_expect_success 'redirects send auth to new location' ' + set_askpass user@host && + git -c credential.useHttpPath=true \ + clone $HTTPD_URL/smart-redir-auth/repo.git repo-redir-auth && + expect_askpass both user@host auth/smart/repo.git +' + test_expect_success 'disable dumb http on server' ' git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ config http.getanyfile false diff --git a/t/t5706-clone-branch.sh b/t/t5706-clone-branch.sh index 56be67e07e..6e7a7be052 100755 --- a/t/t5706-clone-branch.sh +++ b/t/t5706-clone-branch.sh @@ -20,7 +20,9 @@ test_expect_success 'setup' ' echo one >file && git add file && git commit -m one && git checkout -b two && echo two >file && git add file && git commit -m two && - git checkout master) + git checkout master) && + mkdir empty && + (cd empty && git init) ' test_expect_success 'vanilla clone chooses HEAD' ' @@ -61,4 +63,8 @@ test_expect_success 'clone -b with bogus branch' ' test_must_fail git clone -b bogus parent clone-bogus ' +test_expect_success 'clone -b not allowed with empty repos' ' + test_must_fail git clone -b branch empty clone-branch-empty +' + test_done diff --git a/t/t5802-connect-helper.sh b/t/t5802-connect-helper.sh new file mode 100755 index 0000000000..878faf2b63 --- /dev/null +++ b/t/t5802-connect-helper.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +test_description='ext::cmd remote "connect" helper' +. ./test-lib.sh + +test_expect_success setup ' + test_tick && + git commit --allow-empty -m initial && + test_tick && + git commit --allow-empty -m second && + test_tick && + git commit --allow-empty -m third && + test_tick && + git tag -a -m "tip three" three && + + test_tick && + git commit --allow-empty -m fourth +' + +test_expect_success clone ' + cmd=$(echo "echo >&2 ext::sh invoked && %S .." | sed -e "s/ /% /g") && + git clone "ext::sh -c %S% ." dst && + git for-each-ref refs/heads/ refs/tags/ >expect && + ( + cd dst && + git config remote.origin.url "ext::sh -c $cmd" && + git for-each-ref refs/heads/ refs/tags/ + ) >actual && + test_cmp expect actual +' + +test_expect_success 'update following tag' ' + test_tick && + git commit --allow-empty -m fifth && + test_tick && + git tag -a -m "tip five" five && + git for-each-ref refs/heads/ refs/tags/ >expect && + ( + cd dst && + git pull && + git for-each-ref refs/heads/ refs/tags/ >../actual + ) && + test_cmp expect actual +' + +test_expect_success 'update backfilled tag' ' + test_tick && + git commit --allow-empty -m sixth && + test_tick && + git tag -a -m "tip two" two three^1 && + git for-each-ref refs/heads/ refs/tags/ >expect && + ( + cd dst && + git pull && + git for-each-ref refs/heads/ refs/tags/ >../actual + ) && + test_cmp expect actual +' + +test_expect_success 'update backfilled tag without primary transfer' ' + test_tick && + git tag -a -m "tip one " one two^1 && + git for-each-ref refs/heads/ refs/tags/ >expect && + ( + cd dst && + git pull && + git for-each-ref refs/heads/ refs/tags/ >../actual + ) && + test_cmp expect actual +' + +test_done diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh index b10685af4e..15e3d6476c 100755 --- a/t/t6000-rev-list-misc.sh +++ b/t/t6000-rev-list-misc.sh @@ -48,4 +48,12 @@ test_expect_success 'rev-list --objects with pathspecs and copied files' ' ! grep one output ' +test_expect_success 'rev-list A..B and rev-list ^A B are the same' ' + git commit --allow-empty -m another && + git tag -a -m "annotated" v1.0 && + git rev-list --objects ^v1.0^ v1.0 >expect && + git rev-list --objects v1.0^..v1.0 >actual && + test_cmp expect actual +' + test_done diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index 57ce2395d6..fde5e712eb 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -127,4 +127,10 @@ test_expect_success 'full history simplification without parent' ' } ' +test_expect_success '--full-diff is not affected by --parents' ' + git log -p --pretty="%H" --full-diff -- file >expected && + git log -p --pretty="%H" --full-diff --parents -- file >actual && + test_cmp expected actual +' + test_done diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 5ee97b003a..a39d074465 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -18,6 +18,16 @@ test_expect_success 'setup - initial commit' ' git branch initial ' +test_expect_success 'configuration parsing' ' + test_when_finished "rm -f .gitmodules" && + cat >.gitmodules <<-\EOF && + [submodule "s"] + path + ignore + EOF + test_must_fail git status +' + test_expect_success 'setup - repository in init subdirectory' ' mkdir init && ( diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index b192f936bc..f0b33053ab 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -58,7 +58,7 @@ test_expect_success 'setup a submodule tree' ' git submodule add ../merging merging && test_tick && git commit -m "rebasing" - ) + ) && (cd super && git submodule add ../none none && test_tick && diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 272a071e85..2d4beb5e50 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -69,7 +69,7 @@ run_completion () local -a COMPREPLY _words local _cword _words=( $1 ) - test "${1: -1}" = ' ' && _words+=('') + test "${1: -1}" = ' ' && _words[${#_words[@]}+1]='' (( _cword = ${#_words[@]} - 1 )) __git_wrap__git_main && print_comp } diff --git a/t/test-lib.sh b/t/test-lib.sh index 1aa27bdbbf..c5e914a781 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -325,7 +325,7 @@ trap 'die' EXIT . "$TEST_DIRECTORY/test-lib-functions.sh" # You are not expected to call test_ok_ and test_failure_ directly, use -# the text_expect_* functions instead. +# the test_expect_* functions instead. test_ok_ () { test_success=$(($test_success + 1)) diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample index 15ab6d8e7e..1f3bcebfd7 100755 --- a/templates/hooks--pre-push.sample +++ b/templates/hooks--pre-push.sample @@ -30,6 +30,7 @@ do if [ "$local_sha" = $z40 ] then # Handle delete + : else if [ "$remote_sha" = $z40 ] then diff --git a/transport.c b/transport.c index e15db9808c..de255880a4 100644 --- a/transport.c +++ b/transport.c @@ -875,6 +875,8 @@ void transport_take_over(struct transport *transport, transport->push_refs = git_transport_push; transport->disconnect = disconnect_git; transport->smart_options = &(data->options); + + transport->cannot_reuse = 1; } static int is_local(const char *url) diff --git a/transport.h b/transport.h index ea70ea7e4a..96e0ede89f 100644 --- a/transport.h +++ b/transport.h @@ -27,6 +27,12 @@ struct transport { */ unsigned got_remote_refs : 1; + /* + * Transports that call take-over destroys the data specific to + * the transport type while doing so, and cannot be reused. + */ + unsigned cannot_reuse : 1; + /** * Returns 0 if successful, positive if the option is not * recognized or is inapplicable, and negative if the option diff --git a/upload-pack.c b/upload-pack.c index 2826909eba..fd96f3be11 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -40,6 +40,7 @@ static struct object_array have_obj; static struct object_array want_obj; static struct object_array extra_edge_obj; static unsigned int timeout; +static int keepalive = 5; /* 0 for no sideband, * otherwise maximum packet size (up to 65520 bytes). */ @@ -68,87 +69,28 @@ static ssize_t send_client_data(int fd, const char *data, ssize_t sz) return sz; } -static FILE *pack_pipe = NULL; -static void show_commit(struct commit *commit, void *data) -{ - if (commit->object.flags & BOUNDARY) - fputc('-', pack_pipe); - if (fputs(sha1_to_hex(commit->object.sha1), pack_pipe) < 0) - die("broken output pipe"); - fputc('\n', pack_pipe); - fflush(pack_pipe); - free(commit->buffer); - commit->buffer = NULL; -} - -static void show_object(struct object *obj, - const struct name_path *path, const char *component, - void *cb_data) -{ - show_object_with_name(pack_pipe, obj, path, component); -} - -static void show_edge(struct commit *commit) -{ - fprintf(pack_pipe, "-%s\n", sha1_to_hex(commit->object.sha1)); -} - -static int do_rev_list(int in, int out, void *user_data) -{ - int i; - struct rev_info revs; - - pack_pipe = xfdopen(out, "w"); - init_revisions(&revs, NULL); - revs.tag_objects = 1; - revs.tree_objects = 1; - revs.blob_objects = 1; - if (use_thin_pack) - revs.edge_hint = 1; - - for (i = 0; i < want_obj.nr; i++) { - struct object *o = want_obj.objects[i].item; - /* why??? */ - o->flags &= ~UNINTERESTING; - add_pending_object(&revs, o, NULL); - } - for (i = 0; i < have_obj.nr; i++) { - struct object *o = have_obj.objects[i].item; - o->flags |= UNINTERESTING; - add_pending_object(&revs, o, NULL); - } - setup_revisions(0, NULL, &revs, NULL); - if (prepare_revision_walk(&revs)) - die("revision walk setup failed"); - mark_edges_uninteresting(revs.commits, &revs, show_edge); - if (use_thin_pack) - for (i = 0; i < extra_edge_obj.nr; i++) - fprintf(pack_pipe, "-%s\n", sha1_to_hex( - extra_edge_obj.objects[i].item->sha1)); - traverse_commit_list(&revs, show_commit, show_object, NULL); - fflush(pack_pipe); - fclose(pack_pipe); - return 0; -} - static void create_pack_file(void) { - struct async rev_list; struct child_process pack_objects; char data[8193], progress[128]; char abort_msg[] = "aborting due to possible repository " "corruption on the remote side."; int buffered = -1; ssize_t sz; - const char *argv[10]; - int arg = 0; + const char *argv[12]; + int i, arg = 0; + FILE *pipe_fd; + char *shallow_file = NULL; - argv[arg++] = "pack-objects"; - if (!shallow_nr) { - argv[arg++] = "--revs"; - if (use_thin_pack) - argv[arg++] = "--thin"; + if (shallow_nr) { + shallow_file = setup_temporary_shallow(); + argv[arg++] = "--shallow-file"; + argv[arg++] = shallow_file; } + argv[arg++] = "pack-objects"; + argv[arg++] = "--revs"; + if (use_thin_pack) + argv[arg++] = "--thin"; argv[arg++] = "--stdout"; if (!no_progress) @@ -169,29 +111,21 @@ static void create_pack_file(void) if (start_command(&pack_objects)) die("git upload-pack: unable to fork git-pack-objects"); - if (shallow_nr) { - memset(&rev_list, 0, sizeof(rev_list)); - rev_list.proc = do_rev_list; - rev_list.out = pack_objects.in; - if (start_async(&rev_list)) - die("git upload-pack: unable to fork git-rev-list"); - } - else { - FILE *pipe_fd = xfdopen(pack_objects.in, "w"); - int i; - - for (i = 0; i < want_obj.nr; i++) - fprintf(pipe_fd, "%s\n", - sha1_to_hex(want_obj.objects[i].item->sha1)); - fprintf(pipe_fd, "--not\n"); - for (i = 0; i < have_obj.nr; i++) - fprintf(pipe_fd, "%s\n", - sha1_to_hex(have_obj.objects[i].item->sha1)); - fprintf(pipe_fd, "\n"); - fflush(pipe_fd); - fclose(pipe_fd); - } - + pipe_fd = xfdopen(pack_objects.in, "w"); + + for (i = 0; i < want_obj.nr; i++) + fprintf(pipe_fd, "%s\n", + sha1_to_hex(want_obj.objects[i].item->sha1)); + fprintf(pipe_fd, "--not\n"); + for (i = 0; i < have_obj.nr; i++) + fprintf(pipe_fd, "%s\n", + sha1_to_hex(have_obj.objects[i].item->sha1)); + for (i = 0; i < extra_edge_obj.nr; i++) + fprintf(pipe_fd, "%s\n", + sha1_to_hex(extra_edge_obj.objects[i].item->sha1)); + fprintf(pipe_fd, "\n"); + fflush(pipe_fd); + fclose(pipe_fd); /* We read from pack_objects.err to capture stderr output for * progress bar, and pack_objects.out to capture the pack data. @@ -200,6 +134,7 @@ static void create_pack_file(void) while (1) { struct pollfd pfd[2]; int pe, pu, pollsize; + int ret; reset_timeout(); @@ -222,7 +157,8 @@ static void create_pack_file(void) if (!pollsize) break; - if (poll(pfd, pollsize, -1) < 0) { + ret = poll(pfd, pollsize, 1000 * keepalive); + if (ret < 0) { if (errno != EINTR) { error("poll failed, resuming: %s", strerror(errno)); @@ -284,14 +220,32 @@ static void create_pack_file(void) if (sz < 0) goto fail; } + + /* + * We hit the keepalive timeout without saying anything; send + * an empty message on the data sideband just to let the other + * side know we're still working on it, but don't have any data + * yet. + * + * If we don't have a sideband channel, there's no room in the + * protocol to say anything, so those clients are just out of + * luck. + */ + if (!ret && use_sideband) { + static const char buf[] = "0005\1"; + write_or_die(1, buf, 5); + } } if (finish_command(&pack_objects)) { error("git upload-pack: git-pack-objects died with error."); goto fail; } - if (shallow_nr && finish_async(&rev_list)) - goto fail; /* error was already reported */ + if (shallow_file) { + if (*shallow_file) + unlink(shallow_file); + free(shallow_file); + } /* flush the data */ if (0 <= buffered) { @@ -824,6 +778,11 @@ static int upload_pack_config(const char *var, const char *value, void *unused) { if (!strcmp("uploadpack.allowtipsha1inwant", var)) allow_tip_sha1_in_want = git_config_bool(var, value); + else if (!strcmp("uploadpack.keepalive", var)) { + keepalive = git_config_int(var, value); + if (!keepalive) + keepalive = -1; + } return parse_hide_refs_config(var, value, "uploadpack"); } @@ -131,6 +131,14 @@ void *xcalloc(size_t nmemb, size_t size) } /* + * Limit size of IO chunks, because huge chunks only cause pain. OS X + * 64-bit is buggy, returning EINVAL if len >= INT_MAX; and even in + * the absense of bugs, large chunks can result in bad latencies when + * you decide to kill the process. + */ +#define MAX_IO_SIZE (8*1024*1024) + +/* * xread() is the same a read(), but it automatically restarts read() * operations with a recoverable error (EAGAIN and EINTR). xread() * DOES NOT GUARANTEE that "len" bytes is read even if the data is available. @@ -138,6 +146,8 @@ void *xcalloc(size_t nmemb, size_t size) ssize_t xread(int fd, void *buf, size_t len) { ssize_t nr; + if (len > MAX_IO_SIZE) + len = MAX_IO_SIZE; while (1) { nr = read(fd, buf, len); if ((nr < 0) && (errno == EAGAIN || errno == EINTR)) @@ -154,6 +164,8 @@ ssize_t xread(int fd, void *buf, size_t len) ssize_t xwrite(int fd, const void *buf, size_t len) { ssize_t nr; + if (len > MAX_IO_SIZE) + len = MAX_IO_SIZE; while (1) { nr = write(fd, buf, len); if ((nr < 0) && (errno == EAGAIN || errno == EINTR)) |