Browse Source
This merges commitmaintc35a7b8d80
from master into our head commitedee414c3e
Sincerely, jit-merge command.
Junio C Hamano
20 years ago
30 changed files with 516 additions and 120 deletions
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
git-commit-script(1) |
||||
==================== |
||||
v0.99.4, Aug 2005 |
||||
|
||||
NAME |
||||
---- |
||||
git-commit-script - Record your changes |
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
'git commit' [-a] [(-c | -C) <commit> | -F <file> | -m <msg>] <file>... |
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Updates the index file for given paths, or all modified files if |
||||
'-a' is specified, and makes a commit object. The command |
||||
VISUAL and EDITOR environment variables to edit the commit log |
||||
message. |
||||
|
||||
OPTIONS |
||||
------- |
||||
-a:: |
||||
Update all paths in the index file. |
||||
|
||||
-c or -C <commit>:: |
||||
Take existing commit object, and reuse the log message |
||||
and the authorship information (including the timestamp) |
||||
when creating the commit. With '-C', the editor is not |
||||
invoked; with '-c' the user can further edit the commit |
||||
message. |
||||
|
||||
-F <file>:: |
||||
Take the commit message from the given file. Use '-' to |
||||
read the message from the standard input. |
||||
|
||||
-m <msg>:: |
||||
Use the given <msg> as the commit message. |
||||
|
||||
<file>...:: |
||||
Update specified paths in the index file. |
||||
|
||||
|
||||
Author |
||||
------ |
||||
Written by Linus Torvalds <torvalds@osdl.org> |
||||
|
||||
GIT |
||||
--- |
||||
Part of the link:git.html[git] suite |
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
git-ls-remote-script(1) |
||||
======================= |
||||
v0.1, May 2005 |
||||
|
||||
NAME |
||||
---- |
||||
git-ls-remote-script - Look at references other repository has. |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
'git-ls-remote' [--heads] [--tags] <repository> <refs>... |
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Displays the references other repository has. |
||||
|
||||
|
||||
OPTIONS |
||||
------- |
||||
--heads --tags:: |
||||
Limit to only refs/heads and refs/tags, respectively. |
||||
These options are _not_ mutually exclusive; when given |
||||
both, references stored in refs/heads and refs/tags are |
||||
displayed. |
||||
|
||||
<repository>:: |
||||
Location of the repository. The shorthand defined in |
||||
$GIT_DIR/branches/ can be used. |
||||
|
||||
<refs>...:: |
||||
When unspecified, all references, after filtering done |
||||
with --heads and --tags, are shown. When <refs>... are |
||||
specified, only references matching the given patterns |
||||
are displayed. |
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
$ git ls-remote --tags ./. |
||||
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99 |
||||
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1 |
||||
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3 |
||||
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2 |
||||
0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub |
||||
$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc |
||||
5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master |
||||
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu |
||||
b1d096f2926c4e37c9c0b6a7bf2119bedaa277cb refs/heads/rc |
||||
$ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public |
||||
$ git ls-remote --tags public v\* |
||||
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99 |
||||
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1 |
||||
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2 |
||||
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3 |
||||
|
||||
Author |
||||
------ |
||||
Written by Junio C Hamano <junkio@cox.net> |
||||
|
||||
GIT |
||||
--- |
||||
Part of the link:git.html[git] suite |
||||
|
@ -1,3 +1,64 @@
@@ -1,3 +1,64 @@
|
||||
#!/bin/sh |
||||
. git-sh-setup-script || die "Not a git archive" |
||||
git-send-pack "$@" |
||||
|
||||
# Parse out parameters and then stop at remote, so that we can |
||||
# translate it using .git/branches information |
||||
has_all= |
||||
has_force= |
||||
has_exec= |
||||
remote= |
||||
|
||||
while case "$#" in 0) break ;; esac |
||||
do |
||||
case "$1" in |
||||
--all) |
||||
has_all=--all ;; |
||||
--force) |
||||
has_force=--force ;; |
||||
--exec=*) |
||||
has_exec="$1" ;; |
||||
-*) |
||||
die "Unknown parameter $1" ;; |
||||
*) |
||||
remote="$1" |
||||
shift |
||||
set x "$@" |
||||
shift |
||||
break ;; |
||||
esac |
||||
shift |
||||
done |
||||
|
||||
case "$remote" in |
||||
*:* | /* | ../* | ./* ) |
||||
# An URL, host:/path/to/git, absolute and relative paths. |
||||
;; |
||||
* ) |
||||
# Shorthand |
||||
if expr "$remote" : '..*/..*' >/dev/null |
||||
then |
||||
# a short-hand followed by a trailing path |
||||
shorthand=$(expr "$remote" : '\([^/]*\)') |
||||
remainder=$(expr "$remote" : '[^/]*\(/.*\)$') |
||||
else |
||||
shorthand="$remote" |
||||
remainder= |
||||
fi |
||||
remote=$(sed -e 's/#.*//' "$GIT_DIR/branches/$remote") && |
||||
expr "$remote" : '..*:' >/dev/null && |
||||
remote="$remote$remainder" || |
||||
die "Cannot parse remote $remote" |
||||
;; |
||||
esac |
||||
|
||||
case "$remote" in |
||||
http://* | https://* | git://* | rsync://* ) |
||||
die "Cannot push to $remote" ;; |
||||
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 |
||||
|
||||
exec git-send-pack "$@" |
||||
|
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh |
||||
. git-sh-setup-script || die "Not a git archive" |
||||
|
||||
# We want a clean tree and clean index to be able to revert. |
||||
status=$(git status) |
||||
case "$status" in |
||||
'nothing to commit') ;; |
||||
*) |
||||
echo "$status" |
||||
die "Your working tree is dirty; cannot revert a previous patch." ;; |
||||
esac |
||||
|
||||
rev=$(git-rev-parse --no-flags --verify --revs-only "$@") && |
||||
commit=$(git-rev-parse --verify "$rev^0") || exit |
||||
if git-diff-tree -R -M -p $commit | git-apply --index && |
||||
msg=$(git-rev-list --pretty=oneline --max-count=1 $commit) |
||||
then |
||||
{ |
||||
echo "$msg" | sed -e ' |
||||
s/^[^ ]* /Revert "/ |
||||
s/$/"/' |
||||
echo |
||||
echo "This reverts $commit commit." |
||||
test "$rev" = "$commit" || |
||||
echo "(original 'git revert' arguments: $@)" |
||||
} | git commit -F - |
||||
else |
||||
# Now why did it fail? |
||||
parents=`git-cat-file commit "$commit" 2>/dev/null | |
||||
sed -ne '/^$/q;/^parent /p' | |
||||
wc -l` |
||||
case $parents in |
||||
0) die "Cannot revert the root commit nor non commit-ish." ;; |
||||
1) die "The patch does not apply." ;; |
||||
*) die "Cannot revert a merge commit." ;; |
||||
esac |
||||
fi |
Loading…
Reference in new issue