summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support wholesale directory renames in fast-importShawn O. Pearce2007-07-093-19/+168
| | | | | | | | | | | | | | | | | Some source material (e.g. Subversion dump files) perform directory renames without telling us exactly which files in that subdirectory were moved. This makes it hard for a frontend to convert such data formats to a fast-import stream, as all the frontend has on hand is "Rename a/ to b/" with no details about what files are in a/, unless the frontend also kept track of all files. The new 'R' subcommand within a commit allows the frontend to rename either a file or an entire subdirectory, without needing to know the object's SHA-1 or the specific files contained within it. The rename is performed as efficiently as possible internally, making it cheaper than a 'D'/'M' pair for a file rename. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Merge branch 'maint'Shawn O. Pearce2007-07-091-3/+5
|\ | | | | | | | | * maint: Clarify documentation of fast-import's D subcommand
| * Clarify documentation of fast-import's D subcommandShawn O. Pearce2007-07-091-3/+5
| | | | | | | | | | | | | | | | The 'D' subcommand within a commit can also delete a directory recursively. This wasn't clear in the prior version of the documentation, leading to a question on the mailing list. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Revert 88494423 (removal of duplicate parents in the output codepath)Junio C Hamano2007-07-081-13/+1
| | | | | | | | | | | | | | Now this is not needed, as we rewrite the parent list in the commit object itself. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | revision.c: remove duplicated parents after history simplificationJunio C Hamano2007-07-081-0/+20
| | | | | | | | | | | | | | | | | | | | When we simplify history due to path limits, the parents list for a rewritten commit can end up having duplicates. Instead of filtering them out in the output codepath like earlier commit 88494423 did, remove them much earlier, when the parent information actually gets rewritten. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Document custom hunk header selectionJunio C Hamano2007-07-081-4/+51
| | | | | | | | | | | | | | | | Since the external interface seems to have stabilized for this new feature, let's document it properly. Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2007-07-082-6/+23
|\ \ | |/ | | | | | | | | | | | | * maint: user-manual: fix directory name in git-archive example user-manual: more explanation of push and pull usage tutorial: Fix typo user-manual: grammar and style fixes
| * user-manual: fix directory name in git-archive exampleWilliam Pursell2007-07-081-1/+1
| | | | | | | | Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| * user-manual: more explanation of push and pull usageJ. Bruce Fields2007-07-081-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Recently a user on the mailing list complained that they'd read the manual but couldn't figure out how to keep a couple private repositories in sync. They'd tried using push, and were surprised by the effect. Add a little text in an attempt to make it clear that: - Pushing to a branch that is checked out will have odd results. - It's OK to synchronize just using pull if that's simpler. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| * tutorial: Fix typoJ. Bruce Fields2007-07-081-1/+1
| | | | | | | | | | | | "You" should be "Alice" here. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
| * user-manual: grammar and style fixesAndy Parkins2007-07-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | - "method of" is vulgar, "method for" is nicer - "recovery" becomes "recovering" from Steve Hoelzer's original version of this patch - "if you want" is nicer as "if you wish" - "you may" should be "you can"; "you may" is "you have permission to" rather than "you can"'s "it is possible to" Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
* | rebase -i: put a nice warning into the todo listJohannes Schindelin2007-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | It seems that not everybody expects a difference between keeping a "pick" line, and deleting it. So be a bit more explicit about that, with all capitals to get the attention. Noticed by vmiklos on IRC. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i: remember the settings of -v, -s and -p when interruptedJohannes Schindelin2007-07-082-0/+14
| | | | | | | | | | | | | | | | | | After interruption, be that an edit, or a conflicting commit, reset the variables VERBOSE, STRATEGY and PRESERVE_MERGES, so that the user does not have to respecify them with "rebase --continue". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i: actually show the diffstat when being verboseJohannes Schindelin2007-07-081-4/+4
| | | | | | | | | | | | | | | | | | | | The "while" loop in the function do_rest is not supposed to ever be exited. Instead, the function do_one checks if there is nothing left, and cleans up and exits if that is the case. So the diffstat code belongs there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i: handle --continue more like non-interactive rebaseJohannes Schindelin2007-07-082-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-interactive rebase requires the working tree to be clean, but applies what is in the index without requiring the user to do it herself. Imitate that, but (since we are interactive, after all) fire up an editor with the commit message. It also fixes a subtle bug: a forgotten "continue" was removed, which led to an infinite loop when continuing without remaining patches. Both issues noticed by Frank Lichtenheld. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t7004: Skip tests for signed tags in an old version of gpg.Carlos Rica2007-07-081-0/+11
| | | | | | | | | | | | | | | | | | | | As said here: http://www.gnupg.org/documentation/faqs.html#q6.19 the gpg version 1.0.6 didn't parse trust packets correctly, so for that version, creation of signed tags using the generated key fails. Signed-off-by: Carlos Rica <jasampler@gmail.com> Acked-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix merge-one-file for our-side-added/our-side-removed casesJunio C Hamano2007-07-081-4/+6
| | | | | | | | | | | | | | | | | | When commit ed93b449 changed the script so that it does not touch untracked working tree file, we forgot that we still needed to resolve the index entry (otherwise they are left unmerged). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit: don't add multiple Signed-off-by: from the same identityGerrit Pape2007-07-081-9/+11
| | | | | | | | | | | | | | | | | | | | | | If requested to signoff a commit, don't add another Signed-off-by: line to the commit message if the exact same line is already there. This was noticed and requested by Josh Triplett through http://bugs.debian.org/430851 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | branch.autosetupmerge: allow boolean values, or "all"Johannes Schindelin2007-07-084-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Junio noticed that switching on autosetupmerge unilaterally started cluttering the config for local branches. That is not the original intention of branch.autosetupmerge, which was meant purely for convenience when branching off of remote branches, but that semantics got lost somewhere. If you still want that "new" behavior, you can switch branch.autosetupmerge to the value "all". Otherwise, it is interpreted as a boolean, which triggers setting up defaults _only_ when branching off of a remote branch, i.e. the originally intended behavior. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-stash: try reusing cached stat info as much as possibleJunio C Hamano2007-07-081-3/+3
| | | | | | | | | | | | | | | | | | | | Earlier when we read a tree into a temporary index, we read it from scratch. Start from the current index and use read-tree -m to preserve cached stat information as much as possible, in order to speed up "git add -u". This makes "git stash" usable in a source tree of nontrivial size. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff.c: make built-in hunk header pattern a separate tableJunio C Hamano2007-07-081-6/+16
| | | | | | | | | | | | | | | | This would hopefully make it easier to maintain. Initially we would have "java" and "tex" defined, as they are the only ones we already have. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitweb: make "No commits" in project list gray, not bold greenMatt McCutchen2007-07-072-0/+7
| | | | | | | | | | | | | | | | | | | | | | A missing return statement in git_get_last_activity made gitweb think a project with no commits was in age class "age0", so the "No commits" appeared in bold green, which was ridiculous. I added the return so those projects get "noage" and added a block to gitweb.css to format the "No commits" text gray. Signed-off-by: Matt McCutchen <hashproduct@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitweb: make search form generate pathinfo-style URLsMatt McCutchen2007-07-071-3/+9
| | | | | | | | | | | | | | | | | | The search form generated traditional-style URLs with a "p=" parameter even when the pathinfo feature was on. This patch makes it generate pathinfo-style URLs when appropriate. Signed-off-by: Matt McCutchen <hashproduct@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | 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>