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>
Jeff King committed
Mar 1, 2008 at 01:22 UTC
c14918415a36e93a84ed1f58ce079619f84e26fa
1 file changed
+2
git-am.sh
+2
@@ -2,6 +2,7 @@
2
#
3
# Copyright (c) 2005, 2006 Junio C Hamano
4
5
+SUBDIRECTORY_OK=Yes
6
OPTIONS_KEEPDASHDASH=
7
OPTIONS_SPEC="\
8
git-am [options] <mbox>|<Maildir>...
@@ -25,6 +26,7 @@ skip skip the current patch"
26
. git-sh-setup
27
set_reflog_action am
28
require_work_tree
29
+cd_to_toplevel
30
31
git var GIT_COMMITTER_IDENT >/dev/null || exit
32