Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d005fb46
Kaydet (Commit)
d005fb46
authored
Nis 11, 2011
tarafından
Andras Timar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use git hook instead of gitattributes filter for *.po files
üst
a547fe19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
.gitattributes
.gitattributes
+0
-1
g
g
+0
-6
pre-commit
git-hooks/pre-commit
+10
-0
No files found.
.gitattributes
Dosyayı görüntüle @
d005fb46
*.doc binary
*.doc binary
*.sdw binary
*.sdw binary
*.po filter=po
g
Dosyayı görüntüle @
d005fb46
...
@@ -38,12 +38,6 @@ function update_hooks()
...
@@ -38,12 +38,6 @@ function update_hooks()
if
[
"
$PWD
"
!=
"
$RAWBUILDDIR
"
-a
!
-e
.gitattributes
]
;
then
if
[
"
$PWD
"
!=
"
$RAWBUILDDIR
"
-a
!
-e
.gitattributes
]
;
then
ln
-s
$RAWBUILDDIR
/.gitattributes
.
ln
-s
$RAWBUILDDIR
/.gitattributes
.
fi
fi
if
[
-z
"
$(
git config filter.po.clean
)
"
]
;
then
git config filter.po.clean
'msgcat - --no-wrap'
fi
if
[
-z
"
$(
git config filter.po.smudge
)
"
]
;
then
git config filter.po.smudge
cat
fi
}
}
# extra params for some commands, like log
# extra params for some commands, like log
...
...
git-hooks/pre-commit
Dosyayı görüntüle @
d005fb46
...
@@ -150,6 +150,16 @@ while (my $file = <FILES>) {
...
@@ -150,6 +150,16 @@ while (my $file = <FILES>) {
}
}
}
}
# run 'msgcat --nowrap' when committing *.po files
open
(
FILES
,
"git diff-index --cached --name-only $against |"
)
||
die
"Cannot run git diff-index."
;
while
(
my
$file
=
<
FILES
>
)
{
chomp
(
$file
);
if
(
$file
=~
/\.po$/
)
{
system
(
"msgcat --no-wrap $file > $file.KQnBbK6wQE;mv $file.KQnBbK6wQE $file;"
);
system
(
"git add $file"
);
}
}
# be strict about tabs - we don't want them at all, setup your editor
# be strict about tabs - we don't want them at all, setup your editor
# correctly ;-)
# correctly ;-)
my
$err_ext
=
""
;
my
$err_ext
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment