Setup and Config
Getting and Creating Projects
Basic Snapshotting
Branching and Merging
Sharing and Updating Projects
Inspection and Comparison
Patching
Debugging
External Systems
Server Admin
- 2.43.1 → 2.45.2 no changes
- 2.43.0 11/20/23
- 2.40.1 → 2.42.3 no changes
- 2.40.0 03/12/23
- 2.25.1 → 2.39.5 no changes
- 2.25.0 01/13/20
- 2.18.1 → 2.24.4 no changes
- 2.18.0 06/21/18
- 2.7.6 → 2.17.6 no changes
- 2.6.7 05/05/17
- 2.1.4 → 2.5.6 no changes
- 2.0.5 12/17/14
RESUMO
git check-attr [--source <tree-ish>] [-a | --all | <attr>…] [--] <nome_do_caminho>… git check-attr --stdin [-z] [--source <tree-ish>] [-a | --all | <attr>…]
DESCRIÇÃO
Para cada nome do caminho, este comando listará se cada atributo é unspecified
(não especificado), set
(definido) ou unset
(não definido) como um gitattribute neste nome do caminho.
OPÇÕES
- -a, --all
List all attributes that are associated with the specified paths. If this option is used, then unspecified attributes will not be included in the output.
- --cached
Consider
.gitattributes
in the index only, ignoring the working tree.- --stdin
Leia os nomes de caminho na entrada padrão, um por linha, em vez da linha de comando.
- -z
The output format is modified to be machine-parsable. If
--stdin
is also given, input paths are separated with a NUL character instead of a linefeed character.- --source=<tree-ish>
Verifique os atributos em relação à árvore especificada. É comum especificar a árvore de origem nomeando um commit, um ramo ou uma tag associada com ela.
- --
Interprete todas as opções anteriores como atributos e todos as opções a seguir como nomes do caminho.
Caso nenhuma opção --stdin
, --all
ou --
seja utilizado, a primeira será tratada como um atributo e o restante das opções como os nomes do caminho.
SAÍDA
A saída assume a forma: <caminho> COLON SP <atributo> COLON SP <info> LF
a menos que -z
esteja em vigor, no caso onde NUL
é utilizado como um delimitador: <caminho> NUL <atributo> NUL <info> NUL
<caminho>
é o caminho de um arquivo sendo consultado, <atributo>
é um atributo sendo consultado e <info> pode ser:
Buffering happens as documented under the GIT_FLUSH
option in git[1]. The caller is responsible for avoiding deadlocks caused by overfilling an input buffer or reading from an empty output buffer.
EXEMPLOS
In the examples, the following .gitattributes file is used:
*.java diff=java -crlf myAttr NoMyAttr.java !myAttr README caveat=unspecified
Listando um único atributo:
$ git check-attr diff org/example/MyClass.java org/example/MyClass.java: diff: java
Listando vários atributos para um arquivo:
$ git check-attr crlf diff myAttr -- org/example/MyClass.java org/example/MyClass.java: crlf: unset org/example/MyClass.java: diff: java org/example/MyClass.java: myAttr: set
Listando todos os atributos de um arquivo:
$ git check-attr --all -- org/example/MyClass.java org/example/MyClass.java: diff: java org/example/MyClass.java: myAttr: set
Listando um atributo para vários arquivos:
$ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java org/example/MyClass.java: myAttr: set org/example/NoMyAttr.java: myAttr: unspecified
Nem todos os valores não ambíguos são iguais:
$ git check-attr caveat README README: caveat: unspecified
GIT
Parte do conjunto git[1]