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

Add error info to get_cache_header_info and display it to end user #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samirnoman
Copy link
Contributor

when using a git repo, I sometimes encounter the error:

.git_store_meta is malformatted.
Fix it or run --store to create new

And by inspecting the file it's not clear why!
These errors seem like random (I haven't been able to find what causes them)!

So, I made a modification to return a meaningful error from the function get_cache_header_info and display it. This should help disagnose these errors in the future in order to be able to solve them quickly

@danny0838
Copy link
Owner

danny0838 commented Jun 24, 2024

1. Please provide the affected file and the recent shell command history when the "random" error happens for further investigation.

2. Please do not include linefeed change in the commits.

@samirnoman
Copy link
Contributor Author

samirnoman commented Jun 24, 2024

  1. Please provide the affected file and the recent shell command history when the "random" error happens for further investigation.

  2. Please do not include linefeed change in the commits.

Unfortunaltely, I don't have an affected file right now. When it happened to me I re-created the file (I should've saved the malformatted file).

Sorry about the linefeeds, I did not pay attention to it because I'm using windows.

@danny0838
Copy link
Owner

We don't want all the intermediate full-file diffs. Please rebase.

@samirnoman
Copy link
Contributor Author

the file is already rebased, but it has two commits..
do you mean to squash the two commits?

return string with error info from get_cache_header_info to help diagnose why the file is invalid

also print the error to stderr as warning
@samirnoman samirnoman force-pushed the add_meta_store_error branch from b1ca312 to 2a12672 Compare June 25, 2024 12:25
@samirnoman
Copy link
Contributor Author

I noticed that the line ending for the intermidiate commit was CRLF. I have corrected that and re-pushed the branch

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.

2 participants