Skip to content

Commit 7e97849

Browse files
committed
close #89 return wrap up to default behavior
1 parent 1ed4d4b commit 7e97849

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

cmd/wrapup.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ import (
44
"fmt"
55

66
"github.com/praqma/git-phlow/cmd/cmdperm"
7-
"github.com/praqma/git-phlow/options"
87
"github.com/praqma/git-phlow/phlow"
98
"github.com/praqma/git-phlow/ui"
109
"github.com/spf13/cobra"
1110
)
1211

1312
var wrapupCmd = &cobra.Command{
1413
Use: "wrapup",
15-
Short: "add changes and make auto-commit",
14+
Short: "Add changes to index and auto commit",
1615
Long: fmt.Sprintf(`
17-
%s commits the currently staged files with a 'close issue' commit message, e.g. "close #42 fetch meaning of life".
18-
The commit message will cause the corresponding issue to be closed when the commit is integrated.
16+
%s commits the currently staged files with a 'close issue' commit message, e.g. "close #42 fetch meaning of life". The commit message will cause the corresponding issue to be closed when the commit is integrated.
1917
`, ui.Format.Bold("wrapup")),
2018
PreRun: func(cmd *cobra.Command, args []string) {
2119
cmdperm.RequiredCurDirRepository()
@@ -27,6 +25,4 @@ The commit message will cause the corresponding issue to be closed when the comm
2725

2826
func init() {
2927
RootCmd.AddCommand(wrapupCmd)
30-
31-
wrapupCmd.Flags().BoolVar(&options.GlobalFlagHard, "hard", false, "Add all changes before committing")
3228
}

options/option.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ var (
2929
//GlobalFlagPrefixForReady ...
3030
GlobalFlagPrefixForReady string
3131

32-
//GlobalFlagHard ...
33-
GlobalFlagHard bool
34-
3532
//Sha1 git commit hash
3633
Sha1 string
3734

phlow/wrapup.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ import (
77
"os"
88

99
"github.com/praqma/git-phlow/githandler"
10-
"github.com/praqma/git-phlow/options"
1110
)
1211

1312
//WrapUp ...
1413
func WrapUp() {
1514

1615
//Add all files to index
17-
if options.GlobalFlagHard {
18-
fmt.Fprintln(os.Stdout, "Adding files to index")
19-
if err := githandler.Add(); err != nil {
20-
fmt.Println("Project files could not be added: " + err.Error())
21-
return
22-
}
16+
if err := githandler.Add(); err != nil {
17+
fmt.Println("Project files could not be added: " + err.Error())
18+
return
2319
}
2420

2521
//Retrieve branch info - current branch

0 commit comments

Comments
 (0)