aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Teach rebase -i about --preserve-mergesJohannes Schindelin2007-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option "-p" (or long "--preserve-merges") makes it possible to rebase side branches including merges, without straightening the history. Example: X \ A---M---B / ---o---O---P---Q When the current HEAD is "B", "git rebase -i -p --onto Q O" will yield X \ ---o---O---P---Q---A'---M'---B' Note that this will - _not_ touch X [*1*], it does - _not_ work without the --interactive flag [*2*], it does - _not_ guess the type of the merge, but blindly uses recursive or whatever strategy you provided with "-s <strategy>" for all merges it has to redo, and it does - _not_ make use of the original merge commit via git-rerere. *1*: only commits which reach a merge base between <upstream> and HEAD are reapplied. The others are kept as-are. *2*: git-rebase without --interactive is inherently patch based (at least at the moment), and therefore merges cannot be preserved. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: provide reasonable reflog for the rebased branchJohannes Schindelin2007-06-26
| | | | | | | | | | If your rebase succeeded, the HEAD's reflog will still show the whole mess, but "<branchname>@{1}" now shows the state _before_ the rebase, so that you can reset (or compare) the original and the rebased revisions more easily. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: several cleanupsJohannes Schindelin2007-06-26
| | | | | | | | | Support "--verbose" in addition to "-v", show short names in the list comment, clean up if there is nothing to do, and add several "test_ticks" in the test script. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* ignore git-rebase--interactiveMatthias Lederhofer2007-06-26
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Teach rebase an interactive modeJohannes Schindelin2007-06-24
| | | | | | | | | | | | | | | | | | | | | | | Don't you just hate the fact sometimes, that git-rebase just applies the patches, without any possibility to edit them, or rearrange them? With "--interactive", git-rebase now lets you edit the list of patches, so that you can reorder, edit and delete patches. Such a list will typically look like this: pick deadbee The oneline of this commit pick fa1afe1 The oneline of the next commit ... By replacing the command "pick" with the command "edit", you can amend that patch and/or its commit message, and by replacing it with "squash" you can tell rebase to fold that patch into the patch before that. It is derived from the script sent to the list in <Pine.LNX.4.63.0702252156190.22628@wbgn013.biozentrum.uni-wuerzburg.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Move the pick_author code to git-sh-setupJohannes Schindelin2007-06-24
| | | | | | | | | | At the moment, only git-commit uses that code, to pick the author name, email and date from a given commit. This code will be reused in git rebase --interactive. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-send-email: Do not make @-less message IDJunio C Hamano2007-06-24
| | | | | | | | | | | | | | | | | | | | When the original $from address fails to yield a valid-looking e-mail address, we created a bogus looking message ID, formatted like this: Message-Id: <11823357623688-git-send-email-> This commit fixes it by moving call to make_message_id() to where it matters, namely, before the $message_id is needed to be placed in the generated e-mail header; this has an important side effect of making it clear that $from is already available. Also throw in Sys::Hostname::hostname() just for fun, although I suspect that the code would never trigger due to the modified call sequence that makes sure $from is always available. This is based on a suggestion by Michael Hendricks. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-svn: trailing slash in prefix is mandatory with --branches/-bGerrit Pape2007-06-24
| | | | | | | | | | | | | | | | | Make clear in the documentation that when using --branches/-b and --prefix with 'init', the prefix must include a trailing slash. This matches the actual behavior of git-svn, e.g.: $ git svn init -Ttrunk -treleases -bbranches --prefix xxx \ http://svn.sacredchao.net/svn/quodlibet/ --prefix='xxx' must have a trailing slash '/' $ This was noticed by R. Vanicat and reported through http://bugs.debian.org/429443 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* new-workdir: handle rev-parse --git-dir not always giving full pathJulian Phillips2007-06-24
| | | | | | | | | rev-parse --git-dir outputs a full path - except for the single case of when the path would be $(pwd)/.git, in which case it outputs simply .git. Check for this special case and handle it. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* make dist: include configure script in tarballMatthias Lederhofer2007-06-24
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'lt/follow'Junio C Hamano2007-06-24
|\ | | | | | | | | | | * lt/follow: Fix up "git log --follow" a bit.. Finally implement "git log --follow"
| * Fix up "git log --follow" a bit..Linus Torvalds2007-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes "git log --follow" to hopefully not leak memory any more, and also cleans it up a bit to look more like some of the other functions that use "diff_queued_diff" (by *not* using it directly as a global in the code, but by instead just taking a pointer to the diff queue and using that). As to "diff_queued_diff", I think it would be better off not as a global at all, but as being just an entry in the "struct diff_options" structure, but that's a separate issue, and there may be some subtle reason for why it's currently a global. Anyway, no real changes. Instead of having a magical first entry in the diff-queue, we now end up just keeping the diff-queue clean, and keeping our "preferred" file pairing in an internal "choice" variable. That makes it easy to switch the choice around when we find a better one. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Finally implement "git log --follow"Linus Torvalds2007-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, I've really held off doing this too damn long, because I'm lazy, and I was always hoping that somebody else would do it. But no, people keep asking for it, but nobody actually did anything, so I decided I might as well bite the bullet, and instead of telling people they could add a "--follow" flag to "git log" to do what they want to do, I decided that it looks like I just have to do it for them.. The code wasn't actually that complicated, in that the diffstat for this patch literally says "70 insertions(+), 1 deletions(-)", but I will have to admit that in order to get to this fairly simple patch, you did have to know and understand the internal git diff generation machinery pretty well, and had to really be able to follow how commit generation interacts with generating patches and generating the log. So I suspect that while I was right that it wasn't that hard, I might have been expecting too much of random people - this patch does seem to be firmly in the core "Linus or Junio" territory. To make a long story short: I'm sorry for it taking so long until I just did it. I'm not going to guarantee that this works for everybody, but you really can just look at the patch, and after the appropriate appreciative noises ("Ooh, aah") over how clever I am, you can then just notice that the code itself isn't really that complicated. All the real new code is in the new "try_to_follow_renames()" function. It really isn't rocket science: we notice that the pathname we were looking at went away, so we start a full tree diff and try to see if we can instead make that pathname be a rename or a copy from some other previous pathname. And if we can, we just continue, except we show *that* particular diff, and ever after we use the _previous_ pathname. One thing to look out for: the "rename detection" is considered to be a singular event in the _linear_ "git log" output! That's what people want to do, but I just wanted to point out that this patch is *not* carrying around a "commit,pathname" kind of pair and it's *not* going to be able to notice the file coming from multiple *different* files in earlier history. IOW, if you use "git log --follow", then you get the stupid CVS/SVN kind of "files have single identities" kind of semantics, and git log will just pick the identity based on the normal move/copy heuristics _as_if_ the history could be linearized. Put another way: I think the model is broken, but given the broken model, I think this patch does just about as well as you can do. If you have merges with the same "file" having different filenames over the two branches, git will just end up picking _one_ of the pathnames at the point where the newer one goes away. It never looks at multiple pathnames in parallel. And if you understood all that, you probably didn't need it explained, and if you didn't understand the above blathering, it doesn't really mtter to you. What matters to you is that you can now do git log -p --follow builtin-rev-list.c and it will find the point where the old "rev-list.c" got renamed to "builtin-rev-list.c" and show it as such. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t9500: skip gitweb tests if perl version is too oldSven Verdoolaege2007-06-24
| | | | | | | | | | | | | | | | | | | | gitweb calls Encode::decode_utf8 with two arguments, but old versions of perl only allow this function to be called with one argument. Even older versions of perl do not even have an Encode module. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano2007-06-23
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git/fastimport: (260 commits) Avoid src:dst syntax as default bash completion for git push Make it possible to specify the HEAD for the internal findUpstreamBranchPoint function. Added git-p4 branches command that shows the mapping of perforce depot paths to imported git branches. Warn about conflicting p4 branch mappings and use the first one found. Fix the branch mapping detection to be independent from the order of the "p4 branches" output. git-p4 fails when cloning a p4 depo. Fix initial multi-branch import. Only use double quotes on Windows Fix git-p4 rebase to detect the correct upstream branch instead of unconditionally Moved the code from git-p4 submit to figure out the upstream branch point git-p4 submit: Fix missing quotes around p4 commands to make them work with spaces in filenames Mention remotes/p4/master also in the documentation. Provide some information for single branch imports where the commits go git-p4: check for existence of repo dir before trying to create Write out the options tag in the log message of imports only if we actually have Fix support for explicit disabling of syncing with the origin Fix depot-paths encoding for multi-path imports (don't split up //depot/path/foo) Fix project name guessing Fix updating/creating remotes/p4/* heads from origin/p4/* Fixed the check to make sure to exclude the HEAD symbolic refs when updating ...
| * Import branch 'git-p4' of git://repo.or.cz/fast-exportShawn O. Pearce2007-06-22
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Simon has asked that the git.git project include the git-p4 project as at least a contrib/fast-import within git.git. I think it makes a lot of sense, as git-p4 nicely complements the only other in-tree fast-import user: import-tars.perl. git-p4 is offered under the MIT license by its authors.
| | * Make it possible to specify the HEAD for the internal ↵Simon Hausmann2007-06-22
| | | | | | | | | | | | | | | | | | | | | | | | findUpstreamBranchPoint function. This isn't used right now in git-p4 but I use it in an external script that loads git-p4 as module. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | * Added git-p4 branches command that shows the mapping of perforce depot paths ↵Simon Hausmann2007-06-20
| | | | | | | | | | | | | | | | | | to imported git branches. Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Warn about conflicting p4 branch mappings and use the first one found.Simon Hausmann2007-06-17
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix the branch mapping detection to be independent from the order of the "p4 ↵Simon Hausmann2007-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | branches" output. Collect "unknown" source branches separately and register them at the end. Also added a minor speed up to splitFilesIntoBranches by breaking out of the loop through all branches when it's safe. Signed-off-by: Simon Hausmann <simon@lst.de>
| | * git-p4 fails when cloning a p4 depo.Benjamin Sergeant2007-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A perforce command with all the files in the repo is generated to get all the file content. Here is a patch to break it into multiple successive perforce command who uses 4K of parameter max, and collect the output for later. It works, but not for big depos, because the whole perforce depo content is stored in memory in P4Sync.run(), and it looks like mine is bigger than 2 Gigs, so I had to kill the process. [Simon: I added the bit about using SC_ARG_MAX, as suggested by Han-Wen] Signed-off-by: Benjamin Sergeant <bsergean@gmail.com> Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix initial multi-branch import.Simon Hausmann2007-06-16
| | | | | | | | | | | | | | | | | | The list of existing p4 branches in git wasn't initialized. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | * Only use double quotes on WindowsMarius Storm-Olsen2007-06-12
| | | | | | | | | | | | Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
| | * Fix git-p4 rebase to detect the correct upstream branch instead of ↵Simon Hausmann2007-06-12
| | | | | | | | | | | | | | | | | | | | | | | | unconditionally always rebasing on top of remotes/p4/master Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | * Moved the code from git-p4 submit to figure out the upstream branch pointSimon Hausmann2007-06-12
| | | | | | | | | | | | | | | | | | into a separate helper method. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | * git-p4 submit: Fix missing quotes around p4 commands to make them work with ↵Simon Hausmann2007-06-11
| | | | | | | | | | | | | | | | | | | | | | | | spaces in filenames Noticed by Alex Riesen Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Mention remotes/p4/master also in the documentation.Simon Hausmann2007-06-11
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Provide some information for single branch imports where the commits goSimon Hausmann2007-06-11
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * git-p4: check for existence of repo dir before trying to createKevin Green2007-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using git-p4 in this manner: git-p4 clone //depot/path/project myproject If "myproject" already exists as a dir, but not a valid git repo, it fails to create the directory. Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
| | * Write out the options tag in the log message of imports only if we actually haveSimon Hausmann2007-06-11
| | | | | | | | | | | | | | | | | | options Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix support for explicit disabling of syncing with the originSimon Hausmann2007-06-11
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix depot-paths encoding for multi-path imports (don't split up ↵Simon Hausmann2007-06-11
| | | | | | | | | | | | | | | | | | //depot/path/foo) Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix project name guessingSimon Hausmann2007-06-11
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fix updating/creating remotes/p4/* heads from origin/p4/*Simon Hausmann2007-06-10
| | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | * Fixed the check to make sure to exclude the HEAD symbolic refs when updatingSimon Hausmann2007-06-10
| | | | | | | | | | | | | | | | | | the remotes/p4 branches from origin. Signed-off-by: Simon Hausmann <simon@lst.de>
| | * also strip p4/ from local imports.Han-Wen Nienhuys2007-06-08
| | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
| | * Merge branch 'master' of git://repo.or.cz/fast-exportHan-Wen Nienhuys2007-06-08
| | |\
| | | * Only get the expensive branch mapping from the p4 server when notSimon Hausmann2007-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | syncing with the help of an origin remote (which we instead then use to get new branches from). Signed-off-by: Simon Hausmann <simon@lst.de>
| | | * Make git-p4 submit detect the correct reference (origin) branch whenSimon Hausmann2007-06-07
| | | | | | | | | | | | | | | | | | | | | | | | working with multi-branch imports. Signed-off-by: Simon Hausmann <simon@lst.de>
| | | * Make clone behave like git clone by default again.Simon Hausmann2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Simon Hausmann <simon@lst.de>
| | | * Exclude the HEAD symbolic ref from the list of known branchesMarius Storm-Olsen2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
| | | * Fix single branch import into remotesMarius Storm-Olsen2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
| | | * Fix git-p4 clone (defaultDestination)Marius Storm-Olsen2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
| | | * Ensure that the commit message is Windows formated (CRLF) before invoking ↵Marius Storm-Olsen2007-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the editor. (The default editor on Windows (Notepad) doesn't handle Unix line endings) Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
| | | * Fix depot-path determination for git-p4 submitSimon Hausmann2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | | * Fix git-p4 submitSimon Hausmann2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | | * Fix git-p4 rebaseSimon Hausmann2007-06-07
| | | | | | | | | | | | | | | | Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | | * Hack to make the multi-branch import work again with self.depotPaths now thatSimon Hausmann2007-06-07
| | | | | | | | | | | | | | | | | | | | | | | | self.depotPath is gone Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | | * Don't attempt to set the initialParent on multi-branch imports (useless).Simon Hausmann2007-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At some point the code paths should be unified, but for now I need a working git-p4 :) Signed-off-by: Simon Hausmann <shausman@trolltech.com>
| | | * Fix common path "calculation" from logs of multiple branches.Simon Hausmann2007-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to use min instead of max for prev/cur to avoid out-of-bounds string access. Also treat "i" as index of the last match instead of a length because in case of a complete match of the two strings i was off by one. Signed-off-by: Simon Hausmann <shausman@trolltech.com>