Re: 'git clone,' build makes user non-writable files (should be option keep user-writable)

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

 



On 7/22/22 8:54 PM, Chris Torek wrote:
On Fri, Jul 22, 2022 at 5:29 PM David Chmelik<davidnchmelik@xxxxxxxxx>  wrote:
On 7/22/22 10:40 AM, Chris Torek wrote:
All true.  But Git has no control over, or affect on these: Git does
not attempt to affect ownership or permission of any build products
at all.  Git only attempts to affect the execute permission of
specific files as directed by the committed file mode (and provided
`core.filemode` is enabled).
Not even projects' .git* subdirectories?  They typically are/become
user-non-writable though deletable with several/many confirmations so I
usually sudo (recommended against).
Ah, I thought you were (and I definitely was) talking only about the
*build products*. The stuff inside `.git` itself: some of that, Git does set
to non-writable.
Initially wasn't; don't know why took three replies to clear up (initially clearly specified non-root usage which others ignored and mentioned/focused unrelated root topic).

There is no need to use `sudo` though: a simple
"rm -rf .git" will blow away the Git repository itself.  However:
Still fewer confirmations with sudo (one rather than every single user-non-writable file).

I'd rather opt-out of .git* subdirectories for every clone.
In that case, *don't run `git clone in the first place*. The purpose of
`git clone` is to get you the entire repository. If you want a single working
tree, use `git archive` to make an archive from the commit you want,
and extract that archive to get the tree you want, without getting all
the *other* revisions.
Seems much more complicated (and less-documented) and most popular git sites (though the #1 isn't Free/Libre/Opensource Software (FLS, OSS, FOSS, FLOSS) so is condemned) allow clone but not archive.  I know you can't control their mistakes and they should be irrelevant (unfortunately most projects use most popular/broken sites) but couldn't there be more (detailed and/or easier) syntax?



[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]

  Powered by Linux