threads / discuss / 37487

Re: Can git detect and manage source file's extensional attribute by command 'setfattr' ?

Subject: Re: Can git detect and manage source file's extensional attribute by command 'setfattr' ?

## tl;dr

2 messages between Sep 4, 2014 and Sep 4, 2014.

replies: 1people: 2as markdown or json

wangfeng wangfeng· Sep 4, 2014, 08:11 UTC · lore

Can git detect and manage source file's extensional attribute by command 'setfattr' ?

Hi ,
    I know that git can cope with file's chmod. But how about
setfattr? I have tried to set some extensional attribute with command
:
####
setfattr -n user.t1 -v 1 testfile.txt
####
It seems like git cannot detect it. So do I need some config option
for git? Or doesn't it have this feature?
    Thanks very much.
Wang
brian m. carlson· Sep 4, 2014, 13:07 UTC · re: wangfeng wangfeng · lore
On Thu, Sep 04, 2014 at 04:11:06PM +0800, wangfeng wangfeng wrote:
Show 10 quoted lines
> Hi ,
>     I know that git can cope with file's chmod. But how about
> setfattr? I have tried to set some extensional attribute with command
> :
> ####
> setfattr -n user.t1 -v 1 testfile.txt
> ####
> It seems like git cannot detect it. So do I need some config option
> for git? Or doesn't it have this feature?
>     Thanks very much.

No, Git doesn't support extended attributes natively. In fact, the only modes that Git stores are the file type and the executable bit.

If you need to store this information, you could either have it recreated by running, say, a Makefile, or you could see if the filter functionality of .gitattributes does what you want.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

← back to recent threads