Commit graph

17338 commits

Author SHA1 Message Date
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
dbc6c74d08

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>
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
Thomas Rast 73ff1a131b t1505: remove debugging cruft
Remove a call to git-log that I introduced for debugging and that
accidentally made it into d18ba22 (sha1_name: support @{-N} syntax in
get_sha1(), 2009-01-17).

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 00:38:37 -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
Junio C Hamano 1afcde6da1 Merge branch 'sb/hook-cleanup'
* sb/hook-cleanup:
  run_hook(): allow more than 9 hook arguments
  run_hook(): check the executability of the hook before filling argv
  api-run-command.txt: talk about run_hook()
  Move run_hook() from builtin-commit.c into run-command.c (libgit)
  checkout: don't crash on file checkout before running post-checkout hook
2009-01-21 16:50:43 -08:00
Junio C Hamano 35e6afd4c6 Merge branch 'jk/color-parse'
* jk/color-parse:
  Optimize color_parse_mem
  expand --pretty=format color options
  color: make it easier for non-config to parse color specs
2009-01-21 16:50:34 -08:00
Junio C Hamano a14f15427b Merge branch 'jc/maint-format-patch-o-relative'
* jc/maint-format-patch-o-relative:
  Teach format-patch to handle output directory relative to cwd

Conflicts:
	t/t4014-format-patch.sh
2009-01-21 16:50:19 -08:00
Junio C Hamano 8318eb795e Merge branch 'kb/am-directory'
* kb/am-directory:
  git-am: fix shell quoting
  git-am: add --directory=<dir> option
2009-01-21 16:47:14 -08:00
Markus Heidelberg f135e72d61 bash completion: add 'rename' subcommand to git-remote
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 12:23:23 -08:00
Junio C Hamano f873dd5ac2 Merge branch 'maint'
* maint:
  Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
2009-01-21 01:08:10 -08:00
Junio C Hamano 2b5189e518 Merge branch 'bs/maint-rename-populate-filespec'
* bs/maint-rename-populate-filespec:
  Rename detection: Avoid repeated filespec population
2009-01-21 01:07:33 -08:00
Boyd Stephen Smith Jr 98a4d87b87 color-words: Support diff.wordregex config option
When diff is invoked with --color-words (w/o =regex), use the regular
expression the user has configured as diff.wordregex.

diff drivers configured via attributes take precedence over the
diff.wordregex-words setting.  If the user wants to change them, they have
their own configuration variables.

Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:51:12 -08:00
Junio C Hamano d7c03c1ff9 Simplify parsing branch switching events in reflog
We only accept "checkout: moving from A to B" newer style reflog entries,
in order to pick up A.  There is no point computing where B begins at
after running strstr to locate " to ", nor adding 4 and then subtracting 4
from the same pointer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:42:22 -08:00
Johannes Schindelin 950db8798d Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
All the other config variables use CamelCase.  This config variable should
not be an exception.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:17:40 -08:00
Santi Béjar 27a58359c3 tutorial-2: Update with the new "git commit" ouput
An earlier commit c5ee71f (commit: more compact summary and without extra
quotes, 2009-01-19) changed the "git commit" output when creating a
commit.  This patch updates the example session in the tutorial to match
the new output.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:15:34 -08:00
Björn Steinbrink 885c716f0f Rename detection: Avoid repeated filespec population
In diffcore_rename, we assume that the blob contents in the filespec
aren't required anymore after estimate_similarity has been called and thus
we free it. But estimate_similarity might return early when the file sizes
differ too much. In that case, cnt_data is never set and the next call to
estimate_similarity will populate the filespec again, eventually rereading
the same blob over and over again.

To fix that, we first get the blob sizes and only when the blob contents
are actually required, and when cnt_data will be set, the full filespec is
populated, once.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:14:12 -08:00
Ralf Wildenhues a1a587ef72 Fix naming scheme for configure cache variables.
In order to be cached, configure variables need to contain the
string '_cv_', and they should begin with a package-specific
prefix in order to avoid interfering with third-party macros.
Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:12:25 -08:00
Brandon Casey b56c79ccea Makefile: use shell for-loop rather than Make's foreach loop during install
The install target uses a foreach loop to generate a single long shell
command line to handle installation of the built-in git commands.  The
maximum length of the argument list varies by platform, and this use of
foreach quickly grows the length of the argument list.  Current git can
exceed the default maximum argument list length on IRIX 6.5 of 20480
depending on the installation path.

Rather than using make's foreach loop to pre-generate the shell command
line, use a shell for-loop and allow the shell to iterate through each of
the built-in commands.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:39:38 -08:00
Markus Heidelberg 35641310af use uppercase POSIX compliant signals for the 'trap' command
In 'man 1p trap' there is written:

    "Implementations may permit names with the SIG prefix or ignore case
    in signal names as an extension."

So change the lowercase signals to uppercase, which is POSIX compliant
instead of being an extension.

There wasn't anybody claiming that it doesn't work, but there was a bug
with using a signal with the SIG prefix, which is an extension as well.
So let's play it safe and change it, since it doesn't hurt anyone.

While at it, also convert 8 indentation spaces to 1 tab character.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:39:31 -08:00
Markus Heidelberg bc08fc4e85 contrib/difftool: remove distracting 'echo' in the SIGINT handler
When interrupting git-difftool with Ctrl-C, the output of this echo
command led to having the cursor at the beginning of the line below the
shell prompt.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:39:19 -08:00
Markus Heidelberg f13bfc1be7 contrib/difftool: change trap condition from SIGINT to INT
git-difftool worked for me on an up-to-date Gentoo Linux at home, but
didn't work on a somewhat older Ubuntu Linux 7.10 at work and failed
with the following error, where 'Makefile' was locally modified:

    trap: 244: SIGINT: bad trap
    external diff died, stopping at Makefile.

In 'man 1p trap' there is written:

    "The condition can be EXIT, 0 (equivalent to EXIT), or a signal
    specified using a symbolic name, without the SIG prefix, [...]"

    "Implementations may permit names with the SIG prefix or ignore case
    in signal names as an extension."

So now we do it the POSIX compliant way instead of using an extension.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:39:15 -08:00
Santi Béjar c5ee71fded commit: more compact summary and without extra quotes
Update the report format again to save the screen real estates, while
avoiding from enclosing the one-line summary of the commit log inside
double quotes pair, which looks awkward when the message begins or ends
with a double quote.  The old format looked like this:

    [master]: created d9a5491: "foo:bar"

Simply removing the double quotes were found to be confusing as a message
often begins with a short-word (area of the system) and a colon.

The new format looks like this:

    [master d9a5491] foo:bar

As discussed in the git mailing list:

    http://thread.gmane.org/gmane.comp.version-control.git/101687/focus=101735

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:38:06 -08:00
Junio C Hamano 101d15e097 Introduce for_each_recent_reflog_ent().
This can be used to scan only the last few kilobytes of a reflog, as a
cheap optimization when the data you are looking for is likely to be
found near the end of it.  The caller is expected to fall back to the
full scan if that is not the case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:18:29 -08:00