Skip to content

Commit d94847d

Browse files
committed
Fix inconsistent reflog entry format by adding the commit message
1 parent f929861 commit d94847d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

js/controlbox.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,14 @@ function(_yargs, d3, demos) {
372372
boolean: ['amend'],
373373
string: ['m']
374374
})
375-
var msg = ""
376375
this.transact(function() {
377376
if (opts.amend) {
378377
this.getRepoView().amendCommit(opts.m || this.getRepoView().getCommit('head').message)
379378
} else {
380379
this.getRepoView().commit(null, opts.m);
381380
}
382381
}, function(before, after) {
383-
var reflogMsg = 'commit: ' + msg
382+
var reflogMsg = 'commit: ' + (after.commit.message ?? '');
384383
this.getRepoView().addReflogEntry(
385384
'HEAD', after.commit.id, reflogMsg
386385
)

0 commit comments

Comments
 (0)