.editorconfig
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
Thu, 20 Apr 2023 09:23:58 -0400
branchstable
changeset 50431 c2a1f8668606
parent 45392 c25efc468a49
permissions -rw-r--r--
chg: set CHGHG before connecting to command server cf4d2f31 (!523) changed chg to set `CHGHG` itself when spawning a new command server, in order to ensure that the path to the `hg` executable would be checked during server validation. (This is useful when chg is built with `HGPATHREL`). However, that change broke chg because it failed to set `CHGHG` before trying to connect to an existing command server. This means that if `CHGHG` is not present in the environment, chg will always spawn a new command server, entirely negating the point of chg. This breakage wasn't initially caught because of the difficulty of writing automated tests with the `HGPATHREL` feature enabled, which meant the change was only tested manually to make sure that it fixed the problem with `HGPATHREL` that prompted the change. In practice, this functionality is only really useful when chg is built with `HGPATHREL`, so I considered wrapping it in an `#ifdef` to preserve the old behavior by default. However, this makes it hard to write tests since one would have to explicitly set `HGPATHREL=1` when running `run-tests.py` (which is why the original change lacked tests). It would be great if there were a way of testing features that are gated behind conditional compilation.

# See http://EditorConfig.org for the specification

root = true

[*.py]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
end_of_line = lf

[*.{c,h}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true
end_of_line = lf

[*.t]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false
end_of_line = lf