diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-26 00:00:36 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-26 00:00:36 +0800 |
commit | 9b509054cf8ef8e15cf567614aef46fe12571904 (patch) | |
tree | 7ff242e1a253210b851437b5062de6149a4d1b49 /serve.go | |
parent | 20ec459b93a68c8bf4b32fafc0532b569f5e1c5e (diff) | |
download | gitea-9b509054cf8ef8e15cf567614aef46fe12571904.tar.gz gitea-9b509054cf8ef8e15cf567614aef46fe12571904.zip |
bug fixed
Diffstat (limited to 'serve.go')
-rw-r--r-- | serve.go | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -212,18 +212,18 @@ func runServ(k *cli.Context) { return } - if isRead { + //if isRead { return - } + //} time.Sleep(time.Second) log.Info(s) // find push reference name - var t = "ok refs/heads/" - var i int + //var t = "ok refs/heads/" + //var i int var refname string - for { + /*for { l, err := b.ReadString('\n') if err != nil { break @@ -235,6 +235,18 @@ func runServ(k *cli.Context) { refname = l[idx+len(t):] } } + */ + + refs2, err := rep.AllReferencesMap() + for name, ref := range refs2 { + if ref2, ok := refs[name]; ok { + if ref.Oid.Equal(ref2.Oid) { + continue + } + } + refname = name + break + } if refname == "" { println("No find any reference name:", s) return |