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

Tienmax1 #124

Open
wants to merge 17 commits into
base: elhmn-limit-tree-traversal-to-refs-passed-by-arguments
Choose a base branch
from

Conversation

0352397554
Copy link

Tienmax1

rajhawaldar and others added 17 commits September 23, 2023 10:34
We needed a way to generate draft releases for git-sizer binaries.

This commit adds a new `.github/workflows/release.yml` github action
that will generate a draft release when a new tag version is pushed.

the action will be triggered After the tag is created and pushed using:

```
git tag -as v$VERSION
git push origin v$VERSION
```
…-upload

Generate automatic draft release
The name `gitDir` is less ambiguous. Also rename method `Path()` to
`GitDir()`.
Add a method `Repository.GitPath(relPath)`, which invokes `git
rev-parse --git-path $relPath` to find the path to a file within the
Git repository.

In `NewRepository()`, instantiate the `Repository` object earlier so
that the new method can be used to find the path to `shallow`.
Extract a method to determine whether the repository seems to be a
full clone. Call it from `NewRepository()`.
If you already have the desired `GIT_DIR`, there's no need to
determine it from the current path.
There's no need to deduce the `GIT_DIR` for a bare repository.
Update the installation steps to use 'go install'
As of Git v2.38.0, there is an option to prevent Git from accessing bare
repositories unless asked for explicitly (via `--git-dir` or `GIT_DIR`):
`safe.bareRepository`.

The tests of `git sizer`, however, assume that Git will access a bare
repository when the current directory points inside that repository.
This only works if `safe.bareRepository` indicates that this is safe.

If that is not the case, i.e. if `safe.bareRepository` is set to
`explicit`, Git demands that the environment variable `GIT_DIR` is set
(either explicitly, or via `--git-dir`) when accessing bare
repositories.

So let's set `GIT_DIR` for the test cases that work on bare
repositories.

Signed-off-by: Johannes Schindelin <[email protected]>
Improve repository detection and deal with `safe.bareRepository=explicit`
@0352397554 0352397554 requested a review from a team as a code owner August 10, 2024 18:54
@@ -4,17 +4,17 @@ if [ -z "$ROOTDIR" ]; then
echo 1>&2 'ensure-go-installed.sh invoked without ROOTDIR set!'
Copy link
Author

Choose a reason for hiding this comment

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

100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants