Merge git://github.com/git-l10n/git-po
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Jun 2012 22:01:16 +0000 (15:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jun 2012 22:01:16 +0000 (15:01 -0700)
Updated Italian translations.

* git://github.com/git-l10n/git-po:
l10n: it.po: translate 212 new messages

contrib/completion/git-completion.bash
diff.c
perl/Makefile
perl/Makefile.PL
t/t4012-diff-binary.sh
t/t9501-gitweb-standalone-http-status.sh
t/t9902-completion.sh
index 1689f99539728c87c29cfa94a08ee9a67db3cce2..2e1b5e14b92fe61e02df94ab165c8aab6c06c9cb 100755 (executable)
@@ -846,6 +846,8 @@ __git_list_porcelain_commands ()
                checkout-index)   : plumbing;;
                commit-tree)      : plumbing;;
                count-objects)    : infrequent;;
+               credential-cache) : credentials helper;;
+               credential-store) : credentials helper;;
                cvsexportcommit)  : export;;
                cvsimport)        : import;;
                cvsserver)        : daemon;;
@@ -2597,7 +2599,7 @@ _git_whatchanged ()
        _git_log
 }
 
-_main_git ()
+__git_main ()
 {
        local i c=1 command __git_dir
 
@@ -2648,7 +2650,7 @@ _main_git ()
        fi
 }
 
-_main_gitk ()
+__gitk_main ()
 {
        __git_has_doubledash && return
 
@@ -2703,22 +2705,22 @@ __git_complete ()
 # wrapper for backwards compatibility
 _git ()
 {
-       __git_wrap_main_git
+       __git_wrap__git_main
 }
 
 # wrapper for backwards compatibility
 _gitk ()
 {
-       __git_wrap_main_gitk
+       __git_wrap__gitk_main
 }
 
-__git_complete git _main_git
-__git_complete gitk _main_gitk
+__git_complete git __git_main
+__git_complete gitk __gitk_main
 
 # The following are necessary only for Cygwin, and only are needed
 # when the user has tab-completed the executable name and consequently
 # included the '.exe' suffix.
 #
 if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
-__git_complete git.exe _main_git
+__git_complete git.exe __git_main
 fi
diff --git a/diff.c b/diff.c
index 77edd5086fff30af36e92a151377c285de21aca3..1a594df4f45bf0bc8409e871535f7ebd34684c6c 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1700,7 +1700,7 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option
                        continue;
                if (!data->files[i]->is_renamed && (added + deleted == 0)) {
                        total_files--;
-               } else {
+               } else if (!data->files[i]->is_binary) { /* don't count bytes */
                        adds += added;
                        dels += deleted;
                }
index 3e21766d8f08aacabb965adf73aabfeeaad9de7a..fe7a48646412b872d8db09bdef70de751399cad6 100644 (file)
@@ -2,6 +2,7 @@
 # Makefile for perl support modules and routine
 #
 makfile:=perl.mak
+modules =
 
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
 prefix_SQ = $(subst ','\'',$(prefix))
@@ -22,19 +23,35 @@ clean:
 
 ifdef NO_PERL_MAKEMAKER
 instdir_SQ = $(subst ','\'',$(prefix)/lib)
+
+modules += Git
+modules += Git/I18N
+modules += Git/SVN/Memoize/YAML
+modules += Git/SVN/Fetcher
+modules += Git/SVN/Editor
+modules += Git/SVN/Prompt
+modules += Git/SVN/Ra
+
 $(makfile): ../GIT-CFLAGS Makefile
        echo all: private-Error.pm Git.pm Git/I18N.pm > $@
-       echo '  mkdir -p blib/lib/Git' >> $@
-       echo '  $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
-       echo '  $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
+       echo '  mkdir -p blib/lib/Git/SVN/Memoize' >> $@
+       set -e; \
+       for i in $(modules); \
+       do \
+               echo '  $(RM) blib/lib/'$$i'.pm' >> $@; \
+               echo '  cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
+       done
        echo '  $(RM) blib/lib/Error.pm' >> $@
        '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
        echo '  cp private-Error.pm blib/lib/Error.pm' >> $@
        echo install: >> $@
-       echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
-       echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
-       echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
-       echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
+       echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git/SVN/Memoize"' >> $@
+       set -e; \
+       for i in $(modules); \
+       do \
+               echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+               echo '  cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+       done
        echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
        '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
        echo '  cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
index 2c20290fc38b17718f014f19dcb1c70f3f5826c5..b54b04a619b0aa338cae37ade9350bb52f2edd05 100644 (file)
@@ -24,6 +24,10 @@ endif
 MAKE_FRAG
 }
 
+# XXX. When editing this list:
+#
+# * Please update perl/Makefile, too.
+# * Don't forget to test with NO_PERL_MAKEMAKER=YesPlease
 my %pm = (
        'Git.pm' => '$(INST_LIBDIR)/Git.pm',
        'Git/I18N.pm' => '$(INST_LIBDIR)/Git/I18N.pm',
index 8b4e80de9627d9a8fa90a31edbe05c2c70f1d4b3..6cebb3951bc7f4e9b772efed052c485d82d1a68d 100755 (executable)
@@ -36,6 +36,18 @@ test_expect_success '"apply --stat" output for binary file change' '
        test_i18ncmp expected current
 '
 
+test_expect_success 'diff --shortstat output for binary file change' '
+       echo " 4 files changed, 2 insertions(+), 2 deletions(-)" >expected &&
+       git diff --shortstat >current &&
+       test_i18ncmp expected current
+'
+
+test_expect_success 'diff --shortstat output for binary file change only' '
+       echo " 1 file changed, 0 insertions(+), 0 deletions(-)" >expected &&
+       git diff --shortstat -- b >current &&
+       test_i18ncmp expected current
+'
+
 test_expect_success 'apply --numstat notices binary file change' '
        git diff >diff &&
        git apply --numstat <diff >current &&
index fa2f65f6be44fb7d6c4c22b9642b33cd90d51646..ef86948d21c3e62eed14ed6cb326d5d2fd9273cb 100755 (executable)
@@ -12,6 +12,13 @@ code and message.'
 
 . ./gitweb-lib.sh
 
+#
+# Gitweb only provides the functionality tested by the 'modification times'
+# tests if it can access a date parser from one of these modules:
+#
+perl -MHTTP::Date -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER
+perl -MTime::ParseDate -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER
+
 # ----------------------------------------------------------------------
 # snapshot settings
 
@@ -115,14 +122,14 @@ test_debug 'cat gitweb.output'
 # ----------------------------------------------------------------------
 # modification times (Last-Modified and If-Modified-Since)
 
-test_expect_success 'modification: feed last-modified' '
+test_expect_success DATE_PARSER 'modification: feed last-modified' '
        gitweb_run "p=.git;a=atom;h=master" &&
        grep "Status: 200 OK" gitweb.headers &&
        grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: feed if-modified-since (modified)' '
+test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)' '
        export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
        gitweb_run "p=.git;a=atom;h=master" &&
@@ -130,7 +137,7 @@ test_expect_success 'modification: feed if-modified-since (modified)' '
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: feed if-modified-since (unmodified)' '
+test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodified)' '
        export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
        gitweb_run "p=.git;a=atom;h=master" &&
@@ -138,14 +145,14 @@ test_expect_success 'modification: feed if-modified-since (unmodified)' '
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: snapshot last-modified' '
+test_expect_success DATE_PARSER 'modification: snapshot last-modified' '
        gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
        grep "Status: 200 OK" gitweb.headers &&
        grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: snapshot if-modified-since (modified)' '
+test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modified)' '
        export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
        gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
@@ -153,7 +160,7 @@ test_expect_success 'modification: snapshot if-modified-since (modified)' '
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: snapshot if-modified-since (unmodified)' '
+test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmodified)' '
        export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
        gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
@@ -161,7 +168,7 @@ test_expect_success 'modification: snapshot if-modified-since (unmodified)' '
 '
 test_debug 'cat gitweb.headers'
 
-test_expect_success 'modification: tree snapshot' '
+test_expect_success DATE_PARSER 'modification: tree snapshot' '
        ID=`git rev-parse --verify HEAD^{tree}` &&
        export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
index 9a80c60945839fa66fc3a0dc742a8f9ac977f9e1..256e6a0b3f3d001482cf0a21605f6a860d935d58 100755 (executable)
@@ -63,7 +63,7 @@ run_completion ()
        local _cword
        _words=( $1 )
        (( _cword = ${#_words[@]} - 1 ))
-       __git_wrap_main_git && print_comp
+       __git_wrap__git_main && print_comp
 }
 
 test_completion ()