Skip to content

Commit

Permalink
change magic word in log action from VSCode and stash_refs to `{E…
Browse files Browse the repository at this point in the history
…XT_FORMAT}` and `{STASH_REFS}`
  • Loading branch information
phil294 committed May 1, 2023
1 parent 22419cb commit 2593ecc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/views/MainView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default
# git internals, but they are completely useless to the user.
# Could not find any easy way to skip those other than de-grepping them, TODO:.
# Something like `--exclude-commit=stash@{...}^2+` doesn't exist.
args: "log --graph --oneline --pretty=VSCode -n 15000 --skip=0 --all stash_refs --invert-grep --grep=\"^untracked files on \" --grep=\"^index on \""
args: "log --graph --oneline --pretty={EXT_FORMAT} -n 15000 --skip=0 --all {STASH_REFS} --invert-grep --grep=\"^untracked files on \" --grep=\"^index on \""
options: [
{ value: '--author-date-order', default_active: true }
{ value: '--date-order', default_active: false }
Expand Down
4 changes: 2 additions & 2 deletions web/src/views/store.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export git_status = ref ''

export git_run_log = (###* @type string ### log_args) =>
sep = '^%^%^%^%^'
log_args = log_args.replace(" --pretty=VSCode", " --pretty=format:\"#{sep}%h#{sep}%an#{sep}%ae#{sep}%at#{sep}%D#{sep}%s\"")
log_args = log_args.replace(" --pretty={EXT_FORMAT}", " --pretty=format:\"#{sep}%h#{sep}%an#{sep}%ae#{sep}%at#{sep}%D#{sep}%s\"")
stash_refs = try await git 'reflog show --format="%h" stash' catch then ""
log_args = log_args.replace("stash_refs", stash_refs.replaceAll('\n', ' '))
log_args = log_args.replace("{STASH_REFS}", stash_refs.replaceAll('\n', ' '))
# errors will be handled by GitInput
[ log_data, stash_data, status_data ] = await Promise.all [
git log_args
Expand Down

0 comments on commit 2593ecc

Please sign in to comment.