From: Fredrik Gustafsson <hidden> Date: 2016-06-15 22:57:42
Cleanup and enhanced module_list (see patches for details). All new functionality is
in the first patch, the second one deals only with cleanup. I would prefer if both
got applied.
Fredrik Gustafsson (2):
[submodule] handle multibyte characters in name
[submodule] Replace perl-code with sh
git-submodule.sh | 55 +++++++++++++++++++++-------------------------
t/t7400-submodule-basic.sh | 5 +++++
2 files changed, 30 insertions(+), 30 deletions(-)
--
1.8.3.253.g20b40b5.dirty
From: Fredrik Gustafsson <hidden> Date: 2016-06-15 22:57:42
Bugg reported here:
http://thread.gmane.org/gmane.comp.version-control.git/218922/focus=226791
Note that newline (\n) is still not supported and will not be until the
sh-script is replaced by something in an other language. This however
let us to use mostly all other strange characters.
Signed-off-by: Fredrik Gustafsson <redacted>
---
git-submodule.sh | 3 ++-
t/t7400-submodule-basic.sh | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
@@ -868,4 +868,9 @@ test_expect_success 'submodule deinit fails when submodule has a .git directorytest-n"$(gitconfig--get-regexp"submodule\.example\.")"'+test_expect_success'submodule with strange name works "å äö"''+gitinit"å äö"&&+gitsubmoduleadd"./å äö"&&+test-n"$(cat.gitmodules|grep"å äö")"+' test_done
From: Fredrik Gustafsson <hidden> Date: 2016-06-15 22:57:42
This is a work built on
http://thread.gmane.org/gmane.comp.version-control.git/198873/focus=198930
Basically git-submodule.sh needs to use something else than sh to handle
newline in filenames (and therefore needs to use a language that accepts
\0 in strings).
However, since we're not there yet. I've thrown out the only
perl-dependency for git-submodule.sh. It decreases the number of
lines of code and uses the same solution as the rest of the script
already do.
This would lead to less forks and faster code. A simple testrun of
t7400-submodule-basic.sh before this patch resulted in:
real 0m8.359s
user 0m8.921s
sys 0m3.888s
real 0m9.062s
user 0m9.025s
sys 0m3.784s
real 0m8.490s
user 0m9.065s
sys 0m3.740s
After this patch was applied:
real 0m7.417s
user 0m8.717s
sys 0m3.804s
real 0m7.873s
user 0m8.821s
sys 0m3.692s
real 0m8.950s
user 0m8.765s
sys 0m3.760s
Signed-off-by: Fredrik Gustafsson <redacted>
---
git-submodule.sh | 52 +++++++++++++++++++++++-----------------------------
1 file changed, 23 insertions(+), 29 deletions(-)
Please explain the commit better so the reader can understand what the
commit does and why. I can see what's going on by reading the commit
and the original thread, but I should not have to.
Thanks,
Phil