@matheusbsbs / matheus-bagliano / commits / 130fcca63f
Fork 0

git-commit: revamp the git-commit semantics.

- "git commit" without _any_ parameter keeps the traditional behaviour. It commits the current index. We commit the whole index even when this form is run from a subdirectory. - "git commit --include paths..." (or "git commit -i paths...") is equivalent to: git update-index --remove paths... git commit - "git commit paths..." acquires a new semantics. This is an incompatible change that needs user training, which I am still a bit reluctant to swallow, but enough people seem to have complained that it is confusing to them. It 1. refuses to run if $GIT_DIR/MERGE_HEAD exists, and reminds trained git users that the traditional semantics now needs -i flag. 2. refuses to run if named paths... are different in HEAD and the index (ditto about reminding). Added paths are OK. 3. reads HEAD commit into a temporary index file. 4. updates named paths... from the working tree in this temporary index. 5. does the same updates of the paths... from the working tree to the real index. 6. makes a commit using the temporary index that has the current HEAD as the parent, and updates the HEAD with this new commit. - "git commit --all" can run from a subdirectory, but it updates the index with all the modified files and does a whole tree commit. - In all cases, when the command decides not to create a new commit, the index is left as it was before the command is run. This means that the two "git diff" in the following sequence: $ git diff $ git commit -a $ git diff would show the same diff if you abort the commit process by making the commit log message empty. This commit also introduces much requested --author option. $ git commit --author 'A U Thor <author@example.com>' Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 5, 2006 at 00:07 UTC 130fcca63fe8e7e087e7419907e018cbbaf434a3
4 files changed +354 -122
Documentation/core-tutorial.txt
+3 -3
@@ -852,7 +852,7 @@ that branch, and do some work there.
852 ------------------------------------------------
853 $ git checkout mybranch
854 $ echo "Work, work, work" >>hello
855 -$ git commit -m 'Some work.' hello
855 +$ git commit -m 'Some work.' -i hello
856 ------------------------------------------------
857
858 Here, we just added another line to `hello`, and we used a shorthand for
@@ -877,7 +877,7 @@ hasn't happened in the `master` branch at all. Then do
877 ------------
878 $ echo "Play, play, play" >>hello
879 $ echo "Lots of fun" >>example
880 -$ git commit -m 'Some fun.' hello example
880 +$ git commit -m 'Some fun.' -i hello example
881 ------------
882
883 since the master branch is obviously in a much better mood.
@@ -942,7 +942,7 @@ Work, work, work
942 and once you're happy with your manual merge, just do a
943
944 ------------
945 -$ git commit hello
945 +$ git commit -i hello
946 ------------
947
948 which will very loudly warn you that you're now committing a merge
Documentation/git-commit.txt
+57 -4
@@ -8,8 +8,8 @@ git-commit - Record your changes
8 SYNOPSIS
9 --------
10 [verse]
11 -'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12 - [-e] [--] <file>...
11 +'git-commit' [-a] [-i] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12 + [-e] [--author <author>] [--] <file>...
13
14 DESCRIPTION
15 -----------
@@ -40,6 +40,10 @@ OPTIONS
40 Take the commit message from the given file. Use '-' to
41 read the message from the standard input.
42
43 +--author <author>::
44 + Override the author name used in the commit. Use
45 + `A U Thor <author@example.com>` format.
46 +
47 -m <msg>::
48 Use the given <msg> as the commit message.
49
@@ -63,17 +67,66 @@ OPTIONS
67 commit log message unmodified. This option lets you
68 further edit the message taken from these sources.
69
70 +-i|--include::
71 + Instead of committing only the files specified on the
72 + command line, update them in the index file and then
73 + commit the whole index. This is the traditional
74 + behaviour.
75 +
76 --::
77 Do not interpret any more arguments as options.
78
79 <file>...::
70 - Update specified paths in the index file before committing.
71 -
80 + Commit only the files specified on the command line.
81 + This format cannot be used during a merge, nor when the
82 + index and the latest commit does not match on the
83 + specified paths to avoid confusion.
84
85 If you make a commit and then found a mistake immediately after
86 that, you can recover from it with gitlink:git-reset[1].
87
88
89 +Discussion
90 +----------
91 +
92 +`git commit` without _any_ parameter commits the tree structure
93 +recorded by the current index file. This is a whole-tree commit
94 +even the command is invoked from a subdirectory.
95 +
96 +`git commit --include paths...` is equivalent to
97 +
98 + git update-index --remove paths...
99 + git commit
100 +
101 +That is, update the specified paths to the index and then commit
102 +the whole tree.
103 +
104 +`git commit paths...` largely bypasses the index file and
105 +commits only the changes made to the specified paths. It has
106 +however several safety valves to prevent confusion.
107 +
108 +. It refuses to run during a merge (i.e. when
109 + `$GIT_DIR/MERGE_HEAD` exists), and reminds trained git users
110 + that the traditional semantics now needs -i flag.
111 +
112 +. It refuses to run if named `paths...` are different in HEAD
113 + and the index (ditto about reminding). Added paths are OK.
114 + This is because an earlier `git diff` (not `git diff HEAD`)
115 + would have shown the differences since the last `git
116 + update-index paths...` to the user, and an inexperienced user
117 + may mistakenly think that the changes between the index and
118 + the HEAD (i.e. earlier changes made before the last `git
119 + update-index paths...` was done) are not being committed.
120 +
121 +. It reads HEAD commit into a temporary index file, updates the
122 + specified `paths...` and makes a commit. At the same time,
123 + the real index file is also updated with the same `paths...`.
124 +
125 +`git commit --all` updates the index file with _all_ changes to
126 +the working tree, and makes a whole-tree commit, regardless of
127 +which subdirectory the command is invoked in.
128 +
129 +
130 Author
131 ------
132 Written by Linus Torvalds <torvalds@osdl.org> and
git-commit.sh
+291 -112
@@ -1,85 +1,170 @@
1 #!/bin/sh
2 #
3 # Copyright (c) 2005 Linus Torvalds
4 -#
4 +# Copyright (c) 2006 Junio C Hamano
5 +
6 +USAGE='[-a] [-i] [-s] [-v | --no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [--author <author>] [<path>...]'
7
6 -USAGE='[-a] [-s] [-v | --no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [<path>...]'
8 +SUBDIRECTORY_OK=Yes
9 . git-sh-setup
10
9 -all= logfile= use_commit= no_edit= log_given= log_message= verify=t signoff=
11 +git-rev-parse --verify HEAD >/dev/null 2>&1 ||
12 +initial_commit=t
13 +
14 +refuse_partial () {
15 + echo >&2 "$1"
16 + echo >&2 "Experienced git users:"
17 + echo >&2 "You might have meant to say 'git commit -i paths...', perhaps?"
18 + exit 1
19 +}
20 +
21 +all=
22 +also=
23 +logfile=
24 +use_commit=
25 +no_edit=
26 +log_given=
27 +log_message=
28 +verify=t
29 +signoff=
30 +force_author=
31 while case "$#" in 0) break;; esac
32 do
33 case "$1" in
34 + -F|--F|-f|--f|--fi|--fil|--file)
35 + case "$#" in 1) usage ;; esac
36 + shift
37 + no_edit=t
38 + log_given=t$log_given
39 + logfile="$1"
40 + shift
41 + ;;
42 + -F*|-f*)
43 + no_edit=t
44 + log_given=t$log_given
45 + logfile=`expr "$1" : '-[Ff]\(.*\)'`
46 + shift
47 + ;;
48 + --F=*|--f=*|--fi=*|--fil=*|--file=*)
49 + no_edit=t
50 + log_given=t$log_given
51 + logfile=`expr "$1" : '-[^=]*=\(.*\)'`
52 + shift
53 + ;;
54 -a|--a|--al|--all)
14 - all=t
15 - shift ;;
16 - -F=*|--f=*|--fi=*|--fil=*|--file=*)
17 - log_given=t$log_given
18 - logfile=`expr "$1" : '-[^=]*=\(.*\)'`
19 - no_edit=t
20 - shift ;;
21 - -F|--f|--fi|--fil|--file)
22 - case "$#" in 1) usage ;; esac; shift
23 - log_given=t$log_given
24 - logfile="$1"
25 - no_edit=t
26 - shift ;;
27 - -m=*|--m=*|--me=*|--mes=*|--mess=*|--messa=*|--messag=*|--message=*)
28 - log_given=t$log_given
29 - log_message=`expr "$1" : '-[^=]*=\(.*\)'`
30 - no_edit=t
31 - shift ;;
55 + all=t
56 + shift
57 + ;;
58 + --au=*|--aut=*|--auth=*|--autho=*|--author=*)
59 + force_author=`expr "$1" : '-[^=]*=\(.*\)'`
60 + shift
61 + ;;
62 + --au|--aut|--auth|--autho|--author)
63 + case "$#" in 1) usage ;; esac
64 + shift
65 + force_author="$1"
66 + shift
67 + ;;
68 + -e|--e|--ed|--edi|--edit)
69 + no_edit=
70 + shift
71 + ;;
72 + -i|--i|--in|--inc|--incl|--inclu|--includ|--include)
73 + also=t
74 + shift
75 + ;;
76 -m|--m|--me|--mes|--mess|--messa|--messag|--message)
33 - case "$#" in 1) usage ;; esac; shift
34 - log_given=t$log_given
35 - log_message="$1"
36 - no_edit=t
37 - shift ;;
38 - -c=*|--ree=*|--reed=*|--reedi=*|--reedit=*|--reedit-=*|--reedit-m=*|\
77 + case "$#" in 1) usage ;; esac
78 + shift
79 + log_given=t$log_given
80 + log_message="$1"
81 + no_edit=t
82 + shift
83 + ;;
84 + -m*)
85 + log_given=t$log_given
86 + log_message=`expr "$1" : '-m\(.*\)'`
87 + no_edit=t
88 + shift
89 + ;;
90 + --m=*|--me=*|--mes=*|--mess=*|--messa=*|--messag=*|--message=*)
91 + log_given=t$log_given
92 + log_message=`expr "$1" : '-[^=]*=\(.*\)'`
93 + no_edit=t
94 + shift
95 + ;;
96 + -n|--n|--no|--no-|--no-v|--no-ve|--no-ver|--no-veri|--no-verif|--no-verify)
97 + verify=
98 + shift
99 + ;;
100 + -c)
101 + case "$#" in 1) usage ;; esac
102 + shift
103 + log_given=t$log_given
104 + use_commit="$1"
105 + no_edit=
106 + shift
107 + ;;
108 + --ree=*|--reed=*|--reedi=*|--reedit=*|--reedit-=*|--reedit-m=*|\
109 --reedit-me=*|--reedit-mes=*|--reedit-mess=*|--reedit-messa=*|\
110 --reedit-messag=*|--reedit-message=*)
41 - log_given=t$log_given
42 - use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
43 - shift ;;
44 - -c|--ree|--reed|--reedi|--reedit|--reedit-|--reedit-m|--reedit-me|\
111 + log_given=t$log_given
112 + use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
113 + no_edit=
114 + shift
115 + ;;
116 + --ree|--reed|--reedi|--reedit|--reedit-|--reedit-m|--reedit-me|\
117 --reedit-mes|--reedit-mess|--reedit-messa|--reedit-messag|--reedit-message)
46 - case "$#" in 1) usage ;; esac; shift
47 - log_given=t$log_given
48 - use_commit="$1"
49 - shift ;;
50 - -C=*|--reu=*|--reus=*|--reuse=*|--reuse-=*|--reuse-m=*|--reuse-me=*|\
118 + case "$#" in 1) usage ;; esac
119 + shift
120 + log_given=t$log_given
121 + use_commit="$1"
122 + no_edit=
123 + shift
124 + ;;
125 + -C)
126 + case "$#" in 1) usage ;; esac
127 + shift
128 + log_given=t$log_given
129 + use_commit="$1"
130 + no_edit=t
131 + shift
132 + ;;
133 + --reu=*|--reus=*|--reuse=*|--reuse-=*|--reuse-m=*|--reuse-me=*|\
134 --reuse-mes=*|--reuse-mess=*|--reuse-messa=*|--reuse-messag=*|\
135 --reuse-message=*)
53 - log_given=t$log_given
54 - use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
55 - no_edit=t
56 - shift ;;
57 - -C|--reu|--reus|--reuse|--reuse-|--reuse-m|--reuse-me|--reuse-mes|\
136 + log_given=t$log_given
137 + use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
138 + no_edit=t
139 + shift
140 + ;;
141 + --reu|--reus|--reuse|--reuse-|--reuse-m|--reuse-me|--reuse-mes|\
142 --reuse-mess|--reuse-messa|--reuse-messag|--reuse-message)
59 - case "$#" in 1) usage ;; esac; shift
60 - log_given=t$log_given
61 - use_commit="$1"
62 - no_edit=t
63 - shift ;;
64 - -e|--e|--ed|--edi|--edit)
65 - no_edit=
66 - shift ;;
143 + case "$#" in 1) usage ;; esac
144 + shift
145 + log_given=t$log_given
146 + use_commit="$1"
147 + no_edit=t
148 + shift
149 + ;;
150 -s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
68 - signoff=t
69 - shift ;;
70 - -n|--n|--no|--no-|--no-v|--no-ve|--no-ver|--no-veri|--no-verif|--no-verify)
71 - verify=
72 - shift ;;
151 + signoff=t
152 + shift
153 + ;;
154 -v|--v|--ve|--ver|--veri|--verif|--verify)
74 - verify=t
75 - shift ;;
155 + verify=t
156 + shift
157 + ;;
158 --)
77 - shift
78 - break ;;
159 + shift
160 + break
161 + ;;
162 -*)
80 - usage ;;
163 + usage
164 + ;;
165 *)
82 - break ;;
166 + break
167 + ;;
168 esac
169 done
170
@@ -88,30 +173,92 @@ tt*)
173 die "Only one of -c/-C/-F/-m can be used." ;;
174 esac
175
91 -case "$all,$#" in
92 -t,0)
93 - git-diff-files --name-only -z |
94 - git-update-index --remove -z --stdin
95 - ;;
96 -t,*)
97 - die "Cannot use -a and explicit files at the same time."
98 - ;;
99 -,0)
176 +TOP=`git-rev-parse --show-cdup`
177 +
178 +case "$all,$also" in
179 +t,t)
180 + die "Cannot use -a and -i at the same time." ;;
181 +t,)
182 + SAVE_INDEX="$GIT_DIR/save-index$$" &&
183 + cp "$GIT_DIR/index" "$SAVE_INDEX" &&
184 + (
185 + if test '' != "$TOP"
186 + then
187 + cd "$TOP"
188 + fi &&
189 + git-diff-files --name-only -z |
190 + git-update-index --remove -z --stdin
191 + )
192 ;;
101 -*)
102 - git-diff-files --name-only -z -- "$@" |
193 +,t)
194 + case "$#" in
195 + 0) die "No paths with -i does not make sense." ;;
196 + esac
197 + SAVE_INDEX="$GIT_DIR/save-index$$" &&
198 + cp "$GIT_DIR/index" "$SAVE_INDEX" &&
199 + git-diff-files --name-only -z -- "$@" |
200 git-update-index --remove -z --stdin
201 ;;
105 -esac || exit 1
202 +,)
203 + case "$#" in
204 + 0)
205 + ;; # commit as-is
206 + *)
207 + if test -f "$GIT_DIR/MERGE_HEAD"
208 + then
209 + refuse_partial "Cannot do a partial commit during a merge."
210 + fi
211 + TMP_INDEX="$GIT_DIR/tmp-index$$"
212 + if test -z "$initial_commit"
213 + then
214 + # make sure index is clean at the specified paths, or
215 + # they are additions.
216 + dirty_in_index=`git-diff-index --cached --name-status \
217 + --diff-filter=DMTXU HEAD -- "$@"`
218 + test -z "$dirty_in_index" ||
219 + refuse_partial "Cannot do a partial commit of paths dirty in index:
220 +
221 +$dirty_in_index"
222 + fi
223 + commit_only=`git-ls-files -- "$@"` ;;
224 + esac
225 + ;;
226 +esac
227 +
228 git-update-index -q --refresh || exit 1
229
108 -case "$verify" in
109 -t)
110 - if test -x "$GIT_DIR"/hooks/pre-commit
230 +trap '
231 + test -f "$TMP_INDEX" && rm -f "$TMP_INDEX"
232 + test -f "$SAVE_INDEX" && mv -f "$SAVE_INDEX" "$GIT_DIR/index"
233 +' 0
234 +
235 +if test "$TMP_INDEX"
236 +then
237 + if test -z "$initial_commit"
238 then
112 - "$GIT_DIR"/hooks/pre-commit || exit
113 - fi
114 -esac
239 + GIT_INDEX_FILE="$TMP_INDEX" git-read-tree HEAD
240 + else
241 + rm -f "$TMP_INDEX"
242 + fi || exit
243 + echo "$commit_only" |
244 + GIT_INDEX_FILE="$TMP_INDEX" git-update-index --add --remove --stdin &&
245 + echo "$commit_only" |
246 + git-update-index --remove --stdin ||
247 + exit
248 +else
249 + #
250 + :
251 +fi
252 +
253 +if test t = "$verify" && test -x "$GIT_DIR"/hooks/pre-commit
254 +then
255 + if test "$TMP_INDEX"
256 + then
257 + GIT_INDEX_FILE="$TMP_INDEX" "$GIT_DIR"/hooks/pre-commit
258 + else
259 + "$GIT_DIR"/hooks/pre-commit
260 + fi || exit
261 +fi
262
263 if test "$log_message" != ''
264 then
@@ -155,42 +302,52 @@ if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
302 echo "#"
303 fi >>"$GIT_DIR"/COMMIT_EDITMSG
304
305 +# Author
306 +if test '' != "$use_commit"
307 +then
308 + pick_author_script='
309 + /^author /{
310 + s/'\''/'\''\\'\'\''/g
311 + h
312 + s/^author \([^<]*\) <[^>]*> .*$/\1/
313 + s/'\''/'\''\'\'\''/g
314 + s/.*/GIT_AUTHOR_NAME='\''&'\''/p
315 +
316 + g
317 + s/^author [^<]* <\([^>]*\)> .*$/\1/
318 + s/'\''/'\''\'\'\''/g
319 + s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
320 +
321 + g
322 + s/^author [^<]* <[^>]*> \(.*\)$/\1/
323 + s/'\''/'\''\'\'\''/g
324 + s/.*/GIT_AUTHOR_DATE='\''&'\''/p
325 +
326 + q
327 + }
328 + '
329 + set_author_env=`git-cat-file commit "$use_commit" |
330 + LANG=C LC_ALL=C sed -ne "$pick_author_script"`
331 + eval "$set_author_env"
332 + export GIT_AUTHOR_NAME
333 + export GIT_AUTHOR_EMAIL
334 + export GIT_AUTHOR_DATE
335 +elif test '' != "$force_author"
336 +then
337 + GIT_AUTHOR_NAME=`expr "$force_author" : '\(.*[^ ]\) *<.*'` &&
338 + GIT_AUTHOR_EMAIL=`expr "$force_author" : '.*\(<.*\)'` &&
339 + test '' != "$GIT_AUTHOR_NAME" &&
340 + test '' != "$GIT_AUTHOR_EMAIL" ||
341 + die "malformatted --author parameter"
342 + export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
343 +fi
344 +
345 PARENTS="-p HEAD"
159 -if GIT_DIR="$GIT_DIR" git-rev-parse --verify HEAD >/dev/null 2>&1
346 +if test -z "$initial_commit"
347 then
348 if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
349 PARENTS="-p HEAD "`sed -e 's/^/-p /' "$GIT_DIR/MERGE_HEAD"`
350 fi
164 - if test "$use_commit" != ""
165 - then
166 - pick_author_script='
167 - /^author /{
168 - s/'\''/'\''\\'\'\''/g
169 - h
170 - s/^author \([^<]*\) <[^>]*> .*$/\1/
171 - s/'\''/'\''\'\'\''/g
172 - s/.*/GIT_AUTHOR_NAME='\''&'\''/p
173 -
174 - g
175 - s/^author [^<]* <\([^>]*\)> .*$/\1/
176 - s/'\''/'\''\'\'\''/g
177 - s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
178 -
179 - g
180 - s/^author [^<]* <[^>]*> \(.*\)$/\1/
181 - s/'\''/'\''\'\'\''/g
182 - s/.*/GIT_AUTHOR_DATE='\''&'\''/p
183 -
184 - q
185 - }
186 - '
187 - set_author_env=`git-cat-file commit "$use_commit" |
188 - LANG=C LC_ALL=C sed -ne "$pick_author_script"`
189 - eval "$set_author_env"
190 - export GIT_AUTHOR_NAME
191 - export GIT_AUTHOR_EMAIL
192 - export GIT_AUTHOR_DATE
193 - fi
351 else
352 if [ -z "$(git-ls-files)" ]; then
353 echo Nothing to commit 1>&2
@@ -198,10 +355,21 @@ else
355 fi
356 PARENTS=""
357 fi
201 -git-status >>"$GIT_DIR"/COMMIT_EDITMSG
358 +
359 +(
360 + if test '' != "$TOP"
361 + then
362 + cd "$TOP"
363 + fi &&
364 + git-status >>"$GIT_DIR"/COMMIT_EDITMSG
365 +)
366 if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" ]
367 then
368 rm -f "$GIT_DIR/COMMIT_EDITMSG"
369 + if test '' != "$TOP"
370 + then
371 + cd "$TOP"
372 + fi &&
373 git-status
374 exit 1
375 fi
@@ -213,7 +381,8 @@ case "$no_edit" in
381 echo >&2 "Please supply the commit log message using either"
382 echo >&2 "-m or -F option. A boilerplate log message has"
383 echo >&2 "been prepared in $GIT_DIR/COMMIT_EDITMSG"
216 - exit 1 ;;
384 + exit 1
385 + ;;
386 esac
387 ${VISUAL:-${EDITOR:-vi}} "$GIT_DIR/COMMIT_EDITMSG"
388 ;;
@@ -235,7 +404,13 @@ if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG |
404 wc -l` &&
405 test 0 -lt $cnt
406 then
238 - tree=$(git-write-tree) &&
407 + if test -z "$TMP_INDEX"
408 + then
409 + tree=$(git-write-tree)
410 + else
411 + tree=$(GIT_INDEX_FILE="$TMP_INDEX" git-write-tree) &&
412 + rm -f "$TMP_INDEX"
413 + fi &&
414 commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
415 git-update-ref HEAD $commit $current &&
416 rm -f -- "$GIT_DIR/MERGE_HEAD"
@@ -251,4 +426,8 @@ if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0
426 then
427 "$GIT_DIR"/hooks/post-commit
428 fi
429 +if test 0 -eq "$ret"
430 +then
431 + rm -f "$SAVE_INDEX"
432 +fi
433 exit "$ret"
t/t1200-tutorial.sh
+3 -3
@@ -95,13 +95,13 @@ test_expect_success 'git branch' 'cmp branch.expect branch.output'
95
96 git checkout mybranch
97 echo "Work, work, work" >>hello
98 -git commit -m 'Some work.' hello
98 +git commit -m 'Some work.' -i hello
99
100 git checkout master
101
102 echo "Play, play, play" >>hello
103 echo "Lots of fun" >>example
104 -git commit -m 'Some fun.' hello example
104 +git commit -m 'Some fun.' -i hello example
105
106 test_expect_failure 'git resolve now fails' 'git resolve HEAD mybranch "Merge work in mybranch"'
107
@@ -112,7 +112,7 @@ Play, play, play
112 Work, work, work
113 EOF
114
115 -git commit -m 'Merged "mybranch" changes.' hello
115 +git commit -m 'Merged "mybranch" changes.' -i hello
116
117 cat > show-branch.expect << EOF
118 * [master] Merged "mybranch" changes.