зеркало из https://github.com/microsoft/git.git
Merge branch 'maint'
* maint: attr: plug minor memory leak request-pull: really disable pager Makes some cleanup/review in gittutorial Makefile: git.o depends on library headers git-submodule documentation: fix foreach example
This commit is contained in:
Коммит
725cf7b45d
|
@ -17,6 +17,7 @@ caret=^
|
||||||
startsb=[
|
startsb=[
|
||||||
endsb=]
|
endsb=]
|
||||||
tilde=~
|
tilde=~
|
||||||
|
backtick=`
|
||||||
|
|
||||||
ifdef::backend-docbook[]
|
ifdef::backend-docbook[]
|
||||||
[linkgit-inlinemacro]
|
[linkgit-inlinemacro]
|
||||||
|
|
|
@ -141,8 +141,9 @@ foreach::
|
||||||
the processing to terminate. This can be overridden by adding '|| :'
|
the processing to terminate. This can be overridden by adding '|| :'
|
||||||
to the end of the command.
|
to the end of the command.
|
||||||
+
|
+
|
||||||
As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
|
As an example, +git submodule foreach \'echo $path {backtick}git
|
||||||
show the path and currently checked out commit for each submodule.
|
rev-parse HEAD{backtick}'+ will show the path and currently checked out
|
||||||
|
commit for each submodule.
|
||||||
|
|
||||||
sync::
|
sync::
|
||||||
Synchronizes submodules' remote URL configuration setting
|
Synchronizes submodules' remote URL configuration setting
|
||||||
|
|
|
@ -332,11 +332,11 @@ alice$ git log -p HEAD..FETCH_HEAD
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
This operation is safe even if Alice has uncommitted local changes.
|
This operation is safe even if Alice has uncommitted local changes.
|
||||||
The range notation HEAD..FETCH_HEAD" means "show everything that is reachable
|
The range notation "HEAD..FETCH_HEAD" means "show everything that is reachable
|
||||||
from the FETCH_HEAD but exclude anything that is reachable from HEAD.
|
from the FETCH_HEAD but exclude anything that is reachable from HEAD".
|
||||||
Alice already knows everything that leads to her current state (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
|
and reviews what Bob has in his state (FETCH_HEAD) that she has not
|
||||||
seen with this command
|
seen with this command.
|
||||||
|
|
||||||
If Alice wants to visualize what Bob did since their histories forked
|
If Alice wants to visualize what Bob did since their histories forked
|
||||||
she can issue the following command:
|
she can issue the following command:
|
||||||
|
@ -375,9 +375,9 @@ it easier:
|
||||||
alice$ git remote add bob /home/bob/myrepo
|
alice$ git remote add bob /home/bob/myrepo
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
With this, Alice can perform the first part of the "pull" operation alone using the
|
With this, Alice can perform the first part of the "pull" operation
|
||||||
'git-fetch' command without merging them with her own branch,
|
alone using the 'git-fetch' command without merging them with her own
|
||||||
using:
|
branch, using:
|
||||||
|
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
alice$ git fetch bob
|
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
|
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
|
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
|
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
|
stable branch, while
|
||||||
|
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
$ git log experimental..stable
|
$ git log master..stable
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
will show the list of commits made on the stable branch but not
|
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
|
The 'git-log' command has a weakness: it must present commits in a
|
||||||
list. When the history has lines of development that diverged and
|
list. When the history has lines of development that diverged and
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1464,7 +1464,7 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
|
||||||
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
|
||||||
|
|
||||||
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
|
$(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
|
builtin-revert.o wt-status.o: wt-status.h
|
||||||
|
|
||||||
$(LIB_FILE): $(LIB_OBJS)
|
$(LIB_FILE): $(LIB_OBJS)
|
||||||
|
|
2
attr.c
2
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.
|
* Finally push the "info" one at the top of the stack.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,8 +42,8 @@ if [ -z "$branch" ]; then
|
||||||
status=1
|
status=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PAGER=
|
GIT_PAGER=
|
||||||
export PAGER
|
export GIT_PAGER
|
||||||
echo "The following changes since commit $baserev:"
|
echo "The following changes since commit $baserev:"
|
||||||
git shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/ \1/'
|
git shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/ \1/'
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче