File: git-unwip

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (14 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

# Based on scripts from git-utils:
# * https://github.com/ddollar/git-utils/blob/master/git-unwip

# Check if the last commit is a 'WIP' commit
LAST_COMMIT=`git log -1 --pretty=%B | tr -d '[:space:]'`

if [ 'WIP' != $LAST_COMMIT ]; then
  echo 'Last commit is not a WIP commit, so it will not be unWIP-ed.'
  exit 1
fi

git undo --soft