Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:08 +0000 (23:42 +0000)]
i18n: git-reset "Unstaged changes after reset" message
Gettextize the ""Unstaged changes after reset:" message. A test in
t7102-reset.sh explicitly checked for this message. Change it to skip
under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:07 +0000 (23:42 +0000)]
i18n: git-reset reset_type_names messages
Make the messages in git-reset that use the reset_type_names static
array to be translatable by marking the array items with N_() and
using _() later.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:06 +0000 (23:42 +0000)]
i18n: git-reset basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:05 +0000 (23:42 +0000)]
i18n: git-rm basic messages
Make the basic git-mv messages translatable, but skip things like "rm
'%s'\n" and "git rm '%s'\n" for now.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:04 +0000 (23:42 +0000)]
i18n: git-mv "bad" messages
Gettextize messages made by assigning to the "bad" char* variable.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:03 +0000 (23:42 +0000)]
i18n: git-mv basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:02 +0000 (23:42 +0000)]
i18n: git-merge "Wonderful" message
Gettextize the "Wonderful" message. A test in t7600-merge.sh
explicitly checked for this message. Change it to skip under
GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:01 +0000 (23:42 +0000)]
i18n: git-merge "You have not concluded your merge" messages
Gettextize the "You have not concluded your merge messages. A test in
t3030-merge-recursive.sh explicitly checked for this message. Change
it to skip the test under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:42:00 +0000 (23:42 +0000)]
i18n: git-merge "Updating %s..%s" message
Gettextize the "Updating %s..%s\n" message. A test in
t1200-tutorial.sh explicitly checked for this message. Split it into
two tests to skip the test_cmp test under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:59 +0000 (23:41 +0000)]
i18n: git-merge basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:58 +0000 (23:41 +0000)]
i18n: git-log "--OPT does not make sense" messages
Gettextize the "--name-only/--name-status/--check does not make sense"
messages. A test in t4014-format-patch.sh explicitly checked for these
messages. Change them to skip under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:57 +0000 (23:41 +0000)]
i18n: git-log basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:56 +0000 (23:41 +0000)]
i18n: git-grep "--open-files-in-pager" message
Gettextize the "--open-files-in-pager only works on the worktree"
message. A test in t7811-grep-open.sh explicitly checked for this
message. Change it to skip under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:55 +0000 (23:41 +0000)]
i18n: git-grep basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:54 +0000 (23:41 +0000)]
i18n: git-fetch split up "(non-fast-forward)" message
Split up the "(non-fast-forward)" message from printf directives and
make it translatable.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:53 +0000 (23:41 +0000)]
i18n: git-fetch update_local_ref messages
Translate a "[rejected]" message spotted by Jeff King, and other
things in update_local_ref along with it.
Reported-by: Jeff King <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:52 +0000 (23:41 +0000)]
i18n: git-fetch formatting messages
Translate some of the formatting messages that appear on git-fetch
showing how branches/tags etc. were updated.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:51 +0000 (23:41 +0000)]
i18n: git-fetch basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:50 +0000 (23:41 +0000)]
i18n: git-diff basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:49 +0000 (23:41 +0000)]
i18n: git-commit advice messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:48 +0000 (23:41 +0000)]
i18n: git-commit "enter the commit message" message
Gettextize the "# Please enter the commit message for your changes."
message. Several tests in t7500-commit.sh and t7502-commit.sh assume
that this message starts with a newline. Change the tests to to skip
under GETTEXT_POISON=YesPlease.
These fail under GETTEXT_POISON=YesPlease because the poison editor
message doesn't do the right thing with comments and line breaks, so
these messages will be incorrectly broken up across lines.
This test should not be skipped under a hypothetical future testing
mode that tests Git under language locales, since those messages
should all start with a newline like the original.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:47 +0000 (23:41 +0000)]
i18n: git-commit print_summary messages
Gettextize the "(root-commit)" and "detached HEAD" fragments that
appear when you commit either the root commit, or a commit in a
detached head translatable.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:46 +0000 (23:41 +0000)]
i18n: git-commit formatting messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:45 +0000 (23:41 +0000)]
i18n: git-commit "middle of a merge" message
Gettextize the "You are in the middle of a merge -- cannot amend."
message. Several tests in t7110-reset-merge.sh explicitly checked for
this message. Change them to skip under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:44 +0000 (23:41 +0000)]
i18n: git-commit basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:43 +0000 (23:41 +0000)]
i18n: git-checkout "Switched to a .. branch" message
Split up the "Switched to and reset branch" and "Switched to a new
branch" messages to make them easier to translate.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:42 +0000 (23:41 +0000)]
i18n: git-checkout "HEAD is now at" message
Gettextize the "HEAD is now at" messages. Several tests in t7201-co.sh
explicitly checked for this message. Change them to skip under
GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:41 +0000 (23:41 +0000)]
i18n: git-checkout describe_detached_head messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:40 +0000 (23:41 +0000)]
i18n: git-checkout: our/their version message
Split up the "does not have our/their version" message to make it
easier to translate.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:39 +0000 (23:41 +0000)]
i18n: git-checkout basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:38 +0000 (23:41 +0000)]
i18n: git-branch "(no branch)" message
Gettextize the "(no branch)" message that's shown by "git branch" when
you're in a detached HEAD.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:37 +0000 (23:41 +0000)]
i18n: git-branch "git branch -v" messages
Make the "git branch -v" messages translatable, e.g.:
5054b57 [ahead 8] branch error fixup
This is possibly a plumbing message.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:36 +0000 (23:41 +0000)]
i18n: git-branch "Deleted branch [...]" message
Gettextize the "Deleted %sbranch %s (was %s).\n" messages. test in
t3200-branch.sh explicitly checked for this message. Change it to skip
under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:35 +0000 (23:41 +0000)]
i18n: git-branch "remote branch '%s' not found" message
This could be done better by splitting it up, but it would change too
much code, which I'm trying to avoid at this point. Instead add a
TRANSLATORS comment to explain what "remote " does.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:34 +0000 (23:41 +0000)]
i18n: git-branch basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:33 +0000 (23:41 +0000)]
i18n: git-add "Unstaged changes" message
Make the "Unstaged changes after refreshing the index:"
translatable. It's displayed under `git add --refresh --verbose`.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:32 +0000 (23:41 +0000)]
i18n: git-add "remove '%s'" message
Make the "remove '%s'" message translatable. It's displayed under `git
add -u --verbose`. Also skip the corresponding test when output is not
in the C locale.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:31 +0000 (23:41 +0000)]
i18n: git-add "did not match any files" message
Make the "did not match any files" message translatable, and skip the
test that checks for it when the C_LOCALE_OUTPUT prereq is not
present.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:30 +0000 (23:41 +0000)]
i18n: git-add "The following paths are ignored" message
The tests t2204 (.gitignore) and t3700 (add) explicitly check for
these messages, so while at it, split each relevant test into a part
that just checks "git add"'s exit status and a part that checks
porcelain output.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:29 +0000 (23:41 +0000)]
i18n: git-add basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Fri, 25 Feb 2011 07:22:12 +0000 (01:22 -0600)]
i18n: "make distclean" should clean up after "make pot"
This is in "make distclean" and not "make clean" to avoid needlessly
changing the POT-Creation-Date in the following scenario:
make clean; # cleaning up after an old build
git pull
make pot; # regenerate po template if necessary
msgmerge po/my_language.po po/git.pot
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:28 +0000 (23:41 +0000)]
i18n: git-clone "Cloning into" message
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:23 +0000 (23:41 +0000)]
i18n: Makefile: "pot" target to extract messages marked for translation
Add rules to generate a template (po/git.pot) listing messages marked
for translation in the C portion of git.
To get started translating, just run "make pot".
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:27 +0000 (23:41 +0000)]
i18n: git-clone "Cloning into" message
Separate the "Cloning into %s" and "Cloning into bare repository %s"
messages to make them easier to translate. No noticeable change
intended.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:26 +0000 (23:41 +0000)]
i18n: git-clone basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:25 +0000 (23:41 +0000)]
i18n: git-init "Initialized [...] repository" message
These messages could benefit from splitting up. An earlier version of
this patch began like this:
const char *reinit_shared = _("Reinitialized existing shared Git repository in %s\n");
const char *init_shared = _("Initialized empty shared Git repository in %s\n");
const char *reinit_noshared = _("Reinitialized existing Git repository in %s\n");
const char *init_noshared = _("Initialized empty Git repository in %s\n");
But in the first round of gettextization I'm aiming to keep code
changes to a minimum for ease of review. So just add a comment
explaining to translators how the sprintf format gets used so they
can cope for now if the language's grammar allows.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:24 +0000 (23:41 +0000)]
i18n: git-init basic messages
Change the user visible strings in init-db.c to use gettext
localizations. This only converts messages which needed to be changed
from "foo" to _("foo"), and didn't need any TRANSLATORS comments.
I haven't marked the messages in init_db_usage or init_db_options for
translation, since that would require additional changes in
parse-options.c. Those can be done later.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Thu, 10 Mar 2011 03:17:58 +0000 (21:17 -0600)]
i18n: add stub Q_() wrapper for ngettext
The Q_ function translates a string representing some pharse with an
alternative plural form and uses the 'count' argument to choose which
form to return. Use of Q_ solves the "%d noun(s)" problem in a way
that is portable to languages outside the Germanic and Romance
families.
In English, the semantics of Q_(sing, plur, count) are roughly
equivalent to
count == 1 ? _(sing) : _(plur)
while in other languages there can be more variants (count == 0; more
random-looking rules based on the historical pronunciation of the
number). Behind the scenes, the singular form is used to look up a
family of translations and the plural form is ignored unless no
translation is available.
Define such a Q_ in gettext.h with the English semantics so C code can
start using it to mark phrases with a count for translation.
The name "Q_" is taken from subversion and stands for "quantity".
Many projects just use ngettext directly without a wrapper analogous
to _; we should not do so because git's gettext.h is meant not to
conflict with system headers that might include libintl.h.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 10 Mar 2011 00:21:16 +0000 (16:21 -0800)]
Update Release Notes to 1.7.5
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 9 Mar 2011 23:56:17 +0000 (15:56 -0800)]
Merge branch 'js/cherry-pick-usability'
* js/cherry-pick-usability:
Teach commit about CHERRY_PICK_HEAD
bash: teach __git_ps1 about CHERRY_PICK_HEAD
Introduce CHERRY_PICK_HEAD
t3507: introduce pristine-detach helper
Junio C Hamano [Wed, 9 Mar 2011 23:54:04 +0000 (15:54 -0800)]
Merge branch 'js/checkout-untracked-symlink'
* js/checkout-untracked-symlink:
do not overwrite untracked symlinks
Demonstrate breakage: checkout overwrites untracked symlink with directory
Junio C Hamano [Wed, 9 Mar 2011 23:53:32 +0000 (15:53 -0800)]
Merge branch 'so/submodule-no-update-first-time'
* so/submodule-no-update-first-time:
t7406: "git submodule update {--merge|--rebase]" with new submodules
submodule: no [--merge|--rebase] when newly cloned
Michael J Gruber [Tue, 8 Mar 2011 08:31:26 +0000 (09:31 +0100)]
git-log.txt,rev-list-options.txt: put option blocks in proper order
Match the order of the description to the one in which they get applied:
commit limiting
commit ordering
commit formatting
diff options
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthieu Moy [Wed, 9 Mar 2011 20:52:15 +0000 (21:52 +0100)]
log: fix --max-count when used together with -S or -G
The --max-count limit is implemented by counting revisions in
get_revision(), but the -S and -G take effect later when running diff.
Hence "--max-count=10 -Sfoo" meant "examine the 10 first revisions, and
out of them, show only those changing the occurences of foo", not "show 10
revisions changing the occurences of foo".
In case the commit isn't actually shown, cancel the decrement of
max_count.
Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 9 Mar 2011 22:20:39 +0000 (14:20 -0800)]
Merge branch 'maint'
* maint:
Fix typo in t/README
ls-remote documentation: <refs> argument is optional
Add Author and Documentation sections to git-for-each-ref.txt
Documentation: remove redundant colons in git-for-each-ref.txt
Michael J Gruber [Mon, 7 Mar 2011 12:31:43 +0000 (13:31 +0100)]
t6007: test rev-list --cherry
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Mon, 7 Mar 2011 12:31:42 +0000 (13:31 +0100)]
log --cherry: a synonym
At the porcelain level, because by definition there are many more contributors
than integrators, it makes sense to give a handy short-hand for --right-only
used with --cherry-mark and --no-merges. Make it so.
In other words, this provides "git cherry with rev-list interface".
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Mon, 7 Mar 2011 12:31:41 +0000 (13:31 +0100)]
rev-list: documentation and test for --cherry-mark
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Mon, 7 Mar 2011 12:31:40 +0000 (13:31 +0100)]
revision.c: introduce --cherry-mark
for marking those commits which "--cherry-pick" would drop.
The marker for those commits is '=' because '-' denotes a boundary
commit already, even though 'git cherry' uses it.
Nonequivalent commits are denoted '+' unless '--left-right' is used.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Mon, 7 Mar 2011 12:31:39 +0000 (13:31 +0100)]
rev-list/log: factor out revision mark generation
Currently, we have identical code for generating revision marks ('<',
'>', '-') in 5 places.
Factor out the code to a single function get_revision_mark() for easier
maintenance and extensibility.
Note that the check for !!revs in graph.c (which gets removed
effectively by this patch) is superfluous.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:14:15 +0000 (23:14 +0100)]
fetch/pull: Describe --recurse-submodule restrictions in the BUGS section
Using the --recurse-submodules option with fetch and pull might not always
fetch all the submodule commits the user expects, as this will only work
when the submodule is already checked out. Document that and warn that
this is expected to change in the future.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:13:36 +0000 (23:13 +0100)]
submodule update: Don't fetch when the submodule commit is already present
If the commit to be checked out on "git submodule update" has already been
fetched in the submodule there is no need to run "git fetch" again. Since
"git fetch" recently learned recursion (and the new on-demand mode to
fetch commits recorded in the superproject is enabled by default) this
will happen pretty often, thereby making the unconditional fetch during
"git submodule update" unnecessary.
If the commit is not present in the submodule (e.g. the user disabled the
fetch on-demand mode) the fetch will be run as before.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:12:58 +0000 (23:12 +0100)]
fetch/pull: Don't recurse into a submodule when commits are already present
When looking for submodules where new commits have been recorded in the
superproject ignore those cases where the submodules commits are already
present locally. This can happen e.g. when the submodule has been rewound
to an earlier state. Then there is no need to fetch the submodule again
as the commit recorded in the newly fetched superproject commit has
already been fetched earlier into the submodule.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:12:19 +0000 (23:12 +0100)]
Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option
Now the behavior of fetch and pull can be configured to the recently added
'on-demand' mode separately for each submodule too.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:11:48 +0000 (23:11 +0100)]
config: teach the fetch.recurseSubmodules option the 'on-demand' value
To enable the user to change the default behavior of "git fetch" and "git
pull" regarding submodule recursion add the new "on-demand" value which
has just been added to the "--recurse-submodules" command line option.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:11:21 +0000 (23:11 +0100)]
fetch/pull: Add the 'on-demand' value to the --recurse-submodules option
Until now the --recurse-submodules option could only be used to either
fetch all populated submodules recursively or to disable recursion
completely. As fetch and pull now by default just fetch those submodules
for which new commits have been fetched in the superproject, a command
line option to enforce that behavior is needed to be able to override
configuration settings.
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jens Lehmann [Sun, 6 Mar 2011 22:10:46 +0000 (23:10 +0100)]
fetch/pull: recurse into submodules when necessary
To be able to access all commits of populated submodules referenced by the
superproject it is sufficient to only then let "git fetch" recurse into a
submodule when the new commits fetched in the superproject record new
commits for it. Having these commits present is extremely useful when
using the "--submodule" option to "git diff" (which is what "git gui" and
"gitk" do since 1.6.6), as all submodule commits needed for creating a
descriptive output can be accessed. Also merging submodule commits (added
in 1.7.3) depends on the submodule commits in question being present to
work. Last but not least this enables disconnected operation when using
submodules, as all commits necessary for a successful "git submodule
update -N" will have been fetched automatically. So we choose this mode as
the default for fetch and pull.
Before a new or changed ref from upstream is updated in update_local_ref()
"git rev-list <new-sha1> --not --branches --remotes" is used to determine
all newly fetched commits. These are then walked and diffed against their
parent(s) to see if a submodule has been changed. If that is the case, its
path is stored to be fetched after the superproject fetch is completed.
Using the "--recurse-submodules" or the "--no-recurse-submodules" option
disables the examination of the fetched refs because the result will be
ignored anyway.
There is currently no infrastructure for storing deleted and new
submodules in the .git directory of the superproject. That's why fetch and
pull for now only fetch submodules that are already checked out and are
not renamed.
In t7403 the "--no-recurse-submodules" argument had to be added to "git
pull" to avoid failure because of the moved upstream submodule repo.
Thanks-to: Jonathan Nieder <redacted>
Thanks-to: Heiko Voigt <redacted>
Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
Mathias Lafeldt [Wed, 9 Mar 2011 20:25:09 +0000 (21:25 +0100)]
Fix typo in t/README
Signed-off-by: Mathias Lafeldt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Piotr Krukowiecki [Wed, 9 Mar 2011 20:03:48 +0000 (21:03 +0100)]
ls-remote documentation: <refs> argument is optional
Correct SYNOPSIS section.
Signed-off-by: Piotr Krukowiecki <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alexei Sholik [Tue, 8 Mar 2011 13:16:10 +0000 (15:16 +0200)]
Add Author and Documentation sections to git-for-each-ref.txt
Signed-off-by: Alexei Sholik <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alexei Sholik [Tue, 8 Mar 2011 13:16:09 +0000 (15:16 +0200)]
Documentation: remove redundant colons in git-for-each-ref.txt
Signed-off-by: Alexei Sholik <redacted>
Signed-off-by: Junio C Hamano <redacted>
Pat Thoyts [Tue, 1 Mar 2011 23:50:50 +0000 (23:50 +0000)]
gitk: Quote tag names in event bindings to avoid problems with % chars
Tag names that contain a % character require quoting when used in event
bindings or the name may be mis-recognised for percent substitution in
the event script.
Reported-by: Jonathan Nieder <redacted>
Signed-off-by: Pat Thoyts <redacted>
Signed-off-by: Paul Mackerras <redacted>
Paul Mackerras [Wed, 9 Mar 2011 09:52:38 +0000 (20:52 +1100)]
gitk: Allow user to control how much of the SHA1 ID gets auto-selected
This adds a new spinbox on the Edit Preferences pane to allow the user
to control how many characters of the SHA1 ID get autoselected.
Signed-off-by: Paul Mackerras <redacted>
Junio C Hamano [Wed, 9 Mar 2011 05:37:23 +0000 (21:37 -0800)]
Merge branch 'maint'
* maint:
SubmittingPatches: clarify the expected commit log description
diff format documentation: clarify --cc and -c
rev-list-options.txt: typo fix
Nicolas Kaiser [Fri, 4 Mar 2011 23:16:26 +0000 (00:16 +0100)]
transport-helper.c: fix check for (size_t < 0)
'bytes' is of type size_t which is unsigned thus can't be negative. But
the assigned write() returns ssize_t, and -1 on error.
For testing < 0, 'bytes' needs to be of a signed type.
Signed-off-by: Nicolas Kaiser <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 9 Mar 2011 00:58:19 +0000 (16:58 -0800)]
SubmittingPatches: clarify the expected commit log description
Earlier,
47afed5 (SubmittingPatches: itemize and reflect upon well written
changes, 2009-04-28) added a discussion on the contents of the commit log
message, but the last part of the new paragraph didn't make much sense.
Reword it slightly to make it more readable.
Update the "quicklist" to clarify what we mean by "motivation" and
"contrast". Also mildly discourage external references.
Signed-off-by: Junio C Hamano <redacted>
Adam Monsen [Tue, 8 Mar 2011 20:51:37 +0000 (12:51 -0800)]
diff format documentation: clarify --cc and -c
The description was unclear if -c or --cc was the default (--cc is for
some commands), and incorrectly implied that the default applies to
all the diff generating commands.
Most importantly, "log" does not default to "--cc" (it defaults to
"--no-merges") and "log -p" obeys the user's wish to see non-combined
format. Only "diff" (during merge and three-blob comparison) and
"show" use --cc as the default.
Signed-off-by: Adam Monsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:11:37 +0000 (23:11 -0600)]
commit, status: use status_printf{,_ln,_more} helpers
wt-status code is used to provide a reminder of changes included and
not included for the commit message template opened in the operator's
text editor by "git commit". Therefore each line of its output begins
with the comment character "#":
# Please enter the commit message for your changes. Lines starting
Use the new status_printf{,_ln,_more} functions to take care of adding
"#" to the beginning of such status lines automatically. Using these
will have two advantages over the current code:
- The obvious one is to force separation of the "#" from the
translatable part of the message when git learns to translate its
output.
- Another advantage is that this makes it easier for us to drop "#"
prefix in "git status" output in later versions of git if we want
to.
Explained-by: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:10:49 +0000 (23:10 -0600)]
commit: refer to commit template as s->fp
Instead of maintaining a local variable for it, use s->fp to keep
track of where the commit message template should be written.
This prepares us to take advantage of the status_printf functions,
which use a struct wt_status instead of a FILE pointer to determine
where to send their output.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:09:41 +0000 (23:09 -0600)]
wt-status: add helpers for printing wt-status lines
Introduce status_printf{,_ln,_more} wrapper functions around
color_vfprintf() which take care of adding "#" to the beginning of
status lines automatically. The semantics:
- status_printf() is just like color_fprintf() but it adds a "# "
at the beginning of each line of output;
- status_printf_ln() is a convenience function that additionally
adds "\n" at the end;
- status_printf_more() is a variant of status_printf() used to
continue lines that have already started. It suppresses the "#" at
the beginning of the first line.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:30:30 +0000 (09:30 -0500)]
trace: give repo_setup trace its own key
You no longer get this output with GIT_TRACE=1; instead, you
can do GIT_TRACE_SETUP=1.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:30:19 +0000 (09:30 -0500)]
add packet tracing debug code
This shows a trace of all packets coming in or out of a given
program. This can help with debugging object negotiation or
other protocol issues.
To keep the code changes simple, we operate at the lowest
level, meaning we don't necessarily understand what's in the
packets. The one exception is a packet starting with "PACK",
which causes us to skip that packet and turn off tracing
(since the gigantic pack data will not be interesting to
read, at least not in the trace format).
We show both written and read packets. In the local case,
this may mean you will see packets twice (written by the
sender and read by the receiver). However, for cases where
the other end is remote, this allows you to see the full
conversation.
Packet tracing can be enabled with GIT_TRACE_PACKET=<foo>,
where <foo> takes the same arguments as GIT_TRACE.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:29:50 +0000 (09:29 -0500)]
trace: add trace_strbuf
If you happen to have a strbuf, it is a little more readable
and a little more efficient to be able to print it directly
instead of jamming it through the trace_printf interface.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:28:59 +0000 (09:28 -0500)]
trace: factor out "do we want to trace" logic
As we add more tracing areas, this will avoid repeated code.
Technically, trace_printf already checks this and will avoid
printing if the trace key is not set. However, callers may
want to find out early whether or not tracing is enabled so
they can avoid doing work in the common non-trace case.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:28:41 +0000 (09:28 -0500)]
trace: refactor to support multiple env variables
Right now you turn all tracing off and on with GIT_TRACE. To
support new types of tracing without forcing the user to see
all of them, we will soon support turning each tracing area
on with GIT_TRACE_*.
This patch lays the groundwork by providing an interface
which does not assume GIT_TRACE. However, we still maintain
the trace_printf interface so that existing callers do not
need to be refactored.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 24 Feb 2011 14:28:15 +0000 (09:28 -0500)]
trace: add trace_vprintf
This is a necessary cleanup to adding new types of trace
functions.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Tue, 22 Feb 2011 23:41:22 +0000 (23:41 +0000)]
i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set
Tweak the GETTEXT_POISON facility so it is activated at run time
instead of compile time. If the GIT_GETTEXT_POISON environment
variable is set, _(msg) will result in gibberish as before; but if the
GIT_GETTEXT_POISON variable is not set, it will return the message for
human-readable output. So the behavior of mistranslated and
untranslated git can be compared without rebuilding git in between.
For simplicity we always set the GIT_GETTEXT_POISON variable in tests.
This does not affect builds without the GETTEXT_POISON compile-time
option set, so non-i18n git will not be slowed down.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:21 +0000 (23:41 +0000)]
i18n: add GETTEXT_POISON to simulate unfriendly translator
Add a new GETTEXT_POISON compile-time parameter to make _(msg) always
return gibberish. So now you can run
make GETTEXT_POISON=YesPlease
to get a copy of git that functions correctly (one hopes) but produces
output that is in nobody's native language at all.
This is a debugging aid for people who are working on the i18n part of
the system, to make sure that they are not marking plumbing messages
that should never be translated with _().
As new strings get marked for translation, naturally a number of tests
will be broken in this mode. Tests that depend on output from
Porcelain will need to be marked with the new C_LOCALE_OUTPUT test
prerequisite. Newly failing tests that do not depend on output from
Porcelain would be bugs due to messages that should not have been
marked for translation.
Note that the string we're using ("# GETTEXT POISON #") intentionally
starts the pound sign. Some of Git's tests such as
t3404-rebase-interactive.sh rely on interactive editing with a fake
editor, and will needlessly break if the message doesn't start with
something the interactive editor considers a comment.
A future patch will fix fix the underlying cause of that issue by
adding "#" characters to the commit advice automatically.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Tue, 22 Feb 2011 23:41:20 +0000 (23:41 +0000)]
i18n: add no-op _() and N_() wrappers
The _ function is for translating strings into the user's chosen
language. The N_ macro just marks translatable strings for the
xgettext(1) tool without translating them; it is intended for use in
contexts where a function call cannot be used. So, for example:
fprintf(stderr, _("Expansion of alias '%s' failed; "
"'%s' is not a git command\n"),
cmd, argv[0]);
and
const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
/* ERROR_WOULD_OVERWRITE */
N_("Entry '%s' would be overwritten by merge. Cannot merge."),
[...]
Define such _ and N_ in a new gettext.h and include it in cache.h, so
they can be used everywhere. Each just returns its argument for now.
_ is a function rather than a macro like N_ to avoid the temptation to
use _("foo") as a string literal (which would be a compile-time error
once _(s) expands to an expression for the translation of s).
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:11:37 +0000 (23:11 -0600)]
commit, status: use status_printf{,_ln,_more} helpers
wt-status code is used to provide a reminder of changes included and
not included for the commit message template opened in the operator's
text editor by "git commit". Therefore each line of its output begins
with the comment character "#":
# Please enter the commit message for your changes. Lines starting
Use the new status_printf{,_ln,_more} functions to take care of adding
"#" to the beginning of such status lines automatically. Using these
will have two advantages over the current code:
- The obvious one is to force separation of the "#" from the
translatable part of the message when git learns to translate its
output.
- Another advantage is that this makes it easier for us to drop "#"
prefix in "git status" output in later versions of git if we want
to.
Explained-by: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:10:49 +0000 (23:10 -0600)]
commit: refer to commit template as s->fp
Instead of maintaining a local variable for it, use s->fp to keep
track of where the commit message template should be written.
This prepares us to take advantage of the status_printf functions,
which use a struct wt_status instead of a FILE pointer to determine
where to send their output.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sat, 26 Feb 2011 05:09:41 +0000 (23:09 -0600)]
wt-status: add helpers for printing wt-status lines
Introduce status_printf{,_ln,_more} wrapper functions around
color_vfprintf() which take care of adding "#" to the beginning of
status lines automatically. The semantics:
- status_printf() is just like color_fprintf() but it adds a "# "
at the beginning of each line of output;
- status_printf_ln() is a convenience function that additionally
adds "\n" at the end;
- status_printf_more() is a variant of status_printf() used to
continue lines that have already started. It suppresses the "#" at
the beginning of the first line.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Tue, 8 Mar 2011 08:33:44 +0000 (02:33 -0600)]
compat: fall back on __va_copy if available
Since an obvious implementation of va_list is to make it a pointer
into the stack frame, implementing va_copy as "dst = src" will work on
many systems. Platforms that use something different (e.g., a size-1
array of structs, to be assigned with *(dst) = *(src)) will need some
other compatibility macro, though.
Luckily, as the glibc manual hints, such systems tend to provide the
__va_copy macro (introduced in GCC in March, 1997). By using that if
it is available, we can cover our bases pretty well.
Discovered by building with CC="gcc -std=c89" on an amd64 machine:
$ make CC=c89 strbuf.o
[...]
strbuf.c: In function 'strbuf_vaddf':
strbuf.c:211:2: error: incompatible types when assigning to type 'va_list'
from type 'struct __va_list_tag *'
make: *** [strbuf.o] Error 1
Explained-by: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Tue, 8 Mar 2011 08:31:25 +0000 (09:31 +0100)]
git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting
They are applied after commit ordering and formatting options, in
particular --reverse.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Tue, 8 Mar 2011 08:31:24 +0000 (09:31 +0100)]
rev-list-options.txt: typo fix
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michal Rokos [Mon, 7 Mar 2011 12:13:15 +0000 (13:13 +0100)]
git-compat-util.h: Honor HP C's noreturn attribute
HP C for Integrity servers (Itanium) gained support for noreturn
attribute sometime in 2006. It was released in Compiler Version
A.06.10 and made available in July 2006.
The __HP_cc define detects the HP C compiler version. Precede the
__GNUC__ check so it works well when compiling with HP C using -Agcc
option that enables partial support for the GNU C dialect. The -Agcc
defines the __GNUC__ too.
Signed-off-by: Michal Rokos <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michal Rokos [Mon, 7 Mar 2011 11:43:11 +0000 (12:43 +0100)]
Makefile: add NO_FNMATCH_CASEFOLD to HP-UX section
fnmatch() on HP-UX does not support the GNU FNM_CASEFOLD extension,
so set NO_FNMATCH_CASEFOLD to use the internal fnmatch implementation.
Signed-off-by: Michal Rokos <redacted>
Signed-off-by: Junio C Hamano <redacted>
David Barr [Sun, 12 Dec 2010 02:41:38 +0000 (13:41 +1100)]
vcs-svn: use mark from previous import for parent commit
With this patch, overlapping incremental imports work.
Signed-off-by: David Barr <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Jonathan Nieder [Sat, 11 Dec 2010 23:08:51 +0000 (17:08 -0600)]
vcs-svn: handle filenames with dq correctly
Quote paths passed to fast-import so filenames with double quotes are
not misinterpreted.
One might imagine this could help with filenames with newlines, too,
but svn does not allow those.
Helped-by: David Barr <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: David Barr <redacted>
Signed-off-by: Jonathan Nieder <redacted>
David Barr [Sat, 11 Dec 2010 16:59:31 +0000 (03:59 +1100)]
vcs-svn: quote paths correctly for ls command
This bug was found while importing rev 601865 of ASF.
[jn: with test]
Signed-off-by: David Barr <redacted>
Signed-off-by: Jonathan Nieder <redacted>