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

Re: inside the git folder

From
CJChris Jeschke <chrisjberlin@googlemail.com>
Date
Oct 4, 2018, 07:42 UTC
Message-ID
<CADWf5z4DNRj=+X5pUF-Pe4vTq01OmFLk7KMP-=_hWWOEmsJg4A@mail.gmail.com>
In-Reply-To
<CAGZ79kZ=FXEgTgZ7hO_7O2Qo-ze9ykQW0_Vgr=m7MFe8mc9+Mg@mail.gmail.com>
Hi Stefan,
thanks for your answer.

The Goal after sending the files is to have a copy on the remote site. This includes that the working directory is the same (what we already guarantee with our tool) and that git is at the same 'state' (that means that we have the same history and that we checkout at the same branch/commit). My idea: Send the working directory with our tool Initialize a Git directory on the remote side Send the 'objects','refs', 'HEAD' and the 'gitignore' with our tool

Is there anything else I should take care of?
Am Mi., 3. Okt. 2018 um 20:51 Uhr schrieb Stefan Beller <sbeller@google.com>:
Show 34 quoted lines
>
> On Wed, Oct 3, 2018 at 5:26 AM Chris Jeschke
> <chrisjberlin@googlemail.com> wrote:
> >
> > Hey git-team,
> > I am working on a plug-in for a distributed pair programming tool. To
> > skip the details: I was thinking about sending parts of the git folder
> > as a zip folder with our own Bytestream instead of using the git API.
> > Is there a common sense about what should and what shouldn't be done
> > when working with the files inside the git folder?
>
> This contradicts the security model of git.
> Locally I can do things like:
>     git config alias.co "rm -rf ~"
>     echo "rm -rf ~" >.git/hooks/{...}
> and I would experience bad things, but that is ok,
> as I configured it locally (supposedly I know what
> I am doing); but if I have the ability to send these
> tricks to my beloved coworkers, hilarity might ensue.
>
> What stuff do you need to send around?
>
> objects? Fine, as the receive could check they are
> good using fsck.
>
> refs/ ? Sure. It may be confusing to users,
> but I am sure you'll figure UX out.
>
> local config, hooks ? I would not.
>
> Not sure what else you'd think of sending around.
>
> Cheers,
> Stefan
Previous: Stefan BellerNext: Johannes Schindelin
Message 3 of 5 in “inside the git folder”
  1. Chris JeschkeOct 3, 2018
  2. Stefan BellerOct 3, 2018
  3. Chris JeschkeOct 4, 2018
  4. Johannes SchindelinOct 4, 2018
  5. Stephen SmithOct 4, 2018

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.