summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-21git_config_*: don't assume we are parsing a config fileJeff King
These functions get called by other code, including parsing config options from the command line. In that case, config_file_name is NULL, leading to an ugly message or even a segfault on some implementations of printf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-21prefix_path: use is_absolute_path() instead of *orig == '/'Johannes Sixt
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-21git-clean: handle errors if removing files failsMiklos Vajna
git-clean simply ignored errors if removing a file or directory failed. This patch makes it raise a warning and the exit code also greater than zero if there are remaining files. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-21Merge branch 'mk/color'Junio C Hamano
* mk/color: Add color.ui variable which globally enables colorization if set
2008-02-21Merge branch 'js/maint-cvsexport'Junio C Hamano
* js/maint-cvsexport: cvsexportcommit: be graceful when "cvs status" reorders the arguments Conflicts: t/t9200-git-cvsexportcommit.sh
2008-02-21Merge branch 'js/maint-http-push'Junio C Hamano
* js/maint-http-push: http-push: avoid a needless goto http-push: do not get confused by submodules http-push: avoid invalid memory accesses
2008-02-21Merge branch 'jk/empty-tree'Junio C Hamano
* jk/empty-tree: add--interactive: handle initial commit better hard-code the empty tree object
2008-02-21Merge branch 'lt/revision-walker'Junio C Hamano
* lt/revision-walker: Add "--show-all" revision walker flag for debugging
2008-02-21Merge branch 'mc/prefix'Junio C Hamano
* mc/prefix: Avoid a useless prefix lookup in strbuf_expand()
2008-02-21Merge branch 'bc/fopen'Junio C Hamano
* bc/fopen: Add compat/fopen.c which returns NULL on attempt to open directory
2008-02-21Merge branch 'jc/setup'Junio C Hamano
* jc/setup: builtin-mv: minimum fix to avoid losing files git-add: adjust to the get_pathspec() changes. Make blame accept absolute paths setup: sanitize absolute and funny paths in get_pathspec()
2008-02-21Merge branch 'maint'Junio C Hamano
* maint: Clarified the meaning of git-add -u in the documentation git-clone.sh: properly configure remote even if remote's head is dangling Documentation/git-stash: document options for git stash list send-email: squelch warning due to comparing undefined $_ to ""
2008-02-21Clarified the meaning of git-add -u in the documentationPekka Kaitaniemi
The git-add documentation did not state clearly that the -u switch updates only the tracked files that are in the current directory and its subdirectories. Signed-off-by: Pekka Kaitaniemi <kaitanie@cc.helsinki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20git-clone.sh: properly configure remote even if remote's head is danglingGerrit Pape
When cloning a remote repository which's HEAD refers to a nonexistent ref, git-clone cloned all existing refs, but failed to write the configuration for 'remote'. Now it detects the dangling remote HEAD, refuses to checkout any local branch since HEAD refers to nowhere, but properly writes the configuration for 'remote', so that subsequent 'git fetch's don't fail. The problem was reported by Daniel Jacobowitz through http://bugs.debian.org/466581 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20git.el: Set process-environment instead of invoking envDavid Kågedal
This will make it a little less posix-dependent, and more efficient. Included is also a minor doc improvement. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Documentation/git-stash: document options for git stash listMiklos Vajna
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20send-email: squelch warning due to comparing undefined $_ to ""Jay Soffian
The check to see if initial_reply_to is defined was also comparing $_ to "" for a reason I cannot ascertain (looking at the commit which made the change didn't provide enlightenment), but if $_ is undefined, perl generates a warning. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Merge branch 'maint'Junio C Hamano
* maint: Rename git-core rpm to just git and rename the meta-pacakge to git-all. push: document the status output Documentation/push: clarify matching refspec behavior push: indicate partialness of error message
2008-02-20cvsexportcommit: be graceful when "cvs status" reorders the argumentsJohannes Schindelin
In my use cases, "cvs status" sometimes reordered the passed filenames, which often led to a misdetection of a dirty state (when it was in reality a clean state). I finally tracked it down to two filenames having the same basename. So no longer trust the order of the results blindly, but actually check the file name. Since "cvs status" only returns the basename (and the complete path on the server which is useless for our purposes), run "cvs status" several times with lists consisting of files with unique (chomped) basenames. Be a bit clever about new files: these are reported as "no file <blabla>", so in order to discern it from existing files, prepend "no file " to the basename. In other words, one call to "cvs status" will not ask for two files "blabla" (which does not yet exist) and "no file blabla" (which exists). This patch makes cvsexportcommit slightly slower, when the list of changed files has non-unique basenames, but at least it is accurate now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Rename git-core rpm to just git and rename the meta-pacakge to git-all.Kristian Høgsberg
This fixes my favorite annoyance with the git rpm packaging: don't pull in tla when I say yum install git! You wouldn't expect yum install gcc to pull in gcc-gfortran, right? With this change, and blanket 'yum update' will automatically pull in the new 'git' package and push out the old 'git-core', and if the old 'git' package was installed 'git-all' will be pulled in instead. A couple of things do break though: 'yum update git-core', because yum behaves differently when given a specific package name - it doesn't follow obsoletes. Instead, 'yum install git' will pull in the new git rpm, which will then push out the old 'git-core'. Similarly, to get the newest version of the meta package, 'yum install git-all' will install git-all, which then pushes out the old 'git' meta package. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Technical documentation of the run-command API.Johannes Sixt
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Correct git-pull documentationJay Soffian
The --rebase option was documented in the wrong place (under MERGE STRATEGIES instead of OPTIONS). Noted the branch.<name>.rebase option. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' formJakub Narebski
URLs generated by href(..., -replay=>1) (which includes 'next page' links and alternate view links) didn't set project info correctly when current page URL is in pathinfo form. This resulted in broken links such like: http://www.example.com/w/ARRAY(0x85a5318)?a=shortlog;pg=1 if the 'pathinfo' feature was used, or http://www.example.com/w/?a=shortlog;pg=1 if it wasn't, instead of correct: http://www.example.com/w/project.git?a=shortlog;pg=1 This was caused by the fact that href() always replays params in the arrayref form, were they multivalued or singlevalued, and the code dealing with 'pathinfo' feature couldn't deal with $params{'project'} being arrayref. Setting $params{'project'} is moved before replaying params; this ensures that 'project' parameter is processed correctly. Noticed-by: Peter Oberndorfer <kumbayo84@arcor.de> Noticed-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20push: document the status outputJeff King
The output was meant to be a balance of self-explanatory and terse. In case we have erred too far on the terse side, it doesn't hurt to explain in more detail what each line means. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Documentation/push: clarify matching refspec behaviorJeff King
The previous text was correct, but it was easy to miss the fact that we are talking about "matching" refs. That is, the text can be parsed as "we push the union of the sets of remote and local heads" and not "we push the intersection of the sets of remote and local heads". (The former actually doesn't make sense if you think about it, since we don't even _have_ some of those heads). A careful reading would reveal the correct meaning, but it makes sense to be as explicit as possible in documentation. We also explicitly use and introduce the term "matching"; this is a term discussed on the list, and it seems useful to for users to be able to refer to this behavior by name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20push: indicate partialness of error messageJeff King
The existing message indicates that an error occured during push, but it is unclear whether _any_ refs were actually pushed (even though the status table above shows which were pushed successfully and which were not, the message "failed to push" implies a total failure). By indicating that "some refs" failed, we hopefully indicate to the user that the table above contains the details. We could also put in an explicit "see above for details" message, but it seemed to clutter the output quite a bit (both on a line of its own, or at the end of the error line, which inevitably wraps). This could also be made more fancy if the transport mechanism passed back more details on how many refs succeeded and failed: error: failed to push %d out of %d refs to '%s' Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19API documentation for remote.hDaniel Barkalow
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19Simplify setup of $GIT_DIR in git-sh-setup.shLars Hjemli
Using 'git rev-parse --git-dir' makes the code shorter and more future- proof. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19Merge branch 'mk/maint-parse-careful'Junio C Hamano
* mk/maint-parse-careful: peel_onion: handle NULL check return value from parse_commit() in various functions parse_commit: don't fail, if object is NULL revision.c: handle tag->tagged == NULL reachable.c::process_tree/blob: check for NULL process_tag: handle tag->tagged == NULL check results of parse_commit in merge_bases list-objects.c::process_tree/blob: check for NULL reachable.c::add_one_tree: handle NULL from lookup_tree mark_blob/tree_uninteresting: check for NULL get_sha1_oneline: check return value of parse_object read_object_with_reference: don't read beyond the buffer
2008-02-19peel_onion: handle NULLMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19check return value from parse_commit() in various functionsMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19parse_commit: don't fail, if object is NULLMartin Koegler
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>
2008-02-19revision.c: handle tag->tagged == NULLMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19reachable.c::process_tree/blob: check for NULLMartin Koegler
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>
2008-02-19process_tag: handle tag->tagged == NULLMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19check results of parse_commit in merge_basesMartin Koegler
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>
2008-02-19list-objects.c::process_tree/blob: check for NULLMartin Koegler
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>
2008-02-19reachable.c::add_one_tree: handle NULL from lookup_treeMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19mark_blob/tree_uninteresting: check for NULLMartin Koegler
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>
2008-02-19get_sha1_oneline: check return value of parse_objectMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19read_object_with_reference: don't read beyond the bufferMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18Add color.ui variable which globally enables colorization if setMatthias Kestenholz
Signed-off-by: Matthias Kestenholz <mk@spinlock.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18check return code of prepare_revision_walkMartin Koegler
A failure in prepare_revision_walk can be caused by a not parseable object. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18deref_tag: handle tag->tagged = NULLMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18deref_tag: handle return value NULLMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18help.c: use 'git_config_string' to get 'help_default_format'.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18Merge branch 'br/gitweb'Junio C Hamano
* br/gitweb: gitweb: Use the config file to set repository owner's name.
2008-02-18gitweb: Add new option -nohtml to quot_xxx subroutinesJakub Narebski
Add support for new option -nohtml to quot_cec and quot_upr subroutines, to have output not wrapped in HTML tags. This makes those subroutines suitable to quoting attributes values, and for plain text output quoting. Currently this API is not used yet. While at it fix whitespace, and use ';' as delimiter, not separator. The option to not wrap quot_cec output in HTML tag were proposed originally in patch: "Don't open a XML tag while another one is already open" Message-ID: <20080216191628.GK30676@schiele.dyndns.org> by Robert Schiele. Originally the parameter was named '-notag', was also supportted by esc_html (but not esc_path) which passed it down to quot_cec. Mentioned patch was meant to fix the bug Martin Koegler reported in his mail "Invalid html output repo.or.cz (alt-git.git)" Message-ID: <20080216130037.GA14571@auto.tuwien.ac.at> which was fixed in different way (do not use esc_html to escape and quote HTML attributes). Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18gitweb: Fix displaying unchopped argument in chop_and_escape_strJakub Narebski
Do not use esc_html to escape [title] _attribute_ of a HTML element, and quote unprintable characters. Replace unprintable characters by '?' and use CGI method to generate HTML element and do the escaping. This caused bug noticed by Martin Koegler, Message-ID: <20080216130037.GA14571@auto.tuwien.ac.at> that for bad commit encoding in author name, the title attribute (here to show full, not shortened name) had embedded HTML code in it, result of quoting unprintable characters the gitweb/HTML way. This of course broke the HTML, causing page being not displayed in XML validating web browsers. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18bisect view: check for MinGW32 and MacOSX in addition to X11Johannes Schindelin
When deciding if gitk or git-log should be used to visualize the current state, the environment variable DISPLAY was checked. Now, we check MSYSTEM (for MinGW32/MSys) and SECURITYSESSIONID (for MacOSX) in addition. Note that there is currently no way to ssh into MinGW32, and that SECURITYSESSIONID is not set automatically on MacOSX when ssh'ing into it. So this patch should be safe. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>