开发者

Is daemon-export-ok the most archaic feature of git? [closed]

开发者 https://www.devze.com 2023-02-09 08:16 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 12 years ago.

This is more of a rant and may not deserve a wise answer.

The question is, is the following the most archaic feature of git:

touch proj.git/daemon-export-ok

Why couldn't it have been something like:

git enable-export .

Or something开发者_高级运维 to that effect?


I would give that honor to something like git cvsserver.

If you want a command for that, you can do it pretty easily with a global alias. It's pretty rarely used, though. I run a couple of git daemons and use that option on one of them.


Your suggested alternative creates an entire new git command for only one purpose. That's not very useful - you still have to remember the name for this single task, and you'll have just as much trouble with that as remembering the name of the file to create.

A more likely suggestion would be:

git daemon --export

or maybe

git config daemon.export true

but still, I don't exactly see the problem with the status quo. The latter option does seem pretty reasonable... except I believe that smart HTTP checks for that file, and so it's much much simpler for it to be a single file, so it doesn't have to fetch the whole config and parse it. (I'm not a git developer - maybe there are other reasons too.)

Edit: How about an analogy? How do you get git to ignore files? By running git ignore <path>? Nope, by editing a file whose name you have to know. You use it all the time, so you remember it well enough. And honestly, if you're in the business of running git-daemon, you're going to remember that filename too, and if you don't, you know exactly where to look for it. Sounds like a good enough interface to me.

0

精彩评论

暂无评论...
验证码 换一张
取 消