{"thread":{"id":"27894","subject":"[PATCH] Stop hiding the error message within 'git submodule add'","startedAt":"2011-07-23T11:17:28Z","lastAt":"2011-07-23T11:59:17Z","messageCount":2,"participants":["John Szakmeister"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"171883","messageId":"1311419848-79652-1-git-send-email-john@szakmeister.net","threadId":"27894","inReplyTo":null,"subject":"[PATCH] Stop hiding the error message within 'git submodule add'","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2011-07-23T11:17:28Z","receivedAt":"2011-07-23T11:17:28Z","isPatch":true,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"git-submodule.sh was incorrectly assuming that the only reason\n'git add --dry-run' would fail was due to ignored paths.  However,\nwhen trying add a submodule inside of another, the original error\nmessage was being lost, and leaves a user confused.  Simply\nre-run 'git add --dry-run' and allow the error message emitted.\n\nSigned-off-by: John Szakmeister <john@szakmeister.net>\n---\n git-submodule.sh |    7 +------\n 1 files changed, 1 insertions(+), 6 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex bc1d3fa..056abd4 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -223,12 +223,7 @@ cmd_add()\n \n \tif test -z \"$force\" && ! git add --dry-run --ignore-missing \"$path\" > /dev/null 2>&1\n \tthen\n-\t\t(\n-\t\t\teval_gettext \"The following path is ignored by one of your .gitignore files:\n-\\$path\n-Use -f if you really want to add it.\" &&\n-\t\t\techo\n-\t\t) >&2\n+\t\tgit add --dry-run --ignore-missing \"$path\"\n \t\texit 1\n \tfi\n \n-- \n1.7.6.134.gcf13f6.dirty\n"},{"id":"171886","messageId":"CAEBDL5VmY-BY9+q2b6pz=rxJKF6HghrbtmamaCzee7xDGf1h-A@mail.gmail.com","threadId":"27894","inReplyTo":"1311419848-79652-1-git-send-email-john@szakmeister.net","subject":"Re: [PATCH] Stop hiding the error message within 'git submodule add'","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2011-07-23T11:59:17Z","receivedAt":"2011-07-23T11:59:17Z","isPatch":true,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"Bah, this broke a test (I must have missed that fact somehow).  I'll\nsee if it can be fixed.\n\n-John\n\nOn Sat, Jul 23, 2011 at 7:17 AM, John Szakmeister <john@szakmeister.net> wrote:\n> git-submodule.sh was incorrectly assuming that the only reason\n> 'git add --dry-run' would fail was due to ignored paths.  However,\n> when trying add a submodule inside of another, the original error\n> message was being lost, and leaves a user confused.  Simply\n> re-run 'git add --dry-run' and allow the error message emitted.\n>\n> Signed-off-by: John Szakmeister <john@szakmeister.net>\n> ---\n>  git-submodule.sh |    7 +------\n>  1 files changed, 1 insertions(+), 6 deletions(-)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index bc1d3fa..056abd4 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -223,12 +223,7 @@ cmd_add()\n>\n>        if test -z \"$force\" && ! git add --dry-run --ignore-missing \"$path\" > /dev/null 2>&1\n>        then\n> -               (\n> -                       eval_gettext \"The following path is ignored by one of your .gitignore files:\n> -\\$path\n> -Use -f if you really want to add it.\" &&\n> -                       echo\n> -               ) >&2\n> +               git add --dry-run --ignore-missing \"$path\"\n>                exit 1\n>        fi\n>\n> --\n> 1.7.6.134.gcf13f6.dirty\n>\n>\n"}]}