|
|
@ -5,18 +5,18 @@ |
|
|
|
package main |
|
|
|
package main |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"os" |
|
|
|
"container/list" |
|
|
|
"os/exec" |
|
|
|
"os" |
|
|
|
"strings" |
|
|
|
"os/exec" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
|
"container/list" |
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli" |
|
|
|
"github.com/codegangsta/cli" |
|
|
|
//"github.com/gogits/gogs/modules/log"
|
|
|
|
//"github.com/gogits/gogs/modules/log"
|
|
|
|
"github.com/gogits/gogs/models" |
|
|
|
"github.com/gogits/git" |
|
|
|
"github.com/gogits/gogs/modules/base" |
|
|
|
"github.com/gogits/gogs/models" |
|
|
|
"github.com/qiniu/log" |
|
|
|
"github.com/gogits/gogs/modules/base" |
|
|
|
"github.com/gogits/git" |
|
|
|
"github.com/qiniu/log" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
var CmdUpdate = cli.Command{ |
|
|
|
var CmdUpdate = cli.Command{ |
|
|
@ -103,7 +103,7 @@ func runUpdate(c *cli.Context) { |
|
|
|
// if a new branch
|
|
|
|
// if a new branch
|
|
|
|
if strings.HasPrefix(oldCommitId, "0000000") { |
|
|
|
if strings.HasPrefix(oldCommitId, "0000000") { |
|
|
|
l, err = ref.AllCommits() |
|
|
|
l, err = ref.AllCommits() |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
l = ref.CommitsBetween(newCommit, oldCommit) |
|
|
|
l = ref.CommitsBetween(newCommit, oldCommit) |
|
|
|
} |
|
|
|
} |
|
|
|