mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 22:11:35 +01:00
80c91cbdee
Integrate `go-git` into the application, and use it to `git clone` cheatsheets when the installer runs. Previously, the installer required that `git` be installed on the system `PATH`, so this change has to big advantages: 1. It removes that system dependency on `git` 2. It paves the way for implementing the `--update` command Additionally, `cheat` now performs a `--depth=1` clone when installing cheatsheets, which should at least somewhat improve installation times (especially on slow network connections).
24 lines
498 B
Go
24 lines
498 B
Go
// Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
|
|
// https://github.com/sergi/go-diff
|
|
// See the included LICENSE file for license details.
|
|
//
|
|
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
|
|
// Original library is Copyright (c) 2006 Google Inc.
|
|
// http://code.google.com/p/google-diff-match-patch/
|
|
|
|
package diffmatchpatch
|
|
|
|
func min(x, y int) int {
|
|
if x < y {
|
|
return x
|
|
}
|
|
return y
|
|
}
|
|
|
|
func max(x, y int) int {
|
|
if x > y {
|
|
return x
|
|
}
|
|
return y
|
|
}
|