The message
Cloning into 'sub-mod'...
done.
after a git submodule add...
command is written to stderr. I expected the message to be written to stdout since I don't think it indicates something went wrong with the command.
I can reproduce this with the following sequence of commands:
rm -rf /tmp/repo /tmp/module
mkdir /tmp/repo /tmp/module
cd /tmp/module
git init > /dev/null
echo "foo" > foo;
git add foo > /dev/null
git commit . -m "+ foo" > /dev/null
cd /tmp/repo
git init > /dev/null
git submodule add /tmp/module/ sub-mod 1> /dev/null
If I change the redirection in the last command to ... 2> /dev/null
, nothing is printed.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…