aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* use xrealloc in help.cJames Bowes2007-03-27
| | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* read-tree: use xcallocJames Bowes2007-03-27
| | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix "getaddrinfo()" bugletLinus Torvalds2007-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least in Linux glibc, "getaddrinfo()" has a very irritating feature (or bug, who knows..). Namely if you pass it in an empty string for the service name, it will happily and quietly consider it identical to a NULL port pointer, and return port number zero and no errors. Which obviously will not work. Maybe that's what it's really expected to do, although the man-page for getaddrinfo() certainly implies that it's a bug. So when somebody passes me a "please pull" request pointing to something like the following git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git (note the extraneous colon at the end of the host name), git would happily try to connect to port 0, which would generally just cause the remote to not even answer, and the "connect()" will take a long time to time out. So to work around the glibc feature/bug, just notice this empty port case automatically. Also, add the port information to the error information when it fails to look up (maybe it's the host-name that fails, maybe it's the port-name - we should print out both). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Makefile: remove test-chmtime program in target clean.Gerrit Pape2007-03-27
| | | | | | | While running 'make test', the test-chmtime program is created, and should be cleaned up on 'make clean'. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Cleanup and uniquify die_error callsJakub Narebski2007-03-27
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_file.c (write_sha1_file): Detect close failureJunio C Hamano2007-03-27
| | | | | | This is in the same spirit as earlier fix to write_sha1_from_fd(). Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.el: Display some information about the HEAD commit.Alexandre Julliard2007-03-27
| | | | | | | | Use git-log --pretty=oneline to print a short description of the current HEAD (and merge heads if any) in the buffer header. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document git-log --first-parentJunio C Hamano2007-03-27
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Bisect: add checks at the beginning of "git bisect run".Christian Couder2007-03-27
| | | | | | | | | | | | We may be able to "run" with only one good revision given and then verify that the result of the first run is bad. And perhaps also the other way around. But for now let's check that we have at least one bad and one good revision before we start to run. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_file.c (write_sha1_from_fd): Detect close failure.Jim Meyering2007-03-27
| | | | | | | | | | I stumbled across this in the context of the fchmod 0444 patch. At first, I was going to unlink and call error like the two subsequent tests do, but a failed write (above) provokes a "die", so I made this do the same. This is testing for a write failure, after all. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-rm: don't remove newly added file without -fJeff King2007-03-27
| | | | | | | | | | | | | | | | | | Given this set of commands: $ echo "newly added file" >new $ git add new $ git rm new the file "new" was previously removed from the working directory and the index. Because it was not in HEAD, it is available only by searching for unreachable objects. Instead, we now err on the safe side and refuse to remove a file which is not referenced by HEAD. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Bisect: Use "git-show-ref --verify" when reseting.Christian Couder2007-03-25
| | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add example of config file and how to generate projects list to ↵Jakub Narebski2007-03-25
| | | | | | | | | | | gitweb/INSTALL Add simple example of config file (turning on and allowing override of a few %features). Also example config file and script to generate list of projects in a format that can be used as GITWEB_LIST / $projects_list. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT 1.5.1-rc2v1.5.1-rc2Junio C Hamano2007-03-25
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix rel_path() when not connected to the repository rootEric Wong2007-03-25
| | | | | | | | | | | | | | | This should fix fetching for people who did not use "git svn --minimize" or cannot connect to the repository root due to the lack of permissions. I'm not sure what I was on when I made the change to the rel_path() function in 4e9f6cc78e5d955bd0faffe76ae9aea6590189f1 that made it die() when we weren't connected to the repository root :x Thanks to Sven Verdoolaege for reporting this bug. Signed-off-by: Junio C Hamano <junkio@cox.net>
* use xmalloc in git.c and help.cJames Bowes2007-03-25
| | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/fpl'Junio C Hamano2007-03-25
|\ | | | | | | | | * jc/fpl: git-log --first-parent: show only the first parent log
| * git-log --first-parent: show only the first parent logJunio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | If your development history does not have fast-forward merges, i.e. the "first parent" of commits in your history are special than other parents, this option gives a better overview of the evolution of a particular branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Update README to point at a few key periodical messages to the listJunio C Hamano2007-03-25
| | | | | | | | | | | | | | | | They give a good starting point to new people who want to get involved. This owes suggestions by Martin Langhoff and Steven Grimm. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2007-03-25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: user-manual: introduce "branch" and "branch head" differently glossary: clean up cross-references glossary: stop generating automatically user-manual: Use def_ instead of ref_ for glossary references. user-manual.txt: fix a tiny typo. user-manual: run xsltproc without --nonet option
| * \ Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maintJunio C Hamano2007-03-25
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'maint' of git://linux-nfs.org/~bfields/git: user-manual: introduce "branch" and "branch head" differently glossary: clean up cross-references glossary: stop generating automatically user-manual: Use def_ instead of ref_ for glossary references. user-manual.txt: fix a tiny typo. user-manual: run xsltproc without --nonet option
| | * | user-manual: introduce "branch" and "branch head" differentlyJ. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was using "branch" to mean "head", but that's perhaps a little sloppy; so instead start by using the terms "branch head" and "head", while still quickly falling back on "branch", since that's what people actually say more frequently. Also include glossary references on the first uses of "head" and "tag". Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| | * | glossary: clean up cross-referencesJ. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Manual clean-up of cross-references, and also clean up a few definitions (e.g. git-rebase). Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| | * | glossary: stop generating automaticallyJ. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sort_glossary.pl script sorts the glossary, checks for duplicates, and automatically adds cross-references. But it's not so hard to do all that by hand, and sometimes the automatic cross-references are a little wrong; so let's run the script one last time and check in its output. Note: to make the output fit better into the user manual I also deleted the acknowledgements at the end, which was maybe a little rude; feel free to object and I can find a different solution. Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| | * | user-manual: Use def_ instead of ref_ for glossary references.J. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd like to start using references to the glossary in the user manual. The "ref_" prefix for these references seems a little generic; so replace with "def_". Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| | * | user-manual.txt: fix a tiny typo.Jim Meyering2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "file patch" was doubtless intended to be "file path", but "directory name" is clearer. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| | * | user-manual: run xsltproc without --nonet optionJ. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --nonet option prevents xsltproc from going to the network to find anything. But it always tries to find them locally first, so for a user with the necessary docbook stylesheets installed the build will work just fine without xsltproc attempting to use the network; all --nonet does is make it fail rather than falling back on that. That doesn't seem particularly helpful. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
* | | | Merge branch 'js/remote-show-push'Junio C Hamano2007-03-25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/remote-show-push: Teach git-remote to list pushed branches.
| * | | | Teach git-remote to list pushed branches.Johannes Sixt2007-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configured refspecs are printed almost verbatim, i.e. both the local and the remote branch name separated by a colon are printed; only the prefix 'refs/heads/' is removed, like this: Local branch(es) pushed with 'git push' master refs/tags/*:refs/tags/* next:next Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'maint'Junio C Hamano2007-03-25
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: gitweb: Add some installation notes in gitweb/INSTALL gitweb: Fix not marking signoff lines in "log" view gitweb: Don't escape attributes in CGI.pm HTML methods gitweb: Change to use explicitly function call cgi->escapHTML()
| * | | | gitweb: Add some installation notes in gitweb/INSTALLJakub Narebski2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some installation and configuration notes for gitweb in gitweb/INSTALL. Make use of filling gitweb configuration by Makefile. It does not cover (yet?) all the configuration variables and options. Some of contents duplicates information in gitweb/README file (it is referred from gitweb/INSTALL). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | gitweb: Fix not marking signoff lines in "log" viewJakub Narebski2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CSS selector for signoff lines style was too strict: in the "log" view the commit message is not encompassed in container "page_body" div. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | gitweb: Don't escape attributes in CGI.pm HTML methodsJakub Narebski2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to escape HTML tag's attributes in CGI.pm HTML methods (like CGI::a()), because CGI.pm does attribute escaping automatically. $cgi->a({ ... -attribute => atribute_value }, tag_contents) is translated to <a ... attribute="attribute_value">tag_contents</a> The rules for escaping attribute values (which are string contents) are different. For example you have to take care about escaping embedded '"' and "'" characters; CGI::a() does that for us automatically. CGI::a() does not HTML escape tag_contents; we would need to write <a href="URL">some <b>bold</b> text</a> for example. So we use esc_html (or esc_path) to escape tag_contents as needed. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | gitweb: Change to use explicitly function call cgi->escapHTML()Li Yang2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change to use explicitly function call cgi->escapHTML(). This fix the problem on some systems that escapeHTML() is not functioning, as default CGI is not setting 'escape' parameter. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Use diff* with --exit-code in git-am, git-rebase and git-merge-oursAlex Riesen2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the shell code, reduces its memory footprint, and speeds things up. The performance improvements should be noticable when git-rebase works on big commits. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Document --quiet option to git-diffAlex Riesen2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | write_sha1_from_fd() should make new objects read-onlyNicolas Pitre2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... like it is done everywhere else. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | make it more obvious that temporary files are temporary filesNicolas Pitre2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When some operations are interrupted (or "die()'d" or crashed) then the partial object/pack/index file may remain around. Make it more obvious in their name that those files are temporary stuff and can be cleaned up if no operation is in progress. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | update-hook: remove e-mail sending hook.Andy Parkins2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The update hook's only job is to decide is a particular update is allowed or not. It was not the right place to send out update notification e-mails from to begin with, as the final stage of updating refs can fail after this hook runs. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | git-am documentation: describe what is taken from where.Junio C Hamano2007-03-24
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | git-revert: Revert revert message to old behaviourJohannes Schindelin2007-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting from the shell script, based on a misreading of the sed invocation, the builtin included the abbreviated commit name, and did _not_ include the quotes around the oneline message. This fixes it. [jc: with a fix for the typo/thinko spotted by Linus, and also removing the unwanted abbrev at the beginning.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'maint'Junio C Hamano2007-03-23
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * maint: gitweb: Fix "next" link in commit view
| * | | | gitweb: Fix "next" link in commit viewJakub Narebski2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix copy'n'paste error in commit c9d193df which caused that "next" link for merge commits in "commit" view (merge: _commit_ _commit_ ...) was to "commitdiff" view instead of being to "commit" view. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Documentation: bisect: make a comment fit better in the man page.Christian Couder2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Documentation: bisect: add some titles to some paragraphs.Christian Couder2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Documentation: bisect: reformat more paragraphs.Christian Couder2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Documentation: bisect: reword one paragraph.Christian Couder2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Documentation: bisect: reformat some paragraphs.Christian Couder2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Fix path-limited "rev-list --bisect" termination condition.Junio C Hamano2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a path-limited bisection, when the $bad commit is not changing the limited path, and the number of suspects is 1, the code miscounted and returned $bad from find_bisection(), which is not marked with TREECHANGE. This is of course filtered by the output routine, resulting in an empty output, in turn causing git-bisect driver to say "$bad was both good and bad". Illustration. Suppose you have these four commits, and only C changes path P. You know D is bad and A is good. A---B---C*--D git-bisect driver runs this to find a bisection point: $ git rev-list --bisect A..D -- P which calls find_bisection() with B, C and D. The set of commits that is given to this function is the same set of commits as rev-list without --bisect option and pathspec returns. Among them, only C is marked with TREECHANGE. Let's call the set of commits given to find_bisection() that are marked with TREECHANGE (or all of them if no path limiter is in effect) "the bisect set". In the above example, the size of the bisect set is 1 (contains only "C"). For each commit in its input, find_bisection() computes the number of commits it can reach in the bisect set. For a commit in the bisect set, this number includes itself, so the number is 1 or more. This number is called "depth", and computed by count_distance() function. When you have a bisect set of N commits, and a commit has depth D, how good is your bisection if you returned that commit? How good this bisection is can be measured by how many commits are effectively tested "together" by testing one commit. Currently you have (N-1) untested commits (the tip of the bisect set, although it is included in the bisect set, is already known to be bad). If the commit with depth D turns out to be bad, then your next bisect set will have D commits and you will have (D-1) untested commits left, which means you tested (N-1)-(D-1) = (N-D) commits with this bisection. If it turns out to be good, then your next bisect set will have (N-D) commits, and you will have (N-D-1) untested commits left, which means you tested (N-1)-(N-D-1) = D commits with this bisection. Therefore, the goodness of this bisection is is min(N-D, D), and find_bisection() function tries to find a commit that maximizes this, by initializing "closest" variable to 0 and whenever a commit with the goodness that is larger than the current "closest" is found, that commit and its goodness are remembered by updating "closest" variable. The "the commit with the best goodness so far" is kept in "best" variable, and is initialized to a commit that happens to be at the beginning of the list of commits given to this function (which may or may not be in the bisect set when path-limit is in use). However, when N is 1, then the sole tree-changing commit has depth of 1, and min(N-D, D) evaluates to 0. This is not larger than the initial value of "closest", and the "so far the best one" commit is never replaced in the loop. When path-limit is not in use, this is not a problem, as any commit in the input set is tree-changing. But when path-limit is in use, and when the starting "bad" commit does not change the specified path, it is not correct to return it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | git-bisect.sh: properly dq $GIT_DIRJunio C Hamano2007-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise you would be in trouble if your GIT_DIR has IFS letters in it. Signed-off-by: Junio C Hamano <junkio@cox.net>