summaryrefslogtreecommitdiffstats
path: root/builtin/reflog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-06 23:54:07 +0100
committerJunio C Hamano <gitster@pobox.com>2018-03-06 23:54:07 +0100
commit169c9c0169a00876f699678ac66ebe9563b0c29f (patch)
tree5344fd15a9134aa92eaf79ff5959f616cceffa17 /builtin/reflog.c
parentMerge branch 'rs/strbuf-read-file-or-whine' (diff)
parentreplace: rename 'new' variables (diff)
downloadgit-169c9c0169a00876f699678ac66ebe9563b0c29f.tar.xz
git-169c9c0169a00876f699678ac66ebe9563b0c29f.zip
Merge branch 'bw/c-plus-plus'
Avoid using identifiers that clash with C++ keywords. Even though it is not a goal to compile Git with C++ compilers, changes like this help use of code analysis tools that targets C++ on our codebase. * bw/c-plus-plus: (37 commits) replace: rename 'new' variables trailer: rename 'template' variables tempfile: rename 'template' variables wrapper: rename 'template' variables environment: rename 'namespace' variables diff: rename 'template' variables environment: rename 'template' variables init-db: rename 'template' variables unpack-trees: rename 'new' variables trailer: rename 'new' variables submodule: rename 'new' variables split-index: rename 'new' variables remote: rename 'new' variables ref-filter: rename 'new' variables read-cache: rename 'new' variables line-log: rename 'new' variables imap-send: rename 'new' variables http: rename 'new' variables entry: rename 'new' variables diffcore-delta: rename 'new' variables ...
Diffstat (limited to 'builtin/reflog.c')
-rw-r--r--builtin/reflog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 2233725315..ac3dcd7a51 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -289,20 +289,20 @@ static int should_expire_reflog_ent(struct object_id *ooid, struct object_id *no
const char *message, void *cb_data)
{
struct expire_reflog_policy_cb *cb = cb_data;
- struct commit *old, *new;
+ struct commit *old_commit, *new_commit;
if (timestamp < cb->cmd.expire_total)
return 1;
- old = new = NULL;
+ old_commit = new_commit = NULL;
if (cb->cmd.stalefix &&
- (!keep_entry(&old, ooid) || !keep_entry(&new, noid)))
+ (!keep_entry(&old_commit, ooid) || !keep_entry(&new_commit, noid)))
return 1;
if (timestamp < cb->cmd.expire_unreachable) {
if (cb->unreachable_expire_kind == UE_ALWAYS)
return 1;
- if (unreachable(cb, old, ooid) || unreachable(cb, new, noid))
+ if (unreachable(cb, old_commit, ooid) || unreachable(cb, new_commit, noid))
return 1;
}