mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Merge branch 'master' into next
* master: Make git-prune-packed a builtin git-annotate: remove extraneous debugging line Documentation: convert uses of git-link macro to gitlink git-push: remove obsolete git-push.sh git-push: allow -f as an alias for --force
This commit is contained in:
@@ -223,14 +223,14 @@ showbranch.default::
|
||||
See gitlink:git-show-branch[1].
|
||||
|
||||
tar.umask::
|
||||
By default, git-link:git-tar-tree[1] sets file and directories modes
|
||||
By default, gitlink:git-tar-tree[1] sets file and directories modes
|
||||
to 0666 or 0777. While this is both useful and acceptable for projects
|
||||
such as the Linux Kernel, it might be excessive for other projects.
|
||||
With this variable, it becomes possible to tell
|
||||
git-link:git-tar-tree[1] to apply a specific umask to the modes above.
|
||||
gitlink:git-tar-tree[1] to apply a specific umask to the modes above.
|
||||
The special value "user" indicates that the user's current umask will
|
||||
be used. This should be enough for most projects, as it will lead to
|
||||
the same permissions as git-link:git-checkout[1] would use. The default
|
||||
the same permissions as gitlink:git-checkout[1] would use. The default
|
||||
value remains 0, which means world read-write.
|
||||
|
||||
user.email::
|
||||
|
||||
@@ -116,7 +116,7 @@ file each time git-cvsimport is run.
|
||||
+
|
||||
It is not recommended to use this feature if you intend to
|
||||
export changes back to CVS again later with
|
||||
git-link[1]::git-cvsexportcommit.
|
||||
gitlink:git-cvsexportcommit[1].
|
||||
|
||||
OUTPUT
|
||||
------
|
||||
|
||||
@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
'git-push' [--all] [--tags] [--force] <repository> <refspec>...
|
||||
'git-push' [--all] [--tags] [-f | --force] <repository> <refspec>...
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
6
Makefile
6
Makefile
@@ -197,7 +197,7 @@ PROGRAMS = \
|
||||
git-hash-object$X git-index-pack$X git-local-fetch$X \
|
||||
git-merge-base$X \
|
||||
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
|
||||
git-peek-remote$X git-prune-packed$X git-receive-pack$X \
|
||||
git-peek-remote$X git-receive-pack$X \
|
||||
git-send-pack$X git-shell$X \
|
||||
git-show-index$X git-ssh-fetch$X \
|
||||
git-ssh-upload$X git-unpack-file$X \
|
||||
@@ -217,7 +217,7 @@ BUILT_INS = git-log$X git-whatchanged$X git-show$X git-update-ref$X \
|
||||
git-read-tree$X git-commit-tree$X git-write-tree$X \
|
||||
git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
|
||||
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
|
||||
git-fmt-merge-msg$X git-prune$X git-mv$X
|
||||
git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X
|
||||
|
||||
# what 'all' will build and 'install' will install, in gitexecdir
|
||||
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
|
||||
@@ -274,7 +274,7 @@ BUILTIN_OBJS = \
|
||||
builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
|
||||
builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
|
||||
builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o \
|
||||
builtin-mv.o
|
||||
builtin-mv.o builtin-prune-packed.o
|
||||
|
||||
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
|
||||
EXTLIBS = -lz
|
||||
|
||||
@@ -54,12 +54,10 @@ static void prune_packed_objects(void)
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cmd_prune_packed(int argc, char **argv, const char *prefix)
|
||||
{
|
||||
int i;
|
||||
|
||||
setup_git_directory();
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
const char *arg = argv[i];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#define MAX_URI (16)
|
||||
|
||||
static const char push_usage[] = "git push [--all] [--tags] [--force] <repository> [<refspec>...]";
|
||||
static const char push_usage[] = "git push [--all] [--tags] [-f | --force] <repository> [<refspec>...]";
|
||||
|
||||
static int all = 0, tags = 0, force = 0, thin = 1;
|
||||
static const char *execute = NULL;
|
||||
@@ -291,7 +291,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
|
||||
tags = 1;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(arg, "--force")) {
|
||||
if (!strcmp(arg, "--force") || !strcmp(arg, "-f")) {
|
||||
force = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ extern int cmd_format_patch(int argc, const char **argv, const char *prefix);
|
||||
extern int cmd_count_objects(int argc, const char **argv, const char *prefix);
|
||||
|
||||
extern int cmd_prune(int argc, const char **argv, const char *prefix);
|
||||
extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
|
||||
|
||||
extern int cmd_push(int argc, const char **argv, const char *prefix);
|
||||
extern int cmd_grep(int argc, const char **argv, const char *prefix);
|
||||
|
||||
@@ -309,7 +309,6 @@ sub _git_diff_parse {
|
||||
|
||||
$gotheader = 1;
|
||||
|
||||
printf("Copying from %d to %d\n", $ri, $remstart);
|
||||
foreach my $parent (@$parents) {
|
||||
for (my $i = $ri; $i < $remstart; $i++) {
|
||||
$plines{$parent}[$pi{$parent}++] = $slines->[$i];
|
||||
|
||||
87
git-push.sh
87
git-push.sh
@@ -1,87 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
USAGE='[--all] [--tags] [--force] <repository> [<refspec>...]'
|
||||
. git-sh-setup
|
||||
|
||||
# Parse out parameters and then stop at remote, so that we can
|
||||
# translate it using .git/branches information
|
||||
has_all=
|
||||
has_force=
|
||||
has_exec=
|
||||
has_thin=--thin
|
||||
remote=
|
||||
do_tags=
|
||||
|
||||
while case "$#" in 0) break ;; esac
|
||||
do
|
||||
case "$1" in
|
||||
--all)
|
||||
has_all=--all ;;
|
||||
--tags)
|
||||
do_tags=yes ;;
|
||||
--force)
|
||||
has_force=--force ;;
|
||||
--exec=*)
|
||||
has_exec="$1" ;;
|
||||
--thin)
|
||||
;; # noop
|
||||
--no-thin)
|
||||
has_thin= ;;
|
||||
-*)
|
||||
usage ;;
|
||||
*)
|
||||
set x "$@"
|
||||
shift
|
||||
break ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
case "$#" in
|
||||
0)
|
||||
echo "Where would you want to push today?"
|
||||
usage ;;
|
||||
esac
|
||||
|
||||
. git-parse-remote
|
||||
remote=$(get_remote_url "$@")
|
||||
|
||||
case "$has_all" in
|
||||
--all)
|
||||
set x ;;
|
||||
'')
|
||||
case "$do_tags,$#" in
|
||||
yes,1)
|
||||
set x $(cd "$GIT_DIR/refs" && find tags -type f -print) ;;
|
||||
yes,*)
|
||||
set x $(cd "$GIT_DIR/refs" && find tags -type f -print) \
|
||||
$(get_remote_refs_for_push "$@") ;;
|
||||
,*)
|
||||
set x $(get_remote_refs_for_push "$@") ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
shift ;# away the initial 'x'
|
||||
|
||||
# $# is now 0 if there was no explicit refspec on the command line
|
||||
# and there was no default refspec to push from remotes/ file.
|
||||
# we will let git-send-pack to do its "matching refs" thing.
|
||||
|
||||
case "$remote" in
|
||||
git://*)
|
||||
die "Cannot use READ-ONLY transport to push to $remote" ;;
|
||||
rsync://*)
|
||||
die "Pushing with rsync transport is deprecated" ;;
|
||||
esac
|
||||
|
||||
set x "$remote" "$@"; shift
|
||||
test "$has_all" && set x "$has_all" "$@" && shift
|
||||
test "$has_force" && set x "$has_force" "$@" && shift
|
||||
test "$has_exec" && set x "$has_exec" "$@" && shift
|
||||
test "$has_thin" && set x "$has_thin" "$@" && shift
|
||||
|
||||
case "$remote" in
|
||||
http://* | https://*)
|
||||
exec git-http-push "$@";;
|
||||
*)
|
||||
exec git-send-pack "$@";;
|
||||
esac
|
||||
1
git.c
1
git.c
@@ -263,6 +263,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
|
||||
{ "fmt-merge-msg", cmd_fmt_merge_msg, NEEDS_PREFIX },
|
||||
{ "prune", cmd_prune, NEEDS_PREFIX },
|
||||
{ "mv", cmd_mv, NEEDS_PREFIX },
|
||||
{ "prune-packed", cmd_prune_packed, NEEDS_PREFIX },
|
||||
};
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user