From: Albert Vaca Cintora <albertvaka@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Philip Oakley <philipoakley@iee.email>,
Johannes Sixt <j6t@kdbg.org>,
git@vger.kernel.org
Subject: Re: [Feature Request] Option to make .git not read-only in cloned repos
Date: Mon, 26 Aug 2019 20:42:56 +0200 [thread overview]
Message-ID: <CAAQViEsL+X5ZYmmSjG1JBksGjthHCUyWa3525b8dN7u1XAbvJg@mail.gmail.com> (raw)
In-Reply-To: <xmqq5zmkkn4a.fsf@gitster-ct.c.googlers.com>
On Mon, Aug 26, 2019 at 4:38 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> And directories (e.g. .git/objects/) are not made read-only for
> obvious reasons. Read-only files inside a writeable directory can
> be deleted just like read-write ones can be (iow, the "delete
> permission" comes from the "write permission" of the containing
> directory) so "rm -r .git" should "work" just fine (depending on the
> definition of working, of course---it is discouraged to throw away
> your work).
>
It "works" for some definition of work, but it asks for confirmation
for every file, which is a pain. I'm on Linux.
On Mon, Aug 26, 2019 at 4:27 PM Randall S. Becker
<rsbecker@nexbridge.com> wrote:
>
> 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.
>
Wrapping `git clone` should work as a workaround. Although if that
doesn't break anything... then why were those files read-only in the
first place? :)
The fact that, from a formal point of view, those files are immutable
doesn't seem to justify them being read-only (or, at least, doesn't
follow any convention): there are plenty of immutable files on any
system (eg: all binaries and libs, application assets like images and
icons, pid/lock files for daemons, etc.) that are not made read-only.
I can go with the workaround, but I'm still inclined to think this
option should be built in into git.
Albert
next prev parent reply other threads:[~2019-08-26 18:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 20:43 [Feature Request] Option to make .git not read-only in cloned repos Albert Vaca Cintora
2019-08-25 11:59 ` Kevin Daudt
2019-08-25 14:39 ` Albert Vaca Cintora
2019-08-25 17:54 ` Johannes Sixt
2019-08-25 19:58 ` Albert Vaca Cintora
2019-08-25 22:41 ` Philip Oakley
2019-08-26 14:38 ` Junio C Hamano
2019-08-26 18:42 ` Albert Vaca Cintora [this message]
2019-08-26 19:18 ` SZEDER Gábor
2019-08-27 19:35 ` Junio C Hamano
2019-08-30 12:49 ` Albert Vaca Cintora
2019-08-30 16:38 ` Junio C Hamano
2019-08-30 18:26 ` Michal Suchánek
2019-08-30 19:25 ` Junio C Hamano
2019-08-31 20:40 ` Albert Vaca Cintora
2019-08-26 14:27 ` Randall S. Becker
2019-08-26 15:27 ` Junio C Hamano
2019-08-26 16:19 ` Randall S. Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAQViEsL+X5ZYmmSjG1JBksGjthHCUyWa3525b8dN7u1XAbvJg@mail.gmail.com \
--to=albertvaka@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=philipoakley@iee.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).