From: Karl Hasselström Date: Thu, 24 Jul 2008 20:55:05 +0000 (+0200) Subject: stg uncommit should never touch the branch head X-Git-Tag: v0.15-rc1~197 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/9beaff2e911c0a7c07b288bfdec7597a5cefa7dd?hp=9beaff2e911c0a7c07b288bfdec7597a5cefa7dd stg uncommit should never touch the branch head However, currently, it will set head to top, potentially losing data (which can always be recovered via the reflog, but still). See https://gna.org/bugs/index.php?12043. Add a test to demonstrate the bad behavior. (Bug discovered by Erik Sandberg .) stg commit, on the other hand, should refuse to run if top != head, since the committed patches might otherwise be lost. Add a test to demonstrate that this is the case. Signed-off-by: Karl Hasselström ---