summaryrefslogtreecommitdiffstats
path: root/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/serve.go b/serve.go
index 27324df19b..6cd1e224a8 100644
--- a/serve.go
+++ b/serve.go
@@ -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