diff options
64 files changed, 2996 insertions, 1350 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index ded0e40b97..e33ddcb250 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -6,7 +6,7 @@ MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \ gitrepository-layout.txt MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \ gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \ - gitdiffcore.txt + gitdiffcore.txt gitworkflows.txt MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT) MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT)) diff --git a/Documentation/RelNotes-1.6.0.3.txt b/Documentation/RelNotes-1.6.0.3.txt index 214a400aa2..ae0577836a 100644 --- a/Documentation/RelNotes-1.6.0.3.txt +++ b/Documentation/RelNotes-1.6.0.3.txt @@ -24,6 +24,9 @@ Fixes since v1.6.0.2 * "git diff --no-index" on binary files no longer outputs a bogus "diff --git" header line. +* "git diff" hunk header patterns with multiple elements separated by LF + were not used correctly. + * Hunk headers in "git diff" default to using extended regular expressions, fixing some of the internal patterns on non-GNU platforms. @@ -31,9 +34,15 @@ Fixes since v1.6.0.2 * New config "diff.*.xfuncname" exposes extended regular expressions for user specified hunk header patterns. +* "git gc" when ejecting otherwise unreachable objects from packfiles into + loose form leaked memory. + * "git index-pack" was recently broken and mishandled objects added by thin-pack completion processing under memory pressure. +* "git index-pack" was recently broken and misbehaved when run from inside + .git/objects/pack/ directory. + * "git stash apply sash@{1}" was fixed to error out. Prior versions would have applied stash@{0} incorrectly. @@ -47,6 +56,8 @@ Fixes since v1.6.0.2 * "git remote show -v" now displays all URLs of a remote. +* "git checkout -b branch" was confused when branch already existed. + * "git checkout -q" once again suppresses the locally modified file list. * "git clone -q", "git fetch -q" asks remote side to not send @@ -104,9 +115,3 @@ Fixes since v1.6.0.2 ("git fetch") is still however supported. Many other documentation updates. - --- -exec >/var/tmp/1 -O=v1.6.0.2-95-g72d404d -echo O=$(git describe maint) -git shortlog --no-merges $O..maint diff --git a/Documentation/RelNotes-1.6.1.txt b/Documentation/RelNotes-1.6.1.txt index 4dc0634297..afd1150eaa 100644 --- a/Documentation/RelNotes-1.6.1.txt +++ b/Documentation/RelNotes-1.6.1.txt @@ -77,6 +77,9 @@ on. * "git commit --author=$name" can look up author name from existing commits. +* output from "git commit" has been reworded in a more concise and yet + more informative way. + * "git count-objects" reports the on-disk footprint for packfiles and their corresponding idx files. @@ -94,6 +97,8 @@ on. * "git diff" learned --dirstat-by-file to count changed files, not number of lines, when summarizing the global picture. +* "git diff" hunk header pattern for ObjC has been added. + * "git for-each-ref" learned "refname:short" token that gives an unambiguously abbreviated refname. @@ -174,6 +179,6 @@ release, unless otherwise noted. -- exec >/var/tmp/1 -O=v1.6.0.2-529-g769b008 +O=v1.6.0.2-553-g58e0fa5 echo O=$(git describe master) git shortlog --no-merges $O..master ^maint diff --git a/Documentation/config.txt b/Documentation/config.txt index da18a5458e..29369d051b 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -124,7 +124,9 @@ core.ignoreCygwinFSTricks:: one hierarchy using Cygwin mount. If true, Git uses native Win32 API whenever it is possible and falls back to Cygwin functions only to handle symbol links. The native mode is more than twice faster than - normal Cygwin l/stat() functions. True by default. + normal Cygwin l/stat() functions. True by default, unless core.filemode + is true, in which case ignoreCygwinFSTricks is ignored as Cygwin's + POSIX emulation is required to support core.filemode. core.trustctime:: If false, the ctime differences between the index and the @@ -640,10 +642,11 @@ fetch.unpackLimit:: `transfer.unpackLimit` is used instead. format.numbered:: - A boolean which can enable sequence numbers in patch subjects. - Setting this option to "auto" will enable it only if there is - more than one patch. See --numbered option in - linkgit:git-format-patch[1]. + A boolean which can enable or disable sequence numbers in patch + subjects. It defaults to "auto" which enables it only if there + is more than one patch. It can be enabled or disabled for all + messages by setting it to "true" or "false". See --numbered + option in linkgit:git-format-patch[1]. format.headers:: Additional email headers to include in a patch to be submitted diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 7788d4fa4a..c62b45cdba 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -137,7 +137,8 @@ endif::git-format-patch[] --diff-filter=[ACDMRTUXB*]:: Select only files that are Added (`A`), Copied (`C`), Deleted (`D`), Modified (`M`), Renamed (`R`), have their - type (mode) changed (`T`), are Unmerged (`U`), are + type (i.e. regular file, symlink, submodule, ...) changed (`T`), + are Unmerged (`U`), are Unknown (`X`), or have had their pairing Broken (`B`). Any combination of the filter characters may be used. When `*` (All-or-none) is added to the combination, all diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 2b6d6c8654..6fc20b0baf 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -9,8 +9,8 @@ SYNOPSIS -------- [verse] 'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p] - [--all | [--update | -u]] [--refresh] [--ignore-errors] [--] - <filepattern>... + [--all | [--update | -u]] [--intent-to-add | -N] + [--refresh] [--ignore-errors] [--] <filepattern>... DESCRIPTION ----------- @@ -92,6 +92,15 @@ OPTIONS and add all untracked files that are not ignored by '.gitignore' mechanism. + +-N:: +--intent-to-add:: + Record only the fact that the path will be added later. An entry + for the path is placed in the index with no content. This is + useful for, among other things, showing the unstaged content of + such files with 'git diff' and commiting them with 'git commit + -a'. + --refresh:: Don't add the file(s), but only refresh their stat() information in the index. diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt index 4b3c2b0b06..256659a6b0 100644 --- a/Documentation/git-check-attr.txt +++ b/Documentation/git-check-attr.txt @@ -8,7 +8,9 @@ git-check-attr - Display gitattributes information. SYNOPSIS -------- +[verse] 'git check-attr' attr... [--] pathname... +'git check-attr' --stdin [-z] attr... < <list-of-paths> DESCRIPTION ----------- @@ -17,6 +19,13 @@ For every pathname, this command will list if each attr is 'unspecified', OPTIONS ------- +--stdin:: + Read file names from stdin instead of from the command-line. + +-z:: + Only meaningful with `--stdin`; paths are separated with + NUL character instead of LF. + \--:: Interpret all preceding arguments as attributes, and all following arguments as path names. If not supplied, only the first argument will diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 82e154de49..168333a588 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -88,7 +88,7 @@ This would tell us to use "hack" as the local branch when branching off of "origin/hack" (or "remotes/origin/hack", or even "refs/remotes/origin/hack"). If the given name has no slash, or the above guessing results in an empty name, the guessing is aborted. You can -exlicitly give a name with '-b' in such a case. +explicitly give a name with '-b' in such a case. --no-track:: Ignore the branch.autosetupmerge configuration variable. diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 0e14e732fd..95f08b9114 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -90,6 +90,11 @@ then the cloned repository will become corrupt. Operate quietly. This flag is also passed to the `rsync' command when given. +--verbose:: +-v:: + Display the progressbar, even in case the standard output is not + a terminal. + --no-checkout:: -n:: No checkout of HEAD is performed after the clone is complete. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index eb05b0f49b..2e62165fa9 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -94,7 +94,8 @@ OPTIONS -s:: --signoff:: - Add Signed-off-by line at the end of the commit message. + Add Signed-off-by line by the commiter at the end of the commit + log message. -n:: --no-verify:: @@ -144,6 +145,10 @@ It is a rough equivalent for: ------ but can be used to amend a merge commit. -- ++ +You should understand the implications of rewriting history if you +amend a commit that has already been published. (See the "RECOVERING +FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) -i:: --include:: diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index c4dbc2ae34..3d79f05995 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -18,6 +18,9 @@ shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit. +By default (without --all or --tags) `git describe` only shows +annotated tags. For more information about creating annotated tags +see the -a and -s options to linkgit:git-tag[1]. OPTIONS ------- @@ -26,11 +29,13 @@ OPTIONS --all:: Instead of using only the annotated tags, use any ref - found in `.git/refs/`. + found in `.git/refs/`. This option enables matching + any known branch, remote branch, or lightweight tag. --tags:: Instead of using only the annotated tags, use any tag - found in `.git/refs/tags`. + found in `.git/refs/tags`. This option enables matching + a lightweight (non-annotated) tag. --contains:: Instead of finding the tag that predates the commit, find diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index b0e710d5f9..fed6de6a7f 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -36,7 +36,9 @@ the objects and will not converge with the original branch. You will not be able to easily push and distribute the rewritten branch on top of the original branch. Please do not use this command if you do not know the full implications, and avoid using it anyway, if a simple single commit -would suffice to fix your problem. +would suffice to fix your problem. (See the "RECOVERING FROM UPSTREAM +REBASE" section in linkgit:git-rebase[1] for further information about +rewriting published history.) Always verify that the rewritten version is correct: The original refs, if different from the rewritten ones, will be stored in the namespace diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index adb4ea7b1b..ac36ce8717 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -58,8 +58,10 @@ output, unless the --stdout option is specified. If -o is specified, output files are created in <dir>. Otherwise they are created in the current working directory. -If -n is specified, instead of "[PATCH] Subject", the first line -is formatted as "[PATCH n/m] Subject". +By default, the subject of a single patch is "[PATCH] First Line" and +the subject when multiple patches are output is "[PATCH n/m] First +Line". To force 1/1 to be added for a single patch, use -n. To omit +patch numbers from the subject, use -N If given --thread, 'git-format-patch' will generate In-Reply-To and References headers to make the second and subsequent patch mails appear @@ -81,7 +83,7 @@ include::diff-options.txt[] -n:: --numbered:: - Name output in '[PATCH n/m]' format. + Name output in '[PATCH n/m]' format, even with a single patch. -N:: --no-numbered:: diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 32f0f122e9..c8ad86a56f 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git rebase' [-i | --interactive] [-v | --verbose] [-m | --merge] - [-s <strategy> | --strategy=<strategy>] + [-s <strategy> | --strategy=<strategy>] [--no-verify] [-C<n>] [ --whitespace=<option>] [-p | --preserve-merges] [--onto <newbase>] <upstream> [<branch>] 'git rebase' --continue | --skip | --abort @@ -232,6 +232,9 @@ OPTIONS --verbose:: Display a diffstat of what changed upstream since the last rebase. +--no-verify:: + This option bypasses the pre-rebase hook. See also linkgit:githooks[5]. + -C<n>:: Ensure at least <n> lines of surrounding context match before and after each change. When fewer lines of surrounding @@ -250,18 +253,16 @@ OPTIONS -p:: --preserve-merges:: - Instead of ignoring merges, try to recreate them. This option - only works in interactive mode. + Instead of ignoring merges, try to recreate them. include::merge-strategies.txt[] NOTES ----- -When you rebase a branch, you are changing its history in a way that -will cause problems for anyone who already has a copy of the branch -in their repository and tries to pull updates from you. You should -understand the implications of using 'git-rebase' on a repository that -you share. + +You should understand the implications of using 'git-rebase' on a +repository that you share. See also RECOVERING FROM UPSTREAM REBASE +below. When the git-rebase command is run, it will first execute a "pre-rebase" hook if one exists. You can use this hook to do sanity checks and @@ -396,6 +397,127 @@ consistent (they compile, pass the testsuite, etc.) you should use after each commit, test, and amend the commit if fixes are necessary. +RECOVERING FROM UPSTREAM REBASE +------------------------------- + +Rebasing (or any other form of rewriting) a branch that others have +based work on is a bad idea: anyone downstream of it is forced to +manually fix their history. This section explains how to do the fix +from the downstream's point of view. The real fix, however, would be +to avoid rebasing the upstream in the first place. + +To illustrate, suppose you are in a situation where someone develops a +'subsystem' branch, and you are working on a 'topic' that is dependent +on this 'subsystem'. You might end up with a history like the +following: + +------------ + o---o---o---o---o---o---o---o---o master + \ + o---o---o---o---o subsystem + \ + *---*---* topic +------------ + +If 'subsystem' is rebased against 'master', the following happens: + +------------ + o---o---o---o---o---o---o---o master + \ \ + o---o---o---o---o o'--o'--o'--o'--o' subsystem + \ + *---*---* topic +------------ + +If you now continue development as usual, and eventually merge 'topic' +to 'subsystem', the commits from 'subsystem' will remain duplicated forever: + +------------ + o---o---o---o---o---o---o---o master + \ \ + o---o---o---o---o o'--o'--o'--o'--o'--M subsystem + \ / + *---*---*-..........-*--* topic +------------ + +Such duplicates are generally frowned upon because they clutter up +history, making it harder to follow. To clean things up, you need to +transplant the commits on 'topic' to the new 'subsystem' tip, i.e., +rebase 'topic'. This becomes a ripple effect: anyone downstream from +'topic' is forced to rebase too, and so on! + +There are two kinds of fixes, discussed in the following subsections: + +Easy case: The changes are literally the same.:: + + This happens if the 'subsystem' rebase was a simple rebase and + had no conflicts. + +Hard case: The changes are not the same.:: + + This happens if the 'subsystem' rebase had conflicts, or used + `\--interactive` to omit, edit, or squash commits; or if the + upstream used one of `commit \--amend`, `reset`, or + `filter-branch`. + + +The easy case +~~~~~~~~~~~~~ + +Only works if the changes (patch IDs based on the diff contents) on +'subsystem' are literally the same before and after the rebase +'subsystem' did. + +In that case, the fix is easy because 'git-rebase' knows to skip +changes that are already present in the new upstream. So if you say +(assuming you're on 'topic') +------------ + $ git rebase subsystem +------------ +you will end up with the fixed history +------------ + o---o---o---o---o---o---o---o master + \ + o'--o'--o'--o'--o' subsystem + \ + *---*---* topic +------------ + + +The hard case +~~~~~~~~~~~~~ + +Things get more complicated if the 'subsystem' changes do not exactly +correspond to the ones before the rebase. + +NOTE: While an "easy case recovery" sometimes appears to be successful + even in the hard case, it may have unintended consequences. For + example, a commit that was removed via `git rebase + \--interactive` will be **resurrected**! + +The idea is to manually tell 'git-rebase' "where the old 'subsystem' +ended and your 'topic' began", that is, what the old merge-base +between them was. You will have to find a way to name the last commit +of the old 'subsystem', for example: + +* With the 'subsystem' reflog: after 'git-fetch', the old tip of + 'subsystem' is at `subsystem@\{1}`. Subsequent fetches will + increase the number. (See linkgit:git-reflog[1].) + +* Relative to the tip of 'topic': knowing that your 'topic' has three + commits, the old tip of 'subsystem' must be `topic~3`. + +You can then transplant the old `subsystem..topic` to the new tip by +saying (for the reflog case, and assuming you are on 'topic' already): +------------ + $ git rebase --onto subsystem subsystem@{1} +------------ + +The ripple effect of a "hard case" recovery is especially bad: +'everyone' downstream from 'topic' will now have to perform a "hard +case" recovery too! + + Authors ------ Written by Junio C Hamano <gitster@pobox.com> and diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 6abaeac28c..52aab5e680 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -82,7 +82,9 @@ $ git reset --hard HEAD~3 <1> + <1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad and you do not want to ever see them again. Do *not* do this if -you have already given these commits to somebody else. +you have already given these commits to somebody else. (See the +"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for +the implications of doing so.) Undo a commit, making it a topic branch:: + diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt index 660904686c..bab0f34b45 100644 --- a/Documentation/gittutorial-2.txt +++ b/Documentation/gittutorial-2.txt @@ -32,22 +32,27 @@ Initialized empty Git repository in .git/ $ echo 'hello world' > file.txt $ git add . $ git commit -a -m "initial commit" -Created initial commit 54196cc2703dc165cbd373a65a4dcf22d50ae7f7 +[master (root-commit)] created 54196cc: "initial commit" + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 file.txt $ echo 'hello world!' >file.txt $ git commit -a -m "add emphasis" -Created commit c4d59f390b9cfd4318117afde11d601c1085f241 +[master] created c4d59f3: "add emphasis" + 1 files changed, 1 insertions(+), 1 deletions(-) ------------------------------------------------ -What are the 40 digits of hex that git responded to the commit with? +What are the 7 digits of hex that git responded to the commit with? We saw in part one of the tutorial that commits have names like this. It turns out that every object in the git history is stored under -such a 40-digit hex name. That name is the SHA1 hash of the object's +a 40-digit hex name. That name is the SHA1 hash of the object's contents; among other things, this ensures that git will never store the same data twice (since identical data is given an identical SHA1 name), and that the contents of a git object will never change (since -that would change the object's name as well). +that would change the object's name as well). The 7 char hex strings +here are simply the abbreviation of such 40 character long strings. +Abbreviations can be used everywhere where the 40 character strings +can be used, so long as they are unambiguous. It is expected that the content of the commit object you created while following the example above generates a different SHA1 hash than diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt new file mode 100644 index 0000000000..2b021e3c15 --- /dev/null +++ b/Documentation/gitworkflows.txt @@ -0,0 +1,364 @@ +gitworkflows(7) +=============== + +NAME +---- +gitworkflows - An overview of recommended workflows with git + +SYNOPSIS +-------- +git * + + +DESCRIPTION +----------- + +This document attempts to write down and motivate some of the workflow +elements used for `git.git` itself. Many ideas apply in general, +though the full workflow is rarely required for smaller projects with +fewer people involved. + +We formulate a set of 'rules' for quick reference, while the prose +tries to motivate each of them. Do not always take them literally; +you should value good reasons for your actions higher than manpages +such as this one. + + +SEPARATE CHANGES +---------------- + +As a general rule, you should try to split your changes into small +logical steps, and commit each of them. They should be consistent, +working independently of any later commits, pass the test suite, etc. +This makes the review process much easier, and the history much more +useful for later inspection and analysis, for example with +linkgit:git-blame[1] and linkgit:git-bisect[1]. + +To achieve this, try to split your work into small steps from the very +beginning. It is always easier to squash a few commits together than +to split one big commit into several. Don't be afraid of making too +small or imperfect steps along the way. You can always go back later +and edit the commits with `git rebase \--interactive` before you +publish them. You can use `git stash save \--keep-index` to run the +test suite independent of other uncommitted changes; see the EXAMPLES +section of linkgit:git-stash[1]. + + +MANAGING BRANCHES +----------------- + +There are two main tools that can be used to include changes from one +branch on another: linkgit:git-merge[1] and +linkgit:git-cherry-pick[1]. + +Merges have many advantages, so we try to solve as many problems as +possible with merges alone. Cherry-picking is still occasionally +useful; see "Merging upwards" below for an example. + +Most importantly, merging works at the branch level, while +cherry-picking works at the commit level. This means that a merge can +carry over the changes from 1, 10, or 1000 commits with equal ease, +which in turn means the workflow scales much better to a large number +of contributors (and contributions). Merges are also easier to +understand because a merge commit is a "promise" that all changes from +all its parents are now included. + +There is a tradeoff of course: merges require a more careful branch +management. The following subsections discuss the important points. + + +Graduation +~~~~~~~~~~ + +As a given feature goes from experimental to stable, it also +"graduates" between the corresponding branches of the software. +`git.git` uses the following 'integration branches': + +* 'maint' tracks the commits that should go into the next "maintenance + release", i.e., update of the last released stable version; + +* 'master' tracks the commits that should go into the next release; + +* 'next' is intended as a testing branch for topics being tested for + stability for master. + +There is a fourth official branch that is used slightly differently: + +* 'pu' (proposed updates) is an integration branch for things that are + not quite ready for inclusion yet (see "Integration Branches" + below). + +Each of the four branches is usually a direct descendant of the one +above it. + +Conceptually, the feature enters at an unstable branch (usually 'next' +or 'pu'), and "graduates" to 'master' for the next release once it is +considered stable enough. + + +Merging upwards +~~~~~~~~~~~~~~~ + +The "downwards graduation" discussed above cannot be done by actually +merging downwards, however, since that would merge 'all' changes on +the unstable branch into the stable one. Hence the following: + +.Merge upwards +[caption="Rule: "] +===================================== +Always commit your fixes to the oldest supported branch that require +them. Then (periodically) merge the integration branches upwards into each +other. +===================================== + +This gives a very controlled flow of fixes. If you notice that you +have applied a fix to e.g. 'master' that is also required in 'maint', +you will need to cherry-pick it (using linkgit:git-cherry-pick[1]) +downwards. This will happen a few times and is nothing to worry about +unless you do it very frequently. + + +Topic branches +~~~~~~~~~~~~~~ + +Any nontrivial feature will require several patches to implement, and +may get extra bugfixes or improvements during its lifetime. + +Committing everything directly on the integration branches leads to many +problems: Bad commits cannot be undone, so they must be reverted one +by one, which creates confusing histories and further error potential +when you forget to revert part of a group of changes. Working in +parallel mixes up the changes, creating further confusion. + +Use of "topic branches" solves these problems. The name is pretty +self explanatory, with a caveat that comes from the "merge upwards" +rule above: + +.Topic branches +[caption="Rule: "] +===================================== +Make a side branch for every topic (feature, bugfix, ...). Fork it off +at the oldest integration branch that you will eventually want to merge it +into. +===================================== + +Many things can then be done very naturally: + +* To get the feature/bugfix into an integration branch, simply merge + it. If the topic has evolved further in the meantime, merge again. + (Note that you do not necessarily have to merge it to the oldest + integration branch first. For example, you can first merge a bugfix + to 'next', give it some testing time, and merge to 'maint' when you + know it is stable.) + +* If you find you need new features from the branch 'other' to continue + working on your topic, merge 'other' to 'topic'. (However, do not + do this "just habitually", see below.) + +* If you find you forked off the wrong branch and want to move it + "back in time", use linkgit:git-rebase[1]. + +Note that the last point clashes with the other two: a topic that has +been merged elsewhere should not be rebased. See the section on +RECOVERING FROM UPSTREAM REBASE in linkgit:git-rebase[1]. + +We should point out that "habitually" (regularly for no real reason) +merging an integration branch into your topics -- and by extension, +merging anything upstream into anything downstream on a regular basis +-- is frowned upon: + +.Merge to downstream only at well-defined points +[caption="Rule: "] +===================================== +Do not merge to downstream except with a good reason: upstream API +changes affect your branch; your branch no longer merges to upstream +cleanly; etc. +===================================== + +Otherwise, the topic that was merged to suddenly contains more than a +single (well-separated) change. The many resulting small merges will +greatly clutter up history. Anyone who later investigates the history +of a file will have to find out whether that merge affected the topic +in development. An upstream might even inadvertently be merged into a +"more stable" branch. And so on. + + +Throw-away integration +~~~~~~~~~~~~~~~~~~~~~~ + +If you followed the last paragraph, you will now have many small topic +branches, and occasionally wonder how they interact. Perhaps the +result of merging them does not even work? But on the other hand, we +want to avoid merging them anywhere "stable" because such merges +cannot easily be undone. + +The solution, of course, is to make a merge that we can undo: merge +into a throw-away branch. + +.Throw-away integration branches +[caption="Rule: "] +===================================== +To test the interaction of several topics, merge them into a +throw-away branch. You must never base any work on such a branch! +===================================== + +If you make it (very) clear that this branch is going to be deleted +right after the testing, you can even publish this branch, for example +to give the testers a chance to work with it, or other developers a +chance to see if their in-progress work will be compatible. `git.git` +has such an official throw-away integration branch called 'pu'. + + +DISTRIBUTED WORKFLOWS +--------------------- + +After the last section, you should know how to manage topics. In +general, you will not be the only person working on the project, so +you will have to share your work. + +Roughly speaking, there are two important workflows: merge and patch. +The important difference is that the merge workflow can propagate full +history, including merges, while patches cannot. Both workflows can +be used in parallel: in `git.git`, only subsystem maintainers use +the merge workflow, while everyone else sends patches. + +Note that the maintainer(s) may impose restrictions, such as +"Signed-off-by" requirements, that all commits/patches submitted for +inclusion must adhere to. Consult your project's documentation for +more information. + + +Merge workflow +~~~~~~~~~~~~~~ + +The merge workflow works by copying branches between upstream and +downstream. Upstream can merge contributions into the official +history; downstream base their work on the official history. + +There are three main tools that can be used for this: + +* linkgit:git-push[1] copies your branches to a remote repository, + usually to one that can be read by all involved parties; + +* linkgit:git-fetch[1] that copies remote branches to your repository; + and + +* linkgit:git-pull[1] that does fetch and merge in one go. + +Note the last point. Do 'not' use 'git-pull' unless you actually want +to merge the remote branch. + +Getting changes out is easy: + +.Push/pull: Publishing branches/topics +[caption="Recipe: "] +===================================== +`git push <remote> <branch>` and tell everyone where they can fetch +from. +===================================== + +You will still have to tell people by other means, such as mail. (Git +provides the linkgit:git-request-pull[1] to send preformatted pull +requests to upstream maintainers to simplify this task.) + +If you just want to get the newest copies of the integration branches, +staying up to date is easy too: + +.Push/pull: Staying up to date +[caption="Recipe: "] +===================================== +Use `git fetch <remote>` or `git remote update` to stay up to date. +===================================== + +Then simply fork your topic branches from the stable remotes as +explained earlier. + +If you are a maintainer and would like to merge other people's topic +branches to the integration branches, they will typically send a +request to do so by mail. Such a request looks like + +------------------------------------- +Please pull from + <url> <branch> +------------------------------------- + +In that case, 'git-pull' can do the fetch and merge in one go, as +follows. + +.Push/pull: Merging remote topics +[caption="Recipe: "] +===================================== +`git pull <url> <branch>` +===================================== + +Occasionally, the maintainer may get merge conflicts when he tries to +pull changes from downstream. In this case, he can ask downstream to +do the merge and resolve the conflicts themselves (perhaps they will +know better how to resolve them). It is one of the rare cases where +downstream 'should' merge from upstream. + + +Patch workflow +~~~~~~~~~~~~~~ + +If you are a contributor that sends changes upstream in the form of +emails, you should use topic branches as usual (see above). Then use +linkgit:git-format-patch[1] to generate the corresponding emails +(highly recommended over manually formatting them because it makes the +maintainer's life easier). + +.format-patch/am: Publishing branches/topics +[caption="Recipe: "] +===================================== +* `git format-patch -M upstream..topic` to turn them into preformatted + patch files +* `git send-email --to=<recipient> <patches>` +===================================== + +See the linkgit:git-format-patch[1] and linkgit:git-send-email[1] +manpages for further usage notes. + +If the maintainer tells you that your patch no longer applies to the +current upstream, you will have to rebase your topic (you cannot use a +merge because you cannot format-patch merges): + +.format-patch/am: Keeping topics up to date +[caption="Recipe: "] +===================================== +`git pull --rebase <url> <branch>` +===================================== + +You can then fix the conflicts during the rebase. Presumably you have +not published your topic other than by mail, so rebasing it is not a +problem. + +If you receive such a patch series (as maintainer, or perhaps as a +reader of the mailing list it was sent to), save the mails to files, +create a new topic branch and use 'git-am' to import the commits: + +.format-patch/am: Importing patches +[caption="Recipe: "] +===================================== +`git am < patch` +===================================== + +One feature worth pointing out is the three-way merge, which can help +if you get conflicts: `git am -3` will use index information contained +in patches to figure out the merge base. See linkgit:git-am[1] for +other options. + + +SEE ALSO +-------- +linkgit:gittutorial[7], +linkgit:git-push[1], +linkgit:git-pull[1], +linkgit:git-merge[1], +linkgit:git-rebase[1], +linkgit:git-format-patch[1], +linkgit:git-send-email[1], +linkgit:git-am[1] + +GIT +--- +Part of the linkgit:git[1] suite. @@ -168,5 +168,6 @@ void remove_branch_state(void) unlink(git_path("MERGE_HEAD")); unlink(git_path("MERGE_RR")); unlink(git_path("MERGE_MSG")); + unlink(git_path("MERGE_MODE")); unlink(git_path("SQUASH_MSG")); } diff --git a/builtin-check-attr.c b/builtin-check-attr.c index cb783fc77e..4921341e33 100644 --- a/builtin-check-attr.c +++ b/builtin-check-attr.c @@ -2,21 +2,84 @@ #include "cache.h" #include "attr.h" #include "quote.h" +#include "parse-options.h" -static const char check_attr_usage[] = -"git check-attr attr... [--] pathname..."; +static int stdin_paths; +static const char * const check_attr_usage[] = { +"git check-attr attr... [--] pathname...", +"git check-attr --stdin attr... < <list-of-paths>", +NULL +}; + +static int null_term_line; + +static const struct option check_attr_options[] = { + OPT_BOOLEAN(0 , "stdin", &stdin_paths, "read file names from stdin"), + OPT_BOOLEAN('z', NULL, &null_term_line, + "input paths are terminated by a null character"), + OPT_END() +}; + +static void check_attr(int cnt, struct git_attr_check *check, + const char** name, const char *file) +{ + int j; + if (git_checkattr(file, cnt, check)) + die("git_checkattr died"); + for (j = 0; j < cnt; j++) { + const char *value = check[j].value; + + if (ATTR_TRUE(value)) + value = "set"; + else if (ATTR_FALSE(value)) + value = "unset"; + else if (ATTR_UNSET(value)) + value = "unspecified"; + + quote_c_style(file, NULL, stdout, 0); + printf(": %s: %s\n", name[j], value); + } +} + +static void check_attr_stdin_paths(int cnt, struct git_attr_check *check, + const char** name) +{ + struct strbuf buf, nbuf; + int line_termination = null_term_line ? 0 : '\n'; + + strbuf_init(&buf, 0); + strbuf_init(&nbuf, 0); + while (strbuf_getline(&buf, stdin, line_termination) != EOF) { + if (line_termination && buf.buf[0] == '"') { + strbuf_reset(&nbuf); + if (unquote_c_style(&nbuf, buf.buf, NULL)) + die("line is badly quoted"); + strbuf_swap(&buf, &nbuf); + } + check_attr(cnt, check, name, buf.buf); + maybe_flush_or_die(stdout, "attribute to stdout"); + } + strbuf_release(&buf); + strbuf_release(&nbuf); +} int cmd_check_attr(int argc, const char **argv, const char *prefix) { struct git_attr_check *check; int cnt, i, doubledash; + const char *errstr = NULL; + + argc = parse_options(argc, argv, check_attr_options, check_attr_usage, + PARSE_OPT_KEEP_DASHDASH); + if (!argc) + usage_with_options(check_attr_usage, check_attr_options); if (read_cache() < 0) { die("invalid cache"); } doubledash = -1; - for (i = 1; doubledash < 0 && i < argc; i++) { + for (i = 0; doubledash < 0 && i < argc; i++) { if (!strcmp(argv[i], "--")) doubledash = i; } @@ -24,41 +87,37 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix) /* If there is no double dash, we handle only one attribute */ if (doubledash < 0) { cnt = 1; - doubledash = 1; + doubledash = 0; } else - cnt = doubledash - 1; + cnt = doubledash; doubledash++; - if (cnt <= 0 || argc < doubledash) - usage(check_attr_usage); + if (cnt <= 0) + errstr = "No attribute specified"; + else if (stdin_paths && doubledash < argc) + errstr = "Can't specify files with --stdin"; + if (errstr) { + error (errstr); + usage_with_options(check_attr_usage, check_attr_options); + } + check = xcalloc(cnt, sizeof(*check)); for (i = 0; i < cnt; i++) { const char *name; struct git_attr *a; - name = argv[i + 1]; + name = argv[i]; a = git_attr(name, strlen(name)); if (!a) return error("%s: not a valid attribute name", name); check[i].attr = a; } - for (i = doubledash; i < argc; i++) { - int j; - if (git_checkattr(argv[i], cnt, check)) - die("git_checkattr died"); - for (j = 0; j < cnt; j++) { - const char *value = check[j].value; - - if (ATTR_TRUE(value)) - value = "set"; - else if (ATTR_FALSE(value)) - value = "unset"; - else if (ATTR_UNSET(value)) - value = "unspecified"; - - quote_c_style(argv[i], NULL, stdout, 0); - printf(": %s: %s\n", argv[j+1], value); - } + if (stdin_paths) + check_attr_stdin_paths(cnt, check, argv); + else { + for (i = doubledash; i < argc; i++) + check_attr(cnt, check, argv, argv[i]); + maybe_flush_or_die(stdout, "attribute to stdout"); } return 0; } diff --git a/builtin-checkout.c b/builtin-checkout.c index ad04a184a2..57b94d2829 100644 --- a/builtin-checkout.c +++ b/builtin-checkout.c @@ -635,9 +635,6 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) git_xmerge_config("merge.conflictstyle", conflict_style, NULL); } - if (!opts.new_branch && (opts.track != git_branch_track)) - die("git checkout: --track and --no-track require -b"); - if (opts.force && opts.merge) die("git checkout: -f and -m are incompatible"); diff --git a/builtin-clone.c b/builtin-clone.c index 1ddc14b9c7..8e1a1d3995 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -38,9 +38,11 @@ static int option_local, option_no_hardlinks, option_shared; static char *option_template, *option_reference, *option_depth; static char *option_origin = NULL; static char *option_upload_pack = "git-upload-pack"; +static int option_verbose; static struct option builtin_clone_options[] = { OPT__QUIET(&option_quiet), + OPT__VERBOSE(&option_verbose), OPT_BOOLEAN('n', "no-checkout", &option_no_checkout, "don't create a checkout"), OPT_BOOLEAN(0, "bare", &option_bare, "create a bare repository"), @@ -504,6 +506,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_quiet) transport->verbose = -1; + else if (option_verbose) + transport->progress = 1; if (option_upload_pack) transport_set_option(transport, TRANS_OPT_UPLOADPACK, diff --git a/builtin-commit.c b/builtin-commit.c index a2755dc3be..33b659edce 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -879,6 +879,9 @@ static void print_summary(const char *prefix, const unsigned char *sha1) { struct rev_info rev; struct commit *commit; + static const char *format = "format:%h: \"%s\""; + unsigned char junk_sha1[20]; + const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL); commit = lookup_commit(sha1); if (!commit) @@ -896,18 +899,24 @@ static void print_summary(const char *prefix, const unsigned char *sha1) rev.verbose_header = 1; rev.show_root_diff = 1; - get_commit_format("format:%h: %s", &rev); + get_commit_format(format, &rev); rev.always_show_header = 0; rev.diffopt.detect_rename = 1; rev.diffopt.rename_limit = 100; rev.diffopt.break_opt = 0; diff_setup_done(&rev.diffopt); - printf("Created %scommit ", initial_commit ? "initial " : ""); + printf("[%s%s]: created ", + !prefixcmp(head, "refs/heads/") ? + head + 11 : + !strcmp(head, "HEAD") ? + "detached HEAD" : + head, + initial_commit ? " (root-commit)" : ""); if (!log_tree_commit(&rev, commit)) { struct strbuf buf = STRBUF_INIT; - format_commit_message(commit, "%h: %s", &buf, DATE_NORMAL); + format_commit_message(commit, format + 7, &buf, DATE_NORMAL); printf("%s\n", buf.buf); strbuf_release(&buf); } @@ -934,6 +943,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix) unsigned char commit_sha1[20]; struct ref_lock *ref_lock; struct commit_list *parents = NULL, **pptr = &parents; + struct stat statbuf; + int allow_fast_forward = 1; git_config(git_commit_config, NULL); @@ -980,13 +991,22 @@ int cmd_commit(int argc, const char **argv, const char *prefix) } fclose(fp); strbuf_release(&m); + if (!stat(git_path("MERGE_MODE"), &statbuf)) { + if (strbuf_read_file(&sb, git_path("MERGE_MODE"), 0) < 0) + die("could not read MERGE_MODE: %s", + strerror(errno)); + if (!strcmp(sb.buf, "no-ff")) + allow_fast_forward = 0; + } + if (allow_fast_forward) + parents = reduce_heads(parents); } else { reflog_msg = "commit"; pptr = &commit_list_insert(lookup_commit(head_sha1), pptr)->next; } - parents = reduce_heads(parents); /* Finally, get the commit message */ + strbuf_reset(&sb); if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0) { rollback_index_files(); die("could not read commit message"); @@ -1035,6 +1055,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) unlink(git_path("MERGE_HEAD")); unlink(git_path("MERGE_MSG")); + unlink(git_path("MERGE_MODE")); unlink(git_path("SQUASH_MSG")); if (commit_index_files()) diff --git a/builtin-describe.c b/builtin-describe.c index ec404c839b..d2cfb1b083 100644 --- a/builtin-describe.c +++ b/builtin-describe.c @@ -15,8 +15,8 @@ static const char * const describe_usage[] = { }; static int debug; /* Display lots of verbose info */ -static int all; /* Default to annotated tags only */ -static int tags; /* But allow any tags if --tags is specified */ +static int all; /* Any valid ref can be used */ +static int tags; /* Allow lightweight tags */ static int longformat; static int abbrev = DEFAULT_ABBREV; static int max_candidates = 10; @@ -112,8 +112,6 @@ static int compare_pt(const void *a_, const void *b_) { struct possible_tag *a = (struct possible_tag *)a_; struct possible_tag *b = (struct possible_tag *)b_; - if (a->name->prio != b->name->prio) - return b->name->prio - a->name->prio; if (a->depth != b->depth) return a->depth - b->depth; if (a->found_order != b->found_order) diff --git a/builtin-log.c b/builtin-log.c index 794821f6bc..a0944f70a4 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -426,7 +426,7 @@ static int istitlechar(char c) static const char *fmt_patch_suffix = ".patch"; static int numbered = 0; -static int auto_number = 0; +static int auto_number = 1; static char **extra_hdr; static int extra_hdr_nr; @@ -485,6 +485,7 @@ static int git_format_config(const char *var, const char *value, void *cb) return 0; } numbered = git_config_bool(var, value); + auto_number = auto_number && numbered; return 0; } diff --git a/builtin-merge.c b/builtin-merge.c index 5e2b7f12c3..5e7910bd8d 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -179,6 +179,7 @@ static void drop_save(void) { unlink(git_path("MERGE_HEAD")); unlink(git_path("MERGE_MSG")); + unlink(git_path("MERGE_MODE")); } static void save_state(void) @@ -1210,6 +1211,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix) merge_msg.len) die("Could not write to %s", git_path("MERGE_MSG")); close(fd); + fd = open(git_path("MERGE_MODE"), O_WRONLY | O_CREAT | O_TRUNC, 0666); + if (fd < 0) + die("Could open %s for writing", git_path("MERGE_MODE")); + strbuf_reset(&buf); + if (!allow_fast_forward) + strbuf_addf(&buf, "no-ff"); + if (write_in_full(fd, buf.buf, buf.len) != buf.len) + die("Could not write to %s", git_path("MERGE_MODE")); + close(fd); } if (merge_was_ok) { diff --git a/compat/cygwin.c b/compat/cygwin.c index 423ff20b0e..f1967532ba 100644 --- a/compat/cygwin.c +++ b/compat/cygwin.c @@ -91,22 +91,32 @@ static int cygwin_stat(const char *path, struct stat *buf) * functions should be used. The choice is determined by core.ignorecygwinfstricks. * Reading this option is not always possible immediately as git_dir may be * not be set yet. So until it is set, use cygwin lstat/stat functions. + * However, if the trust_executable_bit is set, we must use the Cygwin posix + * stat/lstat as the Windows stat fuctions do not determine posix filemode. */ static int native_stat = 1; +extern int trust_executable_bit; static int git_cygwin_config(const char *var, const char *value, void *cb) { - if (!strcmp(var, "core.ignorecygwinfstricks")) + if (!strcmp(var, "core.ignorecygwinfstricks")) { native_stat = git_config_bool(var, value); - return 0; + return 0; + } + return git_default_config(var, value, cb); } static int init_stat(void) { if (have_git_dir()) { git_config(git_cygwin_config, NULL); - cygwin_stat_fn = native_stat ? cygwin_stat : stat; - cygwin_lstat_fn = native_stat ? cygwin_lstat : lstat; + if (!trust_executable_bit && native_stat) { + cygwin_stat_fn = cygwin_stat; + cygwin_lstat_fn = cygwin_lstat; + } else { + cygwin_stat_fn = stat; + cygwin_lstat_fn = lstat; + } return 0; } return 1; diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index d192927c20..eebe73409b 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -881,6 +881,7 @@ _git_help () attributes cli core-tutorial cvs-migration diffcore gitk glossary hooks ignore modules repository-layout tutorial tutorial-2 + workflows " } diff --git a/contrib/stats/packinfo.pl b/contrib/stats/packinfo.pl index f4a7b62cd9..be188c0f11 100755 --- a/contrib/stats/packinfo.pl +++ b/contrib/stats/packinfo.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl # # This tool will print vaguely pretty information about a pack. It -# expects the output of "git-verify-pack -v" as input on stdin. +# expects the output of "git verify-pack -v" as input on stdin. # -# $ git-verify-pack -v | packinfo.pl +# $ git verify-pack -v | packinfo.pl # # This prints some full-pack statistics; currently "all sizes", "all # path sizes", "tree sizes", "tree path sizes", and "depths". @@ -20,7 +20,7 @@ # # When run as: # -# $ git-verify-pack -v | packinfo.pl -tree +# $ git verify-pack -v | packinfo.pl -tree # # the trees of objects are output along with the stats. This looks # like: @@ -43,7 +43,7 @@ # # When run as: # -# $ git-verify-pack -v | packinfo.pl -tree -filenames +# $ git verify-pack -v | packinfo.pl -tree -filenames # # it adds filenames to the tree. Getting this information is slow: # @@ -58,7 +58,7 @@ # # When run as: # -# $ git-verify-pack -v | packinfo.pl -dump +# $ git verify-pack -v | packinfo.pl -dump # # it prints out "sha1 size pathsize depth" for each sha1 in lexical # order. @@ -106,7 +106,7 @@ while (<STDIN>) { } if ($filenames && ($tree || $dump)) { - open(NAMES, "git-name-rev --all|"); + open(NAMES, "git name-rev --all|"); while (<NAMES>) { if (/^(\S+)\s+(.*)$/) { my ($sha1, $name) = ($1, $2); @@ -117,7 +117,7 @@ if ($filenames && ($tree || $dump)) { for my $commit (@commits) { my $name = $names{$commit}; - open(TREE, "git-ls-tree -t -r $commit|"); + open(TREE, "git ls-tree -t -r $commit|"); print STDERR "Plumbing tree $name\n"; while (<TREE>) { if (/^(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/) { diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 124cb5846b..39f8d73dfa 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -26,6 +26,7 @@ i,interactive always used (no-op) continue continue rebasing process abort abort rebasing process and restore original branch skip skip current patch and continue rebasing process +no-verify override pre-rebase hook from stopping the operation " . git-sh-setup @@ -37,10 +38,12 @@ DONE="$DOTEST"/done MSG="$DOTEST"/message SQUASH_MSG="$DOTEST"/message-squash REWRITTEN="$DOTEST"/rewritten +DROPPED="$DOTEST"/dropped PRESERVE_MERGES= STRATEGY= ONTO= VERBOSE= +OK_TO_SKIP_PRE_REBASE= GIT_CHERRY_PICK_HELP=" After resolving the conflicts, mark the corrected paths with 'git add <paths>', and @@ -66,7 +69,8 @@ output () { } run_pre_rebase_hook () { - if test -x "$GIT_DIR/hooks/pre-rebase" + if test -z "$OK_TO_SKIP_PRE_REBASE" && + test -x "$GIT_DIR/hooks/pre-rebase" then "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || { echo >&2 "The pre-rebase hook refused to rebase." @@ -179,8 +183,12 @@ pick_one_preserving_merges () { # rewrite parents; if none were rewritten, we can fast-forward. new_parents= - for p in $(git rev-list --parents -1 $sha1 | cut -d' ' -f2-) + pend=" $(git rev-list --parents -1 $sha1 | cut -d' ' -f2-)" + while [ "$pend" != "" ] do + p=$(expr "$pend" : ' \([^ ]*\)') + pend="${pend# $p}" + if test -f "$REWRITTEN"/$p then new_p=$(cat "$REWRITTEN"/$p) @@ -193,7 +201,13 @@ pick_one_preserving_merges () { ;; esac else - new_parents="$new_parents $p" + if test -f "$DROPPED"/$p + then + fast_forward=f + pend=" $(cat "$DROPPED"/$p)$pend" + else + new_parents="$new_parents $p" + fi fi done case $fast_forward in @@ -421,6 +435,11 @@ get_saved_options () { while test $# != 0 do case "$1" in + --no-verify) + OK_TO_SKIP_PRE_REBASE=yes + ;; + --verify) + ;; --continue) is_standalone "$@" || usage get_saved_options @@ -599,6 +618,28 @@ first and then run 'git rebase --continue' again." # EOF + # Watch for commits that been dropped by --cherry-pick + if test t = "$PRESERVE_MERGES" + then + mkdir "$DROPPED" + # drop the --cherry-pick parameter this time + git rev-list $MERGES_OPTION --abbrev-commit \ + --abbrev=7 $UPSTREAM...$HEAD --left-right | \ + sed -n "s/^>//p" | while read rev + do + grep --quiet "$rev" "$TODO" + if [ $? -ne 0 ] + then + # Use -f2 because if rev-list is telling this commit is not + # worthwhile, we don't want to track its multiple heads, + # just the history of its first-parent for others that will + # be rebasing on top of us + full=$(git rev-parse $rev) + git rev-list --parents -1 $rev | cut -d' ' -f2 > "$DROPPED"/$full + fi + done + fi + has_action "$TODO" || die_abort "Nothing to do" diff --git a/git-rebase.sh b/git-rebase.sh index a30d40c005..023a6dc94a 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -34,6 +34,7 @@ set_reflog_action rebase require_work_tree cd_to_toplevel +OK_TO_SKIP_PRE_REBASE= RESOLVEMSG=" When you have resolved this problem run \"git rebase --continue\". If you would prefer to skip this patch, instead run \"git rebase --skip\". @@ -138,14 +139,31 @@ finish_rb_merge () { } is_interactive () { - test -f "$dotest"/interactive || - while :; do case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac + while test $# != 0 + do + case "$1" in + -i|--interactive) + interactive_rebase=explicit + break + ;; + -p|--preserve-merges) + interactive_rebase=implied + ;; + esac shift - done && test -n "$1" + done + + if [ "$interactive_rebase" = implied ]; then + GIT_EDITOR=: + export GIT_EDITOR + fi + + test -n "$interactive_rebase" || test -f "$dotest"/interactive } run_pre_rebase_hook () { - if test -x "$GIT_DIR/hooks/pre-rebase" + if test -z "$OK_TO_SKIP_PRE_REBASE" && + test -x "$GIT_DIR/hooks/pre-rebase" then "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || { echo >&2 "The pre-rebase hook refused to rebase." @@ -170,6 +188,9 @@ fi while test $# != 0 do case "$1" in + --no-verify) + OK_TO_SKIP_PRE_REBASE=yes + ;; --continue) test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply || die "No rebase in progress?" diff --git a/gitk-git/gitk b/gitk-git/gitk index 2eaa2ae7d6..bcebc87f7d 100644 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -269,7 +269,7 @@ proc parseviewrevs {view revs} { lappend badrev $line } } - error_popup "Error parsing revisions: $err" + error_popup "[mc "Error parsing revisions:"] $err" return {} } set ret {} @@ -307,7 +307,7 @@ proc start_rev_list {view} { global startmsecs commitidx viewcomplete curview global tclencoding global viewargs viewargscmd viewfiles vfilelimit - global showlocalchanges commitinterest + global showlocalchanges global viewactive viewinstances vmergeonly global mainheadid global vcanopt vflags vrevs vorigargs @@ -324,7 +324,7 @@ proc start_rev_list {view} { if {[catch { set str [exec sh -c $viewargscmd($view)] } err]} { - error_popup "Error executing --argscmd command: $err" + error_popup "[mc "Error executing --argscmd command:"] $err" return 0 } set args [concat $args [split $str "\n"]] @@ -368,7 +368,7 @@ proc start_rev_list {view} { set i [reg_instance $fd] set viewinstances($view) [list $i] if {$showlocalchanges && $mainheadid ne {}} { - lappend commitinterest($mainheadid) {dodiffindex} + interestedin $mainheadid dodiffindex } fconfigure $fd -blocking 0 -translation lf -eofchar {} if {$tclencoding != {}} { @@ -500,7 +500,7 @@ proc updatecommits {} { set fd [open [concat | git log --no-color -z --pretty=raw --parents \ --boundary $args "--" $vfilelimit($view)] r] } err]} { - error_popup "Error executing git log: $err" + error_popup "[mc "Error executing git log:"] $err" return } if {$viewactive($view) == 0} { @@ -1231,7 +1231,7 @@ proc commitonrow {row} { proc closevarcs {v} { global varctok varccommits varcid parents children - global cmitlisted commitidx commitinterest vtokmod + global cmitlisted commitidx vtokmod set missing_parents 0 set scripts {} @@ -1256,12 +1256,7 @@ proc closevarcs {v} { } lappend varccommits($v,$b) $p incr commitidx($v) - if {[info exists commitinterest($p)]} { - foreach script $commitinterest($p) { - lappend scripts [string map [list "%I" $p] $script] - } - unset commitinterest($id) - } + set scripts [check_interest $p $scripts] } } if {$missing_parents > 0} { @@ -1297,8 +1292,41 @@ proc rewrite_commit {v id rwid} { } } +# Mechanism for registering a command to be executed when we come +# across a particular commit. To handle the case when only the +# prefix of the commit is known, the commitinterest array is now +# indexed by the first 4 characters of the ID. Each element is a +# list of id, cmd pairs. +proc interestedin {id cmd} { + global commitinterest + + lappend commitinterest([string range $id 0 3]) $id $cmd +} + +proc check_interest {id scripts} { + global commitinterest + + set prefix [string range $id 0 3] + if {[info exists commitinterest($prefix)]} { + set newlist {} + foreach {i script} $commitinterest($prefix) { + if {[string match "$i*" $id]} { + lappend scripts [string map [list "%I" $id "%P" $i] $script] + } else { + lappend newlist $i $script + } + } + if {$newlist ne {}} { + set commitinterest($prefix) $newlist + } else { + unset commitinterest($prefix) + } + } + return $scripts +} + proc getcommitlines {fd inst view updating} { - global cmitlisted commitinterest leftover + global cmitlisted leftover global commitidx commitdata vdatemode global parents children curview hlview global idpending ordertok @@ -1474,12 +1502,7 @@ proc getcommitlines {fd inst view updating} { incr i } - if {[info exists commitinterest($id)]} { - foreach script $commitinterest($id) { - lappend scripts [string map [list "%I" $id] $script] - } - unset commitinterest($id) - } + set scripts [check_interest $id $scripts] set gotsome 1 } if {$gotsome} { @@ -1608,6 +1631,19 @@ proc getcommit {id} { return 1 } +# Expand an abbreviated commit ID to a list of full 40-char IDs that match +# and are present in the current view. +# This is fairly slow... +proc longid {prefix} { + global varcid curview + + set ids {} + foreach match [array names varcid "$curview,$prefix*"] { + lappend ids [lindex [split $match ","] 1] + } + return $ids +} + proc readrefs {} { global tagids idtags headids idheads tagobjid global otherrefids idotherrefs mainhead mainheadid @@ -1750,6 +1786,53 @@ proc setoptions {} { option add *Entry.font uifont startupFile } +# Make a menu and submenus. +# m is the window name for the menu, items is the list of menu items to add. +# Each item is a list {mc label type description options...} +# mc is ignored; it's so we can put mc there to alert xgettext +# label is the string that appears in the menu +# type is cascade, command or radiobutton (should add checkbutton) +# description depends on type; it's the sublist for cascade, the +# command to invoke for command, or {variable value} for radiobutton +proc makemenu {m items} { + menu $m + foreach i $items { + set name [mc [lindex $i 1]] + set type [lindex $i 2] + set thing [lindex $i 3] + set params [list $type] + if {$name ne {}} { + set u [string first "&" [string map {&& x} $name]] + lappend params -label [string map {&& & & {}} $name] + if {$u >= 0} { + lappend params -underline $u + } + } + switch -- $type { + "cascade" { + set submenu [string tolower [string map {& ""} [lindex $i 1]]] + lappend params -menu $m.$submenu + } + "command" { + lappend params -command $thing + } + "radiobutton" { + lappend params -variable [lindex $thing 0] \ + -value [lindex $thing 1] + } + } + eval $m add $params [lrange $i 4 end] + if {$type eq "cascade"} { + makemenu $m.$submenu $thing + } + } +} + +# translate string and remove ampersands +proc mca {str} { + return [string map {&& & & {}} [mc $str]] +} + proc makewindow {} { global canv canv2 canv3 linespc charspc ctext cflist cscroll global tabstop @@ -1767,33 +1850,31 @@ proc makewindow {} { global rprogitem rprogcoord rownumsel numcommits global have_tk85 - menu .bar - .bar add cascade -label [mc "File"] -menu .bar.file - menu .bar.file - .bar.file add command -label [mc "Update"] -command updatecommits - .bar.file add command -label [mc "Reload"] -command reloadcommits - .bar.file add command -label [mc "Reread references"] -command rereadrefs - .bar.file add command -label [mc "List references"] -command showrefs - .bar.file add command -label [mc "Quit"] -command doquit - menu .bar.edit - .bar add cascade -label [mc "Edit"] -menu .bar.edit - .bar.edit add command -label [mc "Preferences"] -command doprefs - - menu .bar.view - .bar add cascade -label [mc "View"] -menu .bar.view - .bar.view add command -label [mc "New view..."] -command {newview 0} - .bar.view add command -label [mc "Edit view..."] -command editview \ - -state disabled - .bar.view add command -label [mc "Delete view"] -command delview -state disabled - .bar.view add separator - .bar.view add radiobutton -label [mc "All files"] -command {showview 0} \ - -variable selectedview -value 0 - - menu .bar.help - .bar add cascade -label [mc "Help"] -menu .bar.help - .bar.help add command -label [mc "About gitk"] -command about - .bar.help add command -label [mc "Key bindings"] -command keys - .bar.help configure + # The "mc" arguments here are purely so that xgettext + # sees the following string as needing to be translated + makemenu .bar { + {mc "File" cascade { + {mc "Update" command updatecommits -accelerator F5} + {mc "Reload" command reloadcommits} + {mc "Reread references" command rereadrefs} + {mc "List references" command showrefs} + {mc "Quit" command doquit} + }} + {mc "Edit" cascade { + {mc "Preferences" command doprefs} + }} + {mc "View" cascade { + {mc "New view..." command {newview 0}} + {mc "Edit view..." command editview -state disabled} + {mc "Delete view" command delview -state disabled} + {xx "" separator} + {mc "All files" radiobutton {selectedview 0} -command {showview 0}} + }} + {mc "Help" cascade { + {mc "About gitk" command about} + {mc "Key bindings" command keys} + }} + } . configure -menu .bar # the gui has upper and lower half, parts of a paned window. @@ -2161,61 +2242,55 @@ proc makewindow {} { bind . <Destroy> {stop_backends} bind . <Button-1> "click %W" bind $fstring <Key-Return> {dofind 1 1} - bind $sha1entry <Key-Return> gotocommit + bind $sha1entry <Key-Return> {gotocommit; break} bind $sha1entry <<PasteSelection>> clearsha1 bind $cflist <1> {sel_flist %W %x %y; break} bind $cflist <B1-Motion> {sel_flist %W %x %y; break} bind $cflist <ButtonRelease-1> {treeclick %W %x %y} - bind $cflist <Button-3> {pop_flist_menu %W %X %Y %x %y} + global ctxbut + bind $cflist $ctxbut {pop_flist_menu %W %X %Y %x %y} set maincursor [. cget -cursor] set textcursor [$ctext cget -cursor] set curtextcursor $textcursor set rowctxmenu .rowctxmenu - menu $rowctxmenu -tearoff 0 - $rowctxmenu add command -label [mc "Diff this -> selected"] \ - -command {diffvssel 0} - $rowctxmenu add command -label [mc "Diff selected -> this"] \ - -command {diffvssel 1} - $rowctxmenu add command -label [mc "Make patch"] -command mkpatch - $rowctxmenu add command -label [mc "Create tag"] -command mktag - $rowctxmenu add command -label [mc "Write commit to file"] -command writecommit - $rowctxmenu add command -label [mc "Create new branch"] -command mkbranch - $rowctxmenu add command -label [mc "Cherry-pick this commit"] \ - -command cherrypick - $rowctxmenu add command -label [mc "Reset HEAD branch to here"] \ - -command resethead + makemenu $rowctxmenu { + {mc "Diff this -> selected" command {diffvssel 0}} + {mc "Diff selected -> this" command {diffvssel 1}} + {mc "Make patch" command mkpatch} + {mc "Create tag" command mktag} + {mc "Write commit to file" command writecommit} + {mc "Create new branch" command mkbranch} + {mc "Cherry-pick this commit" command cherrypick} + {mc "Reset HEAD branch to here" command resethead} + } + $rowctxmenu configure -tearoff 0 set fakerowmenu .fakerowmenu - menu $fakerowmenu -tearoff 0 - $fakerowmenu add command -label [mc "Diff this -> selected"] \ - -command {diffvssel 0} - $fakerowmenu add command -label [mc "Diff selected -> this"] \ - -command {diffvssel 1} - $fakerowmenu add command -label [mc "Make patch"] -command mkpatch -# $fakerowmenu add command -label [mc "Commit"] -command {mkcommit 0} -# $fakerowmenu add command -label [mc "Commit all"] -command {mkcommit 1} -# $fakerowmenu add command -label [mc "Revert local changes"] -command revertlocal + makemenu $fakerowmenu { + {mc "Diff this -> selected" command {diffvssel 0}} + {mc "Diff selected -> this" command {diffvssel 1}} + {mc "Make patch" command mkpatch} + } + $fakerowmenu configure -tearoff 0 set headctxmenu .headctxmenu - menu $headctxmenu -tearoff 0 - $headctxmenu add command -label [mc "Check out this branch"] \ - -command cobranch - $headctxmenu add command -label [mc "Remove this branch"] \ - -command rmbranch + makemenu $headctxmenu { + {mc "Check out this branch" command cobranch} + {mc "Remove this branch" command rmbranch} + } + $headctxmenu configure -tearoff 0 global flist_menu set flist_menu .flistctxmenu - menu $flist_menu -tearoff 0 - $flist_menu add command -label [mc "Highlight this too"] \ - -command {flist_hl 0} - $flist_menu add command -label [mc "Highlight this only"] \ - -command {flist_hl 1} - $flist_menu add command -label [mc "External diff"] \ - -command {external_diff} - $flist_menu add command -label [mc "Blame parent commit"] \ - -command {external_blame 1} + makemenu $flist_menu { + {mc "Highlight this too" command {flist_hl 0}} + {mc "Highlight this only" command {flist_hl 1}} + {mc "External diff" command {external_diff}} + {mc "Blame parent commit" command {external_blame 1}} + } + $flist_menu configure -tearoff 0 } # Windows sends all mouse wheel events to the current focused window, not @@ -2331,7 +2406,7 @@ proc savestuff {w} { global viewname viewfiles viewargs viewargscmd viewperm nextviewnum global cmitmode wrapcomment datetimeformat limitdiffs global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor - global autoselect extdifftool + global autoselect extdifftool perfile_attrs if {$stuffsaved} return if {![winfo viewable .]} return @@ -2358,6 +2433,7 @@ proc savestuff {w} { puts $f [list set diffcontext $diffcontext] puts $f [list set selectbgcolor $selectbgcolor] puts $f [list set extdifftool $extdifftool] + puts $f [list set perfile_attrs $perfile_attrs] puts $f "set geometry(main) [wm geometry .]" puts $f "set geometry(topwidth) [winfo width .tf]" @@ -2705,7 +2781,7 @@ proc treeopendir {w dir} { $w insert e:$ix $e [highlight_tag $de] } } - $w mark gravity e:$ix left + $w mark gravity e:$ix right $w conf -state disabled set treediropen($dir) 1 set top [lindex [split [$w index @0,0] .] 0] @@ -2936,7 +3012,7 @@ proc save_file_from_commit {filename output what} { if {[string match "fatal: bad revision *" $err]} { return $nullfile } - error_popup "Error getting \"$filename\" from $what: $err" + error_popup "[mc "Error getting \"%s\" from %s:" $filename $what] $err" return {} } return $output @@ -2993,7 +3069,7 @@ proc external_diff {} { set gitktmpdir [file join [file dirname $gitdir] \ [format ".gitk-tmp.%s" [pid]]] if {[catch {file mkdir $gitktmpdir} err]} { - error_popup "Error creating temporary directory $gitktmpdir: $err" + error_popup "[mc "Error creating temporary directory %s:" $gitktmpdir] $err" unset gitktmpdir return } @@ -3002,7 +3078,7 @@ proc external_diff {} { incr diffnum set diffdir [file join $gitktmpdir $diffnum] if {[catch {file mkdir $diffdir} err]} { - error_popup "Error creating temporary directory $diffdir: $err" + error_popup "[mc "Error creating temporary directory %s:" $diffdir] $err" return } @@ -3015,7 +3091,7 @@ proc external_diff {} { [list $difffromfile $difftofile]] if {[catch {set fl [open $cmd r]} err]} { file delete -force $diffdir - error_popup [mc "$extdifftool: command failed: $err"] + error_popup "$extdifftool: [mc "command failed:"] $err" } else { fconfigure $fl -blocking 0 filerun $fl [list delete_at_eof $fl $diffdir] @@ -3040,7 +3116,7 @@ proc external_blame {parent_idx} { } if {[catch {exec git gui blame $base_commit $flist_menu_file &} err]} { - error_popup [mc "git gui blame: command failed: $err"] + error_popup "[mc "git gui blame: command failed:"] $err" } } @@ -3049,7 +3125,7 @@ proc delete_at_eof {f dir} { while {[gets $f line] >= 0} {} if {[eof $f]} { if {[catch {close $f} err]} { - error_popup "External diff viewer failed: $err" + error_popup "[mc "External diff viewer failed:"] $err" } file delete -force $dir return 0 @@ -3374,8 +3450,8 @@ proc showview {n} { set curview $n set selectedview $n - .bar.view entryconf [mc "Edit view..."] -state [expr {$n == 0? "disabled": "normal"}] - .bar.view entryconf [mc "Delete view"] -state [expr {$n == 0? "disabled": "normal"}] + .bar.view entryconf [mca "Edit view..."] -state [expr {$n == 0? "disabled": "normal"}] + .bar.view entryconf [mca "Delete view"] -state [expr {$n == 0? "disabled": "normal"}] run refill_reflist if {![info exists viewcomplete($n)]} { @@ -4079,7 +4155,7 @@ proc visiblerows {} { proc layoutmore {} { global commitidx viewcomplete curview global numcommits pending_select curview - global lastscrollset lastscrollrows commitinterest + global lastscrollset lastscrollrows if {$lastscrollrows < 100 || $viewcomplete($curview) || [clock clicks -milliseconds] - $lastscrollset > 500} { @@ -4100,7 +4176,7 @@ proc doshowlocalchanges {} { if {[commitinview $mainheadid $curview]} { dodiffindex } else { - lappend commitinterest($mainheadid) {dodiffindex} + interestedin $mainheadid dodiffindex } } @@ -4919,7 +4995,7 @@ proc drawcmittext {id row col} { global rowtextx idpos idtags idheads idotherrefs global linehtag linentag linedtag selectedline global canvxmax boldrows boldnamerows fgcolor - global mainheadid nullid nullid2 circleitem circlecolors + global mainheadid nullid nullid2 circleitem circlecolors ctxbut # listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right set listed $cmitlisted($curview,$id) @@ -4992,7 +5068,7 @@ proc drawcmittext {id row col} { } set linehtag($row) [$canv create text $xt $y -anchor w -fill $fgcolor \ -text $headline -font $font -tags text] - $canv bind $linehtag($row) <Button-3> "rowmenu %X %Y $id" + $canv bind $linehtag($row) $ctxbut "rowmenu %X %Y $id" set linentag($row) [$canv2 create text 3 $y -anchor w -fill $fgcolor \ -text $name -font $nfont -tags text] set linedtag($row) [$canv3 create text 3 $y -anchor w -fill $fgcolor \ @@ -5334,7 +5410,7 @@ proc bindline {t id} { proc drawtags {id x xt y1} { global idtags idheads idotherrefs mainhead global linespc lthickness - global canv rowtextx curview fgcolor bgcolor + global canv rowtextx curview fgcolor bgcolor ctxbut set marks {} set ntags 0 @@ -5412,7 +5488,7 @@ proc drawtags {id x xt y1} { if {$ntags >= 0} { $canv bind $t <1> [list showtag $tag 1] } elseif {$nheads >= 0} { - $canv bind $t <Button-3> [list headmenu %X %Y $id $tag] + $canv bind $t $ctxbut [list headmenu %X %Y $id $tag] } } return $xt @@ -5755,11 +5831,11 @@ proc commit_descriptor {p} { # append some text to the ctext widget, and make any SHA1 ID # that we know about be a clickable link. proc appendwithlinks {text tags} { - global ctext linknum curview pendinglinks + global ctext linknum curview set start [$ctext index "end - 1c"] $ctext insert end $text $tags - set links [regexp -indices -all -inline {[0-9a-f]{40}} $text] + set links [regexp -indices -all -inline {\m[0-9a-f]{6,40}\M} $text] foreach l $links { set s [lindex $l 0] set e [lindex $l 1] @@ -5773,16 +5849,27 @@ proc appendwithlinks {text tags} { } proc setlink {id lk} { - global curview ctext pendinglinks commitinterest + global curview ctext pendinglinks - if {[commitinview $id $curview]} { + set known 0 + if {[string length $id] < 40} { + set matches [longid $id] + if {[llength $matches] > 0} { + if {[llength $matches] > 1} return + set known 1 + set id [lindex $matches 0] + } + } else { + set known [commitinview $id $curview] + } + if {$known} { $ctext tag conf $lk -foreground blue -underline 1 - $ctext tag bind $lk <1> [list selectline [rowofcommit $id] 1] + $ctext tag bind $lk <1> [list selbyid $id] $ctext tag bind $lk <Enter> {linkcursor %W 1} $ctext tag bind $lk <Leave> {linkcursor %W -1} } else { lappend pendinglinks($id) $lk - lappend commitinterest($id) {makelink %I} + interestedin $id {makelink %P} } } @@ -6228,7 +6315,7 @@ proc gettree {id} { set treepending $id set treefilelist($id) {} set treeidlist($id) {} - fconfigure $gtf -blocking 0 + fconfigure $gtf -blocking 0 -encoding binary filerun $gtf [list gettreeline $gtf $id] } } else { @@ -6250,11 +6337,12 @@ proc gettreeline {gtf id} { set line [string range $line 0 [expr {$i-1}]] if {$diffids ne $nullid2 && [lindex $line 1] ne "blob"} continue set sha1 [lindex $line 2] - if {[string index $fname 0] eq "\""} { - set fname [lindex $fname 0] - } lappend treeidlist($id) $sha1 } + if {[string index $fname 0] eq "\""} { + set fname [lindex $fname 0] + } + set fname [encoding convertfrom $fname] lappend treefilelist($id) $fname } if {![eof $gtf]} { @@ -6295,7 +6383,7 @@ proc showfile {f} { return } } - fconfigure $bf -blocking 0 + fconfigure $bf -blocking 0 -encoding [get_path_encoding $f] filerun $bf [list getblobline $bf $diffids] $ctext config -state normal clear_ctext $commentend @@ -6333,6 +6421,7 @@ proc mergediff {id} { global diffids global parents global diffcontext + global diffencoding global limitdiffs vfilelimit curview set diffmergeid $id @@ -6346,9 +6435,10 @@ proc mergediff {id} { error_popup "[mc "Error getting merge diffs:"] $err" return } - fconfigure $mdf -blocking 0 + fconfigure $mdf -blocking 0 -encoding binary set mdifffd($id) $mdf set np [llength $parents($curview,$id)] + set diffencoding [get_path_encoding {}] settabs $np filerun $mdf [list getmergediffline $mdf $id $np] } @@ -6356,6 +6446,7 @@ proc mergediff {id} { proc getmergediffline {mdf id np} { global diffmergeid ctext cflist mergemax global difffilestart mdifffd + global diffencoding $ctext conf -state normal set nr 0 @@ -6367,18 +6458,22 @@ proc getmergediffline {mdf id np} { } if {[regexp {^diff --cc (.*)} $line match fname]} { # start of a new file + set fname [encoding convertfrom $fname] $ctext insert end "\n" set here [$ctext index "end - 1c"] lappend difffilestart $here add_flist [list $fname] + set diffencoding [get_path_encoding $fname] set l [expr {(78 - [string length $fname]) / 2}] set pad [string range "----------------------------------------" 1 $l] $ctext insert end "$pad $fname $pad\n" filesep } elseif {[regexp {^@@} $line]} { + set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" hunksep } elseif {[regexp {^[0-9a-f]{40}$} $line] || [regexp {^index} $line]} { # do nothing } else { + set line [encoding convertfrom $diffencoding $line] # parse the prefix - one ' ', '-' or '+' for each parent set spaces {} set minuses {} @@ -6513,27 +6608,42 @@ proc gettreediffs {ids} { set treepending $ids set treediff {} - fconfigure $gdtf -blocking 0 + fconfigure $gdtf -blocking 0 -encoding binary filerun $gdtf [list gettreediffline $gdtf $ids] } proc gettreediffline {gdtf ids} { global treediff treediffs treepending diffids diffmergeid - global cmitmode vfilelimit curview limitdiffs + global cmitmode vfilelimit curview limitdiffs perfile_attrs set nr 0 - while {[incr nr] <= 1000 && [gets $gdtf line] >= 0} { + set sublist {} + set max 1000 + if {$perfile_attrs} { + # cache_gitattr is slow, and even slower on win32 where we + # have to invoke it for only about 30 paths at a time + set max 500 + if {[tk windowingsystem] == "win32"} { + set max 120 + } + } + while {[incr nr] <= $max && [gets $gdtf line] >= 0} { set i [string first "\t" $line] if {$i >= 0} { set file [string range $line [expr {$i+1}] end] if {[string index $file 0] eq "\""} { set file [lindex $file 0] } + set file [encoding convertfrom $file] lappend treediff $file + lappend sublist $file } } + if {$perfile_attrs} { + cache_gitattr encoding $sublist + } if {![eof $gdtf]} { - return [expr {$nr >= 1000? 2: 1}] + return [expr {$nr >= $max? 2: 1}] } close $gdtf if {$limitdiffs && $vfilelimit($curview) ne {}} { @@ -6586,6 +6696,7 @@ proc getblobdiffs {ids} { global diffcontext global ignorespace global limitdiffs vfilelimit curview + global diffencoding set cmd [diffcmd $ids "-p -C --no-commit-id -U$diffcontext"] if {$ignorespace} { @@ -6599,7 +6710,8 @@ proc getblobdiffs {ids} { return } set diffinhdr 0 - fconfigure $bdf -blocking 0 + set diffencoding [get_path_encoding {}] + fconfigure $bdf -blocking 0 -encoding binary set blobdifffd($ids) $bdf filerun $bdf [list getblobdiffline $bdf $diffids] } @@ -6633,6 +6745,7 @@ proc getblobdiffline {bdf ids} { global diffids blobdifffd ctext curdiffstart global diffnexthead diffnextnote difffilestart global diffinhdr treediffs + global diffencoding set nr 0 $ctext conf -state normal @@ -6670,10 +6783,13 @@ proc getblobdiffline {bdf ids} { } else { set fname [string range $line 2 [expr {$i - 1}]] } + set fname [encoding convertfrom $fname] + set diffencoding [get_path_encoding $fname] makediffhdr $fname $ids } elseif {[regexp {^@@ -([0-9]+)(,[0-9]+)? \+([0-9]+)(,[0-9]+)? @@(.*)} \ $line match f1l f1c f2l f2c rest]} { + set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" hunksep set diffinhdr 0 @@ -6683,6 +6799,7 @@ proc getblobdiffline {bdf ids} { if {[string index $fname 0] eq "\""} { set fname [lindex $fname 0] } + set fname [encoding convertfrom $fname] set i [lsearch -exact $treediffs($ids) $fname] if {$i >= 0} { setinlist difffilestart $i $curdiffstart @@ -6693,6 +6810,8 @@ proc getblobdiffline {bdf ids} { if {[string index $fname 0] eq "\""} { set fname [lindex $fname 0] } + set fname [encoding convertfrom $fname] + set diffencoding [get_path_encoding $fname] makediffhdr $fname $ids } elseif {[string compare -length 3 $line "---"] == 0} { # do nothing @@ -6704,6 +6823,7 @@ proc getblobdiffline {bdf ids} { $ctext insert end "$line\n" filesep } else { + set line [encoding convertfrom $diffencoding $line] set x [string range $line 0 0] if {$x == "-" || $x == "+"} { set tag [expr {$x == "+"}] @@ -7065,13 +7185,13 @@ proc gotocommit {} { } else { set id [string tolower $sha1string] if {[regexp {^[0-9a-f]{4,39}$} $id]} { - set matches [array names varcid "$curview,$id*"] + set matches [longid $id] if {$matches ne {}} { if {[llength $matches] > 1} { error_popup [mc "Short SHA1 id %s is ambiguous" $id] return } - set id [lindex [split [lindex $matches 0] ","] 1] + set id [lindex $matches 0] } } } @@ -7288,9 +7408,9 @@ proc rowmenu {x y id} { } else { set menu $fakerowmenu } - $menu entryconfigure [mc "Diff this -> selected"] -state $state - $menu entryconfigure [mc "Diff selected -> this"] -state $state - $menu entryconfigure [mc "Make patch"] -state $state + $menu entryconfigure [mca "Diff this -> selected"] -state $state + $menu entryconfigure [mca "Diff selected -> this"] -state $state + $menu entryconfigure [mca "Make patch"] -state $state tk_popup $menu $x $y } @@ -7590,6 +7710,7 @@ proc mkbranch {} { grid $top.id $top.sha1 -sticky w label $top.nlab -text [mc "Name:"] entry $top.name -width 40 + bind $top.name <Key-Return> "[list mkbrgo $top]" grid $top.nlab $top.name -sticky w frame $top.buts button $top.buts.go -text [mc "Create"] -command [list mkbrgo $top] @@ -7918,7 +8039,7 @@ proc reflistfilter_change {n1 n2 op} { proc refill_reflist {} { global reflist reflistfilter showrefstop headids tagids otherrefids - global curview commitinterest + global curview if {![info exists showrefstop] || ![winfo exists $showrefstop]} return set refs {} @@ -7927,7 +8048,7 @@ proc refill_reflist {} { if {[commitinview $headids($n) $curview]} { lappend refs [list $n H] } else { - set commitinterest($headids($n)) {run refill_reflist} + interestedin $headids($n) {run refill_reflist} } } } @@ -7936,7 +8057,7 @@ proc refill_reflist {} { if {[commitinview $tagids($n) $curview]} { lappend refs [list $n T] } else { - set commitinterest($tagids($n)) {run refill_reflist} + interestedin $tagids($n) {run refill_reflist} } } } @@ -7945,7 +8066,7 @@ proc refill_reflist {} { if {[commitinview $otherrefids($n) $curview]} { lappend refs [list $n o] } else { - set commitinterest($otherrefids($n)) {run refill_reflist} + interestedin $otherrefids($n) {run refill_reflist} } } } @@ -9295,7 +9416,7 @@ proc doprefs {} { global maxwidth maxgraphpct global oldprefs prefstop showneartags showlocalchanges global bgcolor fgcolor ctext diffcolors selectbgcolor - global tabstop limitdiffs autoselect extdifftool + global tabstop limitdiffs autoselect extdifftool perfile_attrs set top .gitkprefs set prefstop $top @@ -9304,7 +9425,7 @@ proc doprefs {} { return } foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ - limitdiffs tabstop} { + limitdiffs tabstop perfile_attrs} { set oldprefs($v) [set $v] } toplevel $top @@ -9346,6 +9467,11 @@ proc doprefs {} { checkbutton $top.ldiff.b -variable limitdiffs pack $top.ldiff.b $top.ldiff.l -side left grid x $top.ldiff -sticky w + frame $top.lattr + label $top.lattr.l -text [mc "Support per-file encodings"] -font optionfont + checkbutton $top.lattr.b -variable perfile_attrs + pack $top.lattr.b $top.lattr.l -side left + grid x $top.lattr -sticky w entry $top.extdifft -textvariable extdifftool frame $top.extdifff @@ -9455,7 +9581,7 @@ proc prefscan {} { global oldprefs prefstop foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ - limitdiffs tabstop} { + limitdiffs tabstop perfile_attrs} { global $v set $v $oldprefs($v) } @@ -9468,7 +9594,7 @@ proc prefsok {} { global maxwidth maxgraphpct global oldprefs prefstop showneartags showlocalchanges global fontpref mainfont textfont uifont - global limitdiffs treediffs + global limitdiffs treediffs perfile_attrs catch {destroy $prefstop} unset prefstop @@ -9501,8 +9627,10 @@ proc prefsok {} { dohidelocalchanges } } - if {$limitdiffs != $oldprefs(limitdiffs)} { - # treediffs elements are limited by path + if {$limitdiffs != $oldprefs(limitdiffs) || + ($perfile_attrs && !$oldprefs(perfile_attrs))} { + # treediffs elements are limited by path; + # won't have encodings cached if perfile_attrs was just turned on catch {unset treediffs} } if {$fontchanged || $maxwidth != $oldprefs(maxwidth) @@ -9726,7 +9854,7 @@ set encoding_aliases { { ISO-8859-16 iso-ir-226 ISO_8859-16:2001 ISO_8859-16 latin10 l10 } { GBK CP936 MS936 windows-936 } { JIS_Encoding csJISEncoding } - { Shift_JIS MS_Kanji csShiftJIS } + { Shift_JIS MS_Kanji csShiftJIS ShiftJIS Shift-JIS } { Extended_UNIX_Code_Packed_Format_for_Japanese csEUCPkdFmtJapanese EUC-JP } { Extended_UNIX_Code_Fixed_Width_for_Japanese csEUCFixWidJapanese } @@ -9761,14 +9889,17 @@ set encoding_aliases { } proc tcl_encoding {enc} { - global encoding_aliases + global encoding_aliases tcl_encoding_cache + if {[info exists tcl_encoding_cache($enc)]} { + return $tcl_encoding_cache($enc) + } set names [encoding names] set lcnames [string tolower $names] set enc [string tolower $enc] set i [lsearch -exact $lcnames $enc] if {$i < 0} { # look for "isonnn" instead of "iso-nnn" or "iso_nnn" - if {[regsub {^iso[-_]} $enc iso encx]} { + if {[regsub {^(iso|cp|ibm|jis)[-_]} $enc {\1} encx]} { set i [lsearch -exact $lcnames $encx] } } @@ -9780,7 +9911,7 @@ proc tcl_encoding {enc} { foreach e $ll { set i [lsearch -exact $lcnames $e] if {$i < 0} { - if {[regsub {^iso[-_]} $e iso ex]} { + if {[regsub {^(iso|cp|ibm|jis)[-_]} $e {\1} ex]} { set i [lsearch -exact $lcnames $ex] } } @@ -9789,10 +9920,70 @@ proc tcl_encoding {enc} { break } } + set tclenc {} if {$i >= 0} { - return [lindex $names $i] + set tclenc [lindex $names $i] } - return {} + set tcl_encoding_cache($enc) $tclenc + return $tclenc +} + +proc gitattr {path attr default} { + global path_attr_cache + if {[info exists path_attr_cache($attr,$path)]} { + set r $path_attr_cache($attr,$path) + } else { + set r "unspecified" + if {![catch {set line [exec git check-attr $attr -- $path]}]} { + regexp "(.*): encoding: (.*)" $line m f r + } + set path_attr_cache($attr,$path) $r + } + if {$r eq "unspecified"} { + return $default + } + return $r +} + +proc cache_gitattr {attr pathlist} { + global path_attr_cache + set newlist {} + foreach path $pathlist { + if {![info exists path_attr_cache($attr,$path)]} { + lappend newlist $path + } + } + set lim 1000 + if {[tk windowingsystem] == "win32"} { + # windows has a 32k limit on the arguments to a command... + set lim 30 + } + while {$newlist ne {}} { + set head [lrange $newlist 0 [expr {$lim - 1}]] + set newlist [lrange $newlist $lim end] + if {![catch {set rlist [eval exec git check-attr $attr -- $head]}]} { + foreach row [split $rlist "\n"] { + if {[regexp "(.*): encoding: (.*)" $row m path value]} { + if {[string index $path 0] eq "\""} { + set path [encoding convertfrom [lindex $path 0]] + } + set path_attr_cache($attr,$path) $value + } + } + } + } +} + +proc get_path_encoding {path} { + global gui_encoding perfile_attrs + set tcl_enc $gui_encoding + if {$path ne {} && $perfile_attrs} { + set enc2 [tcl_encoding [gitattr $path encoding $tcl_enc]] + if {$enc2 ne {}} { + set tcl_enc $enc2 + } + } + return $tcl_enc } # First check that Tcl/Tk is recent enough @@ -9817,6 +10008,19 @@ if {$tclencoding == {}} { puts stderr "Warning: encoding $gitencoding is not supported by Tcl/Tk" } +set gui_encoding [encoding system] +catch { + set enc [exec git config --get gui.encoding] + if {$enc ne {}} { + set tclenc [tcl_encoding $enc] + if {$tclenc ne {}} { + set gui_encoding $tclenc + } else { + puts stderr "Warning: encoding $enc is not supported by Tcl/Tk" + } + } +} + set mainfont {Helvetica 9} set textfont {Courier 9} set uifont {Helvetica 9 bold} @@ -9838,6 +10042,7 @@ set showlocalchanges 1 set limitdiffs 1 set datetimeformat "%Y-%m-%d %H:%M:%S" set autoselect 1 +set perfile_attrs 0 set extdifftool "meld" @@ -9851,6 +10056,13 @@ set selectbgcolor gray85 set circlecolors {white blue gray blue blue} +# button for popping up context menus +if {[tk windowingsystem] eq "aqua"} { + set ctxbut <Button-2> +} else { + set ctxbut <Button-3> +} + ## For msgcat loading, first locate the installation location. if { [info exists ::env(GITK_MSGSDIR)] } { ## Msgsdir was manually set in the environment. @@ -10019,8 +10231,8 @@ if {$cmdline_files ne {} || $revtreeargs ne {} || $revtreeargscmd ne {}} { set viewperm(1) 0 set vdatemode(1) 0 addviewmenu 1 - .bar.view entryconf [mc "Edit view..."] -state normal - .bar.view entryconf [mc "Delete view"] -state normal + .bar.view entryconf [mca "Edit view..."] -state normal + .bar.view entryconf [mca "Delete view"] -state normal } if {[info exists permviews]} { diff --git a/gitk-git/po/de.po b/gitk-git/po/de.po index 04ee570995..c86cc2df5e 100644 --- a/gitk-git/po/de.po +++ b/gitk-git/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: git-gui\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-05-24 22:32+0200\n" +"POT-Creation-Date: 2008-10-18 22:03+1100\n" "PO-Revision-Date: 2008-05-24 22:40+0200\n" "Last-Translator: Christian Stimming <stimming@tuhh.de>\n" "Language-Team: German\n" @@ -15,17 +15,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: gitk:102 +#: gitk:113 msgid "Couldn't get list of unmerged files:" msgstr "Liste der nicht-zusammengeführten Dateien nicht gefunden:" -#: gitk:329 +#: gitk:340 msgid "No files selected: --merge specified but no files are unmerged." msgstr "" "Keine Dateien ausgewählt: --merge angegeben, es existieren aber keine nicht-" "zusammengeführten Dateien." -#: gitk:332 +#: gitk:343 msgid "" "No files selected: --merge specified but no unmerged files are within file " "limit." @@ -33,257 +33,261 @@ msgstr "" "Keine Dateien ausgewähle: --merge angegeben, aber keine nicht-" "zusammengeführten Dateien sind in der Dateiauswahl." -#: gitk:354 +#: gitk:365 gitk:503 msgid "Error executing git log:" msgstr "Fehler beim Ausführen von git-log:" -#: gitk:369 +#: gitk:378 msgid "Reading" msgstr "Lesen" -#: gitk:151 gitk:2191 +#: gitk:438 gitk:3462 msgid "Reading commits..." msgstr "Versionen lesen..." -#: gitk:275 -msgid "Can't parse git log output:" -msgstr "Ausgabe von git-log kann nicht erkannt werden:" - -#: gitk:386 gitk:2195 +#: gitk:441 gitk:1528 gitk:3465 msgid "No commits selected" msgstr "Keine Versionen ausgewählt." -#: gitk:500 +#: gitk:1399 +msgid "Can't parse git log output:" +msgstr "Ausgabe von git-log kann nicht erkannt werden:" + +#: gitk:1605 msgid "No commit information available" msgstr "Keine Versionsinformation verfügbar" -#: gitk:599 gitk:621 gitk:1955 gitk:6424 gitk:7924 gitk:8083 +#: gitk:1709 gitk:1731 gitk:3259 gitk:7764 gitk:9293 gitk:9466 msgid "OK" msgstr "Ok" -#: gitk:623 gitk:1956 gitk:6108 gitk:6179 gitk:6276 gitk:6322 gitk:6426 -#: gitk:7925 gitk:8084 +#: gitk:1733 gitk:3260 gitk:7439 gitk:7510 gitk:7613 gitk:7660 gitk:7766 +#: gitk:9294 gitk:9467 msgid "Cancel" msgstr "Abbrechen" -#: gitk:661 -msgid "File" -msgstr "Datei" - -#: gitk:663 +#: gitk:1811 msgid "Update" msgstr "Aktualisieren" -#: gitk:1722 +#: gitk:1812 msgid "Reload" msgstr "Neu laden" -#: gitk:1723 +#: gitk:1813 msgid "Reread references" msgstr "Zweige neu laden" -#: gitk:665 +#: gitk:1814 msgid "List references" msgstr "Zweige/Markierungen auflisten" -#: gitk:666 +#: gitk:1815 msgid "Quit" msgstr "Beenden" -#: gitk:668 -msgid "Edit" -msgstr "Bearbeiten" +#: gitk:1810 +msgid "File" +msgstr "Datei" -#: gitk:669 +#: gitk:1818 msgid "Preferences" msgstr "Einstellungen" -#: gitk:672 gitk:1892 -msgid "View" -msgstr "Ansicht" +#: gitk:1817 +msgid "Edit" +msgstr "Bearbeiten" -#: gitk:673 +#: gitk:1821 msgid "New view..." msgstr "Neue Ansicht..." -#: gitk:674 gitk:2133 gitk:8723 +#: gitk:1822 msgid "Edit view..." msgstr "Ansicht bearbeiten..." -#: gitk:676 gitk:2134 gitk:8724 +#: gitk:1823 msgid "Delete view" msgstr "Ansicht löschen" -#: gitk:678 +#: gitk:1825 msgid "All files" msgstr "Alle Dateien" -#: gitk:682 -msgid "Help" -msgstr "Hilfe" +#: gitk:1820 gitk:3196 +msgid "View" +msgstr "Ansicht" -#: gitk:683 gitk:1317 +#: gitk:1828 gitk:2487 msgid "About gitk" msgstr "Über gitk" -#: gitk:684 +#: gitk:1829 msgid "Key bindings" msgstr "Tastenkürzel" -#: gitk:741 +#: gitk:1827 +msgid "Help" +msgstr "Hilfe" + +#: gitk:1887 msgid "SHA1 ID: " msgstr "SHA1:" -#: gitk:1831 +#: gitk:1918 msgid "Row" msgstr "Zeile" -#: gitk:1862 +#: gitk:1949 msgid "Find" msgstr "Suche" -#: gitk:792 +#: gitk:1950 msgid "next" msgstr "nächste" -#: gitk:793 +#: gitk:1951 msgid "prev" msgstr "vorige" -#: gitk:794 +#: gitk:1952 msgid "commit" msgstr "Version nach" -#: gitk:797 gitk:799 gitk:2356 gitk:2379 gitk:2403 gitk:4306 gitk:4369 +#: gitk:1955 gitk:1957 gitk:3617 gitk:3640 gitk:3664 gitk:5550 gitk:5621 msgid "containing:" msgstr "Beschreibung:" -#: gitk:800 gitk:1778 gitk:1783 gitk:2431 +#: gitk:1958 gitk:2954 gitk:2959 gitk:3692 msgid "touching paths:" msgstr "Dateien:" -#: gitk:801 gitk:2436 +#: gitk:1959 gitk:3697 msgid "adding/removing string:" msgstr "Änderungen:" -#: gitk:810 gitk:812 +#: gitk:1968 gitk:1970 msgid "Exact" msgstr "Exakt" -#: gitk:812 gitk:2514 gitk:4274 +#: gitk:1970 gitk:3773 gitk:5518 msgid "IgnCase" msgstr "Kein Groß/Klein" -#: gitk:812 gitk:2405 gitk:2512 gitk:4270 +#: gitk:1970 gitk:3666 gitk:3771 gitk:5514 msgid "Regexp" msgstr "Regexp" -#: gitk:814 gitk:815 gitk:2533 gitk:2563 gitk:2570 gitk:4380 gitk:4436 +#: gitk:1972 gitk:1973 gitk:3792 gitk:3822 gitk:3829 gitk:5641 gitk:5708 msgid "All fields" msgstr "Alle Felder" -#: gitk:815 gitk:2531 gitk:2563 gitk:4336 +#: gitk:1973 gitk:3790 gitk:3822 gitk:5580 msgid "Headline" msgstr "Überschrift" -#: gitk:816 gitk:2531 gitk:4336 gitk:4436 gitk:4827 +#: gitk:1974 gitk:3790 gitk:5580 gitk:5708 gitk:6109 msgid "Comments" msgstr "Beschreibung" -#: gitk:816 gitk:2531 gitk:2535 gitk:2570 gitk:4336 gitk:4763 gitk:5957 -#: gitk:5972 +#: gitk:1974 gitk:3790 gitk:3794 gitk:3829 gitk:5580 gitk:6045 gitk:7285 +#: gitk:7300 msgid "Author" msgstr "Autor" -#: gitk:816 gitk:2531 gitk:4336 gitk:4765 +#: gitk:1974 gitk:3790 gitk:5580 gitk:6047 msgid "Committer" msgstr "Eintragender" -#: gitk:845 +#: gitk:2003 msgid "Search" msgstr "Suche" -#: gitk:852 +#: gitk:2010 msgid "Diff" msgstr "Vergleich" -#: gitk:854 +#: gitk:2012 msgid "Old version" msgstr "Alte Version" -#: gitk:856 +#: gitk:2014 msgid "New version" msgstr "Neue Version" -#: gitk:858 +#: gitk:2016 msgid "Lines of context" msgstr "Kontextzeilen" -#: gitk:868 +#: gitk:2026 msgid "Ignore space change" msgstr "Leerzeichenänderungen ignorieren" -#: gitk:926 +#: gitk:2084 msgid "Patch" msgstr "Patch" -#: gitk:928 +#: gitk:2086 msgid "Tree" msgstr "Baum" -#: gitk:1053 gitk:1068 gitk:6023 +#: gitk:2213 gitk:2226 msgid "Diff this -> selected" msgstr "Vergleich diese -> gewählte" -#: gitk:1055 gitk:1070 gitk:6024 +#: gitk:2214 gitk:2227 msgid "Diff selected -> this" msgstr "Vergleich gewählte -> diese" -#: gitk:1057 gitk:1072 gitk:6025 +#: gitk:2215 gitk:2228 msgid "Make patch" msgstr "Patch erstellen" -#: gitk:1058 gitk:6163 +#: gitk:2216 gitk:7494 msgid "Create tag" msgstr "Markierung erstellen" -#: gitk:1059 gitk:6256 +#: gitk:2217 gitk:7593 msgid "Write commit to file" msgstr "Version in Datei schreiben" -#: gitk:1060 gitk:6310 +#: gitk:2218 gitk:7647 msgid "Create new branch" msgstr "Neuen Zweig erstellen" -#: gitk:1061 +#: gitk:2219 msgid "Cherry-pick this commit" msgstr "Diese Version pflücken" -#: gitk:1063 +#: gitk:2220 msgid "Reset HEAD branch to here" msgstr "HEAD-Zweig auf diese Version zurücksetzen" -#: gitk:1079 +#: gitk:2234 msgid "Check out this branch" msgstr "Auf diesen Zweig umstellen" -#: gitk:1081 +#: gitk:2235 msgid "Remove this branch" msgstr "Zweig löschen" -#: gitk:1087 +#: gitk:2242 msgid "Highlight this too" msgstr "Diesen auch hervorheben" -#: gitk:1089 +#: gitk:2243 msgid "Highlight this only" msgstr "Nur diesen hervorheben" -#: gitk:2162 +#: gitk:2244 msgid "External diff" msgstr "Externer Vergleich" -#: gitk:2403 +#: gitk:2245 +msgid "Blame parent commit" +msgstr "" + +#: gitk:2488 msgid "" "\n" "Gitk - a commit viewer for git\n" @@ -297,431 +301,431 @@ msgstr "" "\n" "Copyright © 2005-2008 Paul Mackerras\n" "\n" -"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public License" +"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public " +"License" -#: gitk:1326 gitk:1387 gitk:6582 +#: gitk:2496 gitk:2557 gitk:7943 msgid "Close" msgstr "Schließen" -#: gitk:1345 +#: gitk:2515 msgid "Gitk key bindings" msgstr "Gitk Tastaturbelegung" -#: gitk:1347 +#: gitk:2517 msgid "Gitk key bindings:" msgstr "Gitk Tastaturbelegung:" -#: gitk:1349 +#: gitk:2519 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tBeenden" -#: gitk:1350 +#: gitk:2520 msgid "<Home>\t\tMove to first commit" msgstr "<Pos1>\t\tZur neuesten Version springen" -#: gitk:1351 +#: gitk:2521 msgid "<End>\t\tMove to last commit" msgstr "<Ende>\t\tZur ältesten Version springen" -#: gitk:1352 +#: gitk:2522 msgid "<Up>, p, i\tMove up one commit" msgstr "<Hoch>, p, i\tNächste neuere Version" -#: gitk:1353 +#: gitk:2523 msgid "<Down>, n, k\tMove down one commit" msgstr "<Runter>, n, k\tNächste ältere Version" -#: gitk:1354 +#: gitk:2524 msgid "<Left>, z, j\tGo back in history list" msgstr "<Links>, z, j\tEine Version zurückgehen" -#: gitk:1355 +#: gitk:2525 msgid "<Right>, x, l\tGo forward in history list" msgstr "<Rechts>, x, l\tEine Version weitergehen" -#: gitk:1356 +#: gitk:2526 msgid "<PageUp>\tMove up one page in commit list" msgstr "<BildHoch>\tEine Seite nach oben blättern" -#: gitk:1357 +#: gitk:2527 msgid "<PageDown>\tMove down one page in commit list" msgstr "<BildRunter>\tEine Seite nach unten blättern" -#: gitk:1358 +#: gitk:2528 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Pos1>\tZum oberen Ende der Versionsliste blättern" -#: gitk:1359 +#: gitk:2529 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-Ende>\tZum unteren Ende der Versionsliste blättern" -#: gitk:1360 +#: gitk:2530 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Hoch>\tVersionsliste eine Zeile nach oben blättern" -#: gitk:1361 +#: gitk:2531 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Runter>\tVersionsliste eine Zeile nach unten blättern" -#: gitk:1362 +#: gitk:2532 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-BildHoch>\tVersionsliste eine Seite hoch blättern" -#: gitk:1363 +#: gitk:2533 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-BildRunter>\tVersionsliste eine Seite nach unten blättern" -#: gitk:1364 +#: gitk:2534 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" msgstr "<Umschalt-Hoch>\tRückwärts suchen (nach oben; neuere Versionen)" -#: gitk:1365 +#: gitk:2535 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" msgstr "<Umschalt-Runter> Suchen (nach unten; ältere Versionen)" -#: gitk:1366 +#: gitk:2536 msgid "<Delete>, b\tScroll diff view up one page" msgstr "<Entf>, b\t\tVergleich eine Seite nach oben blättern" -#: gitk:1367 +#: gitk:2537 msgid "<Backspace>\tScroll diff view up one page" msgstr "<Löschtaste>\tVergleich eine Seite nach oben blättern" -#: gitk:1368 +#: gitk:2538 msgid "<Space>\t\tScroll diff view down one page" msgstr "<Leertaste>\tVergleich eine Seite nach unten blättern" -#: gitk:1369 +#: gitk:2539 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tVergleich um 18 Zeilen nach oben (»up«) blättern" -#: gitk:1370 +#: gitk:2540 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tVergleich um 18 Zeilen nach unten (»down«) blättern" -#: gitk:1371 +#: gitk:2541 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tSuchen" -#: gitk:1372 +#: gitk:2542 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tWeitersuchen" -#: gitk:1373 +#: gitk:2543 msgid "<Return>\tMove to next find hit" msgstr "<Eingabetaste>\tWeitersuchen" -#: gitk:1374 +#: gitk:2544 msgid "/\t\tMove to next find hit, or redo find" msgstr "/\t\tWeitersuchen oder neue Suche beginnen" -#: gitk:1375 +#: gitk:2545 msgid "?\t\tMove to previous find hit" msgstr "?\t\tRückwärts weitersuchen" -#: gitk:1376 +#: gitk:2546 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tVergleich zur nächsten Datei (»file«) blättern" -#: gitk:1377 +#: gitk:2547 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tWeitersuchen im Vergleich" -#: gitk:1378 +#: gitk:2548 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tRückwärts weitersuchen im Vergleich" -#: gitk:1379 +#: gitk:2549 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-Nummerblock-Plus>\tSchriftgröße vergrößern" -#: gitk:1380 +#: gitk:2550 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-Plus>\tSchriftgröße vergrößern" -#: gitk:1381 +#: gitk:2551 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-Nummernblock-> Schriftgröße verkleinern" -#: gitk:1382 +#: gitk:2552 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-Minus>\tSchriftgröße verkleinern" -#: gitk:1383 +#: gitk:2553 msgid "<F5>\t\tUpdate" msgstr "<F5>\t\tAktualisieren" -#: gitk:1896 +#: gitk:3200 msgid "Gitk view definition" msgstr "Gitk Ansichten" -#: gitk:1921 +#: gitk:3225 msgid "Name" msgstr "Name" -#: gitk:1924 +#: gitk:3228 msgid "Remember this view" msgstr "Diese Ansicht speichern" -#: gitk:3126 +#: gitk:3232 msgid "Commits to include (arguments to git log):" msgstr "Versionen anzeigen (Argumente von git-log):" -#: gitk:3133 +#: gitk:3239 msgid "Command to generate more commits to include:" msgstr "Versionsliste durch folgendes Kommando erzeugen lassen:" -#: gitk:1942 +#: gitk:3246 msgid "Enter files and directories to include, one per line:" msgstr "Folgende Dateien und Verzeichnisse anzeigen (eine pro Zeile):" -#: gitk:1989 +#: gitk:3293 msgid "Error in commit selection arguments:" msgstr "Fehler in den ausgewählten Versionen:" -#: gitk:2043 gitk:2127 gitk:2583 gitk:2597 gitk:3781 gitk:8689 gitk:8690 +#: gitk:3347 gitk:3399 gitk:3842 gitk:3856 gitk:5060 gitk:10141 gitk:10142 msgid "None" msgstr "Keine" -#: gitk:2531 gitk:4336 gitk:5959 gitk:5974 +#: gitk:3790 gitk:5580 gitk:7287 gitk:7302 msgid "Date" msgstr "Datum" -#: gitk:2531 gitk:4336 +#: gitk:3790 gitk:5580 msgid "CDate" msgstr "Eintragedatum" -#: gitk:2680 gitk:2685 +#: gitk:3939 gitk:3944 msgid "Descendant" msgstr "Abkömmling" -#: gitk:2681 +#: gitk:3940 msgid "Not descendant" msgstr "Nicht Abkömmling" -#: gitk:2688 gitk:2693 +#: gitk:3947 gitk:3952 msgid "Ancestor" msgstr "Vorgänger" -#: gitk:2689 +#: gitk:3948 msgid "Not ancestor" msgstr "Nicht Vorgänger" -#: gitk:2924 +#: gitk:4187 msgid "Local changes checked in to index but not committed" msgstr "Lokale Änderungen bereitgestellt, aber nicht eingetragen" -#: gitk:2954 +#: gitk:4220 msgid "Local uncommitted changes, not checked in to index" msgstr "Lokale Änderungen, nicht bereitgestellt" -#: gitk:4305 +#: gitk:5549 msgid "Searching" msgstr "Suchen" -#: gitk:4767 +#: gitk:6049 msgid "Tags:" msgstr "Markierungen:" -#: gitk:4784 gitk:4790 gitk:5952 +#: gitk:6066 gitk:6072 gitk:7280 msgid "Parent" msgstr "Eltern" -#: gitk:4795 +#: gitk:6077 msgid "Child" msgstr "Kind" -#: gitk:4804 +#: gitk:6086 msgid "Branch" msgstr "Zweig" -#: gitk:4807 +#: gitk:6089 msgid "Follows" msgstr "Folgt auf" -#: gitk:4810 +#: gitk:6092 msgid "Precedes" msgstr "Vorgänger von" -#: gitk:5094 +#: gitk:6378 msgid "Error getting merge diffs:" msgstr "Fehler beim Laden des Vergleichs:" -#: gitk:5779 +#: gitk:7113 msgid "Goto:" msgstr "Gehe zu:" -#: gitk:5781 +#: gitk:7115 msgid "SHA1 ID:" msgstr "SHA1-Hashwert:" -#: gitk:5806 +#: gitk:7134 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "Kurzer SHA1-Hashwert »%s« ist mehrdeutig" -#: gitk:5818 +#: gitk:7146 #, tcl-format msgid "SHA1 id %s is not known" msgstr "SHA1-Hashwert »%s« unbekannt" -#: gitk:5820 +#: gitk:7148 #, tcl-format msgid "Tag/Head %s is not known" msgstr "Markierung/Zweig »%s« ist unbekannt" -#: gitk:5962 +#: gitk:7290 msgid "Children" msgstr "Kinder" -#: gitk:6019 +#: gitk:7347 #, tcl-format msgid "Reset %s branch to here" msgstr "Zweig »%s« hierher zurücksetzen" -#: gitk:7204 +#: gitk:7349 msgid "Detached head: can't reset" msgstr "Zweigspitze ist abgetrennt: Zurücksetzen nicht möglich" -#: gitk:7236 +#: gitk:7381 msgid "Top" msgstr "Oben" -#: gitk:6051 +#: gitk:7382 msgid "From" msgstr "Von" -#: gitk:6056 +#: gitk:7387 msgid "To" msgstr "bis" -#: gitk:6079 +#: gitk:7410 msgid "Generate patch" msgstr "Patch erstellen" -#: gitk:6081 +#: gitk:7412 msgid "From:" msgstr "Von:" -#: gitk:6090 +#: gitk:7421 msgid "To:" msgstr "bis:" -#: gitk:6099 +#: gitk:7430 msgid "Reverse" msgstr "Umgekehrt" -#: gitk:6101 gitk:6270 +#: gitk:7432 gitk:7607 msgid "Output file:" msgstr "Ausgabedatei:" -#: gitk:6107 +#: gitk:7438 msgid "Generate" msgstr "Erzeugen" -#: gitk:6143 +#: gitk:7474 msgid "Error creating patch:" msgstr "Fehler beim Patch erzeugen:" -#: gitk:6165 gitk:6258 gitk:6312 +#: gitk:7496 gitk:7595 gitk:7649 msgid "ID:" msgstr "ID:" -#: gitk:6174 +#: gitk:7505 msgid "Tag name:" msgstr "Markierungsname:" -#: gitk:6178 gitk:6321 +#: gitk:7509 gitk:7659 msgid "Create" msgstr "Erstellen" -#: gitk:6193 +#: gitk:7524 msgid "No tag name specified" msgstr "Kein Markierungsname angegeben" -#: gitk:6197 +#: gitk:7528 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "Markierung »%s« existiert bereits." -#: gitk:6203 +#: gitk:7534 msgid "Error creating tag:" msgstr "Fehler bei Markierung erstellen:" -#: gitk:6267 +#: gitk:7604 msgid "Command:" msgstr "Kommando:" -#: gitk:6275 +#: gitk:7612 msgid "Write" msgstr "Schreiben" -#: gitk:6291 +#: gitk:7628 msgid "Error writing commit:" msgstr "Fehler beim Schreiben der Version:" -#: gitk:6317 +#: gitk:7654 msgid "Name:" msgstr "Name:" -#: gitk:6336 +#: gitk:7674 msgid "Please specify a name for the new branch" msgstr "Bitte geben Sie einen Namen für den neuen Zweig an." -#: gitk:6365 +#: gitk:7703 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "" -"Version »%s« ist bereits im Zweig »%s« enthalten -- trotzdem erneut " -"eintragen?" +"Version »%s« ist bereits im Zweig »%s« enthalten -- trotzdem erneut eintragen?" -#: gitk:6370 +#: gitk:7708 msgid "Cherry-picking" msgstr "Version pflücken" -#: gitk:6382 +#: gitk:7720 msgid "No changes committed" msgstr "Keine Änderungen eingetragen" -#: gitk:6405 +#: gitk:7745 msgid "Confirm reset" msgstr "Zurücksetzen bestätigen" -#: gitk:6407 +#: gitk:7747 #, tcl-format msgid "Reset branch %s to %s?" msgstr "Zweig »%s« auf »%s« zurücksetzen?" -#: gitk:6411 +#: gitk:7751 msgid "Reset type:" msgstr "Art des Zurücksetzens:" -#: gitk:6415 +#: gitk:7755 msgid "Soft: Leave working tree and index untouched" msgstr "Harmlos: Arbeitskopie und Bereitstellung unverändert" -#: gitk:6418 +#: gitk:7758 msgid "Mixed: Leave working tree untouched, reset index" msgstr "" "Gemischt: Arbeitskopie unverändert,\n" "Bereitstellung zurückgesetzt" -#: gitk:6421 +#: gitk:7761 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -729,21 +733,21 @@ msgstr "" "Hart: Arbeitskopie und Bereitstellung\n" "(Alle lokalen Änderungen werden gelöscht)" -#: gitk:6437 +#: gitk:7777 msgid "Resetting" msgstr "Zurücksetzen" -#: gitk:6494 +#: gitk:7834 msgid "Checking out" msgstr "Umstellen" -#: gitk:6524 +#: gitk:7885 msgid "Cannot delete the currently checked-out branch" msgstr "" "Der Zweig, auf den die Arbeitskopie momentan umgestellt ist, kann nicht " "gelöscht werden." -#: gitk:6530 +#: gitk:7891 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -752,16 +756,16 @@ msgstr "" "Die Versionen auf Zweig »%s« existieren auf keinem anderen Zweig.\n" "Zweig »%s« trotzdem löschen?" -#: gitk:6561 +#: gitk:7922 #, tcl-format msgid "Tags and heads: %s" msgstr "Markierungen und Zweige: %s" -#: gitk:6575 +#: gitk:7936 msgid "Filter" msgstr "Filtern" -#: gitk:6869 +#: gitk:8230 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." @@ -769,125 +773,129 @@ msgstr "" "Fehler beim Lesen der Strukturinformationen; Zweige und Vorgänger/Nachfolger " "Informationen werden unvollständig sein." -#: gitk:7853 +#: gitk:9216 msgid "Tag" msgstr "Markierung" -#: gitk:7853 +#: gitk:9216 msgid "Id" msgstr "Id" -#: gitk:7893 +#: gitk:9262 msgid "Gitk font chooser" msgstr "Gitk Schriften wählen" -#: gitk:7910 +#: gitk:9279 msgid "B" msgstr "F" -#: gitk:7913 +#: gitk:9282 msgid "I" msgstr "K" -#: gitk:8006 +#: gitk:9375 msgid "Gitk preferences" msgstr "Gitk Einstellungen" -#: gitk:8007 +#: gitk:9376 msgid "Commit list display options" msgstr "Anzeige Versionsliste" -#: gitk:8010 +#: gitk:9379 msgid "Maximum graph width (lines)" msgstr "Maximale Graphenbreite (Zeilen)" -#: gitk:8014 +#: gitk:9383 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "Maximale Graphenbreite (% des Fensters)" -#: gitk:8019 +#: gitk:9388 msgid "Show local changes" msgstr "Lokale Änderungen anzeigen" -#: gitk:8024 +#: gitk:9393 msgid "Auto-select SHA1" msgstr "SHA1-Hashwert automatisch markieren" -#: gitk:8029 +#: gitk:9398 msgid "Diff display options" msgstr "Anzeige Vergleich" -#: gitk:8031 +#: gitk:9400 msgid "Tab spacing" msgstr "Tabulatorbreite" -#: gitk:8035 +#: gitk:9404 msgid "Display nearby tags" msgstr "Naheliegende Überschriften anzeigen" -#: gitk:8040 +#: gitk:9409 msgid "Limit diffs to listed paths" msgstr "Vergleich nur für angezeigte Pfade" -#: gitk:9264 +#: gitk:9414 +msgid "Support per-file encodings" +msgstr "" + +#: gitk:9421 msgid "External diff tool" msgstr "Externes Vergleich-(Diff-)Programm" -#: gitk:9266 +#: gitk:9423 msgid "Choose..." msgstr "Wählen..." -#: gitk:9271 +#: gitk:9428 msgid "Colors: press to choose" msgstr "Farben: Klicken zum Wählen" -#: gitk:8048 +#: gitk:9431 msgid "Background" msgstr "Hintergrund" -#: gitk:8052 +#: gitk:9435 msgid "Foreground" msgstr "Vordergrund" -#: gitk:8056 +#: gitk:9439 msgid "Diff: old lines" msgstr "Vergleich: Alte Zeilen" -#: gitk:8061 +#: gitk:9444 msgid "Diff: new lines" msgstr "Vergleich: Neue Zeilen" -#: gitk:8066 +#: gitk:9449 msgid "Diff: hunk header" msgstr "Vergleich: Änderungstitel" -#: gitk:8072 +#: gitk:9455 msgid "Select bg" msgstr "Hintergrundfarbe Auswählen" -#: gitk:8076 +#: gitk:9459 msgid "Fonts: press to choose" msgstr "Schriftart: Klicken zum Wählen" -#: gitk:8078 +#: gitk:9461 msgid "Main font" msgstr "Programmschriftart" -#: gitk:8079 +#: gitk:9462 msgid "Diff display font" msgstr "Vergleich" -#: gitk:8080 +#: gitk:9463 msgid "User interface font" msgstr "Beschriftungen" -#: gitk:8096 +#: gitk:9488 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: Farbe wählen für %s" -#: gitk:8477 +#: gitk:9934 msgid "" "Sorry, gitk cannot run with this version of Tcl/Tk.\n" " Gitk requires at least Tcl/Tk 8.4." @@ -895,24 +903,24 @@ msgstr "" "Gitk läuft nicht mit dieser Version von Tcl/Tk.\n" "Gitk benötigt mindestens Tcl/Tk 8.4." -#: gitk:8566 +#: gitk:10047 msgid "Cannot find a git repository here." msgstr "Kein Git-Projektarchiv gefunden." -#: gitk:8570 +#: gitk:10051 #, tcl-format msgid "Cannot find the git directory \"%s\"." msgstr "Git-Verzeichnis »%s« wurde nicht gefunden." -#: gitk:8613 +#: gitk:10098 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" msgstr "Mehrdeutige Angabe »%s«: Sowohl Version als auch Dateiname existiert." -#: gitk:8625 +#: gitk:10110 msgid "Bad arguments to gitk:" msgstr "Falsche Kommandozeilen-Parameter für gitk:" -#: gitk:9915 +#: gitk:10170 msgid "Command line" msgstr "Kommandozeile" diff --git a/gitk-git/po/es.po b/gitk-git/po/es.po index 2cb1486247..0e19b5eae2 100644 --- a/gitk-git/po/es.po +++ b/gitk-git/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gitk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-13 17:29+0100\n" +"POT-Creation-Date: 2008-10-18 22:03+1100\n" "PO-Revision-Date: 2008-03-25 11:20+0100\n" "Last-Translator: Santiago Gala <santiago.gala@gmail.com>\n" "Language-Team: Spanish\n" @@ -16,676 +16,702 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: gitk:111 -msgid "Error executing git rev-list:" -msgstr "Error al ejecutar git rev-list:" +#: gitk:113 +msgid "Couldn't get list of unmerged files:" +msgstr "Imposible obtener la lista de archivos pendientes de fusión:" -#: gitk:124 +#: gitk:340 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"No hay archivos seleccionados: se seleccionó la opción --merge pero no hay " +"archivos pendientes de fusión." + +#: gitk:343 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"No hay archivos seleccionados: se seleccionó la opción --merge pero los " +"archivos especificados no necesitan fusión." + +#: gitk:378 msgid "Reading" msgstr "Leyendo" -#: gitk:151 gitk:2191 +#: gitk:438 gitk:3462 msgid "Reading commits..." msgstr "Leyendo revisiones..." -#: gitk:275 -msgid "Can't parse git log output:" -msgstr "Error analizando la salida de git log:" - -#: gitk:386 gitk:2195 +#: gitk:441 gitk:1528 gitk:3465 msgid "No commits selected" msgstr "No se seleccionaron revisiones" -#: gitk:500 +#: gitk:1399 +msgid "Can't parse git log output:" +msgstr "Error analizando la salida de git log:" + +#: gitk:1605 msgid "No commit information available" msgstr "Falta información sobre las revisiones" -#: gitk:599 gitk:621 gitk:1955 gitk:6423 gitk:7923 gitk:8082 +#: gitk:1709 gitk:1731 gitk:3259 gitk:7764 gitk:9293 gitk:9466 msgid "OK" msgstr "Aceptar" -#: gitk:623 gitk:1956 gitk:6107 gitk:6178 gitk:6275 gitk:6321 gitk:6425 -#: gitk:7924 gitk:8083 +#: gitk:1733 gitk:3260 gitk:7439 gitk:7510 gitk:7613 gitk:7660 gitk:7766 +#: gitk:9294 gitk:9467 msgid "Cancel" msgstr "Cancelar" -#: gitk:661 -msgid "File" -msgstr "Archivo" - -#: gitk:663 +#: gitk:1811 msgid "Update" msgstr "Actualizar" -#: gitk:664 +#: gitk:1813 msgid "Reread references" msgstr "Releer referencias" -#: gitk:665 +#: gitk:1814 msgid "List references" msgstr "Lista de referencias" -#: gitk:666 +#: gitk:1815 msgid "Quit" msgstr "Salir" -#: gitk:668 -msgid "Edit" -msgstr "Editar" +#: gitk:1810 +msgid "File" +msgstr "Archivo" -#: gitk:669 +#: gitk:1818 msgid "Preferences" msgstr "Preferencias" -#: gitk:672 gitk:1892 -msgid "View" -msgstr "Vista" +#: gitk:1817 +msgid "Edit" +msgstr "Editar" -#: gitk:673 +#: gitk:1821 msgid "New view..." msgstr "Nueva vista..." -#: gitk:674 gitk:2133 gitk:8722 +#: gitk:1822 msgid "Edit view..." msgstr "Modificar vista..." -#: gitk:676 gitk:2134 gitk:8723 +#: gitk:1823 msgid "Delete view" msgstr "Eliminar vista" -#: gitk:678 +#: gitk:1825 msgid "All files" msgstr "Todos los archivos" -#: gitk:682 -msgid "Help" -msgstr "Ayuda" +#: gitk:1820 gitk:3196 +msgid "View" +msgstr "Vista" -#: gitk:683 gitk:1317 +#: gitk:1828 gitk:2487 msgid "About gitk" msgstr "Acerca de gitk" -#: gitk:684 +#: gitk:1829 msgid "Key bindings" msgstr "Combinaciones de teclas" -#: gitk:741 +#: gitk:1827 +msgid "Help" +msgstr "Ayuda" + +#: gitk:1887 msgid "SHA1 ID: " msgstr "SHA1 ID: " -#: gitk:791 +#: gitk:1918 +msgid "Row" +msgstr "" + +#: gitk:1949 msgid "Find" msgstr "Buscar" -#: gitk:792 +#: gitk:1950 msgid "next" msgstr "<<" -#: gitk:793 +#: gitk:1951 msgid "prev" msgstr ">>" -#: gitk:794 +#: gitk:1952 msgid "commit" msgstr "revisión" -#: gitk:797 gitk:799 gitk:2356 gitk:2379 gitk:2403 gitk:4306 gitk:4369 +#: gitk:1955 gitk:1957 gitk:3617 gitk:3640 gitk:3664 gitk:5550 gitk:5621 msgid "containing:" msgstr "que contiene:" -#: gitk:800 gitk:1778 gitk:1783 gitk:2431 +#: gitk:1958 gitk:2954 gitk:2959 gitk:3692 msgid "touching paths:" msgstr "que modifica la ruta:" -#: gitk:801 gitk:2436 +#: gitk:1959 gitk:3697 msgid "adding/removing string:" msgstr "que añade/elimina cadena:" -#: gitk:810 gitk:812 +#: gitk:1968 gitk:1970 msgid "Exact" msgstr "Exacto" -#: gitk:812 gitk:2514 gitk:4274 +#: gitk:1970 gitk:3773 gitk:5518 msgid "IgnCase" msgstr "NoMayús" -#: gitk:812 gitk:2405 gitk:2512 gitk:4270 +#: gitk:1970 gitk:3666 gitk:3771 gitk:5514 msgid "Regexp" msgstr "Regex" -#: gitk:814 gitk:815 gitk:2533 gitk:2563 gitk:2570 gitk:4380 gitk:4436 +#: gitk:1972 gitk:1973 gitk:3792 gitk:3822 gitk:3829 gitk:5641 gitk:5708 msgid "All fields" msgstr "Todos los campos" -#: gitk:815 gitk:2531 gitk:2563 gitk:4336 +#: gitk:1973 gitk:3790 gitk:3822 gitk:5580 msgid "Headline" msgstr "Título" -#: gitk:816 gitk:2531 gitk:4336 gitk:4436 gitk:4827 +#: gitk:1974 gitk:3790 gitk:5580 gitk:5708 gitk:6109 msgid "Comments" msgstr "Comentarios" -#: gitk:816 gitk:2531 gitk:2535 gitk:2570 gitk:4336 gitk:4763 gitk:5956 -#: gitk:5971 +#: gitk:1974 gitk:3790 gitk:3794 gitk:3829 gitk:5580 gitk:6045 gitk:7285 +#: gitk:7300 msgid "Author" msgstr "Autor" -#: gitk:816 gitk:2531 gitk:4336 gitk:4765 +#: gitk:1974 gitk:3790 gitk:5580 gitk:6047 msgid "Committer" msgstr "" -#: gitk:845 +#: gitk:2003 msgid "Search" msgstr "Buscar" -#: gitk:852 +#: gitk:2010 msgid "Diff" msgstr "Diferencia" -#: gitk:854 +#: gitk:2012 msgid "Old version" msgstr "Versión antigua" -#: gitk:856 +#: gitk:2014 msgid "New version" msgstr "Versión nueva" -#: gitk:858 +#: gitk:2016 msgid "Lines of context" msgstr "Líneas de contexto" -#: gitk:868 +#: gitk:2026 msgid "Ignore space change" msgstr "Ignora cambios de espaciado" -#: gitk:926 +#: gitk:2084 msgid "Patch" msgstr "Parche" -#: gitk:928 +#: gitk:2086 msgid "Tree" msgstr "Árbol" -#: gitk:1053 gitk:1068 gitk:6022 +#: gitk:2213 gitk:2226 msgid "Diff this -> selected" msgstr "Diferencia de esta -> seleccionada" -#: gitk:1055 gitk:1070 gitk:6023 +#: gitk:2214 gitk:2227 msgid "Diff selected -> this" msgstr "Diferencia de seleccionada -> esta" -#: gitk:1057 gitk:1072 gitk:6024 +#: gitk:2215 gitk:2228 msgid "Make patch" msgstr "Crear patch" -#: gitk:1058 gitk:6162 +#: gitk:2216 gitk:7494 msgid "Create tag" msgstr "Crear etiqueta" -#: gitk:1059 gitk:6255 +#: gitk:2217 gitk:7593 msgid "Write commit to file" msgstr "Escribir revisiones a archivo" -#: gitk:1060 gitk:6309 +#: gitk:2218 gitk:7647 msgid "Create new branch" msgstr "Crear nueva rama" -#: gitk:1061 +#: gitk:2219 msgid "Cherry-pick this commit" msgstr "Añadir esta revisión a la rama actual (cherry-pick)" -#: gitk:1063 +#: gitk:2220 msgid "Reset HEAD branch to here" msgstr "Traer la rama HEAD aquí" -#: gitk:1079 +#: gitk:2234 msgid "Check out this branch" msgstr "Cambiar a esta rama" -#: gitk:1081 +#: gitk:2235 msgid "Remove this branch" msgstr "Eliminar esta rama" -#: gitk:1087 +#: gitk:2242 msgid "Highlight this too" msgstr "Seleccionar también" -#: gitk:1089 +#: gitk:2243 msgid "Highlight this only" msgstr "Seleccionar sólo" -#: gitk:1318 +#: gitk:2245 +msgid "Blame parent commit" +msgstr "" + +#: gitk:2488 msgid "" "\n" "Gitk - a commit viewer for git\n" "\n" -"Copyright © 2005-2006 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" "Use and redistribute under the terms of the GNU General Public License" msgstr "" "\n" "Gitk - un visualizador de revisiones para git\n" "\n" -"Copyright © 2005-2006 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" -"Uso y redistribución permitidos según los términos de la Licencia Pública General de " -"GNU (GNU GPL)" +"Uso y redistribución permitidos según los términos de la Licencia Pública " +"General de GNU (GNU GPL)" -#: gitk:1326 gitk:1387 gitk:6581 +#: gitk:2496 gitk:2557 gitk:7943 msgid "Close" msgstr "Cerrar" -#: gitk:1345 +#: gitk:2515 msgid "Gitk key bindings" msgstr "Combinaciones de tecla de Gitk" -#: gitk:1347 +#: gitk:2517 msgid "Gitk key bindings:" msgstr "Combinaciones de tecla de Gitk:" -#: gitk:1349 +#: gitk:2519 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tSalir" -#: gitk:1350 +#: gitk:2520 msgid "<Home>\t\tMove to first commit" msgstr "<Home>\t\tIr a la primera revisión" -#: gitk:1351 +#: gitk:2521 msgid "<End>\t\tMove to last commit" msgstr "<End>\t\tIr a la última revisión" -#: gitk:1352 +#: gitk:2522 msgid "<Up>, p, i\tMove up one commit" msgstr "<Up>, p, i\tSubir una revisión" -#: gitk:1353 +#: gitk:2523 msgid "<Down>, n, k\tMove down one commit" msgstr "<Down>, n, k\tBajar una revisión" -#: gitk:1354 +#: gitk:2524 msgid "<Left>, z, j\tGo back in history list" msgstr "<Left>, z, j\tRetroceder en la historia" -#: gitk:1355 +#: gitk:2525 msgid "<Right>, x, l\tGo forward in history list" msgstr "<Right>, x, l\tAvanzar en la historia" -#: gitk:1356 +#: gitk:2526 msgid "<PageUp>\tMove up one page in commit list" msgstr "<PageUp>\tSubir una página en la lista de revisiones" -#: gitk:1357 +#: gitk:2527 msgid "<PageDown>\tMove down one page in commit list" msgstr "<PageDown>\tBajar una página en la lista de revisiones" -#: gitk:1358 +#: gitk:2528 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tDesplazarse al inicio de la lista de revisiones" -#: gitk:1359 +#: gitk:2529 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tDesplazarse al final de la lista de revisiones" -#: gitk:1360 +#: gitk:2530 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Up>\tDesplazar una línea hacia arriba la lista de revisiones" -#: gitk:1361 +#: gitk:2531 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Down>\tDesplazar una línea hacia abajo la lista de revisiones" -#: gitk:1362 +#: gitk:2532 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tDesplazar una página hacia arriba la lista de revisiones" -#: gitk:1363 +#: gitk:2533 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tDesplazar una página hacia abajo la lista de revisiones" -#: gitk:1364 +#: gitk:2534 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" msgstr "<Shift-Up>\tBuscar hacia atrás (arriba, revisiones siguientes)" -#: gitk:1365 +#: gitk:2535 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" msgstr "<Shift-Down>\tBuscar hacia adelante (abajo, revisiones anteriores)" -#: gitk:1366 +#: gitk:2536 msgid "<Delete>, b\tScroll diff view up one page" msgstr "<Delete>, b\tDesplaza hacia arriba una página la vista de diferencias" -#: gitk:1367 +#: gitk:2537 msgid "<Backspace>\tScroll diff view up one page" msgstr "<Backspace>\tDesplaza hacia arriba una página la vista de diferencias" -#: gitk:1368 +#: gitk:2538 msgid "<Space>\t\tScroll diff view down one page" msgstr "<Space>\t\tDesplaza hacia abajo una página la vista de diferencias" -#: gitk:1369 +#: gitk:2539 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tDesplaza hacia arriba 18 líneas la vista de diferencias" -#: gitk:1370 +#: gitk:2540 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tDesplaza hacia abajo 18 líneas la vista de diferencias" -#: gitk:1371 +#: gitk:2541 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tBuscar" -#: gitk:1372 +#: gitk:2542 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tBuscar el siguiente" -#: gitk:1373 +#: gitk:2543 msgid "<Return>\tMove to next find hit" msgstr "<Return>\tBuscar el siguiente" -#: gitk:1374 +#: gitk:2544 msgid "/\t\tMove to next find hit, or redo find" msgstr "/\t\tBuscar el siguiente, o reiniciar la búsqueda" -#: gitk:1375 +#: gitk:2545 msgid "?\t\tMove to previous find hit" msgstr "?\t\tBuscar el anterior" -#: gitk:1376 +#: gitk:2546 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tDesplazar la vista de diferencias al archivo siguiente" -#: gitk:1377 +#: gitk:2547 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tBuscar siguiente en la vista de diferencias" -#: gitk:1378 +#: gitk:2548 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tBuscar anterior en la vista de diferencias" -#: gitk:1379 +#: gitk:2549 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-KP+>\tAumentar tamaño del texto" -#: gitk:1380 +#: gitk:2550 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\tAumentar tamaño del texto" -#: gitk:1381 +#: gitk:2551 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-KP->\tDisminuir tamaño del texto" -#: gitk:1382 +#: gitk:2552 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\tDisminuir tamaño del texto" -#: gitk:1383 +#: gitk:2553 msgid "<F5>\t\tUpdate" msgstr "<F5>\t\tActualizar" -#: gitk:1896 +#: gitk:3200 msgid "Gitk view definition" msgstr "Definición de vistas de Gitk" -#: gitk:1921 +#: gitk:3225 msgid "Name" msgstr "Nombre" -#: gitk:1924 +#: gitk:3228 msgid "Remember this view" msgstr "Recordar esta vista" -#: gitk:1928 -msgid "Commits to include (arguments to git rev-list):" -msgstr "Revisiones a incluir (argumentos a git rev-list):" +#: gitk:3232 +msgid "Commits to include (arguments to git log):" +msgstr "Revisiones a incluir (argumentos a git log):" -#: gitk:1935 +#: gitk:3239 msgid "Command to generate more commits to include:" msgstr "Comando que genera más revisiones a incluir:" -#: gitk:1942 +#: gitk:3246 msgid "Enter files and directories to include, one per line:" msgstr "Introducir archivos y directorios a incluir, uno por línea:" -#: gitk:1989 +#: gitk:3293 msgid "Error in commit selection arguments:" msgstr "Error en los argumentos de selección de las revisiones:" -#: gitk:2043 gitk:2127 gitk:2583 gitk:2597 gitk:3781 gitk:8688 gitk:8689 +#: gitk:3347 gitk:3399 gitk:3842 gitk:3856 gitk:5060 gitk:10141 gitk:10142 msgid "None" msgstr "Ninguno" -#: gitk:2531 gitk:4336 gitk:5958 gitk:5973 +#: gitk:3790 gitk:5580 gitk:7287 gitk:7302 msgid "Date" msgstr "Fecha" -#: gitk:2531 gitk:4336 +#: gitk:3790 gitk:5580 msgid "CDate" msgstr "Fecha de creación" -#: gitk:2680 gitk:2685 +#: gitk:3939 gitk:3944 msgid "Descendant" msgstr "Descendiente" -#: gitk:2681 +#: gitk:3940 msgid "Not descendant" msgstr "No descendiente" -#: gitk:2688 gitk:2693 +#: gitk:3947 gitk:3952 msgid "Ancestor" msgstr "Antepasado" -#: gitk:2689 +#: gitk:3948 msgid "Not ancestor" msgstr "No antepasado" -#: gitk:2924 +#: gitk:4187 msgid "Local changes checked in to index but not committed" msgstr "Cambios locales añadidos al índice pero sin completar revisión" -#: gitk:2954 +#: gitk:4220 msgid "Local uncommitted changes, not checked in to index" msgstr "Cambios locales sin añadir al índice" -#: gitk:4305 +#: gitk:5549 msgid "Searching" msgstr "Buscando" -#: gitk:4767 +#: gitk:6049 msgid "Tags:" msgstr "Etiquetas:" -#: gitk:4784 gitk:4790 gitk:5951 +#: gitk:6066 gitk:6072 gitk:7280 msgid "Parent" msgstr "Padre" -#: gitk:4795 +#: gitk:6077 msgid "Child" msgstr "Hija" -#: gitk:4804 +#: gitk:6086 msgid "Branch" msgstr "Rama" -#: gitk:4807 +#: gitk:6089 msgid "Follows" msgstr "Sigue-a" -#: gitk:4810 +#: gitk:6092 msgid "Precedes" msgstr "Precede-a" -#: gitk:5093 +#: gitk:6378 msgid "Error getting merge diffs:" msgstr "Error al leer las diferencias de fusión:" -#: gitk:5778 +#: gitk:7113 msgid "Goto:" msgstr "Ir a:" -#: gitk:5780 +#: gitk:7115 msgid "SHA1 ID:" msgstr "SHA1 ID:" -#: gitk:5805 +#: gitk:7134 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "La id SHA1 abreviada %s es ambigua" -#: gitk:5817 +#: gitk:7146 #, tcl-format msgid "SHA1 id %s is not known" msgstr "La id SHA1 %s es desconocida" -#: gitk:5819 +#: gitk:7148 #, tcl-format msgid "Tag/Head %s is not known" msgstr "La etiqueta/rama %s es deconocida" -#: gitk:5961 +#: gitk:7290 msgid "Children" msgstr "Hijas" -#: gitk:6018 +#: gitk:7347 #, tcl-format msgid "Reset %s branch to here" msgstr "Poner la rama %s en esta revisión" -#: gitk:6049 +#: gitk:7349 +msgid "Detached head: can't reset" +msgstr "" + +#: gitk:7381 msgid "Top" msgstr "Origen" -#: gitk:6050 +#: gitk:7382 msgid "From" msgstr "De" -#: gitk:6055 +#: gitk:7387 msgid "To" msgstr "A" -#: gitk:6078 +#: gitk:7410 msgid "Generate patch" msgstr "Generar parche" -#: gitk:6080 +#: gitk:7412 msgid "From:" msgstr "De:" -#: gitk:6089 +#: gitk:7421 msgid "To:" msgstr "Para:" -#: gitk:6098 +#: gitk:7430 msgid "Reverse" msgstr "Invertir" -#: gitk:6100 gitk:6269 +#: gitk:7432 gitk:7607 msgid "Output file:" msgstr "Escribir a archivo:" -#: gitk:6106 +#: gitk:7438 msgid "Generate" msgstr "Generar" -#: gitk:6142 +#: gitk:7474 msgid "Error creating patch:" msgstr "Error en la creación del parche:" -#: gitk:6164 gitk:6257 gitk:6311 +#: gitk:7496 gitk:7595 gitk:7649 msgid "ID:" msgstr "ID:" -#: gitk:6173 +#: gitk:7505 msgid "Tag name:" msgstr "Nombre de etiqueta:" -#: gitk:6177 gitk:6320 +#: gitk:7509 gitk:7659 msgid "Create" msgstr "Crear" -#: gitk:6192 +#: gitk:7524 msgid "No tag name specified" msgstr "No se ha especificado etiqueta" -#: gitk:6196 +#: gitk:7528 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "La etiqueta \"%s\" ya existe" -#: gitk:6202 +#: gitk:7534 msgid "Error creating tag:" msgstr "Error al crear la etiqueta:" -#: gitk:6266 +#: gitk:7604 msgid "Command:" msgstr "Comando:" -#: gitk:6274 +#: gitk:7612 msgid "Write" msgstr "Escribir" -#: gitk:6290 +#: gitk:7628 msgid "Error writing commit:" msgstr "Error al escribir revisión:" -#: gitk:6316 +#: gitk:7654 msgid "Name:" msgstr "Nombre:" -#: gitk:6335 +#: gitk:7674 msgid "Please specify a name for the new branch" msgstr "Especifique un nombre para la nueva rama" -#: gitk:6364 +#: gitk:7703 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "La revisión %s ya está incluida en la rama %s -- ¿Volver a aplicarla?" -#: gitk:6369 +#: gitk:7708 msgid "Cherry-picking" msgstr "Eligiendo revisiones (cherry-picking)" -#: gitk:6381 +#: gitk:7720 msgid "No changes committed" msgstr "No se han guardado cambios" -#: gitk:6404 +#: gitk:7745 msgid "Confirm reset" msgstr "Confirmar git reset" -#: gitk:6406 +#: gitk:7747 #, tcl-format msgid "Reset branch %s to %s?" msgstr "¿Reponer la rama %s a %s?" -#: gitk:6410 +#: gitk:7751 msgid "Reset type:" msgstr "Tipo de reposición:" -#: gitk:6414 +#: gitk:7755 msgid "Soft: Leave working tree and index untouched" msgstr "Suave: No altera la copia de trabajo ni el índice" -#: gitk:6417 +#: gitk:7758 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Mixta: Actualiza el índice, no altera la copia de trabajo" -#: gitk:6420 +#: gitk:7761 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -693,19 +719,19 @@ msgstr "" "Dura: Actualiza el índice y la copia de trabajo\n" "(abandona TODAS las modificaciones locales)" -#: gitk:6436 +#: gitk:7777 msgid "Resetting" msgstr "Reponiendo" -#: gitk:6493 +#: gitk:7834 msgid "Checking out" msgstr "Creando copia de trabajo" -#: gitk:6523 +#: gitk:7885 msgid "Cannot delete the currently checked-out branch" msgstr "No se puede borrar la rama actual" -#: gitk:6529 +#: gitk:7891 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -714,134 +740,146 @@ msgstr "" "Las revisiones de la rama %s no están presentes en otras ramas.\n" "¿Borrar la rama %s?" -#: gitk:6560 +#: gitk:7922 #, tcl-format msgid "Tags and heads: %s" msgstr "Etiquetas y ramas: %s" -#: gitk:6574 +#: gitk:7936 msgid "Filter" msgstr "Filtro" -#: gitk:6868 +#: gitk:8230 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." msgstr "" -"Error al leer la topología de revisiones: la información sobre " -"las ramas y etiquetas precedentes y siguientes será incompleta." +"Error al leer la topología de revisiones: la información sobre las ramas y " +"etiquetas precedentes y siguientes será incompleta." -#: gitk:7852 +#: gitk:9216 msgid "Tag" msgstr "Etiqueta" -#: gitk:7852 +#: gitk:9216 msgid "Id" msgstr "Id" -#: gitk:7892 +#: gitk:9262 msgid "Gitk font chooser" msgstr "Selector de tipografías gitk" -#: gitk:7909 +#: gitk:9279 msgid "B" msgstr "B" -#: gitk:7912 +#: gitk:9282 msgid "I" msgstr "I" -#: gitk:8005 +#: gitk:9375 msgid "Gitk preferences" msgstr "Preferencias de gitk" -#: gitk:8006 +#: gitk:9376 msgid "Commit list display options" msgstr "Opciones de visualización de la lista de revisiones" -#: gitk:8009 +#: gitk:9379 msgid "Maximum graph width (lines)" msgstr "Ancho máximo del gráfico (en líneas)" -#: gitk:8013 +#: gitk:9383 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "Ancho máximo del gráfico (en % del panel)" -#: gitk:8018 +#: gitk:9388 msgid "Show local changes" msgstr "Mostrar cambios locales" -#: gitk:8023 +#: gitk:9393 msgid "Auto-select SHA1" msgstr "Seleccionar automáticamente SHA1 hash" -#: gitk:8028 +#: gitk:9398 msgid "Diff display options" msgstr "Opciones de visualización de diferencias" -#: gitk:8030 +#: gitk:9400 msgid "Tab spacing" msgstr "Espaciado de tabulador" -#: gitk:8034 +#: gitk:9404 msgid "Display nearby tags" msgstr "Mostrar etiquetas cercanas" -#: gitk:8039 +#: gitk:9409 msgid "Limit diffs to listed paths" msgstr "Limitar las diferencias a las rutas seleccionadas" -#: gitk:8044 +#: gitk:9414 +msgid "Support per-file encodings" +msgstr "" + +#: gitk:9421 +msgid "External diff tool" +msgstr "" + +#: gitk:9423 +msgid "Choose..." +msgstr "" + +#: gitk:9428 msgid "Colors: press to choose" msgstr "Colores: pulse para seleccionar" -#: gitk:8047 +#: gitk:9431 msgid "Background" msgstr "Fondo" -#: gitk:8051 +#: gitk:9435 msgid "Foreground" msgstr "Primer plano" -#: gitk:8055 +#: gitk:9439 msgid "Diff: old lines" msgstr "Diff: líneas viejas" -#: gitk:8060 +#: gitk:9444 msgid "Diff: new lines" msgstr "Diff: líneas nuevas" -#: gitk:8065 +#: gitk:9449 msgid "Diff: hunk header" msgstr "Diff: cabecera de fragmento" -#: gitk:8071 +#: gitk:9455 msgid "Select bg" msgstr "Color de fondo de la selección" -#: gitk:8075 +#: gitk:9459 msgid "Fonts: press to choose" msgstr "Tipografías: pulse para elegir" -#: gitk:8077 +#: gitk:9461 msgid "Main font" msgstr "Tipografía principal" -#: gitk:8078 +#: gitk:9462 msgid "Diff display font" msgstr "Tipografía para diferencias" -#: gitk:8079 +#: gitk:9463 msgid "User interface font" msgstr "Tipografía para interfaz de usuario" -#: gitk:8095 +#: gitk:9488 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: elegir color para %s" -#: gitk:8476 +#: gitk:9934 msgid "" "Sorry, gitk cannot run with this version of Tcl/Tk.\n" " Gitk requires at least Tcl/Tk 8.4." @@ -849,42 +887,25 @@ msgstr "" "Esta versión de Tcl/Tk es demasiado antigua.\n" " Gitk requiere Tcl/Tk versión 8.4 o superior." -#: gitk:8565 +#: gitk:10047 msgid "Cannot find a git repository here." msgstr "No hay un repositorio git aquí." -#: gitk:8569 +#: gitk:10051 #, tcl-format msgid "Cannot find the git directory \"%s\"." msgstr "No hay directorio git \"%s\"." -#: gitk:8612 +#: gitk:10098 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" -msgstr "Argumento ambiguo: '%s' es tanto una revisión como un nombre de archivo" +msgstr "" +"Argumento ambiguo: '%s' es tanto una revisión como un nombre de archivo" -#: gitk:8624 +#: gitk:10110 msgid "Bad arguments to gitk:" msgstr "Argumentos incorrectos a Gitk:" -#: gitk:8636 -msgid "Couldn't get list of unmerged files:" -msgstr "Imposible obtener la lista de archivos pendientes de fusión:" - -#: gitk:8652 -msgid "No files selected: --merge specified but no files are unmerged." -msgstr "" -"No hay archivos seleccionados: se seleccionó la opción --merge pero no hay " -"archivos pendientes de fusión." - -#: gitk:8655 -msgid "" -"No files selected: --merge specified but no unmerged files are within file " -"limit." -msgstr "" -"No hay archivos seleccionados: se seleccionó la opción --merge pero los archivos " -"especificados no necesitan fusión." - -#: gitk:8716 +#: gitk:10170 msgid "Command line" msgstr "Línea de comandos" diff --git a/gitk-git/po/it.po b/gitk-git/po/it.po index d0f4c2e19a..e89c95702c 100644 --- a/gitk-git/po/it.po +++ b/gitk-git/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gitk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-13 17:29+0100\n" +"POT-Creation-Date: 2008-10-18 22:03+1100\n" "PO-Revision-Date: 2008-03-13 17:34+0100\n" "Last-Translator: Michele Ballabio <barra_cuda@katamail.com>\n" "Language-Team: Italian\n" @@ -16,676 +16,706 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: gitk:111 -msgid "Error executing git rev-list:" -msgstr "Errore nell'esecuzione di git rev-list:" +#: gitk:113 +msgid "Couldn't get list of unmerged files:" +msgstr "Impossibile ottenere l'elenco dei file in attesa di fusione:" + +#: gitk:340 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"Nessun file selezionato: è stata specificata l'opzione --merge ma non ci " +"sono file in attesa di fusione." + +#: gitk:343 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"Nessun file selezionato: è stata specificata l'opzione --merge ma i file " +"specificati non sono in attesa di fusione." -#: gitk:124 +#: gitk:365 gitk:503 +msgid "Error executing git log:" +msgstr "Errore nell'esecuzione di git log:" + +#: gitk:378 msgid "Reading" msgstr "Lettura in corso" -#: gitk:151 gitk:2191 +#: gitk:438 gitk:3462 msgid "Reading commits..." msgstr "Lettura delle revisioni in corso..." -#: gitk:275 -msgid "Can't parse git log output:" -msgstr "Impossibile elaborare i dati di git log:" - -#: gitk:386 gitk:2195 +#: gitk:441 gitk:1528 gitk:3465 msgid "No commits selected" msgstr "Nessuna revisione selezionata" -#: gitk:500 +#: gitk:1399 +msgid "Can't parse git log output:" +msgstr "Impossibile elaborare i dati di git log:" + +#: gitk:1605 msgid "No commit information available" msgstr "Nessuna informazione disponibile sulle revisioni" -#: gitk:599 gitk:621 gitk:1955 gitk:6423 gitk:7923 gitk:8082 +#: gitk:1709 gitk:1731 gitk:3259 gitk:7764 gitk:9293 gitk:9466 msgid "OK" msgstr "OK" -#: gitk:623 gitk:1956 gitk:6107 gitk:6178 gitk:6275 gitk:6321 gitk:6425 -#: gitk:7924 gitk:8083 +#: gitk:1733 gitk:3260 gitk:7439 gitk:7510 gitk:7613 gitk:7660 gitk:7766 +#: gitk:9294 gitk:9467 msgid "Cancel" msgstr "Annulla" -#: gitk:661 -msgid "File" -msgstr "File" - -#: gitk:663 +#: gitk:1811 msgid "Update" msgstr "Aggiorna" -#: gitk:664 +#: gitk:1813 msgid "Reread references" msgstr "Rileggi riferimenti" -#: gitk:665 +#: gitk:1814 msgid "List references" msgstr "Elenca riferimenti" -#: gitk:666 +#: gitk:1815 msgid "Quit" msgstr "Esci" -#: gitk:668 -msgid "Edit" -msgstr "Modifica" +#: gitk:1810 +msgid "File" +msgstr "File" -#: gitk:669 +#: gitk:1818 msgid "Preferences" msgstr "Preferenze" -#: gitk:672 gitk:1892 -msgid "View" -msgstr "Vista" +#: gitk:1817 +msgid "Edit" +msgstr "Modifica" -#: gitk:673 +#: gitk:1821 msgid "New view..." msgstr "Nuova vista..." -#: gitk:674 gitk:2133 gitk:8722 +#: gitk:1822 msgid "Edit view..." msgstr "Modifica vista..." -#: gitk:676 gitk:2134 gitk:8723 +#: gitk:1823 msgid "Delete view" msgstr "Elimina vista" -#: gitk:678 +#: gitk:1825 msgid "All files" msgstr "Tutti i file" -#: gitk:682 -msgid "Help" -msgstr "Aiuto" +#: gitk:1820 gitk:3196 +msgid "View" +msgstr "Vista" -#: gitk:683 gitk:1317 +#: gitk:1828 gitk:2487 msgid "About gitk" msgstr "Informazioni su gitk" -#: gitk:684 +#: gitk:1829 msgid "Key bindings" msgstr "Scorciatoie da tastiera" -#: gitk:741 +#: gitk:1827 +msgid "Help" +msgstr "Aiuto" + +#: gitk:1887 msgid "SHA1 ID: " msgstr "SHA1 ID: " -#: gitk:791 +#: gitk:1918 +msgid "Row" +msgstr "" + +#: gitk:1949 msgid "Find" msgstr "Trova" -#: gitk:792 +#: gitk:1950 msgid "next" msgstr "succ" -#: gitk:793 +#: gitk:1951 msgid "prev" msgstr "prec" -#: gitk:794 +#: gitk:1952 msgid "commit" msgstr "revisione" -#: gitk:797 gitk:799 gitk:2356 gitk:2379 gitk:2403 gitk:4306 gitk:4369 +#: gitk:1955 gitk:1957 gitk:3617 gitk:3640 gitk:3664 gitk:5550 gitk:5621 msgid "containing:" msgstr "contenente:" -#: gitk:800 gitk:1778 gitk:1783 gitk:2431 +#: gitk:1958 gitk:2954 gitk:2959 gitk:3692 msgid "touching paths:" msgstr "che riguarda i percorsi:" -#: gitk:801 gitk:2436 +#: gitk:1959 gitk:3697 msgid "adding/removing string:" msgstr "che aggiunge/rimuove la stringa:" -#: gitk:810 gitk:812 +#: gitk:1968 gitk:1970 msgid "Exact" msgstr "Esatto" -#: gitk:812 gitk:2514 gitk:4274 +#: gitk:1970 gitk:3773 gitk:5518 msgid "IgnCase" msgstr "" -#: gitk:812 gitk:2405 gitk:2512 gitk:4270 +#: gitk:1970 gitk:3666 gitk:3771 gitk:5514 msgid "Regexp" msgstr "" -#: gitk:814 gitk:815 gitk:2533 gitk:2563 gitk:2570 gitk:4380 gitk:4436 +#: gitk:1972 gitk:1973 gitk:3792 gitk:3822 gitk:3829 gitk:5641 gitk:5708 msgid "All fields" msgstr "Tutti i campi" -#: gitk:815 gitk:2531 gitk:2563 gitk:4336 +#: gitk:1973 gitk:3790 gitk:3822 gitk:5580 msgid "Headline" msgstr "Titolo" -#: gitk:816 gitk:2531 gitk:4336 gitk:4436 gitk:4827 +#: gitk:1974 gitk:3790 gitk:5580 gitk:5708 gitk:6109 msgid "Comments" msgstr "Commenti" -#: gitk:816 gitk:2531 gitk:2535 gitk:2570 gitk:4336 gitk:4763 gitk:5956 -#: gitk:5971 +#: gitk:1974 gitk:3790 gitk:3794 gitk:3829 gitk:5580 gitk:6045 gitk:7285 +#: gitk:7300 msgid "Author" msgstr "Autore" -#: gitk:816 gitk:2531 gitk:4336 gitk:4765 +#: gitk:1974 gitk:3790 gitk:5580 gitk:6047 msgid "Committer" msgstr "Revisione creata da" -#: gitk:845 +#: gitk:2003 msgid "Search" msgstr "Cerca" -#: gitk:852 +#: gitk:2010 msgid "Diff" msgstr "" -#: gitk:854 +#: gitk:2012 msgid "Old version" msgstr "Vecchia versione" -#: gitk:856 +#: gitk:2014 msgid "New version" msgstr "Nuova versione" -#: gitk:858 +#: gitk:2016 msgid "Lines of context" msgstr "Linee di contesto" -#: gitk:868 +#: gitk:2026 msgid "Ignore space change" msgstr "Ignora modifiche agli spazi" -#: gitk:926 +#: gitk:2084 msgid "Patch" msgstr "Modifiche" -#: gitk:928 +#: gitk:2086 msgid "Tree" msgstr "Directory" -#: gitk:1053 gitk:1068 gitk:6022 +#: gitk:2213 gitk:2226 msgid "Diff this -> selected" msgstr "Diff questo -> selezionato" -#: gitk:1055 gitk:1070 gitk:6023 +#: gitk:2214 gitk:2227 msgid "Diff selected -> this" msgstr "Diff selezionato -> questo" -#: gitk:1057 gitk:1072 gitk:6024 +#: gitk:2215 gitk:2228 msgid "Make patch" msgstr "Crea patch" -#: gitk:1058 gitk:6162 +#: gitk:2216 gitk:7494 msgid "Create tag" msgstr "Crea etichetta" -#: gitk:1059 gitk:6255 +#: gitk:2217 gitk:7593 msgid "Write commit to file" msgstr "Scrivi revisione in un file" -#: gitk:1060 gitk:6309 +#: gitk:2218 gitk:7647 msgid "Create new branch" msgstr "Crea un nuovo ramo" -#: gitk:1061 +#: gitk:2219 msgid "Cherry-pick this commit" msgstr "Porta questa revisione in cima al ramo attuale" -#: gitk:1063 +#: gitk:2220 msgid "Reset HEAD branch to here" msgstr "Aggiorna il ramo HEAD a questa revisione" -#: gitk:1079 +#: gitk:2234 msgid "Check out this branch" msgstr "Attiva questo ramo" -#: gitk:1081 +#: gitk:2235 msgid "Remove this branch" msgstr "Elimina questo ramo" -#: gitk:1087 +#: gitk:2242 msgid "Highlight this too" msgstr "Evidenzia anche questo" -#: gitk:1089 +#: gitk:2243 msgid "Highlight this only" msgstr "Evidenzia solo questo" -#: gitk:1318 +#: gitk:2245 +msgid "Blame parent commit" +msgstr "" + +#: gitk:2488 msgid "" "\n" "Gitk - a commit viewer for git\n" "\n" -"Copyright © 2005-2006 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" "Use and redistribute under the terms of the GNU General Public License" msgstr "" "\n" "Gitk - un visualizzatore di revisioni per git\n" "\n" -"Copyright © 2005-2006 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" "Utilizzo e redistribuzione permessi sotto i termini della GNU General Public " "License" -#: gitk:1326 gitk:1387 gitk:6581 +#: gitk:2496 gitk:2557 gitk:7943 msgid "Close" msgstr "Chiudi" -#: gitk:1345 +#: gitk:2515 msgid "Gitk key bindings" msgstr "Scorciatoie da tastiera di Gitk" -#: gitk:1347 +#: gitk:2517 msgid "Gitk key bindings:" msgstr "Scorciatoie da tastiera di Gitk:" -#: gitk:1349 +#: gitk:2519 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tEsci" -#: gitk:1350 +#: gitk:2520 msgid "<Home>\t\tMove to first commit" msgstr "<Home>\t\tVai alla prima revisione" -#: gitk:1351 +#: gitk:2521 msgid "<End>\t\tMove to last commit" msgstr "<End>\t\tVai all'ultima revisione" -#: gitk:1352 +#: gitk:2522 msgid "<Up>, p, i\tMove up one commit" msgstr "<Up>, p, i\tVai più in alto di una revisione" -#: gitk:1353 +#: gitk:2523 msgid "<Down>, n, k\tMove down one commit" msgstr "<Down>, n, k\tVai più in basso di una revisione" -#: gitk:1354 +#: gitk:2524 msgid "<Left>, z, j\tGo back in history list" msgstr "<Left>, z, j\tTorna indietro nella cronologia" -#: gitk:1355 +#: gitk:2525 msgid "<Right>, x, l\tGo forward in history list" msgstr "<Right>, x, l\tVai avanti nella cronologia" -#: gitk:1356 +#: gitk:2526 msgid "<PageUp>\tMove up one page in commit list" msgstr "<PageUp>\tVai più in alto di una pagina nella lista delle revisioni" -#: gitk:1357 +#: gitk:2527 msgid "<PageDown>\tMove down one page in commit list" msgstr "<PageDown>\tVai più in basso di una pagina nella lista delle revisioni" -#: gitk:1358 +#: gitk:2528 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tScorri alla cima della lista delle revisioni" -#: gitk:1359 +#: gitk:2529 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tScorri alla fine della lista delle revisioni" -#: gitk:1360 +#: gitk:2530 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Up>\tScorri la lista delle revisioni in alto di una riga" -#: gitk:1361 +#: gitk:2531 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Down>\tScorri la lista delle revisioni in basso di una riga" -#: gitk:1362 +#: gitk:2532 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tScorri la lista delle revisioni in alto di una pagina" -#: gitk:1363 +#: gitk:2533 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tScorri la lista delle revisioni in basso di una pagina" -#: gitk:1364 +#: gitk:2534 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" msgstr "<Shift-Up>\tTrova all'indietro (verso l'alto, revisioni successive)" -#: gitk:1365 +#: gitk:2535 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" msgstr "<Shift-Down>\tTrova in avanti (verso il basso, revisioni precedenti)" -#: gitk:1366 +#: gitk:2536 msgid "<Delete>, b\tScroll diff view up one page" msgstr "<Delete>, b\tScorri la vista delle differenze in alto di una pagina" -#: gitk:1367 +#: gitk:2537 msgid "<Backspace>\tScroll diff view up one page" msgstr "<Backspace>\tScorri la vista delle differenze in alto di una pagina" -#: gitk:1368 +#: gitk:2538 msgid "<Space>\t\tScroll diff view down one page" msgstr "<Space>\t\tScorri la vista delle differenze in basso di una pagina" -#: gitk:1369 +#: gitk:2539 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tScorri la vista delle differenze in alto di 18 linee" -#: gitk:1370 +#: gitk:2540 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tScorri la vista delle differenze in basso di 18 linee" -#: gitk:1371 +#: gitk:2541 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tTrova" -#: gitk:1372 +#: gitk:2542 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tTrova in avanti" -#: gitk:1373 +#: gitk:2543 msgid "<Return>\tMove to next find hit" msgstr "<Return>\tTrova in avanti" -#: gitk:1374 +#: gitk:2544 msgid "/\t\tMove to next find hit, or redo find" msgstr "/\t\tTrova in avanti, o cerca di nuovo" -#: gitk:1375 +#: gitk:2545 msgid "?\t\tMove to previous find hit" msgstr "?\t\tTrova all'indietro" -#: gitk:1376 +#: gitk:2546 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tScorri la vista delle differenze al file successivo" -#: gitk:1377 +#: gitk:2547 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tCerca in avanti nella vista delle differenze" -#: gitk:1378 +#: gitk:2548 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tCerca all'indietro nella vista delle differenze" -#: gitk:1379 +#: gitk:2549 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-KP+>\tAumenta grandezza carattere" -#: gitk:1380 +#: gitk:2550 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\tAumenta grandezza carattere" -#: gitk:1381 +#: gitk:2551 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-KP->\tDiminuisci grandezza carattere" -#: gitk:1382 +#: gitk:2552 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\tDiminuisci grandezza carattere" -#: gitk:1383 +#: gitk:2553 msgid "<F5>\t\tUpdate" msgstr "<F5>\t\tAggiorna" -#: gitk:1896 +#: gitk:3200 msgid "Gitk view definition" msgstr "Scelta vista Gitk" -#: gitk:1921 +#: gitk:3225 msgid "Name" msgstr "Nome" -#: gitk:1924 +#: gitk:3228 msgid "Remember this view" msgstr "Ricorda questa vista" -#: gitk:1928 -msgid "Commits to include (arguments to git rev-list):" -msgstr "Revisioni da includere (argomenti di git rev-list):" +#: gitk:3232 +msgid "Commits to include (arguments to git log):" +msgstr "Revisioni da includere (argomenti di git log):" -#: gitk:1935 +#: gitk:3239 msgid "Command to generate more commits to include:" msgstr "Comando che genera altre revisioni da visualizzare:" -#: gitk:1942 +#: gitk:3246 msgid "Enter files and directories to include, one per line:" msgstr "Inserire file e directory da includere, uno per riga:" -#: gitk:1989 +#: gitk:3293 msgid "Error in commit selection arguments:" msgstr "Errore negli argomenti di selezione delle revisioni:" -#: gitk:2043 gitk:2127 gitk:2583 gitk:2597 gitk:3781 gitk:8688 gitk:8689 +#: gitk:3347 gitk:3399 gitk:3842 gitk:3856 gitk:5060 gitk:10141 gitk:10142 msgid "None" msgstr "Nessuno" -#: gitk:2531 gitk:4336 gitk:5958 gitk:5973 +#: gitk:3790 gitk:5580 gitk:7287 gitk:7302 msgid "Date" msgstr "Data" -#: gitk:2531 gitk:4336 +#: gitk:3790 gitk:5580 msgid "CDate" msgstr "" -#: gitk:2680 gitk:2685 +#: gitk:3939 gitk:3944 msgid "Descendant" msgstr "Discendente" -#: gitk:2681 +#: gitk:3940 msgid "Not descendant" msgstr "Non discendente" -#: gitk:2688 gitk:2693 +#: gitk:3947 gitk:3952 msgid "Ancestor" msgstr "Ascendente" -#: gitk:2689 +#: gitk:3948 msgid "Not ancestor" msgstr "Non ascendente" -#: gitk:2924 +#: gitk:4187 msgid "Local changes checked in to index but not committed" msgstr "Modifiche locali presenti nell'indice ma non nell'archivio" -#: gitk:2954 +#: gitk:4220 msgid "Local uncommitted changes, not checked in to index" msgstr "Modifiche locali non presenti né nell'archivio né nell'indice" -#: gitk:4305 +#: gitk:5549 msgid "Searching" msgstr "Ricerca in corso" -#: gitk:4767 +#: gitk:6049 msgid "Tags:" msgstr "Etichette:" -#: gitk:4784 gitk:4790 gitk:5951 +#: gitk:6066 gitk:6072 gitk:7280 msgid "Parent" msgstr "Genitore" -#: gitk:4795 +#: gitk:6077 msgid "Child" msgstr "Figlio" -#: gitk:4804 +#: gitk:6086 msgid "Branch" msgstr "Ramo" -#: gitk:4807 +#: gitk:6089 msgid "Follows" msgstr "Segue" -#: gitk:4810 +#: gitk:6092 msgid "Precedes" msgstr "Precede" -#: gitk:5093 +#: gitk:6378 msgid "Error getting merge diffs:" msgstr "Errore nella lettura delle differenze di fusione:" -#: gitk:5778 +#: gitk:7113 msgid "Goto:" msgstr "Vai a:" -#: gitk:5780 +#: gitk:7115 msgid "SHA1 ID:" msgstr "SHA1 ID:" -#: gitk:5805 +#: gitk:7134 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "La SHA1 id abbreviata %s è ambigua" -#: gitk:5817 +#: gitk:7146 #, tcl-format msgid "SHA1 id %s is not known" msgstr "La SHA1 id %s è sconosciuta" -#: gitk:5819 +#: gitk:7148 #, tcl-format msgid "Tag/Head %s is not known" msgstr "L'etichetta/ramo %s è sconosciuto" -#: gitk:5961 +#: gitk:7290 msgid "Children" msgstr "Figli" -#: gitk:6018 +#: gitk:7347 #, tcl-format msgid "Reset %s branch to here" msgstr "Aggiorna il ramo %s a questa revisione" -#: gitk:6049 +#: gitk:7349 +msgid "Detached head: can't reset" +msgstr "" + +#: gitk:7381 msgid "Top" msgstr "Inizio" -#: gitk:6050 +#: gitk:7382 msgid "From" msgstr "Da" -#: gitk:6055 +#: gitk:7387 msgid "To" msgstr "A" -#: gitk:6078 +#: gitk:7410 msgid "Generate patch" msgstr "Genera patch" -#: gitk:6080 +#: gitk:7412 msgid "From:" msgstr "Da:" -#: gitk:6089 +#: gitk:7421 msgid "To:" msgstr "A:" -#: gitk:6098 +#: gitk:7430 msgid "Reverse" msgstr "Inverti" -#: gitk:6100 gitk:6269 +#: gitk:7432 gitk:7607 msgid "Output file:" msgstr "Scrivi sul file:" -#: gitk:6106 +#: gitk:7438 msgid "Generate" msgstr "Genera" -#: gitk:6142 +#: gitk:7474 msgid "Error creating patch:" msgstr "Errore nella creazione della patch:" -#: gitk:6164 gitk:6257 gitk:6311 +#: gitk:7496 gitk:7595 gitk:7649 msgid "ID:" msgstr "ID:" -#: gitk:6173 +#: gitk:7505 msgid "Tag name:" msgstr "Nome etichetta:" -#: gitk:6177 gitk:6320 +#: gitk:7509 gitk:7659 msgid "Create" msgstr "Crea" -#: gitk:6192 +#: gitk:7524 msgid "No tag name specified" msgstr "Nessuna etichetta specificata" -#: gitk:6196 +#: gitk:7528 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "L'etichetta \"%s\" esiste già" -#: gitk:6202 +#: gitk:7534 msgid "Error creating tag:" msgstr "Errore nella creazione dell'etichetta:" -#: gitk:6266 +#: gitk:7604 msgid "Command:" msgstr "Comando:" -#: gitk:6274 +#: gitk:7612 msgid "Write" msgstr "Scrivi" -#: gitk:6290 +#: gitk:7628 msgid "Error writing commit:" msgstr "Errore nella scrittura della revisione:" -#: gitk:6316 +#: gitk:7654 msgid "Name:" msgstr "Nome:" -#: gitk:6335 +#: gitk:7674 msgid "Please specify a name for the new branch" msgstr "Specificare un nome per il nuovo ramo" -#: gitk:6364 +#: gitk:7703 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "La revisione %s è già inclusa nel ramo %s -- applicarla di nuovo?" -#: gitk:6369 +#: gitk:7708 msgid "Cherry-picking" msgstr "" -#: gitk:6381 +#: gitk:7720 msgid "No changes committed" msgstr "Nessuna modifica archiviata" -#: gitk:6404 +#: gitk:7745 msgid "Confirm reset" msgstr "Conferma git reset" -#: gitk:6406 +#: gitk:7747 #, tcl-format msgid "Reset branch %s to %s?" msgstr "Aggiornare il ramo %s a %s?" -#: gitk:6410 +#: gitk:7751 msgid "Reset type:" msgstr "Tipo di aggiornamento:" -#: gitk:6414 +#: gitk:7755 msgid "Soft: Leave working tree and index untouched" msgstr "Soft: Lascia la direcory di lavoro e l'indice come sono" -#: gitk:6417 +#: gitk:7758 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Mixed: Lascia la directory di lavoro come è, aggiorna l'indice" -#: gitk:6420 +#: gitk:7761 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -693,19 +723,19 @@ msgstr "" "Hard: Aggiorna la directory di lavoro e l'indice\n" "(abbandona TUTTE le modifiche locali)" -#: gitk:6436 +#: gitk:7777 msgid "Resetting" msgstr "git reset in corso" -#: gitk:6493 +#: gitk:7834 msgid "Checking out" msgstr "Attivazione in corso" -#: gitk:6523 +#: gitk:7885 msgid "Cannot delete the currently checked-out branch" msgstr "Impossibile cancellare il ramo attualmente attivo" -#: gitk:6529 +#: gitk:7891 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -714,16 +744,16 @@ msgstr "" "Le revisioni nel ramo %s non sono presenti su altri rami.\n" "Cancellare il ramo %s?" -#: gitk:6560 +#: gitk:7922 #, tcl-format msgid "Tags and heads: %s" msgstr "Etichette e rami: %s" -#: gitk:6574 +#: gitk:7936 msgid "Filter" msgstr "Filtro" -#: gitk:6868 +#: gitk:8230 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." @@ -731,117 +761,129 @@ msgstr "" "Errore nella lettura della topologia delle revisioni: le informazioni sul " "ramo e le etichette precedenti e seguenti saranno incomplete." -#: gitk:7852 +#: gitk:9216 msgid "Tag" msgstr "Etichetta" -#: gitk:7852 +#: gitk:9216 msgid "Id" msgstr "Id" -#: gitk:7892 +#: gitk:9262 msgid "Gitk font chooser" msgstr "Scelta caratteri gitk" -#: gitk:7909 +#: gitk:9279 msgid "B" msgstr "B" -#: gitk:7912 +#: gitk:9282 msgid "I" msgstr "I" -#: gitk:8005 +#: gitk:9375 msgid "Gitk preferences" msgstr "Preferenze gitk" -#: gitk:8006 +#: gitk:9376 msgid "Commit list display options" msgstr "Opzioni visualizzazione dell'elenco revisioni" -#: gitk:8009 +#: gitk:9379 msgid "Maximum graph width (lines)" msgstr "Larghezza massima del grafico (in linee)" -#: gitk:8013 +#: gitk:9383 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "Larghezza massima del grafico (% del pannello)" -#: gitk:8018 +#: gitk:9388 msgid "Show local changes" msgstr "Mostra modifiche locali" -#: gitk:8023 +#: gitk:9393 msgid "Auto-select SHA1" msgstr "Seleziona automaticamente SHA1 hash" -#: gitk:8028 +#: gitk:9398 msgid "Diff display options" msgstr "Opzioni di visualizzazione delle differenze" -#: gitk:8030 +#: gitk:9400 msgid "Tab spacing" msgstr "Spaziatura tabulazioni" -#: gitk:8034 +#: gitk:9404 msgid "Display nearby tags" msgstr "Mostra etichette vicine" -#: gitk:8039 +#: gitk:9409 msgid "Limit diffs to listed paths" msgstr "Limita le differenze ai percorsi elencati" -#: gitk:8044 +#: gitk:9414 +msgid "Support per-file encodings" +msgstr "" + +#: gitk:9421 +msgid "External diff tool" +msgstr "" + +#: gitk:9423 +msgid "Choose..." +msgstr "" + +#: gitk:9428 msgid "Colors: press to choose" msgstr "Colori: premere per scegliere" -#: gitk:8047 +#: gitk:9431 msgid "Background" msgstr "Sfondo" -#: gitk:8051 +#: gitk:9435 msgid "Foreground" msgstr "Primo piano" -#: gitk:8055 +#: gitk:9439 msgid "Diff: old lines" msgstr "Diff: vecchie linee" -#: gitk:8060 +#: gitk:9444 msgid "Diff: new lines" msgstr "Diff: nuove linee" -#: gitk:8065 +#: gitk:9449 msgid "Diff: hunk header" msgstr "Diff: intestazione della sezione" -#: gitk:8071 +#: gitk:9455 msgid "Select bg" msgstr "Sfondo selezione" -#: gitk:8075 +#: gitk:9459 msgid "Fonts: press to choose" msgstr "Carattere: premere per scegliere" -#: gitk:8077 +#: gitk:9461 msgid "Main font" msgstr "Carattere principale" -#: gitk:8078 +#: gitk:9462 msgid "Diff display font" msgstr "Carattere per differenze" -#: gitk:8079 +#: gitk:9463 msgid "User interface font" msgstr "Carattere per interfaccia utente" -#: gitk:8095 +#: gitk:9488 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: scegliere un colore per %s" -#: gitk:8476 +#: gitk:9934 msgid "" "Sorry, gitk cannot run with this version of Tcl/Tk.\n" " Gitk requires at least Tcl/Tk 8.4." @@ -849,42 +891,24 @@ msgstr "" "Questa versione di Tcl/Tk non può avviare gitk.\n" " Gitk richiede Tcl/Tk versione 8.4 o superiore." -#: gitk:8565 +#: gitk:10047 msgid "Cannot find a git repository here." msgstr "Archivio git non trovato." -#: gitk:8569 +#: gitk:10051 #, tcl-format msgid "Cannot find the git directory \"%s\"." msgstr "Directory git \"%s\" non trovata." -#: gitk:8612 +#: gitk:10098 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" msgstr "Argomento ambiguo: '%s' è sia revisione che nome di file" -#: gitk:8624 +#: gitk:10110 msgid "Bad arguments to gitk:" msgstr "Gitk: argomenti errati:" -#: gitk:8636 -msgid "Couldn't get list of unmerged files:" -msgstr "Impossibile ottenere l'elenco dei file in attesa di fusione:" - -#: gitk:8652 -msgid "No files selected: --merge specified but no files are unmerged." -msgstr "" -"Nessun file selezionato: è stata specificata l'opzione --merge ma non ci " -"sono file in attesa di fusione." - -#: gitk:8655 -msgid "" -"No files selected: --merge specified but no unmerged files are within file " -"limit." -msgstr "" -"Nessun file selezionato: è stata specificata l'opzione --merge ma i file " -"specificati non sono in attesa di fusione." - -#: gitk:8716 +#: gitk:10170 msgid "Command line" msgstr "Linea di comando" diff --git a/gitk-git/po/sv.po b/gitk-git/po/sv.po index e1ecfb7586..947b53f6b0 100644 --- a/gitk-git/po/sv.po +++ b/gitk-git/po/sv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sv\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-03 18:58+0200\n" +"POT-Creation-Date: 2008-10-18 22:03+1100\n" "PO-Revision-Date: 2008-08-03 19:03+0200\n" "Last-Translator: Mikael Magnusson <mikachu@gmail.com>\n" "Language-Team: Swedish <sv@li.org>\n" @@ -16,17 +16,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: gitk:102 +#: gitk:113 msgid "Couldn't get list of unmerged files:" msgstr "Kunde inta hämta lista över ej sammanslagna filer:" -#: gitk:329 +#: gitk:340 msgid "No files selected: --merge specified but no files are unmerged." msgstr "" "Inga filer valdes: --merge angavs men det finns inga filer som inte har " "slagits samman." -#: gitk:332 +#: gitk:343 msgid "" "No files selected: --merge specified but no unmerged files are within file " "limit." @@ -34,257 +34,261 @@ msgstr "" "Inga filer valdes: --merge angavs men det finns inga filer inom " "filbegränsningen." -#: gitk:354 +#: gitk:365 gitk:503 msgid "Error executing git log:" msgstr "Fel vid körning av git log:" -#: gitk:369 +#: gitk:378 msgid "Reading" msgstr "Läser" -#: gitk:400 gitk:3356 +#: gitk:438 gitk:3462 msgid "Reading commits..." msgstr "Läser incheckningar..." -#: gitk:403 gitk:1480 gitk:3359 +#: gitk:441 gitk:1528 gitk:3465 msgid "No commits selected" msgstr "Inga incheckningar markerade" -#: gitk:1358 +#: gitk:1399 msgid "Can't parse git log output:" msgstr "Kan inte tolka utdata från git log:" -#: gitk:1557 +#: gitk:1605 msgid "No commit information available" msgstr "Ingen incheckningsinformation är tillgänglig" -#: gitk:1654 gitk:1676 gitk:3150 gitk:7620 gitk:9149 gitk:9317 +#: gitk:1709 gitk:1731 gitk:3259 gitk:7764 gitk:9293 gitk:9466 msgid "OK" msgstr "OK" -#: gitk:1678 gitk:3151 gitk:7296 gitk:7367 gitk:7470 gitk:7516 gitk:7622 -#: gitk:9150 gitk:9318 +#: gitk:1733 gitk:3260 gitk:7439 gitk:7510 gitk:7613 gitk:7660 gitk:7766 +#: gitk:9294 gitk:9467 msgid "Cancel" msgstr "Avbryt" -#: gitk:1716 -msgid "File" -msgstr "Arkiv" - -#: gitk:1718 +#: gitk:1811 msgid "Update" msgstr "Uppdatera" -#: gitk:1719 +#: gitk:1812 msgid "Reload" msgstr "Ladda om" -#: gitk:1720 +#: gitk:1813 msgid "Reread references" msgstr "Läs om referenser" -#: gitk:1721 +#: gitk:1814 msgid "List references" msgstr "Visa referenser" -#: gitk:1722 +#: gitk:1815 msgid "Quit" msgstr "Avsluta" -#: gitk:1724 -msgid "Edit" -msgstr "Redigera" +#: gitk:1810 +msgid "File" +msgstr "Arkiv" -#: gitk:1725 +#: gitk:1818 msgid "Preferences" msgstr "Inställningar" -#: gitk:1728 gitk:3087 -msgid "View" -msgstr "Visa" +#: gitk:1817 +msgid "Edit" +msgstr "Redigera" -#: gitk:1729 +#: gitk:1821 msgid "New view..." msgstr "Ny vy..." -#: gitk:1730 gitk:3298 gitk:9932 +#: gitk:1822 msgid "Edit view..." msgstr "Ändra vy..." -#: gitk:1732 gitk:3299 gitk:9933 +#: gitk:1823 msgid "Delete view" msgstr "Ta bort vy" -#: gitk:1734 +#: gitk:1825 msgid "All files" msgstr "Alla filer" -#: gitk:1738 -msgid "Help" -msgstr "Hjälp" +#: gitk:1820 gitk:3196 +msgid "View" +msgstr "Visa" -#: gitk:1739 gitk:2399 +#: gitk:1828 gitk:2487 msgid "About gitk" msgstr "Om gitk" -#: gitk:1740 +#: gitk:1829 msgid "Key bindings" msgstr "Tangentbordsbindningar" -#: gitk:1797 +#: gitk:1827 +msgid "Help" +msgstr "Hjälp" + +#: gitk:1887 msgid "SHA1 ID: " msgstr "SHA1-id: " -#: gitk:1828 +#: gitk:1918 msgid "Row" msgstr "Rad" -#: gitk:1859 +#: gitk:1949 msgid "Find" msgstr "Sök" -#: gitk:1860 +#: gitk:1950 msgid "next" msgstr "nästa" -#: gitk:1861 +#: gitk:1951 msgid "prev" msgstr "föreg" -#: gitk:1862 +#: gitk:1952 msgid "commit" msgstr "incheckning" -#: gitk:1865 gitk:1867 gitk:3511 gitk:3534 gitk:3558 gitk:5441 gitk:5512 +#: gitk:1955 gitk:1957 gitk:3617 gitk:3640 gitk:3664 gitk:5550 gitk:5621 msgid "containing:" msgstr "som innehåller:" -#: gitk:1868 gitk:2866 gitk:2871 gitk:3586 +#: gitk:1958 gitk:2954 gitk:2959 gitk:3692 msgid "touching paths:" msgstr "som rör sökväg:" -#: gitk:1869 gitk:3591 +#: gitk:1959 gitk:3697 msgid "adding/removing string:" msgstr "som lägger/till tar bort sträng:" -#: gitk:1878 gitk:1880 +#: gitk:1968 gitk:1970 msgid "Exact" msgstr "Exakt" -#: gitk:1880 gitk:3667 gitk:5409 +#: gitk:1970 gitk:3773 gitk:5518 msgid "IgnCase" msgstr "IgnVersaler" -#: gitk:1880 gitk:3560 gitk:3665 gitk:5405 +#: gitk:1970 gitk:3666 gitk:3771 gitk:5514 msgid "Regexp" msgstr "Reg.uttr." -#: gitk:1882 gitk:1883 gitk:3686 gitk:3716 gitk:3723 gitk:5532 gitk:5599 +#: gitk:1972 gitk:1973 gitk:3792 gitk:3822 gitk:3829 gitk:5641 gitk:5708 msgid "All fields" msgstr "Alla fält" -#: gitk:1883 gitk:3684 gitk:3716 gitk:5471 +#: gitk:1973 gitk:3790 gitk:3822 gitk:5580 msgid "Headline" msgstr "Rubrik" -#: gitk:1884 gitk:3684 gitk:5471 gitk:5599 gitk:6000 +#: gitk:1974 gitk:3790 gitk:5580 gitk:5708 gitk:6109 msgid "Comments" msgstr "Kommentarer" -#: gitk:1884 gitk:3684 gitk:3688 gitk:3723 gitk:5471 gitk:5936 gitk:7142 -#: gitk:7157 +#: gitk:1974 gitk:3790 gitk:3794 gitk:3829 gitk:5580 gitk:6045 gitk:7285 +#: gitk:7300 msgid "Author" msgstr "Författare" -#: gitk:1884 gitk:3684 gitk:5471 gitk:5938 +#: gitk:1974 gitk:3790 gitk:5580 gitk:6047 msgid "Committer" msgstr "Incheckare" -#: gitk:1913 +#: gitk:2003 msgid "Search" msgstr "Sök" -#: gitk:1920 +#: gitk:2010 msgid "Diff" msgstr "Diff" -#: gitk:1922 +#: gitk:2012 msgid "Old version" msgstr "Gammal version" -#: gitk:1924 +#: gitk:2014 msgid "New version" msgstr "Ny version" -#: gitk:1926 +#: gitk:2016 msgid "Lines of context" msgstr "Rader sammanhang" -#: gitk:1936 +#: gitk:2026 msgid "Ignore space change" msgstr "Ignorera ändringar i blanksteg" -#: gitk:1994 +#: gitk:2084 msgid "Patch" msgstr "Patch" -#: gitk:1996 +#: gitk:2086 msgid "Tree" msgstr "Träd" -#: gitk:2121 gitk:2136 gitk:7211 +#: gitk:2213 gitk:2226 msgid "Diff this -> selected" msgstr "Diff denna -> markerad" -#: gitk:2123 gitk:2138 gitk:7212 +#: gitk:2214 gitk:2227 msgid "Diff selected -> this" msgstr "Diff markerad -> denna" -#: gitk:2125 gitk:2140 gitk:7213 +#: gitk:2215 gitk:2228 msgid "Make patch" msgstr "Skapa patch" -#: gitk:2126 gitk:7351 +#: gitk:2216 gitk:7494 msgid "Create tag" msgstr "Skapa tagg" -#: gitk:2127 gitk:7450 +#: gitk:2217 gitk:7593 msgid "Write commit to file" msgstr "Skriv incheckning till fil" -#: gitk:2128 gitk:7504 +#: gitk:2218 gitk:7647 msgid "Create new branch" msgstr "Skapa ny gren" -#: gitk:2129 +#: gitk:2219 msgid "Cherry-pick this commit" msgstr "Plocka denna incheckning" -#: gitk:2131 +#: gitk:2220 msgid "Reset HEAD branch to here" msgstr "Återställ HEAD-grenen hit" -#: gitk:2147 +#: gitk:2234 msgid "Check out this branch" msgstr "Checka ut denna gren" -#: gitk:2149 +#: gitk:2235 msgid "Remove this branch" msgstr "Ta bort denna gren" -#: gitk:2155 +#: gitk:2242 msgid "Highlight this too" msgstr "Markera även detta" -#: gitk:2157 +#: gitk:2243 msgid "Highlight this only" msgstr "Markera bara detta" -#: gitk:2159 +#: gitk:2244 msgid "External diff" msgstr "Extern diff" -#: gitk:2400 +#: gitk:2245 +msgid "Blame parent commit" +msgstr "" + +#: gitk:2488 msgid "" "\n" "Gitk - a commit viewer for git\n" @@ -300,427 +304,427 @@ msgstr "" "\n" "Använd och vidareförmedla enligt villkoren i GNU General Public License" -#: gitk:2408 gitk:2469 gitk:7799 +#: gitk:2496 gitk:2557 gitk:7943 msgid "Close" msgstr "Stäng" -#: gitk:2427 +#: gitk:2515 msgid "Gitk key bindings" msgstr "Tangentbordsbindningar för Gitk" -#: gitk:2429 +#: gitk:2517 msgid "Gitk key bindings:" msgstr "Tangentbordsbindningar för Gitk:" -#: gitk:2431 +#: gitk:2519 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tAvsluta" -#: gitk:2432 +#: gitk:2520 msgid "<Home>\t\tMove to first commit" msgstr "<Home>\t\tGå till första incheckning" -#: gitk:2433 +#: gitk:2521 msgid "<End>\t\tMove to last commit" msgstr "<End>\t\tGå till sista incheckning" -#: gitk:2434 +#: gitk:2522 msgid "<Up>, p, i\tMove up one commit" msgstr "<Upp>, p, i\tGå en incheckning upp" -#: gitk:2435 +#: gitk:2523 msgid "<Down>, n, k\tMove down one commit" msgstr "<Ned>, n, k\tGå en incheckning ned" -#: gitk:2436 +#: gitk:2524 msgid "<Left>, z, j\tGo back in history list" msgstr "<Vänster>, z, j\tGå bakåt i historiken" -#: gitk:2437 +#: gitk:2525 msgid "<Right>, x, l\tGo forward in history list" msgstr "<Höger>, x, l\tGå framåt i historiken" -#: gitk:2438 +#: gitk:2526 msgid "<PageUp>\tMove up one page in commit list" msgstr "<PageUp>\tGå upp en sida i incheckningslistan" -#: gitk:2439 +#: gitk:2527 msgid "<PageDown>\tMove down one page in commit list" msgstr "<PageDown>\tGå ned en sida i incheckningslistan" -#: gitk:2440 +#: gitk:2528 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tRulla till början av incheckningslistan" -#: gitk:2441 +#: gitk:2529 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tRulla till slutet av incheckningslistan" -#: gitk:2442 +#: gitk:2530 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Upp>\tRulla incheckningslistan upp ett steg" -#: gitk:2443 +#: gitk:2531 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Ned>\tRulla incheckningslistan ned ett steg" -#: gitk:2444 +#: gitk:2532 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tRulla incheckningslistan upp en sida" -#: gitk:2445 +#: gitk:2533 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tRulla incheckningslistan ned en sida" -#: gitk:2446 +#: gitk:2534 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" msgstr "<Skift-Upp>\tSök bakåt (uppåt, senare incheckningar)" -#: gitk:2447 +#: gitk:2535 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" msgstr "<Skift-Ned>\tSök framåt (nedåt, tidigare incheckningar)" -#: gitk:2448 +#: gitk:2536 msgid "<Delete>, b\tScroll diff view up one page" msgstr "<Delete>, b\tRulla diffvisningen upp en sida" -#: gitk:2449 +#: gitk:2537 msgid "<Backspace>\tScroll diff view up one page" msgstr "<Baksteg>\tRulla diffvisningen upp en sida" -#: gitk:2450 +#: gitk:2538 msgid "<Space>\t\tScroll diff view down one page" msgstr "<Blanksteg>\tRulla diffvisningen ned en sida" -#: gitk:2451 +#: gitk:2539 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tRulla diffvisningen upp 18 rader" -#: gitk:2452 +#: gitk:2540 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tRulla diffvisningen ned 18 rader" -#: gitk:2453 +#: gitk:2541 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tSök" -#: gitk:2454 +#: gitk:2542 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tGå till nästa sökträff" -#: gitk:2455 +#: gitk:2543 msgid "<Return>\tMove to next find hit" msgstr "<Return>\t\tGå till nästa sökträff" -#: gitk:2456 +#: gitk:2544 msgid "/\t\tMove to next find hit, or redo find" msgstr "/\t\tGå till nästa sökträff, eller sök på nytt" -#: gitk:2457 +#: gitk:2545 msgid "?\t\tMove to previous find hit" msgstr "?\t\tGå till föregående sökträff" -#: gitk:2458 +#: gitk:2546 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tRulla diffvisningen till nästa fil" -#: gitk:2459 +#: gitk:2547 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tGå till nästa sökträff i diffvisningen" -#: gitk:2460 +#: gitk:2548 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tGå till föregående sökträff i diffvisningen" -#: gitk:2461 +#: gitk:2549 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-Num+>\tÖka teckenstorlek" -#: gitk:2462 +#: gitk:2550 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\tÖka teckenstorlek" -#: gitk:2463 +#: gitk:2551 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-Num->\tMinska teckenstorlek" -#: gitk:2464 +#: gitk:2552 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\tMinska teckenstorlek" -#: gitk:2465 +#: gitk:2553 msgid "<F5>\t\tUpdate" msgstr "<F5>\t\tUppdatera" -#: gitk:3091 +#: gitk:3200 msgid "Gitk view definition" msgstr "Definition av Gitk-vy" -#: gitk:3116 +#: gitk:3225 msgid "Name" msgstr "Namn" -#: gitk:3119 +#: gitk:3228 msgid "Remember this view" msgstr "Spara denna vy" -#: gitk:3123 +#: gitk:3232 msgid "Commits to include (arguments to git log):" msgstr "Incheckningar att ta med (argument till git log):" -#: gitk:3130 +#: gitk:3239 msgid "Command to generate more commits to include:" msgstr "Kommando för att generera fler incheckningar att ta med:" -#: gitk:3137 +#: gitk:3246 msgid "Enter files and directories to include, one per line:" msgstr "Ange filer och kataloger att ta med, en per rad:" -#: gitk:3184 +#: gitk:3293 msgid "Error in commit selection arguments:" msgstr "Fel i argument för val av incheckningar:" -#: gitk:3238 gitk:3290 gitk:3736 gitk:3750 gitk:4951 gitk:9896 gitk:9897 +#: gitk:3347 gitk:3399 gitk:3842 gitk:3856 gitk:5060 gitk:10141 gitk:10142 msgid "None" msgstr "Inget" -#: gitk:3684 gitk:5471 gitk:7144 gitk:7159 +#: gitk:3790 gitk:5580 gitk:7287 gitk:7302 msgid "Date" msgstr "Datum" -#: gitk:3684 gitk:5471 +#: gitk:3790 gitk:5580 msgid "CDate" msgstr "Skapat datum" -#: gitk:3833 gitk:3838 +#: gitk:3939 gitk:3944 msgid "Descendant" msgstr "Avkomling" -#: gitk:3834 +#: gitk:3940 msgid "Not descendant" msgstr "Inte avkomling" -#: gitk:3841 gitk:3846 +#: gitk:3947 gitk:3952 msgid "Ancestor" msgstr "Förfader" -#: gitk:3842 +#: gitk:3948 msgid "Not ancestor" msgstr "Inte förfader" -#: gitk:4078 +#: gitk:4187 msgid "Local changes checked in to index but not committed" msgstr "Lokala ändringar sparade i indexet men inte incheckade" -#: gitk:4111 +#: gitk:4220 msgid "Local uncommitted changes, not checked in to index" msgstr "Lokala ändringar, ej sparade i indexet" -#: gitk:5440 +#: gitk:5549 msgid "Searching" msgstr "Söker" -#: gitk:5940 +#: gitk:6049 msgid "Tags:" msgstr "Taggar:" -#: gitk:5957 gitk:5963 gitk:7137 +#: gitk:6066 gitk:6072 gitk:7280 msgid "Parent" msgstr "Förälder" -#: gitk:5968 +#: gitk:6077 msgid "Child" msgstr "Barn" -#: gitk:5977 +#: gitk:6086 msgid "Branch" msgstr "Gren" -#: gitk:5980 +#: gitk:6089 msgid "Follows" msgstr "Följer" -#: gitk:5983 +#: gitk:6092 msgid "Precedes" msgstr "Föregår" -#: gitk:6267 +#: gitk:6378 msgid "Error getting merge diffs:" msgstr "Fel vid hämtning av sammanslagningsdiff:" -#: gitk:6970 +#: gitk:7113 msgid "Goto:" msgstr "Gå till:" -#: gitk:6972 +#: gitk:7115 msgid "SHA1 ID:" msgstr "SHA1-id:" -#: gitk:6991 +#: gitk:7134 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "Förkortat SHA1-id %s är tvetydigt" -#: gitk:7003 +#: gitk:7146 #, tcl-format msgid "SHA1 id %s is not known" msgstr "SHA-id:t %s är inte känt" -#: gitk:7005 +#: gitk:7148 #, tcl-format msgid "Tag/Head %s is not known" msgstr "Tagg/huvud %s är okänt" -#: gitk:7147 +#: gitk:7290 msgid "Children" msgstr "Barn" -#: gitk:7204 +#: gitk:7347 #, tcl-format msgid "Reset %s branch to here" msgstr "Återställ grenen %s hit" -#: gitk:7206 +#: gitk:7349 msgid "Detached head: can't reset" msgstr "Frånkopplad head: kan inte återställa" -#: gitk:7238 +#: gitk:7381 msgid "Top" msgstr "Topp" -#: gitk:7239 +#: gitk:7382 msgid "From" msgstr "Från" -#: gitk:7244 +#: gitk:7387 msgid "To" msgstr "Till" -#: gitk:7267 +#: gitk:7410 msgid "Generate patch" msgstr "Generera patch" -#: gitk:7269 +#: gitk:7412 msgid "From:" msgstr "Från:" -#: gitk:7278 +#: gitk:7421 msgid "To:" msgstr "Till:" -#: gitk:7287 +#: gitk:7430 msgid "Reverse" msgstr "Vänd" -#: gitk:7289 gitk:7464 +#: gitk:7432 gitk:7607 msgid "Output file:" msgstr "Utdatafil:" -#: gitk:7295 +#: gitk:7438 msgid "Generate" msgstr "Generera" -#: gitk:7331 +#: gitk:7474 msgid "Error creating patch:" msgstr "Fel vid generering av patch:" -#: gitk:7353 gitk:7452 gitk:7506 +#: gitk:7496 gitk:7595 gitk:7649 msgid "ID:" msgstr "Id:" -#: gitk:7362 +#: gitk:7505 msgid "Tag name:" msgstr "Taggnamn:" -#: gitk:7366 gitk:7515 +#: gitk:7509 gitk:7659 msgid "Create" msgstr "Skapa" -#: gitk:7381 +#: gitk:7524 msgid "No tag name specified" msgstr "Inget taggnamn angavs" -#: gitk:7385 +#: gitk:7528 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "Taggen \"%s\" finns redan" -#: gitk:7391 +#: gitk:7534 msgid "Error creating tag:" msgstr "Fel vid skapande av tagg:" -#: gitk:7461 +#: gitk:7604 msgid "Command:" msgstr "Kommando:" -#: gitk:7469 +#: gitk:7612 msgid "Write" msgstr "Skriv" -#: gitk:7485 +#: gitk:7628 msgid "Error writing commit:" msgstr "Fel vid skrivning av incheckning:" -#: gitk:7511 +#: gitk:7654 msgid "Name:" msgstr "Namn:" -#: gitk:7530 +#: gitk:7674 msgid "Please specify a name for the new branch" msgstr "Ange ett namn för den nya grenen" -#: gitk:7559 +#: gitk:7703 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "" "Incheckningen %s finns redan på grenen %s -- skall den verkligen appliceras " "på nytt?" -#: gitk:7564 +#: gitk:7708 msgid "Cherry-picking" msgstr "Plockar" -#: gitk:7576 +#: gitk:7720 msgid "No changes committed" msgstr "Inga ändringar incheckade" -#: gitk:7601 +#: gitk:7745 msgid "Confirm reset" msgstr "Bekräfta återställning" -#: gitk:7603 +#: gitk:7747 #, tcl-format msgid "Reset branch %s to %s?" msgstr "Återställa grenen %s till %s?" -#: gitk:7607 +#: gitk:7751 msgid "Reset type:" msgstr "Typ av återställning:" -#: gitk:7611 +#: gitk:7755 msgid "Soft: Leave working tree and index untouched" msgstr "Mjuk: Rör inte utcheckning och index" -#: gitk:7614 +#: gitk:7758 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Blandad: Rör inte utcheckning, återställ index" -#: gitk:7617 +#: gitk:7761 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -728,19 +732,19 @@ msgstr "" "Hård: Återställ utcheckning och index\n" "(förkastar ALLA lokala ändringar)" -#: gitk:7633 +#: gitk:7777 msgid "Resetting" msgstr "Återställer" -#: gitk:7690 +#: gitk:7834 msgid "Checking out" msgstr "Checkar ut" -#: gitk:7741 +#: gitk:7885 msgid "Cannot delete the currently checked-out branch" msgstr "Kan inte ta bort den just nu utcheckade grenen" -#: gitk:7747 +#: gitk:7891 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -749,16 +753,16 @@ msgstr "" "Incheckningarna på grenen %s existerar inte på någon annan gren.\n" "Vill du verkligen ta bort grenen %s?" -#: gitk:7778 +#: gitk:7922 #, tcl-format msgid "Tags and heads: %s" msgstr "Taggar och huvuden: %s" -#: gitk:7792 +#: gitk:7936 msgid "Filter" msgstr "Filter" -#: gitk:8086 +#: gitk:8230 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." @@ -766,125 +770,129 @@ msgstr "" "Fel vid läsning av information om incheckningstopologi; information om " "grenar och föregående/senare taggar kommer inte vara komplett." -#: gitk:9072 +#: gitk:9216 msgid "Tag" msgstr "Tagg" -#: gitk:9072 +#: gitk:9216 msgid "Id" msgstr "Id" -#: gitk:9118 +#: gitk:9262 msgid "Gitk font chooser" msgstr "Teckensnittsväljare för Gitk" -#: gitk:9135 +#: gitk:9279 msgid "B" msgstr "F" -#: gitk:9138 +#: gitk:9282 msgid "I" msgstr "K" -#: gitk:9231 +#: gitk:9375 msgid "Gitk preferences" msgstr "Inställningar för Gitk" -#: gitk:9232 +#: gitk:9376 msgid "Commit list display options" msgstr "Alternativ för incheckningslistvy" -#: gitk:9235 +#: gitk:9379 msgid "Maximum graph width (lines)" msgstr "Maximal grafbredd (rader)" -#: gitk:9239 +#: gitk:9383 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "Maximal grafbredd (% av ruta)" -#: gitk:9244 +#: gitk:9388 msgid "Show local changes" msgstr "Visa lokala ändringar" -#: gitk:9249 +#: gitk:9393 msgid "Auto-select SHA1" msgstr "Välj SHA1 automatiskt" -#: gitk:9254 +#: gitk:9398 msgid "Diff display options" msgstr "Alternativ för diffvy" -#: gitk:9256 +#: gitk:9400 msgid "Tab spacing" msgstr "Blanksteg för tabulatortecken" -#: gitk:9260 +#: gitk:9404 msgid "Display nearby tags" msgstr "Visa närliggande taggar" -#: gitk:9265 +#: gitk:9409 msgid "Limit diffs to listed paths" msgstr "Begränsa diff till listade sökvägar" -#: gitk:9272 +#: gitk:9414 +msgid "Support per-file encodings" +msgstr "" + +#: gitk:9421 msgid "External diff tool" msgstr "Externt diff-verktyg" -#: gitk:9274 +#: gitk:9423 msgid "Choose..." msgstr "Välj..." -#: gitk:9279 +#: gitk:9428 msgid "Colors: press to choose" msgstr "Färger: tryck för att välja" -#: gitk:9282 +#: gitk:9431 msgid "Background" msgstr "Bakgrund" -#: gitk:9286 +#: gitk:9435 msgid "Foreground" msgstr "Förgrund" -#: gitk:9290 +#: gitk:9439 msgid "Diff: old lines" msgstr "Diff: gamla rader" -#: gitk:9295 +#: gitk:9444 msgid "Diff: new lines" msgstr "Diff: nya rader" -#: gitk:9300 +#: gitk:9449 msgid "Diff: hunk header" msgstr "Diff: delhuvud" -#: gitk:9306 +#: gitk:9455 msgid "Select bg" msgstr "Markerad bakgrund" -#: gitk:9310 +#: gitk:9459 msgid "Fonts: press to choose" msgstr "Teckensnitt: tryck för att välja" -#: gitk:9312 +#: gitk:9461 msgid "Main font" msgstr "Huvudteckensnitt" -#: gitk:9313 +#: gitk:9462 msgid "Diff display font" msgstr "Teckensnitt för diffvisning" -#: gitk:9314 +#: gitk:9463 msgid "User interface font" msgstr "Teckensnitt för användargränssnitt" -#: gitk:9339 +#: gitk:9488 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: välj färg för %s" -#: gitk:9720 +#: gitk:9934 msgid "" "Sorry, gitk cannot run with this version of Tcl/Tk.\n" " Gitk requires at least Tcl/Tk 8.4." @@ -892,24 +900,24 @@ msgstr "" "Gitk kan tyvärr inte köra med denna version av Tcl/Tk.\n" " Gitk kräver åtminstone Tcl/Tk 8.4." -#: gitk:9812 +#: gitk:10047 msgid "Cannot find a git repository here." msgstr "Hittar inget gitk-arkiv här." -#: gitk:9816 +#: gitk:10051 #, tcl-format msgid "Cannot find the git directory \"%s\"." msgstr "Hittar inte git-katalogen \"%s\"." -#: gitk:9853 +#: gitk:10098 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" msgstr "Tvetydigt argument \"%s\": både revision och filnamn" -#: gitk:9865 +#: gitk:10110 msgid "Bad arguments to gitk:" msgstr "Felaktiga argument till gitk:" -#: gitk:9925 +#: gitk:10170 msgid "Command line" msgstr "Kommandorad" diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 11168006cf..c5254afa7f 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -29,7 +29,9 @@ our $my_uri = $cgi->url(-absolute => 1); # if we're called with PATH_INFO, we have to strip that # from the URL to find our real URL -if (my $path_info = $ENV{"PATH_INFO"}) { +# we make $path_info global because it's also used later on +my $path_info = $ENV{"PATH_INFO"}; +if ($path_info) { $my_url =~ s,\Q$path_info\E$,,; $my_uri =~ s,\Q$path_info\E$,,; } @@ -428,34 +430,155 @@ $projects_list ||= $projectroot; # ====================================================================== # input validation and dispatch -our $action = $cgi->param('a'); + +# input parameters can be collected from a variety of sources (presently, CGI +# and PATH_INFO), so we define an %input_params hash that collects them all +# together during validation: this allows subsequent uses (e.g. href()) to be +# agnostic of the parameter origin + +my %input_params = (); + +# input parameters are stored with the long parameter name as key. This will +# also be used in the href subroutine to convert parameters to their CGI +# equivalent, and since the href() usage is the most frequent one, we store +# the name -> CGI key mapping here, instead of the reverse. +# +# XXX: Warning: If you touch this, check the search form for updating, +# too. + +my @cgi_param_mapping = ( + project => "p", + action => "a", + file_name => "f", + file_parent => "fp", + hash => "h", + hash_parent => "hp", + hash_base => "hb", + hash_parent_base => "hpb", + page => "pg", + order => "o", + searchtext => "s", + searchtype => "st", + snapshot_format => "sf", + extra_options => "opt", + search_use_regexp => "sr", +); +my %cgi_param_mapping = @cgi_param_mapping; + +# we will also need to know the possible actions, for validation +my %actions = ( + "blame" => \&git_blame, + "blobdiff" => \&git_blobdiff, + "blobdiff_plain" => \&git_blobdiff_plain, + "blob" => \&git_blob, + "blob_plain" => \&git_blob_plain, + "commitdiff" => \&git_commitdiff, + "commitdiff_plain" => \&git_commitdiff_plain, + "commit" => \&git_commit, + "forks" => \&git_forks, + "heads" => \&git_heads, + "history" => \&git_history, + "log" => \&git_log, + "rss" => \&git_rss, + "atom" => \&git_atom, + "search" => \&git_search, + "search_help" => \&git_search_help, + "shortlog" => \&git_shortlog, + "summary" => \&git_summary, + "tag" => \&git_tag, + "tags" => \&git_tags, + "tree" => \&git_tree, + "snapshot" => \&git_snapshot, + "object" => \&git_object, + # those below don't need $project + "opml" => \&git_opml, + "project_list" => \&git_project_list, + "project_index" => \&git_project_index, +); + +# finally, we have the hash of allowed extra_options for the commands that +# allow them +my %allowed_options = ( + "--no-merges" => [ qw(rss atom log shortlog history) ], +); + +# fill %input_params with the CGI parameters. All values except for 'opt' +# should be single values, but opt can be an array. We should probably +# build an array of parameters that can be multi-valued, but since for the time +# being it's only this one, we just single it out +while (my ($name, $symbol) = each %cgi_param_mapping) { + if ($symbol eq 'opt') { + $input_params{$name} = [ $cgi->param($symbol) ]; + } else { + $input_params{$name} = $cgi->param($symbol); + } +} + +# now read PATH_INFO and update the parameter list for missing parameters +sub evaluate_path_info { + return if defined $input_params{'project'}; + return if !$path_info; + $path_info =~ s,^/+,,; + return if !$path_info; + + # find which part of PATH_INFO is project + my $project = $path_info; + $project =~ s,/+$,,; + while ($project && !check_head_link("$projectroot/$project")) { + $project =~ s,/*[^/]*$,,; + } + return unless $project; + $input_params{'project'} = $project; + + # do not change any parameters if an action is given using the query string + return if $input_params{'action'}; + $path_info =~ s,^\Q$project\E/*,,; + + my ($refname, $pathname) = split(/:/, $path_info, 2); + if (defined $pathname) { + # we got "project.git/branch:filename" or "project.git/branch:dir/" + # we could use git_get_type(branch:pathname), but it needs $git_dir + $pathname =~ s,^/+,,; + if (!$pathname || substr($pathname, -1) eq "/") { + $input_params{'action'} = "tree"; + $pathname =~ s,/$,,; + } else { + $input_params{'action'} = "blob_plain"; + } + $input_params{'hash_base'} ||= $refname; + $input_params{'file_name'} ||= $pathname; + } elsif (defined $refname) { + # we got "project.git/branch" + $input_params{'action'} = "shortlog"; + $input_params{'hash'} ||= $refname; + } +} +evaluate_path_info(); + +our $action = $input_params{'action'}; if (defined $action) { - if ($action =~ m/[^0-9a-zA-Z\.\-_]/) { + if (!validate_action($action)) { die_error(400, "Invalid action parameter"); } } # parameters which are pathnames -our $project = $cgi->param('p'); +our $project = $input_params{'project'}; if (defined $project) { - if (!validate_pathname($project) || - !(-d "$projectroot/$project") || - !check_head_link("$projectroot/$project") || - ($export_ok && !(-e "$projectroot/$project/$export_ok")) || - ($strict_export && !project_in_list($project))) { + if (!validate_project($project)) { undef $project; die_error(404, "No such project"); } } -our $file_name = $cgi->param('f'); +our $file_name = $input_params{'file_name'}; if (defined $file_name) { if (!validate_pathname($file_name)) { die_error(400, "Invalid file parameter"); } } -our $file_parent = $cgi->param('fp'); +our $file_parent = $input_params{'file_parent'}; if (defined $file_parent) { if (!validate_pathname($file_parent)) { die_error(400, "Invalid file parent parameter"); @@ -463,44 +586,41 @@ if (defined $file_parent) { } # parameters which are refnames -our $hash = $cgi->param('h'); +our $hash = $input_params{'hash'}; if (defined $hash) { if (!validate_refname($hash)) { die_error(400, "Invalid hash parameter"); } } -our $hash_parent = $cgi->param('hp'); +our $hash_parent = $input_params{'hash_parent'}; if (defined $hash_parent) { if (!validate_refname($hash_parent)) { die_error(400, "Invalid hash parent parameter"); } } -our $hash_base = $cgi->param('hb'); +our $hash_base = $input_params{'hash_base'}; if (defined $hash_base) { if (!validate_refname($hash_base)) { die_error(400, "Invalid hash base parameter"); } } -my %allowed_options = ( - "--no-merges" => [ qw(rss atom log shortlog history) ], -); - -our @extra_options = $cgi->param('opt'); -if (defined @extra_options) { - foreach my $opt (@extra_options) { - if (not exists $allowed_options{$opt}) { - die_error(400, "Invalid option parameter"); - } - if (not grep(/^$action$/, @{$allowed_options{$opt}})) { - die_error(400, "Invalid option parameter for this action"); - } +our @extra_options = @{$input_params{'extra_options'}}; +# @extra_options is always defined, since it can only be (currently) set from +# CGI, and $cgi->param() returns the empty array in array context if the param +# is not set +foreach my $opt (@extra_options) { + if (not exists $allowed_options{$opt}) { + die_error(400, "Invalid option parameter"); + } + if (not grep(/^$action$/, @{$allowed_options{$opt}})) { + die_error(400, "Invalid option parameter for this action"); } } -our $hash_parent_base = $cgi->param('hpb'); +our $hash_parent_base = $input_params{'hash_parent_base'}; if (defined $hash_parent_base) { if (!validate_refname($hash_parent_base)) { die_error(400, "Invalid hash parent base parameter"); @@ -508,23 +628,23 @@ if (defined $hash_parent_base) { } # other parameters -our $page = $cgi->param('pg'); +our $page = $input_params{'page'}; if (defined $page) { if ($page =~ m/[^0-9]/) { die_error(400, "Invalid page parameter"); } } -our $searchtype = $cgi->param('st'); +our $searchtype = $input_params{'searchtype'}; if (defined $searchtype) { if ($searchtype =~ m/[^a-z]/) { die_error(400, "Invalid searchtype parameter"); } } -our $search_use_regexp = $cgi->param('sr'); +our $search_use_regexp = $input_params{'search_use_regexp'}; -our $searchtext = $cgi->param('s'); +our $searchtext = $input_params{'searchtext'}; our $search_regexp; if (defined $searchtext) { if (length($searchtext) < 2) { @@ -533,86 +653,11 @@ if (defined $searchtext) { $search_regexp = $search_use_regexp ? $searchtext : quotemeta $searchtext; } -# now read PATH_INFO and use it as alternative to parameters -sub evaluate_path_info { - return if defined $project; - my $path_info = $ENV{"PATH_INFO"}; - return if !$path_info; - $path_info =~ s,^/+,,; - return if !$path_info; - # find which part of PATH_INFO is project - $project = $path_info; - $project =~ s,/+$,,; - while ($project && !check_head_link("$projectroot/$project")) { - $project =~ s,/*[^/]*$,,; - } - # validate project - $project = validate_pathname($project); - if (!$project || - ($export_ok && !-e "$projectroot/$project/$export_ok") || - ($strict_export && !project_in_list($project))) { - undef $project; - return; - } - # do not change any parameters if an action is given using the query string - return if $action; - $path_info =~ s,^\Q$project\E/*,,; - my ($refname, $pathname) = split(/:/, $path_info, 2); - if (defined $pathname) { - # we got "project.git/branch:filename" or "project.git/branch:dir/" - # we could use git_get_type(branch:pathname), but it needs $git_dir - $pathname =~ s,^/+,,; - if (!$pathname || substr($pathname, -1) eq "/") { - $action ||= "tree"; - $pathname =~ s,/$,,; - } else { - $action ||= "blob_plain"; - } - $hash_base ||= validate_refname($refname); - $file_name ||= validate_pathname($pathname); - } elsif (defined $refname) { - # we got "project.git/branch" - $action ||= "shortlog"; - $hash ||= validate_refname($refname); - } -} -evaluate_path_info(); - # path to the current git repository our $git_dir; $git_dir = "$projectroot/$project" if $project; # dispatch -my %actions = ( - "blame" => \&git_blame, - "blobdiff" => \&git_blobdiff, - "blobdiff_plain" => \&git_blobdiff_plain, - "blob" => \&git_blob, - "blob_plain" => \&git_blob_plain, - "commitdiff" => \&git_commitdiff, - "commitdiff_plain" => \&git_commitdiff_plain, - "commit" => \&git_commit, - "forks" => \&git_forks, - "heads" => \&git_heads, - "history" => \&git_history, - "log" => \&git_log, - "rss" => \&git_rss, - "atom" => \&git_atom, - "search" => \&git_search, - "search_help" => \&git_search_help, - "shortlog" => \&git_shortlog, - "summary" => \&git_summary, - "tag" => \&git_tag, - "tags" => \&git_tags, - "tree" => \&git_tree, - "snapshot" => \&git_snapshot, - "object" => \&git_object, - # those below don't need $project - "opml" => \&git_opml, - "project_list" => \&git_project_list, - "project_index" => \&git_project_index, -); - if (!defined $action) { if (defined $hash) { $action = git_get_type($hash); @@ -642,35 +687,12 @@ sub href (%) { # default is to use -absolute url() i.e. $my_uri my $href = $params{-full} ? $my_url : $my_uri; - # XXX: Warning: If you touch this, check the search form for updating, - # too. - - my @mapping = ( - project => "p", - action => "a", - file_name => "f", - file_parent => "fp", - hash => "h", - hash_parent => "hp", - hash_base => "hb", - hash_parent_base => "hpb", - page => "pg", - order => "o", - searchtext => "s", - searchtype => "st", - snapshot_format => "sf", - extra_options => "opt", - search_use_regexp => "sr", - ); - my %mapping = @mapping; - $params{'project'} = $project unless exists $params{'project'}; if ($params{-replay}) { - while (my ($name, $symbol) = each %mapping) { + while (my ($name, $symbol) = each %cgi_param_mapping) { if (!exists $params{$name}) { - # to allow for multivalued params we use arrayref form - $params{$name} = [ $cgi->param($symbol) ]; + $params{$name} = $input_params{$name}; } } } @@ -689,8 +711,8 @@ sub href (%) { # now encode the parameters explicitly my @result = (); - for (my $i = 0; $i < @mapping; $i += 2) { - my ($name, $symbol) = ($mapping[$i], $mapping[$i+1]); + for (my $i = 0; $i < @cgi_param_mapping; $i += 2) { + my ($name, $symbol) = ($cgi_param_mapping[$i], $cgi_param_mapping[$i+1]); if (defined $params{$name}) { if (ref($params{$name}) eq "ARRAY") { foreach my $par (@{$params{$name}}) { @@ -710,6 +732,25 @@ sub href (%) { ## ====================================================================== ## validation, quoting/unquoting and escaping +sub validate_action { + my $input = shift || return undef; + return undef unless exists $actions{$input}; + return $input; +} + +sub validate_project { + my $input = shift || return undef; + if (!validate_pathname($input) || + !(-d "$projectroot/$input") || + !check_head_link("$projectroot/$input") || + ($export_ok && !(-e "$projectroot/$input/$export_ok")) || + ($strict_export && !project_in_list($input))) { + return undef; + } else { + return $input; + } +} + sub validate_pathname { my $input = shift || return undef; @@ -4121,7 +4162,7 @@ sub git_search_grep_body { ## actions sub git_project_list { - my $order = $cgi->param('o'); + my $order = $input_params{'order'}; if (defined $order && $order !~ m/none|project|descr|owner|age/) { die_error(400, "Unknown order parameter"); } @@ -4149,7 +4190,7 @@ sub git_project_list { } sub git_forks { - my $order = $cgi->param('o'); + my $order = $input_params{'order'}; if (defined $order && $order !~ m/none|project|descr|owner|age/) { die_error(400, "Unknown order parameter"); } @@ -4697,7 +4738,7 @@ sub git_snapshot { my @supported_fmts = gitweb_check_feature('snapshot'); @supported_fmts = filter_snapshot_fmts(@supported_fmts); - my $format = $cgi->param('sf'); + my $format = $input_params{'snapshot_format'}; if (!@supported_fmts) { die_error(403, "Snapshots not allowed"); } diff --git a/index-pack.c b/index-pack.c index d3a4d31b4e..6f89bb9ac7 100644 --- a/index-pack.c +++ b/index-pack.c @@ -790,7 +790,6 @@ static void final(const char *final_pack_name, const char *curr_pack_name, err = close(output_fd); if (err) die("error while closing pack file: %s", strerror(errno)); - chmod(curr_pack_name, 0444); } if (keep_msg) { @@ -824,8 +823,9 @@ static void final(const char *final_pack_name, const char *curr_pack_name, if (move_temp_to_file(curr_pack_name, final_pack_name)) die("cannot store pack file"); } + if (from_stdin) + chmod(final_pack_name, 0444); - chmod(curr_index_name, 0444); if (final_index_name != curr_index_name) { if (!final_index_name) { snprintf(name, sizeof(name), "%s/pack/pack-%s.idx", @@ -835,6 +835,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name, if (move_temp_to_file(curr_index_name, final_index_name)) die("cannot store index file"); } + chmod(final_index_name, 0444); if (!from_stdin) { printf("%s\n", sha1_to_hex(sha1)); @@ -879,10 +880,26 @@ int main(int argc, char **argv) char *index_name_buf = NULL, *keep_name_buf = NULL; struct pack_idx_entry **idx_objects; unsigned char pack_sha1[20]; - int nongit = 0; - setup_git_directory_gently(&nongit); - git_config(git_index_pack_config, NULL); + /* + * We wish to read the repository's config file if any, and + * for that it is necessary to call setup_git_directory_gently(). + * However if the cwd was inside .git/objects/pack/ then we need + * to go back there or all the pack name arguments will be wrong. + * And in that case we cannot rely on any prefix returned by + * setup_git_directory_gently() either. + */ + { + char cwd[PATH_MAX+1]; + int nongit; + + if (!getcwd(cwd, sizeof(cwd)-1)) + die("Unable to get current working directory"); + setup_git_directory_gently(&nongit); + git_config(git_index_pack_config, NULL); + if (chdir(cwd)) + die("Cannot come back to cwd"); + } for (i = 1; i < argc; i++) { char *arg = argv[i]; diff --git a/merge-recursive.c b/merge-recursive.c index 245232a408..7472d3ecc9 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1332,7 +1332,7 @@ static int merge_recursive_config(const char *var, const char *value, void *cb) o->merge_rename_limit = git_config_int(var, value); return 0; } - return git_default_config(var, value, cb); + return git_xmerge_config(var, value, cb); } void init_merge_options(struct merge_options *o) diff --git a/read-cache.c b/read-cache.c index 780f2c723e..fdb41b872e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1489,25 +1489,30 @@ int write_index(const struct index_state *istate, int newfd) int read_index_unmerged(struct index_state *istate) { int i; - struct cache_entry **dst; - struct cache_entry *last = NULL; + int unmerged = 0; read_index(istate); - dst = istate->cache; for (i = 0; i < istate->cache_nr; i++) { struct cache_entry *ce = istate->cache[i]; - if (ce_stage(ce)) { - remove_name_hash(ce); - if (last && !strcmp(ce->name, last->name)) - continue; - cache_tree_invalidate_path(istate->cache_tree, ce->name); - last = ce; + struct cache_entry *new_ce; + int size, len; + + if (!ce_stage(ce)) continue; - } - *dst++ = ce; + unmerged = 1; + len = strlen(ce->name); + size = cache_entry_size(len); + new_ce = xcalloc(1, size); + hashcpy(new_ce->sha1, ce->sha1); + memcpy(new_ce->name, ce->name, len); + new_ce->ce_flags = create_ce_flags(len, 0); + new_ce->ce_mode = ce->ce_mode; + if (add_index_entry(istate, new_ce, 0)) + return error("%s: cannot drop to stage #0", + ce->name); + i = index_name_pos(istate, new_ce->name, len); } - istate->cache_nr = dst - istate->cache; - return !!last; + return unmerged; } struct update_callback_data diff --git a/sha1_file.c b/sha1_file.c index 3fbb0820a0..70bb453be2 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2333,6 +2333,7 @@ int force_object_loose(const unsigned char *sha1, time_t mtime) enum object_type type; char hdr[32]; int hdrlen; + int ret; if (has_loose_object(sha1)) return 0; @@ -2340,7 +2341,10 @@ int force_object_loose(const unsigned char *sha1, time_t mtime) if (!buf) return error("cannot read sha1_file for %s", sha1_to_hex(sha1)); hdrlen = sprintf(hdr, "%s %lu", typename(type), len) + 1; - return write_loose_object(sha1, hdr, hdrlen, buf, len, mtime); + ret = write_loose_object(sha1, hdr, hdrlen, buf, len, mtime); + free(buf); + + return ret; } int has_pack_index(const unsigned char *sha1) diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 3d8e06a20f..1c77192eb3 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -47,6 +47,23 @@ test_expect_success 'attribute test' ' ' +test_expect_success 'attribute test: read paths from stdin' ' + + cat <<EOF > expect +f: test: f +a/f: test: f +a/c/f: test: f +a/g: test: a/g +a/b/g: test: a/b/g +b/g: test: unspecified +a/b/h: test: a/b/h +a/b/d/g: test: a/b/d/* +EOF + + sed -e "s/:.*//" < expect | git check-attr --stdin test > actual && + test_cmp expect actual +' + test_expect_success 'root subdir attribute test' ' attr_check a/i a/i && diff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh index b0d31f5a9b..849911683a 100755 --- a/t/t1005-read-tree-reset.sh +++ b/t/t1005-read-tree-reset.sh @@ -27,4 +27,64 @@ test_expect_success 'reset should work' ' test_cmp expect actual ' +test_expect_success 'reset should remove remnants from a failed merge' ' + git read-tree --reset -u HEAD && + git ls-files -s >expect && + sha1=$(git rev-parse :new) && + ( + echo "100644 $sha1 1 old" + echo "100644 $sha1 3 old" + ) | git update-index --index-info && + >old && + git ls-files -s && + git read-tree --reset -u HEAD && + git ls-files -s >actual && + ! test -f old +' + +test_expect_success 'Porcelain reset should remove remnants too' ' + git read-tree --reset -u HEAD && + git ls-files -s >expect && + sha1=$(git rev-parse :new) && + ( + echo "100644 $sha1 1 old" + echo "100644 $sha1 3 old" + ) | git update-index --index-info && + >old && + git ls-files -s && + git reset --hard && + git ls-files -s >actual && + ! test -f old +' + +test_expect_success 'Porcelain checkout -f should remove remnants too' ' + git read-tree --reset -u HEAD && + git ls-files -s >expect && + sha1=$(git rev-parse :new) && + ( + echo "100644 $sha1 1 old" + echo "100644 $sha1 3 old" + ) | git update-index --index-info && + >old && + git ls-files -s && + git checkout -f && + git ls-files -s >actual && + ! test -f old +' + +test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' ' + git read-tree --reset -u HEAD && + git ls-files -s >expect && + sha1=$(git rev-parse :new) && + ( + echo "100644 $sha1 1 old" + echo "100644 $sha1 3 old" + ) | git update-index --index-info && + >old && + git ls-files -s && + git checkout -f HEAD && + git ls-files -s >actual && + ! test -f old +' + test_done diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 2275caa317..653362ba22 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -20,6 +20,10 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' ' test $ret != "0" ' +modebits () { + ls -l "$1" | sed -e 's|^\(..........\).*|\1|' +} + for u in 002 022 do test_expect_success "shared=1 does not clear bits preset by umask $u" ' @@ -85,8 +89,7 @@ do rm -f .git/info/refs && git update-server-info && - actual="$(ls -l .git/info/refs)" && - actual=${actual%% *} && + actual="$(modebits .git/info/refs)" && test "x$actual" = "x-$y" || { ls -lt .git/info false @@ -98,8 +101,7 @@ do rm -f .git/info/refs && git update-server-info && - actual="$(ls -l .git/info/refs)" && - actual=${actual%% *} && + actual="$(modebits .git/info/refs)" && test "x$actual" = "x-$x" || { ls -lt .git/info false diff --git a/t/t3409-rebase-hook.sh b/t/t3409-rebase-hook.sh index bc93dda8fd..1f1b850677 100755 --- a/t/t3409-rebase-hook.sh +++ b/t/t3409-rebase-hook.sh @@ -123,4 +123,20 @@ test_expect_success 'pre-rebase hook stops rebase (2)' ' test 0 = $(git rev-list HEAD...side | wc -l) ' +test_expect_success 'rebase --no-verify overrides pre-rebase (1)' ' + git checkout test && + git reset --hard side && + git rebase --no-verify master && + test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && + test "z$(cat git)" = zworld +' + +test_expect_success 'rebase --no-verify overrides pre-rebase (2)' ' + git checkout test && + git reset --hard side && + EDITOR=true git rebase --no-verify -i master && + test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && + test "z$(cat git)" = zworld +' + test_done diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh new file mode 100755 index 0000000000..8cde40f8e8 --- /dev/null +++ b/t/t3409-rebase-preserve-merges.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Copyright(C) 2008 Stephen Habermann & Andreas Ericsson +# +test_description='git rebase -p should preserve merges + +Run "git rebase -p" and check that merges are properly carried along +' +. ./test-lib.sh + +GIT_AUTHOR_EMAIL=bogus_email_address +export GIT_AUTHOR_EMAIL + +#echo 'Setting up: +# +#A1--A2 <-- origin/master +# \ \ +# B1--M <-- topic +# \ +# B2 <-- origin/topic +# +#' + +test_expect_success 'setup for merge-preserving rebase' \ + 'echo First > A && + git add A && + git-commit -m "Add A1" && + git checkout -b topic && + echo Second > B && + git add B && + git-commit -m "Add B1" && + git checkout -f master && + echo Third >> A && + git-commit -a -m "Modify A2" && + + git clone ./. clone1 && + cd clone1 && + git checkout -b topic origin/topic && + git merge origin/master && + cd .. + + git clone ./. clone2 + cd clone2 && + git checkout -b topic origin/topic && + git merge origin/master && + cd .. && + + git checkout topic && + echo Fourth >> B && + git commit -a -m "Modify B2" +' + +test_expect_success 'rebase -p fakes interactive rebase' ' + cd clone2 && + git fetch && + git rebase -p origin/topic && + test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) && + test 1 = $(git rev-list --all --pretty=oneline | grep "Merge commit" | wc -l) +' + +test_done diff --git a/t/t3410-rebase-preserve-dropped-merges.sh b/t/t3410-rebase-preserve-dropped-merges.sh new file mode 100755 index 0000000000..5816415aaf --- /dev/null +++ b/t/t3410-rebase-preserve-dropped-merges.sh @@ -0,0 +1,139 @@ +#!/bin/sh +# +# Copyright (c) 2008 Stephen Haberman +# + +test_description='git rebase preserve merges + +This test runs git rebase with preserve merges and ensures commits +dropped by the --cherry-pick flag have their childrens parents +rewritten. +' +. ./test-lib.sh + +# set up two branches like this: +# +# A - B - C - D - E +# \ +# F - G - H +# \ +# I +# +# where B, D and G touch the same file. + +test_expect_success 'setup' ' + : > file1 && + git add file1 && + test_tick && + git commit -m A && + git tag A && + echo 1 > file1 && + test_tick && + git commit -m B file1 && + : > file2 && + git add file2 && + test_tick && + git commit -m C && + echo 2 > file1 && + test_tick && + git commit -m D file1 && + : > file3 && + git add file3 && + test_tick && + git commit -m E && + git tag E && + git checkout -b branch1 A && + : > file4 && + git add file4 && + test_tick && + git commit -m F && + git tag F && + echo 3 > file1 && + test_tick && + git commit -m G file1 && + git tag G && + : > file5 && + git add file5 && + test_tick && + git commit -m H && + git tag H && + git checkout -b branch2 F && + : > file6 && + git add file6 && + test_tick && + git commit -m I && + git tag I +' + +# A - B - C - D - E +# \ \ \ +# F - G - H -- L \ --> L +# \ | \ +# I -- G2 -- J -- K I -- K +# G2 = same changes as G +test_expect_success 'skip same-resolution merges with -p' ' + git checkout branch1 && + ! git merge E && + echo 23 > file1 && + git add file1 && + git commit -m L && + git checkout branch2 && + echo 3 > file1 && + git commit -a -m G2 && + ! git merge E && + echo 23 > file1 && + git add file1 && + git commit -m J && + echo file7 > file7 && + git add file7 && + git commit -m K && + GIT_EDITOR=: git rebase -i -p branch1 && + test $(git rev-parse branch2^^) = $(git rev-parse branch1) && + test "23" = "$(cat file1)" && + test "" = "$(cat file6)" && + test "file7" = "$(cat file7)" && + + git checkout branch1 && + git reset --hard H && + git checkout branch2 && + git reset --hard I +' + +# A - B - C - D - E +# \ \ \ +# F - G - H -- L \ --> L +# \ | \ +# I -- G2 -- J -- K I -- G2 -- K +# G2 = different changes as G +test_expect_success 'keep different-resolution merges with -p' ' + git checkout branch1 && + ! git merge E && + echo 23 > file1 && + git add file1 && + git commit -m L && + git checkout branch2 && + echo 4 > file1 && + git commit -a -m G2 && + ! git merge E && + echo 24 > file1 && + git add file1 && + git commit -m J && + echo file7 > file7 && + git add file7 && + git commit -m K && + ! GIT_EDITOR=: git rebase -i -p branch1 && + echo 234 > file1 && + git add file1 && + GIT_EDITOR=: git rebase --continue && + test $(git rev-parse branch2^^^) = $(git rev-parse branch1) && + test "234" = "$(cat file1)" && + test "" = "$(cat file6)" && + test "file7" = "$(cat file7)" && + + git checkout branch1 && + git reset --hard H && + git checkout branch2 && + git reset --hard I +' + +test_done diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index fe6080da57..aeb5405cfe 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -236,12 +236,15 @@ show --patch-with-stat --summary side format-patch --stdout initial..side format-patch --stdout initial..master^ format-patch --stdout initial..master +format-patch --stdout --no-numbered initial..master +format-patch --stdout --numbered initial..master format-patch --attach --stdout initial..side format-patch --attach --stdout initial..master^ format-patch --attach --stdout initial..master format-patch --inline --stdout initial..side format-patch --inline --stdout initial..master^ format-patch --inline --stdout initial..master +format-patch --inline --stdout initial..master format-patch --inline --stdout --subject-prefix=TESTCASE initial..master config format.subjectprefix DIFFERENT_PREFIX format-patch --inline --stdout initial..master^^ diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master index 43346b9ba4..e5ab74437e 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master @@ -2,7 +2,7 @@ $ git format-patch --attach --stdout initial..master From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/3] Second MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -63,7 +63,7 @@ index 01e79c3..0000000 From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/3] Third MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -111,7 +111,7 @@ index 0000000..b1e6722 From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:03:00 +0000 -Subject: [PATCH] Side +Subject: [PATCH 3/3] Side MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ index d7490a9fd7..2c71d20d37 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ @@ -2,7 +2,7 @@ $ git format-patch --attach --stdout initial..master^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/2] Second MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -63,7 +63,7 @@ index 01e79c3..0000000 From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/2] Third MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master index fca5cce373..58f8a7b7d6 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master @@ -2,7 +2,7 @@ $ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [TESTCASE] Second +Subject: [TESTCASE 1/3] Second MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -63,7 +63,7 @@ index 01e79c3..0000000 From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [TESTCASE] Third +Subject: [TESTCASE 2/3] Third MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -111,7 +111,7 @@ index 0000000..b1e6722 From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:03:00 +0000 -Subject: [TESTCASE] Side +Subject: [TESTCASE 3/3] Side MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..master index 6d6fac3908..9e7bbdffa2 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master @@ -2,7 +2,7 @@ $ git format-patch --inline --stdout initial..master From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/3] Second MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -63,7 +63,7 @@ index 01e79c3..0000000 From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/3] Third MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -111,7 +111,7 @@ index 0000000..b1e6722 From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:03:00 +0000 -Subject: [PATCH] Side +Subject: [PATCH 3/3] Side MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ index 18a1110def..f881f644cc 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ @@ -2,7 +2,7 @@ $ git format-patch --inline --stdout initial..master^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/2] Second MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" @@ -63,7 +63,7 @@ index 01e79c3..0000000 From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/2] Third MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n" diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master new file mode 100644 index 0000000000..f7752ebbea --- /dev/null +++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master @@ -0,0 +1,127 @@ +$ git format-patch --stdout --no-numbered initial..master +From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:01:00 +0000 +Subject: [PATCH] Second + +This is the second commit. +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 +-- +g-i-t--v-e-r-s-i-o-n + + +From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:02:00 +0000 +Subject: [PATCH] Third + +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C +-- +g-i-t--v-e-r-s-i-o-n + + +From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:03:00 +0000 +Subject: [PATCH] Side + +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 +-- +g-i-t--v-e-r-s-i-o-n + +$ diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..master new file mode 100644 index 0000000000..8e67dbf76f --- /dev/null +++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..master @@ -0,0 +1,127 @@ +$ git format-patch --stdout --numbered initial..master +From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:01:00 +0000 +Subject: [PATCH 1/3] Second + +This is the second commit. +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 +-- +g-i-t--v-e-r-s-i-o-n + + +From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:02:00 +0000 +Subject: [PATCH 2/3] Third + +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C +-- +g-i-t--v-e-r-s-i-o-n + + +From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 +From: A U Thor <author@example.com> +Date: Mon, 26 Jun 2006 00:03:00 +0000 +Subject: [PATCH 3/3] Side + +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 +-- +g-i-t--v-e-r-s-i-o-n + +$ diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..master index 8b88ca4927..7b89978e32 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--stdout_initial..master @@ -2,7 +2,7 @@ $ git format-patch --stdout initial..master From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/3] Second This is the second commit. --- @@ -48,7 +48,7 @@ g-i-t--v-e-r-s-i-o-n From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/3] Third --- dir/sub | 2 ++ @@ -82,7 +82,7 @@ g-i-t--v-e-r-s-i-o-n From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:03:00 +0000 -Subject: [PATCH] Side +Subject: [PATCH 3/3] Side --- dir/sub | 2 ++ diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..master^ index 47a4b88637..b7f9725dc4 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_initial..master^ @@ -2,7 +2,7 @@ $ git format-patch --stdout initial..master^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 -Subject: [PATCH] Second +Subject: [PATCH 1/2] Second This is the second commit. --- @@ -48,7 +48,7 @@ g-i-t--v-e-r-s-i-o-n From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:02:00 +0000 -Subject: [PATCH] Third +Subject: [PATCH 2/2] Third --- dir/sub | 2 ++ diff --git a/t/t4021-format-patch-numbered.sh b/t/t4021-format-patch-numbered.sh index 43d64bbd82..390af2389f 100755 --- a/t/t4021-format-patch-numbered.sh +++ b/t/t4021-format-patch-numbered.sh @@ -45,17 +45,22 @@ test_numbered() { grep "^Subject: \[PATCH 2/2\]" $1 } -test_expect_success 'Default: no numbered' ' +test_expect_success 'single patch defaults to no numbers' ' + git format-patch --stdout HEAD~1 >patch0.single && + test_single_no_numbered patch0.single +' + +test_expect_success 'multiple patch defaults to numbered' ' - git format-patch --stdout HEAD~2 >patch0 && - test_no_numbered patch0 + git format-patch --stdout HEAD~2 >patch0.multiple && + test_numbered patch0.multiple ' test_expect_success 'Use --numbered' ' - git format-patch --numbered --stdout HEAD~2 >patch1 && - test_numbered patch1 + git format-patch --numbered --stdout HEAD~1 >patch1 && + test_single_numbered patch1 ' diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh index 4448aba7e0..2b912d7728 100755 --- a/t/t4151-am-abort.sh +++ b/t/t4151-am-abort.sh @@ -22,7 +22,7 @@ test_expect_success setup ' test_tick && git commit -a -m $i || break done && - git format-patch initial && + git format-patch --no-numbered initial && git checkout -b side initial && echo local change >file-2-expect ' diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index 6424db1f28..344ab25b8b 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -177,4 +177,14 @@ test_expect_success \ ".git/objects/pack/pack-${pack1}.pack" 2>&1) && echo "$err" | grep "CRC mismatch"' +test_expect_success 'running index-pack in the object store' ' + rm -f .git/objects/pack/* && + cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack && + ( + cd .git/objects/pack + git index-pack pack-${pack1}.pack + ) && + test -f .git/objects/pack/pack-${pack1}.idx +' + test_done diff --git a/t/t5702-clone-options.sh b/t/t5702-clone-options.sh index 328e4d9a33..27825f5f31 100755 --- a/t/t5702-clone-options.sh +++ b/t/t5702-clone-options.sh @@ -19,4 +19,17 @@ test_expect_success 'clone -o' ' ' +test_expect_success 'redirected clone' ' + + git clone "file://$(pwd)/parent" clone-redirected >out 2>err && + test ! -s err + +' +test_expect_success 'redirected clone -v' ' + + git clone -v "file://$(pwd)/parent" clone-redirected-v >out 2>err && + test -s err + +' + test_done diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 16cc635813..e6c9e59b61 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -91,10 +91,10 @@ check_describe D-* HEAD^^ check_describe A-* HEAD^^2 check_describe B HEAD^^2^ -check_describe A-* --tags HEAD -check_describe A-* --tags HEAD^ -check_describe D-* --tags HEAD^^ -check_describe A-* --tags HEAD^^2 +check_describe c-* --tags HEAD +check_describe c-* --tags HEAD^ +check_describe e-* --tags HEAD^^ +check_describe c-* --tags HEAD^^2 check_describe B --tags HEAD^^2^ check_describe B-0-* --long HEAD^^2^ diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 3a36a95b9a..e5b210bc96 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -544,4 +544,20 @@ test_expect_success 'merge early part of c2' ' test_debug 'gitk --all' +test_expect_success 'merge --no-ff --no-commit && commit' ' + git reset --hard c0 && + git merge --no-ff --no-commit c1 && + EDITOR=: git commit && + verify_parents $c0 $c1 +' + +test_debug 'gitk --all' + +test_expect_success 'amending no-ff merge commit' ' + EDITOR=: git commit --amend && + verify_parents $c0 $c1 +' + +test_debug 'gitk --all' + test_done diff --git a/transport.c b/transport.c index 5110c56c4e..1c510a3360 100644 --- a/transport.c +++ b/transport.c @@ -644,7 +644,7 @@ static int fetch_refs_via_pack(struct transport *transport, args.include_tag = data->followtags; args.verbose = (transport->verbose > 0); args.quiet = (transport->verbose < 0); - args.no_progress = args.quiet || !isatty(1); + args.no_progress = args.quiet || (!transport->progress && !isatty(1)); args.depth = data->depth; for (i = 0; i < nr_heads; i++) diff --git a/transport.h b/transport.h index d0b52053ff..6bbc1a8264 100644 --- a/transport.h +++ b/transport.h @@ -25,6 +25,8 @@ struct transport { int (*disconnect)(struct transport *connection); char *pack_lockfile; signed verbose : 2; + /* Force progress even if the output is not a tty */ + unsigned progress : 1; }; #define TRANSPORT_PUSH_ALL 1 |