Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
expire_reflog(): rename "ref" parameter to "refname"
author
Michael Haggerty
<mhagger@alum.mit.edu>
Fri, 12 Dec 2014 08:56:44 +0000
(09:56 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 12 Dec 2014 19:43:40 +0000
(11:43 -0800)
This is our usual convention.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
55dfc8d
)
diff --git
a/builtin/reflog.c
b/builtin/reflog.c
index 160541aa2f3a4e35c0822b5879aeb68e60c5a899..ff51dbfc0a71bd28f0dc1ffa2e3be9dcc86bcb8e 100644
(file)
--- a/
builtin/reflog.c
+++ b/
builtin/reflog.c
@@
-349,7
+349,7
@@
static int push_tip_to_list(const char *refname, const unsigned char *sha1, int
return 0;
}
return 0;
}
-static int expire_reflog(const char *ref, const unsigned char *sha1,
+static int expire_reflog(const char *ref
name
, const unsigned char *sha1,
struct cmd_reflog_expire_cb *cmd)
{
struct expire_reflog_cb cb;
struct cmd_reflog_expire_cb *cmd)
{
struct expire_reflog_cb cb;
@@
-365,20
+365,20
@@
static int expire_reflog(const char *ref, const unsigned char *sha1,
* we take the lock for the ref itself to prevent it from
* getting updated.
*/
* we take the lock for the ref itself to prevent it from
* getting updated.
*/
- lock = lock_any_ref_for_update(ref, sha1, 0, NULL);
+ lock = lock_any_ref_for_update(ref
name
, sha1, 0, NULL);
if (!lock)
if (!lock)
- return error("cannot lock ref '%s'", ref);
- log_file = git_pathdup("logs/%s", ref);
- if (!reflog_exists(ref))
+ return error("cannot lock ref '%s'", ref
name
);
+ log_file = git_pathdup("logs/%s", ref
name
);
+ if (!reflog_exists(ref
name
))
goto finish;
if (!cmd->dry_run) {
goto finish;
if (!cmd->dry_run) {
- newlog_path = git_pathdup("logs/%s.lock", ref);
+ newlog_path = git_pathdup("logs/%s.lock", ref
name
);
cb.newlog = fopen(newlog_path, "w");
}
cb.cmd = cmd;
cb.newlog = fopen(newlog_path, "w");
}
cb.cmd = cmd;
- if (!cmd->expire_unreachable || !strcmp(ref, "HEAD")) {
+ if (!cmd->expire_unreachable || !strcmp(ref
name
, "HEAD")) {
tip_commit = NULL;
cb.unreachable_expire_kind = UE_HEAD;
} else {
tip_commit = NULL;
cb.unreachable_expire_kind = UE_HEAD;
} else {
@@
-407,7
+407,7
@@
static int expire_reflog(const char *ref, const unsigned char *sha1,
mark_reachable(&cb);
}
mark_reachable(&cb);
}
- for_each_reflog_ent(ref, expire_reflog_ent, &cb);
+ for_each_reflog_ent(ref
name
, expire_reflog_ent, &cb);
if (cb.unreachable_expire_kind != UE_ALWAYS) {
if (cb.unreachable_expire_kind == UE_HEAD) {
if (cb.unreachable_expire_kind != UE_ALWAYS) {
if (cb.unreachable_expire_kind == UE_HEAD) {