File: list-commits.sh

package info (click to toggle)
rust-swc-core 35.0.0~ds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 62,816 kB
  • sloc: javascript: 873; xml: 538; sh: 358; makefile: 35; python: 5
file content (18 lines) | stat: -rwxr-xr-x 497 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -eu

commits=$(git rev-list --ancestry-path $1...$2)

# Filter out commits made by `swc-bot`
filtered_commits=$(echo "$commits" | while read -r commit; do
    author=$(git show -s --format='%an' "$commit")
    if [[ "$author" != "SWC Bot" ]]; then
        echo "$commit"
    fi
done)

# Print the filtered commits in `$hash: $title` format
echo "$filtered_commits" | while read -r commit; do
    title=$(git show -s --format='%s' "$commit")
    echo "$commit: $title"
done