diff options
-rw-r--r-- | Documentation/config.txt | 4 | ||||
-rw-r--r-- | Documentation/git-help.txt | 59 | ||||
-rw-r--r-- | Documentation/manpage-1.72.xsl | 6 | ||||
-rw-r--r-- | builtin-log.c | 6 | ||||
-rw-r--r-- | builtin-shortlog.c | 4 | ||||
-rw-r--r-- | commit.h | 4 | ||||
-rwxr-xr-x | contrib/workdir/git-new-workdir | 2 | ||||
-rwxr-xr-x | git-svn.perl | 3 | ||||
-rw-r--r-- | git.c | 2 | ||||
-rw-r--r-- | gitk-git/Makefile | 4 | ||||
-rw-r--r-- | gitk-git/gitk | 112 | ||||
-rw-r--r-- | gitk-git/po/it.po | 890 | ||||
-rw-r--r-- | help.c | 116 | ||||
-rw-r--r-- | log-tree.c | 15 | ||||
-rw-r--r-- | log-tree.h | 4 | ||||
-rw-r--r-- | pretty.c | 24 | ||||
-rw-r--r-- | sha1_name.c | 28 | ||||
-rwxr-xr-x | t/t4021-format-patch-signer-mime.sh | 10 | ||||
-rwxr-xr-x | t/t4028-format-patch-mime-headers.sh | 30 | ||||
-rwxr-xr-x | t/t4201-shortlog.sh | 5 | ||||
-rw-r--r-- | unpack-trees.c | 2 |
21 files changed, 1253 insertions, 77 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index ed2cb832b9..0865f4e01a 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -757,6 +757,10 @@ log.showroot:: Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which normally hide the root commit will now show it. True by default. +man.viewer:: + Specify the programs that may be used to display help in the + 'man' format. See linkgit:git-help[1]. + merge.summary:: Whether to include summaries of merged commits in newly created merge commit messages. False by default. diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index 0926dc12ba..be2ae53b90 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -33,17 +33,21 @@ OPTIONS option supersedes any other option. -i|--info:: - Use the 'info' program to display the manual page, instead of - the 'man' program that is used by default. + Display manual page for the command in the 'info' format. The + 'info' program will be used for that purpose. -m|--man:: - Use the 'man' program to display the manual page. This may be - used to override a value set in the 'help.format' - configuration variable. + Display manual page for the command in the 'man' format. This + option may be used to override a value set in the + 'help.format' configuration variable. ++ +By default the 'man' program will be used to display the manual page, +but the 'man.viewer' configuration variable may be used to choose +other display programs (see below). -w|--web:: - Use a web browser to display the HTML manual page, instead of - the 'man' program that is used by default. + Display manual page for the command in the 'web' (HTML) + format. A web browser will be used for that purpose. + The web browser can be specified using the configuration variable 'help.browser', or 'web.browser' if the former is not set. If none of @@ -54,6 +58,9 @@ linkgit:git-web--browse[1] for more information about this. CONFIGURATION VARIABLES ----------------------- +help.format +~~~~~~~~~~~ + If no command line option is passed, the 'help.format' configuration variable will be checked. The following values are supported for this variable; they make 'git-help' behave as their corresponding command @@ -61,15 +68,47 @@ line option: * "man" corresponds to '-m|--man', * "info" corresponds to '-i|--info', -* "web" or "html" correspond to '-w|--web', +* "web" or "html" correspond to '-w|--web'. + +help.browser, web.browser and browser.<tool>.path +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also be checked if the 'web' format is chosen (either by command line option or configuration variable). See '-w|--web' in the OPTIONS section above and linkgit:git-web--browse[1]. -Note that these configuration variables should probably be set using -the '--global' flag, for example like this: +man.viewer +~~~~~~~~~~ + +The 'man.viewer' config variable will be checked if the 'man' format +is chosen. Only the following values are currently supported: + +* "man": use the 'man' program as usual, +* "woman": use 'emacsclient' to launch the "woman" mode in emacs +(this only works starting with emacsclient versions 22), +* "konqueror": use a man KIO slave in konqueror. + +Multiple values may be given to this configuration variable. Their +corresponding programs will be tried in the order listed in the +configuration file. + +For example, this configuration: + + [man] + viewer = konqueror + viewer = woman + +will try to use konqueror first. But this may fail (for example if +DISPLAY is not set) and in that case emacs' woman mode will be tried. + +If everything fails the 'man' program will be tried anyway. + +Note about git config --global +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note that all these configuration variables should probably be set +using the '--global' flag, for example like this: ------------------------------------------------ $ git config --global help.format web diff --git a/Documentation/manpage-1.72.xsl b/Documentation/manpage-1.72.xsl index fe3cd72d6f..4065a3a27a 100644 --- a/Documentation/manpage-1.72.xsl +++ b/Documentation/manpage-1.72.xsl @@ -1,5 +1,9 @@ -<!-- callout.xsl: converts asciidoc callouts to man page format --> +<!-- Based on callouts.xsl. Fixes man page callouts for DocBook 1.72 XSL --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:param name="man.output.quietly" select="1"/> +<xsl:param name="refentry.meta.get.quietly" select="1"/> + <xsl:template match="co"> <xsl:value-of select="concat('▓fB(',substring-after(@id,'-'),')▓fR')"/> </xsl:template> diff --git a/builtin-log.c b/builtin-log.c index d983cbc7bc..5c00725f03 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -662,6 +662,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, int i; const char *encoding = "utf-8"; struct diff_options opts; + int need_8bit_cte = 0; if (rev->commit_format != CMIT_FMT_EMAIL) die("Cover letter needs email format"); @@ -672,7 +673,8 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, head_sha1 = sha1_to_hex(head->object.sha1); - log_write_email_headers(rev, head_sha1, &subject_start, &extra_headers); + log_write_email_headers(rev, head_sha1, &subject_start, &extra_headers, + &need_8bit_cte); committer = git_committer_info(0); @@ -681,7 +683,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, pp_user_info(NULL, CMIT_FMT_EMAIL, &sb, committer, DATE_RFC2822, encoding); pp_title_line(CMIT_FMT_EMAIL, &msg, &sb, subject_start, extra_headers, - encoding, 0); + encoding, need_8bit_cte); pp_remainder(CMIT_FMT_EMAIL, &msg, &sb, 0); printf("%s\n", sb.buf); diff --git a/builtin-shortlog.c b/builtin-shortlog.c index b22b0edd65..bd795b1db7 100644 --- a/builtin-shortlog.c +++ b/builtin-shortlog.c @@ -229,7 +229,9 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) { struct shortlog log; struct rev_info rev; + int nongit; + prefix = setup_git_directory_gently(&nongit); shortlog_init(&log); /* since -n is a shadowed rev argument, parse our args first */ @@ -259,7 +261,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) die ("unrecognized argument: %s", argv[1]); /* assume HEAD if from a tty */ - if (!rev.pending.nr && isatty(0)) + if (!nongit && !rev.pending.nr && isatty(0)) add_head_to_pending(&rev); if (rev.pending.nr == 0) { read_from_stdin(&log); @@ -70,7 +70,7 @@ extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit*, struct strbuf *, int abbrev, const char *subject, const char *after_subject, enum date_mode, - int non_ascii_present); + int need_8bit_cte); void pp_user_info(const char *what, enum cmit_fmt fmt, struct strbuf *sb, const char *line, enum date_mode dmode, const char *encoding); @@ -80,7 +80,7 @@ void pp_title_line(enum cmit_fmt fmt, const char *subject, const char *after_subject, const char *encoding, - int plain_non_ascii); + int need_8bit_cte); void pp_remainder(enum cmit_fmt fmt, const char **msg_p, struct strbuf *sb, diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir index 2838546d16..7959eab902 100755 --- a/contrib/workdir/git-new-workdir +++ b/contrib/workdir/git-new-workdir @@ -63,7 +63,7 @@ mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!" # create the links to the original repo. explictly exclude index, HEAD and # logs/HEAD from the list since they are purely related to the current working # directory, and should not be shared. -for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache +for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn do case $x in */*) diff --git a/git-svn.perl b/git-svn.perl index d8b38c9a47..bba22c1321 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -958,9 +958,10 @@ sub complete_url_ls_init { "wanted to set to: $gs->{url}\n"; } command_oneline('config', $k, $gs->{url}) unless $orig_url; - my $remote_path = "$ra->{svn_path}/$repo_path/*"; + my $remote_path = "$ra->{svn_path}/$repo_path"; $remote_path =~ s#/+#/#g; $remote_path =~ s#^/##g; + $remote_path .= "/*" if $remote_path !~ /\*/; my ($n) = ($switch =~ /^--(\w+)/); if (length $pfx && $pfx !~ m#/$#) { die "--prefix='$pfx' must have a trailing slash '/'\n"; @@ -343,7 +343,7 @@ static void handle_internal_command(int argc, const char **argv) { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, { "rm", cmd_rm, RUN_SETUP }, { "send-pack", cmd_send_pack, RUN_SETUP }, - { "shortlog", cmd_shortlog, RUN_SETUP | USE_PAGER }, + { "shortlog", cmd_shortlog, USE_PAGER }, { "show-branch", cmd_show_branch, RUN_SETUP }, { "show", cmd_show, RUN_SETUP | USE_PAGER }, { "status", cmd_status, RUN_SETUP | NEED_WORK_TREE }, diff --git a/gitk-git/Makefile b/gitk-git/Makefile index ae2b80b108..f90dfabffa 100644 --- a/gitk-git/Makefile +++ b/gitk-git/Makefile @@ -8,6 +8,7 @@ gitk_libdir ?= $(sharedir)/gitk/lib msgsdir ?= $(gitk_libdir)/msgs msgsdir_SQ = $(subst ','\'',$(msgsdir)) +TCL_PATH ?= tclsh TCLTK_PATH ?= wish INSTALL ?= install RM ?= rm -f @@ -22,6 +23,9 @@ ifdef NO_MSGFMT MSGFMT ?= $(TCL_PATH) po/po2msg.sh else MSGFMT ?= msgfmt + ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) + MSGFMT := $(TCL_PATH) po/po2msg.sh + endif endif PO_TEMPLATE = po/gitk.pot diff --git a/gitk-git/gitk b/gitk-git/gitk index f1f21e97bf..84ab02e15f 100644 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -82,7 +82,7 @@ proc dorunq {} { proc start_rev_list {view} { global startmsecs global commfd leftover tclencoding datemode - global viewargs viewfiles commitidx viewcomplete vnextroot + global viewargs viewargscmd viewfiles commitidx viewcomplete vnextroot global showlocalchanges commitinterest mainheadid global progressdirn progresscoords proglastnc curview @@ -90,13 +90,23 @@ proc start_rev_list {view} { set commitidx($view) 0 set viewcomplete($view) 0 set vnextroot($view) 0 + set args $viewargs($view) + if {$viewargscmd($view) ne {}} { + if {[catch { + set str [exec sh -c $viewargscmd($view)] + } err]} { + error_popup "Error executing --argscmd command: $err" + exit 1 + } + set args [concat $args [split $str "\n"]] + } set order "--topo-order" if {$datemode} { set order "--date-order" } if {[catch { set fd [open [concat | git log --no-color -z --pretty=raw $order --parents \ - --boundary $viewargs($view) "--" $viewfiles($view)] r] + --boundary $args "--" $viewfiles($view)] r] } err]} { error_popup "[mc "Error executing git rev-list:"] $err" exit 1 @@ -393,6 +403,9 @@ proc readcommit {id} { proc updatecommits {} { global viewdata curview phase displayorder ordertok idpending global children commitrow selectedline thickerline showneartags + global isworktree + + set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}] if {$phase ne {}} { stop_rev_list @@ -827,6 +840,7 @@ proc makewindow {} { } frame .bleft.top frame .bleft.mid + frame .bleft.bottom button .bleft.top.search -text [mc "Search"] -command dosearch pack .bleft.top.search -side left -padx 5 @@ -854,18 +868,25 @@ proc makewindow {} { checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \ -command changeignorespace -variable ignorespace pack .bleft.mid.ignspace -side left -padx 5 - set ctext .bleft.ctext + set ctext .bleft.bottom.ctext text $ctext -background $bgcolor -foreground $fgcolor \ -state disabled -font textfont \ - -yscrollcommand scrolltext -wrap none + -yscrollcommand scrolltext -wrap none \ + -xscrollcommand ".bleft.bottom.sbhorizontal set" if {$have_tk85} { $ctext conf -tabstyle wordprocessor } - scrollbar .bleft.sb -command "$ctext yview" + scrollbar .bleft.bottom.sb -command "$ctext yview" + scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h \ + -width 10 pack .bleft.top -side top -fill x pack .bleft.mid -side top -fill x - pack .bleft.sb -side right -fill y - pack $ctext -side left -fill both -expand 1 + grid $ctext .bleft.bottom.sb -sticky nsew + grid .bleft.bottom.sbhorizontal -sticky ew + grid columnconfigure .bleft.bottom 0 -weight 1 + grid rowconfigure .bleft.bottom 0 -weight 1 + grid rowconfigure .bleft.bottom 1 -weight 0 + pack .bleft.bottom -side top -fill both -expand 1 lappend bglist $ctext lappend fglist $ctext @@ -930,9 +951,17 @@ proc makewindow {} { .pwbottom add .bright .ctop add .pwbottom - # restore window position if known + # restore window width & height if known if {[info exists geometry(main)]} { - wm geometry . "$geometry(main)" + if {[scan $geometry(main) "%dx%d" w h] >= 2} { + if {$w > [winfo screenwidth .]} { + set w [winfo screenwidth .] + } + if {$h > [winfo screenheight .]} { + set h [winfo screenheight .] + } + wm geometry . "${w}x$h" + } } if {[tk windowingsystem] eq {aqua}} { @@ -1160,9 +1189,10 @@ proc savestuff {w} { global canv canv2 canv3 mainfont textfont uifont tabstop global stuffsaved findmergefiles maxgraphpct global maxwidth showneartags showlocalchanges - global viewname viewfiles viewargs viewperm nextviewnum + global viewname viewfiles viewargs viewargscmd viewperm nextviewnum global cmitmode wrapcomment datetimeformat limitdiffs global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor + global autoselect if {$stuffsaved} return if {![winfo viewable .]} return @@ -1177,6 +1207,7 @@ proc savestuff {w} { puts $f [list set maxwidth $maxwidth] puts $f [list set cmitmode $cmitmode] puts $f [list set wrapcomment $wrapcomment] + puts $f [list set autoselect $autoselect] puts $f [list set showneartags $showneartags] puts $f [list set showlocalchanges $showlocalchanges] puts $f [list set datetimeformat $datetimeformat] @@ -1199,7 +1230,7 @@ proc savestuff {w} { puts -nonewline $f "set permviews {" for {set v 0} {$v < $nextviewnum} {incr v} { if {$viewperm($v)} { - puts $f "{[list $viewname($v) $viewfiles($v) $viewargs($v)]}" + puts $f "{[list $viewname($v) $viewfiles($v) $viewargs($v) $viewargscmd($v)]}" } } puts $f "}" @@ -1850,7 +1881,7 @@ proc shellsplit {str} { proc newview {ishighlight} { global nextviewnum newviewname newviewperm newishighlight - global newviewargs revtreeargs + global newviewargs revtreeargs viewargscmd newviewargscmd curview set newishighlight $ishighlight set top .gitkview @@ -1858,16 +1889,17 @@ proc newview {ishighlight} { raise $top return } - set newviewname($nextviewnum) "View $nextviewnum" + set newviewname($nextviewnum) "[mc "View"] $nextviewnum" set newviewperm($nextviewnum) 0 set newviewargs($nextviewnum) [shellarglist $revtreeargs] + set newviewargscmd($nextviewnum) $viewargscmd($curview) vieweditor $top $nextviewnum [mc "Gitk view definition"] } proc editview {} { global curview global viewname viewperm newviewname newviewperm - global viewargs newviewargs + global viewargs newviewargs viewargscmd newviewargscmd set top .gitkvedit-$curview if {[winfo exists $top]} { @@ -1877,6 +1909,7 @@ proc editview {} { set newviewname($curview) $viewname($curview) set newviewperm($curview) $viewperm($curview) set newviewargs($curview) [shellarglist $viewargs($curview)] + set newviewargscmd($curview) $viewargscmd($curview) vieweditor $top $curview "Gitk: edit view $viewname($curview)" } @@ -1897,6 +1930,14 @@ proc vieweditor {top n title} { entry $top.args -width 50 -textvariable newviewargs($n) \ -background $bgcolor grid $top.args - -sticky ew -padx 5 + + message $top.ac -aspect 1000 \ + -text [mc "Command to generate more commits to include:"] + grid $top.ac - -sticky w -pady 5 + entry $top.argscmd -width 50 -textvariable newviewargscmd($n) \ + -background white + grid $top.argscmd - -sticky ew -padx 5 + message $top.l -aspect 1000 \ -text [mc "Enter files and directories to include, one per line:"] grid $top.l - -sticky w @@ -1940,7 +1981,7 @@ proc allviewmenus {n op args} { proc newviewok {top n} { global nextviewnum newviewperm newviewname newishighlight global viewname viewfiles viewperm selectedview curview - global viewargs newviewargs viewhlmenu + global viewargs newviewargs viewargscmd newviewargscmd viewhlmenu if {[catch { set newargs [shellsplit $newviewargs($n)] @@ -1964,6 +2005,7 @@ proc newviewok {top n} { set viewperm($n) $newviewperm($n) set viewfiles($n) $files set viewargs($n) $newargs + set viewargscmd($n) $newviewargscmd($n) addviewmenu $n if {!$newishighlight} { run showview $n @@ -1980,9 +2022,11 @@ proc newviewok {top n} { # doviewmenu $viewhlmenu 1 [list addvhighlight $n] \ # entryconf [list -label $viewname($n) -value $viewname($n)] } - if {$files ne $viewfiles($n) || $newargs ne $viewargs($n)} { + if {$files ne $viewfiles($n) || $newargs ne $viewargs($n) || \ + $newviewargscmd($n) ne $viewargscmd($n)} { set viewfiles($n) $files set viewargs($n) $newargs + set viewargscmd($n) $newviewargscmd($n) if {$curview == $n} { run updatecommits } @@ -2058,8 +2102,6 @@ proc showview {n} { set ybot [expr {[lindex $span 1] * $ymax}] if {$ytop < $y && $y < $ybot} { set yscreen [expr {$y - $ytop}] - } else { - set yscreen [expr {($ybot - $ytop) / 2}] } } elseif {[info exists pending_select]} { set selid $pending_select @@ -2120,7 +2162,7 @@ proc showview {n} { set yf 0 set row {} set selectfirst 0 - if {$selid ne {} && [info exists commitrow($n,$selid)]} { + if {[info exists yscreen] && [info exists commitrow($n,$selid)]} { set row $commitrow($n,$selid) # try to get the selected row in the same position on the screen set ymax [lindex [$canv cget -scrollregion] 3] @@ -2844,8 +2886,9 @@ proc dohidelocalchanges {} { # spawn off a process to do git diff-index --cached HEAD proc dodiffindex {} { global localirow localfrow lserial showlocalchanges + global isworktree - if {!$showlocalchanges} return + if {!$showlocalchanges || !$isworktree} return incr lserial set localfrow -1 set localirow -1 @@ -4650,6 +4693,7 @@ proc selectline {l isnew} { global commentend idtags linknum global mergemax numcommits pending_select global cmitmode showneartags allcommits + global autoselect catch {unset pending_select} $canv delete hover @@ -4705,8 +4749,10 @@ proc selectline {l isnew} { set currentid $id $sha1entry delete 0 end $sha1entry insert 0 $id - $sha1entry selection from 0 - $sha1entry selection to end + if {$autoselect} { + $sha1entry selection from 0 + $sha1entry selection to end + } rhighlight_sel $id $ctext conf -state normal @@ -5604,7 +5650,7 @@ proc searchmarkvisible {doall} { proc scrolltext {f0 f1} { global searchstring - .bleft.sb set $f0 $f1 + .bleft.bottom.sb set $f0 $f1 if {$searchstring ne {}} { searchmarkvisible 0 } @@ -7943,7 +7989,7 @@ proc doprefs {} { global maxwidth maxgraphpct global oldprefs prefstop showneartags showlocalchanges global bgcolor fgcolor ctext diffcolors selectbgcolor - global tabstop limitdiffs + global tabstop limitdiffs autoselect set top .gitkprefs set prefstop $top @@ -7973,6 +8019,11 @@ proc doprefs {} { checkbutton $top.showlocal.b -variable showlocalchanges pack $top.showlocal.b $top.showlocal.l -side left grid x $top.showlocal -sticky w + frame $top.autoselect + label $top.autoselect.l -text [mc "Auto-select SHA1"] -font optionfont + checkbutton $top.autoselect.b -variable autoselect + pack $top.autoselect.b $top.autoselect.l -side left + grid x $top.autoselect -sticky w label $top.ddisp -text [mc "Diff display options"] grid $top.ddisp - -sticky w -pady 10 @@ -8463,6 +8514,7 @@ set maxlinelen 200 set showlocalchanges 1 set limitdiffs 1 set datetimeformat "%Y-%m-%d %H:%M:%S" +set autoselect 1 set colors {green red blue magenta darkgrey brown orange} set bgcolor white @@ -8522,8 +8574,9 @@ set mergeonly 0 set revtreeargs {} set cmdline_files {} set i 0 +set revtreeargscmd {} foreach arg $argv { - switch -- $arg { + switch -glob -- $arg { "" { } "-d" { set datemode 1 } "--merge" { @@ -8534,6 +8587,9 @@ foreach arg $argv { set cmdline_files [lrange $argv [expr {$i + 1}] end] break } + "--argscmd=*" { + set revtreeargscmd [string range $arg 10 end] + } default { lappend revtreeargs $arg } @@ -8635,6 +8691,7 @@ set highlight_files {} set viewfiles(0) {} set viewperm(0) 0 set viewargs(0) {} +set viewargscmd(0) {} set cmdlineok 0 set stopped 0 @@ -8643,6 +8700,7 @@ set patchnum 0 set localirow -1 set localfrow -1 set lserial 0 +set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}] setcoords makewindow # wait for the window to become visible @@ -8650,7 +8708,7 @@ tkwait visibility . wm title . "[file tail $argv0]: [file tail [pwd]]" readrefs -if {$cmdline_files ne {} || $revtreeargs ne {}} { +if {$cmdline_files ne {} || $revtreeargs ne {} || $revtreeargscmd ne {}} { # create a view for the files/dirs specified on the command line set curview 1 set selectedview 1 @@ -8658,6 +8716,7 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} { set viewname(1) [mc "Command line"] set viewfiles(1) $cmdline_files set viewargs(1) $revtreeargs + set viewargscmd(1) $revtreeargscmd set viewperm(1) 0 addviewmenu 1 .bar.view entryconf [mc "Edit view..."] -state normal @@ -8671,6 +8730,7 @@ if {[info exists permviews]} { set viewname($n) [lindex $v 0] set viewfiles($n) [lindex $v 1] set viewargs($n) [lindex $v 2] + set viewargscmd($n) [lindex $v 3] set viewperm($n) 1 addviewmenu $n } diff --git a/gitk-git/po/it.po b/gitk-git/po/it.po new file mode 100644 index 0000000000..d0f4c2e19a --- /dev/null +++ b/gitk-git/po/it.po @@ -0,0 +1,890 @@ +# Translation of gitk +# Copyright (C) 2005-2008 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# Michele Ballabio <barra_cuda@katamail.com>, 2008. +# +# +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-03-13 17:29+0100\n" +"PO-Revision-Date: 2008-03-13 17:34+0100\n" +"Last-Translator: Michele Ballabio <barra_cuda@katamail.com>\n" +"Language-Team: Italian\n" +"MIME-Version: 1.0\n" +"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:124 +msgid "Reading" +msgstr "Lettura in corso" + +#: gitk:151 gitk:2191 +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 +msgid "No commits selected" +msgstr "Nessuna revisione selezionata" + +#: gitk:500 +msgid "No commit information available" +msgstr "Nessuna informazione disponibile sulle revisioni" + +#: gitk:599 gitk:621 gitk:1955 gitk:6423 gitk:7923 gitk:8082 +msgid "OK" +msgstr "OK" + +#: gitk:623 gitk:1956 gitk:6107 gitk:6178 gitk:6275 gitk:6321 gitk:6425 +#: gitk:7924 gitk:8083 +msgid "Cancel" +msgstr "Annulla" + +#: gitk:661 +msgid "File" +msgstr "File" + +#: gitk:663 +msgid "Update" +msgstr "Aggiorna" + +#: gitk:664 +msgid "Reread references" +msgstr "Rileggi riferimenti" + +#: gitk:665 +msgid "List references" +msgstr "Elenca riferimenti" + +#: gitk:666 +msgid "Quit" +msgstr "Esci" + +#: gitk:668 +msgid "Edit" +msgstr "Modifica" + +#: gitk:669 +msgid "Preferences" +msgstr "Preferenze" + +#: gitk:672 gitk:1892 +msgid "View" +msgstr "Vista" + +#: gitk:673 +msgid "New view..." +msgstr "Nuova vista..." + +#: gitk:674 gitk:2133 gitk:8722 +msgid "Edit view..." +msgstr "Modifica vista..." + +#: gitk:676 gitk:2134 gitk:8723 +msgid "Delete view" +msgstr "Elimina vista" + +#: gitk:678 +msgid "All files" +msgstr "Tutti i file" + +#: gitk:682 +msgid "Help" +msgstr "Aiuto" + +#: gitk:683 gitk:1317 +msgid "About gitk" +msgstr "Informazioni su gitk" + +#: gitk:684 +msgid "Key bindings" +msgstr "Scorciatoie da tastiera" + +#: gitk:741 +msgid "SHA1 ID: " +msgstr "SHA1 ID: " + +#: gitk:791 +msgid "Find" +msgstr "Trova" + +#: gitk:792 +msgid "next" +msgstr "succ" + +#: gitk:793 +msgid "prev" +msgstr "prec" + +#: gitk:794 +msgid "commit" +msgstr "revisione" + +#: gitk:797 gitk:799 gitk:2356 gitk:2379 gitk:2403 gitk:4306 gitk:4369 +msgid "containing:" +msgstr "contenente:" + +#: gitk:800 gitk:1778 gitk:1783 gitk:2431 +msgid "touching paths:" +msgstr "che riguarda i percorsi:" + +#: gitk:801 gitk:2436 +msgid "adding/removing string:" +msgstr "che aggiunge/rimuove la stringa:" + +#: gitk:810 gitk:812 +msgid "Exact" +msgstr "Esatto" + +#: gitk:812 gitk:2514 gitk:4274 +msgid "IgnCase" +msgstr "" + +#: gitk:812 gitk:2405 gitk:2512 gitk:4270 +msgid "Regexp" +msgstr "" + +#: gitk:814 gitk:815 gitk:2533 gitk:2563 gitk:2570 gitk:4380 gitk:4436 +msgid "All fields" +msgstr "Tutti i campi" + +#: gitk:815 gitk:2531 gitk:2563 gitk:4336 +msgid "Headline" +msgstr "Titolo" + +#: gitk:816 gitk:2531 gitk:4336 gitk:4436 gitk:4827 +msgid "Comments" +msgstr "Commenti" + +#: gitk:816 gitk:2531 gitk:2535 gitk:2570 gitk:4336 gitk:4763 gitk:5956 +#: gitk:5971 +msgid "Author" +msgstr "Autore" + +#: gitk:816 gitk:2531 gitk:4336 gitk:4765 +msgid "Committer" +msgstr "Revisione creata da" + +#: gitk:845 +msgid "Search" +msgstr "Cerca" + +#: gitk:852 +msgid "Diff" +msgstr "" + +#: gitk:854 +msgid "Old version" +msgstr "Vecchia versione" + +#: gitk:856 +msgid "New version" +msgstr "Nuova versione" + +#: gitk:858 +msgid "Lines of context" +msgstr "Linee di contesto" + +#: gitk:868 +msgid "Ignore space change" +msgstr "Ignora modifiche agli spazi" + +#: gitk:926 +msgid "Patch" +msgstr "Modifiche" + +#: gitk:928 +msgid "Tree" +msgstr "Directory" + +#: gitk:1053 gitk:1068 gitk:6022 +msgid "Diff this -> selected" +msgstr "Diff questo -> selezionato" + +#: gitk:1055 gitk:1070 gitk:6023 +msgid "Diff selected -> this" +msgstr "Diff selezionato -> questo" + +#: gitk:1057 gitk:1072 gitk:6024 +msgid "Make patch" +msgstr "Crea patch" + +#: gitk:1058 gitk:6162 +msgid "Create tag" +msgstr "Crea etichetta" + +#: gitk:1059 gitk:6255 +msgid "Write commit to file" +msgstr "Scrivi revisione in un file" + +#: gitk:1060 gitk:6309 +msgid "Create new branch" +msgstr "Crea un nuovo ramo" + +#: gitk:1061 +msgid "Cherry-pick this commit" +msgstr "Porta questa revisione in cima al ramo attuale" + +#: gitk:1063 +msgid "Reset HEAD branch to here" +msgstr "Aggiorna il ramo HEAD a questa revisione" + +#: gitk:1079 +msgid "Check out this branch" +msgstr "Attiva questo ramo" + +#: gitk:1081 +msgid "Remove this branch" +msgstr "Elimina questo ramo" + +#: gitk:1087 +msgid "Highlight this too" +msgstr "Evidenzia anche questo" + +#: gitk:1089 +msgid "Highlight this only" +msgstr "Evidenzia solo questo" + +#: gitk:1318 +msgid "" +"\n" +"Gitk - a commit viewer for git\n" +"\n" +"Copyright © 2005-2006 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" +"\n" +"Utilizzo e redistribuzione permessi sotto i termini della GNU General Public " +"License" + +#: gitk:1326 gitk:1387 gitk:6581 +msgid "Close" +msgstr "Chiudi" + +#: gitk:1345 +msgid "Gitk key bindings" +msgstr "Scorciatoie da tastiera di Gitk" + +#: gitk:1347 +msgid "Gitk key bindings:" +msgstr "Scorciatoie da tastiera di Gitk:" + +#: gitk:1349 +#, tcl-format +msgid "<%s-Q>\t\tQuit" +msgstr "<%s-Q>\t\tEsci" + +#: gitk:1350 +msgid "<Home>\t\tMove to first commit" +msgstr "<Home>\t\tVai alla prima revisione" + +#: gitk:1351 +msgid "<End>\t\tMove to last commit" +msgstr "<End>\t\tVai all'ultima revisione" + +#: gitk:1352 +msgid "<Up>, p, i\tMove up one commit" +msgstr "<Up>, p, i\tVai più in alto di una revisione" + +#: gitk:1353 +msgid "<Down>, n, k\tMove down one commit" +msgstr "<Down>, n, k\tVai più in basso di una revisione" + +#: gitk:1354 +msgid "<Left>, z, j\tGo back in history list" +msgstr "<Left>, z, j\tTorna indietro nella cronologia" + +#: gitk:1355 +msgid "<Right>, x, l\tGo forward in history list" +msgstr "<Right>, x, l\tVai avanti nella cronologia" + +#: gitk:1356 +msgid "<PageUp>\tMove up one page in commit list" +msgstr "<PageUp>\tVai più in alto di una pagina nella lista delle revisioni" + +#: gitk:1357 +msgid "<PageDown>\tMove down one page in commit list" +msgstr "<PageDown>\tVai più in basso di una pagina nella lista delle revisioni" + +#: gitk:1358 +#, tcl-format +msgid "<%s-Home>\tScroll to top of commit list" +msgstr "<%s-Home>\tScorri alla cima della lista delle revisioni" + +#: gitk:1359 +#, tcl-format +msgid "<%s-End>\tScroll to bottom of commit list" +msgstr "<%s-End>\tScorri alla fine della lista delle revisioni" + +#: gitk:1360 +#, 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 +#, 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 +#, 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 +#, 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 +msgid "<Shift-Up>\tFind backwards (upwards, later commits)" +msgstr "<Shift-Up>\tTrova all'indietro (verso l'alto, revisioni successive)" + +#: gitk:1365 +msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" +msgstr "<Shift-Down>\tTrova in avanti (verso il basso, revisioni precedenti)" + +#: gitk:1366 +msgid "<Delete>, b\tScroll diff view up one page" +msgstr "<Delete>, b\tScorri la vista delle differenze in alto di una pagina" + +#: gitk:1367 +msgid "<Backspace>\tScroll diff view up one page" +msgstr "<Backspace>\tScorri la vista delle differenze in alto di una pagina" + +#: gitk:1368 +msgid "<Space>\t\tScroll diff view down one page" +msgstr "<Space>\t\tScorri la vista delle differenze in basso di una pagina" + +#: gitk:1369 +msgid "u\t\tScroll diff view up 18 lines" +msgstr "u\t\tScorri la vista delle differenze in alto di 18 linee" + +#: gitk:1370 +msgid "d\t\tScroll diff view down 18 lines" +msgstr "d\t\tScorri la vista delle differenze in basso di 18 linee" + +#: gitk:1371 +#, tcl-format +msgid "<%s-F>\t\tFind" +msgstr "<%s-F>\t\tTrova" + +#: gitk:1372 +#, tcl-format +msgid "<%s-G>\t\tMove to next find hit" +msgstr "<%s-G>\t\tTrova in avanti" + +#: gitk:1373 +msgid "<Return>\tMove to next find hit" +msgstr "<Return>\tTrova in avanti" + +#: gitk:1374 +msgid "/\t\tMove to next find hit, or redo find" +msgstr "/\t\tTrova in avanti, o cerca di nuovo" + +#: gitk:1375 +msgid "?\t\tMove to previous find hit" +msgstr "?\t\tTrova all'indietro" + +#: gitk:1376 +msgid "f\t\tScroll diff view to next file" +msgstr "f\t\tScorri la vista delle differenze al file successivo" + +#: gitk:1377 +#, 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 +#, 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 +#, tcl-format +msgid "<%s-KP+>\tIncrease font size" +msgstr "<%s-KP+>\tAumenta grandezza carattere" + +#: gitk:1380 +#, tcl-format +msgid "<%s-plus>\tIncrease font size" +msgstr "<%s-plus>\tAumenta grandezza carattere" + +#: gitk:1381 +#, tcl-format +msgid "<%s-KP->\tDecrease font size" +msgstr "<%s-KP->\tDiminuisci grandezza carattere" + +#: gitk:1382 +#, tcl-format +msgid "<%s-minus>\tDecrease font size" +msgstr "<%s-minus>\tDiminuisci grandezza carattere" + +#: gitk:1383 +msgid "<F5>\t\tUpdate" +msgstr "<F5>\t\tAggiorna" + +#: gitk:1896 +msgid "Gitk view definition" +msgstr "Scelta vista Gitk" + +#: gitk:1921 +msgid "Name" +msgstr "Nome" + +#: gitk:1924 +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:1935 +msgid "Command to generate more commits to include:" +msgstr "Comando che genera altre revisioni da visualizzare:" + +#: gitk:1942 +msgid "Enter files and directories to include, one per line:" +msgstr "Inserire file e directory da includere, uno per riga:" + +#: gitk:1989 +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 +msgid "None" +msgstr "Nessuno" + +#: gitk:2531 gitk:4336 gitk:5958 gitk:5973 +msgid "Date" +msgstr "Data" + +#: gitk:2531 gitk:4336 +msgid "CDate" +msgstr "" + +#: gitk:2680 gitk:2685 +msgid "Descendant" +msgstr "Discendente" + +#: gitk:2681 +msgid "Not descendant" +msgstr "Non discendente" + +#: gitk:2688 gitk:2693 +msgid "Ancestor" +msgstr "Ascendente" + +#: gitk:2689 +msgid "Not ancestor" +msgstr "Non ascendente" + +#: gitk:2924 +msgid "Local changes checked in to index but not committed" +msgstr "Modifiche locali presenti nell'indice ma non nell'archivio" + +#: gitk:2954 +msgid "Local uncommitted changes, not checked in to index" +msgstr "Modifiche locali non presenti né nell'archivio né nell'indice" + +#: gitk:4305 +msgid "Searching" +msgstr "Ricerca in corso" + +#: gitk:4767 +msgid "Tags:" +msgstr "Etichette:" + +#: gitk:4784 gitk:4790 gitk:5951 +msgid "Parent" +msgstr "Genitore" + +#: gitk:4795 +msgid "Child" +msgstr "Figlio" + +#: gitk:4804 +msgid "Branch" +msgstr "Ramo" + +#: gitk:4807 +msgid "Follows" +msgstr "Segue" + +#: gitk:4810 +msgid "Precedes" +msgstr "Precede" + +#: gitk:5093 +msgid "Error getting merge diffs:" +msgstr "Errore nella lettura delle differenze di fusione:" + +#: gitk:5778 +msgid "Goto:" +msgstr "Vai a:" + +#: gitk:5780 +msgid "SHA1 ID:" +msgstr "SHA1 ID:" + +#: gitk:5805 +#, tcl-format +msgid "Short SHA1 id %s is ambiguous" +msgstr "La SHA1 id abbreviata %s è ambigua" + +#: gitk:5817 +#, tcl-format +msgid "SHA1 id %s is not known" +msgstr "La SHA1 id %s è sconosciuta" + +#: gitk:5819 +#, tcl-format +msgid "Tag/Head %s is not known" +msgstr "L'etichetta/ramo %s è sconosciuto" + +#: gitk:5961 +msgid "Children" +msgstr "Figli" + +#: gitk:6018 +#, tcl-format +msgid "Reset %s branch to here" +msgstr "Aggiorna il ramo %s a questa revisione" + +#: gitk:6049 +msgid "Top" +msgstr "Inizio" + +#: gitk:6050 +msgid "From" +msgstr "Da" + +#: gitk:6055 +msgid "To" +msgstr "A" + +#: gitk:6078 +msgid "Generate patch" +msgstr "Genera patch" + +#: gitk:6080 +msgid "From:" +msgstr "Da:" + +#: gitk:6089 +msgid "To:" +msgstr "A:" + +#: gitk:6098 +msgid "Reverse" +msgstr "Inverti" + +#: gitk:6100 gitk:6269 +msgid "Output file:" +msgstr "Scrivi sul file:" + +#: gitk:6106 +msgid "Generate" +msgstr "Genera" + +#: gitk:6142 +msgid "Error creating patch:" +msgstr "Errore nella creazione della patch:" + +#: gitk:6164 gitk:6257 gitk:6311 +msgid "ID:" +msgstr "ID:" + +#: gitk:6173 +msgid "Tag name:" +msgstr "Nome etichetta:" + +#: gitk:6177 gitk:6320 +msgid "Create" +msgstr "Crea" + +#: gitk:6192 +msgid "No tag name specified" +msgstr "Nessuna etichetta specificata" + +#: gitk:6196 +#, tcl-format +msgid "Tag \"%s\" already exists" +msgstr "L'etichetta \"%s\" esiste già" + +#: gitk:6202 +msgid "Error creating tag:" +msgstr "Errore nella creazione dell'etichetta:" + +#: gitk:6266 +msgid "Command:" +msgstr "Comando:" + +#: gitk:6274 +msgid "Write" +msgstr "Scrivi" + +#: gitk:6290 +msgid "Error writing commit:" +msgstr "Errore nella scrittura della revisione:" + +#: gitk:6316 +msgid "Name:" +msgstr "Nome:" + +#: gitk:6335 +msgid "Please specify a name for the new branch" +msgstr "Specificare un nome per il nuovo ramo" + +#: gitk:6364 +#, 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 +msgid "Cherry-picking" +msgstr "" + +#: gitk:6381 +msgid "No changes committed" +msgstr "Nessuna modifica archiviata" + +#: gitk:6404 +msgid "Confirm reset" +msgstr "Conferma git reset" + +#: gitk:6406 +#, tcl-format +msgid "Reset branch %s to %s?" +msgstr "Aggiornare il ramo %s a %s?" + +#: gitk:6410 +msgid "Reset type:" +msgstr "Tipo di aggiornamento:" + +#: gitk:6414 +msgid "Soft: Leave working tree and index untouched" +msgstr "Soft: Lascia la direcory di lavoro e l'indice come sono" + +#: gitk:6417 +msgid "Mixed: Leave working tree untouched, reset index" +msgstr "Mixed: Lascia la directory di lavoro come è, aggiorna l'indice" + +#: gitk:6420 +msgid "" +"Hard: Reset working tree and index\n" +"(discard ALL local changes)" +msgstr "" +"Hard: Aggiorna la directory di lavoro e l'indice\n" +"(abbandona TUTTE le modifiche locali)" + +#: gitk:6436 +msgid "Resetting" +msgstr "git reset in corso" + +#: gitk:6493 +msgid "Checking out" +msgstr "Attivazione in corso" + +#: gitk:6523 +msgid "Cannot delete the currently checked-out branch" +msgstr "Impossibile cancellare il ramo attualmente attivo" + +#: gitk:6529 +#, tcl-format +msgid "" +"The commits on branch %s aren't on any other branch.\n" +"Really delete branch %s?" +msgstr "" +"Le revisioni nel ramo %s non sono presenti su altri rami.\n" +"Cancellare il ramo %s?" + +#: gitk:6560 +#, tcl-format +msgid "Tags and heads: %s" +msgstr "Etichette e rami: %s" + +#: gitk:6574 +msgid "Filter" +msgstr "Filtro" + +#: gitk:6868 +msgid "" +"Error reading commit topology information; branch and preceding/following " +"tag information will be incomplete." +msgstr "" +"Errore nella lettura della topologia delle revisioni: le informazioni sul " +"ramo e le etichette precedenti e seguenti saranno incomplete." + +#: gitk:7852 +msgid "Tag" +msgstr "Etichetta" + +#: gitk:7852 +msgid "Id" +msgstr "Id" + +#: gitk:7892 +msgid "Gitk font chooser" +msgstr "Scelta caratteri gitk" + +#: gitk:7909 +msgid "B" +msgstr "B" + +#: gitk:7912 +msgid "I" +msgstr "I" + +#: gitk:8005 +msgid "Gitk preferences" +msgstr "Preferenze gitk" + +#: gitk:8006 +msgid "Commit list display options" +msgstr "Opzioni visualizzazione dell'elenco revisioni" + +#: gitk:8009 +msgid "Maximum graph width (lines)" +msgstr "Larghezza massima del grafico (in linee)" + +#: gitk:8013 +#, tcl-format +msgid "Maximum graph width (% of pane)" +msgstr "Larghezza massima del grafico (% del pannello)" + +#: gitk:8018 +msgid "Show local changes" +msgstr "Mostra modifiche locali" + +#: gitk:8023 +msgid "Auto-select SHA1" +msgstr "Seleziona automaticamente SHA1 hash" + +#: gitk:8028 +msgid "Diff display options" +msgstr "Opzioni di visualizzazione delle differenze" + +#: gitk:8030 +msgid "Tab spacing" +msgstr "Spaziatura tabulazioni" + +#: gitk:8034 +msgid "Display nearby tags" +msgstr "Mostra etichette vicine" + +#: gitk:8039 +msgid "Limit diffs to listed paths" +msgstr "Limita le differenze ai percorsi elencati" + +#: gitk:8044 +msgid "Colors: press to choose" +msgstr "Colori: premere per scegliere" + +#: gitk:8047 +msgid "Background" +msgstr "Sfondo" + +#: gitk:8051 +msgid "Foreground" +msgstr "Primo piano" + +#: gitk:8055 +msgid "Diff: old lines" +msgstr "Diff: vecchie linee" + +#: gitk:8060 +msgid "Diff: new lines" +msgstr "Diff: nuove linee" + +#: gitk:8065 +msgid "Diff: hunk header" +msgstr "Diff: intestazione della sezione" + +#: gitk:8071 +msgid "Select bg" +msgstr "Sfondo selezione" + +#: gitk:8075 +msgid "Fonts: press to choose" +msgstr "Carattere: premere per scegliere" + +#: gitk:8077 +msgid "Main font" +msgstr "Carattere principale" + +#: gitk:8078 +msgid "Diff display font" +msgstr "Carattere per differenze" + +#: gitk:8079 +msgid "User interface font" +msgstr "Carattere per interfaccia utente" + +#: gitk:8095 +#, tcl-format +msgid "Gitk: choose color for %s" +msgstr "Gitk: scegliere un colore per %s" + +#: gitk:8476 +msgid "" +"Sorry, gitk cannot run with this version of Tcl/Tk.\n" +" Gitk requires at least Tcl/Tk 8.4." +msgstr "" +"Questa versione di Tcl/Tk non può avviare gitk.\n" +" Gitk richiede Tcl/Tk versione 8.4 o superiore." + +#: gitk:8565 +msgid "Cannot find a git repository here." +msgstr "Archivio git non trovato." + +#: gitk:8569 +#, tcl-format +msgid "Cannot find the git directory \"%s\"." +msgstr "Directory git \"%s\" non trovata." + +#: gitk:8612 +#, tcl-format +msgid "Ambiguous argument '%s': both revision and filename" +msgstr "Argomento ambiguo: '%s' è sia revisione che nome di file" + +#: gitk:8624 +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 +msgid "Command line" +msgstr "Linea di comando" @@ -8,6 +8,12 @@ #include "exec_cmd.h" #include "common-cmds.h" #include "parse-options.h" +#include "run-command.h" + +static struct man_viewer_list { + void (*exec)(const char *); + struct man_viewer_list *next; +} *man_viewer_list; enum help_format { HELP_FORMAT_MAN, @@ -42,6 +48,102 @@ static enum help_format parse_help_format(const char *format) die("unrecognized help format '%s'", format); } +static int check_emacsclient_version(void) +{ + struct strbuf buffer = STRBUF_INIT; + struct child_process ec_process; + const char *argv_ec[] = { "emacsclient", "--version", NULL }; + int version; + + /* emacsclient prints its version number on stderr */ + memset(&ec_process, 0, sizeof(ec_process)); + ec_process.argv = argv_ec; + ec_process.err = -1; + ec_process.stdout_to_stderr = 1; + if (start_command(&ec_process)) { + fprintf(stderr, "Failed to start emacsclient.\n"); + return -1; + } + strbuf_read(&buffer, ec_process.err, 20); + close(ec_process.err); + + /* + * Don't bother checking return value, because "emacsclient --version" + * seems to always exits with code 1. + */ + finish_command(&ec_process); + + if (prefixcmp(buffer.buf, "emacsclient")) { + fprintf(stderr, "Failed to parse emacsclient version.\n"); + strbuf_release(&buffer); + return -1; + } + + strbuf_remove(&buffer, 0, strlen("emacsclient")); + version = atoi(buffer.buf); + + if (version < 22) { + fprintf(stderr, + "emacsclient version '%d' too old (< 22).\n", + version); + strbuf_release(&buffer); + return -1; + } + + strbuf_release(&buffer); + return 0; +} + +static void exec_woman_emacs(const char *page) +{ + if (!check_emacsclient_version()) { + /* This works only with emacsclient version >= 22. */ + struct strbuf man_page = STRBUF_INIT; + strbuf_addf(&man_page, "(woman \"%s\")", page); + execlp("emacsclient", "emacsclient", "-e", man_page.buf, NULL); + } +} + +static void exec_man_konqueror(const char *page) +{ + const char *display = getenv("DISPLAY"); + if (display && *display) { + struct strbuf man_page = STRBUF_INIT; + strbuf_addf(&man_page, "man:%s(1)", page); + execlp("kfmclient", "kfmclient", "newTab", man_page.buf, NULL); + } +} + +static void exec_man_man(const char *page) +{ + execlp("man", "man", page, NULL); +} + +static void do_add_man_viewer(void (*exec)(const char *)) +{ + struct man_viewer_list **p = &man_viewer_list; + + while (*p) + p = &((*p)->next); + *p = xmalloc(sizeof(**p)); + (*p)->next = NULL; + (*p)->exec = exec; +} + +static int add_man_viewer(const char *value) +{ + if (!strcasecmp(value, "man")) + do_add_man_viewer(exec_man_man); + else if (!strcasecmp(value, "woman")) + do_add_man_viewer(exec_woman_emacs); + else if (!strcasecmp(value, "konqueror")) + do_add_man_viewer(exec_man_konqueror); + else + warning("'%s': unsupported man viewer.", value); + + return 0; +} + static int git_help_config(const char *var, const char *value) { if (!strcmp(var, "help.format")) { @@ -50,6 +152,11 @@ static int git_help_config(const char *var, const char *value) help_format = parse_help_format(value); return 0; } + if (!strcmp(var, "man.viewer")) { + if (!value) + return config_error_nonbool(var); + return add_man_viewer(value); + } return git_default_config(var, value); } @@ -347,9 +454,16 @@ static void setup_man_path(void) static void show_man_page(const char *git_cmd) { + struct man_viewer_list *viewer; const char *page = cmd_to_page(git_cmd); + setup_man_path(); - execlp("man", "man", page, NULL); + for (viewer = man_viewer_list; viewer; viewer = viewer->next) + { + viewer->exec(page); /* will return when unable */ + } + exec_man_man(page); + die("no man viewer handled the request"); } static void show_info_page(const char *git_cmd) diff --git a/log-tree.c b/log-tree.c index 608f697cf3..5b2963998c 100644 --- a/log-tree.c +++ b/log-tree.c @@ -138,10 +138,14 @@ static int has_non_ascii(const char *s) } void log_write_email_headers(struct rev_info *opt, const char *name, - const char **subject_p, const char **extra_headers_p) + const char **subject_p, + const char **extra_headers_p, + int *need_8bit_cte_p) { const char *subject = NULL; const char *extra_headers = opt->extra_headers; + + *need_8bit_cte_p = 0; /* unknown */ if (opt->total > 0) { static char buffer[64]; snprintf(buffer, sizeof(buffer), @@ -169,6 +173,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name, if (opt->mime_boundary) { static char subject_buffer[1024]; static char buffer[1024]; + *need_8bit_cte_p = -1; /* NEVER */ snprintf(subject_buffer, sizeof(subject_buffer) - 1, "%s" "MIME-Version: 1.0\n" @@ -212,6 +217,7 @@ void show_log(struct rev_info *opt, const char *sep) int abbrev_commit = opt->abbrev_commit ? opt->abbrev : 40; const char *extra; const char *subject = NULL, *extra_headers = opt->extra_headers; + int need_8bit_cte = 0; opt->loginfo = NULL; if (!opt->verbose_header) { @@ -255,7 +261,8 @@ void show_log(struct rev_info *opt, const char *sep) if (opt->commit_format == CMIT_FMT_EMAIL) { log_write_email_headers(opt, sha1_to_hex(commit->object.sha1), - &subject, &extra_headers); + &subject, &extra_headers, + &need_8bit_cte); } else if (opt->commit_format != CMIT_FMT_USERFORMAT) { fputs(diff_get_color_opt(&opt->diffopt, DIFF_COMMIT), stdout); if (opt->commit_format != CMIT_FMT_ONELINE) @@ -299,9 +306,11 @@ void show_log(struct rev_info *opt, const char *sep) * And then the pretty-printed message itself */ strbuf_init(&msgbuf, 0); + if (need_8bit_cte >= 0) + need_8bit_cte = has_non_ascii(opt->add_signoff); pretty_print_commit(opt->commit_format, commit, &msgbuf, abbrev, subject, extra_headers, opt->date_mode, - has_non_ascii(opt->add_signoff)); + need_8bit_cte); if (opt->add_signoff) append_signoff(&msgbuf, opt->add_signoff); diff --git a/log-tree.h b/log-tree.h index 0cc9344eab..8946ff377c 100644 --- a/log-tree.h +++ b/log-tree.h @@ -14,6 +14,8 @@ int log_tree_opt_parse(struct rev_info *, const char **, int); void show_log(struct rev_info *opt, const char *sep); void show_decorations(struct commit *commit); void log_write_email_headers(struct rev_info *opt, const char *name, - const char **subject_p, const char **extra_headers_p); + const char **subject_p, + const char **extra_headers_p, + int *need_8bit_cte_p); #endif @@ -636,7 +636,7 @@ void pp_title_line(enum cmit_fmt fmt, const char *subject, const char *after_subject, const char *encoding, - int plain_non_ascii) + int need_8bit_cte) { struct strbuf title; @@ -669,7 +669,7 @@ void pp_title_line(enum cmit_fmt fmt, } strbuf_addch(sb, '\n'); - if (plain_non_ascii) { + if (need_8bit_cte > 0) { const char *header_fmt = "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=%s\n" @@ -718,9 +718,9 @@ void pp_remainder(enum cmit_fmt fmt, } void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit, - struct strbuf *sb, int abbrev, - const char *subject, const char *after_subject, - enum date_mode dmode, int plain_non_ascii) + struct strbuf *sb, int abbrev, + const char *subject, const char *after_subject, + enum date_mode dmode, int need_8bit_cte) { unsigned long beginning_of_body; int indent = 4; @@ -746,13 +746,11 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit, if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL) indent = 0; - /* After-subject is used to pass in Content-Type: multipart - * MIME header; in that case we do not have to do the - * plaintext content type even if the commit message has - * non 7-bit ASCII character. Otherwise, check if we need - * to say this is not a 7-bit ASCII. + /* + * We need to check and emit Content-type: to mark it + * as 8-bit if we haven't done so. */ - if (fmt == CMIT_FMT_EMAIL && !after_subject) { + if (fmt == CMIT_FMT_EMAIL && need_8bit_cte == 0) { int i, ch, in_body; for (in_body = i = 0; (ch = msg[i]); i++) { @@ -765,7 +763,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit, in_body = 1; } else if (non_ascii(ch)) { - plain_non_ascii = 1; + need_8bit_cte = 1; break; } } @@ -790,7 +788,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit, /* These formats treat the title line specially. */ if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL) pp_title_line(fmt, &msg, sb, subject, - after_subject, encoding, plain_non_ascii); + after_subject, encoding, need_8bit_cte); beginning_of_body = sb->len; if (fmt != CMIT_FMT_ONELINE) diff --git a/sha1_name.c b/sha1_name.c index 8b6c76f68e..491d2e7ebf 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -407,18 +407,22 @@ static int get_nth_ancestor(const char *name, int len, unsigned char *result, int generation) { unsigned char sha1[20]; - int ret = get_sha1_1(name, len, sha1); + struct commit *commit; + int ret; + + ret = get_sha1_1(name, len, sha1); if (ret) return ret; + commit = lookup_commit_reference(sha1); + if (!commit) + return -1; while (generation--) { - struct commit *commit = lookup_commit_reference(sha1); - - if (!commit || parse_commit(commit) || !commit->parents) + if (parse_commit(commit) || !commit->parents) return -1; - hashcpy(sha1, commit->parents->item->object.sha1); + commit = commit->parents->item; } - hashcpy(result, sha1); + hashcpy(result, commit->object.sha1); return 0; } @@ -544,9 +548,8 @@ static int get_sha1_1(const char *name, int len, unsigned char *sha1) int ret, has_suffix; const char *cp; - /* "name~3" is "name^^^", - * "name~" and "name~0" are name -- not "name^0"! - * "name^" is not "name^0"; it is "name^1". + /* + * "name~3" is "name^^^", "name~" is "name~1", and "name^" is "name^1". */ has_suffix = 0; for (cp = name + len - 1; name <= cp; cp--) { @@ -564,11 +567,10 @@ static int get_sha1_1(const char *name, int len, unsigned char *sha1) cp++; while (cp < name + len) num = num * 10 + *cp++ - '0'; - if (has_suffix == '^') { - if (!num && len1 == len - 1) - num = 1; + if (!num && len1 == len - 1) + num = 1; + if (has_suffix == '^') return get_parent(name, len1, sha1, num); - } /* else if (has_suffix == '~') -- goes without saying */ return get_nth_ancestor(name, len1, sha1, num); } diff --git a/t/t4021-format-patch-signer-mime.sh b/t/t4021-format-patch-signer-mime.sh index 67a70fadab..ba43f18549 100755 --- a/t/t4021-format-patch-signer-mime.sh +++ b/t/t4021-format-patch-signer-mime.sh @@ -32,11 +32,19 @@ test_expect_success 'format with signoff without funny signer name' ' test_expect_success 'format with non ASCII signer name' ' - GIT_COMMITTER_NAME="$B$O$^$N(B $B$U$K$*$&(B" \ + GIT_COMMITTER_NAME="はまの ふにおう" \ git format-patch -s --stdout -1 >output && grep Content-Type output ' +test_expect_success 'attach and signoff do not duplicate mime headers' ' + + GIT_COMMITTER_NAME="はまの ふにおう" \ + git format-patch -s --stdout -1 --attach >output && + test `grep -ci ^MIME-Version: output` = 1 + +' + test_done diff --git a/t/t4028-format-patch-mime-headers.sh b/t/t4028-format-patch-mime-headers.sh new file mode 100755 index 0000000000..204ba673cb --- /dev/null +++ b/t/t4028-format-patch-mime-headers.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='format-patch mime headers and extra headers do not conflict' +. ./test-lib.sh + +test_expect_success 'create commit with utf-8 body' ' + echo content >file && + git add file && + git commit -m one && + echo more >>file && + git commit -a -m "two + + utf-8 body: ñ" +' + +test_expect_success 'patch has mime headers' ' + rm -f 0001-two.patch && + git format-patch HEAD^ && + grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch +' + +test_expect_success 'patch has mime and extra headers' ' + rm -f 0001-two.patch && + git config format.headers "x-foo: bar" && + git format-patch HEAD^ && + grep -i "x-foo: bar" 0001-two.patch && + grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch +' + +test_done diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 6d12efb74d..eef4cafda9 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -47,4 +47,9 @@ EOF test_expect_success 'shortlog wrapping' 'diff -u expect out' +git log HEAD > log +GIT_DIR=non-existing git shortlog -w < log > out + +test_expect_success 'shortlog from non-git directory' 'diff -u expect out' + test_done diff --git a/unpack-trees.c b/unpack-trees.c index 91649f31d6..93019abdc1 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -336,6 +336,8 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options state.refresh_cache = 1; memset(&o->result, 0, sizeof(o->result)); + if (o->src_index) + o->result.timestamp = o->src_index->timestamp; o->merge_size = len; if (!dfc) |