Skip to content

Commit 596d4fa

Browse files
committed
Use --author-date-order in preliminary loading so the initial loading state doesn't look very different from the final loaded state, provided you didn't change its args much
1 parent 371279a commit 596d4fa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

web/src/data/store/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export let trigger_main_refresh = (options = {}) => {
1919
before_execute: (/** @type {string} */ cmd) => options.custom_log_args?.({
2020
user_log_args: cmd,
2121
default_log_args: repo_store.log_action.args,
22-
base_log_args: repo_store.base_log_args,
22+
base_log_args: repo_store.base_log_args + ' --author-date-order',
2323
}) || cmd,
2424
})
2525
}

web/src/data/store/repo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let refresh = async (log_args, { preliminary_loading, fetch_stash_refs, fetch_br
7676
if (preliminary_loading)
7777
// The "main" main log happens below, but because of the large default_log_action_n, this can take several seconds for large repos.
7878
// This below is a bit of a pre-flight request optimized for speed to show the first few commits while the rest keeps loading in the background.
79-
preliminary_loading_promise = git_log(`${base_log_args} -n 100 --all`,
79+
preliminary_loading_promise = git_log(`${base_log_args} --author-date-order -n 100 --all`,
8080
{ fetch_stash_refs: false, fetch_branches: false }).then((parsed) =>
8181
loaded_commits.value = parsed.commits
8282
.concat({ subject: '..........Loading more..........', author_email: '', hash: '-', vis_lines: [{ y0: 0.5, yn: 0.5, x0: 0, xn: 2000, branch: { color: 'yellow', type: 'branch', name: '', display_name: '', id: '' } }], author_name: '', hash_long: '', refs: [], index_in_graph_output: -1 })

0 commit comments

Comments
 (0)