Skip to content

Commit

Permalink
fix on some minor bugs related with #6 #11 #12 #13 and #14 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Feb 5, 2019
1 parent 6bc621d commit 680b327
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -17,7 +17,7 @@ GOBIN_DIR:=$(GOPATH_DIR)/bin
GIT2GO_VERSION=27
GIT2GO_DIR:=$(GOPATH_DIR)/src/gopkg.in/libgit2/git2go.v$(GIT2GO_VERSION)
LIBGIT2_DIR=$(GIT2GO_DIR)/vendor/libgit2
GIT2GO_PATCH=git2go.v$(GIT2GO_VERSION).patch
GIT2GO_PATCH=patch/git2go.v$(GIT2GO_VERSION).patch

all: $(BINARY)

Expand Down
2 changes: 1 addition & 1 deletion cli/commit.go
Expand Up @@ -87,7 +87,7 @@ func popCommitStat(hash string) error {
}

func popCommitDiff(hash string) error {
os.Setenv("LESS", "-RC")
os.Setenv("LESS", "-RCS")

cmd := exec.Command("git", "diff", hash)
cmd.Stdout = os.Stdout
Expand Down
2 changes: 1 addition & 1 deletion cli/prompt.go
Expand Up @@ -23,7 +23,7 @@ var (
)

func popMore(in string) error {
os.Setenv("LESS", "-RC")
os.Setenv("LESS", "-RCS")
cmd := exec.Command("less")
stdin, err := cmd.StdinPipe()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli/stat.go
Expand Up @@ -54,7 +54,7 @@ func statPrompt(r *git.Repository, c *git.Commit, opts *PromptOptions) error {
}

func popLess(r *git.Repository, c *git.Commit, in string) error {
os.Setenv("LESS", "-RC")
os.Setenv("LESS", "-RCS")
cmd := exec.Command("less")
stdin, err := cmd.StdinPipe()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions main.go
Expand Up @@ -39,6 +39,7 @@ func main() {
pin.Version("gitin version 0.1.0")
pin.CommandLine.HelpFlag.Short('h')
pin.CommandLine.VersionFlag.Short('v')
pin.Parse()
err := env.Process("gitin", &cfg)
if err != nil {
log.Fatal(err.Error())
Expand Down
18 changes: 18 additions & 0 deletions patch/git2go.v27.patch
@@ -0,0 +1,18 @@
diff --git a/script/build-libgit2-static.sh b/script/build-libgit2-static.sh
index 5723721..e23f2c1 100755
--- a/script/build-libgit2-static.sh
+++ b/script/build-libgit2-static.sh
@@ -14,6 +14,13 @@ cmake -DTHREADSAFE=ON \
-DCMAKE_C_FLAGS=-fPIC \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX=../install \
+ -DUSE_EXT_HTTP_PARSER=OFF \
+ -DUSE_HTTPS=OFF \
+ -DUSE_NSEC=OFF \
+ -DUSE_SSH=OFF \
+ -DCURL=OFF \
+ -DUSE_GSSAPI=OFF \
+ -DUSE_BUNDLED_ZLIB=ON \
.. &&

cmake --build .

0 comments on commit 680b327

Please sign in to comment.