diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-24 11:08:16 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-24 11:08:16 +0400 |
commit | 520d7e278cfd25057e883575060b7378dfab61dc (patch) | |
tree | 3f20d1056ba4a3e1de652e25d32f2736395a8e2b | |
parent | afb5f39e24eadc5933b34cfd17c1089e482d6a6b (diff) | |
parent | 41728d69426dd707d4978929f8f4ac7a16f115f3 (diff) |
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
-rw-r--r-- | Documentation/.gitignore | 3 | ||||
-rw-r--r-- | Documentation/git-checkout.txt | 2 | ||||
-rw-r--r-- | Documentation/git-reset.txt | 2 | ||||
-rw-r--r-- | dir.c | 3 | ||||
-rwxr-xr-x | git-am.sh | 2 | ||||
-rw-r--r-- | git.spec.in | 2 | ||||
-rwxr-xr-x | t/t3700-add.sh | 6 |
7 files changed, 15 insertions, 5 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore index b98d21e98e..a37b2152bd 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,7 +1,6 @@ *.xml *.html -*.1 -*.7 +*.[1-8] *.made howto-index.txt doc.dep diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 4f2e847dc3..918d8ee720 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -8,7 +8,7 @@ git-checkout - Checkout and switch to a branch SYNOPSIS -------- [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>... DESCRIPTION diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 5b55cda512..19c5b9bbda 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -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 commit by starting with its log message. If you do not need to edit the message further, you can give -C option instead. ++ +See also the --amend option to gitlink:git-commit[1]. Undo commits permanently:: + @@ -34,8 +34,9 @@ int common_prefix(const char **pathspec) prefix = slash - path + 1; while ((next = *++pathspec) != NULL) { int len = strlen(next); - if (len >= prefix && !memcmp(path, next, len)) + if (len >= prefix && !memcmp(path, next, prefix)) continue; + len = prefix - 1; for (;;) { if (!len) return 0; @@ -291,7 +291,7 @@ do <"$dotest/$msgnum" >"$dotest/info" || stop_here $this test -s $dotest/patch || { - echo "Patch is empty. Was is split wrong?" + echo "Patch is empty. Was it split wrong?" stop_here $this } git-stripspace < "$dotest/msg" > "$dotest/msg-clean" diff --git a/git.spec.in b/git.spec.in index f0746ed78c..556bdda7aa 100644 --- a/git.spec.in +++ b/git.spec.in @@ -96,12 +96,14 @@ Perl interface to Git %build make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_P4IMPORT=YesPlease \ + ETC_GITCONFIG=/etc/gitconfig \ prefix=%{_prefix} PYTHON_PATH=%{python_path} all %{!?_without_docs: doc} %install rm -rf $RPM_BUILD_ROOT make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \ WITH_P4IMPORT=YesPlease prefix=%{_prefix} mandir=%{_mandir} \ + ETC_GITCONFIG=/etc/gitconfig \ PYTHON_PATH=%{python_path} \ INSTALLDIRS=vendor install %{!?_without_docs: install-doc} find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 08e035220c..ad8cc7d4ae 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -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 ' +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 |