File: changelog-todo

package info (click to toggle)
datalad 1.1.5-2.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,140 kB
  • sloc: python: 69,392; sh: 1,521; makefile: 220
file content (44 lines) | stat: -rwxr-xr-x 884 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

set -eu

usage () {
    cat >&2 <<EOF
usage: $0

Create a CHANGELOG to-do list for items between the last commit that touched
the CHANGELOG and the current commit.
EOF
}

test $# -eq 0 || { usage; exit 1; }

clog=CHANGELOG.md
headrev=$(git rev-parse HEAD)

lastrev=$(git rev-list --no-merges --first-parent -n1 HEAD -- ":(top)$clog")
if test -z "$lastrev"
then
    echo >&2 "Could not determine last commit to touch $clog"
    exit 1
fi

fmt="?  %s%n   %h^-1"
range="$lastrev..$headrev"

cat <<EOF
Update $(git describe "HEAD:$clog")

Generated with
  git log --format="$fmt" --reverse --first-parent \\
    $range

?  = unprocessed and undecided
-  = decided not to include
+  = included
+* = included, but might still be bits that should be added
-----------------------------------------------------------

EOF

git log --format="$fmt" --reverse --first-parent "$range"