Skip to content

Commit 577aed2

Browse files
committed
Merge branch 'jk/remove-deprecated'
* jk/remove-deprecated: stop installing git-tar-tree link peek-remote: remove deprecated alias of ls-remote lost-found: remove deprecated command tar-tree: remove deprecated command repo-config: remove deprecated alias for "git config"
2 parents df5f0ad + 15a42a1 commit 577aed2

18 files changed

+48
-411
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
/git-init-db
7777
/git-instaweb
7878
/git-log
79-
/git-lost-found
8079
/git-ls-files
8180
/git-ls-remote
8281
/git-ls-tree
@@ -106,7 +105,6 @@
106105
/git-pack-refs
107106
/git-parse-remote
108107
/git-patch-id
109-
/git-peek-remote
110108
/git-prune
111109
/git-prune-packed
112110
/git-pull
@@ -132,7 +130,6 @@
132130
/git-remote-testsvn
133131
/git-repack
134132
/git-replace
135-
/git-repo-config
136133
/git-request-pull
137134
/git-rerere
138135
/git-reset
@@ -160,7 +157,6 @@
160157
/git-svn
161158
/git-symbolic-ref
162159
/git-tag
163-
/git-tar-tree
164160
/git-unpack-file
165161
/git-unpack-objects
166162
/git-update-index

Documentation/git-lost-found.txt

Lines changed: 0 additions & 74 deletions
This file was deleted.

Documentation/git-peek-remote.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

Documentation/git-repo-config.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

Documentation/git-tar-tree.txt

Lines changed: 0 additions & 82 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ SCRIPT_SH += git-am.sh
452452
SCRIPT_SH += git-bisect.sh
453453
SCRIPT_SH += git-difftool--helper.sh
454454
SCRIPT_SH += git-filter-branch.sh
455-
SCRIPT_SH += git-lost-found.sh
456455
SCRIPT_SH += git-merge-octopus.sh
457456
SCRIPT_SH += git-merge-one-file.sh
458457
SCRIPT_SH += git-merge-resolve.sh
@@ -587,11 +586,8 @@ BUILT_INS += git-cherry$X
587586
BUILT_INS += git-cherry-pick$X
588587
BUILT_INS += git-format-patch$X
589588
BUILT_INS += git-fsck-objects$X
590-
BUILT_INS += git-get-tar-commit-id$X
591589
BUILT_INS += git-init$X
592590
BUILT_INS += git-merge-subtree$X
593-
BUILT_INS += git-peek-remote$X
594-
BUILT_INS += git-repo-config$X
595591
BUILT_INS += git-show$X
596592
BUILT_INS += git-stage$X
597593
BUILT_INS += git-status$X
@@ -932,6 +928,7 @@ BUILTIN_OBJS += builtin/fmt-merge-msg.o
932928
BUILTIN_OBJS += builtin/for-each-ref.o
933929
BUILTIN_OBJS += builtin/fsck.o
934930
BUILTIN_OBJS += builtin/gc.o
931+
BUILTIN_OBJS += builtin/get-tar-commit-id.o
935932
BUILTIN_OBJS += builtin/grep.o
936933
BUILTIN_OBJS += builtin/hash-object.o
937934
BUILTIN_OBJS += builtin/help.o
@@ -983,7 +980,6 @@ BUILTIN_OBJS += builtin/show-ref.o
983980
BUILTIN_OBJS += builtin/stripspace.o
984981
BUILTIN_OBJS += builtin/symbolic-ref.o
985982
BUILTIN_OBJS += builtin/tag.o
986-
BUILTIN_OBJS += builtin/tar-tree.o
987983
BUILTIN_OBJS += builtin/unpack-file.o
988984
BUILTIN_OBJS += builtin/unpack-objects.o
989985
BUILTIN_OBJS += builtin/update-index.o

builtin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ extern int cmd_remote(int argc, const char **argv, const char *prefix);
103103
extern int cmd_remote_ext(int argc, const char **argv, const char *prefix);
104104
extern int cmd_remote_fd(int argc, const char **argv, const char *prefix);
105105
extern int cmd_repack(int argc, const char **argv, const char *prefix);
106-
extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
107106
extern int cmd_rerere(int argc, const char **argv, const char *prefix);
108107
extern int cmd_reset(int argc, const char **argv, const char *prefix);
109108
extern int cmd_rev_list(int argc, const char **argv, const char *prefix);

builtin/config.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,3 @@ int cmd_config(int argc, const char **argv, const char *prefix)
671671

672672
return 0;
673673
}
674-
675-
int cmd_repo_config(int argc, const char **argv, const char *prefix)
676-
{
677-
fprintf(stderr, "WARNING: git repo-config is deprecated in favor of git config.\n");
678-
return cmd_config(argc, argv, prefix);
679-
}

builtin/get-tar-commit-id.c

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2005, 2006 Rene Scharfe
3+
*/
4+
#include "cache.h"
5+
#include "commit.h"
6+
#include "tar.h"
7+
#include "builtin.h"
8+
#include "quote.h"
9+
10+
static const char builtin_get_tar_commit_id_usage[] =
11+
"git get-tar-commit-id < <tarfile>";
12+
13+
/* ustar header + extended global header content */
14+
#define RECORDSIZE (512)
15+
#define HEADERSIZE (2 * RECORDSIZE)
16+
17+
int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
18+
{
19+
char buffer[HEADERSIZE];
20+
struct ustar_header *header = (struct ustar_header *)buffer;
21+
char *content = buffer + RECORDSIZE;
22+
ssize_t n;
23+
24+
if (argc != 1)
25+
usage(builtin_get_tar_commit_id_usage);
26+
27+
n = read_in_full(0, buffer, HEADERSIZE);
28+
if (n < HEADERSIZE)
29+
die("git get-tar-commit-id: read error");
30+
if (header->typeflag[0] != 'g')
31+
return 1;
32+
if (memcmp(content, "52 comment=", 11))
33+
return 1;
34+
35+
n = write_in_full(1, content + 11, 41);
36+
if (n < 41)
37+
die_errno("git get-tar-commit-id: write error");
38+
39+
return 0;
40+
}

0 commit comments

Comments
 (0)