Skip to content

Commit

Permalink
commit: don't lose commits
Browse files Browse the repository at this point in the history
$ guilt push -n 4
$ guilt commit -n 2
$ guilt pop -a

Would result in the guilt-commit'd patches not being on the git branch and
not being in the series.

Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
  • Loading branch information
jeffpc committed Oct 19, 2013
1 parent c2a5bae commit ce8f34e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion guilt-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) Josef "Jeff" Sipek, 2008-2011
# Copyright (c) Josef "Jeff" Sipek, 2008-2013
#

USAGE="-n <num> | -a | --all"
Expand Down Expand Up @@ -35,6 +35,10 @@ esac

# remove patch refs for what's being committed, and update series
sed -n -e "${pat_commit}" "$applied" | while read pname; do
# update the base branch to the last committed patch
$old_style_prefix || git update-ref refs/heads/$branch \
refs/patches/$branch/$pname

series_remove_patch "$pname"
echo "$pname" | remove_patch_refs
done
Expand Down
2 changes: 1 addition & 1 deletion regression/t-061.out
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ fefbdcef61022d473838926619f31e030dd04fdc commit refs/patches/master/mode
% guilt commit -n 2
% git for-each-ref
fefbdcef61022d473838926619f31e030dd04fdc commit refs/heads/guilt/master
25465dc1687f3833ecbd4e8bca437e522d7026db commit refs/heads/master
5effcbeb303e8433935151d8c69f3bf63db1e8ef commit refs/heads/master
fefbdcef61022d473838926619f31e030dd04fdc commit refs/patches/master/mode
9cbe2fc643b1a9e2179a8738f80424a1c2aa202d commit refs/patches/master/remove
% git branch
Expand Down

0 comments on commit ce8f34e

Please sign in to comment.