git.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package repo
  2. import (
  3. "fmt"
  4. "strings"
  5. )
  6. const advertise_refs = "--advertise-refs"
  7. func command(cmd string, opts ...string) string {
  8. return fmt.Sprintf("git %s %s", cmd, strings.Join(opts, " "))
  9. }
  10. /*func upload_pack(repository_path string, opts ...string) string {
  11. cmd = "upload-pack"
  12. opts = append(opts, "--stateless-rpc", repository_path)
  13. return command(cmd, opts...)
  14. }
  15. func receive_pack(repository_path string, opts ...string) string {
  16. cmd = "receive-pack"
  17. opts = append(opts, "--stateless-rpc", repository_path)
  18. return command(cmd, opts...)
  19. }*/
  20. /*func update_server_info(repository_path, opts = {}, &block)
  21. cmd = "update-server-info"
  22. args = []
  23. opts.each {|k,v| args << command_options[k] if command_options.has_key?(k) }
  24. opts[:args] = args
  25. Dir.chdir(repository_path) do # "git update-server-info" does not take a parameter to specify the repository, so set the working directory to the repository
  26. self.command(cmd, opts, &block)
  27. end
  28. end
  29. def get_config_setting(repository_path, key)
  30. path = get_config_location(repository_path)
  31. raise "Config file could not be found for repository in #{repository_path}." unless path
  32. self.command("config", {:args => ["-f #{path}", key]}).chomp
  33. end
  34. def get_config_location(repository_path)
  35. non_bare = File.join(repository_path,'.git') # This is where the config file will be if the repository is non-bare
  36. if File.exists?(non_bare) then # The repository is non-bare
  37. non_bare_config = File.join(non_bare, 'config')
  38. return non_bare_config if File.exists?(non_bare_config)
  39. else # We are dealing with a bare repository
  40. bare_config = File.join(repository_path, "config")
  41. return bare_config if File.exists?(bare_config)
  42. end
  43. return nil
  44. end
  45. end
  46. */
PANIC: session(release): write data/sessions/b/f/bfe0f3e6f72ef890: no space left on device

PANIC

session(release): write data/sessions/b/f/bfe0f3e6f72ef890: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)