Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak file listing to omit .git directory #1722

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

HeavyWombat
Copy link
Contributor

@HeavyWombat HeavyWombat commented Nov 5, 2024

Changes

In almost all cases, the .git directory content is not directly helpful in the file listing and it leads to a lot of noise in the output.

Do not show .git files in file listing, but show a summary of size and file count at the end in the footer section.

$ git-step --url https://github.com/shipwright-io/sample-go --target /tmp/workspace/source --show-listing
2024/11/05 12:11:34 Info: ssh (/usr/bin/ssh): OpenSSH_9.7p1, LibreSSL 3.3.6
2024/11/05 12:11:34 Info: git (/opt/homebrew/bin/git): git version 2.46.0
2024/11/05 12:11:34 Info: git-lfs (/opt/homebrew/bin/git-lfs): git-lfs/3.5.1 (GitHub; darwin arm64; go 1.23.1)
2024/11/05 12:11:34 /opt/homebrew/bin/git -c safe.directory=/tmp/workspace/source clone -h
2024/11/05 12:11:34 /opt/homebrew/bin/git -c safe.directory=/tmp/workspace/source submodule -h
2024/11/05 12:11:34 /opt/homebrew/bin/git -c safe.directory=/tmp/workspace/source clone --quiet --no-tags --single-branch --depth 1 -- https://github.com/shipwright-io/sample-go /tmp/workspace/source
2024/11/05 12:11:35 /opt/homebrew/bin/git -c safe.directory=/tmp/workspace/source -C /tmp/workspace/source submodule update --init --recursive --depth 1
2024/11/05 12:11:35 /opt/homebrew/bin/git -c safe.directory=/tmp/workspace/source -C /tmp/workspace/source rev-parse --abbrev-ref HEAD
2024/11/05 12:11:35 Successfully loaded https://github.com/shipwright-io/sample-go (main) into /tmp/workspace/source
 drwxr-xr-x  3  501  0    96B  .github
 drwxr-xr-x  4  501  0   128B  .github/workflows
 -rw-r--r--  1  501  0   438B  .github/workflows/issues.yml
 -rw-r--r--  1  501  0   1.6K  .github/workflows/source-bundle-upload.yaml
 -rw-r--r--  1  501  0     5B  .shpignore
 -rw-r--r--  1  501  0  11.1K  LICENSE
 -rw-r--r--  1  501  0   291B  OWNERS
 -rw-r--r--  1  501  0   1.3K  README.md
 drwxr-xr-x  4  501  0   128B  docker-build
 -rw-r--r--  1  501  0   381B  docker-build/Dockerfile
 -rw-r--r--  1  501  0   972B  docker-build/main.go
 drwxr-xr-x  4  501  0   128B  docker-build-with-args
 -rw-r--r--  1  501  0   528B  docker-build-with-args/Dockerfile
 -rw-r--r--  1  501  0   972B  docker-build-with-args/main.go
 drwxr-xr-x  4  501  0   128B  source-build
 -rw-r--r--  1  501  0    35B  source-build/go.mod
 -rw-r--r--  1  501  0   972B  source-build/main.go
 drwxr-xr-x  4  501  0   128B  source-build-with-package
 -rw-r--r--  1  501  0    35B  source-build-with-package/go.mod
 drwxr-xr-x  3  501  0    96B  source-build-with-package/main-package
 -rw-r--r--  1  501  0   972B  source-build-with-package/main-package/main.go
──────────────────────────────────────────────────────────────────────────────
                        40.4K  45 files in .git
                        60.7K  66 files in total

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

/kind cleanup

Release Notes

NONE

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 5, 2024
@openshift-ci openshift-ci bot added release-note-none Label for when a PR does not need a release note kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 5, 2024
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
In almost all cases, the `.git` directory content is not directly helpful
in the file listing and it leads to a lot of noise in the output.

Do not show `.git` files in file listing, but show a summary of size and
file count at the end in the footer section.

Signed-off-by: Matthias Diester <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
@SaschaSchwarze0
Copy link
Member

Rebased to get the BuildKit fix to get e2e green.

@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.14.0 milestone Nov 5, 2024
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
Copy link
Contributor

openshift-ci bot commented Nov 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 13f4422 into main Nov 5, 2024
21 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the tweak/file-listing-dot-git branch November 5, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Label for when a PR does not need a release note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants