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

Rename google-java-format-diff.py to google_java_format_diff.py for **Module Import** Compatibility #1121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following Apache 2.0 license applies to all code in this package except
google-java-format-diff.py.
google_java_format_diff.py.

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -205,7 +205,7 @@ google-java-format-diff.py.

------------------------------------------------------------------------------

The following NCSA license applies only to google-java-format-diff.py.
The following NCSA license applies only to google_java_format_diff.py.

==============================================================================
LLVM Release License
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ offsets (`--offset`), passing through to standard-out (default) or altered
in-place (`--replace`).

To reformat changed lines in a specific patch, use
[`google-java-format-diff.py`](https://github.com/google/google-java-format/blob/master/scripts/google-java-format-diff.py).
[`google_java_format_diff.py`](https://github.com/google/google-java-format/blob/master/scripts/google_java_format_diff.py).

***Note:*** *There is no configurability as to the formatter's algorithm for
formatting. This is a deliberate design decision to unify our code formatting on
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# ===- google-java-format-diff.py - google-java-format Diff Reformatter -----===#
# ===- google_java_format_diff.py - google-java-format Diff Reformatter -----===#
#
# The LLVM Compiler Infrastructure
#
Expand All @@ -17,12 +17,12 @@
lines. This is useful to reformat all the lines touched by a specific patch.
Example usage for git/svn users:

git diff -U0 HEAD^ | google-java-format-diff.py -p1 -i
svn diff --diff-cmd=diff -x-U0 | google-java-format-diff.py -i
git diff -U0 HEAD^ | google_java_format_diff.py -p1 -i
svn diff --diff-cmd=diff -x-U0 | google_java_format_diff.py -i

For perforce users:

P4DIFF="git --no-pager diff --no-index" p4 diff | ./google-java-format-diff.py -i -p7
P4DIFF="git --no-pager diff --no-index" p4 diff | ./google_java_format_diff.py -i -p7

"""

Expand Down