From 3b681e255cd8577a77983958ef7f566b05806cd0 Mon Sep 17 00:00:00 2001 From: Peter Krefting Date: Thu, 26 Oct 2023 21:47:18 +0100 Subject: [PATCH 0001/1166] gitk: sv.po: Update Swedish translation (323t) Signed-off-by: Peter Krefting --- po/sv.po | 734 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 377 insertions(+), 357 deletions(-) diff --git a/po/sv.po b/po/sv.po index 2a06fe5bbcf826..5afbe6da1d6ab0 100644 --- a/po/sv.po +++ b/po/sv.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the gitk package. # # Mikael Magnusson , 2008. -# Peter Krefting , 2008, 2009, 2010, 2012, 2013, 2015. +# Peter Krefting , 2008-2023. # msgid "" msgstr "" "Project-Id-Version: sv\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-09 09:40+0100\n" -"PO-Revision-Date: 2015-12-11 09:46+0100\n" +"POT-Creation-Date: 2023-10-26 21:39+0100\n" +"PO-Revision-Date: 2023-10-26 21:42+0100\n" "Last-Translator: Peter Krefting \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -18,35 +18,35 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Gtranslator 3.38.0\n" -#: gitk:140 +#: gitk:139 msgid "Couldn't get list of unmerged files:" msgstr "Kunde inte hämta lista över ej sammanslagna filer:" -#: gitk:212 gitk:2381 +#: gitk:211 gitk:2406 msgid "Color words" msgstr "Färga ord" -#: gitk:217 gitk:2381 gitk:8221 gitk:8254 +#: gitk:216 gitk:2406 gitk:8307 gitk:8340 msgid "Markup words" msgstr "Märk upp ord" -#: gitk:324 +#: gitk:323 msgid "Error parsing revisions:" msgstr "Fel vid tolkning av revisioner:" -#: gitk:380 +#: gitk:379 msgid "Error executing --argscmd command:" msgstr "Fel vid körning av --argscmd-kommando:" -#: gitk:393 +#: gitk:392 msgid "No files selected: --merge specified but no files are unmerged." msgstr "" "Inga filer valdes: --merge angavs men det finns inga filer som inte har " "slagits samman." -#: gitk:396 +#: gitk:395 msgid "" "No files selected: --merge specified but no unmerged files are within file " "limit." @@ -54,322 +54,326 @@ msgstr "" "Inga filer valdes: --merge angavs men det finns inga filer inom " "filbegränsningen." -#: gitk:418 gitk:566 +#: gitk:417 gitk:565 msgid "Error executing git log:" msgstr "Fel vid körning av git log:" -#: gitk:436 gitk:582 +#: gitk:435 gitk:581 msgid "Reading" msgstr "Läser" -#: gitk:496 gitk:4526 +#: gitk:495 gitk:4572 msgid "Reading commits..." msgstr "Läser incheckningar..." -#: gitk:499 gitk:1637 gitk:4529 +#: gitk:498 gitk:1640 gitk:4575 msgid "No commits selected" msgstr "Inga incheckningar markerade" -#: gitk:1445 gitk:4046 gitk:12447 +#: gitk:1448 gitk:4092 gitk:12674 msgid "Command line" msgstr "Kommandorad" -#: gitk:1511 +#: gitk:1514 msgid "Can't parse git log output:" msgstr "Kan inte tolka utdata från git log:" -#: gitk:1740 +#: gitk:1743 msgid "No commit information available" msgstr "Ingen incheckningsinformation är tillgänglig" -#: gitk:1903 gitk:1932 gitk:4316 gitk:9684 gitk:11256 gitk:11536 +#: gitk:1910 gitk:1939 gitk:4362 gitk:9847 gitk:11451 gitk:11751 msgid "OK" msgstr "OK" -#: gitk:1934 gitk:4318 gitk:9197 gitk:9276 gitk:9406 gitk:9455 gitk:9686 -#: gitk:11257 gitk:11537 +#: gitk:1941 gitk:4364 gitk:9283 gitk:9362 gitk:9492 gitk:9578 gitk:9849 +#: gitk:11452 gitk:11752 msgid "Cancel" msgstr "Avbryt" -#: gitk:2069 +#: gitk:2090 msgid "&Update" msgstr "&Uppdatera" -#: gitk:2070 +#: gitk:2091 msgid "&Reload" msgstr "Läs &om" -#: gitk:2071 +#: gitk:2092 msgid "Reread re&ferences" msgstr "Läs om &referenser" -#: gitk:2072 +#: gitk:2093 msgid "&List references" msgstr "&Visa referenser" -#: gitk:2074 +#: gitk:2095 msgid "Start git &gui" msgstr "Starta git &gui" -#: gitk:2076 +#: gitk:2097 msgid "&Quit" msgstr "&Avsluta" -#: gitk:2068 +#: gitk:2089 msgid "&File" msgstr "&Arkiv" -#: gitk:2080 +#: gitk:2101 msgid "&Preferences" msgstr "&Inställningar" -#: gitk:2079 +#: gitk:2100 msgid "&Edit" msgstr "&Redigera" -#: gitk:2084 +#: gitk:2105 msgid "&New view..." msgstr "&Ny vy..." -#: gitk:2085 +#: gitk:2106 msgid "&Edit view..." msgstr "&Ändra vy..." -#: gitk:2086 +#: gitk:2107 msgid "&Delete view" msgstr "&Ta bort vy" -#: gitk:2088 +#: gitk:2109 msgid "&All files" msgstr "&Alla filer" -#: gitk:2083 +#: gitk:2104 msgid "&View" msgstr "&Visa" -#: gitk:2093 gitk:2103 +#: gitk:2114 gitk:2124 msgid "&About gitk" msgstr "&Om gitk" -#: gitk:2094 gitk:2108 +#: gitk:2115 gitk:2129 msgid "&Key bindings" msgstr "&Tangentbordsbindningar" -#: gitk:2092 gitk:2107 +#: gitk:2113 gitk:2128 msgid "&Help" msgstr "&Hjälp" -#: gitk:2185 gitk:8653 +#: gitk:2206 gitk:8739 msgid "SHA1 ID:" msgstr "SHA1-id:" -#: gitk:2229 +#: gitk:2250 msgid "Row" msgstr "Rad" -#: gitk:2267 +#: gitk:2288 msgid "Find" msgstr "Sök" -#: gitk:2295 +#: gitk:2316 msgid "commit" msgstr "incheckning" -#: gitk:2299 gitk:2301 gitk:4688 gitk:4711 gitk:4735 gitk:6756 gitk:6828 -#: gitk:6913 +#: gitk:2320 gitk:2322 gitk:4734 gitk:4757 gitk:4781 gitk:6802 gitk:6874 +#: gitk:6959 msgid "containing:" msgstr "som innehåller:" -#: gitk:2302 gitk:3527 gitk:3532 gitk:4764 +#: gitk:2323 gitk:3573 gitk:3578 gitk:4810 msgid "touching paths:" msgstr "som rör sökväg:" -#: gitk:2303 gitk:4778 +#: gitk:2324 gitk:4824 msgid "adding/removing string:" msgstr "som lägger/till tar bort sträng:" -#: gitk:2304 gitk:4780 +#: gitk:2325 gitk:4826 msgid "changing lines matching:" msgstr "ändrar rader som matchar:" -#: gitk:2313 gitk:2315 gitk:4767 +#: gitk:2334 gitk:2336 gitk:4813 msgid "Exact" msgstr "Exakt" -#: gitk:2315 gitk:4855 gitk:6724 +#: gitk:2336 gitk:4901 gitk:6770 msgid "IgnCase" msgstr "IgnVersaler" -#: gitk:2315 gitk:4737 gitk:4853 gitk:6720 +#: gitk:2336 gitk:4783 gitk:4899 gitk:6766 msgid "Regexp" msgstr "Reg.uttr." -#: gitk:2317 gitk:2318 gitk:4875 gitk:4905 gitk:4912 gitk:6849 gitk:6917 +#: gitk:2338 gitk:2339 gitk:4921 gitk:4951 gitk:4958 gitk:6895 gitk:6963 msgid "All fields" msgstr "Alla fält" -#: gitk:2318 gitk:4872 gitk:4905 gitk:6787 +#: gitk:2339 gitk:4918 gitk:4951 gitk:6833 msgid "Headline" msgstr "Rubrik" -#: gitk:2319 gitk:4872 gitk:6787 gitk:6917 gitk:7390 +#: gitk:2340 gitk:4918 gitk:6833 gitk:6963 gitk:7471 msgid "Comments" msgstr "Kommentarer" -#: gitk:2319 gitk:4872 gitk:4877 gitk:4912 gitk:6787 gitk:7325 gitk:8831 -#: gitk:8846 +#: gitk:2340 gitk:4918 gitk:4923 gitk:4958 gitk:6833 gitk:7406 gitk:8917 +#: gitk:8932 msgid "Author" msgstr "Författare" -#: gitk:2319 gitk:4872 gitk:6787 gitk:7327 +#: gitk:2340 gitk:4918 gitk:6833 gitk:7408 msgid "Committer" msgstr "Incheckare" -#: gitk:2350 +#: gitk:2374 msgid "Search" msgstr "Sök" -#: gitk:2358 +#: gitk:2382 msgid "Diff" msgstr "Diff" -#: gitk:2360 +#: gitk:2384 msgid "Old version" msgstr "Gammal version" -#: gitk:2362 +#: gitk:2386 msgid "New version" msgstr "Ny version" -#: gitk:2364 +#: gitk:2389 msgid "Lines of context" msgstr "Rader sammanhang" -#: gitk:2374 +#: gitk:2399 msgid "Ignore space change" msgstr "Ignorera ändringar i blanksteg" -#: gitk:2378 gitk:2380 gitk:7960 gitk:8207 +#: gitk:2403 gitk:2405 gitk:8041 gitk:8293 msgid "Line diff" msgstr "Rad-diff" -#: gitk:2445 +#: gitk:2478 msgid "Patch" msgstr "Patch" -#: gitk:2447 +#: gitk:2480 msgid "Tree" msgstr "Träd" -#: gitk:2617 gitk:2638 +#: gitk:2650 gitk:2671 msgid "Diff this -> selected" msgstr "Diff denna -> markerad" -#: gitk:2618 gitk:2639 +#: gitk:2651 gitk:2672 msgid "Diff selected -> this" msgstr "Diff markerad -> denna" -#: gitk:2619 gitk:2640 +#: gitk:2652 gitk:2673 msgid "Make patch" msgstr "Skapa patch" -#: gitk:2620 gitk:9255 +#: gitk:2653 gitk:9341 msgid "Create tag" msgstr "Skapa tagg" -#: gitk:2621 -msgid "Copy commit summary" -msgstr "Kopiera incheckningssammanfattning" +#: gitk:2654 +msgid "Copy commit reference" +msgstr "Kopiera incheckningsreferens" -#: gitk:2622 gitk:9386 +#: gitk:2655 gitk:9472 msgid "Write commit to file" msgstr "Skriv incheckning till fil" -#: gitk:2623 gitk:9443 +#: gitk:2656 msgid "Create new branch" msgstr "Skapa ny gren" -#: gitk:2624 +#: gitk:2657 msgid "Cherry-pick this commit" msgstr "Plocka denna incheckning" -#: gitk:2625 +#: gitk:2658 msgid "Reset HEAD branch to here" msgstr "Återställ HEAD-grenen hit" -#: gitk:2626 +#: gitk:2659 msgid "Mark this commit" msgstr "Markera denna incheckning" -#: gitk:2627 +#: gitk:2660 msgid "Return to mark" msgstr "Återgå till markering" -#: gitk:2628 +#: gitk:2661 msgid "Find descendant of this and mark" msgstr "Hitta efterföljare till denna och markera" -#: gitk:2629 +#: gitk:2662 msgid "Compare with marked commit" msgstr "Jämför med markerad incheckning" -#: gitk:2630 gitk:2641 +#: gitk:2663 gitk:2674 msgid "Diff this -> marked commit" msgstr "Diff denna -> markerad incheckning" -#: gitk:2631 gitk:2642 +#: gitk:2664 gitk:2675 msgid "Diff marked commit -> this" msgstr "Diff markerad incheckning -> denna" -#: gitk:2632 +#: gitk:2665 msgid "Revert this commit" msgstr "Ångra denna incheckning" -#: gitk:2648 +#: gitk:2681 msgid "Check out this branch" msgstr "Checka ut denna gren" -#: gitk:2649 +#: gitk:2682 +msgid "Rename this branch" +msgstr "Byt namn på denna gren" + +#: gitk:2683 msgid "Remove this branch" msgstr "Ta bort denna gren" -#: gitk:2650 +#: gitk:2684 msgid "Copy branch name" msgstr "Kopiera namn på gren" -#: gitk:2657 +#: gitk:2691 msgid "Highlight this too" msgstr "Markera även detta" -#: gitk:2658 +#: gitk:2692 msgid "Highlight this only" msgstr "Markera bara detta" -#: gitk:2659 +#: gitk:2693 msgid "External diff" msgstr "Extern diff" -#: gitk:2660 +#: gitk:2694 msgid "Blame parent commit" msgstr "Klandra föräldraincheckning" -#: gitk:2661 +#: gitk:2695 msgid "Copy path" msgstr "Kopiera sökväg" -#: gitk:2668 +#: gitk:2702 msgid "Show origin of this line" msgstr "Visa ursprunget för den här raden" -#: gitk:2669 +#: gitk:2703 msgid "Run git gui blame on this line" msgstr "Kör git gui blame på den här raden" -#: gitk:3013 +#: gitk:3057 msgid "About gitk" msgstr "Om gitk" -#: gitk:3015 +#: gitk:3059 msgid "" "\n" "Gitk - a commit viewer for git\n" @@ -385,525 +389,529 @@ msgstr "" "\n" "Använd och vidareförmedla enligt villkoren i GNU General Public License" -#: gitk:3023 gitk:3090 gitk:9872 +#: gitk:3067 gitk:3134 gitk:10062 msgid "Close" msgstr "Stäng" -#: gitk:3044 +#: gitk:3088 msgid "Gitk key bindings" msgstr "Tangentbordsbindningar för Gitk" -#: gitk:3047 +#: gitk:3091 msgid "Gitk key bindings:" msgstr "Tangentbordsbindningar för Gitk:" -#: gitk:3049 +#: gitk:3093 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tAvsluta" -#: gitk:3050 +#: gitk:3094 #, tcl-format msgid "<%s-W>\t\tClose window" msgstr "<%s-W>\t\tStäng fönster" -#: gitk:3051 +#: gitk:3095 msgid "\t\tMove to first commit" msgstr "\t\tGå till första incheckning" -#: gitk:3052 +#: gitk:3096 msgid "\t\tMove to last commit" msgstr "\t\tGå till sista incheckning" -#: gitk:3053 +#: gitk:3097 msgid ", p, k\tMove up one commit" msgstr ", p, k\tGå en incheckning upp" -#: gitk:3054 +#: gitk:3098 msgid ", n, j\tMove down one commit" msgstr ", n, j\tGå en incheckning ned" -#: gitk:3055 +#: gitk:3099 msgid ", z, h\tGo back in history list" msgstr ", z, h\tGå bakåt i historiken" -#: gitk:3056 +#: gitk:3100 msgid ", x, l\tGo forward in history list" msgstr ", x, l\tGå framåt i historiken" -#: gitk:3057 +#: gitk:3101 #, tcl-format msgid "<%s-n>\tGo to n-th parent of current commit in history list" msgstr "<%s-n>\tGå till aktuell inchecknings n:te förälder i historielistan" -#: gitk:3058 +#: gitk:3102 msgid "\tMove up one page in commit list" msgstr "\tGå upp en sida i incheckningslistan" -#: gitk:3059 +#: gitk:3103 msgid "\tMove down one page in commit list" msgstr "\tGå ned en sida i incheckningslistan" -#: gitk:3060 +#: gitk:3104 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tRulla till början av incheckningslistan" -#: gitk:3061 +#: gitk:3105 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tRulla till slutet av incheckningslistan" -#: gitk:3062 +#: gitk:3106 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Upp>\tRulla incheckningslistan upp ett steg" -#: gitk:3063 +#: gitk:3107 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Ned>\tRulla incheckningslistan ned ett steg" -#: gitk:3064 +#: gitk:3108 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tRulla incheckningslistan upp en sida" -#: gitk:3065 +#: gitk:3109 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tRulla incheckningslistan ned en sida" -#: gitk:3066 +#: gitk:3110 msgid "\tFind backwards (upwards, later commits)" msgstr "\tSök bakåt (uppåt, senare incheckningar)" -#: gitk:3067 +#: gitk:3111 msgid "\tFind forwards (downwards, earlier commits)" msgstr "\tSök framåt (nedåt, tidigare incheckningar)" -#: gitk:3068 +#: gitk:3112 msgid ", b\tScroll diff view up one page" msgstr ", b\tRulla diffvisningen upp en sida" -#: gitk:3069 +#: gitk:3113 msgid "\tScroll diff view up one page" msgstr "\tRulla diffvisningen upp en sida" -#: gitk:3070 +#: gitk:3114 msgid "\t\tScroll diff view down one page" msgstr "\tRulla diffvisningen ned en sida" -#: gitk:3071 +#: gitk:3115 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tRulla diffvisningen upp 18 rader" -#: gitk:3072 +#: gitk:3116 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tRulla diffvisningen ned 18 rader" -#: gitk:3073 +#: gitk:3117 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tSök" -#: gitk:3074 +#: gitk:3118 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tGå till nästa sökträff" -#: gitk:3075 +#: gitk:3119 msgid "\tMove to next find hit" msgstr "\t\tGå till nästa sökträff" -#: gitk:3076 +#: gitk:3120 msgid "g\t\tGo to commit" msgstr "g\t\tGå till incheckning" -#: gitk:3077 +#: gitk:3121 msgid "/\t\tFocus the search box" msgstr "/\t\tFokusera sökrutan" -#: gitk:3078 +#: gitk:3122 msgid "?\t\tMove to previous find hit" msgstr "?\t\tGå till föregående sökträff" -#: gitk:3079 +#: gitk:3123 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tRulla diffvisningen till nästa fil" -#: gitk:3080 +#: gitk:3124 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tGå till nästa sökträff i diffvisningen" -#: gitk:3081 +#: gitk:3125 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tGå till föregående sökträff i diffvisningen" -#: gitk:3082 +#: gitk:3126 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-Num+>\tÖka teckenstorlek" -#: gitk:3083 +#: gitk:3127 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\tÖka teckenstorlek" -#: gitk:3084 +#: gitk:3128 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-Num->\tMinska teckenstorlek" -#: gitk:3085 +#: gitk:3129 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\tMinska teckenstorlek" -#: gitk:3086 +#: gitk:3130 msgid "\t\tUpdate" msgstr "\t\tUppdatera" -#: gitk:3551 gitk:3560 +#: gitk:3597 gitk:3606 #, tcl-format msgid "Error creating temporary directory %s:" msgstr "Fel vid skapande av temporär katalog %s:" -#: gitk:3573 +#: gitk:3619 #, tcl-format msgid "Error getting \"%s\" from %s:" -msgstr "Fel vid hämtning av \"%s\" från %s:" +msgstr "Fel vid hämtning av ”%s” från %s:" -#: gitk:3636 +#: gitk:3682 msgid "command failed:" msgstr "kommando misslyckades:" -#: gitk:3785 +#: gitk:3831 msgid "No such commit" msgstr "Incheckning saknas" -#: gitk:3799 +#: gitk:3845 msgid "git gui blame: command failed:" msgstr "git gui blame: kommando misslyckades:" -#: gitk:3830 +#: gitk:3876 #, tcl-format msgid "Couldn't read merge head: %s" msgstr "Kunde inte läsa sammanslagningshuvud: %s" -#: gitk:3838 +#: gitk:3884 #, tcl-format msgid "Error reading index: %s" msgstr "Fel vid läsning av index: %s" -#: gitk:3863 +#: gitk:3909 #, tcl-format msgid "Couldn't start git blame: %s" msgstr "Kunde inte starta git blame: %s" -#: gitk:3866 gitk:6755 +#: gitk:3912 gitk:6801 msgid "Searching" msgstr "Söker" -#: gitk:3898 +#: gitk:3944 #, tcl-format msgid "Error running git blame: %s" msgstr "Fel vid körning av git blame: %s" -#: gitk:3926 +#: gitk:3972 #, tcl-format msgid "That line comes from commit %s, which is not in this view" msgstr "Raden kommer från incheckningen %s, som inte finns i denna vy" -#: gitk:3940 +#: gitk:3986 msgid "External diff viewer failed:" msgstr "Externt diff-verktyg misslyckades:" -#: gitk:4044 +#: gitk:4090 msgid "All files" msgstr "Alla filer" -#: gitk:4068 +#: gitk:4114 msgid "View" msgstr "Visa" -#: gitk:4071 +#: gitk:4117 msgid "Gitk view definition" msgstr "Definition av Gitk-vy" -#: gitk:4075 +#: gitk:4121 msgid "Remember this view" msgstr "Spara denna vy" -#: gitk:4076 +#: gitk:4122 msgid "References (space separated list):" msgstr "Referenser (blankstegsavdelad lista):" -#: gitk:4077 +#: gitk:4123 msgid "Branches & tags:" msgstr "Grenar & taggar:" -#: gitk:4078 +#: gitk:4124 msgid "All refs" msgstr "Alla referenser" -#: gitk:4079 +#: gitk:4125 msgid "All (local) branches" msgstr "Alla (lokala) grenar" -#: gitk:4080 +#: gitk:4126 msgid "All tags" msgstr "Alla taggar" -#: gitk:4081 +#: gitk:4127 msgid "All remote-tracking branches" msgstr "Alla fjärrspårande grenar" -#: gitk:4082 +#: gitk:4128 msgid "Commit Info (regular expressions):" msgstr "Incheckningsinfo (reguljära uttryck):" -#: gitk:4083 +#: gitk:4129 msgid "Author:" msgstr "Författare:" -#: gitk:4084 +#: gitk:4130 msgid "Committer:" msgstr "Incheckare:" -#: gitk:4085 +#: gitk:4131 msgid "Commit Message:" msgstr "Incheckningsmeddelande:" -#: gitk:4086 +#: gitk:4132 msgid "Matches all Commit Info criteria" msgstr "Motsvarar alla kriterier för incheckningsinfo" -#: gitk:4087 +#: gitk:4133 msgid "Matches no Commit Info criteria" msgstr "Motsvarar inga kriterier för incheckningsinfo" -#: gitk:4088 +#: gitk:4134 msgid "Changes to Files:" msgstr "Ändringar av filer:" -#: gitk:4089 +#: gitk:4135 msgid "Fixed String" msgstr "Fast sträng" -#: gitk:4090 +#: gitk:4136 msgid "Regular Expression" msgstr "Reguljärt uttryck" -#: gitk:4091 +#: gitk:4137 msgid "Search string:" msgstr "Söksträng:" -#: gitk:4092 +#: gitk:4138 msgid "" "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " "15:27:38\"):" msgstr "" -"Incheckingsdatum (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " -"15:27:38\"):" +"Incheckningsdatum (”2 weeks ago”, ”2009-03-17 15:27:38”, ”March 17, 2009 " +"15:27:38”):" -#: gitk:4093 +#: gitk:4139 msgid "Since:" msgstr "Från:" -#: gitk:4094 +#: gitk:4140 msgid "Until:" msgstr "Till:" -#: gitk:4095 +#: gitk:4141 msgid "Limit and/or skip a number of revisions (positive integer):" msgstr "Begränsa och/eller hoppa över ett antal revisioner (positivt heltal):" -#: gitk:4096 +#: gitk:4142 msgid "Number to show:" msgstr "Antal att visa:" -#: gitk:4097 +#: gitk:4143 msgid "Number to skip:" msgstr "Antal att hoppa över:" -#: gitk:4098 +#: gitk:4144 msgid "Miscellaneous options:" msgstr "Diverse alternativ:" -#: gitk:4099 +#: gitk:4145 msgid "Strictly sort by date" msgstr "Strikt datumsortering" -#: gitk:4100 +#: gitk:4146 msgid "Mark branch sides" msgstr "Markera sidogrenar" -#: gitk:4101 +#: gitk:4147 msgid "Limit to first parent" msgstr "Begränsa till första förälder" -#: gitk:4102 +#: gitk:4148 msgid "Simple history" msgstr "Enkel historik" -#: gitk:4103 +#: gitk:4149 msgid "Additional arguments to git log:" msgstr "Ytterligare argument till git log:" -#: gitk:4104 +#: gitk:4150 msgid "Enter files and directories to include, one per line:" msgstr "Ange filer och kataloger att ta med, en per rad:" -#: gitk:4105 +#: gitk:4151 msgid "Command to generate more commits to include:" msgstr "Kommando för att generera fler incheckningar att ta med:" -#: gitk:4229 +#: gitk:4275 msgid "Gitk: edit view" msgstr "Gitk: redigera vy" -#: gitk:4237 +#: gitk:4283 msgid "-- criteria for selecting revisions" msgstr " - kriterier för val av revisioner" -#: gitk:4242 +#: gitk:4288 msgid "View Name" msgstr "Namn på vy" -#: gitk:4317 +#: gitk:4363 msgid "Apply (F5)" msgstr "Använd (F5)" -#: gitk:4355 +#: gitk:4401 msgid "Error in commit selection arguments:" msgstr "Fel i argument för val av incheckningar:" -#: gitk:4410 gitk:4463 gitk:4925 gitk:4939 gitk:6209 gitk:12388 gitk:12389 +#: gitk:4456 gitk:4509 gitk:4971 gitk:4985 gitk:6255 gitk:12615 gitk:12616 msgid "None" msgstr "Inget" -#: gitk:5022 gitk:5027 +#: gitk:5068 gitk:5073 msgid "Descendant" msgstr "Avkomling" -#: gitk:5023 +#: gitk:5069 msgid "Not descendant" msgstr "Inte avkomling" -#: gitk:5030 gitk:5035 +#: gitk:5076 gitk:5081 msgid "Ancestor" msgstr "Förfader" -#: gitk:5031 +#: gitk:5077 msgid "Not ancestor" msgstr "Inte förfader" -#: gitk:5325 +#: gitk:5371 msgid "Local changes checked in to index but not committed" msgstr "Lokala ändringar sparade i indexet men inte incheckade" -#: gitk:5361 +#: gitk:5407 msgid "Local uncommitted changes, not checked in to index" msgstr "Lokala ändringar, ej sparade i indexet" -#: gitk:7135 +#: gitk:7155 +msgid "Error starting web browser:" +msgstr "Fel när webbläsaren skulle startas:" + +#: gitk:7216 msgid "and many more" msgstr "med många flera" -#: gitk:7138 +#: gitk:7219 msgid "many" msgstr "många" -#: gitk:7329 +#: gitk:7410 msgid "Tags:" msgstr "Taggar:" -#: gitk:7346 gitk:7352 gitk:8826 +#: gitk:7427 gitk:7433 gitk:8912 msgid "Parent" msgstr "Förälder" -#: gitk:7357 +#: gitk:7438 msgid "Child" msgstr "Barn" -#: gitk:7366 +#: gitk:7447 msgid "Branch" msgstr "Gren" -#: gitk:7369 +#: gitk:7450 msgid "Follows" msgstr "Följer" -#: gitk:7372 +#: gitk:7453 msgid "Precedes" msgstr "Föregår" -#: gitk:7967 +#: gitk:8048 #, tcl-format msgid "Error getting diffs: %s" msgstr "Fel vid hämtning av diff: %s" -#: gitk:8651 +#: gitk:8737 msgid "Goto:" msgstr "Gå till:" -#: gitk:8672 +#: gitk:8758 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "Förkortat SHA1-id %s är tvetydigt" -#: gitk:8679 +#: gitk:8765 #, tcl-format msgid "Revision %s is not known" msgstr "Revisionen %s är inte känd" -#: gitk:8689 +#: gitk:8775 #, tcl-format msgid "SHA1 id %s is not known" msgstr "SHA-id:t %s är inte känt" -#: gitk:8691 +#: gitk:8777 #, tcl-format msgid "Revision %s is not in the current view" msgstr "Revisionen %s finns inte i den nuvarande vyn" -#: gitk:8833 gitk:8848 +#: gitk:8919 gitk:8934 msgid "Date" msgstr "Datum" -#: gitk:8836 +#: gitk:8922 msgid "Children" msgstr "Barn" -#: gitk:8899 +#: gitk:8985 #, tcl-format msgid "Reset %s branch to here" msgstr "Återställ grenen %s hit" -#: gitk:8901 +#: gitk:8987 msgid "Detached head: can't reset" msgstr "Frånkopplad head: kan inte återställa" -#: gitk:9006 gitk:9012 +#: gitk:9092 gitk:9098 msgid "Skipping merge commit " msgstr "Hoppar över sammanslagningsincheckning " -#: gitk:9021 gitk:9026 +#: gitk:9107 gitk:9112 msgid "Error getting patch ID for " msgstr "Fel vid hämtning av patch-id för " -#: gitk:9022 gitk:9027 +#: gitk:9108 gitk:9113 msgid " - stopping\n" msgstr " - stannar\n" -#: gitk:9032 gitk:9035 gitk:9043 gitk:9057 gitk:9066 +#: gitk:9118 gitk:9121 gitk:9129 gitk:9143 gitk:9152 msgid "Commit " msgstr "Incheckning " -#: gitk:9036 +#: gitk:9122 msgid "" " is the same patch as\n" " " @@ -911,7 +919,7 @@ msgstr "" " är samma patch som\n" " " -#: gitk:9044 +#: gitk:9130 msgid "" " differs from\n" " " @@ -919,7 +927,7 @@ msgstr "" " skiljer sig från\n" " " -#: gitk:9046 +#: gitk:9132 msgid "" "Diff of commits:\n" "\n" @@ -927,141 +935,158 @@ msgstr "" "Skillnad mellan incheckningar:\n" "\n" -#: gitk:9058 gitk:9067 +#: gitk:9144 gitk:9153 #, tcl-format msgid " has %s children - stopping\n" msgstr " har %s barn - stannar\n" -#: gitk:9086 +#: gitk:9172 #, tcl-format msgid "Error writing commit to file: %s" msgstr "Fel vid skrivning av incheckning till fil: %s" -#: gitk:9092 +#: gitk:9178 #, tcl-format msgid "Error diffing commits: %s" msgstr "Fel vid jämförelse av incheckningar: %s" -#: gitk:9138 +#: gitk:9224 msgid "Top" msgstr "Topp" -#: gitk:9139 +#: gitk:9225 msgid "From" msgstr "Från" -#: gitk:9144 +#: gitk:9230 msgid "To" msgstr "Till" -#: gitk:9168 +#: gitk:9254 msgid "Generate patch" msgstr "Generera patch" -#: gitk:9170 +#: gitk:9256 msgid "From:" msgstr "Från:" -#: gitk:9179 +#: gitk:9265 msgid "To:" msgstr "Till:" -#: gitk:9188 +#: gitk:9274 msgid "Reverse" msgstr "Vänd" -#: gitk:9190 gitk:9400 +#: gitk:9276 gitk:9486 msgid "Output file:" msgstr "Utdatafil:" -#: gitk:9196 +#: gitk:9282 msgid "Generate" msgstr "Generera" -#: gitk:9234 +#: gitk:9320 msgid "Error creating patch:" msgstr "Fel vid generering av patch:" -#: gitk:9257 gitk:9388 gitk:9445 +#: gitk:9343 gitk:9474 gitk:9562 msgid "ID:" msgstr "Id:" -#: gitk:9266 +#: gitk:9352 msgid "Tag name:" msgstr "Taggnamn:" -#: gitk:9269 +#: gitk:9355 msgid "Tag message is optional" msgstr "Taggmeddelandet är valfritt" -#: gitk:9271 +#: gitk:9357 msgid "Tag message:" msgstr "Taggmeddelande:" -#: gitk:9275 gitk:9454 +#: gitk:9361 gitk:9532 msgid "Create" msgstr "Skapa" -#: gitk:9293 +#: gitk:9379 msgid "No tag name specified" msgstr "Inget taggnamn angavs" -#: gitk:9297 +#: gitk:9383 #, tcl-format msgid "Tag \"%s\" already exists" -msgstr "Taggen \"%s\" finns redan" +msgstr "Taggen ”%s” finns redan" -#: gitk:9307 +#: gitk:9393 msgid "Error creating tag:" msgstr "Fel vid skapande av tagg:" -#: gitk:9397 +#: gitk:9483 msgid "Command:" msgstr "Kommando:" -#: gitk:9405 +#: gitk:9491 msgid "Write" msgstr "Skriv" -#: gitk:9423 +#: gitk:9509 msgid "Error writing commit:" msgstr "Fel vid skrivning av incheckning:" -#: gitk:9450 +#: gitk:9531 +msgid "Create branch" +msgstr "Skapa gren" + +#: gitk:9547 +#, tcl-format +msgid "Rename branch %s" +msgstr "Byt namn på grenen %s" + +#: gitk:9548 +msgid "Rename" +msgstr "Byt namn" + +#: gitk:9572 msgid "Name:" msgstr "Namn:" -#: gitk:9473 +#: gitk:9596 msgid "Please specify a name for the new branch" msgstr "Ange ett namn för den nya grenen" -#: gitk:9478 +#: gitk:9601 #, tcl-format msgid "Branch '%s' already exists. Overwrite?" -msgstr "Grenen \"%s\" finns redan. Skriva över?" +msgstr "Grenen ”%s” finns redan. Skriva över?" + +#: gitk:9645 +msgid "Please specify a new name for the branch" +msgstr "Ange ett nytt namn för grenen" -#: gitk:9545 +#: gitk:9708 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "" "Incheckningen %s finns redan på grenen %s -- skall den verkligen appliceras " "på nytt?" -#: gitk:9550 +#: gitk:9713 msgid "Cherry-picking" msgstr "Plockar" -#: gitk:9559 +#: gitk:9722 #, tcl-format msgid "" "Cherry-pick failed because of local changes to file '%s'.\n" "Please commit, reset or stash your changes and try again." msgstr "" -"Cherry-pick misslyckades på grund av lokala ändringar i filen \"%s\".\n" +"Cherry-pick misslyckades på grund av lokala ändringar i filen ”%s”.\n" "Checka in, återställ eller spara undan (stash) dina ändringar och försök " "igen." -#: gitk:9565 +#: gitk:9728 msgid "" "Cherry-pick failed because of merge conflict.\n" "Do you wish to run git citool to resolve it?" @@ -1069,20 +1094,20 @@ msgstr "" "Cherry-pick misslyckades på grund av en sammanslagningskonflikt.\n" "Vill du köra git citool för att lösa den?" -#: gitk:9581 gitk:9639 +#: gitk:9744 gitk:9802 msgid "No changes committed" msgstr "Inga ändringar incheckade" -#: gitk:9608 +#: gitk:9771 #, tcl-format msgid "Commit %s is not included in branch %s -- really revert it?" msgstr "Incheckningen %s finns inte på grenen %s -- vill du verkligen ångra?" -#: gitk:9613 +#: gitk:9776 msgid "Reverting" msgstr "Ångrar" -#: gitk:9621 +#: gitk:9784 #, tcl-format msgid "" "Revert failed because of local changes to the following files:%s Please " @@ -1092,7 +1117,7 @@ msgstr "" "Checka in, återställ eller spara undan (stash) dina ändringar och försök " "igen." -#: gitk:9625 +#: gitk:9788 msgid "" "Revert failed because of merge conflict.\n" " Do you wish to run git citool to resolve it?" @@ -1100,28 +1125,28 @@ msgstr "" "Misslyckades med att ångra på grund av en sammanslagningskonflikt.\n" " Vill du köra git citool för att lösa den?" -#: gitk:9668 +#: gitk:9831 msgid "Confirm reset" msgstr "Bekräfta återställning" -#: gitk:9670 +#: gitk:9833 #, tcl-format msgid "Reset branch %s to %s?" msgstr "Återställa grenen %s till %s?" -#: gitk:9672 +#: gitk:9835 msgid "Reset type:" msgstr "Typ av återställning:" -#: gitk:9675 +#: gitk:9838 msgid "Soft: Leave working tree and index untouched" msgstr "Mjuk: Rör inte utcheckning och index" -#: gitk:9678 +#: gitk:9841 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Blandad: Rör inte utcheckning, återställ index" -#: gitk:9681 +#: gitk:9844 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -1129,19 +1154,24 @@ msgstr "" "Hård: Återställ utcheckning och index\n" "(förkastar ALLA lokala ändringar)" -#: gitk:9698 +#: gitk:9861 msgid "Resetting" msgstr "Återställer" -#: gitk:9758 +#: gitk:9934 +#, tcl-format +msgid "A local branch named %s exists already" +msgstr "Det finns redan en lokal gren som heter %s" + +#: gitk:9942 msgid "Checking out" msgstr "Checkar ut" -#: gitk:9811 +#: gitk:10001 msgid "Cannot delete the currently checked-out branch" msgstr "Kan inte ta bort den just nu utcheckade grenen" -#: gitk:9817 +#: gitk:10007 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -1150,16 +1180,16 @@ msgstr "" "Incheckningarna på grenen %s existerar inte på någon annan gren.\n" "Vill du verkligen ta bort grenen %s?" -#: gitk:9848 +#: gitk:10038 #, tcl-format msgid "Tags and heads: %s" msgstr "Taggar och huvuden: %s" -#: gitk:9865 +#: gitk:10055 msgid "Filter" msgstr "Filter" -#: gitk:10161 +#: gitk:10356 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." @@ -1167,201 +1197,221 @@ msgstr "" "Fel vid läsning av information om incheckningstopologi; information om " "grenar och föregående/senare taggar kommer inte vara komplett." -#: gitk:11138 +#: gitk:11333 msgid "Tag" msgstr "Tagg" -#: gitk:11142 +#: gitk:11337 msgid "Id" msgstr "Id" -#: gitk:11225 +#: gitk:11420 msgid "Gitk font chooser" msgstr "Teckensnittsväljare för Gitk" -#: gitk:11242 +#: gitk:11437 msgid "B" msgstr "F" -#: gitk:11245 +#: gitk:11440 msgid "I" msgstr "K" -#: gitk:11363 +#: gitk:11558 msgid "Commit list display options" msgstr "Alternativ för incheckningslistvy" -#: gitk:11366 +#: gitk:11561 msgid "Maximum graph width (lines)" msgstr "Maximal grafbredd (rader)" -#: gitk:11370 +#: gitk:11565 #, no-tcl-format msgid "Maximum graph width (% of pane)" msgstr "Maximal grafbredd (% av ruta)" -#: gitk:11373 +#: gitk:11568 msgid "Show local changes" msgstr "Visa lokala ändringar" -#: gitk:11376 +#: gitk:11571 msgid "Auto-select SHA1 (length)" msgstr "Välj SHA1 (längd) automatiskt" -#: gitk:11380 +#: gitk:11575 msgid "Hide remote refs" msgstr "Dölj fjärr-referenser" -#: gitk:11384 +#: gitk:11579 msgid "Diff display options" msgstr "Alternativ för diffvy" -#: gitk:11386 +#: gitk:11581 msgid "Tab spacing" msgstr "Blanksteg för tabulatortecken" -#: gitk:11389 +#: gitk:11584 msgid "Display nearby tags/heads" msgstr "Visa närliggande taggar/huvuden" -#: gitk:11392 +#: gitk:11587 msgid "Maximum # tags/heads to show" msgstr "Maximalt antal taggar/huvuden att visa" -#: gitk:11395 +#: gitk:11590 msgid "Limit diffs to listed paths" msgstr "Begränsa diff till listade sökvägar" -#: gitk:11398 +#: gitk:11593 msgid "Support per-file encodings" msgstr "Stöd för filspecifika teckenkodningar" -#: gitk:11404 gitk:11551 +#: gitk:11599 gitk:11766 msgid "External diff tool" msgstr "Externt diff-verktyg" -#: gitk:11405 +#: gitk:11600 msgid "Choose..." msgstr "Välj..." -#: gitk:11410 +#: gitk:11607 +msgid "Web browser" +msgstr "Webbläsare" + +#: gitk:11612 msgid "General options" msgstr "Allmänna inställningar" -#: gitk:11413 +#: gitk:11615 msgid "Use themed widgets" msgstr "Använd tema på fönsterelement" -#: gitk:11415 +#: gitk:11617 msgid "(change requires restart)" msgstr "(ändringen kräver omstart)" -#: gitk:11417 +#: gitk:11619 msgid "(currently unavailable)" msgstr "(för närvarande inte tillgängligt)" -#: gitk:11428 +#: gitk:11631 msgid "Colors: press to choose" msgstr "Färger: tryck för att välja" -#: gitk:11431 +#: gitk:11634 msgid "Interface" msgstr "Gränssnitt" -#: gitk:11432 +#: gitk:11635 msgid "interface" msgstr "gränssnitt" -#: gitk:11435 +#: gitk:11638 msgid "Background" msgstr "Bakgrund" -#: gitk:11436 gitk:11466 +#: gitk:11639 gitk:11681 msgid "background" msgstr "bakgrund" -#: gitk:11439 +#: gitk:11642 msgid "Foreground" msgstr "Förgrund" -#: gitk:11440 +#: gitk:11643 msgid "foreground" msgstr "förgrund" -#: gitk:11443 +#: gitk:11646 msgid "Diff: old lines" msgstr "Diff: gamla rader" -#: gitk:11444 +#: gitk:11647 msgid "diff old lines" msgstr "diff gamla rader" -#: gitk:11448 +#: gitk:11651 +msgid "Diff: old lines bg" +msgstr "Diff: gamla rader bg" + +#: gitk:11653 +msgid "diff old lines bg" +msgstr "diff gamla rader bg" + +#: gitk:11657 msgid "Diff: new lines" msgstr "Diff: nya rader" -#: gitk:11449 +#: gitk:11658 msgid "diff new lines" msgstr "diff nya rader" -#: gitk:11453 +#: gitk:11662 +msgid "Diff: new lines bg" +msgstr "Diff: nya rader bg" + +#: gitk:11664 +msgid "diff new lines bg" +msgstr "diff nya rader bg" + +#: gitk:11668 msgid "Diff: hunk header" msgstr "Diff: delhuvud" -#: gitk:11455 +#: gitk:11670 msgid "diff hunk header" msgstr "diff delhuvud" -#: gitk:11459 +#: gitk:11674 msgid "Marked line bg" msgstr "Markerad rad bakgrund" -#: gitk:11461 +#: gitk:11676 msgid "marked line background" msgstr "markerad rad bakgrund" -#: gitk:11465 +#: gitk:11680 msgid "Select bg" msgstr "Markerad bakgrund" -#: gitk:11474 +#: gitk:11689 msgid "Fonts: press to choose" msgstr "Teckensnitt: tryck för att välja" -#: gitk:11476 +#: gitk:11691 msgid "Main font" msgstr "Huvudteckensnitt" -#: gitk:11477 +#: gitk:11692 msgid "Diff display font" msgstr "Teckensnitt för diffvisning" -#: gitk:11478 +#: gitk:11693 msgid "User interface font" msgstr "Teckensnitt för användargränssnitt" -#: gitk:11500 +#: gitk:11715 msgid "Gitk preferences" msgstr "Inställningar för Gitk" -#: gitk:11509 +#: gitk:11724 msgid "General" msgstr "Allmänt" -#: gitk:11510 +#: gitk:11725 msgid "Colors" msgstr "Färger" -#: gitk:11511 +#: gitk:11726 msgid "Fonts" msgstr "Teckensnitt" -#: gitk:11561 +#: gitk:11776 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: välj färg för %s" -#: gitk:12074 +#: gitk:12289 msgid "" "Sorry, gitk cannot run with this version of Tcl/Tk.\n" " Gitk requires at least Tcl/Tk 8.4." @@ -1369,45 +1419,15 @@ msgstr "" "Gitk kan tyvärr inte köra med denna version av Tcl/Tk.\n" " Gitk kräver åtminstone Tcl/Tk 8.4." -#: gitk:12284 +#: gitk:12507 msgid "Cannot find a git repository here." msgstr "Hittar inget git-arkiv här." -#: gitk:12331 +#: gitk:12554 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" -msgstr "Tvetydigt argument \"%s\": både revision och filnamn" +msgstr "Tvetydigt argument ”%s”: både revision och filnamn" -#: gitk:12343 +#: gitk:12566 msgid "Bad arguments to gitk:" msgstr "Felaktiga argument till gitk:" - -#~ msgid "mc" -#~ msgstr "mc" - -#~ msgid "next" -#~ msgstr "nästa" - -#~ msgid "prev" -#~ msgstr "föreg" - -#~ msgid "CDate" -#~ msgstr "Skapat datum" - -#~ msgid "Cannot find the git directory \"%s\"." -#~ msgstr "Hittar inte git-katalogen \"%s\"." - -#~ msgid "SHA1 ID: " -#~ msgstr "SHA1-id: " - -#~ msgid "- stopping\n" -#~ msgstr "- stannar\n" - -#~ msgid "Tag/Head %s is not known" -#~ msgstr "Tagg/huvud %s är okänt" - -#~ msgid "/\t\tMove to next find hit, or redo find" -#~ msgstr "/\t\tGå till nästa sökträff, eller sök på nytt" - -#~ msgid "Name" -#~ msgstr "Namn" From f823de75a1f4f061c78aa6fff500f35be8d38e69 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sat, 3 Aug 2024 17:22:51 +0200 Subject: [PATCH 0002/1166] git-gui: Remove forced rescan of stat-dirty files. It is possible that stat information of tracked files is modified without actually modifying the content. Plumbing commands would detect such files as modified, so that Git GUI runs `git update-info --refresh` in order to synchronize the cached stat info with the reality. However, this can be an expensive operation in large repositories. As remediation, e534f3a88676 (git-gui: Allow the user to disable update-index --refresh during rescan, 2006-11-07) introduced an option to skip the expensive part. The option was named "trust file modification timestamp". But the catch is that sometimes file timestamps can't be trusted. In this case, a file would remain listed in Unstaged Changes although there are no changes. So 16403d0b1f9d (git-gui: Refresh a file if it has an empty diff, 2006-11-11) introduced a popup message informing the user about the situation and then removed the file from the Unstaged Changes list. Now users had to click away the message box for every file that was stat-dirty. Under the assumption that a file in such a state is not the only one, 124355d32c06 (git-gui: Always start a rescan on an empty diff, 2007-01-22) introduced a forced (potentially expensive) refresh that would de-list all stat-dirty files after the first notification was dismissed. Along came 6c510bee2013 (Lazy man's auto-CRLF, 2007-02-13) in Git. It introduced a new case where a file in the worktree can have no essential differences to the staged version, but still be detected as modified by plumbing commands. This time, however, the index cannot be synchronized fully by `git update-index --refresh`, so that the file remains listed in Unstaged Changes until it is staged manually. Needless to say that the message box now becomes an annoyance, because it must be dismissed every time an affected file is selected, and the file remains listed nevertheless. Remove the message box. Write the notice that no differences were found in the diff panel instead. Also include a link that, when clicked, initiates the rescan. With this scheme, the rescan does not happen automatically anymore, but requires an additional click. (This is now two clicks in total for users who encounter stat-dirty files after enabling the "trust file modification timestamps" option.) However, users whom the rescan does not help (autocrlf-related dirty files) save half the clicks because there is no message box to dismiss. Signed-off-by: Johannes Sixt --- git-gui.sh | 3 ++- lib/diff.tcl | 26 ++++++-------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index 8fe7538e72084d..887d6d596c16fc 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1357,7 +1357,6 @@ set current_diff_path {} set is_3way_diff 0 set is_submodule_diff 0 set is_conflict_diff 0 -set diff_empty_count 0 set last_revert {} set last_revert_enc {} @@ -3594,6 +3593,8 @@ $ui_diff tag configure clr1 -font font_diffbold $ui_diff tag configure clr4 -underline 1 $ui_diff tag conf d_info -foreground blue -font font_diffbold +$ui_diff tag conf d_rescan -foreground blue -underline 1 -font font_diffbold +$ui_diff tag bind d_rescan { clear_diff; rescan ui_ready 0 } $ui_diff tag conf d_cr -elide true $ui_diff tag conf d_@ -font font_diffbold diff --git a/lib/diff.tcl b/lib/diff.tcl index 871ad488c2a1c0..d657bfec05b498 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -63,28 +63,17 @@ proc force_diff_encoding {enc} { } proc handle_empty_diff {} { - global current_diff_path file_states file_lists - global diff_empty_count + global current_diff_path file_states + global ui_diff set path $current_diff_path set s $file_states($path) if {[lindex $s 0] ne {_M} || [has_textconv $path]} return - # Prevent infinite rescan loops - incr diff_empty_count - if {$diff_empty_count > 1} return - - info_popup [mc "No differences detected. - -%s has no changes. - -The modification date of this file was updated by another application, but the content within the file was not changed. - -A rescan will be automatically started to find other files which may have the same state." [short_path $path]] - - clear_diff - display_file $path __ - rescan ui_ready 0 + $ui_diff conf -state normal + $ui_diff insert end [mc "* No differences detected; stage the file to de-list it from Unstaged Changes.\n"] d_info + $ui_diff insert end [mc "* Click to find other files that may have the same state.\n"] d_rescan + $ui_diff conf -state disabled } proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} { @@ -387,7 +376,6 @@ proc read_diff {fd conflict_size cont_info} { global ui_diff diff_active is_submodule_diff global is_3way_diff is_conflict_diff current_diff_header global current_diff_queue - global diff_empty_count $ui_diff conf -state normal while {[gets $fd line] >= 0} { @@ -559,8 +547,6 @@ proc read_diff {fd conflict_size cont_info} { if {[$ui_diff index end] eq {2.0}} { handle_empty_diff - } else { - set diff_empty_count 0 } set callback [lindex $cont_info 1] From 1ae85ff6d418238b8d987c9e019bd785e3ae7192 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Aug 2024 11:06:30 +0200 Subject: [PATCH 0003/1166] git-gui: strip comments and consecutive empty lines from commit messages This is also known as "washing". This is consistent with the behavior of interactive git commit, which we should emulate as closely as possible to avoid usability problems. This way commit message templates and prepare hooks can be used properly, and comments from conflicted rebases and merges are cleaned up without having to introduce special handling for them. Signed-off-by: Oswald Buddenhagen Signed-off-by: Johannes Sixt --- lib/commit.tcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/commit.tcl b/lib/commit.tcl index 11379f8ad355e2..f00a6346242942 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -209,6 +209,10 @@ You must stage at least 1 file before you can commit. # set msg [string trim [$ui_comm get 1.0 end]] regsub -all -line {[ \t\r]+$} $msg {} msg + # Strip comment lines + regsub -all {(^|\n)#[^\n]*} $msg {\1} msg + # Compress consecutive empty lines + regsub -all {\n{3,}} $msg "\n\n" msg if {$msg eq {}} { error_popup [mc "Please supply a commit message. From 90934966bbac07d8d480b5257ba50945f0ec45c8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Aug 2024 11:06:31 +0200 Subject: [PATCH 0004/1166] git-gui: strip commit messages less aggressively We would strip all leading and trailing whitespace, which git commit does not. Let's be consistent here. Signed-off-by: Oswald Buddenhagen Signed-off-by: Johannes Sixt --- lib/commit.tcl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/commit.tcl b/lib/commit.tcl index f00a6346242942..208dc2817ca68c 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -207,12 +207,17 @@ You must stage at least 1 file before you can commit. # -- A message is required. # - set msg [string trim [$ui_comm get 1.0 end]] + set msg [$ui_comm get 1.0 end] + # Strip trailing whitespace regsub -all -line {[ \t\r]+$} $msg {} msg # Strip comment lines regsub -all {(^|\n)#[^\n]*} $msg {\1} msg + # Strip leading empty lines + regsub {^\n*} $msg {} msg # Compress consecutive empty lines regsub -all {\n{3,}} $msg "\n\n" msg + # Strip trailing empty line + regsub {\n\n$} $msg "\n" msg if {$msg eq {}} { error_popup [mc "Please supply a commit message. From 8ff65c7a53144bf9f90709ff3fe47cf83f82e8eb Mon Sep 17 00:00:00 2001 From: Tobias Boesch Date: Thu, 12 Sep 2024 10:17:57 +0000 Subject: [PATCH 0005/1166] git gui: add directly calling merge tool from configuration git gui can open a merge tool when conflicts are detected (Right click in the diff of the file with conflicts). The merge tools that are allowed to use are hard coded into git gui. If one wants to add a new merge tool it has to be added to git gui through a source code change. This is not convenient in comparison to how it works in git (without gui). git itself has configuration options for a merge tools path and command in the git configuration. New merge tools can be set up there without a source code change. Those options are used only by pure git in contrast to git gui. git calls the configured merge tools directly from the configuration while git Gui doesn't. With this change git gui can call merge tools configured in the configuration directly without a change in git gui source code. It needs a configured "merge.tool" and a configured "mergetool..cmd" configuration entry as shown in the git-config manual page. Configuration example: [merge] tool = vscode [mergetool "vscode"] cmd = \"the/path/to/Code.exe\" --wait --merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" Without the "mergetool..cmd" entry and an unsupported "merge.tool" entry, git gui behaves mainly as before this change and informs the user about an unsupported merge tool. In addtition, it also shows a hint to add a configuration entry to use the tool as an unsupported tool with degraded support. If a wrong "mergetool..cmd" is configured by accident, it gets handled by git gui already. In this case git gui informs the user that the merge tool couldn't be opened. This behavior is preserved by this change and should not change. "Beyond Compare 3" and "Visual Studio Code" were tested as manually configured merge tools. Signed-off-by: Tobias Boesch Signed-off-by: Johannes Sixt --- lib/mergetool.tcl | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl index e688b016ef6c9d..8b8c16b1d616b6 100644 --- a/lib/mergetool.tcl +++ b/lib/mergetool.tcl @@ -272,8 +272,25 @@ proc merge_resolve_tool2 {} { } } default { - error_popup [mc "Unsupported merge tool '%s'" $tool] - return + set tool_cmd [get_config mergetool.$tool.cmd] + if {$tool_cmd ne {}} { + if {([string first {[} $tool_cmd] != -1) || ([string first {]} $tool_cmd] != -1)} { + error_popup [mc "Unable to process square brackets in \"mergetool.%s.cmd\" configuration option. + +Please remove the square brackets." $tool] + return + } else { + set cmdline {} + foreach command_part $tool_cmd { + lappend cmdline [subst -nobackslashes -nocommands $command_part] + } + } + } else { + error_popup [mc "Unsupported merge tool '%s'. + +To use this tool, configure \"mergetool.%s.cmd\" as shown in the git-config manual page." $tool $tool] + return + } } } From 992f7a4fdbadda9f30ff3a8995e966f0562bc73a Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 23 Sep 2024 03:54:16 -0400 Subject: [PATCH 0006/1166] worktree: repair copied repository and linked worktrees For each linked worktree, Git maintains two pointers: (1) /worktrees//gitdir which points at the linked worktree, and (2) /.git which points back at /worktrees/. Both pointers are absolute pathnames. Aside from manually manipulating those raw files, it is possible to easily "break" one or both pointers by ignoring the "git worktree move" command and instead manually moving a linked worktree, moving the repository, or moving both. The "git worktree repair" command was invented to handle this case by restoring these pointers to sane values. For the "repair" command, the "git worktree" manual page states: Repair worktree administrative files, if possible, if they have become corrupted or outdated due to external factors. The "if possible" clause was chosen deliberately to convey that the existing implementation may not be able to fix every possible breakage, and to imply that improvements may be made to handle other types of breakage. A recent problem report[*] illustrates a case in which "git worktree repair" not only fails to fix breakage, but actually causes breakage. Specifically, if a repository / main-worktree and linked worktrees are *copied* as a unit (rather than *moved*), then "git worktree repair" run in the copy leaves the copy untouched but botches the pointers in the original repository and the original worktrees. For instance, given this directory structure: orig/ main/ (main-worktree) linked/ (linked worktree) if "orig" is copied (not moved) to "dup", then immediately after the manual copy operation: * orig/main/.git/worktrees/linked/gitdir points at orig/linked/.git * orig/linked/.git points at orig/main/.git/worktrees/linked * dup/main/.git/worktrees/linked/gitdir points at orig/linked/.git * dup/linked/.git points at orig/main/.git/worktrees/linked So, dup/main thinks its linked worktree is orig/linked, and worktree dup/linked thinks its repository / main-worktree is orig/main. "git worktree repair" is reasonably simple-minded; it wants to trust valid-looking pointers, hence doesn't try to second-guess them. In this case, when validating dup/linked/.git, it finds a legitimate repository pointer, orig/main/.git/worktrees/linked, thus trusts that is correct, but does notice that gitdir in that directory doesn't point at dup/linked/.git, so it (incorrectly) _fixes_ orig/main/.git/worktrees/linked/gitdir to point at dup/linked/.git. Similarly, when validating dup/main/.git/worktrees/linked/gitdir, it finds a legitimate worktree pointer, orig/linked/.git, but notices that its .git file doesn't point back at dup/main, thus (incorrectly) _fixes_ orig/linked/.git to point at dup/main/.git/worktrees/linked. Hence, it has modified and broken the linkage between orig/main and orig/linked rather than fixing dup/main and dup/linked as expected. Fix this problem by also checking if a plausible .git/worktrees/ exists in the *current* repository -- not just in the repository pointed at by the worktree's .git file -- and comparing whether they are the same. If not, then it is likely because the repository / main-worktree and linked worktrees were copied, so prefer the discovered plausible pointer rather than the one from the existing .git file. [*]: https://lore.kernel.org/git/E1sr5iF-0007zV-2k@binarylane-bailey.stuart.id.au/ Reported-by: Russell Stuart Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 2 +- t/t2406-worktree-repair.sh | 19 ++++++++++++++++ worktree.c | 40 +++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 2a240f53ba7f98..70437c815f1385 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -157,7 +157,7 @@ will reestablish the connection. If multiple linked worktrees are moved, running `repair` from any worktree with each tree's new `` as an argument, will reestablish the connection to all the specified paths. + -If both the main worktree and linked worktrees have been moved manually, +If both the main worktree and linked worktrees have been moved or copied manually, then running `repair` in the main worktree and specifying the new `` of each linked worktree will reestablish all connections in both directions. diff --git a/t/t2406-worktree-repair.sh b/t/t2406-worktree-repair.sh index edbf502ec57bb7..7686e60f6ad186 100755 --- a/t/t2406-worktree-repair.sh +++ b/t/t2406-worktree-repair.sh @@ -197,4 +197,23 @@ test_expect_success 'repair moved main and linked worktrees' ' test_cmp expect-gitfile sidemoved/.git ' +test_expect_success 'repair copied main and linked worktrees' ' + test_when_finished "rm -rf orig dup" && + mkdir -p orig && + git -C orig init main && + test_commit -C orig/main nothing && + git -C orig/main worktree add ../linked && + cp orig/main/.git/worktrees/linked/gitdir orig/main.expect && + cp orig/linked/.git orig/linked.expect && + cp -R orig dup && + sed "s,orig/linked/\.git$,dup/linked/.git," orig/main.expect >dup/main.expect && + sed "s,orig/main/\.git/worktrees/linked$,dup/main/.git/worktrees/linked," \ + orig/linked.expect >dup/linked.expect && + git -C dup/main worktree repair ../linked && + test_cmp orig/main.expect orig/main/.git/worktrees/linked/gitdir && + test_cmp orig/linked.expect orig/linked/.git && + test_cmp dup/main.expect dup/main/.git/worktrees/linked/gitdir && + test_cmp dup/linked.expect dup/linked/.git +' + test_done diff --git a/worktree.c b/worktree.c index f3c4c8ec54d6c4..28cc2ac7078351 100644 --- a/worktree.c +++ b/worktree.c @@ -683,6 +683,7 @@ void repair_worktree_at_path(const char *path, struct strbuf gitdir = STRBUF_INIT; struct strbuf olddotgit = STRBUF_INIT; char *backlink = NULL; + char *inferred_backlink = NULL; const char *repair = NULL; int err; @@ -698,12 +699,24 @@ void repair_worktree_at_path(const char *path, goto done; } + inferred_backlink = infer_backlink(realdotgit.buf); backlink = xstrdup_or_null(read_gitfile_gently(realdotgit.buf, &err)); if (err == READ_GITFILE_ERR_NOT_A_FILE) { fn(1, realdotgit.buf, _("unable to locate repository; .git is not a file"), cb_data); goto done; } else if (err == READ_GITFILE_ERR_NOT_A_REPO) { - if (!(backlink = infer_backlink(realdotgit.buf))) { + if (inferred_backlink) { + /* + * Worktree's .git file does not point at a repository + * but we found a .git/worktrees/ in this + * repository with the same as recorded in the + * worktree's .git file so make the worktree point at + * the discovered .git/worktrees/. (Note: backlink + * is already NULL, so no need to free it first.) + */ + backlink = inferred_backlink; + inferred_backlink = NULL; + } else { fn(1, realdotgit.buf, _("unable to locate repository; .git file does not reference a repository"), cb_data); goto done; } @@ -712,6 +725,30 @@ void repair_worktree_at_path(const char *path, goto done; } + /* + * If we got this far, either the worktree's .git file pointed at a + * valid repository (i.e. read_gitfile_gently() returned success) or + * the .git file did not point at a repository but we were able to + * infer a suitable new value for the .git file by locating a + * .git/worktrees/ in *this* repository corresponding to the + * recorded in the worktree's .git file. + * + * However, if, at this point, inferred_backlink is non-NULL (i.e. we + * found a suitable .git/worktrees/ in *this* repository) *and* the + * worktree's .git file points at a valid repository *and* those two + * paths differ, then that indicates that the user probably *copied* + * the main and linked worktrees to a new location as a unit rather + * than *moving* them. Thus, the copied worktree's .git file actually + * points at the .git/worktrees/ in the *original* repository, not + * in the "copy" repository. In this case, point the "copy" worktree's + * .git file at the "copy" repository. + */ + if (inferred_backlink && fspathcmp(backlink, inferred_backlink)) { + free(backlink); + backlink = inferred_backlink; + inferred_backlink = NULL; + } + strbuf_addf(&gitdir, "%s/gitdir", backlink); if (strbuf_read_file(&olddotgit, gitdir.buf, 0) < 0) repair = _("gitdir unreadable"); @@ -727,6 +764,7 @@ void repair_worktree_at_path(const char *path, } done: free(backlink); + free(inferred_backlink); strbuf_release(&olddotgit); strbuf_release(&gitdir); strbuf_release(&realdotgit); From 90e82eb01eec453051ea34e116c4087bb4415284 Mon Sep 17 00:00:00 2001 From: Andrew Kreimer Date: Mon, 23 Sep 2024 14:03:42 +0300 Subject: [PATCH 0007/1166] Documentation/config: fix typos Fix typos in documentation. Signed-off-by: Andrew Kreimer Signed-off-by: Junio C Hamano --- Documentation/config/extensions.txt | 2 +- Documentation/config/gc.txt | 2 +- Documentation/config/remote.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/config/extensions.txt b/Documentation/config/extensions.txt index 38dce3df359761..f0a784447db098 100644 --- a/Documentation/config/extensions.txt +++ b/Documentation/config/extensions.txt @@ -9,7 +9,7 @@ work and will produce hard-to-diagnose issues. extensions.compatObjectFormat:: - Specify a compatitbility hash algorithm to use. The acceptable values + Specify a compatibility hash algorithm to use. The acceptable values are `sha1` and `sha256`. The value specified must be different from the value of extensions.objectFormat. This allows client level interoperability between git repositories whose objectFormat matches diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index 1d4f9470ead207..21d56db2798935 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -163,7 +163,7 @@ gc.repackFilterTo:: containing the filtered out objects. **WARNING:** The specified location should be accessible, using for example the Git alternates mechanism, otherwise the repo could be - considered corrupt by Git as it migh not be able to access the + considered corrupt by Git as it might not be able to access the objects in that packfile. See the `--filter-to=` option of linkgit:git-repack[1] and the `objects/info/alternates` section of linkgit:gitrepository-layout[5]. diff --git a/Documentation/config/remote.txt b/Documentation/config/remote.txt index 36e771556c67aa..71d1fee835ffa6 100644 --- a/Documentation/config/remote.txt +++ b/Documentation/config/remote.txt @@ -50,7 +50,7 @@ remote..skipFetchAll:: If true, this remote will be skipped when updating using linkgit:git-fetch[1], the `update` subcommand of linkgit:git-remote[1], and ignored by the prefetch task - of `git maitenance`. + of `git maintenance`. remote..receivepack:: The default program to execute on the remote side when pushing. See From 9310f10e2bd33ceb87d775fd7d6d6847c8e4501d Mon Sep 17 00:00:00 2001 From: Andrew Kreimer Date: Mon, 23 Sep 2024 14:03:43 +0300 Subject: [PATCH 0008/1166] Documentation: fix typos Fix typos in documentation. Signed-off-by: Andrew Kreimer Signed-off-by: Junio C Hamano --- Documentation/BreakingChanges.txt | 2 +- Documentation/DecisionMaking.txt | 2 +- Documentation/gitformat-commit-graph.txt | 2 +- Documentation/gitweb.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/BreakingChanges.txt b/Documentation/BreakingChanges.txt index 2b64665694f6a9..112770a9daf584 100644 --- a/Documentation/BreakingChanges.txt +++ b/Documentation/BreakingChanges.txt @@ -117,7 +117,7 @@ Cf. <20140304174806.GA11561@sigill.intra.peff.net>. * The git-pack-redundant(1) command can be used to remove redundant pack files. The subcommand is unusably slow and the reason why nobody reports it as a - performance bug is suspected to be the absense of users. We have nominated + performance bug is suspected to be the absence of users. We have nominated the command for removal and have started to emit a user-visible warning in c3b58472be (pack-redundant: gauge the usage before proposing its removal, 2020-08-25) whenever the command is executed. diff --git a/Documentation/DecisionMaking.txt b/Documentation/DecisionMaking.txt index dbb4c1f56981d0..b43c472ae598ed 100644 --- a/Documentation/DecisionMaking.txt +++ b/Documentation/DecisionMaking.txt @@ -54,7 +54,7 @@ implementation, for very large changes). For non-technical decisions such as community norms or processes, it is up to the community as a whole to implement and sustain agreed-upon changes. -The project leadership committe (PLC) may help the implementation of +The project leadership committee (PLC) may help the implementation of policy decisions. diff --git a/Documentation/gitformat-commit-graph.txt b/Documentation/gitformat-commit-graph.txt index 3e906e803096df..14d163123402b7 100644 --- a/Documentation/gitformat-commit-graph.txt +++ b/Documentation/gitformat-commit-graph.txt @@ -122,7 +122,7 @@ All multi-byte numbers are in network byte order. for commits with corrected commit date offsets that cannot be stored within 31 bits. * Generation Data Overflow chunk is present only when Generation Data - chunk is present and atleast one corrected commit date offset cannot + chunk is present and at least one corrected commit date offset cannot be stored within 31 bits. ==== Extra Edge List (ID: {'E', 'D', 'G', 'E'}) [Optional] diff --git a/Documentation/gitweb.txt b/Documentation/gitweb.txt index 56d24a30a3f7b9..5e2b491ec2256b 100644 --- a/Documentation/gitweb.txt +++ b/Documentation/gitweb.txt @@ -234,7 +234,7 @@ from the template during repository creation, usually installed in configuration variable, but the file takes precedence. category (or `gitweb.category`):: - Singe line category of a project, used to group projects if + Single line category of a project, used to group projects if `$projects_list_group_categories` is enabled. By default (file and configuration variable absent), uncategorized projects are put in the `$project_list_default_category` category. You can use the From 537e516a39a760fddc4f3f5020c4118943f6c146 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 23 Sep 2024 19:31:22 +0000 Subject: [PATCH 0009/1166] sparse-checkout: disable advice in 'disable' When running 'git sparse-checkout disable' with the sparse index enabled, Git is expected to expand the index into a full index. However, it currently outputs the advice message saying that that is unexpected and likely due to an issue with the working directory. Disable this advice message when in this code path. Establish a pattern for doing a similar removal in the future. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- builtin/sparse-checkout.c | 5 +++++ sparse-index.c | 5 +++-- sparse-index.h | 7 +++++++ t/t1092-sparse-checkout-compatibility.sh | 5 ++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c index 2604ab04df5aee..fe4f11390c915a 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -925,6 +925,11 @@ static int sparse_checkout_disable(int argc, const char **argv, builtin_sparse_checkout_disable_options, builtin_sparse_checkout_disable_usage, 0); + /* + * Disable the advice message for expanding a sparse index, as we + * are expecting to do that when disabling sparse-checkout. + */ + give_advice_on_expansion = 0; repo_read_index(the_repository); memset(&pl, 0, sizeof(pl)); diff --git a/sparse-index.c b/sparse-index.c index 9958656ded1931..0f9fb4df026f0f 100644 --- a/sparse-index.c +++ b/sparse-index.c @@ -19,9 +19,10 @@ * advice for advice.sparseIndexExpanded when expanding a sparse index to a full * one. However, this is sometimes done on purpose, such as in the sparse-checkout * builtin, even when index.sparse=false. This may be disabled in - * convert_to_sparse(). + * convert_to_sparse() or by commands that know they will lead to a full + * expansion, but this message is not actionable. */ -static int give_advice_on_expansion = 1; +int give_advice_on_expansion = 1; #define ADVICE_MSG \ "The sparse index is expanding to a full index, a slow operation.\n" \ "Your working directory likely has contents that are outside of\n" \ diff --git a/sparse-index.h b/sparse-index.h index a16f3e67d75913..727034be7ca917 100644 --- a/sparse-index.h +++ b/sparse-index.h @@ -1,6 +1,13 @@ #ifndef SPARSE_INDEX_H__ #define SPARSE_INDEX_H__ +/* + * If performing an operation where the index is supposed to expand to a + * full index, then disable the advice message by setting this global to + * zero. + */ +extern int give_advice_on_expansion; + struct index_state; #define SPARSE_INDEX_MEMORY_ONLY (1 << 0) int is_sparse_index_allowed(struct index_state *istate, int flags); diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh index a2c0e1b4dcc564..e3834b84013dd0 100755 --- a/t/t1092-sparse-checkout-compatibility.sh +++ b/t/t1092-sparse-checkout-compatibility.sh @@ -2342,7 +2342,10 @@ test_expect_success 'advice.sparseIndexExpanded' ' mkdir -p sparse-index/deep/deeper2/deepest && touch sparse-index/deep/deeper2/deepest/bogus && git -C sparse-index status 2>err && - grep "The sparse index is expanding to a full index" err + grep "The sparse index is expanding to a full index" err && + + git -C sparse-index sparse-checkout disable 2>err && + test_line_count = 0 err ' test_done From 974cdca345cc51fb8623c611a25314f98b2cd3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Date: Tue, 24 Sep 2024 07:08:48 +0000 Subject: [PATCH 0010/1166] doc: introduce a synopsis typesetting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to follow the common manpage usage, the synopsis of the commands needs to be heavily typeset. A first try was performed with using native markup, but it turned out to make the document source almost unreadable, difficult to write and prone to mistakes with unwanted Asciidoc's role attributes. In order to both simplify the writer's task and obtain a consistant typesetting in the synopsis, a custom 'synopsis' paragraph type is created and the processor for backticked text are modified. The backends of asciidoc and asciidoctor take in charge to correctly add the required typesetting. Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- Documentation/asciidoc.conf | 20 ++++++ Documentation/asciidoctor-extensions.rb | 87 +++++++++++++++++++++++++ ci/install-dependencies.sh | 1 + t/t0450-txt-doc-vs-help.sh | 11 ++-- 4 files changed, 112 insertions(+), 7 deletions(-) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 60f76f43edab75..f6da6d1fbd2b20 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -28,6 +28,10 @@ ifdef::backend-docbook[] {0#} {0#{target}{0}} {0#} + +[literal-inlinemacro] +{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} + endif::backend-docbook[] ifdef::backend-docbook[] @@ -56,4 +60,20 @@ ifdef::backend-xhtml11[] git-relative-html-prefix= [linkgit-inlinemacro] {target}{0?({0})} + +[literal-inlinemacro] +{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} + +endif::backend-xhtml11[] + +ifdef::backend-docbook[] +ifdef::doctype-manpage[] +[paradef-default] +synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" +endif::doctype-manpage[] +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[paradef-default] +synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" endif::backend-xhtml11[] diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb index d906a008039cf5..cb24480b63d2ec 100644 --- a/Documentation/asciidoctor-extensions.rb +++ b/Documentation/asciidoctor-extensions.rb @@ -1,5 +1,7 @@ require 'asciidoctor' require 'asciidoctor/extensions' +require 'asciidoctor/converter/docbook5' +require 'asciidoctor/converter/html5' module Git module Documentation @@ -39,10 +41,95 @@ def process document, output output end end + + class SynopsisBlock < Asciidoctor::Extensions::BlockProcessor + + use_dsl + named :synopsis + parse_content_as :simple + + def process parent, reader, attrs + outlines = reader.lines.map do |l| + l.gsub(/(\.\.\.?)([^\]$.])/, '`\1`\2') + .gsub(%r{([\[\] |()>]|^)([-a-zA-Z0-9:+=~@,/_^\$]+)}, '\1{empty}`\2`{empty}') + .gsub(/(<[-a-zA-Z0-9.]+>)/, '__\\1__') + .gsub(']', ']{empty}') + end + create_block parent, :verse, outlines, attrs + end + end + + class GitDBConverter < Asciidoctor::Converter::DocBook5Converter + + extend Asciidoctor::Converter::Config + register_for 'docbook5' + + def convert_inline_quoted node + if (type = node.type) == :asciimath + # NOTE fop requires jeuclid to process mathml markup + asciimath_available? ? %(#{(::AsciiMath.parse node.text).to_mathml 'mml:', 'xmlns:mml' => 'http://www.w3.org/1998/Math/MathML'}) : %() + elsif type == :latexmath + # unhandled math; pass source to alt and required mathphrase element; dblatex will process alt as LaTeX math + %() + elsif type == :monospaced + node.text.gsub(/(\.\.\.?)([^\]$.])/, '\1\2') + .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1\2') + .gsub(/(<[-a-zA-Z0-9.]+>)/, '\1') + else + open, close, supports_phrase = QUOTE_TAGS[type] + text = node.text + if node.role + if supports_phrase + quoted_text = %(#{open}#{text}#{close}) + else + quoted_text = %(#{open.chop} role="#{node.role}">#{text}#{close}) + end + else + quoted_text = %(#{open}#{text}#{close}) + end + node.id ? %(#{quoted_text}) : quoted_text + end + end + end + + # register a html5 converter that takes in charge to convert monospaced text into Git style synopsis + class GitHTMLConverter < Asciidoctor::Converter::Html5Converter + + extend Asciidoctor::Converter::Config + register_for 'html5' + + def convert_inline_quoted node + if node.type == :monospaced + node.text.gsub(/(\.\.\.?)([^\]$.])/, '\1\2') + .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1\2') + .gsub(/(<[-a-zA-Z0-9.]+>)/, '\1') + + else + open, close, tag = QUOTE_TAGS[node.type] + if node.id + class_attr = node.role ? %( class="#{node.role}") : '' + if tag + %(#{open.chop} id="#{node.id}"#{class_attr}>#{node.text}#{close}) + else + %(#{open}#{node.text}#{close}) + end + elsif node.role + if tag + %(#{open.chop} class="#{node.role}">#{node.text}#{close}) + else + %(#{open}#{node.text}#{close}) + end + else + %(#{open}#{node.text}#{close}) + end + end + end + end end end Asciidoctor::Extensions.register do inline_macro Git::Documentation::LinkGitProcessor, :linkgit + block Git::Documentation::SynopsisBlock postprocessor Git::Documentation::DocumentPostProcessor end diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 6ec0f85972f1f9..87d1596b794973 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -103,6 +103,7 @@ Documentation) test -n "$ALREADY_HAVE_ASCIIDOCTOR" || sudo gem install --version 1.5.8 asciidoctor + sudo gem install concurrent-ruby ;; esac diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh index 69917d7b8459c6..f99a69ae1b74a9 100755 --- a/t/t0450-txt-doc-vs-help.sh +++ b/t/t0450-txt-doc-vs-help.sh @@ -56,14 +56,11 @@ txt_to_synopsis () { fi && b2t="$(builtin_to_txt "$builtin")" && sed -n \ - -e '/^\[verse\]$/,/^$/ { + -E '/^\[(verse|synopsis)\]$/,/^$/ { /^$/d; - /^\[verse\]$/d; - s/_//g; - s/++//g; - s/`//g; - s/{litdd}/--/g; - s/'\''\(git[ a-z-]*\)'\''/\1/g; + /^\[(verse|synopsis)\]$/d; + s/\{litdd\}/--/g; + s/'\''(git[ a-z-]*)'\''/\1/g; p; }' \ From 029eff9e34fcb622b6eabe9e695fa502a714df4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Date: Tue, 24 Sep 2024 07:08:49 +0000 Subject: [PATCH 0011/1166] doc: update the guidelines to reflect the current formatting rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 58 ++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 1d92b2da03e8ca..d1e3e4017d8556 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -738,78 +738,80 @@ Markup: __ __ - A placeholder is not enclosed in backticks, as it is not a literal. - When needed, use a distinctive identifier for placeholders, usually made of a qualification and a type: __ __ - When literal and placeholders are mixed, each markup is applied for - each sub-entity. If they are stuck, a special markup, called - unconstrained formatting is required. - Unconstrained formating for placeholders is ____ - Unconstrained formatting for literal formatting is ++like this++ - `--jobs` __ - ++--sort=++____ - ____++/.git++ - ++remote.++____++.mirror++ + Git's Asciidoc processor has been tailored to treat backticked text + as complex synopsis. When literal and placeholders are mixed, you can + use the backtick notation which will take care of correctly typesetting + the content. + `--jobs ` + `--sort=` + `/.git` + `remote..mirror` + `ssh://[@][:]/` - caveat: ++ unconstrained format is not verbatim and may expand - content. Use Asciidoc escapes inside them. +As a side effect, backquoted placeholders are correctly typeset, but +this style is not recommended. Synopsis Syntax - Syntax grammar is formatted neither as literal nor as placeholder. + The synopsis (a paragraph with [synopsis] attribute) is automatically + formatted by the toolchain and does not need typesetting. A few commented examples follow to provide reference when writing or modifying command usage strings and synopsis sections in the manual pages: Possibility of multiple occurrences is indicated by three dots: - __... + ... (One or more of .) Optional parts are enclosed in square brackets: - [__...] + [...] (Zero or more of .) - ++--exec-path++[++=++____] + An optional parameter needs to be typeset with unconstrained pairs + [] + + --exec-path[=] (Option with an optional argument. Note that the "=" is inside the brackets.) - [__...] + [...] (Zero or more of . Note that the dots are inside, not outside the brackets.) Multiple alternatives are indicated with vertical bars: - [`-q` | `--quiet`] - [`--utf8` | `--no-utf8`] + [-q | --quiet] + [--utf8 | --no-utf8] Use spacing around "|" token(s), but not immediately after opening or before closing a [] or () pair: - Do: [`-q` | `--quiet`] - Don't: [`-q`|`--quiet`] + Do: [-q | --quiet] + Don't: [-q|--quiet] Don't use spacing around "|" tokens when they're used to separate the alternate arguments of an option: - Do: ++--track++[++=++(`direct`|`inherit`)]` - Don't: ++--track++[++=++(`direct` | `inherit`)] + Do: --track[=(direct|inherit)] + Don't: --track[=(direct | inherit)] Parentheses are used for grouping: - [(__ | __)...] + [(|)...] (Any number of either or . Parens are needed to make it clear that "..." pertains to both and .) - [(`-p` __)...] + [(-p )...] (Any number of option -p, each with one argument.) - `git remote set-head` __ (`-a` | `-d` | __) + git remote set-head (-a|-d|) (One and only one of "-a", "-d" or "" _must_ (no square brackets) be provided.) And a somewhat more contrived example: - `--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]` + --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]] Here "=" is outside the brackets, because "--diff-filter=" is a valid usage. "*" has its own pair of brackets, because it can (optionally) be specified only when one or more of the letters is From 22293895c000e89997b2197a7b2b17cdf3a36369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Date: Tue, 24 Sep 2024 07:08:50 +0000 Subject: [PATCH 0012/1166] doc: apply synopsis simplification on git-clone and git-init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the new synopsis formatting backend, no special asciidoc markup is needed. Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 78 ++++++++++++++++++------------------- Documentation/git-init.txt | 35 +++++++---------- Documentation/urls.txt | 26 ++++++------- 3 files changed, 67 insertions(+), 72 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 8e925db7e9c662..9c13f847da3ed2 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -8,16 +8,16 @@ git-clone - Clone a repository into a new directory SYNOPSIS -------- -[verse] -`git clone` [++--template=++____] - [`-l`] [`-s`] [`--no-hardlinks`] [`-q`] [`-n`] [`--bare`] [`--mirror`] - [`-o` __] [`-b` __] [`-u` __] [`--reference` __] - [`--dissociate`] [`--separate-git-dir` __] - [`--depth` __] [`--`[`no-`]{empty}`single-branch`] [`--no-tags`] - [++--recurse-submodules++[++=++____]] [++--++[++no-++]{empty}++shallow-submodules++] - [`--`[`no-`]{empty}`remote-submodules`] [`--jobs` __] [`--sparse`] [`--`[`no-`]{empty}`reject-shallow`] - [++--filter=++____] [`--also-filter-submodules`]] [`--`] __ - [__] +[synopsis] +git clone [--template=] + [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] + [-o ] [-b ] [-u ] [--reference ] + [--dissociate] [--separate-git-dir ] + [--depth ] [--[no-]single-branch] [--no-tags] + [--recurse-submodules[=]] [--[no-]shallow-submodules] + [--[no-]remote-submodules] [--jobs ] [--sparse] [--[no-]reject-shallow] + [--filter=] [--also-filter-submodules]] [--] + [] DESCRIPTION ----------- @@ -52,7 +52,7 @@ OPTIONS to save space when possible. + If the repository is specified as a local path (e.g., `/path/to/repo`), -this is the default, and --local is essentially a no-op. If the +this is the default, and `--local` is essentially a no-op. If the repository is specified as a URL, then this flag is ignored (and we never use the local optimizations). Specifying `--no-local` will override the default when `/path/to/repo` is given, using the regular @@ -64,8 +64,8 @@ prevent the unintentional copying of files by dereferencing the symbolic links. + *NOTE*: this operation can race with concurrent modification to the -source repository, similar to running `cp -r src dst` while modifying -`src`. +source repository, similar to running `cp -r ` while modifying +__. `--no-hardlinks`:: Force the cloning process from a repository on a local @@ -101,7 +101,7 @@ If you want to break the dependency of a repository cloned with `--shared` on its source repository, you can simply run `git repack -a` to copy all objects from the source repository into a pack in the cloned repository. -`--reference`[`-if-able`] __:: +`--reference[-if-able] `:: If the reference __ is on the local machine, automatically setup `.git/objects/info/alternates` to obtain objects from the reference __. Using @@ -142,17 +142,17 @@ objects from the source repository into a pack in the cloned repository. is specified. This flag forces progress status even if the standard error stream is not directed to a terminal. -++--server-option=++__