Re: [PATCH 37/37] replace: rename 'new' variables
- From
Stefan Beller <sbeller@google.com>
- Date
- Jan 30, 2018, 22:58 UTC
- Message-ID
- <CAGZ79kYwOc3vMsj8DWyNtudM-OBzyw8iTEfKK3nnOJM23GF78A@mail.gmail.com>
- In-Reply-To
- <20180129223728.30569-38-bmwill@google.com>
On Mon, Jan 29, 2018 at 2:37 PM, Brandon Williams <bmwill@google.com> wrote:
Show 18 quoted lines
> Rename C++ keyword in order to bring the codebase closer to being able
> to be compiled with a C++ compiler.
>
> Signed-off-by: Brandon Williams <bmwill@google.com>
> ---
> builtin/replace.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/builtin/replace.c b/builtin/replace.c
> index 42cf4f62a..e48835b54 100644
> --- a/builtin/replace.c
> +++ b/builtin/replace.c
> @@ -284,7 +284,7 @@ static int edit_and_replace(const char *object_ref, int force, int raw)
> {
> char *tmpfile = git_pathdup("REPLACE_EDITOBJ");
> enum object_type type;
> - struct object_id old, new, prev;
> + struct object_id old, new_oid, prev;new is a keyword that often comes with a counterpart, here `old`. So while at it, also rename old to old_oid ? Do we care about the symmetry enough to warrant additional churn for this?
Stefan