generated from titan-data/template
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
Priority: CriticalAddress ImmediatelyAddress ImmediatelyType: BugSomething isn't workingSomething isn't working
Description
Expected Behavior
titan push repo should select the latest commit.
Actual Behavior
The last commit is selected:
val commits = commitsApi.listCommits(container)
...
if (!guid.isNullOrEmpty()) {
...
} else {
commit = commits.last()
}
The server will always return commits in reverse order, so this actually selects the earliest commit instead of latest. But a better solution here is to use the repo status call and select the last commit from there. That way we don't have to list all the commits, and as the server evolves to make returning that fast, the client doesn't need to adapt how it determines the latest commit.
Steps to Reproduce the Problem
Create a repository with two commits. Run titan push with no commit and observe that it pushes the oldest commit, not the latest.
Version
0.3.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority: CriticalAddress ImmediatelyAddress ImmediatelyType: BugSomething isn't workingSomething isn't working