Re: [PATCH] git-archive documentation: .gitattributes must be committed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

>> +The .gitattributes file must be present in the named tree for it to take
>> +effect. Uncommitted attributes will not be considered in exports.
>> +
>>  EXAMPLES
>>  --------
>>  git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)::
>
> Yeah, the description of --worktree-attributes is a bit terse.  The
> lines you add make it appear almost as if this switch doesn't exist,
> though; perhaps add a "unless --worktree-attributes is given" or similar
> to one of the new sentences?

My impression has always been that people use attributes with archive more
often to _tweak_ how the archive is produced after the fact, and they do
so by modifying checked out .gitattributes (or $GIT_DIR/info/attributes)
than allowing a possibly stale .gitattributes file etched in stone^Wtree
being archived.  So in that sense, probably --worktree-attributes should
have been the default.

By the way, if you commit the attributes file, then commit the removal of
that attributes file, would that removed attributes file take effect when
you archive HEAD^ (which still had the attribues file)?  That's how I read
what the added description claims, but I somehow suspect that is not what
actually happens.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]