зеркало из https://github.com/microsoft/git.git
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"
This commit is contained in:
Коммит
577aed296a
|
@ -76,7 +76,6 @@
|
|||
/git-init-db
|
||||
/git-instaweb
|
||||
/git-log
|
||||
/git-lost-found
|
||||
/git-ls-files
|
||||
/git-ls-remote
|
||||
/git-ls-tree
|
||||
|
@ -106,7 +105,6 @@
|
|||
/git-pack-refs
|
||||
/git-parse-remote
|
||||
/git-patch-id
|
||||
/git-peek-remote
|
||||
/git-prune
|
||||
/git-prune-packed
|
||||
/git-pull
|
||||
|
@ -132,7 +130,6 @@
|
|||
/git-remote-testsvn
|
||||
/git-repack
|
||||
/git-replace
|
||||
/git-repo-config
|
||||
/git-request-pull
|
||||
/git-rerere
|
||||
/git-reset
|
||||
|
@ -160,7 +157,6 @@
|
|||
/git-svn
|
||||
/git-symbolic-ref
|
||||
/git-tag
|
||||
/git-tar-tree
|
||||
/git-unpack-file
|
||||
/git-unpack-objects
|
||||
/git-update-index
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
git-lost-found(1)
|
||||
=================
|
||||
|
||||
NAME
|
||||
----
|
||||
git-lost-found - Recover lost refs that luckily have not yet been pruned
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git lost-found'
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
*NOTE*: this command is deprecated. Use linkgit:git-fsck[1] with
|
||||
the option '--lost-found' instead.
|
||||
|
||||
Finds dangling commits and tags from the object database, and
|
||||
creates refs to them in the .git/lost-found/ directory. Commits and
|
||||
tags that dereference to commits are stored in .git/lost-found/commit,
|
||||
and other objects are stored in .git/lost-found/other.
|
||||
|
||||
|
||||
OUTPUT
|
||||
------
|
||||
Prints to standard output the object names and one-line descriptions
|
||||
of any commits or tags found.
|
||||
|
||||
EXAMPLE
|
||||
-------
|
||||
|
||||
Suppose you run 'git tag -f' and mistype the tag to overwrite.
|
||||
The ref to your tag is overwritten, but until you run 'git
|
||||
prune', the tag itself is still there.
|
||||
|
||||
------------
|
||||
$ git lost-found
|
||||
[1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c
|
||||
...
|
||||
------------
|
||||
|
||||
Also you can use gitk to browse how any tags found relate to each
|
||||
other.
|
||||
|
||||
------------
|
||||
$ gitk $(cd .git/lost-found/commit && echo ??*)
|
||||
------------
|
||||
|
||||
After making sure you know which the object is the tag you are looking
|
||||
for, you can reconnect it to your regular `refs` hierarchy by using
|
||||
the `update-ref` command.
|
||||
|
||||
------------
|
||||
$ git cat-file -t 1ef2b196
|
||||
tag
|
||||
$ git cat-file tag 1ef2b196
|
||||
object fa41bbce8e38c67a218415de6cfa510c7e50032a
|
||||
type commit
|
||||
tag v0.99.9c
|
||||
tagger Junio C Hamano <junkio@cox.net> 1131059594 -0800
|
||||
|
||||
GIT 0.99.9c
|
||||
|
||||
This contains the following changes from the "master" branch, since
|
||||
...
|
||||
$ git update-ref refs/tags/not-lost-anymore 1ef2b196
|
||||
$ git rev-parse not-lost-anymore
|
||||
1ef2b196d909eed523d4f3c9bf54b78cdd6843c6
|
||||
------------
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
|
@ -1,43 +0,0 @@
|
|||
git-peek-remote(1)
|
||||
==================
|
||||
|
||||
NAME
|
||||
----
|
||||
git-peek-remote - List the references in a remote repository
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This command is deprecated; use 'git ls-remote' instead.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
--upload-pack=<git-upload-pack>::
|
||||
Use this to specify the path to 'git-upload-pack' on the
|
||||
remote side, if it is not found on your $PATH. Some
|
||||
installations of sshd ignores the user's environment
|
||||
setup scripts for login shells (e.g. .bash_profile) and
|
||||
your privately installed git may not be found on the system
|
||||
default $PATH. Another workaround suggested is to set
|
||||
up your $PATH in ".bashrc", but this flag is for people
|
||||
who do not want to pay the overhead for non-interactive
|
||||
shells, but prefer having a lean .bashrc file (they set most of
|
||||
the things up in .bash_profile).
|
||||
|
||||
<host>::
|
||||
A remote host that houses the repository. When this
|
||||
part is specified, 'git-upload-pack' is invoked via
|
||||
ssh.
|
||||
|
||||
<directory>::
|
||||
The repository to sync from.
|
||||
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
|
@ -1,23 +0,0 @@
|
|||
git-repo-config(1)
|
||||
==================
|
||||
|
||||
NAME
|
||||
----
|
||||
git-repo-config - Get and set repository or global options
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git repo-config' ...
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
This is a synonym for linkgit:git-config[1]. Please refer to the
|
||||
documentation of that command.
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
|
@ -1,82 +0,0 @@
|
|||
git-tar-tree(1)
|
||||
===============
|
||||
|
||||
NAME
|
||||
----
|
||||
git-tar-tree - Create a tar archive of the files in the named tree object
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git tar-tree' [--remote=<repo>] <tree-ish> [ <base> ]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
THIS COMMAND IS DEPRECATED. Use 'git archive' with `--format=tar`
|
||||
option instead (and move the <base> argument to `--prefix=base/`).
|
||||
|
||||
Creates a tar archive containing the tree structure for the named tree.
|
||||
When <base> is specified it is added as a leading path to the files in the
|
||||
generated tar archive.
|
||||
|
||||
'git tar-tree' behaves differently when given a tree ID versus when given
|
||||
a commit ID or tag ID. In the first case the current time is used as
|
||||
modification time of each file in the archive. In the latter case the
|
||||
commit time as recorded in the referenced commit object is used instead.
|
||||
Additionally the commit ID is stored in a global extended pax header.
|
||||
It can be extracted using 'git get-tar-commit-id'.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
<tree-ish>::
|
||||
The tree or commit to produce tar archive for. If it is
|
||||
the object name of a commit object.
|
||||
|
||||
<base>::
|
||||
Leading path to the files in the resulting tar archive.
|
||||
|
||||
--remote=<repo>::
|
||||
Instead of making a tar archive from local repository,
|
||||
retrieve a tar archive from a remote repository.
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
tar.umask::
|
||||
This variable can be used to restrict the permission bits of
|
||||
tar archive entries. The default is 0002, which turns off the
|
||||
world write bit. The special value "user" indicates that the
|
||||
archiving user's umask will be used instead. See umask(2) for
|
||||
details.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
`git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)`::
|
||||
|
||||
Create a tar archive that contains the contents of the
|
||||
latest commit on the current branch, and extracts it in
|
||||
`/var/tmp/junk` directory.
|
||||
|
||||
`git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz`::
|
||||
|
||||
Create a tarball for v1.4.0 release.
|
||||
|
||||
`git tar-tree v1.4.0^{tree} git-1.4.0 | gzip >git-1.4.0.tar.gz`::
|
||||
|
||||
Create a tarball for v1.4.0 release, but without a
|
||||
global extended pax header.
|
||||
|
||||
`git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar`::
|
||||
|
||||
Get a tarball v1.4.0 from example.com.
|
||||
|
||||
`git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar`::
|
||||
|
||||
Put everything in the current head's Documentation/ directory
|
||||
into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'.
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
6
Makefile
6
Makefile
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2006 Rene Scharfe
|
||||
*/
|
||||
#include "cache.h"
|
||||
#include "commit.h"
|
||||
#include "tar.h"
|
||||
#include "builtin.h"
|
||||
#include "quote.h"
|
||||
|
||||
static const char tar_tree_usage[] =
|
||||
"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
|
||||
"*** Note that this command is now deprecated; use \"git archive\" instead.";
|
||||
|
||||
static const char builtin_get_tar_commit_id_usage[] =
|
||||
"git get-tar-commit-id < <tarfile>";
|
||||
|
||||
int cmd_tar_tree(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
/*
|
||||
* "git tar-tree" is now a wrapper around "git archive --format=tar"
|
||||
*
|
||||
* $0 --remote=<repo> arg... ==>
|
||||
* git archive --format=tar --remote=<repo> arg...
|
||||
* $0 tree-ish ==>
|
||||
* git archive --format=tar tree-ish
|
||||
* $0 tree-ish basedir ==>
|
||||
* git archive --format-tar --prefix=basedir tree-ish
|
||||
*/
|
||||
const char **nargv = xcalloc(sizeof(*nargv), argc + 3);
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
char *basedir_arg;
|
||||
int nargc = 0;
|
||||
|
||||
nargv[nargc++] = "archive";
|
||||
nargv[nargc++] = "--format=tar";
|
||||
|
||||
if (2 <= argc && !prefixcmp(argv[1], "--remote=")) {
|
||||
nargv[nargc++] = argv[1];
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Because it's just a compatibility wrapper, tar-tree supports only
|
||||
* the old behaviour of reading attributes from the work tree.
|
||||
*/
|
||||
nargv[nargc++] = "--worktree-attributes";
|
||||
|
||||
switch (argc) {
|
||||
default:
|
||||
usage(tar_tree_usage);
|
||||
break;
|
||||
case 3:
|
||||
/* base-path */
|
||||
basedir_arg = xmalloc(strlen(argv[2]) + 11);
|
||||
sprintf(basedir_arg, "--prefix=%s/", argv[2]);
|
||||
nargv[nargc++] = basedir_arg;
|
||||
/* fallthru */
|
||||
case 2:
|
||||
/* tree-ish */
|
||||
nargv[nargc++] = argv[1];
|
||||
}
|
||||
nargv[nargc] = NULL;
|
||||
|
||||
fprintf(stderr,
|
||||
"*** \"git tar-tree\" is now deprecated.\n"
|
||||
"*** Running \"git archive\" instead.\n***");
|
||||
sq_quote_argv(&sb, nargv, 0);
|
||||
strbuf_addch(&sb, '\n');
|
||||
fputs(sb.buf, stderr);
|
||||
strbuf_release(&sb);
|
||||
return cmd_archive(nargc, nargv, prefix);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
|
@ -64,7 +64,6 @@ git-init mainporcelain common
|
|||
git-instaweb ancillaryinterrogators
|
||||
gitk mainporcelain
|
||||
git-log mainporcelain common
|
||||
git-lost-found ancillarymanipulators deprecated
|
||||
git-ls-files plumbinginterrogators
|
||||
git-ls-remote plumbinginterrogators
|
||||
git-ls-tree plumbinginterrogators
|
||||
|
@ -88,7 +87,6 @@ git-pack-redundant plumbinginterrogators
|
|||
git-pack-refs ancillarymanipulators
|
||||
git-parse-remote synchelpers
|
||||
git-patch-id purehelpers
|
||||
git-peek-remote purehelpers deprecated
|
||||
git-prune ancillarymanipulators
|
||||
git-prune-packed plumbingmanipulators
|
||||
git-pull mainporcelain common
|
||||
|
@ -102,7 +100,6 @@ git-relink ancillarymanipulators
|
|||
git-remote ancillarymanipulators
|
||||
git-repack ancillarymanipulators
|
||||
git-replace ancillarymanipulators
|
||||
git-repo-config ancillarymanipulators deprecated
|
||||
git-request-pull foreignscminterface
|
||||
git-rerere ancillaryinterrogators
|
||||
git-reset mainporcelain common
|
||||
|
@ -127,7 +124,6 @@ git-submodule mainporcelain
|
|||
git-svn foreignscminterface
|
||||
git-symbolic-ref plumbingmanipulators
|
||||
git-tag mainporcelain common
|
||||
git-tar-tree plumbinginterrogators deprecated
|
||||
git-unpack-file plumbinginterrogators
|
||||
git-unpack-objects plumbingmanipulators
|
||||
git-update-index plumbingmanipulators
|
||||
|
|
|
@ -673,7 +673,6 @@ __git_list_porcelain_commands ()
|
|||
index-pack) : plumbing;;
|
||||
init-db) : deprecated;;
|
||||
local-fetch) : plumbing;;
|
||||
lost-found) : infrequent;;
|
||||
ls-files) : plumbing;;
|
||||
ls-remote) : plumbing;;
|
||||
ls-tree) : plumbing;;
|
||||
|
@ -687,14 +686,12 @@ __git_list_porcelain_commands ()
|
|||
pack-refs) : plumbing;;
|
||||
parse-remote) : plumbing;;
|
||||
patch-id) : plumbing;;
|
||||
peek-remote) : plumbing;;
|
||||
prune) : plumbing;;
|
||||
prune-packed) : plumbing;;
|
||||
quiltimport) : import;;
|
||||
read-tree) : plumbing;;
|
||||
receive-pack) : plumbing;;
|
||||
remote-*) : transport;;
|
||||
repo-config) : deprecated;;
|
||||
rerere) : plumbing;;
|
||||
rev-list) : plumbing;;
|
||||
rev-parse) : plumbing;;
|
||||
|
@ -707,7 +704,6 @@ __git_list_porcelain_commands ()
|
|||
ssh-*) : transport;;
|
||||
stripspace) : plumbing;;
|
||||
symbolic-ref) : plumbing;;
|
||||
tar-tree) : deprecated;;
|
||||
unpack-file) : plumbing;;
|
||||
unpack-objects) : plumbing;;
|
||||
update-index) : plumbing;;
|
||||
|
|
|
@ -9,12 +9,12 @@ case "$0" in
|
|||
*whatchanged)
|
||||
count=
|
||||
test -z "$diff_tree_flags" &&
|
||||
diff_tree_flags=$(git-repo-config --get whatchanged.difftree)
|
||||
diff_tree_flags=$(git config --get whatchanged.difftree)
|
||||
diff_tree_default_flags='-c -M --abbrev' ;;
|
||||
*show)
|
||||
count=-n1
|
||||
test -z "$diff_tree_flags" &&
|
||||
diff_tree_flags=$(git-repo-config --get show.difftree)
|
||||
diff_tree_flags=$(git config --get show.difftree)
|
||||
diff_tree_default_flags='--cc --always' ;;
|
||||
esac
|
||||
test -z "$diff_tree_flags" &&
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
USAGE=''
|
||||
SUBDIRECTORY_OK='Yes'
|
||||
OPTIONS_SPEC=
|
||||
. git-sh-setup
|
||||
|
||||
echo "WARNING: '$0' is deprecated in favor of 'git fsck --lost-found'" >&2
|
||||
|
||||
if [ "$#" != "0" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
laf="$GIT_DIR/lost-found"
|
||||
rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit
|
||||
|
||||
git fsck --full --no-reflogs |
|
||||
while read dangling type sha1
|
||||
do
|
||||
case "$dangling" in
|
||||
dangling)
|
||||
if git rev-parse -q --verify "$sha1^0" >/dev/null
|
||||
then
|
||||
dir="$laf/commit"
|
||||
git show-branch "$sha1"
|
||||
else
|
||||
dir="$laf/other"
|
||||
fi
|
||||
echo "$sha1" >"$dir/$sha1"
|
||||
;;
|
||||
esac
|
||||
done
|
3
git.c
3
git.c
|
@ -408,7 +408,6 @@ static void handle_internal_command(int argc, const char **argv)
|
|||
{ "pack-redundant", cmd_pack_redundant, RUN_SETUP },
|
||||
{ "pack-refs", cmd_pack_refs, RUN_SETUP },
|
||||
{ "patch-id", cmd_patch_id },
|
||||
{ "peek-remote", cmd_ls_remote, RUN_SETUP_GENTLY },
|
||||
{ "pickaxe", cmd_blame, RUN_SETUP },
|
||||
{ "prune", cmd_prune, RUN_SETUP },
|
||||
{ "prune-packed", cmd_prune_packed, RUN_SETUP },
|
||||
|
@ -421,7 +420,6 @@ static void handle_internal_command(int argc, const char **argv)
|
|||
{ "remote-fd", cmd_remote_fd },
|
||||
{ "repack", cmd_repack, RUN_SETUP },
|
||||
{ "replace", cmd_replace, RUN_SETUP },
|
||||
{ "repo-config", cmd_repo_config, RUN_SETUP_GENTLY },
|
||||
{ "rerere", cmd_rerere, RUN_SETUP },
|
||||
{ "reset", cmd_reset, RUN_SETUP },
|
||||
{ "rev-list", cmd_rev_list, RUN_SETUP },
|
||||
|
@ -438,7 +436,6 @@ static void handle_internal_command(int argc, const char **argv)
|
|||
{ "stripspace", cmd_stripspace },
|
||||
{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
|
||||
{ "tag", cmd_tag, RUN_SETUP },
|
||||
{ "tar-tree", cmd_tar_tree },
|
||||
{ "unpack-file", cmd_unpack_file, RUN_SETUP },
|
||||
{ "unpack-objects", cmd_unpack_objects, RUN_SETUP },
|
||||
{ "update-index", cmd_update_index, RUN_SETUP },
|
||||
|
|
|
@ -48,12 +48,12 @@ test_expect_success 'apply in reverse' '
|
|||
|
||||
test_expect_success 'setup separate repository lacking postimage' '
|
||||
|
||||
git tar-tree initial initial | $TAR xf - &&
|
||||
git archive --format=tar --prefix=initial/ initial | $TAR xf - &&
|
||||
(
|
||||
cd initial && git init && git add .
|
||||
) &&
|
||||
|
||||
git tar-tree second second | $TAR xf - &&
|
||||
git archive --format=tar --prefix=second/ second | $TAR xf - &&
|
||||
(
|
||||
cd second && git init && git add .
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2005 Rene Scharfe
|
||||
#
|
||||
|
||||
test_description='git tar-tree and git get-tar-commit-id test
|
||||
test_description='git archive and git get-tar-commit-id test
|
||||
|
||||
This test covers the topics of file contents, commit date handling and
|
||||
commit id embedding:
|
||||
|
@ -13,11 +13,11 @@ commit id embedding:
|
|||
binary file (/bin/sh). Only paths shorter than 99 characters are
|
||||
used.
|
||||
|
||||
git tar-tree applies the commit date to every file in the archive it
|
||||
git archive applies the commit date to every file in the archive it
|
||||
creates. The test sets the commit date to a specific value and checks
|
||||
if the tar archive contains that value.
|
||||
|
||||
When giving git tar-tree a commit id (in contrast to a tree id) it
|
||||
When giving git archive a commit id (in contrast to a tree id) it
|
||||
embeds this commit id into the tar archive as a comment. The test
|
||||
checks the ability of git get-tar-commit-id to figure it out from the
|
||||
tar file.
|
||||
|
@ -196,16 +196,6 @@ test_expect_success \
|
|||
'git get-tar-commit-id <b.tar >b.commitid &&
|
||||
test_cmp .git/$(git symbolic-ref HEAD) b.commitid'
|
||||
|
||||
test_expect_success 'git tar-tree' '
|
||||
git tar-tree HEAD >tar-tree.tar &&
|
||||
test_cmp b.tar tar-tree.tar
|
||||
'
|
||||
|
||||
test_expect_success 'git tar-tree with prefix' '
|
||||
git tar-tree HEAD prefix >tar-tree_with_prefix.tar &&
|
||||
test_cmp with_prefix.tar tar-tree_with_prefix.tar
|
||||
'
|
||||
|
||||
test_expect_success 'git archive with --output, override inferred format' '
|
||||
git archive --format=tar --output=d4.zip HEAD &&
|
||||
test_cmp b.tar d4.zip
|
||||
|
|
|
@ -87,14 +87,4 @@ test_expect_success 'export-subst' '
|
|||
test_cmp substfile2 archive/substfile2
|
||||
'
|
||||
|
||||
test_expect_success 'git tar-tree vs. git archive with worktree attributes' '
|
||||
git tar-tree HEAD >tar-tree.tar &&
|
||||
test_cmp worktree.tar tar-tree.tar
|
||||
'
|
||||
|
||||
test_expect_success 'git tar-tree vs. git archive with worktree attrs, bare' '
|
||||
(cd bare && git tar-tree HEAD) >bare-tar-tree.tar &&
|
||||
test_cmp bare-worktree.tar bare-tar-tree.tar
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
Загрузка…
Ссылка в новой задаче