Skip to content

Commit c149184

Browse files
peffgitster
authored andcommitted
allow git-am to run in a subdirectory
We just move to the top of the tree and proceed. This shouldn't break any existing callers, since the behavior was previously disallowed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ee542ee commit c149184

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-am.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Copyright (c) 2005, 2006 Junio C Hamano
44

5+
SUBDIRECTORY_OK=Yes
56
OPTIONS_KEEPDASHDASH=
67
OPTIONS_SPEC="\
78
git-am [options] <mbox>|<Maildir>...
@@ -25,6 +26,7 @@ skip skip the current patch"
2526
. git-sh-setup
2627
set_reflog_action am
2728
require_work_tree
29+
cd_to_toplevel
2830

2931
git var GIT_COMMITTER_IDENT >/dev/null || exit
3032

0 commit comments

Comments
 (0)