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

Improve debug output. #512

Closed
wants to merge 4 commits into from
Closed

Conversation

cwarlich
Copy link
Contributor

@cwarlich cwarlich commented Jan 3, 2025

Currently, when setting the DEBUG environment variable, yadm prints some additional info w.r.t. what it is doing. This is only of marginal help particularly for anyone new to yadm development: Whenever debuging the yadm script, one really wants to know exactly what git is doing "under the hood" when running yadm commands.

This patch does just that: When DEBUG is set, it additionally prints all instances where the yadm script runs git. It does that in green allowing to distinghuish from the hand-written debug messages.

@cwarlich cwarlich force-pushed the feature/git_logging branch 4 times, most recently from ea843e2 to b0e964a Compare January 3, 2025 14:35
@cwarlich cwarlich force-pushed the feature/git_logging branch from b0e964a to 22f20a1 Compare January 3, 2025 15:19
@cwarlich
Copy link
Contributor Author

cwarlich commented Jan 3, 2025

Sorry for the forced pushes: The test is fine now.

Copy link
Contributor

@rasa rasa left a comment

Choose a reason for hiding this comment

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

I love this and
${*@Q}"
is an awesome truck!

@erijo
Copy link
Collaborator

erijo commented Jan 5, 2025

Thanks for working on improving yadm!

There is built-in support in git itself for printing commands that are executed. You get it by setting GIT_TRACE=1 when running e.g. yadm. So I wonder if it's worth having similar support also in yadm. What do you think?

Please rebase this on develop instead of master. Also, ${*@Q} is not supported in bash 3 and thus can't be used.

@cwarlich
Copy link
Contributor Author

cwarlich commented Jan 6, 2025 via email

@erijo
Copy link
Collaborator

erijo commented Jan 14, 2025

Closing this then based on the last comment.

@erijo erijo closed this Jan 14, 2025
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.

3 participants