summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-03-01 06:22:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-01 09:31:18 (GMT)
commitc14918415a36e93a84ed1f58ce079619f84e26fa (patch)
treea3f2acacf39cd9aa13e3febe99a11dbf38fa4efc
parentee542ee3fc309fa95622b274c09eefbe394cd108 (diff)
downloadgit-c14918415a36e93a84ed1f58ce079619f84e26fa.zip
git-c14918415a36e93a84ed1f58ce079619f84e26fa.tar.gz
git-c14918415a36e93a84ed1f58ce079619f84e26fa.tar.bz2
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>
-rwxr-xr-xgit-am.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-am.sh b/git-am.sh
index 2ecebc4..a2c6fea 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -2,6 +2,7 @@
#
# Copyright (c) 2005, 2006 Junio C Hamano
+SUBDIRECTORY_OK=Yes
OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-am [options] <mbox>|<Maildir>...
@@ -25,6 +26,7 @@ skip skip the current patch"
. git-sh-setup
set_reflog_action am
require_work_tree
+cd_to_toplevel
git var GIT_COMMITTER_IDENT >/dev/null || exit