1

I think I know the answer to this, from experimentation, but my googling has found nothing definitive about it. So I'm looking for clarification. Consider

cd GitDirectory
mkfifo _my_named_pipe
git add _my_named_pipe
git status

The status command will show nothing. My conclusion is that you can't put named pipes in a git repository. Have I reached the correct conclusion? Or is there something I missed here?

Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
  • What would be the point at all? I don't see any use for a named pipe inside a git repository. If a program needs one, it can create it if one does not exist. – J.J. Hakala Jan 18 '16 at 19:00

1 Answers1

2

You are correct, git only handles regular files and symbolic links (well, also trees and submodules, but they get handled specially internally).

torek
  • 448,244
  • 59
  • 642
  • 775
  • Thanks for the confirmation, is there a specific reference for this, that I could not find? I assume it's more than oral tradition and trial-and-error. – Travis Griggs Jan 18 '16 at 19:21
  • 2
    I don't know of any specific documentation that forbids named pipes, but it's in the source, e.g., in `read-cache,c` the only permitted mode values are "regular file", "link", and "gitlink". See `add_to_index`. – torek Jan 19 '16 at 00:13