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

Re: The shared Git repo used by git-new-workdir

From
HWHilco Wijbenga <hilco.wijbenga@gmail.com>
Date
Jan 16, 2012, 18:57 UTC
Message-ID
<CAE1pOi3JocCoDGAmpCYdGdJN4E1nz8O4_i0MtLhwhP_axmH-uw@mail.gmail.com>
In-Reply-To
<4F1467C1.504@ira.uka.de>
On 16 January 2012 10:09, Holger Hellmuth <hellmuth@ira.uka.de> wrote:
Show 5 quoted lines
> On 14.01.2012 21:59, Hilco Wijbenga wrote:
> Take a look at the rather simple script git-new-workdir (everything
> important happens in the last 20 lines). It just makes logical links to all
> files (mostly directories) under .git except three files that relate to the
> index (mainly the index file itself and HEAD)

Yes, I did that but I cannot figure out from that why I see lots of files and such staged for commit on master when I almost never work on master. I only use master to pull in upstream and to merge in one of my branches and push. So unless I'm doing that, I would expect "git status" to not output anything.

> That would suggest that normal git operations operating on files in those
> directories happen identical whether you are in the root repo or in any of
> the satellites. Only where the whole repo is acted upon (git clone, cp/rsync
> or deletion of the whole repo) the root repo would be "special".

That all makes sense to me and is what I was expecting. So why is "git status" on master displaying anything?

Here is what I see:

In my working directory: hilco@centaur /mnt/lacie/workspaces/my-project-master my-project-master (master $ u=)$ git status # On branch master nothing to commit (working directory clean)

In the shared repo: hilco@centaur ~/git-clones/my-project my-project (master +$ u=)$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: .gitattributes # modified: .gitignore # new file: ... ... hundreds more ...

Is this related to my use of a symlink? I have a symlink "~/workspaces" pointing to /mnt/lacie/workspaces/. Is that somehow affecting things?

Previous: Holger HellmuthNext: Holger Hellmuth
Message 3 of 4 in “The shared Git repo used by git-new-workdir”
  1. Hilco WijbengaJan 14, 2012
  2. Holger HellmuthJan 16, 2012
  3. Hilco WijbengaJan 16, 2012
  4. Holger HellmuthJan 16, 2012

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.