1
0
mirror of https://github.com/git/git.git synced 2024-10-20 22:48:24 +02:00
Commit Graph

17297 Commits

Author SHA1 Message Date
Junio C Hamano
297f6a535c Merge branch 'maint'
* maint:
  send-pack: do not send unknown object name from ".have" to pack-objects
  test-path-utils: Fix off by one, found by valgrind
  get_sha1_basic(): fix invalid memory access, found by valgrind
2009-01-28 00:36:52 -08:00
Junio C Hamano
02322e1619 send-pack: do not send unknown object name from ".have" to pack-objects
v1.6.1 introduced ".have" extension to the protocol to allow the receiving
side to advertise objects that are reachable from refs in the repositories
it borrows from.  This was meant to be used by the sending side to avoid
sending such objects; they are already available through the alternates
mechanism.

The client side implementation in v1.6.1, which was introduced with
40c155f (push: prepare sender to receive extended ref information from the
receiver, 2008-09-09) aka v1.6.1-rc1~203^2~1, were faulty in that it did
not consider the possiblity that the repository receiver borrows from
might have objects it does not know about.

This fixes it by refraining from passing missing commits to underlying
pack-objects.  Revision machinery may need to be tightened further to
treat missing uninteresting objects as non-error events, but this is an
obvious and safe fix for a maintenance release that is almost good enough.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-27 23:46:59 -08:00
Junio C Hamano
899d8dc392 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  test-path-utils: Fix off by one, found by valgrind
  get_sha1_basic(): fix invalid memory access, found by valgrind
2009-01-27 15:23:46 -08:00
Johannes Schindelin
b8469ad057 test-path-utils: Fix off by one, found by valgrind
When normalizing an absolute path, we might have to add a slash _and_ a
NUL to the buffer, so the buffer was one too small.

Let's just future proof the code and alloc PATH_MAX + 1 bytes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-27 15:16:41 -08:00
Johannes Schindelin
f265458f61 get_sha1_basic(): fix invalid memory access, found by valgrind
When get_sha1_basic() is passed a buffer of len 0, it should not
check if buf[len-1] is a curly bracket.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-27 15:16:31 -08:00
Junio C Hamano
2d6061537f tests: Avoid single-shot environment export for shell function invocation
Some shells have issues with a single-shot environment variable export
when invoking a shell function.  This fixes the ones I found that invoke
test_must_fail that way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-26 21:33:51 -08:00
Junio C Hamano
a6c7a27691 rebase -i: correctly remember --root flag across --continue
d911d14 (rebase -i: learn to rebase root commit, 2009-01-02) tried to
remember the --root flag across a merge conflict in a broken way.
Introduce a flag file $DOTEST/rebase-root to fix and clarify.

While at it, also make sure $UPSTREAM is always initialized to guard
against existing values in the environment.

[tr: added tests]

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-26 21:23:19 -08:00
Ted Pavlic
f7d9d04e3b make: Remove -pthread on Darwin (it is included by cstdlib).
As discussed in

http://lists.apple.com/archives/Unix-porting/2005/Mar/msg00019.html

the Mac OS X C standard library is always thread safe and always
includes the pthread library. So explicitly using -pthread causes an
'unrecognized option' compiler warning.

This patch clears PTHREAD_LIBS if Darwin is detected.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-26 15:11:37 -08:00
Nanako Shiraishi
dfb047b9e4 Mention "local convention" rule in the CodingGuidelines
The document suggests to imitate the existing code, but didn't
say which existing code it should imitate. This clarifies.

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-26 00:35:58 -08:00
Junio C Hamano
afc7274704 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: Add test for --ignore-paths parameter
  git-svn: documented --ignore-paths
  git-svn: add --ignore-paths option for fetching
  git-svn: fix memory leak when checking for empty symlinks
2009-01-25 22:27:52 -08:00
Johannes Schindelin
277d7e91ae rebase -i --root: fix check for number of arguments
If we are not rebasing with --root, then $# can only be either 1 (base)
or 2 (base and the name of the branch to be rebased).

If we are rebasing with --root, then it is Ok if $# is 0 (rebase the
current branch down to everything) or 1 (rebase the named branch down to
everything).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 22:06:50 -08:00
Miklos Vajna
c30e5673f9 gittutorial: remove misleading note
In the tutorial Alice initializes the repository, and Bob clones it. So
Bob can just do a 'git pull', but Alice will need 'git pull <url>
<branch>'.

The note suggested that the branch parameter is not necessary, which is
no longer true these days.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 18:57:26 -08:00
Junio C Hamano
0990e7aaaa Merge branch 'kb/lstat-cache'
* kb/lstat-cache:
  lstat_cache(): introduce clear_lstat_cache() function
  lstat_cache(): introduce invalidate_lstat_cache() function
  lstat_cache(): introduce has_dirs_only_path() function
  lstat_cache(): introduce has_symlink_or_noent_leading_path() function
  lstat_cache(): more cache effective symlink/directory detection
2009-01-25 17:13:34 -08:00
Junio C Hamano
9847a52432 Merge branch 'js/diff-color-words'
* js/diff-color-words:
  Change the spelling of "wordregex".
  color-words: Support diff.wordregex config option
  color-words: make regex configurable via attributes
  color-words: expand docs with precise semantics
  color-words: enable REG_NEWLINE to help user
  color-words: take an optional regular expression describing words
  color-words: change algorithm to allow for 0-character word boundaries
  color-words: refactor word splitting and use ALLOC_GROW()
  Add color_fwrite_lines(), a function coloring each line individually
2009-01-25 17:13:29 -08:00
Junio C Hamano
d64d4835b8 Merge branch 'cb/add-pathspec'
* cb/add-pathspec:
  remove pathspec_match, use match_pathspec instead
  clean up pathspec matching
2009-01-25 17:13:11 -08:00
Junio C Hamano
f18e6bef23 Merge branch 'js/maint-all-implies-HEAD'
* js/maint-all-implies-HEAD:
  bundle: allow the same ref to be given more than once
  revision walker: include a detached HEAD in --all
2009-01-25 17:13:02 -08:00
Junio C Hamano
45099df6d7 Merge branch 'sr/clone-empty'
* sr/clone-empty:
  Allow cloning an empty repository
2009-01-25 17:11:30 -08:00
Teemu Likonen
ec74042dc7 diff-options.txt: Fix asciidoc markup issue
Must be "--patience::", not "--patience:".

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 17:09:58 -08:00
Vitaly \"_Vi\" Shukela
242522d9cc git-svn: Add test for --ignore-paths parameter
Added a test for this option, similar to (and based on) t9133 about
ignorance of .git directories

Signed-off-by: Vitaly "_Vi" Shukela <public_vi@tut.by>
Acked-by: Eric Wong <normalperson@yhbt.net>

[ew: replaced 'echo -e' with printf so it works on POSIX shells]
[ew: added Vitaly to copyright even though it's based on my test]
2009-01-25 17:09:45 -08:00
Junio C Hamano
c42b1ad944 Sync with 1.6.1.1 2009-01-25 17:09:35 -08:00
Vitaly \"_Vi\" Shukela
6076b843a0 git-svn: documented --ignore-paths
Documented --ignore-paths option of git-svn to inform users about
the feature and provide some examples.

Signed-off-by: Vitaly "_Vi" Shukela <public_vi@tut.by>
Acked-by: Eric Wong <normalperson@yhbt.net>

[ew: trailing whitespace removed]
2009-01-25 17:01:47 -08:00
Vitaly \"_Vi\" Shukela
edc662f929 git-svn: add --ignore-paths option for fetching
This will be useful when somebody want to checkout something partially from
repository with some non-standart layout or exclude some files from it.
Example: repository has structure /module-{a,b,c}/{trunk,branches,tags}/...
Modules are interdependent, and you want it to be single repostory (to commit
to all modules simultaneously and view complete history), but do not want
branches and tags be checked out into working copy.
Other use case is excluding some large blobs.

The quirk for now is that user must specify this option every fetch/rebase;
in other case he may get extra files or "file not found" errors. It may be
will be resolved by adding regular expression to .git/config into
[svn-remote ...] to make it persistent.

Signed-off-by: Vitaly "_Vi" Shukela <public_vi@tut.by>
Acked-by: Eric Wong <normalperson@yhbt.net>

[ew: replaced 4-space indent with tabs]
[ew: prefixed $ignore_regex with an underscore to be consistent
     with other globals in git-svn]
[ew: rearranged functions to minimize diff and removed prototype
     usage to be consistent with the rest of git-svn (and other
     Perl code in git (and they're ugly to me)]
2009-01-25 17:01:47 -08:00
Eric Wong
bf8a40b89e git-svn: fix memory leak when checking for empty symlinks
By enforcing SVN::Pool usage when calling get_file once again.

This regression was introduced with the reintroduction of
SVN::Ra::get_file() usage in
dbc6c74d0858d77e61e092a48d467e725211f8e9

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-25 17:01:47 -08:00
Junio C Hamano
5c415311f7 GIT 1.6.1.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.1.1
2009-01-25 12:41:09 -08:00
Benjamin Kramer
d6716c0266 Ignore test-ctype
Signed-off-by: Benjamin Kramer <benny.kra@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 11:25:14 -08:00
Junio C Hamano
d456c9fd1e http-push.c: style fixes
b1c7d4a (http-push: refactor lock-related headers creation for curl
requests, 2009-01-24) had many style violations that slipped through.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 11:25:13 -08:00
Junio C Hamano
5dc1308562 Merge branch 'js/patience-diff'
* js/patience-diff:
  bash completions: Add the --patience option
  Introduce the diff option '--patience'
  Implement the patience diff algorithm

Conflicts:
	contrib/completion/git-completion.bash
2009-01-23 21:51:38 -08:00
Junio C Hamano
f3d6073e02 Merge branch 'maint'
* maint:
  Fix Documentation for git-describe
2009-01-23 21:51:20 -08:00
Ray Chuan
b1c7d4aafe http-push: refactor lock-related headers creation for curl requests
DAV-related headers (more specifically, headers related to the lock token,
namely, If, Lock-Token, and Timeout) for curl requests are created and
allocated individually, eg a "if_header" variable for the "If: " header, a
"timeout_header" variable for the "Timeout: " header.

This patch provides a new function ("get_dav_token_headers") that creates
these header, saving methods from allocating memory, and from issuing a
"curl_slist_append()" call.  The temporary string storage given to
curl_slist_append() is freed much earlier than the previous code with this
patch, but this change is safe, because curl_slist_append() keeps a copy
of the given string.

In part, this patch also addresses the fact that commit 753bc91 (Remove
the requirement opaquelocktoken uri scheme) did not update memory
allocations for DAV-related headers.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 21:50:37 -08:00
Junio C Hamano
692be9f365 Merge branch 'cb/maint-unpack-trees-absense' into maint
* cb/maint-unpack-trees-absense:
  unpack-trees: remove redundant path search in verify_absent
  unpack-trees: fix path search bug in verify_absent
  unpack-trees: handle failure in verify_absent
2009-01-23 19:06:38 -08:00
Junio C Hamano
f630171d9d Merge branch 'tr/maint-no-index-fixes' into maint
* tr/maint-no-index-fixes:
  diff --no-index -q: fix endless loop
  diff --no-index: test for pager after option parsing
  diff: accept -- when using --no-index
2009-01-23 19:04:48 -08:00
Junio C Hamano
46cdcc6275 Merge branch 'rs/maint-shortlog-foldline' into maint
* rs/maint-shortlog-foldline:
  shortlog: handle multi-line subjects like log --pretty=oneline et. al. do
2009-01-23 19:03:50 -08:00
Junio C Hamano
67b175bb11 Merge branch 'pj/maint-ldflags' into maint
* pj/maint-ldflags:
  configure clobbers LDFLAGS
2009-01-23 19:02:58 -08:00
Junio C Hamano
e5bde1987c Merge branch 'pb/maint-git-pm-false-dir' into maint
* pb/maint-git-pm-false-dir:
  Git.pm: correctly handle directory name that evaluates to "false"
2009-01-23 19:02:41 -08:00
Junio C Hamano
e2355a3e06 Merge branch 'js/maint-bisect-gitk' into maint
* js/maint-bisect-gitk:
  bisect view: call gitk if Cygwin's SESSIONNAME variable is set
2009-01-23 19:01:32 -08:00
Junio C Hamano
9e3248eb51 Merge branch 'js/add-not-submodule' into maint
* js/add-not-submodule:
  git add: do not add files from a submodule
2009-01-23 19:00:43 -08:00
Junio C Hamano
5cb0f2745f Merge branch 'jc/maint-format-patch' into maint
* jc/maint-format-patch:
  format-patch: show patch text for the root commit
2009-01-23 18:59:59 -08:00
Junio C Hamano
d4029d30c7 Merge branch 'am/maint-push-doc' into maint
* am/maint-push-doc:
  Documentation: avoid using undefined parameters
  Documentation: mention branches rather than heads
  Documentation: remove a redundant elaboration
  Documentation: git push repository can also be a remote
2009-01-23 18:59:26 -08:00
Junio C Hamano
b619715207 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  Fix Documentation for git-describe
2009-01-23 18:48:14 -08:00
martin f. krafft
b80da424a1 git-am: implement --reject option passed to git-apply
With --reject, git-am simply passes the --reject option to git-apply and thus
allows people to work with reject files if they so prefer.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 17:00:12 -08:00
Arjen Laarhoven
d930508903 t/t4202-log.sh: Add testcases
Add testcases for 'git log --diff-filter=[CM]' (copies and renames).
Also add a testcase for 'git log --follow'.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 15:10:24 -08:00
Sverre Rabbelier
86ac751859 Allow cloning an empty repository
Cloning an empty repository manually (that is, doing 'git init' and
then doing all configuration by hand) can be a lot of work. Save the
user this work by allowing the cloning of empty repositories.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 00:19:49 -08:00
Boyd Stephen Smith Jr
b938f62a20 Fix Documentation for git-describe
The documentation for git-describe says the default abbreviation is 8
hexadecimal digits while cache.c clearly shows DEFAULT_ABBREV set to 7.
This patch corrects the documentation.

Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 00:17:04 -08:00
Boyd Stephen Smith Jr
ae3b970ac3 Change the spelling of "wordregex".
Use "wordRegex" for configuration variable names.  Use "word_regex" for C
language tokens.

Signed-off-by: Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 23:52:16 -08:00
Junio C Hamano
9a01387b97 Merge branch 'kc/maint-diff-bwi-fix'
* kc/maint-diff-bwi-fix:
  Fix combined use of whitespace ignore options to diff
2009-01-21 17:07:51 -08:00
Junio C Hamano
36dd939393 Merge branch 'lt/maint-wrap-zlib'
* lt/maint-wrap-zlib:
  Wrap inflate and other zlib routines for better error reporting

Conflicts:
	http-push.c
	http-walker.c
	sha1_file.c
2009-01-21 16:55:17 -08:00
Junio C Hamano
664a3348b2 Merge branch 'am/maint-push-doc'
* am/maint-push-doc:
  Documentation: avoid using undefined parameters
  Documentation: mention branches rather than heads
  Documentation: remove a redundant elaboration
  Documentation: git push repository can also be a remote
2009-01-21 16:51:28 -08:00
Junio C Hamano
0aac1614e9 Merge branch 'sg/maint-gitdir-in-subdir'
* sg/maint-gitdir-in-subdir:
  Fix gitdir detection when in subdir of gitdir
2009-01-21 16:51:25 -08:00
Junio C Hamano
07adc43f3a Merge branch 'jf/am-failure-report'
* jf/am-failure-report:
  git-am: re-fix the diag message printing
  git-am: Make it easier to see which patch failed
2009-01-21 16:51:18 -08:00
Junio C Hamano
d9fde065bd Merge branch 'rs/ctype'
* rs/ctype:
  Add is_regex_special()
  Change NUL char handling of isspecial()
  Reformat ctype.c
  Add ctype test

Conflicts:
	Makefile
2009-01-21 16:51:03 -08:00