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

version.json: field commit when initialization. #32

Open
sergiotejon opened this issue Sep 9, 2024 · 1 comment
Open

version.json: field commit when initialization. #32

sergiotejon opened this issue Sep 9, 2024 · 1 comment
Assignees
Labels
invalid This doesn't seem right

Comments

@sergiotejon
Copy link
Contributor

When the command init is run, gommitizen makes a .vesion.json file with a field called commit with a default value of HEAD^1.

That means that gommitizen must check from the previous commit of HEAD to the last commit looking for changes in the bumping process.

Suppose the repository has an older commit with the changes needed to make the bump properly. gommitizen won't find that.

Is there any way to point the field commit to the first git commit when initializing gommitizen? That would solve the problem.

Once the first bump is done properly, the field commit is rewritten with a specific commit and this problem won't occur again. This is just an init problem.

@sergiotejon sergiotejon added the invalid This doesn't seem right label Sep 9, 2024
@sergiotejon sergiotejon self-assigned this Sep 9, 2024
@jaimeph
Copy link
Contributor

jaimeph commented Sep 11, 2024

Using this command you can obtain the first commit:
git rev-list --max-parents=0 HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants