From: John Szakmeister <john@szakmeister.net>
To: git@vger.kernel.org
Cc: John Szakmeister <john@szakmeister.net>
Subject: [PATCH] Stop hiding the error message within 'git submodule add'
Date: Sat, 23 Jul 2011 07:17:28 -0400 [thread overview]
Message-ID: <1311419848-79652-1-git-send-email-john@szakmeister.net> (raw)
git-submodule.sh was incorrectly assuming that the only reason
'git add --dry-run' would fail was due to ignored paths. However,
when trying add a submodule inside of another, the original error
message was being lost, and leaves a user confused. Simply
re-run 'git add --dry-run' and allow the error message emitted.
Signed-off-by: John Szakmeister <john@szakmeister.net>
---
git-submodule.sh | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index bc1d3fa..056abd4 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -223,12 +223,7 @@ cmd_add()
if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
then
- (
- eval_gettext "The following path is ignored by one of your .gitignore files:
-\$path
-Use -f if you really want to add it." &&
- echo
- ) >&2
+ git add --dry-run --ignore-missing "$path"
exit 1
fi
--
1.7.6.134.gcf13f6.dirty
next reply other threads:[~2011-07-23 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-23 11:17 John Szakmeister [this message]
2011-07-23 11:59 ` [PATCH] Stop hiding the error message within 'git submodule add' John Szakmeister
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311419848-79652-1-git-send-email-john@szakmeister.net \
--to=john@szakmeister.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).