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

Re: Git push failure in the case of SSH to localhost

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 11, 2009, 20:23 UTC
Message-ID
<7vvdrgd8pb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<8e04b5820902111203t344881f6g31f25cfbff5fd822@mail.gmail.com>
"Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com> writes:
Show 21 quoted lines
>     I'll merge both Junio's and Jeff's emails into one... My answers bellow.
>
> On Wed, Feb 11, 2009 at 9:40 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> "Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com> writes:
>>
>>> On Wed, Feb 11, 2009 at 9:27 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>>
>>>> And why isn't it in $HOME/bin/?
>>>
>>>     No, it is inside .git/bin folder.
>>
>> You are not answering my question.
>>
>> I questioned the sanity of putting the scripts in .git/bin/ per
>> repository.  Why shouldn't a useful script like your "branch-import"
>> available to _all_ your repositories, possibly taking customization per
>> repository from repository's .git/config file, so that it does what is
>> appropriate in each repository?
> ...
>     Both these solutions work fine, except one concern: when moving
> the repository I would also want to move my scripts,...

Define "moving the repository". More often than not, people move their repositories with "git clone" than "tar cf - | tar xf -".

No matter how you are moving it to a new location, you would want to have a working set of "regular environment" you normally work in. Why aren't you moving/copying your $HOME/bin at the same time to get a more familiar and useful environment? Viewed under this light, I think your "I move my repository to a new machine" is a made up example that is not interesting at all, if you ask me.

There are additional security implications. You can invite a victim to run "git diff" in your repository which runs your .git/bin/git-diff, for example.

Previous: Ciprian Dorin, CraciunNext: Ciprian Dorin, Craciun
Message 12 of 17 in “Git push failure in the case of SSH to localhost”
  1. Ciprian Dorin, CraciunFeb 11, 2009
  2. Jeff KingFeb 11, 2009
  3. Ciprian Dorin, CraciunFeb 11, 2009
  4. Jeff KingFeb 11, 2009
  5. Ciprian Dorin, CraciunFeb 11, 2009
  6. Shawn O. PearceFeb 11, 2009
  7. Ciprian Dorin, CraciunFeb 11, 2009
  8. Jeff KingFeb 11, 2009
  9. Ciprian Dorin, CraciunFeb 11, 2009
  10. Jeff KingFeb 11, 2009
  11. Ciprian Dorin, CraciunFeb 11, 2009
  12. Junio C HamanoFeb 11, 2009
  13. Ciprian Dorin, CraciunFeb 11, 2009
  14. Johannes SchindelinFeb 11, 2009
  15. Junio C HamanoFeb 11, 2009
  16. Ciprian Dorin, CraciunFeb 11, 2009
  17. Junio C HamanoFeb 11, 2009

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.