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

Re: SCSI trees, merges and git status

From
Junio C Hamano <junkio@cox.net>
Date
Apr 18, 2005, 23:23 UTC
Message-ID
<7vmzrvsm8j.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0504181429570.15725@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> Merged. Here's the command line history:

LT> ~/git/git-pull-script \ LT> rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git

Maybe it is just me, but I have this setup:
    $ /bin/ls -lF .git
    total 20
    -rw-rw-r--  1 junio src     41 Apr 18 16:03 HEAD
    -rw-rw-r--  1 junio junio   41 Apr 18 15:07 MERGE_HEAD
    -rw-------  1 junio src   2720 Apr 18 16:03 index
    lrwxrwxrwx  1 junio src     18 Apr 18 15:55 objects -> ../../.git/objects/

My point being that .git/objects is a symbolic link and shares object database with somewhere else.

However the "Getting object database" part trashed this symlink when I tried to pull from my other repo locally. I am wondering it the following might be a better alternative. A possible downside in this approach is that you would not pull .git/heads and .git/tags (i.e. Pesky stuff) from the remote anymore. Is it a problem (I am also CC'ing Petr to hear his opinion on this).

If not, please apply.
[PATCH] Do not let rsync obliterate .git/object symbolic link.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
git-pull-script: e27215d3978635558c63859495d97f8114b4ece3
--- a/git-pull-script
+++ b/git-pull-script
@@ -6,7 +6,7 @@
 merge_repo=$1
 
 echo "Getting object database"
-rsync -avz --ignore-existing $merge_repo/ .git/
+rsync -avz --ignore-existing $merge_repo/objects/. .git/objects/.
 
 echo "Getting remote head"
 rsync -avz $merge_repo/HEAD .git/MERGE_HEAD
Previous: Linus TorvaldsNext: Petr Baudis
Message 12 of 13 in “SCSI trees, merges and git status”
  1. James BottomleyApr 18, 2005
  2. Linus TorvaldsApr 18, 2005
  3. James BottomleyApr 18, 2005
  4. Linus TorvaldsApr 19, 2005
  5. David WoodhouseApr 19, 2005
  6. James BottomleyApr 19, 2005
  7. David WoodhouseApr 19, 2005
  8. James BottomleyApr 19, 2005
  9. Linus TorvaldsApr 19, 2005
  10. James BottomleyApr 19, 2005
  11. Linus TorvaldsApr 19, 2005
  12. Junio C HamanoApr 18, 2005
  13. Petr BaudisApr 18, 2005

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.