chiark / gitweb /
Refuse to send empty patches
[stgit] / contrib / stg-unnew
CommitLineData
22584709
YD
1#!/bin/sh
2set -e
3
4# stg-unnew - sort of "reverse an 'stg new'"
5
6# Remove the current patch from the stack, keeping its contents as
7# uncommitted changes.
8
0214be72
YD
9# CAVEAT: running this script on the bottom-most patch fails, since
10# "stg pick --fold" does not allow this situation.
11
22584709
YD
12# Copyright (c) 2007 Yann Dirson <ydirson@altern.org>
13# Subject to the GNU GPL, version 2.
14
15patch=$(stg top)
16stg pop
17stg pick --fold $patch
18stg delete $patch