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

Nicer diff support #3881

Merged
merged 2 commits into from Mar 24, 2020
Merged

Nicer diff support #3881

merged 2 commits into from Mar 24, 2020

Conversation

opensdh
Copy link
Contributor

@opensdh opensdh commented Mar 17, 2020

Add two files that are special to git—if you opt into them with the configuration commands in the commit messages—and cause git diff to provide [stable.names] and present clauses in order.

Note that I've seen a case where a command run from inside .git complained about failing to find .gitorder, but now I can't reproduce it (with a different Git version)?

@zygoloid: Is this sufficiently useful to promulgate despite each user having to configure for it?

@zygoloid
Copy link
Member

Seems like a couple of nice ideas.

Would it be reasonable to also check in a .gitconfig file containing the two relevant git settings (and any others we come up with later) or a shell script that configures them or similar?

@opensdh
Copy link
Contributor Author

opensdh commented Mar 17, 2020

Would it be reasonable to also check in a .gitconfig file containing the two relevant git settings (and any others we come up with later) or a shell script that configures them or similar?

What would the user do with such a .gitconfig file? Append it to some other file? By design, Git doesn't consult any working copy file for configuration variables. The shell script could certainly work; where would you want it?

@zygoloid
Copy link
Member

What would the user do with such a .gitconfig file?

Either append it to .git/config or -- if they trust us -- git config --local include.path ../.gitconfig.

The shell script could certainly work; where would you want it?

tools/gitconfig.sh maybe?

@opensdh
Copy link
Contributor Author

opensdh commented Mar 17, 2020

Presumably the shell script is better: it explicitly depends on trust (and doesn't ask for permission for silent changes in the future) and can easily be idempotent (even though certain changes to it may require user intervention).

I moved the commands from the commit messages to your recommended tools/gitconfig.sh.

@zygoloid zygoloid merged commit f30ae8f into cplusplus:master Mar 24, 2020
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.

None yet

2 participants