summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-06-26rebase -i: several cleanupsLibravatar Johannes Schindelin2-4/+17
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>
2007-06-26ignore git-rebase--interactiveLibravatar Matthias Lederhofer1-0/+1
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Teach rebase an interactive modeLibravatar Johannes Schindelin5-5/+546
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>
2007-06-24Move the pick_author code to git-sh-setupLibravatar Johannes Schindelin2-28/+29
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>
2007-06-24git-send-email: Do not make @-less message IDLibravatar Junio C Hamano1-4/+12
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>
2007-06-24git-svn: trailing slash in prefix is mandatory with --branches/-bLibravatar Gerrit Pape1-3/+4
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>
2007-06-24new-workdir: handle rev-parse --git-dir not always giving full pathLibravatar Julian Phillips1-0/+5
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>
2007-06-24make dist: include configure script in tarballLibravatar Matthias Lederhofer1-2/+3
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Merge branch 'lt/follow'Libravatar Junio C Hamano5-1/+89
* lt/follow: Fix up "git log --follow" a bit.. Finally implement "git log --follow"
2007-06-24t9500: skip gitweb tests if perl version is too oldLibravatar Sven Verdoolaege1-0/+6
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>
2007-06-23Merge branch 'master' of git://repo.or.cz/git/fastimportLibravatar Junio C Hamano4-1/+1738
* '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 ...
2007-06-22Fix up "git log --follow" a bit..Libravatar Linus Torvalds1-9/+28
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>
2007-06-22Finally implement "git log --follow"Libravatar Linus Torvalds5-1/+70
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>
2007-06-22Merge branch 'jc/oneline'Libravatar Junio C Hamano1-2/+2
* jc/oneline: pp_header(): work around possible memory corruption
2007-06-22Merge branch 'ei/oneline+add-empty'Libravatar Junio C Hamano13-239/+410
* ei/oneline+add-empty: Fix ALLOC_GROW calls with obsolete semantics Fix ALLOC_GROW off-by-one builtin-add: simplify (and increase accuracy of) exclude handling dir_struct: add collect_ignored option Extend --pretty=oneline to cover the first paragraph, Lift 16kB limit of log message output
2007-06-22filter-branch: add example to move everything into a subdirectoryLibravatar Johannes Schindelin2-0/+16
This is based on Jeff King's example in 20070621130137.GB4487@coredump.intra.peff.net Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22Merge branch 'js/filter'Libravatar Junio C Hamano3-1/+537
* js/filter: filter-branch: subdirectory filter needs --full-history filter-branch: Simplify parent computation. Teach filter-branch about subdirectory filtering filter-branch: also don't fail in map() if a commit cannot be mapped filter-branch: Use rev-list arguments to specify revision ranges. filter-branch: fix behaviour of '-k' filter-branch: use $(($i+1)) instead of $((i+1)) chmod +x git-filter-branch.sh filter-branch: prevent filters from reading from stdin t7003: make test repeatable Add git-filter-branch
2007-06-22Two trivial -Wcast-qual fixesLibravatar Junio C Hamano2-2/+2
Luiz Fernando N. Capitulino noticed the one in tree-walk.h where we cast away constness while computing the legnth of a tree entry. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22diffcore-rename: favour identical basenamesLibravatar Johannes Schindelin2-1/+45
When there are several candidates for a rename source, and one of them has an identical basename to the rename target, take that one. Noticed by Govind Salinas, posted by Shawn O. Pearce, partial patch by Linus Torvalds. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22Document git-gui, git-citool as mainporcelain manual pagesLibravatar Shawn O. Pearce4-5/+156
Jakub Narebski pointed out that the git-gui blame viewer is not a widely known feature, but is incredibly useful. Part of the issue is advertising. Up until now we haven't even referenced git-gui from within the core Git manual pages, mostly because I just wasn't sure how I wanted to supply git-gui documentation to end-users, or how that documentation should integrate with the core Git documentation. Based upon Jakub's comment that many users may not even know that the gui is available in a stock Git distribution I'm offering up two basic manual pages: git-citool and git-gui. These should offer enough of a starting point for users to identify that the gui exists, and how to start it. Future releases of git-gui may contain their own documentation system available from within a running git-gui. But not today. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22Generate tags with correct timestamp (git-svnimport)Libravatar Dave O'Neill2-24/+3
Now uses git-tag instead of manually constructing the tag. This gives us a correct timestamp, removes some crufty code, and makes it work the same as git-cvsimport. The generated tags are now lightweight tags instead of tag objects, which may or may not be the behaviour we want. Also, remove two unused variables from git-cvsimport. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22Import branch 'git-p4' of git://repo.or.cz/fast-exportLibravatar Shawn O. Pearce3-0/+1737
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.
2007-06-22Avoid src:dst syntax as default bash completion for git pushLibravatar Shawn O. Pearce1-1/+1
Raimund Bauer just discovered that the default bash completion for a local branch name in a git-push line is not the best choice when the branch does not exist on the remote system. In the past we have always completed the local name 'test' as "test:test", indicating that the destination name is the same as the local name. But this fails when "test" does not yet exist on the remote system, as there is no "test" branch for it to match the name against. Fortunately git-push does the right thing when given just the local branch, as it assumes you want to use the same name in the destination repository. So we now offer "test" as the completion in a git-push line, and let git-push assume that is also the remote branch name. We also still support the remote branch completion after the :, but only if the user manually adds the colon before trying to get a completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-22Make it possible to specify the HEAD for the internal ↵Libravatar Simon Hausmann1-2/+2
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>
2007-06-20Cloning from a repo without "current branch"Libravatar Nanako Shiraishi1-7/+13
If the remote repository does not have a "current branch", git-clone was confused and did not set up the resulting new repository correctly. It did not reset HEAD from the default 'master', and did not write the SHA1 to the master branch. Signed-off-by: Nanako Shiraishi <nanako3@bluebottle.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-20Change default man page path to /usr/share/manLibravatar Ismail Dönmez1-1/+1
According to FHS, http://www.pathname.com/fhs/pub/fhs-2.3.html#USRSHAREMANMANUALPAGES default man page path is $prefix/share/man. Signed-off-by: Ismail Donmez <ismail@pardus.org.tr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-20INSTALL: explain how to build documentationLibravatar Junio C Hamano1-4/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-20cvsserver: Actually implement --export-allLibravatar Alex Riesen1-2/+2
Frank Lichtenheld, Fri, Jun 15, 2007 03:01:53 +0200: > +test_expect_failure 'req_Root failure (export-all w/o whitelist)' \ > + 'cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 > + || false' This does not work, at least for bash in current Ubuntu: GNU bash, version 3.2.13(1)-release You have to put "||" on the previous line: Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-20Added git-p4 branches command that shows the mapping of perforce depot paths ↵Libravatar Simon Hausmann1-1/+27
to imported git branches. Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-17Warn about conflicting p4 branch mappings and use the first one found.Libravatar Simon Hausmann1-0/+6
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-17Fix the branch mapping detection to be independent from the order of the "p4 ↵Libravatar Simon Hausmann1-3/+13
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>
2007-06-16Fix ALLOC_GROW calls with obsolete semanticsLibravatar Jeff King1-2/+2
ALLOC_GROW now expects the 'nr' argument to be "how much you want" and not "how much you have". This fixes all cases where we weren't previously adding anything to the 'nr'. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Merge branch 'jk/add-empty' into ei/oneline+add-emptyLibravatar Junio C Hamano3-53/+51
* jk/add-empty: builtin-add: simplify (and increase accuracy of) exclude handling dir_struct: add collect_ignored option
2007-06-16pp_header(): work around possible memory corruptionLibravatar Johannes Schindelin1-2/+2
add_user_info() possibly adds way more than just the commit header line. In fact, it sometimes needs so much more space that there is a buffer overrun, leading to an ugly crash. For example, the date is printed in its own line, and usually takes up more space than the equivalent Unix epoch. So, for good measure, add 80 characters (a full line) to the allocated space, in addition to the header line length. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Fix ALLOC_GROW off-by-oneLibravatar Jeff King1-1/+1
The ALLOC_GROW macro will never let us fill the array completely, instead allocating an extra chunk if that would be the case. This is because the 'nr' argument was originally treated as "how much we do have now" instead of "how much do we want". The latter makes much more sense because you can grow by more than one item. This off-by-one never resulted in an error because it meant we were overly conservative about when to allocate. Any callers which passed "how much we have now" need to be updated, or they will fail to allocate enough. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git log --full-diffLibravatar Jakub Narebski1-0/+7
Based on description of commit 477f2b41310c4b1040a9e7f72720b9c39d82caf9 "git log --full-diff" adding this option. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git log --abbrev-commit, as a kind of pretty optionLibravatar Jakub Narebski1-0/+9
Documentation taken from paraphrased description of "--abbrev[=<n>]" diff option, and from description of commit 5c51c985 introducing this option. Note that to change number of digits one must use "--abbrev=<n>", which affects [also] diff output. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Use tabs for indenting definition list for options in git-log.txtLibravatar Jakub Narebski1-1/+1
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git rev-list --timestampLibravatar Jakub Narebski1-0/+4
Note that git log does not understand this option yet: $ git log --timestamp fatal: unrecognized argument: --timestamp Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git reflog --stale-fixLibravatar Jakub Narebski1-0/+13
Document --stale-fix, used in "git reflog expire --stale-fix --all" to remove invalid reflog entries, to fix situation after running non reflog-aware git-prune from an older git in the presence of reflogs (see RelNotes-1.5.0.txt). Based on description of commit 1389d9ddaa68a4cbf5018d88f971b9bbb7aaa3c9 "reflog expire --fix-stale" which introduced this option. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git rev-parse --is-inside-git-dirLibravatar Jakub Narebski1-0/+4
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git read-tree --trivialLibravatar Jakub Narebski2-2/+8
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git rev-list --full-historyLibravatar Jakub Narebski1-0/+9
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16git-p4 fails when cloning a p4 depo.Libravatar Benjamin Sergeant1-3/+17
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>
2007-06-16Do not use h_errno after connect(2): the function does not set itLibravatar Alex Riesen1-4/+2
Randal L. Schwartz noticed compilation problems on SunOS, which made me look at the code again. The thing is, h_errno is not used by connect(2), it is only for functions from netdb.h, like gethostbyname. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Documentation: update "stale" links for 1.5.2.2Libravatar Junio C Hamano1-1/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Fix initial multi-branch import.Libravatar Simon Hausmann1-0/+1
The list of existing p4 branches in git wasn't initialized. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-16Merge branch 'jc/remote'Libravatar Junio C Hamano3-85/+275
* jc/remote: git-push: Update description of refspecs and add examples remote.c: "git-push frotz" should update what matches at the source. remote.c: fix "git push" weak match disambiguation remote.c: minor clean-up of match_explicit() remote.c: refactor creation of new dst ref remote.c: refactor match_explicit_refs()
2007-06-16Merge branch 'gp/branch'Libravatar Junio C Hamano2-2/+16
* gp/branch: git-branch: cleanup config file when deleting branches
2007-06-16Merge branch 'fl/cvsserver'Libravatar Junio C Hamano3-8/+171
* fl/cvsserver: cvsserver: Actually implement --export-all cvsserver: Let --base-path and pserver get along just fine cvsserver: Add some useful commandline options