Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
reset: rename update_refs to reset_refs
author
Brad King
<brad.king@kitware.com>
Fri, 30 Aug 2013 18:11:59 +0000
(14:11 -0400)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 30 Aug 2013 21:57:27 +0000
(14:57 -0700)
The function resets refs rather than doing arbitrary updates.
Rename it to allow a future general-purpose update_refs function
to be added.
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reset.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e230c56
)
diff --git
a/builtin/reset.c
b/builtin/reset.c
index afa6e020e83ebac739db474c278e44bc22079848..789ee489b772f147f254afbf7d3b0c9eecf42c7b 100644
(file)
--- a/
builtin/reset.c
+++ b/
builtin/reset.c
@@
-219,7
+219,7
@@
static const char **parse_args(const char **argv, const char *prefix, const char
return argv[0] ? get_pathspec(prefix, argv) : NULL;
}
return argv[0] ? get_pathspec(prefix, argv) : NULL;
}
-static int
update
_refs(const char *rev, const unsigned char *sha1)
+static int
reset
_refs(const char *rev, const unsigned char *sha1)
{
int update_ref_status;
struct strbuf msg = STRBUF_INIT;
{
int update_ref_status;
struct strbuf msg = STRBUF_INIT;
@@
-350,7
+350,7
@@
int cmd_reset(int argc, const char **argv, const char *prefix)
if (!pathspec && !unborn) {
/* Any resets without paths update HEAD to the head being
* switched to, saving the previous head in ORIG_HEAD before. */
if (!pathspec && !unborn) {
/* Any resets without paths update HEAD to the head being
* switched to, saving the previous head in ORIG_HEAD before. */
- update_ref_status =
update
_refs(rev, sha1);
+ update_ref_status =
reset
_refs(rev, sha1);
if (reset_type == HARD && !update_ref_status && !quiet)
print_new_head_line(lookup_commit_reference(sha1));
if (reset_type == HARD && !update_ref_status && !quiet)
print_new_head_line(lookup_commit_reference(sha1));