-
Notifications
You must be signed in to change notification settings - Fork 96
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
status: deserialize with -uno does not print correct hint #157
status: deserialize with -uno does not print correct hint #157
Conversation
With the "--untracked-files=complete" option status computes a superset of the untracked files. We use this when writing the status cache. If subsequent deserialize commands ask for either the complete set or one of the "no", "normal", or "all" subsets, it can still use the cache file because of filtering in the deserialize parser. When running status with the "-uno" option, the long format status would print a "(use -u to show untracked files)" hint. When deserializing with the "-uno" option and using a cache computed with "-ucomplete", the "nothing to commit, working tree clean" message would be printed instead of the hint. It was easy to miss because the correct hint message was printed if the cache was rejected for any reason (and status did the full fallback). The "struct wt_status des" structure was initialized with the content of the status cache (and thus defaulted to "complete"). This change sets "des.show_untracked_files" to the requested subset from the command-line or config. This allows the long format to print the hint. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Includes status deserialziation bug fix from microsoft/git#157.
Adding @jrbriggs for visibility. |
git init hint && | ||
echo xxx >hint/xxx && | ||
git -C hint add xxx && | ||
git -C hint commit -m xxx && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't test_commit -C hint xxx
be more succinct than those three lines? (Of course, the file is then called xxx.t
, but it would be easy to adapt the test case to that, no?)
cat >expect.clean <<EOF && | ||
On branch master | ||
nothing to commit, working tree clean | ||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use <<-\EOF
and indent the text.
|
||
# Create long format output for "complete" and create status cache. | ||
|
||
git -C hint status --untracked-files=complete --ignored=matching --serialize=../hint.dat >hint.output_complete && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line needs to be broken (with a \
continuation)...
Includes status deserialziation bug fix from microsoft/git#157.
Includes status deserialziation bug fix from microsoft/git#157. Further, update the dehydrate verb to specifically use `-uall` when checking for local changes.
…cked-hint status: deserialize with -uno does not print correct hint
…cked-hint status: deserialize with -uno does not print correct hint
…cked-hint status: deserialize with -uno does not print correct hint
…cked-hint status: deserialize with -uno does not print correct hint
…cked-hint status: deserialize with -uno does not print correct hint
With the "--untracked-files=complete" option status computes a
superset of the untracked files. We use this when writing the
status cache. If subsequent deserialize commands ask for either
the complete set or one of the "no", "normal", or "all" subsets,
it can still use the cache file because of filtering in the
deserialize parser.
When running status with the "-uno" option, the long format
status would print a "(use -u to show untracked files)" hint.
When deserializing with the "-uno" option and using a cache computed
with "-ucomplete", the "nothing to commit, working tree clean" message
would be printed instead of the hint.
It was easy to miss because the correct hint message was printed
if the cache was rejected for any reason (and status did the full
fallback).
The "struct wt_status des" structure was initialized with the
content of the status cache (and thus defaulted to "complete").
This change sets "des.show_untracked_files" to the requested
subset from the command-line or config. This allows the long
format to print the hint.
Signed-off-by: Jeff Hostetler jeffhost@microsoft.com