Skip to content

Commit 9d89012

Browse files
committed
enhance: bisect
- Show skipped commits - Avoid marking a single commit multiple times - Update button states and tooltips Signed-off-by: leo <longshuang@msn.cn>
1 parent 57a3d69 commit 9d89012

19 files changed

Lines changed: 97 additions & 69 deletions

src/Models/Bisect.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ public enum BisectState
77
{
88
None = 0,
99
WaitingForFirstBad,
10+
WaitingForCheckoutAnother,
1011
WaitingForFirstGood,
11-
Detecting,
12+
WaitingForMark,
1213
}
1314

1415
[Flags]
1516
public enum BisectCommitFlag
1617
{
1718
None = 0,
18-
Good = 1 << 0,
19-
Bad = 1 << 1,
19+
Good,
20+
Bad,
21+
Skipped,
2022
}
2123

2224
public class Bisect
@@ -32,5 +34,11 @@ public HashSet<string> Goods
3234
get;
3335
set;
3436
} = [];
37+
38+
public HashSet<string> Skipped
39+
{
40+
get;
41+
set;
42+
} = [];
3543
}
3644
}

src/Resources/Icons.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
<StreamGeometry x:Key="Icons.ScrollToTop">M155 143h715v81H155V143zm358 94 358 369H662l1 278H363V605H155l358-369z</StreamGeometry>
127127
<StreamGeometry x:Key="Icons.Search">M702 677 590 565a148 148 0 10-25 27L676 703zm-346-200a115 115 0 11115 115A115 115 0 01355 478z</StreamGeometry>
128128
<StreamGeometry x:Key="Icons.Settings">M928 500a21 21 0 00-19-20L858 472a11 11 0 01-9-9c-1-6-2-13-3-19a11 11 0 015-12l46-25a21 21 0 0010-26l-8-22a21 21 0 00-24-13l-51 10a11 11 0 01-12-6c-3-6-6-11-10-17a11 11 0 011-13l34-39a21 21 0 001-28l-15-18a20 20 0 00-27-4l-45 27a11 11 0 01-13-1c-5-4-10-9-15-12a11 11 0 01-3-12l19-49a21 21 0 00-9-26l-20-12a21 21 0 00-27 6L650 193a9 9 0 01-11 3c-1-1-12-5-20-7a11 11 0 01-7-10l1-52a21 21 0 00-17-22l-23-4a21 21 0 00-24 14L532 164a11 11 0 01-11 7h-20a11 11 0 01-11-7l-17-49a21 21 0 00-24-15l-23 4a21 21 0 00-17 22l1 52a11 11 0 01-8 11c-5 2-15 6-19 7c-4 1-8 0-12-4l-33-40A21 21 0 00313 146l-20 12A21 21 0 00285 184l19 49a11 11 0 01-3 12c-5 4-10 8-15 12a11 11 0 01-13 1L228 231a21 21 0 00-27 4L186 253a21 21 0 001 28L221 320a11 11 0 011 13c-3 5-7 11-10 17a11 11 0 01-12 6l-51-10a21 21 0 00-24 13l-8 22a21 21 0 0010 26l46 25a11 11 0 015 12l0 3c-1 6-2 11-3 16a11 11 0 01-9 9l-51 8A21 21 0 0096 500v23A21 21 0 00114 544l51 8a11 11 0 019 9c1 6 2 13 3 19a11 11 0 01-5 12l-46 25a21 21 0 00-10 26l8 22a21 21 0 0024 13l51-10a11 11 0 0112 6c3 6 6 11 10 17a11 11 0 01-1 13l-34 39a21 21 0 00-1 28l15 18a20 20 0 0027 4l45-27a11 11 0 0113 1c5 4 10 9 15 12a11 11 0 013 12l-19 49a21 21 0 009 26l20 12a21 21 0 0027-6L374 832c3-3 7-5 10-4c7 3 12 5 20 7a11 11 0 018 10l-1 52a21 21 0 0017 22l23 4a21 21 0 0024-14l17-50a11 11 0 0111-7h20a11 11 0 0111 7l17 49a21 21 0 0020 15a19 19 0 004 0l23-4a21 21 0 0017-22l-1-52a11 11 0 018-10c8-3 13-5 18-7l1 0c6-2 9 0 11 3l34 41A21 21 0 00710 878l20-12a21 21 0 009-26l-18-49a11 11 0 013-12c5-4 10-8 15-12a11 11 0 0113-1l45 27a21 21 0 0027-4l15-18a21 21 0 00-1-28l-34-39a11 11 0 01-1-13c3-5 7-11 10-17a11 11 0 0112-6l51 10a21 21 0 0024-13l8-22a21 21 0 00-10-26l-46-25a11 11 0 01-5-12l0-3c1-6 2-11 3-16a11 11 0 019-9l51-8a21 21 0 0018-21v-23zm-565 188a32 32 0 01-51 5a270 270 0 011-363a32 32 0 0151 6l91 161a32 32 0 010 31zM512 782a270 270 0 01-57-6a32 32 0 01-20-47l92-160a32 32 0 0127-16h184a32 32 0 0130 41c-35 109-137 188-257 188zm15-328L436 294a32 32 0 0121-47a268 268 0 0155-6c120 0 222 79 257 188a32 32 0 01-30 41h-184a32 32 0 01-28-16z</StreamGeometry>
129+
<StreamGeometry x:Key="Icons.Skip">M622 718v137q0 9-7 16t-16 7H462q-9 0-16-7t-7-16v-137q0-9 7-16t16-7h137q9 0 16 7t7 16zm181-343q0 31-9 58t-20 44-31 34-33 25-35 20q-23 13-39 37t-16 38q0 10-7 19t-16 9H459q-9 0-15-11T439 626v-26q0-47 37-89T558 449q34-15 48-32t14-43q0-24-27-42T532 313q-37 0-62 17-20 14-61 66-7 9-18 9-7 0-14-5L283 329q-7-6-9-14t3-16q91-152 265-152 46 0 92 18t83 47 61 73 23 91z</StreamGeometry>
129130
<StreamGeometry x:Key="Icons.SoftwareUpdate">M900 287c40 69 60 144 60 225s-20 156-60 225c-40 69-94 123-163 163-69 40-144 60-225 60s-156-20-225-60c-69-40-123-94-163-163C84 668 64 593 64 512s20-156 60-225 94-123 163-163c69-40 144-60 225-60s156 20 225 60 123 94 163 163zM762 512c0-9-3-16-9-22L578 315l-44-44c-6-6-13-9-22-9s-16 3-22 9l-44 44-176 176c-6 6-9 13-9 22s3 16 9 22l44 44c6 6 13 9 22 9s16-3 22-9l92-92v269c0 9 3 16 9 22 6 6 13 9 22 9h62c8 0 16-3 22-9 6-6 9-13 9-22V486l92 92c6 6 13 9 22 9 8 0 16-3 22-9l44-44c6-6 9-13 9-22z</StreamGeometry>
130131
<StreamGeometry x:Key="Icons.SquashIntoParent">M512 939C465 939 427 900 427 853 427 806 465 768 512 768 559 768 597 806 597 853 597 900 559 939 512 939M555 85 555 555 747 363 807 423 512 719 217 423 277 363 469 555 469 85 555 85Z</StreamGeometry>
131132
<StreamGeometry x:Key="Icons.Stashes">M961 320 512 577 63 320 512 62l449 258zM512 628 185 442 63 512 512 770 961 512l-123-70L512 628zM512 821 185 634 63 704 512 962l449-258L839 634 512 821z</StreamGeometry>

src/Resources/Locales/de_DE.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
<x:String x:Key="Text.Bisect">Bisect</x:String>
5151
<x:String x:Key="Text.Bisect.Abort">Abbrechen</x:String>
5252
<x:String x:Key="Text.Bisect.Bad">Schlecht</x:String>
53-
<x:String x:Key="Text.Bisect.Detecting">Bisecting. Ist der aktuelle HEAD gut oder schlecht?</x:String>
5453
<x:String x:Key="Text.Bisect.Good">Gut</x:String>
5554
<x:String x:Key="Text.Bisect.Skip">Überspringen</x:String>
5655
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Bisecting. Aktuellen Commit als gut oder schlecht markieren und einen anderen auschecken.</x:String>
56+
<x:String x:Key="Text.Bisect.WaitingForMark">Bisecting. Ist der aktuelle HEAD gut oder schlecht?</x:String>
5757
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
5858
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blame auf vorheriger Revision</x:String>
5959
<x:String x:Key="Text.Blame.IgnoreWhitespace">Leerzeichen-Änderungen ignorieren</x:String>

src/Resources/Locales/el_GR.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<x:String x:Key="Text.Bisect">Bisect</x:String>
5555
<x:String x:Key="Text.Bisect.Abort">Ματαίωση</x:String>
5656
<x:String x:Key="Text.Bisect.Bad">Κακό</x:String>
57-
<x:String x:Key="Text.Bisect.Detecting">Εκτέλεση bisect. Το τρέχον HEAD είναι καλό ή κακό;</x:String>
5857
<x:String x:Key="Text.Bisect.Good">Καλό</x:String>
5958
<x:String x:Key="Text.Bisect.Skip">Παράλειψη</x:String>
6059
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Εκτέλεση bisect. Σημειώστε το τρέχον commit ως καλό ή κακό και κάντε checkout σε άλλο.</x:String>
60+
<x:String x:Key="Text.Bisect.WaitingForMark">Εκτέλεση bisect. Το τρέχον HEAD είναι καλό ή κακό;</x:String>
6161
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
6262
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blame στην προηγούμενη αναθεώρηση</x:String>
6363
<x:String x:Key="Text.Blame.IgnoreWhitespace">Αγνόηση αλλαγών κενών χαρακτήρων</x:String>

src/Resources/Locales/en_US.axaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@
5353
<x:String x:Key="Text.Bisect">Bisect</x:String>
5454
<x:String x:Key="Text.Bisect.Abort">Abort</x:String>
5555
<x:String x:Key="Text.Bisect.Bad">Bad</x:String>
56-
<x:String x:Key="Text.Bisect.Detecting">Bisecting. Is current HEAD good or bad?</x:String>
5756
<x:String x:Key="Text.Bisect.Good">Good</x:String>
5857
<x:String x:Key="Text.Bisect.Skip">Skip</x:String>
58+
<x:String x:Key="Text.Bisect.WaitingForCheckoutAnother">Bisecting. Please checkout another one then mark it as good or bad.</x:String>
5959
<x:String x:Key="Text.Bisect.WaitingForFirstBad">Bisecting. Mark current commit as bad or checkout another one then mark it as bad.</x:String>
6060
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Bisecting. Mark current commit as good or bad and checkout another one.</x:String>
61+
<x:String x:Key="Text.Bisect.WaitingForMark">Bisecting. Is current HEAD good or bad?</x:String>
6162
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
6263
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blame on Previous Revision</x:String>
6364
<x:String x:Key="Text.Blame.IgnoreWhitespace">Ignore whitespace changes</x:String>

src/Resources/Locales/es_ES.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<x:String x:Key="Text.Bisect">Bisect</x:String>
5555
<x:String x:Key="Text.Bisect.Abort">Abortar</x:String>
5656
<x:String x:Key="Text.Bisect.Bad">Malo</x:String>
57-
<x:String x:Key="Text.Bisect.Detecting">Bisecting. ¿Es el HEAD actual bueno o malo?</x:String>
5857
<x:String x:Key="Text.Bisect.Good">Bueno</x:String>
5958
<x:String x:Key="Text.Bisect.Skip">Saltar</x:String>
6059
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Bisecting. Marcar el commit actual como bueno o malo y revisar otro.</x:String>
60+
<x:String x:Key="Text.Bisect.WaitingForMark">Bisecting. ¿Es el HEAD actual bueno o malo?</x:String>
6161
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
6262
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blame sobre la Revisión Previa</x:String>
6363
<x:String x:Key="Text.Blame.IgnoreWhitespace">Ignorar cambios de espacios en blanco</x:String>

src/Resources/Locales/fr_FR.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<x:String x:Key="Text.Bisect">Bisect</x:String>
5555
<x:String x:Key="Text.Bisect.Abort">Annuler</x:String>
5656
<x:String x:Key="Text.Bisect.Bad">Mauvais</x:String>
57-
<x:String x:Key="Text.Bisect.Detecting">Bisect en cours. Le HEAD actuel est-il bon ou mauvais ?</x:String>
5857
<x:String x:Key="Text.Bisect.Good">Bon</x:String>
5958
<x:String x:Key="Text.Bisect.Skip">Passer</x:String>
6059
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Bisect en cours. Marquer le commit actuel comme bon ou mauvais et en récupérer un autre.</x:String>
60+
<x:String x:Key="Text.Bisect.WaitingForMark">Bisect en cours. Le HEAD actuel est-il bon ou mauvais ?</x:String>
6161
<x:String x:Key="Text.Blame" xml:space="preserve">Blâme</x:String>
6262
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blâmer sur la révision précédente</x:String>
6363
<x:String x:Key="Text.Blame.IgnoreWhitespace" xml:space="preserve">Ignorer les changements d'espaces</x:String>

src/Resources/Locales/he_IL.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<x:String x:Key="Text.Bisect">Bisect</x:String>
5555
<x:String x:Key="Text.Bisect.Abort">ביטול</x:String>
5656
<x:String x:Key="Text.Bisect.Bad">פגום (Bad)</x:String>
57-
<x:String x:Key="Text.Bisect.Detecting">מתבצע Bisect. האם ה־HEAD הנוכחי תקין או פגום?</x:String>
5857
<x:String x:Key="Text.Bisect.Good">תקין (Good)</x:String>
5958
<x:String x:Key="Text.Bisect.Skip">דלג</x:String>
6059
<x:String x:Key="Text.Bisect.WaitingForFirstGood">מתבצע Bisect. יש לסמן את ה־commit הנוכחי כתקין או כפגום ולבצע checkout לאחר.</x:String>
60+
<x:String x:Key="Text.Bisect.WaitingForMark">מתבצע Bisect. האם ה־HEAD הנוכחי תקין או פגום?</x:String>
6161
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
6262
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Blame ל־revision הקודם</x:String>
6363
<x:String x:Key="Text.Blame.IgnoreWhitespace">התעלמות משינויי whitespace</x:String>

src/Resources/Locales/id_ID.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
<x:String x:Key="Text.Bisect">Bisect</x:String>
4949
<x:String x:Key="Text.Bisect.Abort">Batalkan</x:String>
5050
<x:String x:Key="Text.Bisect.Bad">Buruk</x:String>
51-
<x:String x:Key="Text.Bisect.Detecting">Bisect berjalan. Apakah HEAD saat ini baik atau buruk?</x:String>
5251
<x:String x:Key="Text.Bisect.Good">Baik</x:String>
5352
<x:String x:Key="Text.Bisect.Skip">Lewati</x:String>
5453
<x:String x:Key="Text.Bisect.WaitingForFirstGood">Bisect berjalan. Tandai commit saat ini sebagai baik atau buruk dan checkout yang lain.</x:String>
54+
<x:String x:Key="Text.Bisect.WaitingForMark">Bisect berjalan. Apakah HEAD saat ini baik atau buruk?</x:String>
5555
<x:String x:Key="Text.Blame" xml:space="preserve">Blame</x:String>
5656
<x:String x:Key="Text.Blame.TypeNotSupported" xml:space="preserve">BLAME PADA BERKAS INI TIDAK DIDUKUNG!!!</x:String>
5757
<x:String x:Key="Text.BranchCM.Checkout" xml:space="preserve">Checkout ${0}$...</x:String>

src/Resources/Locales/it_IT.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
<x:String x:Key="Text.Bisect" xml:space="preserve">Biseca</x:String>
5151
<x:String x:Key="Text.Bisect.Abort" xml:space="preserve">Annulla</x:String>
5252
<x:String x:Key="Text.Bisect.Bad" xml:space="preserve">Cattiva</x:String>
53-
<x:String x:Key="Text.Bisect.Detecting" xml:space="preserve">Bisecando. La HEAD corrente è buona o cattiva?</x:String>
5453
<x:String x:Key="Text.Bisect.Good" xml:space="preserve">Buona</x:String>
5554
<x:String x:Key="Text.Bisect.Skip" xml:space="preserve">Salta</x:String>
5655
<x:String x:Key="Text.Bisect.WaitingForFirstGood" xml:space="preserve">Bisecando. Marca il commit corrente come buono o cattivo e fai checkout di un altro.</x:String>
56+
<x:String x:Key="Text.Bisect.WaitingForMark" xml:space="preserve">Bisecando. La HEAD corrente è buona o cattiva?</x:String>
5757
<x:String x:Key="Text.Blame" xml:space="preserve">Attribuisci</x:String>
5858
<x:String x:Key="Text.Blame.BlameOnPreviousRevision" xml:space="preserve">Attribuisci sulla Revisione Precedente</x:String>
5959
<x:String x:Key="Text.Blame.IgnoreWhitespace" xml:space="preserve">Ignora modifiche agli spazi</x:String>

0 commit comments

Comments
 (0)