Skip to content

Commit 4a156ea

Browse files
committed
Merge branch 'release/0.16.1'
2 parents 0fced18 + 23068bc commit 4a156ea

File tree

7 files changed

+32
-4
lines changed

7 files changed

+32
-4
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ Thumbs.db
6565
*.mov
6666
*.wmv
6767

68+
69+
# Snyk Security Extension - AI Rules (auto-generated)
70+
.github/instructions/snyk_rules.instructions.md

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ $(BIN_DIR)/$(PACKAGE)-$(VERSION)-$(REVISION).aarch64.rpm: packaging/nfpm.yaml $(
306306

307307
$(BIN_DIR)/$(PACKAGE)_$(VERSION)_amd64.snap: packaging/snap/snapcraft.yaml
308308
$Q $(RM) $@
309-
$Q (cd packaging && snapcraft)
309+
$Q (cd packaging && snapcraft pack)
310310
$Q $(MOVE) packaging/$(@F) $(@D)
311311

312312
# build recipes for various platforms

cmd/common/git_config.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"io"
66
"os"
77
"path/filepath"
8+
"strings"
89

910
"github.com/gildas/go-errors"
1011
"github.com/gildas/go-logger"
@@ -21,6 +22,29 @@ func OpenGitConfig(context context.Context) (io.ReadCloser, error) {
2122
last := folder + "dummy"
2223

2324
for {
25+
// If .git is a filem (e.g. worktree), read the actual git dir from there (field gitdir)
26+
gitPath := filepath.Join(folder, ".git")
27+
info, err := os.Stat(gitPath)
28+
if err == nil && !info.IsDir() {
29+
log.Debugf(".git is a file, reading gitdir from there")
30+
content, err := os.ReadFile(gitPath)
31+
if err == nil {
32+
lines := string(content)
33+
const prefix = "gitdir: "
34+
for line := range strings.SplitSeq(lines, "\n") {
35+
if len(line) > len(prefix) && line[:len(prefix)] == prefix {
36+
gitDir := line[len(prefix):]
37+
log.Debugf("found gitdir: %s", gitDir)
38+
if !filepath.IsAbs(gitDir) {
39+
folder = filepath.Join(folder, gitDir)
40+
} else {
41+
folder = gitDir
42+
}
43+
break
44+
}
45+
}
46+
}
47+
}
2448
filename := filepath.Join(folder, ".git/config")
2549
if folder == last {
2650
return nil, errors.NotFound.With("file", filename)

cmd/issue/comment/delete.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func init() {
3333
deleteCmd.Flags().StringVar(&deleteOptions.Repository, "repository", "", "Repository to delete an issue comment from. Defaults to the current repository")
3434
deleteCmd.Flags().Var(deleteOptions.IssueID, "issue", "Issue to delete comments from")
3535
_ = deleteCmd.MarkFlagRequired("issue")
36+
_ = deleteCmd.RegisterFlagCompletionFunc(deleteOptions.IssueID.CompletionFunc("issue"))
3637
}
3738

3839
func deleteValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

cmd/project/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func init() {
3131

3232
deleteOptions.Workspace = flags.NewEnumFlagWithFunc("", workspace.GetWorkspaceSlugs)
3333
deleteCmd.Flags().Var(deleteOptions.Workspace, "workspace", "Workspace to delete projects from")
34-
_ = deleteCmd.RegisterFlagCompletionFunc(createOptions.Workspace.CompletionFunc("workspace"))
34+
_ = deleteCmd.RegisterFlagCompletionFunc(deleteOptions.Workspace.CompletionFunc("workspace"))
3535
}
3636

3737
func deleteValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

cmd/project/reviewer/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func init() {
3535
listCmd.Flags().Var(listOptions.Columns, "columns", "Comma-separated list of columns to display")
3636
listCmd.Flags().Var(listOptions.SortBy, "sort", "Column to sort by")
3737
_ = listCmd.RegisterFlagCompletionFunc(listOptions.Workspace.CompletionFunc("workspace"))
38-
_ = getCmd.RegisterFlagCompletionFunc(listOptions.Project.CompletionFunc("project"))
38+
_ = listCmd.RegisterFlagCompletionFunc(listOptions.Project.CompletionFunc("project"))
3939
_ = listCmd.RegisterFlagCompletionFunc(listOptions.Columns.CompletionFunc("columns"))
4040
_ = listCmd.RegisterFlagCompletionFunc(listOptions.SortBy.CompletionFunc("sort"))
4141
}

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var branch string
1212
var stamp string
1313

1414
// VERSION is the version of this application
15-
var VERSION = "0.16.0"
15+
var VERSION = "0.16.1"
1616

1717
// APP is the name of the application
1818
const APP = "bb"

0 commit comments

Comments
 (0)