Merge branch 'maint'

* maint:
  Documentation/git-reset.txt: suggest git commit --amend in example.
  Build RPM with ETC_GITCONFIG=/etc/gitconfig
  Ignore all man sections as they are generated files.
  Fix typo in git-am: s/Was is/Was it/
  Reverse the order of -b and --track in the man page.
  dir.c(common_prefix): Fix two bugs

Conflicts:

	git.spec.in
This commit is contained in:
Junio C Hamano
2007-04-24 00:08:16 -07:00
7 changed files with 15 additions and 5 deletions

View File

@ -1,7 +1,6 @@
*.xml *.xml
*.html *.html
*.1 *.[1-8]
*.7
*.made *.made
howto-index.txt howto-index.txt
doc.dep doc.dep

View File

@ -8,7 +8,7 @@ git-checkout - Checkout and switch to a branch
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git-checkout' [-q] [-f] [-b [--track | --no-track] <new_branch> [-l]] [-m] [<branch>] 'git-checkout' [-q] [-f] [[--track | --no-track] -b <new_branch> [-l]] [-m] [<branch>]
'git-checkout' [<tree-ish>] <paths>... 'git-checkout' [<tree-ish>] <paths>...
DESCRIPTION DESCRIPTION

View File

@ -67,6 +67,8 @@ message, or both. Leaves working tree as it was before "reset".
<3> "reset" copies the old head to .git/ORIG_HEAD; redo the <3> "reset" copies the old head to .git/ORIG_HEAD; redo the
commit by starting with its log message. If you do not need to commit by starting with its log message. If you do not need to
edit the message further, you can give -C option instead. edit the message further, you can give -C option instead.
+
See also the --amend option to gitlink:git-commit[1].
Undo commits permanently:: Undo commits permanently::
+ +

3
dir.c
View File

@ -34,8 +34,9 @@ int common_prefix(const char **pathspec)
prefix = slash - path + 1; prefix = slash - path + 1;
while ((next = *++pathspec) != NULL) { while ((next = *++pathspec) != NULL) {
int len = strlen(next); int len = strlen(next);
if (len >= prefix && !memcmp(path, next, len)) if (len >= prefix && !memcmp(path, next, prefix))
continue; continue;
len = prefix - 1;
for (;;) { for (;;) {
if (!len) if (!len)
return 0; return 0;

View File

@ -291,7 +291,7 @@ do
<"$dotest/$msgnum" >"$dotest/info" || <"$dotest/$msgnum" >"$dotest/info" ||
stop_here $this stop_here $this
test -s $dotest/patch || { test -s $dotest/patch || {
echo "Patch is empty. Was is split wrong?" echo "Patch is empty. Was it split wrong?"
stop_here $this stop_here $this
} }
git-stripspace < "$dotest/msg" > "$dotest/msg-clean" git-stripspace < "$dotest/msg" > "$dotest/msg-clean"

View File

@ -96,12 +96,14 @@ Perl interface to Git
%build %build
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_P4IMPORT=YesPlease \ make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_P4IMPORT=YesPlease \
ETC_GITCONFIG=/etc/gitconfig \
prefix=%{_prefix} PYTHON_PATH=%{python_path} all %{!?_without_docs: doc} prefix=%{_prefix} PYTHON_PATH=%{python_path} all %{!?_without_docs: doc}
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \ make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
WITH_P4IMPORT=YesPlease prefix=%{_prefix} mandir=%{_mandir} \ WITH_P4IMPORT=YesPlease prefix=%{_prefix} mandir=%{_mandir} \
ETC_GITCONFIG=/etc/gitconfig \
PYTHON_PATH=%{python_path} \ PYTHON_PATH=%{python_path} \
INSTALLDIRS=vendor install %{!?_without_docs: install-doc} INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'

View File

@ -104,4 +104,10 @@ test_expect_success 'add ignored ones with -f' '
git-ls-files --error-unmatch d.ig/d.if d.ig/d.ig git-ls-files --error-unmatch d.ig/d.if d.ig/d.ig
' '
mkdir 1 1/2 1/3
touch 1/2/a 1/3/b 1/2/c
test_expect_success 'check correct prefix detection' '
git add 1/2/a 1/3/b 1/2/c
'
test_done test_done