RE: [Feature Request] Option to make .git not read-only in cloned repos
- From
Randall S. Becker <rsbecker@nexbridge.com>
- Date
- Aug 26, 2019, 16:19 UTC
- Message-ID
- <008e01d55c2a$08749ea0$195ddbe0$@nexbridge.com>
- In-Reply-To
- <xmqqsgpoj6ad.fsf@gitster-ct.c.googlers.com>
On August 26, 2019 11:28 AM, Junio C Hamano wrote:
Show 6 quoted lines
> "Randall S. Becker" <rsbecker@nexbridge.com> writes: > > >> Sometimes I clone a repo just to grep for an error string and then I > >> don't need it anymore, or I clone several repos until I find the one > >> that contains what I want and delete the rest. Sometimes I want to > >> write a patch for some software I don't develop regularly so I don't
need
Show 12 quoted lines
> to keep a clone of it. > >> > >> In any case, it would be useful to know the reason those files are > >> read-only in the first place. Do you guys know who might know? > > > > Why don't you wrap your clone in a script that calls chmod -R u+w .git > > after the clone? This seems like a pretty trivial approach regardless > > of your workflow. This works in Linux, Mac, Windows (under > > cygwin-bash) and anything else POSIX-ish. > > But on anything POSIX-ish, is it a problem for some files (but not any > directory) in .git is made read-only?
Not for me or anyone I personally support. As I suggested to Albert, wrapping a clone in a script with a chmod would solve the problem with minimal work.
My own personal issue is convincing people not to clone for every topic branch, but that's unrelated.