aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* annotate: fix for cvsserver.Junio C Hamano2007-02-06
| | | | | | git-cvsserver does not want the boundary commits shown any differently. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix mismatched parenthesisJunio C Hamano2007-02-06
| | | | | | An earlier commit 04179418 broke gitweb. Badly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-push: allow globbing wildcard refspec.Junio C Hamano2007-02-06
| | | | | | | | | | | | | | | | | | | | | This allows you to set up mothership-satellite configuration more symmetrically and naturally by allowing the globbing wildcard refspec for git-push. On your satellite machine: [remote "mothership"] url = mothership:project.git fetch = refs/heads/*:refs/remotes/mothership/* push = refs/heads/*:refs/remotes/satellite/* You would say "git fetch mothership" to update your tracking branches under mothership/ to keep track of the progress on the mothership side, and when you are done working on the satellite machine, you would "git push mothership" to update their tracking branches under satellite/. Corresponding configuration on the mothership machine can be used to make "git fetch satellite" update its tracking branch under satellite/. on the mothership. Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Complete git-remote subcommands.Shawn O. Pearce2007-02-05
| | | | | | | | | Completing the 3 core subcommands to git-remote, along with the names of remotes for 'show' and 'prune' (which take only existing remotes) is handy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Support git-rebase -m continuation completion.Shawn O. Pearce2007-02-05
| | | | | | | | | | | Apparently `git-rebase -m` uses a metadata directory within .git (.git/.dotest-merge) rather than .dotest used by git-am (and git-rebase without the -m option). This caused the completion code to not offer --continue, --skip or --abort when working within a `git-rebase -m` session. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix longstanding mismerge of ALL_CFLAGS vs BASIC_CFLAGSJunio C Hamano2007-02-05
| | | | | | | | | | | The earlier commit d7b6c3c0 (Aug 15, 2006) introduced this mismerge when most of the CFLAGS were renamed to BASIC_CFLAGS. Not that it matters right now, since we do not compile XS Perl extensions which wanted non GNU subset of ALL_CFLAGS for compilation, but we should make things consistent. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pager: Work around window resizing bug in 'less'Linus Torvalds2007-02-05
| | | | | | | | | | | | | | | | | | | | If you resize the terminal while less is waiting for input, less will exit entirely without even showing the output. This is very noticeable if you do something like "git diff" on a big and cold-cache tree and git takes a few seconds to think, and then you resize the window while it's preparing. Boom. No output AT ALL. The way to reproduce the problem is to do some pager operation that takes a while in git, and resizing the window while git is thinking about the output. Try git diff --stat v2.6.12.. in the kernel tree to do something where it takes a while for git to start outputting information. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach git-remote add to fetch and trackJunio C Hamano2007-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds three options to 'git-remote add'. * -f (or --fetch) option tells it to also run the initial "git fetch" using the newly created remote shorthand. * -t (or --track) option tells it not to use the default wildcard to track all branches. * -m (or --master) option tells it to make the remote/$name/HEAD point at a remote tracking branch other than master. For example, with this I can say: $ git remote add -f -t master -t quick-start -m master \ jbf-um git://linux-nfs.org/~bfields/git.git/ to (1) create remote.jbf-um.url; (2) track master and quick-start branches (and no other); the two -t options create these two lines: fetch = +refs/heads/master:refs/remotes/jbf-um/master fetch = +refs/heads/quick-start:refs/remotes/jbf-um/quick-start (3) set up remotes/jbf-um/HEAD to point at jbf-um/master so that later I can say "git log jbf-um" Or I could do $ git remote add -t 'ap/*' andy /home/andy/git.git to make Andy's topic branches kept track of under refs/remotes/andy/ap/. Other possible improvements I considered but haven't implemented (hint, hint) are: * reject wildcard letters other than a trailing '*' to the -t parameter; * make -m optional and when the first -t parameter does not have the trailing '*' default to that value (so the above example does not need to say "-m master"); * if -m is not given, and -t parameter ends with '*' (i.e. the above defaulting did not tell us where to point HEAD at), and if we did the fetch with -f, check if 'master' was fetched and make HEAD point at it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* blame: document --contents optionJunio C Hamano2007-02-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use pretend_sha1_file() in git-blame and git-merge-recursive.Junio C Hamano2007-02-05
| | | | | | | | | | | | | | | | git-merge-recursive wants an null tree as the fake merge base while producing the merge result tree. The null tree does not have to be written out in the object store as it won't be part of the result, and it is a prime example for using the new pretend_sha1_file() function. git-blame needs to register an arbitrary data to in-core index while annotating a working tree file (or standard input), but git-blame is a read-only application and the user of it could even lack the privilege to write into the object store; it is another good example for pretend_sha1_file(). Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add pretend_sha1_file() interface.Junio C Hamano2007-02-05
| | | | | | | | The new interface allows an application to temporarily hash a small number of objects and pretend that they are available in the object store without actually writing them. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-blame: no rev means start from the working tree file.Junio C Hamano2007-02-05
| | | | | | | | | | | | | | | | | Warning: this changes the semantics. This makes "git blame" without any positive rev to start digging from the working tree copy, which is made into a fake commit whose sole parent is the HEAD. It also adds --contents <file> option to pretend as if the working tree copy has the contents of the named file. You can use '-' to make the command read from the standard input. If you want the command to start annotating from the HEAD commit, you need to explicitly give HEAD parameter. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-blame: an Emacs minor mode to view file with git-blame output.David Kågedal2007-02-05
| | | | | | | | | | | | | | Here's another version of git-blame.el that automatically tries to create a sensible list of colors to use for both light and dark backgrounds. Plus a few minor fixes. To use: 1) Load into emacs: M-x load-file RET git-blame.el RET 2) Open a git-controlled file 3) Blame: M-x git-blame-mode Signed-off-by: Junio C Hamano <junkio@cox.net>
* Allow forcing of a parent commit, even if the parent is not a direct one.Simon 'corecode' Schubert2007-02-05
| | | | | | | | | | | | This can be used to compress multiple changesets into one, for example like git cvsexportcommit -P cvshead mybranch without having to do so in git first. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bisect: it needs to be done in a working tree.Junio C Hamano2007-02-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Commands requiring a work tree must not run in GIT_DIRJohannes Schindelin2007-02-05
| | | | | | | | This patch helps when you accidentally run something like git-clean in the git directory instead of the work tree. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add hg-to-git conversion utility.Stelian Pop2007-02-05
| | | | | | | | | | | | | | | | hg-to-git.py is able to convert a Mercurial repository into a git one, and preserves the branches in the process (unlike tailor) hg-to-git.py can probably be greatly improved (it's a rather crude combination of shell and python) but it does already work quite well for me. Features: - supports incremental conversion (for keeping a git repo in sync with a hg one) - supports hg branches - converts hg tags Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* blameview: Support browsable functionality to blameview.Aneesh Kumar K.V2007-02-05
| | | | | | | | Double clicking on the row execs a new blameview with commit hash as argument. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Convert project name to UTF-8Yasushi SHOJI2007-02-05
| | | | | | | | | | If the repository directory name is in non-ascii, $project needs to be converted from perl internal to utf-8 because it will be used as title, page path, and snapshot filename. use to_utf8() to do the conversion. Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Support git-bisect and its subcommands.Shawn O. Pearce2007-02-05
| | | | | | | | | | We now offer completion support for git-bisect's subcommands, as well as ref name completion on the good/bad/reset subcommands. This should make interacting with git-bisect slightly easier on the fingers. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Support --add completion to git-config.Shawn O. Pearce2007-02-05
| | | | | | | | | We've recently added --add as an argument to git-config, but I missed putting it into the earlier round of git-config updates within the bash completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Hide git-resolve, its deprecated.Shawn O. Pearce2007-02-05
| | | | | | | | | Don't offer resolve as a possible subcommand completion. If you read the top of the script, there is a big warning about how it will go away soon in the near future. People should not be using it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Offer --prune completion for git-gc.Shawn O. Pearce2007-02-05
| | | | | | | | I'm lazy. I don't want to type out --prune if bash can do it for me with --<tab>. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Hide diff-stages from completion.Shawn O. Pearce2007-02-05
| | | | | | | | | | Apparently nobody really makes use of git-diff-stages, as nobody has complained that it is not supported by the git-diff frontend. Since its likely this will go away in the future, we should not offer it as a possible subcommand completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bash: Support completion on git-cherry.Shawn O. Pearce2007-02-05
| | | | | | | | | I just realized I did not support ref name completion for git-cherry. This tool is just too useful to contributors who submit patches upstream by email; completion support for it is very handy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Show an example of deleting commits with git-rebase.Shawn O. Pearce2007-02-05
| | | | | | | | | | | | | | | This particular use of git-rebase to remove a single commit or a range of commits from the history of a branch recently came up on the mailing list. Documenting the example should help other users arrive at the same solution on their own. It also was not obvious to the newcomer that git-rebase is able to accept any commit for --onto <newbase> and <upstream>. We should at least minimally document this, as much of the language in git-rebase's manpage refers to 'branch' rather than 'committish'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-for-each-ref doesn't return "the bit after $GIT_DIR/refs"Andy Parkins2007-02-05
| | | | | | | | The documentation for git-for-each-ref said that the refname variable would return "the part after $GIT_DIR/refs/", which isn't true. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t9200: Work around HFS+ issues.Junio C Hamano2007-02-05
| | | | | | | | | | | | We at least know that the test as written has a problem in an environment where "touch '$p'; ls | fgrep '$p'" fails, and have a clear understand why it fails. This tests if the filesystem has that particular issue we know "git add" has a problem with, and skips the test in such an environment. This way, we might catch issues "git add" might have in other environments. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rename get_ident() to fmt_ident() and make it available to outsideJunio C Hamano2007-02-04
| | | | | | | This makes the functionality of ident.c::get_ident() available to other callers. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-archimport: initial import needs empty directoryGerrit Pape2007-02-04
| | | | | | | | | | git-archimport should better refuse to start an initial import if the current directory is not empty. (http://bugs.debian.org/400508) Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "Allow branch.*.merge to talk about remote tracking branches."Junio C Hamano2007-02-04
| | | | | | | | | | | | | | | | This reverts commit 80c797764a6b6a373f0f1f47d7f56b0d950418a9. Back when I committed this, it seemed to be a good idea. People who always use remote tracking branches can optionally use the local name they happen to use to specify what to merge, which meant that I did not have to teach them why we use the name at the remote side every time they are confused. But allowing it seems to break other people's scripts. The real solution is not to allow more ways to express the same thing, but to educate people to use the right syntax. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'np/dreflog'Junio C Hamano2007-02-04
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * np/dreflog: show-branch -g: default to the current branch. Let git-checkout always drop any detached head Enable HEAD@{...} and make it independent from the current branch scan reflogs independently from refs add reflog when moving HEAD to a new branch create_symref(): do not assume pathname from git_path() persists long enough add logref support to git-symbolic-ref move create_symref() past log_ref_write() add reflog entries for HEAD when detached enable separate reflog for HEAD lock_ref_sha1_basic(): remember the original name of a ref when resolving it make reflog filename independent from struct ref_lock
| * show-branch -g: default to the current branch.Junio C Hamano2007-02-03
| | | | | | | | | | | | | | | | Now we have a separate reflog on HEAD, show-branch -g without an explicit parameter defaults to the current branch, or HEAD when it is detached from branches. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Let git-checkout always drop any detached headNicolas Pitre2007-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to refuse leaving a detached HEAD when it wasn't matching an existing ref so not to lose any commit that might have been performed while not on any branch (unless -f was provided). But this protection was completely bogus since it was still possible to move to HEAD^ while still remaining detached but losing the last commit anyway if there was one. Now that we have a proper reflog for HEAD it is best to simply remove that bogus (and admitedly annoying) protection and simply display the last HEAD position instead. If one wants to recover a lost detached state then it can be retrieved from the HEAD reflog. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Enable HEAD@{...} and make it independent from the current branchNicolas Pitre2007-02-03
| | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Merge branch 'master' into np/dreflogJunio C Hamano2007-02-03
| |\ | | | | | | | | | | | | | | | | | | | | | | | | This is to resolve conflicts early in preparation for possible inclusion of "reflog on detached HEAD" series by Nico, as having it in 1.5.0 would really help us remove confusion between detached and attached states. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | scan reflogs independently from refsNicolas Pitre2007-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the search for all reflogs depends on the existence of corresponding refs under the .git/refs/ directory. Let's scan the .git/logs/ directory directly instead. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | add reflog when moving HEAD to a new branchNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | create_symref(): do not assume pathname from git_path() persists long enoughJunio C Hamano2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being lazy to rely on the cycling N buffers mkpath() and friends return is nice in general, but it makes it too easy to introduce new bugs that are "mysterious". Introduction of read_ref() in create_symref() after calling git_path() to get the git_HEAD value (i.e. the path to create a new symref at) consumed more than the available buffers and broke a later call to mkpath() that derives lockpath from it. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | add logref support to git-symbolic-refNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | move create_symref() past log_ref_write()Nicolas Pitre2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | This doesn't change the code at all. It is done to make the next patch more obvious. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | add reflog entries for HEAD when detachedNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | enable separate reflog for HEADNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | If HEAD is tied to a branch then both logs/HEAD and logs/heads/<branch> are updated. This is also true for any symbolic refs in general, but only HEAD will see its reflog created automatically. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | lock_ref_sha1_basic(): remember the original name of a ref when resolving itNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | A ref might be pointing to another ref but only the name of the last ref is remembered. Let's remember about the first name as well. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | make reflog filename independent from struct ref_lockNicolas Pitre2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for ref_log_write() to be used in a more flexible way, and is needed for future changes. This is only code reorg with no behavior change. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Why is it bad to rewind a branch that has already been pushed out?Robin Rosenberg2007-02-04
| | | | | | | | | | | | | | | | | | | | | Mention git-revert as an alternative to git-reset to revert changes. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-clone --reference: saner handling of borrowed symrefs.Junio C Hamano2007-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using --reference to borrow objects from a neighbouring repository while cloning, we copy the entire set of refs under temporary "refs/reference-tmp/refs" space and set up the object alternates. However, a textual symref copied this way would not point at the right place, and causes later steps to emit error messages (which is harmless but still alarming). This is most visible when using a clone created with the separate-remote layout as a reference, because such a repository would have refs/remotes/origin/HEAD with 'ref: refs/remotes/origin/master' as its contents. Although we do not create symbolic-link based refs anymore, they have the same problem because they are always supposed to be relative to refs/ hierarchy (we dereference by hand, so it only is good for HEAD and nothing else). In either case, the solution is simply to remove them after copying under refs/reference-tmp; if a symref points at a true ref, that true ref itself is enough to ensure that objects reachable from it do not needlessly get fetched. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | bash: Support internal revlist options better.Shawn O. Pearce2007-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | format-patch/log/whatchanged all take --not and --all as options to the internal revlist process. So these should be supported as possible completions. gitk takes anything rev-list/log/whatchanged takes, so we should use complete_revlist to handle its options. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | bash: Support unique completion when possible.Shawn O. Pearce2007-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because our use of -o nospace prevents bash from adding a trailing space when a completion is unique and has been fully completed, we need to perform this addition on our own. This (large) change converts all existing uses of compgen to our wrapper __gitcomp which attempts to handle this by tacking a trailing space onto the end of each offered option. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | bash: Support unique completion on git-config.Shawn O. Pearce2007-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases we know a completion will be unique, but we've disabled bash's automatic space addition (-o nospace) so we need to do it ourselves when necessary. This change adds additional support for new configuration options added in 1.5.0, as well as some extended completion support for the color.* family of options. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>