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

Resolve symlinks before running git diff #3750

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

rgrinberg
Copy link
Member

git diff does not like symlink arguments.

Fixes #3740

@rgrinberg rgrinberg requested a review from aalekseyev August 27, 2020 22:34
@rgrinberg rgrinberg force-pushed the symlink-git-diff branch 3 times, most recently from 178a0c4 to c0ceea1 Compare August 28, 2020 02:37
@rgrinberg rgrinberg force-pushed the symlink-git-diff branch 2 times, most recently from 165c5e2 to 25ea2e7 Compare August 29, 2020 01:41
@rgrinberg rgrinberg added this to the 2.7.1 milestone Aug 29, 2020
src/stdune/path.ml Outdated Show resolved Hide resolved
src/stdune/path.ml Outdated Show resolved Hide resolved
src/stdune/path.ml Outdated Show resolved Hide resolved
@rgrinberg
Copy link
Member Author

rgrinberg commented Aug 31, 2020 via email

src/stdune/fpath.mli Outdated Show resolved Hide resolved
@@ -1335,3 +1335,6 @@ let chmod ~mode ?(stats = None) ?(op = `Set) path =
stats.st_perm land lnot mode
in
Unix.chmod (to_string path) mode

let follow_symlink path =
Fpath.follow_symlink (to_string path) |> Result.map ~f:of_string
Copy link
Collaborator

@aalekseyev aalekseyev Sep 1, 2020

Choose a reason for hiding this comment

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

I guess of_string can still raise, so not a fan of Path.follow_symlink. I guess this won't be a problem for the diffing though because dune is in control of the symlinks.

git diff does not like symlink arguments.

Fixes ocaml#3740

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit 7d004cd into ocaml:master Sep 2, 2020
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 3, 2020
…lugin, dune-private-libs and dune-glob (2.7.1)

CHANGES:

- configurator: More flexible probing of `#define`. We allow duplicate values in
  the object file, as long as they are the same after parsing. (ocaml/dune#3739, fixes
  ocaml/dune#3736, @rgrinberg)

- Record instrumentation backends in dune-package files. This makes it possible
  to use instrumentation backends defined in installed libraries (eg via OPAM).
  (ocaml/dune#3735, @nojb)

- Add missing `.aux` & `.glob` targets to coq rules (ocaml/dune#3721, fixes ocaml/dune#3437,
  @rgrinberg)

- Fix `dune-package` installation when META templates are present (ocaml/dune#3743, fixes
  ocaml/dune#3746, @rgrinberg)

- Resolve symlinks before running `$ git diff` (ocaml/dune#3750, fixes ocaml/dune#3740, @rgrinberg)

- Cram tests: when checking that all test directories contain a `run.t` file,
  skip empty directories. These can be left around by git. (ocaml/dune#3753, @emillon)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 5, 2020
…lugin, dune-private-libs and dune-glob (2.7.1)

CHANGES:

- configurator: More flexible probing of `#define`. We allow duplicate values in
  the object file, as long as they are the same after parsing. (ocaml/dune#3739, fixes
  ocaml/dune#3736, @rgrinberg)

- Record instrumentation backends in dune-package files. This makes it possible
  to use instrumentation backends defined in installed libraries (eg via OPAM).
  (ocaml/dune#3735, @nojb)

- Add missing `.aux` & `.glob` targets to coq rules (ocaml/dune#3721, fixes ocaml/dune#3437,
  @rgrinberg)

- Fix `dune-package` installation when META templates are present (ocaml/dune#3743, fixes
  ocaml/dune#3746, @rgrinberg)

- Resolve symlinks before running `$ git diff` (ocaml/dune#3750, fixes ocaml/dune#3740, @rgrinberg)

- Cram tests: when checking that all test directories contain a `run.t` file,
  skip empty directories. These can be left around by git. (ocaml/dune#3753, @emillon)
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.

Comparison with expected tests using Git diff is broken
2 participants