blob: 2184329595201a819c1325c665ccf290490f4655 (
plain)
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
|
guilt: add support for pushing and tagging
It can be handy to push AND tag at the same time.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
guilt-push | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
--- a/guilt-push
+++ b/guilt-push
@@ -19,7 +19,11 @@ while [ $# -gt 0 ]; do
-n)
num=t
;;
- *)
+ -t|--t)
+ tag=$2
+ shift
+ ;;
+ *)
break
;;
esac
@@ -126,3 +130,13 @@ do
fi
done
+ret=$?
+if [ $ret -ne 0 ]; then
+ exit $ret
+fi
+
+# if a tag was specified, tag the tree now.
+if [ -n "$tag" ]; then
+ git-rev-parse HEAD > "$GIT_DIR/refs/tags/$tag"
+fi
+
|