Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/prune: convert to struct object_id
author
brian m. carlson
<sandals@crustytoothpaste.net>
Mon, 1 May 2017 02:28:58 +0000
(
02:28
+0000)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 2 May 2017 01:46:41 +0000
(10:46 +0900)
Convert the sole instance of unsigned char [20] to struct object_id.
cmd_prune is a caller of parse_object, which we will convert later.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/prune.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
511dca8
)
diff --git
a/builtin/prune.c
b/builtin/prune.c
index 42633e0c6e672c46852f0590f1941249691f962c..96dca7d58a5353783768ec3298d3a9e70ff40a1b 100644
(file)
--- a/
builtin/prune.c
+++ b/
builtin/prune.c
@@
-123,11
+123,11
@@
int cmd_prune(int argc, const char **argv, const char *prefix)
die(_("cannot prune in a precious-objects repo"));
while (argc--) {
die(_("cannot prune in a precious-objects repo"));
while (argc--) {
-
unsigned char sha1[20]
;
+
struct object_id oid
;
const char *name = *argv++;
const char *name = *argv++;
- if (!get_
sha1(name, sha1
)) {
- struct object *object = parse_object_or_die(
sha1
, name);
+ if (!get_
oid(name, &oid
)) {
+ struct object *object = parse_object_or_die(
oid.hash
, name);
add_pending_object(&revs, object, "");
}
else
add_pending_object(&revs, object, "");
}
else