All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Lukas Straub'" <lukasstraub2@web.de>, "'Jeff King'" <peff@peff.net>
Cc: "'Junio C Hamano'" <gitster@pobox.com>,
	"'git'" <git@vger.kernel.org>,
	"'Elijah Newren'" <newren@gmail.com>,
	"'Brandon Williams'" <bwilliams.eng@gmail.com>,
	"'Johannes Schindelin'" <Johannes.Schindelin@gmx.de>
Subject: RE: [RFC PATCH 0/2] Allow adding .git files and directories
Date: Fri, 21 Aug 2020 09:11:00 -0400	[thread overview]
Message-ID: <007101d677bc$87ed2130$97c76390$@nexbridge.com> (raw)
In-Reply-To: <20200821143941.28f71287@luklap>

On August 21, 2020 8:40 AM, Lukas Straub wrote:
> On Thu, 20 Aug 2020 09:01:25 -0400
> Jeff King <peff@peff.net> wrote:
> 
> > On Thu, Aug 20, 2020 at 01:34:45PM +0200, Lukas Straub wrote:
> >
> > > Yes, there are many workarounds and they work well in the CI
> > > usecase. However, for the arbitrary files usecase there is no good
> > > workaround. I currently use a script which iterates over the tree
> > > and renames .git -> dotgit before running any git command and back
> > > again afterwards, but it is slow and brittle. I toyed with the idea
> > > of writing a FUSE filesystem to do the renaming, but it is needlessly
> complex and hurts performance.
> > >
> > > Really, this problem should be solved in git itself.
> >
> > It is unclear to me why need to hold many sub-repositories within the
> > parent one, nor what Git operations you expect to perform over them.
> > And what disadvantages your script solution has.
> >
> > Perhaps you can give a more concrete use-case (but before you spend a
> > lot of time doing so, I'll warn you that I find it pretty unlikely
> > that it will cross the bar necessary to counter the downsides we've
> > discussed so far).
> >
> > -Peff
> 
> I store all my files in several git(-annex) repositories. By "files" I
mean
> anything you might find in your home directory across your devices,
anything
> on usb thumbdrives, sd cards and maybe your home NAS. And anything you
> would usually use google photos, iCloud, dropbox, etc. for.
> Concrete examples:
> I store the home directories (containing git repos) of two retired
machines in
> such a repository. I don't store the homes in a archive file as I want to
use
> git-annex's ability to only have the contents of files I need on my
laptop.
> I store my development directory containing several(130)
> git/svn/unversioned projects in another repo. This allows me to version
and
> sync everything (including WIPs) across my machines. I tried alternative
> workflows and they didn't work out.
> 
> In both cases, the script introduces a delay of ~10 seconds to every git
> command I run in the outer repository and I have to remember to use the
> script on these repos.
> Moreover, I can't use the git-annex assistant, which watches the repo and
> automatically commits and syncs file changes.
> In my opinion, I want to be able to set the allow-dotgit config and it'll
just
> work without the delay and without having to remember the script.
> 
> The downsides we discussed don't apply in this usecase. These are mostly
> personal files, so I wont upload them to any hosting site (not even
private
> ones). There is no security impact as I only sync with trusted devices.

Have you considered git clone --mirror? This might solve your situation in a
different way, but should keep your repositories in sync with each other. It
also allows you to have different .git/config files on different platforms
(rather important when doing multiplatform development particularly with
submodules).

Randall

-- Brief whoami:
 NonStop developer since approximately 211288444200000000
 UNIX developer since approximately 421664400
-- In my real life, I talk too much.




  reply	other threads:[~2020-08-21 13:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 16:43 [RFC PATCH 0/2] Allow adding .git files and directories Lukas Straub
2020-08-19 16:43 ` [RFC PATCH 1/2] dir/read-cache: " Lukas Straub
2020-08-19 16:43 ` [RFC PATCH 2/2] dir: Recurse into nested git repos if they aren't submodules Lukas Straub
2020-08-19 18:03 ` [RFC PATCH 0/2] Allow adding .git files and directories Junio C Hamano
2020-08-19 18:47   ` Randall S. Becker
2020-08-19 19:09     ` Junio C Hamano
2020-08-19 19:23       ` Randall S. Becker
2020-08-19 20:17       ` Jeff King
2020-08-19 20:32         ` Junio C Hamano
2020-08-19 20:38           ` Jeff King
2020-08-19 21:56             ` Randall S. Becker
2020-08-20 10:16             ` Johannes Schindelin
2020-08-20 11:34             ` Lukas Straub
2020-08-20 13:01               ` Jeff King
2020-08-21 12:39                 ` Lukas Straub
2020-08-21 13:11                   ` Randall S. Becker [this message]
2020-08-21 22:52                   ` brian m. carlson
2020-08-22 14:21                     ` Lukas Straub
2020-08-22 18:53                       ` brian m. carlson
2020-08-22 19:12                         ` Lukas Straub
2020-08-24 13:52                           ` Johannes Schindelin
2020-08-20 12:37         ` Lukas Straub
2020-08-20 13:08           ` Jeff King
2020-08-19 19:22     ` Lukas Straub
2020-08-19 18:47   ` Lukas Straub
2020-08-19 19:16     ` Randall S. Becker
2020-08-20 11:46       ` Lukas Straub

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='007101d677bc$87ed2130$97c76390$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bwilliams.eng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lukasstraub2@web.de \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.