summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-07-16Merge branch 'js/maint-daemon-syslog' into maintLibravatar Junio C Hamano1-20/+50
* js/maint-daemon-syslog: git daemon: avoid calling syslog() from a signal handler
2008-07-16rebase-i: keep old parents when preserving mergesLibravatar Stephan Beyer1-0/+2
When "rebase -i -p" tries to preserve merges of unrelated branches, it lost some parents: - When you have more than two parents, the commit in the new history ends up with fewer than expected number of parents and this breakage goes unnoticed; - When you are rebasing a merge with two parents and one is lost, the command tries to cherry-pick the original merge commit, and the command fails. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16t7600-merge: Use test_expect_failure to test option parsingLibravatar Johannes Sixt1-30/+6
It used plain 'if git merge ...', which hides a segfault. The test does not pass. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16Fix buffer overflow in prepare_attr_stackLibravatar Dmitry Potapov1-6/+9
If PATH_MAX on your system is smaller than a path stored in the git repo, it may cause the buffer overflow in prepare_attr_stack. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16Fix buffer overflow in git diffLibravatar Dmitry Potapov5-25/+34
If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16Fix buffer overflow in git-grepLibravatar Dmitry Potapov1-12/+15
If PATH_MAX on your system is smaller than any path stored in the git repository, that can cause memory corruption inside of the grep_tree function used by git-grep. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16git-cvsserver: fix call to nonexistant cleanupWorkDir()Libravatar Lars Noschinski1-1/+1
git-cvsserver.perl contained a single call to a nonexistant function cleanupWorkDir(). This was obviously a typo for cleanupWorkTree(). Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16Documentation/git-cherry-pick.txt et al.: Fix misleading -n descriptionLibravatar Petr Baudis2-13/+13
The manual page of git-cherry-pick and git-revert asserts that -n works primarily on the working tree, while in fact the primary object it operates on is the index, and the changes only "accidentally" propagate to the working tree. This e.g. leads innocent #git IRC folks to believe that you can use -n to prepare changes for git-add -i staging. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13GIT 1.5.6.3Libravatar Junio C Hamano2-9/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13git-am: Do not exit silently if committer is unsetLibravatar Stephan Beyer1-1/+2
Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-12t0004: fix timing bugLibravatar Junio C Hamano1-9/+10
The test created an initial commit, made .git/objects unwritable and then exercised various codepaths to create loose commit, tree and blob objects to make sure the commands notice failures from these attempts. However, the initial commit was not preceded with test_tick, which made its object name depend on the timestamp. The names of all the later tree and blob objects the test tried to create were static. If the initial commit's object name happened to begin with the same two hexdigits as the tree or blob objects the test later attempted to create, the fan-out directory in which these tree or blob would be created is already created when the initial commit was made, and the object creation succeeds, and commands being tested should not notice any failure --- in short, the test was bogus. This makes the fan-out directories also unwritable, and adds test_tick before the commit object creation to make the test repeatable. The contents of the file to create a blob from "a" to "60" is to force the name of the blob object to begin with "1b", which shares the fan-out directory with the initial commit that is created with the test. This was useful when diagnosing the breakage of this test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-11git-mailinfo: document the -n optionLibravatar Lukas Sandström2-2/+5
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-11Fix backwards-incompatible handling of core.sharedRepositoryLibravatar Petr Baudis2-1/+24
06cbe85 (Make core.sharedRepository more generic, 2008-04-16) broke the traditional setting of core.sharedRepository to true, which was to make the repository group writable: with umask 022, it would clear the permission bits for 'other'. (umask 002 did not exhibit this behaviour since pre-chmod() check in adjust_shared_perm() fails in that case.) The call to adjust_shared_perm() should only loosen the permission. If the user has umask like 022 or 002 that allow others to read, the resulting files should be made readable and writable by group, without restricting the readability by others. This patch fixes the adjust_shared_perm() mode tweak based on Junio's suggestion and adds the appropriate tests to t/t1301-shared-repo.sh. Cc: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08Start preparing release notes for 1.5.6.3Libravatar Junio C Hamano2-1/+43
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08git-submodule - Fix bugs in adding an existing repo as a moduleLibravatar Mark Levedahl1-2/+1
git-submodule add would trip if path to the submodule included a space, or if its .git was a gitdir: link to a GIT_DIR kept elsewhere. Fix both. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08bash: offer only paths after '--'Libravatar SZEDER Gábor1-0/+30
Many git commands use '--' to separate subcommands, options, and refs from paths. However, the programmable completion for several of these commands does not respect the '--', and offer subcommands, options, or refs after a '--', although only paths are permitted. e.g. 'git bisect -- <TAB>' offers subcommands, 'git log -- --<TAB>' offers options and 'git log -- git<TAB>' offers all gitgui tags. The completion for the following commands share this wrong behaviour: am add bisect commit diff log reset shortlog submodule gitk. To avoid this, we check the presence of a '--' on the command line first and let the shell do filename completion, if one is found. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08Remove unnecessary pack-*.keep file after successful git-cloneLibravatar Shawn O. Pearce2-3/+24
Once a clone is successful we no longer need to hold onto the .keep file created by the transport. Delete the file so we can later repack the complete repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08make deleting a missing ref more quietLibravatar Jeff King3-3/+9
If git attempts to delete a ref, but the unlink of the ref file fails, we print a message to stderr. This is usually a good thing, but if the error is ENOENT, then it indicates that the ref has _already_ been deleted. And since that's our goal, it doesn't make sense to complain to the user. This harmonizes the error reporting behavior for the unpacked and packed cases; the packed case already printed nothing on ENOENT, but the unpacked printed unconditionally. Additionally, send-pack would, when deleting the tracking ref corresponding to a remote delete, print "Failed to delete" on any failure. This can be a misleading message, since we actually _did_ delete at the remote side, but we failed to delete locally. Rather than make the message more precise, let's just eliminate it entirely; the delete_ref routine already takes care of printing out a much more specific message about what went wrong. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08Merge branch 'qq/maint' into maintLibravatar Junio C Hamano1-0/+2
* qq/maint: run_command(): respect GIT_TRACE
2008-07-08Merge branch 'lt/racy-empty' into maintLibravatar Junio C Hamano1-0/+16
* lt/racy-empty: racy-git: an empty blob has a fixed object name
2008-07-07Merge branch 'qq/maint' (early part) into maintLibravatar Junio C Hamano15-88/+73
* 'qq/maint' (early part): git-svn.perl: workaround assertions in svn library 1.5.0 mailinfo: feed the correct line length to decode_transfer_encoding() git-clone: remove leftover debugging fprintf(). Fix "config_error_nonbool" used with value instead of key clone -q: honor "quiet" option over native transports. attribute documentation: keep EXAMPLE at end builtin-commit.c: Use 'git_config_string' to get 'commit.template' http.c: Use 'git_config_string' to clean up SSL config. diff.c: Use 'git_config_string' to get 'diff.external' convert.c: Use 'git_config_string' to get 'smudge' and 'clean' builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix' Documentation cvs: Clarify when a bare repository is needed Documentation: be precise about which date --pretty uses
2008-07-07run_command(): respect GIT_TRACELibravatar Johannes Schindelin1-0/+2
When GIT_TRACE is set, the user is most likely wanting to see an external command that is about to be executed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-07git-svn.perl: workaround assertions in svn library 1.5.0Libravatar Gerrit Pape1-0/+2
With subversion 1.5.0 (C and perl libraries) the git-svn selftest t9101-git-svn-props.sh fails at test 25 and 26. The following commands cause assertions in the svn library $ cd deeply $ git-svn propget svn:ignore . perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed. Aborted $ git-svn propget svn:ignore .. perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_subr/path.c:120: svn_path_join: Assertion `is_canonical(component, clen)' failed. With this commit, git-svn makes sure the path doesn't start with a slash, and is not a dot, working around these assertions. The breakage was reported by Lucas Nussbaum through http://bugs.debian.org/489108 Signed-off-by: Gerrit Pape <pape@smarden.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06mailinfo: feed the correct line length to decode_transfer_encoding()Libravatar Junio C Hamano1-0/+1
When handling a MIME multipart message, multi-part boundary lines are eaten by a call to handle_boundary() function from the main loop of handle_body(), and after that happens, we should update the line length correctly, because handle_boundary() udpates line[] with new data. This was caused by a thinko in 9aa2309 (mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepaths, 2008-05-25). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06git-clone: remove leftover debugging fprintf().Libravatar Alex Riesen1-1/+0
Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06Fix grammar in git-rev-parse(1).Libravatar Mikael Magnusson1-2/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06git daemon: avoid calling syslog() from a signal handlerLibravatar Johannes Schindelin1-20/+50
Signal handlers should never call syslog(), as that can raise signals of its own. Instead, call the syslog() from the master process. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Fix "config_error_nonbool" used with value instead of keyLibravatar Christian Couder1-1/+1
The function "config_error_nonbool", that is defined in "config.c", is used to report an error when a config key in the config file should have a corresponding value but it hasn't. So the parameter to this function should be the key and not the value, because the value is undefined. And it could crash if the value is used. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05clone -q: honor "quiet" option over native transports.Libravatar Junio C Hamano1-1/+3
The earlier built-in conversion seems to have broken "git-clone"; this teaches the command to honor the "-q" option again when talking to the remote end over native transports (file://, git:// and ssh://). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05attribute documentation: keep EXAMPLE at endLibravatar Junio C Hamano1-16/+17
The document gives overall definition of states in DESCRIPTION, describes various aspects of git operations that can be influenced in EFFECTS, and finally gives examples in the EXAMPLE section. Archive creation however was somehow documented after the EXAMPLE section, not insode EFFECTS. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05builtin-commit.c: Use 'git_config_string' to get 'commit.template'Libravatar Brian Hetro1-7/+4
Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05http.c: Use 'git_config_string' to clean up SSL config.Libravatar Brian Hetro1-24/+12
Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05diff.c: Use 'git_config_string' to get 'diff.external'Libravatar Brian Hetro1-6/+2
Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05convert.c: Use 'git_config_string' to get 'smudge' and 'clean'Libravatar Brian Hetro1-16/+9
Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and ↵Libravatar Brian Hetro1-12/+4
'format.suffix' Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Documentation cvs: Clarify when a bare repository is neededLibravatar Matthew Ogilvie3-0/+14
New users sometimes import a project and then immediately try to use the imported repository as a central shared repository. This provides pointers about setting up a bare repository for that in the parts of the documentation dealing with CVS migration. Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Documentation: be precise about which date --pretty usesLibravatar Nikolaus Schulz1-4/+4
This makes it explicit that the --pretty formats 'medium' and 'email' use the author date (and ignore the committer date). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04GIT 1.5.6.2Libravatar Junio C Hamano2-11/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04Fix executable bits in t/ scriptsLibravatar Junio C Hamano2-0/+0
Pointed out by Ramsay Jones. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04Work around gcc warnings from curl headersLibravatar Junio C Hamano2-12/+10
After master.k.org upgrade, I started seeing these warning messages: transport.c: In function 'get_refs_via_curl': transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option It appears that the curl header wants to enforce the function signature for callback function given to curl_easy_setopt() to be compatible with that of (*curl_write_callback) or fwrite. This patch seems to work the issue around. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-02Merge branch 'js/maint-clone-insteadof' into maintLibravatar Junio C Hamano1-1/+9
* js/maint-clone-insteadof: clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig clone: respect url.insteadOf setting in global configs
2008-07-02Merge branch 'jk/maint-fetch-ref-hier' into maintLibravatar Junio C Hamano1-16/+35
* jk/maint-fetch-ref-hier: fetch: give a hint to the user when local refs fail to update fetch: report local storage errors in status table
2008-07-02Merge branch 'jc/maint-reset' into maintLibravatar Junio C Hamano2-5/+81
* jc/maint-reset: Allow "git-reset path" when unambiguous
2008-07-02Fix describe --tags --long so it does not segfaultLibravatar Shawn O. Pearce2-1/+3
If we match a lightweight (non-annotated tag) as the name to output and --long was requested we do not have a tag, nor do we have a tagged object to display. Instead we must use the object we were passed as input for the long format display. Reported-by: Mark Burton <markb@ordern.com> Backtraced-by: Mikael Magnusson <mikachu@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Start draft release notes for 1.5.6.2Libravatar Junio C Hamano2-1/+32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Fix 'git show' on signed tag of signed tag of commitLibravatar Thomas Rast1-1/+1
The cmd_show loop resolves tags by showing them, then pointing the object to the 'tagged' member. However, this object is not fully initialized; it only contains the SHA1. (This resulted in a segfault if there were two levels of tags.) We apply parse_object to get a full object. Noticed by Kalle Olavi Niemitalo on IRC. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-29fetch: give a hint to the user when local refs fail to updateLibravatar Jeff King1-4/+11
There are basically two categories of update failures for local refs: 1. problems outside of git, like disk full, bad permissions, etc. 2. D/F conflicts on tracking branch ref names In either case, there should already have been an error message. In case '1', hopefully enough information has already been given that the user can fix it. In the case of '2', we can hint that the user can clean up their tracking branch area by using 'git remote prune'. Note that we don't actually know _which_ case we have, so the user will receive the hint in case 1, as well. In this case the suggestion won't do any good, but hopefully the user is smart enough to figure out that it's just a hint. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-29doc/rev-parse: clarify reflog vs --until for specifying revisionsLibravatar Jeff King1-1/+4
The rev-parse manpage introduces the branch@{date} syntax, and mentions the reflog specifically. However, new users may not be familiar with the distinction between the reflog and the commit date, so let's help them out with a "you may be interested in --until" pointer. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-29clone: respect the settings in $HOME/.gitconfig and /etc/gitconfigLibravatar Johannes Schindelin1-0/+7
After initializing the config in the newly-created repository, we need to unset GIT_CONFIG so that the global configs are read again. Noticed by Pieter de Bie. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-28git-svn: don't sanitize remote names in configLibravatar Eric Wong1-12/+3
The original sanitization code was just taken from the remotes2config.sh shell script in contrib. Credit to Avery Pennarun for noticing this mistake, and Junio for clarifying the rules for config section names: Junio C Hamano wrote in <7vfxr23s6m.fsf@gitster.siamese.dyndns.org>: > In > > [foo "bar"] baz = value > > foo and baz must be config.c::iskeychar() (and baz must be isalpha()), but > "bar" can be almost anything. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>