aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* prefix_path: use is_absolute_path() instead of *orig == '/'Johannes Sixt2008-02-20
| | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-clean: handle errors if removing files failsMiklos Vajna2008-02-20
| | | | | | | | | 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>
* Merge branch 'mk/color'Junio C Hamano2008-02-20
|\ | | | | | | | | * mk/color: Add color.ui variable which globally enables colorization if set
| * Add color.ui variable which globally enables colorization if setMatthias Kestenholz2008-02-18
| | | | | | | | | | Signed-off-by: Matthias Kestenholz <mk@spinlock.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/maint-cvsexport'Junio C Hamano2008-02-20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-cvsexport: cvsexportcommit: be graceful when "cvs status" reorders the arguments Conflicts: t/t9200-git-cvsexportcommit.sh
| * | cvsexportcommit: be graceful when "cvs status" reorders the argumentsJohannes Schindelin2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'js/maint-http-push'Junio C Hamano2008-02-20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-http-push: http-push: avoid a needless goto http-push: do not get confused by submodules http-push: avoid invalid memory accesses
| * | | http-push: avoid a needless gotoJohannes Schindelin2008-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a goto, and while it is not half as harmful as some people believe, it was unnecessary here. So remove it for readability. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | http-push: do not get confused by submodulesJohannes Schindelin2008-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When encountering submodules in a tree, http-push should not try sending the respective object. Instead, it should ignore it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | http-push: avoid invalid memory accessesJohannes Schindelin2008-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before objects are sent, the respective ref is locked. However, without this patch, the lock is lifted before the last object for that ref was sent. As a consequence, the lock data was accessed after the lock structure was free()d. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/empty-tree'Junio C Hamano2008-02-20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jk/empty-tree: add--interactive: handle initial commit better hard-code the empty tree object
| * | | | add--interactive: handle initial commit betterJeff King2008-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several points where we looked at the HEAD commit; for initial commits, this is meaningless. So instead we: - show staged status data as a diff against the empty tree instead of HEAD - show file diffs as creation events - use "git rm --cached" to revert instead of going back to the HEAD commit We magically reference the empty tree to implement this. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | hard-code the empty tree objectJeff King2008-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now any commands may reference the empty tree object by its sha1 (4b825dc642cb6eb9a060e54bf8d69288fbee4904). This is useful for showing some diffs, especially for initial commits. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'lt/revision-walker'Junio C Hamano2008-02-20
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * lt/revision-walker: Add "--show-all" revision walker flag for debugging
| * | | | | Add "--show-all" revision walker flag for debuggingLinus Torvalds2008-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's really not very easy to visualize the commit walker, because - on purpose - it obvously doesn't show the uninteresting commits! This adds a "--show-all" flag to the revision walker, which will make it show uninteresting commits too, and they'll have a '^' in front of them (it also fixes a logic error for !verbose_header for boundary commits - we should show the '-' even if left_right isn't shown). A separate patch to gitk to teach it the new '^' was sent to paulus. With the change in place, it actually is interesting even for the cases that git doesn't have any problems with, ie for the kernel you can do: gitk -d --show-all v2.6.24.. and you see just how far down it has to parse things to see it all. The use of "-d" is a good idea, since the date-ordered toposort is much better at showing why it goes deep down (ie the date of some of those commits after 2.6.24 is much older, because they were merged from trees that weren't rebased). So I think this is a useful feature even for non-debugging - just to visualize what git does internally more. When it actually breaks out due to the "everybody_uninteresting()" case, it adds the uninteresting commits (both the one it's looking at now, and the list of pending ones) to the list This way, we really list *all* the commits we've looked at. Because we now end up listing commits we may not even have been parsed at all "show_log" and "show_commit" need to protect against commits that don't have a commit buffer entry. That second part is debatable just how it should work. Maybe we shouldn't show such entries at all (with this patch those entries do get shown, they just don't get any message shown with them). But I think this is a useful case. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'mc/prefix'Junio C Hamano2008-02-20
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mc/prefix: Avoid a useless prefix lookup in strbuf_expand()
| * | | | | | Avoid a useless prefix lookup in strbuf_expand()Marco Costalba2008-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the --pretty=format prefix is looked up in a tight loop in strbuf_expand(), if prefix is found it is then used as argument for format_commit_item() that does another search by a switch statement to select the proper operation. Because the switch statement is already able to discard unknown matches we don't need the prefix lookup before to call format_commit_item(). Signed-off-by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'bc/fopen'Junio C Hamano2008-02-20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bc/fopen: Add compat/fopen.c which returns NULL on attempt to open directory
| * | | | | | | Add compat/fopen.c which returns NULL on attempt to open directoryBrandon Casey2008-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems do not fail as expected when fread et al. are called on a directory stream. Replace fopen on such systems which will fail when the supplied path is a directory. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jc/setup'Junio C Hamano2008-02-20
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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()
| * | | | | | | | builtin-mv: minimum fix to avoid losing filesJunio C Hamano2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An incorrect command "git mv subdir /outer/space" threw the subdirectory to outside of the repository and then noticed that /outer/space/subdir/ would be outside of the repository. The error checking is backwards. This fixes the issue by being careful about use of the return value of get_pathspec(). Since the implementation already has handcrafted loop to munge each path on the command line, we use prefix_path() instead. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git-add: adjust to the get_pathspec() changes.Junio C Hamano2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would need to notice and fail if command line had a nonsense pathspec. Earlier get_pathspec() returned all the inputs including bad ones, but the new one issues warnings and removes offending ones from its return value, so the callers need to be adjusted to notice it. Additional test scripts were initially from Robin Rosenberg, further fixed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | Make blame accept absolute pathsRobin Rosenberg2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blame did not always use prefix_path. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | setup: sanitize absolute and funny paths in get_pathspec()Junio C Hamano2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The prefix_path() function called from get_pathspec() is responsible for translating list of user-supplied pathspecs to list of pathspecs that is relative to the root of the work tree. When working inside a subdirectory, the user-supplied pathspecs are taken to be relative to the current subdirectory. Among special path components in pathspecs, we used to accept and interpret only "." ("the directory", meaning a no-op) and ".." ("up one level") at the beginning. Everything else was passed through as-is. For example, if you are in Documentation/ directory of the project, you can name Documentation/howto/maintain-git.txt as: howto/maintain-git.txt ../Documentation/howto/maitain-git.txt ../././Documentation/howto/maitain-git.txt but not as: howto/./maintain-git.txt $(pwd)/howto/maintain-git.txt This patch updates prefix_path() in several ways: - If the pathspec is not absolute, prefix (i.e. the current subdirectory relative to the root of the work tree, with terminating slash, if not empty) and the pathspec is concatenated first and used in the next step. Otherwise, that absolute pathspec is used in the next step. - Then special path components "." (no-op) and ".." (up one level) are interpreted to simplify the path. It is an error to have too many ".." to cause the intermediate result to step outside of the input to this step. - If the original pathspec was not absolute, the result from the previous step is the resulting "sanitized" pathspec. Otherwise, the result from the previous step is still absolute, and it is an error if it does not begin with the directory that corresponds to the root of the work tree. The directory is stripped away from the result and is returned. - In any case, the resulting pathspec in the array get_pathspec() returns omit the ones that caused errors. With this patch, the last two examples also behave as expected. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'maint'Junio C Hamano2008-02-20
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ""
| * | | | | | | | | Clarified the meaning of git-add -u in the documentationPekka Kaitaniemi2008-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | git-clone.sh: properly configure remote even if remote's head is danglingGerrit Pape2008-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | Documentation/git-stash: document options for git stash listMiklos Vajna2008-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | send-email: squelch warning due to comparing undefined $_ to ""Jay Soffian2008-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | git.el: Set process-environment instead of invoking envDavid KÃ¥gedal2008-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | Merge branch 'maint'Junio C Hamano2008-02-20
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | | | Rename git-core rpm to just git and rename the meta-pacakge to git-all.Kristian Høgsberg2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | push: document the status outputJeff King2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | Documentation/push: clarify matching refspec behaviorJeff King2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | push: indicate partialness of error messageJeff King2008-02-19
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | Technical documentation of the run-command API.Johannes Sixt2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Correct git-pull documentationJay Soffian2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' formJakub Narebski2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | API documentation for remote.hDaniel Barkalow2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Simplify setup of $GIT_DIR in git-sh-setup.shLars Hjemli2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | Merge branch 'mk/maint-parse-careful'Junio C Hamano2008-02-18
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | | | peel_onion: handle NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | check return value from parse_commit() in various functionsMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | parse_commit: don't fail, if object is NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | revision.c: handle tag->tagged == NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | reachable.c::process_tree/blob: check for NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | process_tag: handle tag->tagged == NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | check results of parse_commit in merge_basesMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | list-objects.c::process_tree/blob: check for NULLMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | reachable.c::add_one_tree: handle NULL from lookup_treeMartin Koegler2008-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>