[Libreoffice-commits] core.git: g

2023-04-01 Thread Juergen Funk (via logerrit)
 g |4 
 1 file changed, 4 deletions(-)

New commits:
commit cd013e66711c056c52ffd0839e782f6ee9c2dabd
Author: Juergen Funk 
AuthorDate: Thu Mar 30 11:43:47 2023 +0200
Commit: Mike Kaganski 
CommitDate: Sat Apr 1 13:28:14 2023 +0200

git-hooks: remove hint in './g -z'

In the patch 05ea4ac1952c546a81781ac0662747dbe6073616 the hint
is too mutch and the elsewhere I think it makes no sense, remove.

Change-Id: I1c13e593f673f2cab9a307f57f59efa1fbd903c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149761
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/g b/g
index d64c9cde4687..377890a3396a 100755
--- a/g
+++ b/g
@@ -147,10 +147,6 @@ refresh_all_hooks()
 fi
 fi
 
-if [ $wingit -eq 0 ] && [ "$OSTYPE" == "cygwin" ] ; then
-echo "When you using GIT for Windows, and get git-error look to 
.git-hooks/README"
-fi
-
 popd > /dev/null
 
 }


[Libreoffice-commits] core.git: g

2023-03-22 Thread Andrea Gelmini (via logerrit)
 g |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c888ac311734deaf07cbfe04b87aa7339ed6afb6
Author: Andrea Gelmini 
AuthorDate: Wed Mar 22 12:18:13 2023 +0100
Commit: Julien Nabet 
CommitDate: Wed Mar 22 12:46:19 2023 +

Fix typo

Change-Id: I65261e7aaccb640eee4100fd53bc7e7e2cb229f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149318
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/g b/g
index f6f9e434df9a..d64c9cde4687 100755
--- a/g
+++ b/g
@@ -100,7 +100,7 @@ refresh_all_hooks()
 wingit=$(git --version | grep -ic windows)
 gitbash=$(echo $OSTYPE | grep -ic msys)
 
-# In the win-git-bash, do not make links, it make only copies
+# In the win-git-bash, do not make links, it makes only copies
 if [ $gitbash -eq 1 ]; then
 if [ -d ".git" ]; then
 if [ ! -e "${lnkfile}" ] || [ ! -L "${lnkfile}" ] ; then


[Libreoffice-commits] core.git: g .git-hooks/README

2023-03-22 Thread Juergen Funk (via logerrit)
 .git-hooks/README |3 +
 g |   82 --
 2 files changed, 51 insertions(+), 34 deletions(-)

New commits:
commit 05ea4ac1952c546a81781ac0662747dbe6073616
Author: Juergen Funk 
AuthorDate: Wed Mar 8 10:14:55 2023 +0100
Commit: Juergen Funk 
CommitDate: Wed Mar 22 10:44:24 2023 +

git-hooks: better handling in './g -z' with win-links

  and linux-links

This patch improve patch
9afc6b22e225e8a6ec50c1cbb4d966585d15dbfd git-hooks:
  overwrite the windows-links not with linux-links

The main problem with the previous patch is that
when an alias is set for git, this alias will not
map in the Shell script passed, better you
use a git-symlink.

The other problem was the behavior of cygwin-bash
and win-git-bash that is not always the same, e.g.
   - winlnk=$(cmd /C ... 2>&1) it hang infinity,
  line 123
   - the 'ln' made not link, it only copy the files

Improving the FOR in ./git-hooks/README, when
you have the copied files, need a other del command

The patch can not set the windows-links, only output
the ./git-hooks/README
But in Win 11 should be possible, it is not needed
admin-rights for the 'mklink' command

Change-Id: Icecdb96e65fe2bba1270dfad2ac1af5af145925a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148462
Tested-by: Jenkins
Reviewed-by: Juergen Funk 

diff --git a/.git-hooks/README b/.git-hooks/README
index 5ef9e8e45a48..62a16c1de69e 100644
--- a/.git-hooks/README
+++ b/.git-hooks/README
@@ -7,7 +7,8 @@ To install manually, run:
 When you using GIT for Windows, you need Windows links
 Open a Dos-Box with admin rights then
   cd .git/hooks
-  FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO del /as /f %i & 
mklink %i ..\..\.git-hooks\%i
+  FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO del /as /f %i & del 
%i & mklink %i ..\..\.git-hooks\%i
+the error 'Could Not Find ...' can be ignore
 
 There are two groups of these hooks: client side and server side.
 
diff --git a/g b/g
index a9a879f5d907..f6f9e434df9a 100755
--- a/g
+++ b/g
@@ -90,41 +90,65 @@ refresh_all_hooks()
 local hook_name
 local hook
 local winlnk
+local wingit
+local gitbash
 local lnkfile=".git/hooks/pre-commit"
 
 pushd "${COREDIR?}" > /dev/null
 
-if [ $WINGIT -eq 1 ]; then
-winlnk=0
-if [ -e "${lnkfile}" ] && [ -L "${lnkfile}" ] ; then
-# if linux-links or windows-links?
-# dos dir output windows link:
-# 04.09.2020  10:54  pre-commit 
[..\..\.git-hooks\pre-commit]
-# dos dir output linux link:
-# file not found
-winlnk=$(cmd /C "DIR ${lnkfile//'/'/'\'}" 2>&1)
-winlnk=$(echo "$winlnk" | grep -icE ".*${lnkfile##*/} \[")
-fi
+# it is 'GIT for Windows'
+wingit=$(git --version | grep -ic windows)
+gitbash=$(echo $OSTYPE | grep -ic msys)
 
-if [ $winlnk -eq 0 ]; then
-echo "You using GIT for Windows, but the hook-links not right, 
change with mklink"
-cat .git-hooks/README
+# In the win-git-bash, do not make links, it make only copies
+if [ $gitbash -eq 1 ]; then
+if [ -d ".git" ]; then
+if [ ! -e "${lnkfile}" ] || [ ! -L "${lnkfile}" ] ; then
+# here when wrong link then the file not exist
+echo "Your hooks not right, solve this in cygwin with"
+echo "   ./g -z"
+fi
 fi
 else
-# There's no ".git" e.g. in a secondary worktree
-if [ -d ".git" ]; then
-for hook_name in "${COREDIR?}/.git-hooks"/* ; do
-hook=".git/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
-rm -f "${hook?}"
-ln -sf "${hook_name}" "${hook?}"
+if [ $wingit -eq 1 ]; then
+# There's no ".git" e.g. in a secondary worktree
+if [ -d ".git" ]; then
+winlnk=0
+if [ -e "${lnkfile}" ] && [ -L "${lnkfile}" ] ; then
+# if linux-links or windows-links?
+# dos dir output windows link:
+#   04.09.2020  10:54  pre-commit 
[..\..\.git-hooks\pre-commit]
+# dos dir output linux link:
+#   file not found
+winlnk=$(cmd /C "DIR ${lnkfile//'/'/'\'}" 2>&1)
+winlnk=$(echo "$winlnk" | grep -icE 
".*${lnkfile##*/} \[")
 fi
+
+if [ $winlnk -eq 0 ]; then
+echo "You using GIT for Windows, but the hook-links not 
right, change with mklink"
+cat .git-hooks/README
+fi
+fi
+else
+# There's no ".git" e.g. in a secondary worktree
+

[Libreoffice-commits] core.git: g .git-hooks/README

2023-03-01 Thread Juergen Funk (via logerrit)
 .git-hooks/README |2 -
 g |   64 --
 2 files changed, 49 insertions(+), 17 deletions(-)

New commits:
commit 9afc6b22e225e8a6ec50c1cbb4d966585d15dbfd
Author: Juergen Funk 
AuthorDate: Wed Feb 22 12:15:06 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Mar 1 10:44:25 2023 +

git-hooks: overwrite the windows-links not with linux-links

Always when you call build or logerrit, then the windows-links
overwrite with linux-links, but when you using GIT for Windows
you need the windows-links.
This patch made a check it is using GIT for Windows, and check what
for link it is, when wrong link, it output the .git-hooks/README

Improve the check for links, when a link is set not need to set
the link anymore

In .git-hooks/README improve the FOR with delete of the wrong link

look here for GIT for Windows:

https://wiki.documentfoundation.org/Development/BuildingOnWindows/de#Cygwin_and_git

Change-Id: I9f6ef9aca316058ef74cb2b2d107236f03a2e2ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147458
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/.git-hooks/README b/.git-hooks/README
index 93b00ee01c3b..5ef9e8e45a48 100644
--- a/.git-hooks/README
+++ b/.git-hooks/README
@@ -7,7 +7,7 @@ To install manually, run:
 When you using GIT for Windows, you need Windows links
 Open a Dos-Box with admin rights then
   cd .git/hooks
-  FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO mklink %i 
..\..\.git-hooks\%i
+  FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO del /as /f %i & 
mklink %i ..\..\.git-hooks\%i
 
 There are two groups of these hooks: client side and server side.
 
diff --git a/g b/g
index b018561c6775..a9a879f5d907 100755
--- a/g
+++ b/g
@@ -42,7 +42,7 @@ refresh_submodule_hooks()
 continue
 fi
 hook="${repo?}/.git/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
+if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
 rm -f "${hook?}"
 ln -sf "${hook_name}" "${hook?}"
 fi
@@ -53,7 +53,7 @@ refresh_submodule_hooks()
 continue
 fi
 hook="${repo?}/.git/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
+if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
 rm -f "${hook?}"
 ln -sf "${hook_name}" "${hook?}"
 fi
@@ -64,7 +64,7 @@ refresh_submodule_hooks()
 continue
 fi
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
+if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
 rm -f "${hook?}"
 ln -sf "${hook_name}" "${hook?}"
 fi
@@ -75,7 +75,7 @@ refresh_submodule_hooks()
 continue
 fi
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
+if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
 rm -f "${hook?}"
 ln -sf "${hook_name}" "${hook?}"
 fi
@@ -89,22 +89,44 @@ refresh_all_hooks()
 local repo
 local hook_name
 local hook
+local winlnk
+local lnkfile=".git/hooks/pre-commit"
 
 pushd "${COREDIR?}" > /dev/null
-# There's no ".git" e.g. in a secondary worktree
-if [ -d ".git" ]; then
-for hook_name in "${COREDIR?}/.git-hooks"/* ; do
-hook=".git/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-rm -f "${hook?}"
-ln -sf "${hook_name}" "${hook?}"
-fi
+
+if [ $WINGIT -eq 1 ]; then
+winlnk=0
+if [ -e "${lnkfile}" ] && [ -L "${lnkfile}" ] ; then
+# if linux-links or windows-links?
+# dos dir output windows link:
+# 04.09.2020  10:54  pre-commit 
[..\..\.git-hooks\pre-commit]
+# dos dir output linux link:
+# file not found
+winlnk=$(cmd /C "DIR ${lnkfile//'/'/'\'}" 2>&1)
+winlnk=$(echo "$winlnk" | grep -icE ".*${lnkfile##*/} \[")
+fi
+
+if [ $winlnk -eq 0 ]; then
+echo "You using GIT for Windows, but the hook-links not right, 
change with mklink"
+cat .git-hooks/README
+fi
+else
+# There's no ".git" e.g. in a secondary worktree
+if [ -d ".git" ]; then
+for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+hook=".git/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ ! -L "${hook?}" ] ; then
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
+

[Libreoffice-commits] core.git: g

2022-11-27 Thread Mike Kaganski (via logerrit)
 g |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 1fd42472e2b1a2169d56e62ef11aa7ee1f7815e7
Author: Mike Kaganski 
AuthorDate: Mon Nov 28 00:38:30 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Nov 28 05:18:12 2022 +0100

Avoid refreshing all hooks in secondary worktrees

This avoids "ln: failed to access '.git/hooks/foo': Not a directory"
console noise. The primary worktree's hooks are used in secondary
worktrees anyway.

Possibly using 'git rev-parse --git-dir', and putting hooks there
would be a better fix? No idea.

Change-Id: I846e065d017744e9d8dcee847d48bc1adc66d761
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143358
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/g b/g
index fdf95c8278ce..b018561c6775 100755
--- a/g
+++ b/g
@@ -91,13 +91,16 @@ refresh_all_hooks()
 local hook
 
 pushd "${COREDIR?}" > /dev/null
-for hook_name in "${COREDIR?}/.git-hooks"/* ; do
-hook=".git/hooks/${hook_name##*/}"
-if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-rm -f "${hook?}"
-ln -sf "${hook_name}" "${hook?}"
-fi
-done
+# There's no ".git" e.g. in a secondary worktree
+if [ -d ".git" ]; then
+for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+hook=".git/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
+fi
+done
+fi
 
 for repo in ${SUBMODULES_ALL?} ; do
 refresh_submodule_hooks "$repo"


[Libreoffice-commits] core.git: g

2022-05-31 Thread Michael Stahl (via logerrit)
 g |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit aa8ef74b475a6fbd6e4ec27c42941aa274998df6
Author: Michael Stahl 
AuthorDate: Mon May 30 21:30:04 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue May 31 10:29:45 2022 +0200

g: we are not, in fact, in the BUILDDIR

For an out-of-tree build, "make fetch" poinlessly clones all git
submodules.

Change-Id: If4afb218946f49ba934f68b35806fd8143c39387
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135143
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/g b/g
index 021ad6c41cde..fdf95c8278ce 100755
--- a/g
+++ b/g
@@ -10,9 +10,9 @@ fi
 SUBMODULES_ALL="dictionaries helpcontent2 translations"
 
 pushd $(dirname $0) > /dev/null
-if [ -f config_host.mk ] ; then
-# we are in the BUILDDIR
-SRC_ROOT=$(< config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ] ; then
+# we are in the SRCDIR
+SRC_ROOT=$(< ${BUILDDIR}/config_host.mk grep -a SRC_ROOT | sed -e 
"s/.*=//")
 else
 SRC_ROOT=$(pwd)
 fi
@@ -150,8 +150,8 @@ get_active_submodules()
 get_configured_submodules()
 {
 SUBMODULES_CONFIGURED=""
-if [ -f config_host.mk ] ; then
-SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ] ; then
+SUBMODULES_CONFIGURED=$(< ${BUILDDIR}/config_host.mk grep -a 
GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
 else
 # if we need the configured submodule before the configuration is 
done. we assumed you want them all
 SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
@@ -161,12 +161,12 @@ get_configured_submodules()
 get_git_reference()
 {
 REFERENCED_GIT=""
-if [ -f config_host.mk ]; then
-REFERENCED_GIT=$(< config_host.mk grep -a GIT_REFERENCE_SRC | sed -e 
"s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ]; then
+REFERENCED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a 
GIT_REFERENCE_SRC | sed -e "s/.*=//")
 fi
 LINKED_GIT=""
-if [ -f config_host.mk ]; then
-LINKED_GIT=$(< config_host.mk grep -a GIT_LINK_SRC | sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ]; then
+LINKED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a GIT_LINK_SRC | sed 
-e "s/.*=//")
 fi
 }
 


[Libreoffice-commits] core.git: g

2022-01-15 Thread Arnaud VERSINI (via logerrit)
 g |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5448ad57032df1113daf1c3899741febc069d8b3
Author: Arnaud VERSINI 
AuthorDate: Sun Jan 2 17:33:27 2022 +0100
Commit: Arnaud Versini 
CommitDate: Sat Jan 15 15:42:34 2022 +0100

Allow g to run git gc command

Change-Id: Ibca338cbd99839b20a2373075a2e544e7ab638e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127870
Tested-by: Jenkins
Reviewed-by: Arnaud Versini 

diff --git a/g b/g
index 8b733fc878c6..021ad6c41cde 100755
--- a/g
+++ b/g
@@ -24,7 +24,7 @@ usage()
 {
 git
 echo
-echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) 
[git options/args..]]"
+echo "Usage: g [options] [git 
(checkout|clone|fetch|gc|grep|pull|push|reset) [git options/args..]]"
 echo ""
 echo " -z restore the git hooks and do other sanity checks"
 }
@@ -362,6 +362,9 @@ case "$COMMAND" in
 (git fetch "$@" && git submodule foreach git fetch "$@" ) && git 
submodule update --progress
 
 ;;
+gc)
+ (git gc "$@" && git submodule foreach git gc "$@" )
+;;
 grep)
 KEEP_GOING="||:"
 do_git_cmd "${COMMAND}" "$@"


[Libreoffice-commits] core.git: g

2021-07-12 Thread Kevin Suo (via logerrit)
 g |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 508ccbdb14ecdebf1aee2110e91f83768ab387f0
Author: Kevin Suo 
AuthorDate: Sat Jun 26 17:42:52 2021 +0800
Commit: Noel Grandin 
CommitDate: Mon Jul 12 10:55:05 2021 +0200

Add "--progress" agument to the ./g command

Newer version of git has a --progress option to show the progress when 
running "git submodule update". This is useful in our ./g command expecially 
when we are building the code with l10n languages enabled and the network 
connection is slow. Without this I do not see where I am for the update process 
and may think it have died.

Change-Id: I4c9e1e9bccbd8e6ca2ea2b44f5b6d6d90cad1506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117922
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/g b/g
index 918292eb3ee6..8b733fc878c6 100755
--- a/g
+++ b/g
@@ -222,7 +222,7 @@ do_checkout()
 fi
 done
 if [ -f .gitmodules ] ; then
-git submodule update
+git submodule update --progress
 if [ -n "$branch" ] ; then
 git submodule foreach git checkout -b "${branch}" HEAD || return $?
 fi
@@ -243,7 +243,7 @@ do_reset()
 {
 git reset "$@" || return $?
 if [ -f .gitmodules ] ; then
-git submodule update || return $?
+git submodule update --progress || return $?
 else
 # now that is the nasty case we moved prior to submodules
 # delete the submodules left over if any
@@ -277,9 +277,9 @@ do_init_modules()
 done
 for module in $SUBMODULES_CONFIGURED ; do
 if [ -n "$REFERENCED_GIT" ] ; then
-git submodule update --reference 
"$REFERENCED_GIT/.git/modules/$module" "$module" || return $?
+git submodule update --reference 
"$REFERENCED_GIT/.git/modules/$module" --progress "$module" || return $?
 else
-git submodule update "$module" || return $?
+git submodule update --progress "$module" || return $?
 fi
 done
 return 0
@@ -359,7 +359,7 @@ case "$COMMAND" in
 do_init_modules && refresh_all_hooks
 ;;
 fetch)
-(git fetch "$@" && git submodule foreach git fetch "$@" ) && git 
submodule update
+(git fetch "$@" && git submodule foreach git fetch "$@" ) && git 
submodule update --progress
 
 ;;
 grep)
@@ -367,7 +367,7 @@ case "$COMMAND" in
 do_git_cmd "${COMMAND}" "$@"
 ;;
 pull)
-git pull "$@" && git submodule update && refresh_all_hooks
+git pull "$@" && git submodule update --progress && refresh_all_hooks
 ;;
 push)
 git submodule foreach git push "$@"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2021-03-04 Thread Mike Kaganski (via logerrit)
 g |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 0e6e10cd3dd5a6bf06000750a74982a9824ec853
Author: Mike Kaganski 
AuthorDate: Thu Mar 4 11:40:05 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Mar 4 15:16:55 2021 +0100

Workaround a problem in Git for Windows' bash

... where running './g pull -r' resulted in

  ln: failed to create symbolic link '.git/modules/dictionaries/hooks/*': 
No such file or directory
  ln: failed to create symbolic link '.git/modules/translations/hooks/*': 
No such file or directory

Change-Id: Ie0bd2eaca44f8b1a2ad2de9083bbefc779e213e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111948
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/g b/g
index 746babe23539..918292eb3ee6 100755
--- a/g
+++ b/g
@@ -38,6 +38,9 @@ refresh_submodule_hooks()
 if [ -d "${repo?}"/.git ] ; then
 # use core's hook by default
 for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+if [ ! -e "${hook_name}" ] ; then
+continue
+fi
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
@@ -46,6 +49,9 @@ refresh_submodule_hooks()
 done
 # override if need be by the submodules' own hooks
 for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
+if [ ! -e "${hook_name}" ] ; then
+continue
+fi
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
@@ -54,6 +60,9 @@ refresh_submodule_hooks()
 done
 elif [ -d .git/modules/"${repo}"/hooks ] ; then
 for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+if [ ! -e "${hook_name}" ] ; then
+continue
+fi
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
@@ -62,6 +71,9 @@ refresh_submodule_hooks()
 done
 # override if need be by the submodules' own hooks
 for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
+if [ ! -e "${hook_name}" ] ; then
+continue
+fi
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2018-07-02 Thread Thorsten Behrens
 g |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5fce97a58b8f764e35bf98128591c9a89537da05
Author: Thorsten Behrens 
Date:   Mon Jul 2 18:11:47 2018 +0200

./g: don't exit early on ./g checkout -f

Change-Id: I33f54c365bce64feb1c58fc8e4faddb7ad77
Reviewed-on: https://gerrit.libreoffice.org/56822
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/g b/g
index 12d7631ff39b..746babe23539 100755
--- a/g
+++ b/g
@@ -201,7 +201,7 @@ do_checkout()
 git checkout "$@" || return $?
 for cmd in "$@" ; do
 if [ "$cmd" = "-f" ]; then
-return 0
+continue
 elif [ "$cmd" = "-b" ] ; then
 create_branch=1
 elif [ "$create_branch" = "1" ] ; then
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2018-07-02 Thread Thorsten Behrens
 g |  284 +++---
 1 file changed, 142 insertions(+), 142 deletions(-)

New commits:
commit 4c475bc6763e29f7af2caadc7add42d26e1d6f75
Author: Thorsten Behrens 
Date:   Mon Jul 2 18:11:22 2018 +0200

./g: indent & de-tabbify to make code readable

Change-Id: Ica2a0dd281f77bfab223fa1526ba0720c9c280f1
Reviewed-on: https://gerrit.libreoffice.org/56821
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/g b/g
index 13bc73939e49..12d7631ff39b 100755
--- a/g
+++ b/g
@@ -31,52 +31,52 @@ usage()
 
 refresh_submodule_hooks()
 {
-local repo=$1
-local hook
-local hook_name
+local repo=$1
+local hook
+local hook_name
 
 if [ -d "${repo?}"/.git ] ; then
 # use core's hook by default
-   for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+for hook_name in "${COREDIR?}/.git-hooks"/* ; do
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-   rm -f "${hook?}"
-   ln -sf "${hook_name}" "${hook?}"
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
 fi
-   done
+done
 # override if need be by the submodules' own hooks
-   for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
+for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-   rm -f "${hook?}"
-   ln -sf "${hook_name}" "${hook?}"
-   fi
-   done
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
+fi
+done
 elif [ -d .git/modules/"${repo}"/hooks ] ; then
-   for hook_name in "${COREDIR?}/.git-hooks"/* ; do
+for hook_name in "${COREDIR?}/.git-hooks"/* ; do
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-   rm -f "${hook?}"
-   ln -sf "${hook_name}" "${hook?}"
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
 fi
-   done
+done
 # override if need be by the submodules' own hooks
-   for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
+for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
-   rm -f "${hook?}"
-   ln -sf "${hook_name}" "${hook?}"
-   fi
-   done
+rm -f "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
+fi
+done
 fi
 
 }
 
 refresh_all_hooks()
 {
-local repo
-local hook_name
-local hook
+local repo
+local hook_name
+local hook
 
 pushd "${COREDIR?}" > /dev/null
 for hook_name in "${COREDIR?}/.git-hooks"/* ; do
@@ -96,20 +96,20 @@ local hook
 
 set_push_url()
 {
-local repo
+local repo
 
 repo="$1"
 if [ -n "$repo" ] ; then
-   pushd "${COREDIR?}/${repo?}" > /dev/null
+pushd "${COREDIR?}/${repo?}" > /dev/null
 else
-   pushd "${COREDIR?}" > /dev/null
-   repo="core"
+pushd "${COREDIR?}" > /dev/null
+repo="core"
 fi
 echo "setting up push url for ${repo?}"
 if [ "${repo?}" = "helpcontent2" ] ; then
-   git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/help"
+git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/help"
 else
-   git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/${repo?}"
+git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/${repo?}"
 fi
 popd > /dev/null
 }
@@ -119,19 +119,19 @@ set_push_urls()
 PUSH_USER="$1"
 set_push_url
 for repo in ${SUBMODULES_ACTIVE?} ; do
-   set_push_url "${repo?}"
+set_push_url "${repo?}"
 done
 }
 
 get_active_submodules()
 {
-SUBMODULES_ACTIVE=""
-local repo
+SUBMODULES_ACTIVE=""
+local repo
 
 for repo in ${SUBMODULES_ALL?} ; do
-   if [ -d "${repo?}"/.git ] || [ -f "${repo?}"/.git ] ; then
-   SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}"
-   fi
+if [ -d "${repo?}"/.git ] || [ -f "${repo?}"/.git ] ; then
+SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}"
+fi
 done
 }
 
@@ -139,10 +139,10 @@ get_configured_submodules()
 {
 SUBMODULES_CONFIGURED=""
 if [ -f config_host.mk ] ; then
-   SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
+SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
 else
-   # if we need the configured submodule before the configuration is done. 
we assumed you want them all
-   

[Libreoffice-commits] core.git: g

2018-03-12 Thread Stephan Bergmann
 g |8 
 1 file changed, 8 deletions(-)

New commits:
commit 3a33d9ce82566387337faa3e7983a2aca39f3b1f
Author: Stephan Bergmann 
Date:   Mon Mar 12 16:56:30 2018 +0100

Revert "g: ignore submodule changes"

This reverts commit 27925032cd5aec8805185679e01c687c40bbd617.
Conflicts:
g

According to vmiklos, that commit was meant to help with the following 
scenario:
Assume a dev uses submodules and uses plain `git pull && git submodule 
update`
instead of ./g.  When they forget the "&& git submodule update" part and do
`git commit -a`, changes to the submodules were excluded from the commit.

However, when they do `git add -u && git commit` instead of `git commit -a`,
changes to the submodules /are/ included in the commit, despite `git 
status` or
`git diff` (both prior to `git add -u`) or `git diff --cached` (after `git 
add
-u`) not indicating that there are any changes to the submodules.  I 
consider
that problem more confusing and severe than the problem that the commit 
solved.

Change-Id: I595eed3c1c04efd108be1ccd792d8d7bce72a345
Reviewed-on: https://gerrit.libreoffice.org/51155
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/g b/g
index 49ece9ff6880..13bc73939e49 100755
--- a/g
+++ b/g
@@ -90,14 +90,6 @@ local hook
 for repo in ${SUBMODULES_ALL?} ; do
 refresh_submodule_hooks "$repo"
 done
-# In our workflow, it's always gerrit that does the submodule updates, so
-# better ignoring them to avoid accidentally including those changes in our
-# commits.
-# 'git submodule status' can be still used to see if a submodule has such
-# changes.
-for repo in ${SUBMODULES_CONFIGURED?} ; do
-git config submodule."$repo".ignore all
-done
 popd > /dev/null
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2017-04-27 Thread Ilmari Lauhakangas
 g |   48 
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit e5b1c5374464f6f86b3d331fb89c0e126008136a
Author: Ilmari Lauhakangas 
Date:   Thu Apr 27 12:46:47 2017 +0300

tdf#105204: more ShellCheck nitpicks for g

Change-Id: I50cb1a403d3aa34434e61a2a995ef043b2f1f82c
SC2086: Double quote to prevent globbing and word splitting.
SC2145: Argument mixes string and array. Use * or separate argument.
Reviewed-on: https://gerrit.libreoffice.org/37023
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/g b/g
index 38e9db928772..49ece9ff6880 100755
--- a/g
+++ b/g
@@ -35,9 +35,9 @@ local repo=$1
 local hook
 local hook_name
 
-if [ -d ${repo?}/.git ] ; then
+if [ -d "${repo?}"/.git ] ; then
 # use core's hook by default
-   for hook_name in ${COREDIR?}/.git-hooks/* ; do
+   for hook_name in "${COREDIR?}/.git-hooks"/* ; do
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
@@ -45,15 +45,15 @@ local hook_name
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in ${COREDIR?}/${repo?}/.git-hooks/* ; do
+   for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
 hook="${repo?}/.git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
ln -sf "${hook_name}" "${hook?}"
fi
done
-elif [ -d .git/modules/${repo}/hooks ] ; then
-   for hook_name in ${COREDIR?}/.git-hooks/* ; do
+elif [ -d .git/modules/"${repo}"/hooks ] ; then
+   for hook_name in "${COREDIR?}/.git-hooks"/* ; do
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
@@ -61,7 +61,7 @@ local hook_name
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in ${COREDIR?}/${repo?}/.git-hooks/* ; do
+   for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do
 hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
@@ -79,7 +79,7 @@ local hook_name
 local hook
 
 pushd "${COREDIR?}" > /dev/null
-for hook_name in ${COREDIR?}/.git-hooks/* ; do
+for hook_name in "${COREDIR?}/.git-hooks"/* ; do
 hook=".git/hooks/${hook_name##*/}"
 if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
@@ -88,7 +88,7 @@ local hook
 done
 
 for repo in ${SUBMODULES_ALL?} ; do
-refresh_submodule_hooks $repo
+refresh_submodule_hooks "$repo"
 done
 # In our workflow, it's always gerrit that does the submodule updates, so
 # better ignoring them to avoid accidentally including those changes in our
@@ -96,7 +96,7 @@ local hook
 # 'git submodule status' can be still used to see if a submodule has such
 # changes.
 for repo in ${SUBMODULES_CONFIGURED?} ; do
-git config submodule.$repo.ignore all
+git config submodule."$repo".ignore all
 done
 popd > /dev/null
 
@@ -137,7 +137,7 @@ SUBMODULES_ACTIVE=""
 local repo
 
 for repo in ${SUBMODULES_ALL?} ; do
-   if [ -d ${repo?}/.git ] || [ -f ${repo?}/.git ] ; then
+   if [ -d "${repo?}"/.git ] || [ -f "${repo?}"/.git ] ; then
SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}"
fi
 done
@@ -149,7 +149,7 @@ get_configured_submodules()
 if [ -f config_host.mk ] ; then
SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
 else
-   # if we need the configured submoduel before the configuration is done. 
we assumed you want them all
+   # if we need the configured submodule before the configuration is done. 
we assumed you want them all
SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
 fi
 }
@@ -172,7 +172,7 @@ local module
 local repo
 
 for module in $SUBMODULES_CONFIGURED ; do
-   if [ ! -d ${module?}/.git ] ; then
+   if [ ! -d "${module?}"/.git ] ; then
case "${module?}" in
helpcontent2)
if [ -d clone/help/.git ] ; then
@@ -180,7 +180,7 @@ local repo
fi
;;
*)
-   if [ -d clone/${module?}/.git ] ; then
+   if [ -d clone/"${module?}"/.git ] ; then
repo="clone/${module?}/.git"
fi
;;
@@ -194,7 +194,7 @@ local repo
 
 do_git_cmd()
 {
-echo "cmd:$@"
+echo "cmd:$*"
 git "$@"
 git submodule foreach git "$@" $KEEP_GOING
 }
@@ 

[Libreoffice-commits] core.git: g

2017-04-26 Thread Ilmari Lauhakangas
 g |   52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 55c5b27bd683a7c36f07c1be781d8baad30b4571
Author: Ilmari Lauhakangas 
Date:   Sat Apr 15 18:35:17 2017 +0300

tdf#105204: ShellCheck nitpicks for g

Change-Id: I1814bc65c62af1a92a090127f1cfda8ad228936d
SC2002: Useless cat.
SC2045: Iterating over ls output is fragile.
SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
SC2006: Use $(..) instead of legacy `..`
Reviewed-on: https://gerrit.libreoffice.org/36571
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 

diff --git a/g b/g
index 3d2a37d65723..38e9db928772 100755
--- a/g
+++ b/g
@@ -12,7 +12,7 @@ SUBMODULES_ALL="dictionaries helpcontent2 translations"
 pushd $(dirname $0) > /dev/null
 if [ -f config_host.mk ] ; then
 # we are in the BUILDDIR
-SRC_ROOT=$(cat config_host.mk | grep -a SRC_ROOT | sed -e "s/.*=//")
+SRC_ROOT=$(< config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//")
 else
 SRC_ROOT=$(pwd)
 fi
@@ -37,35 +37,35 @@ local hook_name
 
 if [ -d ${repo?}/.git ] ; then
 # use core's hook by default
-   for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do
-hook="${repo?}/.git/hooks/${hook_name?}"
-if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+   for hook_name in ${COREDIR?}/.git-hooks/* ; do
+hook="${repo?}/.git/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
-   ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
+   ln -sf "${hook_name}" "${hook?}"
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in $(ls -1 "${COREDIR?}/${repo?}/.git-hooks" 2>/dev/null) 
; do
-hook="${repo?}/.git/hooks/${hook_name?}"
-if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+   for hook_name in ${COREDIR?}/${repo?}/.git-hooks/* ; do
+hook="${repo?}/.git/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
-   ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" 
"${hook?}"
+   ln -sf "${hook_name}" "${hook?}"
fi
done
 elif [ -d .git/modules/${repo}/hooks ] ; then
-   for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do
-hook=".git/modules/${repo?}/hooks/${hook_name?}"
-if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+   for hook_name in ${COREDIR?}/.git-hooks/* ; do
+hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
-   ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
+   ln -sf "${hook_name}" "${hook?}"
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in $(ls -1 "${COREDIR?}/${repo?}/.git-hooks" 2>/dev/null) 
; do
-hook=".git/modules/${repo?}/hooks/${hook_name?}"
-if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+   for hook_name in ${COREDIR?}/${repo?}/.git-hooks/* ; do
+hook=".git/modules/${repo?}/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
rm -f "${hook?}"
-   ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" 
"${hook?}"
+   ln -sf "${hook_name}" "${hook?}"
fi
done
 fi
@@ -79,11 +79,11 @@ local hook_name
 local hook
 
 pushd "${COREDIR?}" > /dev/null
-for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do
-hook=".git/hooks/${hook_name?}"
-if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+for hook_name in ${COREDIR?}/.git-hooks/* ; do
+hook=".git/hooks/${hook_name##*/}"
+if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then
 rm -f "${hook?}"
-ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
+ln -sf "${hook_name}" "${hook?}"
 fi
 done
 
@@ -137,7 +137,7 @@ SUBMODULES_ACTIVE=""
 local repo
 
 for repo in ${SUBMODULES_ALL?} ; do
-   if [ -d ${repo?}/.git -o -f ${repo?}/.git ] ; then
+   if [ -d ${repo?}/.git ] || [ -f ${repo?}/.git ] ; then
SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}"
fi
 done
@@ -147,7 +147,7 @@ get_configured_submodules()
 {
 SUBMODULES_CONFIGURED=""
 if [ -f config_host.mk ] ; then
-   SUBMODULES_CONFIGURED=$(cat config_host.mk | grep -a 
GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
+   SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES 
| sed -e "s/.*=//")
 else
# if we need the configured submoduel before the configuration is done. 
we assumed 

[Libreoffice-commits] core.git: g

2016-05-17 Thread Christian Lohmaier
 g |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d94b827c404e2801797c97a830eecfc6d1489202
Author: Christian Lohmaier 
Date:   Mon May 9 16:06:38 2016 +0200

it is "git submodule", not "git submodules"

diff --git a/g b/g
index 69b0812..3d2a37d 100755
--- a/g
+++ b/g
@@ -220,7 +220,7 @@ local module
 if [ -f .gitmodules ] ; then
git submodule update
if [ -n "$branch" ] ; then
-   git submodules foreach git checkout -b ${branch} HEAD || return $?
+   git submodule foreach git checkout -b ${branch} HEAD || return $?
fi
 else
# now that is the nasty case we moved prior to submodules
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2016-01-08 Thread Juergen Funk
 g |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 87495ce1214424dbd15aa4271a27f3dcac2ea5e2
Author: Juergen Funk 
Date:   Thu Jan 7 17:38:15 2016 +0100

g: fix var in checkout

Change-Id: Ie414037671ca9248931a47000db2b4ed259e72da
Reviewed-on: https://gerrit.libreoffice.org/21217
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/g b/g
index 423a200..69b0812 100755
--- a/g
+++ b/g
@@ -213,7 +213,7 @@ local module
elif [ "$cmd" = "-b" ] ; then
create_branch=1
elif [ "$create_branch" = "1" ] ; then
-   branch="$arg"
+   branch="$cmd"
create_branch=0
fi
 done
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2015-06-18 Thread Tomofumi Yagi
 g |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 125f06dbf73c287c3559acbb3096330b5e75135b
Author: Tomofumi Yagi ya...@mknada.sakura.ne.jp
Date:   Mon Jun 15 21:20:19 2015 +0900

'g' doesn't work correctly when config_host.mk contains non-ascii 
characters.

In 'g' shell script, we use grep to get substring from config_host.mk file.
When config_host.mk file contains non-ascii characters(e.g. Japanese),
this processing doesn't work.
As a result, some variables(SUBMODULES_CONFIGURED, REFERENCED_GIT, 
LINKED_GIT) will be
assigned to Binary file (standard input) matches.
This is an error message of grep.
The problem will reproduce on Cygwin64 with Japanese locale.

With '-a' option, grep will work well, and 'g' shell script will work 
correctly.

Please refer the following commit,too.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0293ec98c92fd58a592f7dd86fbbf47e7b9195c6

Change-Id: If4e0b356173c8f442e3539ed343f441d87dbfd48
Reviewed-on: https://gerrit.libreoffice.org/16344
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/g b/g
index 2db87cf..423a200 100755
--- a/g
+++ b/g
@@ -147,7 +147,7 @@ get_configured_submodules()
 {
 SUBMODULES_CONFIGURED=
 if [ -f config_host.mk ] ; then
-   SUBMODULES_CONFIGURED=$(cat config_host.mk | grep GIT_NEEDED_SUBMODULES 
| sed -e s/.*=//)
+   SUBMODULES_CONFIGURED=$(cat config_host.mk | grep -a 
GIT_NEEDED_SUBMODULES | sed -e s/.*=//)
 else
# if we need the configured submoduel before the configuration is done. 
we assumed you want them all
SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
@@ -158,11 +158,11 @@ get_git_reference()
 {
 REFERENCED_GIT=
 if [ -f config_host.mk ]; then
-   REFERENCED_GIT=$(cat config_host.mk | grep GIT_REFERENCE_SRC | sed -e 
s/.*=//)
+   REFERENCED_GIT=$(cat config_host.mk | grep -a GIT_REFERENCE_SRC | sed 
-e s/.*=//)
 fi
 LINKED_GIT=
 if [ -f config_host.mk ]; then
-   LINKED_GIT=$(cat config_host.mk | grep GIT_LINK_SRC | sed -e s/.*=//)
+   LINKED_GIT=$(cat config_host.mk | grep -a GIT_LINK_SRC | sed -e 
s/.*=//)
 fi
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2015-02-17 Thread Tomofumi Yagi
 g |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0293ec98c92fd58a592f7dd86fbbf47e7b9195c6
Author: Tomofumi Yagi ya...@mknada.sakura.ne.jp
Date:   Sat Feb 14 19:21:57 2015 +0900

g: SRC_ROOT may not contain path string in a localized environment

When config_host.mk contains non-ascii characters(e.g. Japanese ),
SRC_ROOT may contain an error message Binary file (standard input)
 matches) from grep, and SRC_ROOT may not contain path string.
With '-a' option, grep will work well.

Change-Id: Ifaada5f5a11939d624460cd8dcc57d93911ae790
Reviewed-on: https://gerrit.libreoffice.org/14491
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/g b/g
index bd4270a..2db87cf 100755
--- a/g
+++ b/g
@@ -12,7 +12,7 @@ SUBMODULES_ALL=dictionaries helpcontent2 translations
 pushd $(dirname $0)  /dev/null
 if [ -f config_host.mk ] ; then
 # we are in the BUILDDIR
-SRC_ROOT=$(cat config_host.mk | grep SRC_ROOT | sed -e s/.*=//)
+SRC_ROOT=$(cat config_host.mk | grep -a SRC_ROOT | sed -e s/.*=//)
 else
 SRC_ROOT=$(pwd)
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2015-01-14 Thread Stephan Bergmann
 g |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a3e51e2706f37f4a7a3a3276d96fd4bcad7f5f7c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 14 15:42:00 2015 +0100

Some quoting fixes

Change-Id: I3b375c67ed84f29360cbc9933f4a1e5c7cbe3277

diff --git a/g b/g
index 0d899b4..bd4270a 100755
--- a/g
+++ b/g
@@ -37,7 +37,7 @@ local hook_name
 
 if [ -d ${repo?}/.git ] ; then
 # use core's hook by default
-   for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+   for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
 hook=${repo?}/.git/hooks/${hook_name?}
 if [ ! -e ${hook?} -o -L ${hook?} ] ; then
rm -f ${hook?}
@@ -45,7 +45,7 @@ local hook_name
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2/dev/null) ; 
do
+   for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2/dev/null) 
; do
 hook=${repo?}/.git/hooks/${hook_name?}
 if [ ! -e ${hook?} -o -L ${hook?} ] ; then
rm -f ${hook?}
@@ -53,7 +53,7 @@ local hook_name
fi
done
 elif [ -d .git/modules/${repo}/hooks ] ; then
-   for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+   for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
 hook=.git/modules/${repo?}/hooks/${hook_name?}
 if [ ! -e ${hook?} -o -L ${hook?} ] ; then
rm -f ${hook?}
@@ -61,7 +61,7 @@ local hook_name
 fi
done
 # override if need be by the submodules' own hooks
-   for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2/dev/null) ; 
do
+   for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2/dev/null) 
; do
 hook=.git/modules/${repo?}/hooks/${hook_name?}
 if [ ! -e ${hook?} -o -L ${hook?} ] ; then
rm -f ${hook?}
@@ -78,8 +78,8 @@ local repo
 local hook_name
 local hook
 
-pushd ${COREDIR?}  /dev/null
-for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+pushd ${COREDIR?}  /dev/null
+for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
 hook=.git/hooks/${hook_name?}
 if [ ! -e ${hook?} -o -L ${hook?} ] ; then
 rm -f ${hook?}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2013-10-04 Thread Miklos Vajna
 g |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 677b4402a970ef135da76760c9a97a1ffb74c3b9
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri Oct 4 16:03:57 2013 +0200

g: fix --set-push-urls

1) submodule's .git is possibly a file now

2) just use the logerrit alias, as

   - logerrit setup already set that up
   - possibly otherwise the right ssh key is not picked up

Change-Id: I4fb355a7f7ec7d549d2b06367f4fd10d06086374

diff --git a/g b/g
index 4c0184c..0d899b4 100755
--- a/g
+++ b/g
@@ -115,9 +115,9 @@ local repo
 fi
 echo setting up push url for ${repo?}
 if [ ${repo?} = helpcontent2 ] ; then
-   git config remote.origin.pushurl 
ssh://${PUSH_USER}gerrit.libreoffice.org:29418/help
+   git config remote.origin.pushurl ssh://${PUSH_USER}logerrit/help
 else
-   git config remote.origin.pushurl 
ssh://${PUSH_USER}gerrit.libreoffice.org:29418/${repo?}
+   git config remote.origin.pushurl ssh://${PUSH_USER}logerrit/${repo?}
 fi
 popd  /dev/null
 }
@@ -137,7 +137,7 @@ SUBMODULES_ACTIVE=
 local repo
 
 for repo in ${SUBMODULES_ALL?} ; do
-   if [ -d ${repo?}/.git ] ; then
+   if [ -d ${repo?}/.git -o -f ${repo?}/.git ] ; then
SUBMODULES_ACTIVE=${repo?} ${SUBMODULES_ACTIVE?}
fi
 done
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: g

2013-07-22 Thread Miklos Vajna
 g |8 
 1 file changed, 8 insertions(+)

New commits:
commit 27925032cd5aec8805185679e01c687c40bbd617
Author: Miklos Vajna vmik...@suse.cz
Date:   Mon Jul 22 11:55:49 2013 +0200

g: ignore submodule changes

Change-Id: I6125dd018615bc7aa18bacc838ea602ccb0fabc1

diff --git a/g b/g
index e273171..4c0184c 100755
--- a/g
+++ b/g
@@ -90,6 +90,14 @@ local hook
 for repo in ${SUBMODULES_ALL?} ; do
 refresh_submodule_hooks $repo
 done
+# In our workflow, it's always gerrit that does the submodule updates, so
+# better ignoring them to avoid accidentally including those changes in our
+# commits.
+# 'git submodule status' can be still used to see if a submodule has such
+# changes.
+for repo in ${SUBMODULES_CONFIGURED?} ; do
+git config submodule.$repo.ignore all
+done
 popd  /dev/null
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits