summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitweb: prefer git_get_project_owner() over get_file_owner()Miklos Vajna2007-07-071-2/+2
| | | | | | | | | This way if $projects_list exists, it'll be used, otherwise get_file_owner() will be used as before. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Acked-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: make repeated calls to git_get_project_owner() bearableJunio C Hamano2007-07-071-8/+20
| | | | | | | If repeated calls to git_get_project_owner() are made, we would have read the same file over and over again. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/stash'Junio C Hamano2007-07-072-1/+89
|\ | | | | | | | | * js/stash: Teach git-stash to "apply --index"
| * Teach git-stash to "apply --index"Johannes Schindelin2007-07-062-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | When given this subcommand, git-stash will try to merge the stashed index into the current one. Only trivial merges are possible, since we have no index for the index ;-) If a trivial merge is not possible, git-stash will bail out with a hint to skip the --index option. For good measure, finally include a test case. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jc/diff-mark'Junio C Hamano2007-07-0714-63/+336
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/diff-mark: diff: honor binariness specified in attributes Fix configuration syntax to specify customized hunk header patterns. Per-path attribute based hunk header selection. Future-proof source for changes in xdemitconf_t Introduce diff_filespec_is_binary()
| * | diff: honor binariness specified in attributesJunio C Hamano2007-07-072-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code shuffling mistakenly lost binariness specified with the attribute mecahnism and made it always guess from the data. Noticed by Johannes, with two test cases to t4020. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Fix configuration syntax to specify customized hunk header patterns.Junio C Hamano2007-07-073-71/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the hunk header customization syntax. The special case 'funcname' attribute is gone. You assign the name of the type of contents to path's "diff" attribute as a string value in .gitattributes like this: *.java diff=java *.perl diff=perl *.doc diff=doc If you supply "diff.<name>.funcname" variable via the configuration mechanism (e.g. in $HOME/.gitconfig), the value is used as the regexp set to find the line to use for the hunk header (the variable is called "funcname" because such a line typically is the one that has the name of the function in programming language source text). If there is no such configuration, built-in default is used, if any. Currently there are two default patterns: default and java. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Per-path attribute based hunk header selection.Junio C Hamano2007-07-067-15/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes"diff -p" hunk headers customizable via gitattributes mechanism. It is based on Johannes's earlier patch that allowed to define a single regexp to be used for everything. The mechanism to arrive at the regexp that is used to define hunk header is the same as other use of gitattributes. You assign an attribute, funcname (because "diff -p" typically uses the name of the function the patch is about as the hunk header), a simple string value. This can be one of the names of built-in pattern (currently, "java" is defined) or a custom pattern name, to be looked up from the configuration file. (in .gitattributes) *.java funcname=java *.perl funcname=perl (in .git/config) [funcname] java = ... # ugly and complicated regexp to override the built-in one. perl = ... # another ugly and complicated regexp to define a new one. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Future-proof source for changes in xdemitconf_tJohannes Schindelin2007-07-066-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instances of xdemitconf_t were initialized member by member. Instead, initialize them to all zero, so we do not have to update those places each time we introduce a new member. [jc: minimally fixed by getting rid of a new global] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Introduce diff_filespec_is_binary()Junio C Hamano2007-07-063-36/+39
| |/ | | | | | | | | | | | | | | | | | | | | This replaces an explicit initialization of filespec->is_binary field used for rename/break followed by direct access to that field with a wrapper function that lazily iniaitlizes and accesses the field. We would add more attribute accesses for the use of diff routines, and it would be better to make this abstraction earlier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2007-07-072-1/+11
|\ \ | | | | | | | | | | | | * maint: Fix "apply --reverse" with regard to whitespace
| * | Fix "apply --reverse" with regard to whitespaceJohannes Schindelin2007-07-072-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git apply" used to take check the whitespace in the wrong direction. Noticed by Daniel Barkalow. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | diff-lib.c: don't strdup twiceRené Scharfe2007-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The static function read_directory in diff-lib.c is only ever called with struct path_list lists with .strdup_paths turned on, i.e. path_list_insert will strdup the paths for us (again). Let's take advantage of that and stop doing it twice. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-branch: default to --trackJohannes Schindelin2007-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git branch --track" will setup config variables when branching from a remote branch, so that if you say "git pull" while being on that branch, it automatically fetches the correct remote, and merges the correct branch. Often people complain that this is not the default for "git branch". Make it so. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-send-email: allow an email alias for --fromMichael Hendricks2007-07-061-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | cvsserver: always initialize state in argsplit()Frank Lichtenheld2007-07-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Other code assumes that this is initialized, so do it even if there were no arguments given. Signed-off-by: Dirk Koopman <djk@tobit.co.uk> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | stash: allow running from a subdirectoryJames Bowes2007-07-061-0/+1
| | | | | | | | | | | | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-submodule(1): update description and key namesLars Hjemli2007-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | When git-submodule was updated to allow mapping between submodule name and submodule path, the documentation was left untouched. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Enable "git rerere" by the config variable rerere.enabledJohannes Schindelin2007-07-069-40/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, "git rerere" was enabled by creating the directory .git/rr-cache. That is definitely not in line with most other features, which are enabled by a config variable. So, check the config variable "rerere.enabled". If it is set to "false" explicitely, do not activate rerere, even if .git/rr-cache exists. This should help when you want to disable rerere temporarily. If "rerere.enabled" is not set at all, fall back to detection of the directory .git/rr-cache. [jc: with minimum tweaks] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Add [verse] to the SYNOPSIS section of git-submodule.txt.Matt Kraai2007-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SYNOPSIS section of git-submodule.txt contains two forms. Since it doesn't use the verse style, the line boundary between them is not preserved and the second form can appear on the same line as the first form. Adding [verse] enables the verse style, which preserves the line boundary between them. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Change "added.moved or removed" to "added, moved or removed" inMatt Kraai2007-07-061-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fixed a formulation mistake in Documentation/user-manual.txtMarcus Fritzsch2007-07-061-7/+7
| |/ |/| | | | | | | | | | | | | This one fixes a small formulation weirdness in Documentation/user-manual.txt Signed-off-by: Marcus Fritzsch <m@fritschy.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Prefer EMAIL to username@hostname.Matt Kraai2007-07-051-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The environment variable $EMAIL gives a better default of user's preferred e-mail address than the hardcoded "username@hostname", as it is understood by many existing programs. We still honor GIT_*_EMAIL environment variables and user.email configuration variable give them higher precedence, so that the user can override $EMAIL or "username@hostname", as they are likely to be more specific to the context of working on a particular project. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | make git-clone GIT_WORK_TREE awareMatthias Lederhofer2007-07-051-7/+18
| | | | | | | | | | | | | | | | If GIT_WORK_TREE is set git-clone will use that path for the working tree. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-clone: split up long &&-command-chain and use a function for cleanupMatthias Lederhofer2007-07-051-4/+13
| | | | | | | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | fix remote.origin.url in tutorial.txtAlecs King2007-07-051-1/+1
| | | | | | | | | | | | | | | | Bob cloned from Alice. The origin url is actually Alice's repo. Signed-off-by: Alecs King <alecsk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch: fail gracefully when a filter failsJohannes Schindelin2007-07-052-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common mistake is to provide a filter which fails unwantedly. For example, this will stop in the middle: git filter-branch --env-filter ' test $GIT_COMMITTER_EMAIL = xyz && export GIT_COMMITTER_EMAIL = abc' rewritten When $GIT_COMMITTER_EMAIL is not "xyz", the test fails, and consequently the whole filter has a non-zero exit status. However, as demonstrated in this example, filter-branch would just stop, and the user would be none the wiser. Also, a failing msg-filter would not have been caught, as was the case with one of the tests. This patch fixes both issues, by paying attention to the exit status of msg-filter, and by saying what failed before exiting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add -v|--verbose to git remote to show remote urlAlex Riesen2007-07-051-1/+13
| | | | | | | | | | | | | | | | Many other commands already have such an option, and I find it practical to see where all the remotes actually come from. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch documentation: clarify which filters are eval'edJohannes Schindelin2007-07-051-1/+2
| | | | | | | | | | | | | | All filters, except the commit filter, are evaluated. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-stash: allow more descriptive reminder message when savingJunio C Hamano2007-07-051-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say: $ git stash starting to implement X while creating a stash, and the resulting "stash list entry would read as: $ git stash list stash@{0}: On master: starting to implement X instead of the default message which talks about the commit the stash happens to be based on (hence does not have much to do with what the stashed change is trying to do). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add urls.txt to git-clone man pageAndrew Ruder2007-07-056-59/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since git-clone is one of the many commands taking URLs to remote repositories as an argument, it should include the URL-types list from urls.txt. Split up urls.txt into urls.txt and urls-remotes.txt. The latter should be used by anything besides git-clone where a discussion of using .git/config and .git/remotes/ to name URLs just doesn't make as much sense. Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix git-stash(1) markup.Junio C Hamano2007-07-041-1/+1
| | | | | | | | | | | | Noticed by Randal L. Schwartz. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Allow rebase to run if upstream is completely mergedJohannes Sixt2007-07-042-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this history: o--o-...-B <- origin \ \ x--x--M--x--x <- master In this situation, rebase considers master fully up-to-date and would not do anything. However, if there were additional commits on origin, the rebase would run and move the commits x on top of origin. Here we change rebase to short-circuit out only if the history since origin is strictly linear. Consequently, the above as well as a history like this would be linearized: o--o <- origin \ x--x \ \ x--M--x--x <- master Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Remove USE_PAGER from git-pickaxe and git-annotateAndrew Ruder2007-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | git-blame (and friends) specifically leave the pager turned off in the case that --incremental is specified as this isn't for human consumption. git-pickaxe and git-annotate will turn it on themselves otherwise. Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-svn: fix blocking with svn:// servers after do_switchEric Wong2007-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now explicitly disconnect before starting new SVN::Ra connections. SVN::Ra objects will automatically be disconnected from the server on DESTROY. SVN servers seem to have problems accepting multiple connections from one client, and the SVN library has trouble being connected to multiple servers at once. This appears to cause opening the second connection to block, and cause git-svn to be unusable after using the do_switch() function. git-svn opens another connection because a workaround is necesary for the buggy reparent function handling on certain versions of svn:// and svn+ssh:// servers. Instead of using the reparent function (analogous to chdir), it will reopen a new connection to a different URL on the SVN server. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch documentation: some more touch-ups.Johannes Sixt2007-07-041-7/+16
| | | | | | | | | | | | | | | | | | - The map function used to fail, but no longer does (since 3520e1e8687.) - Fix the "edge-graft" example. - Show the same using .git/info/grafts. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch: added missing warn functionSteffen Prohaska2007-07-041-0/+4
| | | | | | | | | | | | | | | | --tag-name-filter may have failed before because warn is used for reporting but was not available. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Alter git-checkout reflog message to include "from" branchSean2007-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | As suggested by Junio, adding the current branch name to the reflog message for git-checkout would be helpful. For example: "checkout: moving from next to master" Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-init: set core.worktree if GIT_WORK_TREE is specifiedMatthias Lederhofer2007-07-041-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now you can do the following to create a repository which has a separate working tree: /tmp/foo$ export GIT_DIR=/tmp/bar /tmp/foo$ git --work-tree . init Initialized empty Git repository in /tmp/bar/ /tmp/foo$ git config core.worktree /tmp/foo Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Do not check if getcwd() result begins with a slash.Junio C Hamano2007-07-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | In user space, and for getcwd(), the check to see if the resulting path begins with a '/' does not make sense. This is merely a mistake by Linus who is so used to code for the kernel, where a d_path() return value pathname can be either a real path, or something like "pipe:[8003]", and the difference is the '/' at the beginning. Pointed out by Dscho, Matthias Lederhofer and clarified by Linus. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch: a few more touch ups to the man pageJohannes Schindelin2007-07-041-5/+6
| | | | | | | | | | | | | | | | All based on comments from Frank Lichtenheld. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch: make output nicerJohannes Schindelin2007-07-041-4/+4
| | | | | | | | | | | | | | | | Instead of filling the screen with progress lines, use \r so that the progress can be seen, but warning messages are more visible. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix t5516 to create test repo without hooksAlex Riesen2007-07-041-1/+2
| | | | | | | | | | | | | | | | Otherwise the hooks will be executed on cygwin and the test will fail because of the contributed hooks. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | filter-branch: Avoid an error message in the map function.Johannes Sixt2007-07-041-2/+6
| | | | | | | | | | | | | | | | | | | | When the map function didn't find the rewritten commit of the passed in original id, it printed the original id, but it still fell through to the 'cat', which failed with an error message. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Handle format.subjectprefix for every command which accepts --prettyAlex Riesen2007-07-041-7/+8
| | | | | | | | | | | | | | Because the --pretty can be given as --pretty=email which historically produced mails with patches. IOW, exactly what git-format-patch does. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Handle missing prefix for "Subject:" as if no prefix givenAlex Riesen2007-07-041-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update reflog message created for stashesJunio C Hamano2007-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | A stash is about a change on top of an existing commit, and not about that commit that happened to be on which the change was created. Match the message we see in "git stash list" with the commit log message to make this clear. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
* | repack: don't report "Nothing new to pack." if -q is givenUwe Kleine-König2007-07-041-1/+3
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add core.pager config variable.Brian Gernhardt2007-07-045-0/+13
| | | | | | | | | | | | | | | | | | This adds a configuration variable that performs the same function as, but is overridden by, GIT_PAGER. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Acked-by: Johannes E. Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-submodule: Fix two instances of the same typoCJ van den Berg2007-07-041-2/+2
| | | | | | | | | | | | They break the output of git submodule status. Signed-off-by: Junio C Hamano <gitster@pobox.com>