* [PATCH] git-gui: Fix file name pattern in .gitattributes.
@ 2009-02-24 8:01 Johannes Sixt
2009-02-24 8:44 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2009-02-24 8:01 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Johannes Sixt
The pattern for the *.po files was anchored at the repository's root, but
this would match the files only in the git-gui repository itself, but
not in the version that is subtree-merged into git.git.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
.gitattributes | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index f96112d..c69f4a0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
* encoding=US-ASCII
git-gui.sh encoding=UTF-8
-/po/*.po encoding=UTF-8
+po/*.po encoding=UTF-8
--
1.6.2.rc0.81.g1e300
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] git-gui: Fix file name pattern in .gitattributes.
2009-02-24 8:01 [PATCH] git-gui: Fix file name pattern in .gitattributes Johannes Sixt
@ 2009-02-24 8:44 ` Junio C Hamano
2009-02-24 9:25 ` Johannes Sixt
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2009-02-24 8:44 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Shawn O. Pearce, git
Johannes Sixt <j6t@kdbg.org> writes:
> The pattern for the *.po files was anchored at the repository's root, but
> this would match the files only in the git-gui repository itself, but
> not in the version that is subtree-merged into git.git.
>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
> .gitattributes | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/.gitattributes b/.gitattributes
> index f96112d..c69f4a0 100644
> --- a/.gitattributes
> +++ b/.gitattributes
> @@ -1,3 +1,3 @@
> * encoding=US-ASCII
> git-gui.sh encoding=UTF-8
> -/po/*.po encoding=UTF-8
> +po/*.po encoding=UTF-8
Hmm, really?
$ pwd
/pub/git/git.git
$ git check-attr encoding git-gui/po/xx.po
git-gui/xx/ja.po: encoding: UTF-8
$ git check-attr encoding git-gui/funk/po/xx.po
git-gui/funk/po/xx.po: encoding: US-ASCII
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-gui: Fix file name pattern in .gitattributes.
2009-02-24 8:44 ` Junio C Hamano
@ 2009-02-24 9:25 ` Johannes Sixt
2009-02-24 17:33 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2009-02-24 9:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Shawn O. Pearce, git
Junio C Hamano schrieb:
> Johannes Sixt <j6t@kdbg.org> writes:
>
>> The pattern for the *.po files was anchored at the repository's root, but
>> this would match the files only in the git-gui repository itself, but
>> not in the version that is subtree-merged into git.git.
>>
>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
>> ---
>> .gitattributes | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/.gitattributes b/.gitattributes
>> index f96112d..c69f4a0 100644
>> --- a/.gitattributes
>> +++ b/.gitattributes
>> @@ -1,3 +1,3 @@
>> * encoding=US-ASCII
>> git-gui.sh encoding=UTF-8
>> -/po/*.po encoding=UTF-8
>> +po/*.po encoding=UTF-8
>
> Hmm, really?
No, not really. =:{
I observed some strangeness with gitk. But it turned out that this was an
old development version that got accidentally installed somewhere in $PATH.
Sorry for the noise.
-- Hannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-gui: Fix file name pattern in .gitattributes.
2009-02-24 9:25 ` Johannes Sixt
@ 2009-02-24 17:33 ` Junio C Hamano
2009-02-25 7:54 ` [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt Johannes Sixt
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2009-02-24 17:33 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Shawn O. Pearce, git
Johannes Sixt <j.sixt@viscovery.net> writes:
> Junio C Hamano schrieb:
>> Johannes Sixt <j6t@kdbg.org> writes:
>>
>>> The pattern for the *.po files was anchored at the repository's root, but
>>> this would match the files only in the git-gui repository itself, but
>>> not in the version that is subtree-merged into git.git.
>>>
>>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
>>> ---
>>> .gitattributes | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/.gitattributes b/.gitattributes
>>> index f96112d..c69f4a0 100644
>>> --- a/.gitattributes
>>> +++ b/.gitattributes
>>> @@ -1,3 +1,3 @@
>>> * encoding=US-ASCII
>>> git-gui.sh encoding=UTF-8
>>> -/po/*.po encoding=UTF-8
>>> +po/*.po encoding=UTF-8
>>
>> Hmm, really?
>
> No, not really. =:{
>
> I observed some strangeness with gitk. But it turned out that this was an
> old development version that got accidentally installed somewhere in $PATH.
>
> Sorry for the noise.
Actually, while I was responding to your message, I looked at
gitattributes documentation and noticed that it does not say anything
about how the "glob" is used to match paths. The rules applied should be
the same as those from gitignore (except obviously we do not have negated
pattern that gitignore has, because it does not mean "path not matching
this pattern" over there), and it should be documented.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt
2009-02-24 17:33 ` Junio C Hamano
@ 2009-02-25 7:54 ` Johannes Sixt
2009-02-25 8:00 ` Johannes Sixt
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2009-02-25 7:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Shawn O. Pearce, git
From: Johannes Sixt <j6t@kdbg.org>
The rules how the patterns are matched against path names are the same
for .gitattribute and .gitignore files.
This also replace the notion "glob pattern" by "pattern" because
gitignore.txt talks about "glob" only in some contexts where the pattern
is mentioned.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Junio C Hamano schrieb:
> Actually, while I was responding to your message, I looked at
> gitattributes documentation and noticed that it does not say anything
> about how the "glob" is used to match paths.
Here's a patch.
-- Hannes
Documentation/gitattributes.txt | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 227934f..55668e3 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -18,10 +18,10 @@ A `gitattributes` file is a simple text
Each line in `gitattributes` file is of form:
- glob attr1 attr2 ...
+ pattern attr1 attr2 ...
-That is, a glob pattern followed by an attributes list,
-separated by whitespaces. When the glob pattern matches the
+That is, a pattern followed by an attributes list,
+separated by whitespaces. When the pattern matches the
path in question, the attributes listed on the line are given to
the path.
@@ -48,13 +48,14 @@ Set to a value::
Unspecified::
- No glob pattern matches the path, and nothing says if
+ No pattern matches the path, and nothing says if
the path has or does not have the attribute, the
attribute for the path is said to be Unspecified.
-When more than one glob pattern matches the path, a later line
+When more than one pattern matches the path, a later line
overrides an earlier line. This overriding is done per
-attribute.
+attribute. The rules how the pattern matches paths are the
+same as in `.gitignore` files; see linkgit:gitignore[5].
When deciding what attributes are assigned to a path, git
consults `$GIT_DIR/info/attributes` file (which has the highest
--
1.6.2.rc0.81.g1e300
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt
2009-02-25 7:54 ` [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt Johannes Sixt
@ 2009-02-25 8:00 ` Johannes Sixt
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Sixt @ 2009-02-25 8:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Shawn O. Pearce, git
There is no [PATCH 2/2]. Sorry for that :-(
-- Hannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-25 8:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24 8:01 [PATCH] git-gui: Fix file name pattern in .gitattributes Johannes Sixt
2009-02-24 8:44 ` Junio C Hamano
2009-02-24 9:25 ` Johannes Sixt
2009-02-24 17:33 ` Junio C Hamano
2009-02-25 7:54 ` [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt Johannes Sixt
2009-02-25 8:00 ` Johannes Sixt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).