Skip to content

Commit

Permalink
Merge branch 'jk/remove-deprecated'
Browse files Browse the repository at this point in the history
* 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"
  • Loading branch information
Junio C Hamano committed Dec 12, 2013
2 parents df5f0ad + 15a42a1 commit 577aed2
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 411 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
/git-init-db
/git-instaweb
/git-log
/git-lost-found
/git-ls-files
/git-ls-remote
/git-ls-tree
Expand Down Expand Up @@ -106,7 +105,6 @@
/git-pack-refs
/git-parse-remote
/git-patch-id
/git-peek-remote
/git-prune
/git-prune-packed
/git-pull
Expand All @@ -132,7 +130,6 @@
/git-remote-testsvn
/git-repack
/git-replace
/git-repo-config
/git-request-pull
/git-rerere
/git-reset
Expand Down Expand Up @@ -160,7 +157,6 @@
/git-svn
/git-symbolic-ref
/git-tag
/git-tar-tree
/git-unpack-file
/git-unpack-objects
/git-update-index
Expand Down
74 changes: 0 additions & 74 deletions Documentation/git-lost-found.txt

This file was deleted.

43 changes: 0 additions & 43 deletions Documentation/git-peek-remote.txt

This file was deleted.

23 changes: 0 additions & 23 deletions Documentation/git-repo-config.txt

This file was deleted.

82 changes: 0 additions & 82 deletions Documentation/git-tar-tree.txt

This file was deleted.

6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh
SCRIPT_SH += git-difftool--helper.sh
SCRIPT_SH += git-filter-branch.sh
SCRIPT_SH += git-lost-found.sh
SCRIPT_SH += git-merge-octopus.sh
SCRIPT_SH += git-merge-one-file.sh
SCRIPT_SH += git-merge-resolve.sh
Expand Down Expand Up @@ -587,11 +586,8 @@ BUILT_INS += git-cherry$X
BUILT_INS += git-cherry-pick$X
BUILT_INS += git-format-patch$X
BUILT_INS += git-fsck-objects$X
BUILT_INS += git-get-tar-commit-id$X
BUILT_INS += git-init$X
BUILT_INS += git-merge-subtree$X
BUILT_INS += git-peek-remote$X
BUILT_INS += git-repo-config$X
BUILT_INS += git-show$X
BUILT_INS += git-stage$X
BUILT_INS += git-status$X
Expand Down Expand Up @@ -932,6 +928,7 @@ BUILTIN_OBJS += builtin/fmt-merge-msg.o
BUILTIN_OBJS += builtin/for-each-ref.o
BUILTIN_OBJS += builtin/fsck.o
BUILTIN_OBJS += builtin/gc.o
BUILTIN_OBJS += builtin/get-tar-commit-id.o
BUILTIN_OBJS += builtin/grep.o
BUILTIN_OBJS += builtin/hash-object.o
BUILTIN_OBJS += builtin/help.o
Expand Down Expand Up @@ -983,7 +980,6 @@ BUILTIN_OBJS += builtin/show-ref.o
BUILTIN_OBJS += builtin/stripspace.o
BUILTIN_OBJS += builtin/symbolic-ref.o
BUILTIN_OBJS += builtin/tag.o
BUILTIN_OBJS += builtin/tar-tree.o
BUILTIN_OBJS += builtin/unpack-file.o
BUILTIN_OBJS += builtin/unpack-objects.o
BUILTIN_OBJS += builtin/update-index.o
Expand Down
1 change: 0 additions & 1 deletion builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ extern int cmd_remote(int argc, const char **argv, const char *prefix);
extern int cmd_remote_ext(int argc, const char **argv, const char *prefix);
extern int cmd_remote_fd(int argc, const char **argv, const char *prefix);
extern int cmd_repack(int argc, const char **argv, const char *prefix);
extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
extern int cmd_rerere(int argc, const char **argv, const char *prefix);
extern int cmd_reset(int argc, const char **argv, const char *prefix);
extern int cmd_rev_list(int argc, const char **argv, const char *prefix);
Expand Down
6 changes: 0 additions & 6 deletions builtin/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,3 @@ int cmd_config(int argc, const char **argv, const char *prefix)

return 0;
}

int cmd_repo_config(int argc, const char **argv, const char *prefix)
{
fprintf(stderr, "WARNING: git repo-config is deprecated in favor of git config.\n");
return cmd_config(argc, argv, prefix);
}
40 changes: 40 additions & 0 deletions builtin/get-tar-commit-id.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2005, 2006 Rene Scharfe
*/
#include "cache.h"
#include "commit.h"
#include "tar.h"
#include "builtin.h"
#include "quote.h"

static const char builtin_get_tar_commit_id_usage[] =
"git get-tar-commit-id < <tarfile>";

/* ustar header + extended global header content */
#define RECORDSIZE (512)
#define HEADERSIZE (2 * RECORDSIZE)

int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
{
char buffer[HEADERSIZE];
struct ustar_header *header = (struct ustar_header *)buffer;
char *content = buffer + RECORDSIZE;
ssize_t n;

if (argc != 1)
usage(builtin_get_tar_commit_id_usage);

n = read_in_full(0, buffer, HEADERSIZE);
if (n < HEADERSIZE)
die("git get-tar-commit-id: read error");
if (header->typeflag[0] != 'g')
return 1;
if (memcmp(content, "52 comment=", 11))
return 1;

n = write_in_full(1, content + 11, 41);
if (n < 41)
die_errno("git get-tar-commit-id: write error");

return 0;
}
Loading

0 comments on commit 577aed2

Please sign in to comment.