git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [Feature Request] Option to make .git not read-only in cloned repos

From
Randall S. Becker <rsbecker@nexbridge.com>
Date
Aug 26, 2019, 14:27 UTC
Message-ID
<006201d55c1a$68180f50$38482df0$@nexbridge.com>
In-Reply-To
<CAAQViEv1_YXPxLRN=eT7yQhro55K4audnouzAjjbHhJsU7pgQA@mail.gmail.com>
On August 25, 2019 3:59 PM, Albert Vaca Cintora wrote:
Show 27 quoted lines
> To: Johannes Sixt <j6t@kdbg.org>
> On Sun, Aug 25, 2019 at 7:54 PM Johannes Sixt <j6t@kdbg.org> wrote:
> >
> > Am 23.08.19 um 22:43 schrieb Albert Vaca Cintora:
> > > However, I'm sure that a large percentage of developers out there
> > > will agree with me that having to use force (-f) to delete every
> > > cloned repo is annoying, and even worse, it creates the bad habit of
> > > always force-deleting everything.
> >
> > IMO, the bad habit is to delete cloned repositories all the time. If
> > your workflow necessitates this, then you are doing something wrong.
> > Maybe you have an X-Y-problem?
> >
> > -- Hannes
> 
> There are plenty of valid workflows where one would delete a repo.
> 
> What you suggest is like saying I shouldn't delete pictures from my camera,
> because in that case I shouldn't have taken them in the first place.
> 
> 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 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.
Previous: Albert Vaca CintoraNext: Junio C Hamano
Message 16 of 18 in “[Feature Request] Option to make .git not read-only in cloned repos”
  1. Albert Vaca CintoraAug 23, 2019
  2. Kevin DaudtAug 25, 2019
  3. Albert Vaca CintoraAug 25, 2019
  4. Johannes SixtAug 25, 2019
  5. Albert Vaca CintoraAug 25, 2019
  6. Philip OakleyAug 25, 2019
  7. Junio C HamanoAug 26, 2019
  8. Albert Vaca CintoraAug 26, 2019
  9. SZEDER GáborAug 26, 2019
  10. Junio C HamanoAug 27, 2019
  11. Albert Vaca CintoraAug 30, 2019
  12. Junio C HamanoAug 30, 2019
  13. Michal SuchánekAug 30, 2019
  14. Junio C HamanoAug 30, 2019
  15. Albert Vaca CintoraAug 31, 2019
  16. Randall S. BeckerAug 26, 2019
  17. Junio C HamanoAug 26, 2019
  18. Randall S. BeckerAug 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.