Skip to content

Commit

Permalink
add debug if not clean fix gerrit test
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Feb 3, 2025
1 parent 37eecc2 commit e9de9c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
Binary file modified tests/testdata/git/projects/gerrit/gerrit.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion utils/scm/gitmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ func (gm *GitManager) isClean() (bool, error) {
if err != nil {
return false, err
}

isClean := status.IsClean()
if !isClean {
log.Debug(fmt.Sprintf("Git status: %v", status))
}
return status.IsClean(), nil
}

Expand Down
17 changes: 3 additions & 14 deletions utils/scm/gitmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,9 @@ func TestGetGitContext(t *testing.T) {
GitProject: "git-repo",
GitProvider: "gerrit",
BranchName: "main",
LastCommitHash: "1711bc23c0ab6ff4a51bf948c703c81073dd3475",
LastCommitMessage: `git_config: prefer XDG config location
Currently, repo ignores the XDG path for the git config file, and
creates a new one in the user's home directory. This commit changes the
behavior to prefer the XDG path if it exists, which matches git behavior
and avoids littering the home directory.
Bug: 40012443
Change-Id: Icd3ec6db6b0832f47417bbe98ff9461306b51297
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/448385
Tested-by: lmaor xenix <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>`,
LastCommitAuthor: "flexagoon",
LastCommitHash: "5658fc3dff435f4f17811ecea3baa2f3d6e9b5dc",
LastCommitMessage: `add ignore`,
LastCommitAuthor: "attiasas",
},
},
{
Expand Down

0 comments on commit e9de9c0

Please sign in to comment.