Skip to content

Tienmax1#124

Closed
0352397554 wants to merge 17 commits intogithub:elhmn-limit-tree-traversal-to-refs-passed-by-argumentsfrom
0352397554:master
Closed

Tienmax1#124
0352397554 wants to merge 17 commits intogithub:elhmn-limit-tree-traversal-to-refs-passed-by-argumentsfrom
0352397554:master

Conversation

@0352397554
Copy link
Copy Markdown

Tienmax1

rajhawaldar and others added 17 commits September 23, 2023 10:34
Signed-off-by: rajhawaldar <rajhawaldar.in@gmail.com>
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 <johannes.schindelin@gmx.de>
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
Comment thread script/ensure-go-installed.sh
@mhagger
Copy link
Copy Markdown
Member

mhagger commented Jan 2, 2025

I don't understand the point/goal of this PR. Please add a description and justification if you want it to be considered.

@mhagger mhagger closed this Jan 2, 2025
@0352397554
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Author

@0352397554 0352397554 left a comment

Choose a reason for hiding this comment

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

0352397554:master

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