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

Write .gituprevision in the root of the clone #19

Closed
michael-o opened this issue Dec 30, 2020 · 9 comments
Closed

Write .gituprevision in the root of the clone #19

michael-o opened this issue Dec 30, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@michael-o
Copy link
Contributor

Since I moved from Subversion to gitup I do not see revision in uname -a anymore. This is especially problematic for users which have to report issues and requested the used commit id. I know that this is not really related to gitup, but here is my proposal:

When a clone or a pull happens to a section create/update a .gituprevision file in that same target directory ideally to the same format the official Git client would procude. In the next step sys/conf/newvers.sh can be modified to readin that file and make uname -a just like using Subversion or Git.

Git code: https://github.com/freebsd/freebsd-src/blob/098dbd7ff7f3da9dda03802cdb2d8755f816eada/sys/conf/newvers.sh#L249-L264

@johnmehr johnmehr self-assigned this Jan 1, 2021
@johnmehr johnmehr added the enhancement New feature or request label Jan 1, 2021
@johnmehr
Copy link
Owner

johnmehr commented Jan 1, 2021

Hello,

I just pushed out an update to create a .gituprevision file in the target path which stores the branch, a '-' and the first nine digits of the want commit. How does it look?

@michael-o
Copy link
Contributor Author

Thank you for the quick turnaround, looking into. A hyphen might be problematic because a vendor branch can contain a hyphen. When newvers.sh should perform a cut it should expect maybe just two columns instead of 2+.

@michael-o
Copy link
Contributor Author

Tested. Works for me. I would highly prefer something which is not allowed in a branch name. Colon seems good to me.

@johnmehr
Copy link
Owner

johnmehr commented Jan 1, 2021

I just changed the separator to a colon and pushed the changes.

@michael-o
Copy link
Contributor Author

michael-o commented Jan 1, 2021

Works for me! Happily closing this issue.

@emaste
Copy link
Contributor

emaste commented Jan 3, 2021

sys/conf/newvers.sh can be modified
Will you submit a patch for that as well?

@michael-o
Copy link
Contributor Author

sys/conf/newvers.sh can be modified
Will you submit a patch for that as well?

If you'd review, I'd be happy to next week.

@emaste
Copy link
Contributor

emaste commented Jan 3, 2021

Sounds good, tag me on the review and I'll look.

@michael-o
Copy link
Contributor Author

Here you go folks: freebsd/freebsd-src#449

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

No branches or pull requests

3 participants