summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/asciidoc.conf1
-rw-r--r--Documentation/config.txt4
-rw-r--r--Documentation/git-submodule.txt5
-rw-r--r--Documentation/gittutorial.txt24
-rw-r--r--Makefile2
-rw-r--r--attr.c2
-rwxr-xr-xgit-request-pull.sh7
-rw-r--r--gitweb/README10
-rwxr-xr-xt/t5000-tar-tree.sh4
-rwxr-xr-xt/t7002-grep.sh30
10 files changed, 69 insertions, 20 deletions
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index dc76e7f..87a90f2 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -17,6 +17,7 @@ caret=^
startsb=[
endsb=]
tilde=~
+backtick=`
ifdef::backend-docbook[]
[linkgit-inlinemacro]
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 5dcad94..c06eca4 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -451,7 +451,9 @@ If the alias expansion is prefixed with an exclamation point,
it will be treated as a shell command. For example, defining
"alias.new = !gitk --all --not ORIG_HEAD", the invocation
"git new" is equivalent to running the shell command
-"gitk --all --not ORIG_HEAD".
+"gitk --all --not ORIG_HEAD". Note that shell commands will be
+executed from the top-level directory of a repository, which may
+not necessarily be the current directory.
apply.whitespace::
Tells 'git-apply' how to handle whitespaces, in the same way
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 3b8df44..15b34d3 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -137,8 +137,9 @@ foreach::
the processing to terminate. This can be overridden by adding '|| :'
to the end of the command.
+
-As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
-show the path and currently checked out commit for each submodule.
+As an example, +git submodule foreach \'echo $path {backtick}git
+rev-parse HEAD{backtick}'+ will show the path and currently checked out
+commit for each submodule.
sync::
Synchronizes submodules' remote URL configuration setting
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index c7fa949..cf0689c 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -332,11 +332,11 @@ alice$ git log -p HEAD..FETCH_HEAD
------------------------------------------------
This operation is safe even if Alice has uncommitted local changes.
-The range notation HEAD..FETCH_HEAD" means "show everything that is reachable
-from the FETCH_HEAD but exclude anything that is reachable from HEAD.
+The range notation "HEAD..FETCH_HEAD" means "show everything that is reachable
+from the FETCH_HEAD but exclude anything that is reachable from HEAD".
Alice already knows everything that leads to her current state (HEAD),
-and reviewing what Bob has in his state (FETCH_HEAD) that she has not
-seen with this command
+and reviews what Bob has in his state (FETCH_HEAD) that she has not
+seen with this command.
If Alice wants to visualize what Bob did since their histories forked
she can issue the following command:
@@ -375,9 +375,9 @@ it easier:
alice$ git remote add bob /home/bob/myrepo
------------------------------------------------
-With this, Alice can perform the first part of the "pull" operation alone using the
-'git-fetch' command without merging them with her own branch,
-using:
+With this, Alice can perform the first part of the "pull" operation
+alone using the 'git-fetch' command without merging them with her own
+branch, using:
-------------------------------------
alice$ git fetch bob
@@ -566,22 +566,22 @@ $ git log v2.5.. Makefile # commits since v2.5 which modify
You can also give 'git-log' a "range" of commits where the first is not
necessarily an ancestor of the second; for example, if the tips of
-the branches "stable-release" and "master" diverged from a common
+the branches "stable" and "master" diverged from a common
commit some time ago, then
-------------------------------------
-$ git log stable..experimental
+$ git log stable..master
-------------------------------------
-will list commits made in the experimental branch but not in the
+will list commits made in the master branch but not in the
stable branch, while
-------------------------------------
-$ git log experimental..stable
+$ git log master..stable
-------------------------------------
will show the list of commits made on the stable branch but not
-the experimental branch.
+the master branch.
The 'git-log' command has a weakness: it must present commits in a
list. When the history has lines of development that diverged and
diff --git a/Makefile b/Makefile
index d21b4eb..c6b81d0 100644
--- a/Makefile
+++ b/Makefile
@@ -1385,7 +1385,7 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
-$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
+$(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
builtin-revert.o wt-status.o: wt-status.h
$(LIB_FILE): $(LIB_OBJS)
diff --git a/attr.c b/attr.c
index f8f6faa..55bdb7c 100644
--- a/attr.c
+++ b/attr.c
@@ -555,6 +555,8 @@ static void prepare_attr_stack(const char *path, int dirlen)
}
}
+ strbuf_release(&pathbuf);
+
/*
* Finally push the "info" one at the top of the stack.
*/
diff --git a/git-request-pull.sh b/git-request-pull.sh
index a2cf5b8..5917773 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -12,6 +12,9 @@ OPTIONS_SPEC=
. git-sh-setup
. git-parse-remote
+GIT_PAGER=
+export GIT_PAGER
+
base=$1
url=$2
head=${3-HEAD}
@@ -34,7 +37,7 @@ branch=$(git ls-remote "$url" \
}")
if [ -z "$branch" ]; then
echo "warn: No branch of $url is at:" >&2
- git log --max-count=1 --pretty='format:warn: %h: %s' $headrev >&2
+ git log --max-count=1 --pretty='tformat:warn: %h: %s' $headrev >&2
echo "warn: Are you sure you pushed $head there?" >&2
echo >&2
echo >&2
@@ -42,8 +45,6 @@ if [ -z "$branch" ]; then
status=1
fi
-PAGER=
-export PAGER
echo "The following changes since commit $baserev:"
git shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/ \1/'
diff --git a/gitweb/README b/gitweb/README
index ccda890..9056d1e 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -377,7 +377,7 @@ named without a .git extension (e.g. /pub/git/project instead of
DocumentRoot /var/www/gitweb
- AliasMatch ^(/.*?)(\.git)(/.*)? /pub/git$1$3
+ AliasMatch ^(/.*?)(\.git)(/.*)?$ /pub/git$1$3
<Directory /var/www/gitweb>
Options ExecCGI
AddHandler cgi-script cgi
@@ -402,6 +402,14 @@ http://git.example.com/project
will provide human-friendly gitweb access.
+This solution is not 100% bulletproof, in the sense that if some project
+has a named ref (branch, tag) starting with 'git/', then paths such as
+
+http://git.example.com/project/command/abranch..git/abranch
+
+will fail with a 404 error.
+
+
Originally written by:
Kay Sievers <kay.sievers@vrfy.org>
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index abb41b0..5f84b18 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -94,6 +94,10 @@ test_expect_success 'git archive with --output' \
'git archive --output=b4.tar HEAD &&
test_cmp b.tar b4.tar'
+test_expect_success 'git archive --remote' \
+ 'git archive --remote=. HEAD >b5.tar &&
+ test_cmp b.tar b5.tar'
+
test_expect_success \
'validate file modification time' \
'mkdir extract &&
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index f275af8..7868af8 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -125,6 +125,36 @@ do
done
+cat >expected <<EOF
+file:foo mmap bar_mmap
+EOF
+
+test_expect_success 'grep -e A --and -e B' '
+ git grep -e "foo mmap" --and -e bar_mmap >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<EOF
+file:foo_mmap bar mmap
+file:foo_mmap bar mmap baz
+EOF
+
+
+test_expect_success 'grep ( -e A --or -e B ) --and -e B' '
+ git grep \( -e foo_ --or -e baz \) \
+ --and -e " mmap" >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<EOF
+file:foo mmap bar
+EOF
+
+test_expect_success 'grep -e A --and --not -e B' '
+ git grep -e "foo mmap" --and --not -e bar_mmap >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'log grep setup' '
echo a >>file &&
test_tick &&