Martin Koegler [Mon, 25 Feb 2008 21:46:05 +0000 (22:46 +0100)]
builtin-fsck: move away from object-refs to fsck_walk
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 25 Feb 2008 21:46:04 +0000 (22:46 +0100)]
add generic, type aware object chain walker
The requirements are:
* it may not crash on NULL pointers
* a callback function is needed, as index-pack/unpack-objects
need to do different things
* the type information is needed to check the expected <-> real type
and print better error messages
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:58 +0000 (21:47 +0100)]
peel_onion: handle NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:48:03 +0000 (21:48 +0100)]
check return value from parse_commit() in various functions
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:48:02 +0000 (21:48 +0100)]
parse_commit: don't fail, if object is NULL
Some codepaths (eg. builtin-rev-parse -> get_merge_bases -> parse_commit)
can pass NULL.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:48:01 +0000 (21:48 +0100)]
revision.c: handle tag->tagged == NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:48:00 +0000 (21:48 +0100)]
reachable.c::process_tree/blob: check for NULL
As these functions are directly called with the result
from lookup_tree/blob, they must handle NULL.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:59 +0000 (21:47 +0100)]
process_tag: handle tag->tagged == NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:57 +0000 (21:47 +0100)]
check results of parse_commit in merge_bases
An error is signaled by returning NULL.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:56 +0000 (21:47 +0100)]
list-objects.c::process_tree/blob: check for NULL
As these functions are directly called with the result
from lookup_tree/blob, they must handle NULL.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:55 +0000 (21:47 +0100)]
reachable.c::add_one_tree: handle NULL from lookup_tree
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:54 +0000 (21:47 +0100)]
mark_blob/tree_uninteresting: check for NULL
As these functions are directly called with the result
from lookup_tree/blob, they must handle NULL.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:53 +0000 (21:47 +0100)]
get_sha1_oneline: check return value of parse_object
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 18 Feb 2008 20:47:52 +0000 (21:47 +0100)]
read_object_with_reference: don't read beyond the buffer
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 17 Feb 2008 06:44:31 +0000 (22:44 -0800)]
GIT 1.5.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pieter de Bie [Sat, 16 Feb 2008 16:48:46 +0000 (17:48 +0100)]
Documentation/git-reset: Add an example of resetting selected paths
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pieter de Bie [Sat, 16 Feb 2008 16:48:45 +0000 (17:48 +0100)]
Documentation/git-reset: don't mention --mixed for selected-paths reset
The option is accepted, but that is the only form selected-paths
variant of the reset command takes, so there is no point mentioning it.
And while we're at it, use the dashless git call.
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 16 Feb 2008 18:38:12 +0000 (10:38 -0800)]
Documentation/git-reset:
Since
3368d11 (Remove unnecessary git-rm --cached reference from
status output), the status output marks the "Added but not yet
committed" section as "Changes to be committed".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 14 Feb 2008 17:18:23 +0000 (12:18 -0500)]
commit: discard index after setting up partial commit
There may still be some entries from the original index that
should be discarded before we show the status. In
particular, if a file was added in the index but not
included in the partial commit, it would still show up in
the status listing as staged for commit.
Ultimately the correct fix is to keep the two states in
separate index_state variables. Then we can avoid having
to reload the cache from the temporary file altogether, and
just point wt_status_print at the correct index.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 16 Feb 2008 07:57:26 +0000 (23:57 -0800)]
filter-branch: handle filenames that need quoting
The command used a very old fashioned construct to extract
filenames out of diff-index and ended up corrupting the output.
We can simply use --name-only and pipe into --stdin mode of
update-index. It's been like that for the past 2 years or so
since
a94d994 (update-index: work with c-quoted name).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 16 Feb 2008 04:30:05 +0000 (20:30 -0800)]
diff: Fix miscounting of --check output
c1795bb (Unify whitespace checking) incorrectly made the
checking function return without incrementing the line numbers
when there is no whitespace problem is found on a '+' line.
This resurrects the earlier behaviour.
Noticed and reported by Jay Soffian. The test script was stolen
from Jay's independent fix.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stelian Pop [Fri, 15 Feb 2008 21:20:44 +0000 (22:20 +0100)]
hg-to-git: fix parent analysis
Fix a bug in the hg-to-git convertor introduced by commit
1bc7c13af9f936aa80893100120b542338a10bf4: when searching the changeset
parents, 'hg log' returns an extra space at the end of the line, which
confuses the .split(' ') based tokenizer:
Traceback (most recent call last):
File "hg-to-git.py", line 123, in <module>
hgchildren[mparent] += ( str(cset), )
KeyError: ''
Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jay Soffian [Fri, 15 Feb 2008 21:53:36 +0000 (16:53 -0500)]
mailinfo: feed only one line to handle_filter() for QP input
The function is intended to be fed one logical line at a time to
inspect, but a QP encoded raw input line can have more than one
lines, just like BASE64 encoded one.
Quoting LF as =0A may be unusual but RFC2045 allows it.
The issue was noticed and fixed by Jay Soffian. JC added a test
to protect the fix from regressing later.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 05:02:17 +0000 (06:02 +0100)]
diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver"
Also use "git_config_string" to simplify code where "cmd" is set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 05:01:59 +0000 (06:01 +0100)]
Add "const" qualifier to "char *excludes_file".
Also use "git_config_string" to simplify "config.c" code
where "excludes_file" is set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 05:01:41 +0000 (06:01 +0100)]
Add "const" qualifier to "char *editor_program".
Also use "git_config_string" to simplify "config.c" code
where "editor_program" is set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 05:01:11 +0000 (06:01 +0100)]
Add "const" qualifier to "char *pager_program".
Also use "git_config_string" to simplify "config.c" code
where "pager_program" is set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 05:00:24 +0000 (06:00 +0100)]
config: add 'git_config_string' to refactor string config variables.
In many places we just check if a value from the config file is not
NULL, then we duplicate it and return 0. This patch introduces the new
'git_config_string' function to do that.
This function is also used to refactor some code in 'config.c'.
Refactoring other files is left for other patches.
Also not all the code in "config.c" is refactored, because the function
takes a "const char **" as its first parameter, but in many places a
"char *" is used instead of a "const char *". (And C does not allow
using a "char **" instead of a "const char **" without a warning.)
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 16 Feb 2008 04:59:53 +0000 (05:59 +0100)]
diff.c: remove useless check for value != NULL
It is not necessary to check if value != NULL before calling
'parse_lldiff_command' as there is already a check inside this
function.
By the way this patch also improves the existing check inside
'parse_lldiff_command' by using:
return config_error_nonbool(var);
instead of:
return error("%s: lacks value", var);
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce [Thu, 14 Feb 2008 06:34:34 +0000 (01:34 -0500)]
fast-import: check return value from unpack_entry()
If the tree object we have asked for is deltafied in the packfile and
the delta did not apply correctly or was not able to be decompressed
from the packfile then we can get back NULL instead of the tree data.
This is (part of) the reason why read_sha1_file() can return NULL, so
we need to also handle it the same way.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow [Fri, 15 Feb 2008 19:14:18 +0000 (14:14 -0500)]
Validate nicknames of remote branches to prohibit confusing ones
The original problem was that the parsers for configuration files were
getting confused by seeing as nicknames remotes that involved
directory-changing characters. In particular, the branches config file
for ".." was particularly mystifying on platforms that can open
directories and read odd data from them.
The validation function was written by Junio Hamano (with a typo
corrected).
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Thu, 14 Feb 2008 05:50:00 +0000 (06:50 +0100)]
diff.c: replace a 'strdup' with 'xstrdup'.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 15 Feb 2008 17:37:54 +0000 (09:37 -0800)]
diff.c: fixup garding of config parser from value=NULL
Christian Couder noticed that there still were a handcrafted error()
call that we should have converted to config_error_nonbool() where
parse_lldiff_command() parses the configuration file.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Thu, 7 Feb 2008 05:23:46 +0000 (06:23 +0100)]
config: add test cases for empty value and no value config variables.
The tests in 't1300-repo-config.sh' did not check what happens when
an empty value like the following is used in the config file:
[emptyvalue]
variable =
Also it was not checked that a variable with no value like the
following:
[novalue]
variable
gives a boolean "true" value, while an ampty value gives a boolean
"false" value.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gerrit Pape [Thu, 7 Feb 2008 09:36:10 +0000 (09:36 +0000)]
cvsimport: have default merge regex also match beginning of commit message
The default value of @mergerx uses \W, which matches a non-word
character; this means that commit messages like "Merging FOO" are not
matched by default; using \b, which matches a word boundary, instead of
\W fixes that.
This change was suggested by Frédéric Brière through
http://bugs.debian.org/463468
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna [Tue, 12 Feb 2008 00:12:57 +0000 (01:12 +0100)]
git clone -s documentation: force a new paragraph for the NOTE
It should be loud and clear.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 12 Feb 2008 05:45:18 +0000 (00:45 -0500)]
status: suggest "git rm --cached" to unstage for initial commit
It makes no sense to suggest "git reset HEAD" since we have
no HEAD commit. This actually used to work but regressed in
f26a0012.
wt_status_print_cached_header was updated to take the whole
wt_status struct rather than just the reference field.
Previously the various code paths were sometimes sending in
s->reference and sometimes sending in NULL, making the
decision on whether this was an initial commit before we
even got to this function. Now we must check the initial
flag here.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 13 Feb 2008 21:13:21 +0000 (13:13 -0800)]
Protect get_author_ident_from_commit() from filenames in work tree
We used to use "cat-file commit $commit" to extract the original
author information from existing commit, but an earlier commit
5ac2715 (Consistent message encoding while reusing log from an
existing commit) changed it to use "git show -s $commit". If
you have a file in your work tree that can be interpreted as a
valid object name (e.g. "HEAD"), this conversion will not work.
Disambiguate by marking the end of revision parameter on the
comand line with an explicit "--" to fix this.
This breakage is most visible with rebase when a file called
"HEAD" exists in the worktree.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt [Tue, 12 Feb 2008 11:28:01 +0000 (12:28 +0100)]
upload-pack: Initialize the exec-path.
Since git-upload-pack has to spawn git-pack-objects, it has to make sure
that the latter can be found in the PATH. Without this patch an attempt
to clone or pull via ssh from a server fails if the git tools are not in
the standard PATH on the server even though git clone or git pull were
invoked with --upload-pack=/path/to/git-upload-pack.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Tue, 12 Feb 2008 19:50:57 +0000 (19:50 +0000)]
bisect: use verbatim commit subject in the bisect log
Due to a typo, the commit subject was shell expanded in the bisect log.
That is, if you had some shell pattern in the commit subject, bisect
would happily put all matching file names into the log.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sergei Organov [Wed, 13 Feb 2008 14:31:17 +0000 (17:31 +0300)]
git-cvsimport.txt: fix '-M' description.
Fix '-M' description. Old one reads as if the user can somehow "see"
the default regex when using -M along with -m.
Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 13 Feb 2008 07:39:03 +0000 (23:39 -0800)]
Revert "pack-objects: only throw away data during memory pressure"
This reverts commit
9c2174350cc0ae0f6bad126e15fe1f9f044117ab.
Nico analyzed and found out that this does not really help, and
I agree with it.
By the time this gets into action and data is actively thrown
away, performance simply goes down the drain due to the data
constantly being reloaded over and over and over and over and
over and over again, to the point of virtually making no
relative progress at all. The previous behavior of enforcing
the memory limit by dynamically shrinking the window size at
least had the effect of allowing some kind of progress, even if
the end result wouldn't be optimal.
And that's the whole point behind this memory limiting feature:
allowing some progress to be made when resources are too limited
to let the repack go unbounded.
Junio C Hamano [Mon, 11 Feb 2008 21:10:27 +0000 (13:10 -0800)]
config.c: guard config parser from value=NULL
user.{name,email}, core.{pager,editor,excludesfile,whitespace} and
i18n.{commit,logoutput}encoding all expect string values.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 21:09:16 +0000 (13:09 -0800)]
builtin-log.c: guard config parser from value=NULL
format.suffix expects a string value. format.numbered is bool plus "auto"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 20:04:00 +0000 (12:04 -0800)]
imap-send.c: guard config parser from value=NULL
None of the configuration variables this expects is boolean.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 19:00:57 +0000 (11:00 -0800)]
wt-status.c: guard config parser from value=NULL
status.color.* and color.status.* expect a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 19:00:32 +0000 (11:00 -0800)]
setup.c: guard config parser from value=NULL
core.worktree expects a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 19:00:10 +0000 (11:00 -0800)]
remote.c: guard config parser from value=NULL
branch.*.{remote,merge} expect a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:59:17 +0000 (10:59 -0800)]
merge-recursive.c: guard config parser from value=NULL
merge.default, merge.*.{name,driver} expect a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:57:22 +0000 (10:57 -0800)]
http.c: guard config parser from value=NULL
http.sslcert and friends expect a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:56:26 +0000 (10:56 -0800)]
help.c: guard config parser from value=NULL
help.format configuration expects a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:56:06 +0000 (10:56 -0800)]
git.c: guard config parser from value=NULL
alias.* configuration expects a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:53:56 +0000 (10:53 -0800)]
diff.c: guard config parser from value=NULL
diff.external, diff.*.command, diff.color.*, color.diff.* and
diff.*.funcname configuration variables expect a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:53:36 +0000 (10:53 -0800)]
convert.c: guard config parser from value=NULL
filter.*.smudge and filter.*.clean configuration variables expect a
string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:52:15 +0000 (10:52 -0800)]
connect.c: guard config parser from value=NULL
core.gitproxy configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:51:31 +0000 (10:51 -0800)]
builtin-tag.c: guard config parser from value=NULL
user.signingkey configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:51:03 +0000 (10:51 -0800)]
builtin-show-branch.c: guard config parser from value=NULL
showbranch.default configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:50:06 +0000 (10:50 -0800)]
builtin-reflog.c: guard config parser from value=NULL
gc.reflogexpire and gc.reflogexpireunreachable configuration expect
a string value suitable for calling approxidate() with.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:48:55 +0000 (10:48 -0800)]
builtin-log.c: guard config parser from value=NULL
format.subjectprefix configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:48:12 +0000 (10:48 -0800)]
builtin-config.c: guard config parser from value=NULL
color configuration variables expect a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:46:39 +0000 (10:46 -0800)]
builtin-commit.c: guard config parser from value=NULL
commit.template configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:45:50 +0000 (10:45 -0800)]
builtin-branch.c: guard config parser from value=NULL
color.branch.* configuration variables expect a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:44:49 +0000 (10:44 -0800)]
builtin-apply.c: guard config parser from value=NULL
apply.whitespace configuration expects a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 18:41:18 +0000 (10:41 -0800)]
Add config_error_nonbool() helper function
This is used to report misconfigured configuration file that does not
give any value to a non-boolean variable, e.g.
[section]
var
It is perfectly fine to say it if the section.var is a boolean (it means
true), but if a variable expects a string value it should be flagged as
a configuration error.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna [Fri, 8 Feb 2008 14:26:18 +0000 (15:26 +0100)]
builtin-gc.c: guard config parser from value=NULL
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 9 Feb 2008 04:38:22 +0000 (20:38 -0800)]
archive-tar.c: guard config parser from value=NULL
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Sat, 9 Feb 2008 09:41:36 +0000 (10:41 +0100)]
Work around curl-gnutls not liking to be reinitialized
curl versions 7.16.3 to 7.18.0 included had a regression in which https
requests following curl_global_cleanup/init sequence would fail with ASN1
parser errors with curl-gnutls. Such sequences happen in some cases such
as git fetch.
We work around this by removing the http_init and http_cleanup calls from
get_refs_via_curl, replacing them with a transport->data initialization
with the http_walker (which does http_init).
While the http_walker is not currently used in get_refs_via_curl, http
and walker code refactor will make it use it.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonas Fonseca [Mon, 4 Feb 2008 22:01:20 +0000 (23:01 +0100)]
man pages are littered with .ft C and others
Jakub Narebski <jnareb@gmail.com> wrote Sun, Feb 03, 2008:
> Junio C Hamano wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> >
> > [From] http://thread.gmane.org/gmane.comp.version-control.git/53457/focus=53458
> Julian Phillips:
> > Are you using docbook xsl 1.72? There are known problems building the
> > manpages with that version. 1.71 works, and 1.73 should work when it get
> > released.
I was able to solve this problem with this patch, which adds a XSL file
used specifically for DOCBOOK_XSL_172=YesPlease and where dots and
backslashes are escaped properly so they won't be substituted to the
wrong thing further down the "DocBook XSL pipeline". Doing the escaping
in the existing callout.xsl breaks v1.70.1. Hopefully v1.73 will end
this part of the manpage nightmare.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
James Bowes [Mon, 4 Feb 2008 13:13:07 +0000 (08:13 -0500)]
Add a BuildRequires for gettext in the spec file.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 11 Feb 2008 07:26:25 +0000 (08:26 +0100)]
pack-objects: only throw away data during memory pressure
If pack-objects hit the memory limit, it deletes objects from the delta
window.
This patch make it only delete the data, which is recomputed, if needed again.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gerrit Pape [Fri, 8 Feb 2008 09:53:58 +0000 (09:53 +0000)]
builtin-commit: remove .git/SQUASH_MSG upon successful commit
After doing a merge --squash, and commit afterwards, the commit message
template SQUASH_MSG in the git directory is not removed, which means that
the content of SQUASH_MSG is used as default commit message for all
subsequent commits. So have git commit remove the file SQUASH_MSG from
the git directory upon a successful commit.
The problem was discovered by Frédéric Brière, reported through
http://bugs.debian.org/464656
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Steven Tweed [Thu, 7 Feb 2008 02:55:14 +0000 (02:55 +0000)]
Make git prune remove temporary packs that look like write failures
Write errors when repacking (eg, due to out-of-space conditions)
can leave temporary packs (and possibly other files beginning
with "tmp_") lying around which no existing
codepath removes and which aren't obvious to the casual user.
These can also be multi-megabyte files wasting noticeable space.
Unfortunately there's no way to definitely tell in builtin-prune
that a tmp_ file is not being used by a concurrent process,
such as a fetch. However, it is documented that pruning should
only be done on a quiet repository and --expire is honoured
(using code from Johannes Schindelin, along with a test case
he wrote) so that its safety is the same as that of loose
object pruning.
Since they might be signs of a problem (unlike orphaned loose
objects) the names of any removed files are printed.
Signed-off-by: David Tweed (david.tweed@gmail.com)
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Uwe Kleine-K\e,Av\e(Bnig [Mon, 11 Feb 2008 13:45:26 +0000 (14:45 +0100)]
rebase -i: accept -m as advertised in the man page
Signed-off-by: Uwe Kleine-K\e,Av\e(Bnig <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Mon, 11 Feb 2008 11:27:20 +0000 (11:27 +0000)]
Document that the default of branch.autosetupmerge is true
In
34a3e69 (git-branch: default to --track) the default was changed to
true, to help new git users. But yours truly forgot to update the
documentation. This fixes it.
Noticed by Kalle Olavi Niemitalo.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Sun, 10 Feb 2008 13:59:50 +0000 (13:59 +0000)]
bisect: allow starting with a detached HEAD
Instead of insisting on a symbolic ref, bisect now accepts detached
HEADs, too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Feb 2008 19:22:01 +0000 (11:22 -0800)]
git-pull documentation: fix markup
A note paragraph was mistakenly made into an indented monospace display.
Noticed by Miklos Vajna.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Frank Lichtenheld [Mon, 11 Feb 2008 00:23:03 +0000 (01:23 +0100)]
config: Fix --unset for continuation lines
find_beginning_of_line didn't take into account that the
previous line might have ended with \ in which case it shouldn't
stop but continue its search.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tim Stoakes [Sun, 10 Feb 2008 04:19:08 +0000 (14:49 +1030)]
Fix typo in 'blame' documentation.
Signed-off-by: Tim Stoakes <tim@stoakes.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 7 Feb 2008 08:02:08 +0000 (00:02 -0800)]
gitattributes: fix relative path matching
There was an embarrassing pair of off-by-one miscounting that
failed to match path "a/b/c" when "a/.gitattributes" tried to
name it with relative path "b/c".
This fixes it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Timo Hirvonen [Wed, 6 Feb 2008 12:16:08 +0000 (14:16 +0200)]
Fix parsing numeric color values
Numeric color only worked if it was at end of line.
Noticed by Chris Larson <clarson@kergoth.com>.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gerrit Pape [Wed, 6 Feb 2008 07:03:53 +0000 (07:03 +0000)]
INSTALL: git-merge no longer uses cpio
Since
a64d7784e830b3140e7d0f2b45cb3d8fafb84cca git merge doesn't use cpio
anymore, adapt the documentation.
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jörg Sommer [Sat, 2 Feb 2008 23:58:07 +0000 (00:58 +0100)]
git-remote documentation: fix synopsis to match description
In the text, the argument of -m is <master> which should be used in the
command synopsis, too.
Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jörg Sommer [Sat, 2 Feb 2008 23:58:06 +0000 (00:58 +0100)]
git-am: fix type in its usage string
Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 3 Feb 2008 08:00:09 +0000 (00:00 -0800)]
Fix "git-commit -C $tag"
The scripted version might not have handled this correctly
either, but the version rewritten in C definitely does not grok
this and complains $tag is not a commit object.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jari Aalto [Sat, 2 Feb 2008 14:03:48 +0000 (16:03 +0200)]
Documentation/git-stash.txt: Adjust SYNOPSIS command syntax (2)
Adjust the command syntax to better reflect the call parameters:
[save] [message...] => [save [<message>]].
Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 2 Feb 2008 04:40:30 +0000 (20:40 -0800)]
Update stale documentation links from the main documentation.
This could have been part of the 1.5.4 commit, but it isn't.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 2 Feb 2008 03:10:10 +0000 (19:10 -0800)]
GIT 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 2 Feb 2008 03:06:56 +0000 (19:06 -0800)]
Fix "git checkout -b foo ':/substring'"
Because ':/substring' extended SHA1 expression cannot take
postfix modifiers such as ^{tree} and ^{commit}, we would need
to do it in multiple steps. With the patch, you can start a new
branch from a randomly-picked commit whose message has the named
string in it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michele Ballabio [Thu, 31 Jan 2008 21:59:11 +0000 (22:59 +0100)]
Fix typo in a comment in t/test-lib.sh
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna [Thu, 31 Jan 2008 19:55:57 +0000 (20:55 +0100)]
git rev-parse manpage: spelling fix
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 31 Jan 2008 21:51:42 +0000 (13:51 -0800)]
Revert "filter-branch docs: remove brackets so not to imply revision arg is optional"
This reverts commit
c41b439244c51b30c60953192816afc91e552578, as
we decided to default to HEAD when revision parameters are missing
and they are no longer mandatory.
Jean-Luc Herren [Thu, 31 Jan 2008 02:06:04 +0000 (03:06 +0100)]
Documentation/git-cvsserver: Fix typo
Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Wed, 30 Jan 2008 19:33:04 +0000 (13:33 -0600)]
filter-branch: assume HEAD if no revision supplied
filter-branch previously took the first non-option argument as the name for
a new branch. Since
dfd05e38, it now takes a revision or a revision range
and modifies the current branch. Update to operate on HEAD by default to
conform with standard git interface practice.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Thu, 31 Jan 2008 00:41:25 +0000 (18:41 -0600)]
filter-branch docs: remove brackets so not to imply revision arg is optional
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce [Wed, 30 Jan 2008 06:21:56 +0000 (01:21 -0500)]
Use 'printf %s $x' notation in t5401
We only care about getting what should be an empty string and
sending it to a file, without a trailing LF, so the empty string
translates into a 0 byte file. Earlier when I originally wrote
these lines Mac OS X allowed the format string of printf to be
the empty string, but more recent versions appear to have been
'improved' with error messages if the format is not given.
This may cause problems if we ever wind up with changes to the hook
tests. A minor cleanup makes the test more safe on all systems,
by conforming to accepted printf conventions.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Mon, 28 Jan 2008 21:16:02 +0000 (15:16 -0600)]
filter-branch.sh: remove temporary directory on failure
One of the first things filter-branch does is to create a temporary
directory. This directory is eventually removed by the script during
normal operation, but is not removed if the script encounters an error.
Set a trap to remove it when the script terminates for any reason.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Tue, 29 Jan 2008 22:41:30 +0000 (16:41 -0600)]
git-relink: avoid hard linking in objects/info directory
git-relink is intended to search for packs and loose objects in
common between two repositories and to replace the one set with
hard links to the other. Files other than packs and loose objects
should not be touched, so add the "info" sub-directory to the
pattern of directory excludes.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bruno Ribas [Wed, 30 Jan 2008 05:37:56 +0000 (03:37 -0200)]
gitweb: Make use of the $git_dir variable at sub git_get_project_description
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Tue, 29 Jan 2008 19:52:32 +0000 (20:52 +0100)]
gitweb: Add info about $projectroot and $projects_list to gitweb/README
Those two configuration variables are important enough that it is
worth to explicitely write about them in the "Gitweb config file
variables" section even if they are usually set during build by
GITWEB_PROJECTROOT and GITWEB_LIST build (Makefile) configuration
variables.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jim Meyering [Tue, 29 Jan 2008 19:38:55 +0000 (20:38 +0100)]
fix doc typos
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>