Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ViewModels/InProgressContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ public RebaseInProgress(Repository repo) : base(repo.FullPath, "rebase")
{
_gitDir = repo.GitDir;

var stoppedSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "stopped-sha")).Trim();
StoppedAt = new Commands.QuerySingleCommit(repo.FullPath, stoppedSHA).Result() ?? new Models.Commit() { SHA = stoppedSHA };
var stoppedSHAPath = Path.Combine(repo.GitDir, "rebase-merge", "stopped-sha");
if (File.Exists(stoppedSHAPath))
{
var stoppedSHA = File.ReadAllText(stoppedSHAPath).Trim();
StoppedAt = new Commands.QuerySingleCommit(repo.FullPath, stoppedSHA).Result() ?? new Models.Commit() { SHA = stoppedSHA };
}

var ontoSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "onto")).Trim();
Onto = new Commands.QuerySingleCommit(repo.FullPath, ontoSHA).Result() ?? new Models.Commit() { SHA = ontoSHA };
Expand Down
4 changes: 2 additions & 2 deletions src/ViewModels/Merge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public override Task<bool> Sure()

return Task.Run(() =>
{
var succ = new Commands.Merge(_repo.FullPath, _sourceName, SelectedMode.Arg, SetProgressDescription).Exec();
new Commands.Merge(_repo.FullPath, _sourceName, SelectedMode.Arg, SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
return true;
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/ViewModels/WorkingCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void SetData(List<Models.Change> changes)
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
else if (Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")) || Directory.Exists(Path.Combine(_repo.GitDir, "rebase-apply")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo);
Expand Down Expand Up @@ -291,7 +291,7 @@ public void SetData(List<Models.Change> changes)
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
else if (Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")) || Directory.Exists(Path.Combine(_repo.GitDir, "rebase-apply")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo);
Expand Down
13 changes: 10 additions & 3 deletions src/Views/Repository.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,18 @@
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase.StoppedAt}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding StoppedAt.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding StoppedAt}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}"
Text="{DynamicResource Text.InProgress.Rebase.StoppedAt}"
IsVisible="{Binding StoppedAt, Converter={x:Static ObjectConverters.IsNotNull}}" />
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange"
Text="{Binding StoppedAt.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
IsVisible="{Binding StoppedAt, Converter={x:Static ObjectConverters.IsNotNull}}"
ToolTip.Tip="{Binding StoppedAt}" />
</StackPanel>

<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0"
Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"
IsVisible="{Binding StoppedAt, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Grid>
</DataTemplate>

Expand Down