Skip to content

Commit 5683756

Browse files
committed
Display branch names
1 parent bf211e0 commit 5683756

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/Files.App/Helpers/DynamicDialogFactory.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,16 @@ public static DynamicDialog GetFor_CredentialEntryDialog(string path)
217217
return dialog;
218218
}
219219

220-
public static DynamicDialog GetFor_GitCheckoutConflicts()
220+
public static DynamicDialog GetFor_GitCheckoutConflicts(string checkoutBranchName, string headBranchName)
221221
{
222222
DynamicDialog dialog = null!;
223223

224224
var optionsListView = new ListView()
225225
{
226226
ItemsSource = new string[]
227227
{
228-
"BringChanges".GetLocalizedResource(),
229-
"StashChanges".GetLocalizedResource(),
228+
string.Format("BringChanges".GetLocalizedResource(), checkoutBranchName),
229+
string.Format("StashChanges".GetLocalizedResource(), headBranchName),
230230
"DiscardChanges".GetLocalizedResource()
231231
},
232232
SelectionMode = ListViewSelectionMode.Single
@@ -241,7 +241,7 @@ public static DynamicDialog GetFor_GitCheckoutConflicts()
241241
dialog = new DynamicDialog(new DynamicDialogViewModel()
242242
{
243243
TitleText = "SwitchBranch".GetLocalizedResource(),
244-
PrimaryButtonText = "OK".GetLocalizedResource(),
244+
PrimaryButtonText = "Switch".GetLocalizedResource(),
245245
CloseButtonText = "Cancel".GetLocalizedResource(),
246246
SubtitleText = "UncommittedChanges".GetLocalizedResource(),
247247
DisplayControl = new Grid()

src/Files.App/Helpers/GitHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static async Task Checkout(string? repositoryPath, string? branch)
6060

6161
if (repository.RetrieveStatus().IsDirty)
6262
{
63-
var dialog = DynamicDialogFactory.GetFor_GitCheckoutConflicts();
63+
var dialog = DynamicDialogFactory.GetFor_GitCheckoutConflicts(checkoutBranch.FriendlyName, repository.Head.FriendlyName);
6464
await dialog.ShowAsync();
6565

6666
var resolveConflictOption = (GitCheckoutOptions)dialog.ViewModel.AdditionalData;

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3263,13 +3263,13 @@
32633263
<value>Unable to display permissions.</value>
32643264
</data>
32653265
<data name="StashChanges" xml:space="preserve">
3266-
<value>Leave my changes on</value>
3266+
<value>Leave my changes on '{0}'</value>
32673267
</data>
32683268
<data name="DiscardChanges" xml:space="preserve">
32693269
<value>Discard my changes</value>
32703270
</data>
32713271
<data name="BringChanges" xml:space="preserve">
3272-
<value>Bring my changes to</value>
3272+
<value>Bring my changes to '{0}'</value>
32733273
</data>
32743274
<data name="UncommittedChanges" xml:space="preserve">
32753275
<value>You have uncommitted changes on this branch. What would you like to do with them?</value>
@@ -3280,4 +3280,7 @@
32803280
<data name="Branches" xml:space="preserve">
32813281
<value>Branches:</value>
32823282
</data>
3283+
<data name="Switch" xml:space="preserve">
3284+
<value>Switch</value>
3285+
</data>
32833286
</root>

0 commit comments

Comments
 (0)