Commit graph

17710 commits

Author SHA1 Message Date
Junio C Hamano 8af95ca017 Merge branch 'mg/maint-submodule-normalize-path' into maint
* mg/maint-submodule-normalize-path:
  git submodule: Fix adding of submodules at paths with ./, .. and //
  git submodule: Add test cases for git submodule add
2009-03-21 23:08:27 -07:00
Junio C Hamano 2aa93deec0 Merge branch 'rs/memmem' into maint
* rs/memmem:
  optimize compat/ memmem()
  diffcore-pickaxe: use memmem()
2009-03-21 23:08:21 -07:00
Junio C Hamano 10a73f5848 Merge branch 'js/rsync-local' into maint
* js/rsync-local:
  rsync transport: allow local paths, and fix tests
2009-03-21 23:03:17 -07:00
Junio C Hamano 3c954c23d6 Merge branch 'db/maint-missing-origin' into maint
* db/maint-missing-origin:
  Remove total confusion from git-fetch and git-push
  Give error when no remote is configured
2009-03-21 23:02:55 -07:00
Junio C Hamano 0e1aa2f7af Merge branch 'jc/maint-1.6.0-read-tree-overlay' into maint
* jc/maint-1.6.0-read-tree-overlay:
  read-tree A B C: do not create a bogus index and do not segfault
2009-03-21 23:02:47 -07:00
Stephen Boyd b60df87a6b format-patch: --numbered-files and --stdout aren't mutually exclusive
For example:

    git format-patch --numbered-files --stdout --attach HEAD~~

will create two messages with files 1 and 2 attached respectively.
Without --attach/--inline but with --stdout, --numbered-files option
can be simply ignored, because we are not creating any file ourselves.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-21 22:45:28 -07:00
Jeff King 821d56aa68 doc: clarify how -S works
The existing text was very vague about what exactly it means
for difference to "contain" a change. This seems to cause
confusion on the mailing list every month or two.

To fix it we:

  1. use "introduce or remove an instance of" instead of
     "contain"

  2. point the user to gitdiffcore(7), which contains a more
     complete explanation

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-19 02:47:40 -07:00
Junio C Hamano 9326d49412 Remove total confusion from git-fetch and git-push
The config file is not the only place remotes are defined, and without
consulting .git/remotes and .git/branches, you won't know if "origin" is
configured by the user.  Don't give up too early and insult the user with
a wisecrack "Where do you want to fetch from today?"

The only thing the previous patch seems to want to prevent from happening
is a lazy "git fetch/push" that does not say where-from/to to produce an
error message 'origin not found', and we can do that by not letting
add_url_alias() to turn a nickname "origin" literally into a pathname
"origin" without changing the rest of the logic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-16 00:35:09 -07:00
Junio C Hamano 6f55ee4317 GIT 1.6.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-15 13:05:05 -07:00
Junio C Hamano a54a216098 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
2009-03-12 23:37:16 -07:00
Junio C Hamano bf0fe35c93 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  bisect: fix another instance of eval'ed string
  bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
  Support "\" in non-wildcard exclusion entries

Conflicts:
	git-bisect.sh
2009-03-12 23:36:57 -07:00
Junio C Hamano 1e68adc174 Merge branch 'en/maint-1.6.1-hash-object' into maint-1.6.1
* en/maint-1.6.1-hash-object:
  Ensure proper setup of git_dir for git-hash-object
2009-03-12 23:11:23 -07:00
Junio C Hamano 688ba09cad Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0
* ks/maint-1.6.0-mailinfo-folded:
  mailinfo: tests for RFC2047 examples
  mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
  mailinfo: 'From:' header should be unfold as well
  mailinfo: correctly handle multiline 'Subject:' header
2009-03-12 21:48:43 -07:00
Junio C Hamano 3e186ef135 Merge branch 'cc/maint-1.6.0-bisect-fix' into maint-1.6.0
* cc/maint-1.6.0-bisect-fix:
  bisect: fix another instance of eval'ed string
  bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
2009-03-12 21:48:26 -07:00
Junio C Hamano fa711bc198 Merge branch 'fg/maint-1.6.0-exclude-bq' into maint-1.6.0
* fg/maint-1.6.0-exclude-bq:
  Support "\" in non-wildcard exclusion entries
2009-03-12 21:48:07 -07:00
Junio C Hamano 532b74b210 Merge branch 'js/maint-1.6.1-filter-branch-submodule' into maint-1.6.1
* js/maint-1.6.1-filter-branch-submodule:
  filter-branch: do not consider diverging submodules a 'dirty worktree'
2009-03-12 21:46:50 -07:00
Junio C Hamano c26901a8ff Merge branch 'gt/maint-1.6.1-utf8-width' into maint-1.6.1
* gt/maint-1.6.1-utf8-width:
  builtin-blame.c: Use utf8_strwidth for author's names
  utf8: add utf8_strwidth()
2009-03-12 21:46:35 -07:00
Junio C Hamano 2f5bfa7c7f Merge branch 'js/maint-1.6.1-remote-remove-mirror' into maint-1.6.1
* js/maint-1.6.1-remote-remove-mirror:
  builtin-remote: make rm operation safer in mirrored repository
  builtin-remote: make rm() use properly named variable to hold return value
2009-03-12 21:45:56 -07:00
Junio C Hamano 592ebd087a Merge branch 'ek/maint-1.6.1-filter-branch-bare' into maint-1.6.1
* ek/maint-1.6.1-filter-branch-bare:
  filter-branch: Fix fatal error on bare repositories
2009-03-12 21:45:21 -07:00
Junio C Hamano d9b04430d2 Merge branch 'jc/maint-1.6.1-add-u-remove-conflicted' into maint-1.6.1
* jc/maint-1.6.1-add-u-remove-conflicted:
  add -u: do not fail to resolve a path as deleted
2009-03-12 21:45:14 -07:00
Junio C Hamano 54e7e7891b Merge branch 'js/maint-1.6.1-rebase-i-submodule' into maint-1.6.1
* js/maint-1.6.1-rebase-i-submodule:
  Fix submodule squashing into unrelated commit
  rebase -i squashes submodule changes into unrelated commit
2009-03-12 21:45:02 -07:00
Junio C Hamano daf713dd49 Merge branch 'jc/maint-1.6.1-allow-uninteresting-missing' into maint-1.6.1
* jc/maint-1.6.1-allow-uninteresting-missing:
  revision traversal: allow UNINTERESTING objects to be missing
2009-03-12 21:44:48 -07:00
Junio C Hamano e89b991a7f Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.1
* ks/maint-1.6.0-mailinfo-folded:
  mailinfo: tests for RFC2047 examples
  mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
  mailinfo: 'From:' header should be unfold as well
  mailinfo: correctly handle multiline 'Subject:' header
2009-03-12 21:44:00 -07:00
Junio C Hamano 8bb78b7201 Merge branch 'jk/maint-1.6.1-cleanup-after-exec-failure' into maint-1.6.1
* jk/maint-1.6.1-cleanup-after-exec-failure:
  git: use run_command() to execute dashed externals
  run_command(): help callers distinguish errors
  run_command(): handle missing command errors more gracefully
  git: s/run_command/run_builtin/
2009-03-12 21:43:38 -07:00
Junio C Hamano de55390d36 Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into maint-1.6.0
* jc/maint-1.6.0-split-diff-metainfo:
  diff.c: output correct index lines for a split diff
2009-03-12 20:01:28 -07:00
Junio C Hamano aab3b9a1aa read-tree A B C: do not create a bogus index and do not segfault
"git read-tree A B C..." without the "-m" (merge) option is a way to read
these trees on top of each other to get an overlay of them.

An ancient commit ee6566e (Rewrite read-tree, 2005-09-05) passed the
ADD_CACHE_SKIP_DFCHECK flag when calling add_index_entry() to add the
paths obtained from these trees to the index, but it is an incorrect use
of the flag.  The flag is meant to be used by callers who know the
addition of the entry does not introduce a D/F conflict to the index in
order to avoid the overhead of checking.

This bug resulted in a bogus index that records both "x" and "x/z" as a
blob after reading three trees that have paths ("x"), ("x", "y"), and
("x/z", "y") respectively.  34110cd (Make 'unpack_trees()' have a separate
source and destination index, 2008-03-06) refactored the callsites of
add_index_entry() incorrectly and added more codepaths that use this flag
when it shouldn't be used.

Also, 0190457 (Move 'unpack_trees()' over to 'traverse_trees()' interface,
2008-03-05) introduced a bug to call add_index_entry() for the tree that
does not have the path in it, passing NULL as a cache entry.  This caused
reading multiple trees, one of which has path "x" but another doesn't, to
segfault.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-12 17:06:07 -07:00
Junio C Hamano c2aca7c40c Update draft release notes for 1.6.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-11 14:37:15 -07:00
Junio C Hamano 7681ed2d2e Merge branch 'js/maint-send-email' into maint
* js/maint-send-email:
  send-email: don't create temporary compose file until it is needed
  send-email: --suppress-cc improvements
  send-email: handle multiple Cc addresses when reading mbox message
  send-email: allow send-email to run outside a repo
2009-03-11 14:01:24 -07:00
Junio C Hamano ecab04d49a Merge branch 'jk/sane-relative-time' into maint
* jk/sane-relative-time:
  never fallback relative times to absolute
2009-03-11 13:59:38 -07:00
Junio C Hamano 6c3b3e141f Merge branch 'jc/maint-add-p-unquote' into maint
* jc/maint-add-p-unquote:
  git-add -i/-p: learn to unwrap C-quoted paths
2009-03-11 13:55:49 -07:00
Junio C Hamano 5f7b338310 Merge branch 'fg/maint-exclude-bq' into maint
* fg/maint-exclude-bq:
  Support "\" in non-wildcard exclusion entries
2009-03-11 13:53:53 -07:00
Junio C Hamano bbc6a14b72 Merge branch 'en/maint-hash-object' into maint
* en/maint-hash-object:
  Ensure proper setup of git_dir for git-hash-object

Conflicts:
	hash-object.c
2009-03-11 13:51:59 -07:00
Johannes Schindelin 7efaeba2a8 rsync transport: allow local paths, and fix tests
Earlier, the rsync tests were disabled by default, as they needed a
running rsyncd daemon.  This was only due to the limitation that our
rsync transport only allowed full URLs of the form

	rsync://<host>/<path>

Relaxing the URLs to allow

	rsync:<path>

permitted the change in the tests to run whenever rsync is available,
without requiring a fully configured and running rsyncd.

While at it, the tests were fixed so that they run in directories with a
space in their name.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-10 23:17:56 -07:00
Daniel Barkalow fa685bdf45 Give error when no remote is configured
When there's no explicitly-named remote, we use the remote specified
for the current branch, which in turn defaults to "origin". But it
this case should require the remote to actually be configured, and not
fall back to the path "origin".

Possibly, the config file's "remote = something" should require the
something to be a configured remote instead of a bare repository URL,
but we actually test with a bare repository URL.

In fetch, we were giving the sensible error message when coming up
with a URL failed, but this wasn't actually reachable, so move that
error up and use it when appropriate.

In push, we need a new error message, because the old one (formerly
unreachable without a lot of help) used the repo name, which was NULL.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-10 23:14:20 -07:00
Junio C Hamano 9a6682bab5 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  builtin-revert.c: release index lock when cherry-picking an empty commit
2009-03-07 21:00:27 -08:00
Chris Johnsen 0d66e95903 builtin-revert.c: release index lock when cherry-picking an empty commit
When a cherry-pick of an empty commit is done, release the lock
held on the index.

The fix is the same as was applied to similar code in 4271666046.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 12:21:45 -08:00
Jeff King d57f07ebae document config --bool-or-int
The documentation is just a pointer to the --bool and --int
options, but it makes sense to at least mention that it
exists.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 11:33:51 -08:00
Jeff King 003f69b282 t1300: use test_must_fail as appropriate
Some of the tests checked the exit code manually, even going
so far as to run git outside of the test_expect harness.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 11:28:53 -08:00
René Scharfe c2e9364a06 cleanup: add isascii()
Add a standard definition of isascii() and use it to replace an open
coded high-bit test in pretty.c.  While we're there, write the ESC
char as the more commonly used '\033' instead of as 0x1b to enhance
its grepability.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 11:22:42 -08:00
Christian Couder 3d2d4f96d2 Documentation: fix badly indented paragraphs in "--bisect-all" description
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 11:21:41 -08:00
John Tapsell bdfd739dac Make the 'lock file' exists error more informative
It looks like someone did 90% of the work, then forgot to actually use
the function in one place.

Also the helper function did not use the correct variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-04 20:35:19 -08:00
Junio C Hamano f243319c21 Beginning of 1.6.2 maintenance track
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-04 00:37:50 -08:00
Junio C Hamano a95148dea1 GIT 1.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 23:37:19 -08:00
Michael J Gruber db75ada559 git submodule: Fix adding of submodules at paths with ./, .. and //
Make 'git submodule add' normalize the submodule path in the
same way as 'git ls-files' does, so that 'git submodule init' looks up
the information in .gitmodules with the same key under which 'git
submodule add' stores it.

This fixes 4 known breakages.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 21:46:09 -08:00
Michael J Gruber ac8463d2b4 git submodule: Add test cases for git submodule add
Add simple test cases for adding and initialising submodules. The
init step is necessary in order to verify the added information.

The second test exposes a known breakage due to './' in the path: git
ls-files simplifies the path but git add does not, which leads to git
init looking for different lines in .gitmodules than git add adds.

The other tests add test cases for '//' and '..' in the path which
currently fail for the same reason.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 21:46:09 -08:00
Mike Ralphson a1070d4cbb Documentation: Typo / spelling / formatting fixes
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 21:43:19 -08:00
Mike Ralphson 5a4aaaf3aa Documentation: Expand a couple of abbreviations
These may not be obvious to non-native English speakers

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 21:42:44 -08:00
Mike Ralphson c0bc2eeb1e Documentation: Typos / spelling fixes in RelNotes
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 21:40:36 -08:00
Roy Lee 8d1b9d23a0 Documentation/git-archive.txt: Note attributes
Signed-off-by: Roy Lee <roylee17@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03 20:16:49 -08:00
René Scharfe 56384e61ea optimize compat/ memmem()
When memmem() was imported from glibc 2.2 into compat/, an optimization
was dropped in the process, in order to make the code smaller and simpler.
It was OK because memmem() wasn't used in performance-critical code.  Now
the situation has changed and we can benefit from this optimization.

The trick is to avoid calling memcmp() if the first character of the needle
already doesn't match.  Checking one character directly is much cheaper
than the function call overhead.  We keep the first character of the needle
in the variable named point and the rest in the one named tail.

The following commands were run in a Linux kernel repository and timed, the
best of five results is shown:

  $ STRING='Ensure that the real time constraints are schedulable.'
  $ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null

On Windows Vista x64, before:

  real    0m8.470s
  user    0m0.000s
  sys     0m0.000s

And after the patch:

  real    0m1.887s
  user    0m0.000s
  sys     0m0.000s

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-02 18:28:06 -08:00