Skip to content

Commit

Permalink
fix(cp): should use origin branch to fetch commits
Browse files Browse the repository at this point in the history
  • Loading branch information
dingff committed Mar 28, 2024
1 parent 12abb42 commit 94fc430
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ const handles = {
cp: async () => {
try {
const branch = await inquireBranch('origin')
const commits = (await startSpawnPipe('git', ['log', '--format=%h %s', '-n', 50, branch], { silence: true }))
const commits = (
await startSpawnPipe('git', ['log', '--format=%h %s', '-n', 50, `origin/${branch}`], { silence: true })
)
.split('\n')
.filter(Boolean)
.map((item, i) => {
Expand Down

0 comments on commit 94fc430

Please sign in to comment.