summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-09-01rebase -m: Fix incorrect short-logs of already applied commits.Libravatar Johannes Sixt2-5/+52
When a topic branch is rebased, some of whose commits are already cherry-picked upstream: o--X--A--B--Y <- master \ A--B--Z <- topic then 'git rebase -m master' would report: Already applied: 0001 Y Already applied: 0002 Y With this fix it reports the expected: Already applied: 0001 A Already applied: 0002 B As an added bonus, this change also avoids 'echo' of a commit message, which might contain escapements. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31git-diff: resurrect the traditional empty "diff --git" behaviourLibravatar Junio C Hamano4-7/+45
The warning message to suggest "Consider running git-status" from "git-diff" that we experimented with during the 1.5.3 cycle turns out to be a bad idea. It robbed cache-dirty information from people who valued it, while still asking users to run "update-index --refresh". It was hoped that the new behaviour would at least have some educational value, but not showing the cache-dirty paths like before meant that the user would not even know easily which paths were cache-dirty, and it made the need to refresh the index look like even more unnecessary chore. This commit reinstates the traditional behaviour, but with a twist. By default, the empty "diff --git" output is totally squelched out from "git diff" output. At the end of the command, it automatically runs "update-index --refresh" as needed, without even bothering the user. In other words, people who do not care about the cache-dirtyness do not even have to see the warning. The traditional behaviour to see the stat-dirty output and to bypassing the overhead of content comparison can be specified by setting the configuration variable diff.autorefreshindex to false. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31git-tag: Fix -l option to use better shell style globs.Libravatar Carlos Rica2-20/+11
This patch removes certain behaviour of "git tag -l foo", currently listing every tag name having "foo" as a substring. The same thing now could be achieved doing "git tag -l '*foo*'". This feature was added recently when git-tag.sh got the -n option for showing tag annotations, because that commit also replaced the old "grep pattern" behaviour with a more preferable "shell pattern" behaviour (although slightly modified as you can see). Thus, the following builtin-tag.c implemented it in order to ensure that tests were passing unchanged with both programs. Since common "shell patterns" match names with a given substring _only_ when * is inserted before and after (as in "*substring*"), and the "plain" behaviour cannot be achieved easily with the current implementation, this is mostly the right thing to do, in order to make it more flexible and consistent. Tests for "git tag" were also changed to reflect this. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31git-svn: fix dcommit clobbering upstream when committing multiple changesLibravatar Eric Wong2-28/+62
Although dcommit could detect if the first commit in the series would conflict with the HEAD revision in SVN, it could not detect conflicts in further commits it made. Now we rebase each uncommitted change after each revision is committed to SVN to ensure that we are up-to-date. git-rebase will bail out on conflict errors if our next change cannot be applied and committed to SVN cleanly, preventing accidental clobbering of changes on the SVN-side. --no-rebase users will have trouble with this, and are thus warned if they are committing more than one commit. Fixing this for (hopefully uncommon) --no-rebase users would be more complex and will probably happen at a later date. Thanks to David Watson for finding this and the original test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31git-svn: Protect against "diff.color = true".Libravatar Junio C Hamano1-2/+2
If the configuration of the user has "diff.color = true", the output from "log" we invoke internally added color codes, which broke the parser. Signed-off-by: Junio C Hamano <gitster@pobox.com> Tested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2007-08-31filter-branch: introduce convenience function "skip_commit"Libravatar Johannes Schindelin3-14/+42
With this function, a commit filter can leave out unwanted commits (such as temporary commits). It does _not_ undo the changeset corresponding to that commit, but it _skips_ the revision. IOW no tree object is changed by this. If you like to commit early and often, but want to filter out all intermediate commits, marked by "@@@" in the commit message, you can now do this with git filter-branch --commit-filter ' if git cat-file commit $GIT_COMMIT | grep '@@@' > /dev/null; then skip_commit "$@"; else git commit-tree "$@"; fi' newbranch Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31filter-branch: provide the convenience functions also for commit filtersLibravatar Johannes Schindelin3-13/+25
Move the convenience functions to the top of git-filter-branch.sh, and return from the script when the environment variable SOURCE_FUNCTIONS is set. By sourcing git-filter-branch with that variable set automatically, all commit filters may access the convenience functions like "map". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31rebase -i: mention the option to split commits in the man pageLibravatar Johannes Schindelin1-1/+38
The interactive mode of rebase can be used to split commits. Tell the interested parties about it, with a dedicated section in the man page. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31filter-branch: fix remnants of old syntax in documentationLibravatar Johannes Schindelin1-14/+18
Some time ago, filter-branch's syntax changed so that more than one ref can be rewritten at the same time. This involved the removal of the ref name for the result; instead, the refs are rewritten in-place. This updates the last leftovers in the documentation to reflect the new behavior. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31Teach bash about completing arguments for git-tagLibravatar Shawn O. Pearce1-0/+58
Lately I have been doing a lot of calls to `git tag -d` and also to `git tag -v`. In both such cases being able to complete the names of existing tags saves the fingers some typing effort. We now look for the -d or -v option to git-tag in the bash completion support and offer up existing tag names as possible choices for these. When creating a new tag we now also offer bash completion support for the second argument to git-tag (the object to be tagged) as this can often be a specific existing branch name and is not necessarily the current HEAD. If the -f option is being used to recreate an existing tag we now also offer completion support on the existing tag names for the first argument of git-tag, helping to the user to reselect the prior tag name that they are trying to replace. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-31Hopefully the final update to draft release notes for 1.5.3.Libravatar Junio C Hamano1-1/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31Make "git-log --" without paths behave the same as "git-log" without --Libravatar Junio C Hamano1-1/+2
"git log" family of commands, even when run from a subdirectory, do not limit the revision range with the current directory as the path limiter, but with double-dash without any paths after it, i.e. "git log --" do so. It was a mistake to have a difference between "git log --" and "git log" introduced in commit ae563542bf10fa8c33abd2a354e4b28aca4264d7 (First cut at libifying revlist generation). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31git-init: autodetect core.symlinksLibravatar Junio C Hamano1-0/+15
We already autodetect if filemode is reliable on the filesystem to deal with VFAT and friends. Do the same for symbolic link support. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30Make git-archimport log entries more consistentLibravatar Miles Bader1-1/+5
When appending the "git-archimport-id:" line to the end of log entries, git-archimport would use two blank lines as a separator when there was no body in the arch log (only a Summary: line), and zero blank lines when there was a body (making it hard to see the break between the actual log message and the git-archimport-id: line). This patch makes git-archimport generate one blank line as a separator in all cases. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30fix same sized delta logicLibravatar Nicolas Pitre1-4/+8
The code favoring shallower deltas when size is equal was triggered only when previous delta was also cached. There should be no relation between cached deltas and same sized deltas. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30filter-branch: make sure orig_namespace ends with a single slash.Libravatar Junio C Hamano1-1/+1
Later in a loop any existing ref whose path begins with it is removed. It would be a disaster if you allowed it to say refs/head for example. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30git-filter-branch: document --original optionLibravatar Giuseppe Bilotta1-1/+6
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30git-filter-branch: more detailed USAGELibravatar Giuseppe Bilotta1-1/+7
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30Makefile: do not allow gnu make to remove test-*.o filesLibravatar Junio C Hamano1-0/+2
It appears parallel build (-j) gets confused. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30Temporary fix for stack smashing in mailinfoLibravatar Alex Riesen1-35/+50
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30Fixing comment in merge strategiesLibravatar Tom Clarke2-2/+2
Comments in both these strategies refer to the wrong number of remotes Signed-off-by: Tom Clarke <tom@u2i.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29ls-files --error-unmatch: do not barf if the same pattern is given twice.Libravatar Junio C Hamano1-0/+20
This is most visible when you do "git commit Makefile Makefile"; it may be a stupid request, but that is not a reason to fail the command. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-1/+2
* 'master' of git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix bug causing undefined variable error when cherry-picking
2007-08-29completion: also complete git-log's --left-right and --cherry-pick optionLibravatar Johannes Schindelin1-0/+1
Both --left-right and --cherry-pick are particularly long to type, so help the user there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29gitk: Fix bug causing undefined variable error when cherry-pickingLibravatar Paul Mackerras1-1/+2
When "Show nearby tags" is turned off and the user did a cherry-pick, we were trying to access variables relating to the descendent/ancestor tag & head computations in addnewchild though they hadn't been set. This makes sure we don't do that. Reported by Johannes Sixt. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-29git-daemon(1): assorted improvements.Libravatar Junio C Hamano1-2/+34
Jari Aalto noticed a handful places in git-daemon documentation that need to be improved. * --inetd makes --pid-file to be ignored, in addition to --user and --group * receive-pack service was not described at all. We should, if only to warn about the security implications of it. * There was no example of per repository configuration. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29GIT 1.5.3-rc7Libravatar Junio C Hamano1-3/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29git-svn.txt: fix an obvious misspelling.Libravatar David Kastrup1-1/+1
Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29git.el: Added colors for dark backgroundLibravatar David Kågedal1-9/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28format-patch documentation: reword to hint "--root <one-commit>" more clearlyLibravatar Junio C Hamano1-7/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28Merge branch 'jc/logsemantics'Libravatar Junio C Hamano4-14/+35
* jc/logsemantics: "format-patch --root rev" is the way to show everything. Porcelain level "log" family should recurse when diffing.
2007-08-28Documentation/git-diff: A..B and A...B cannot take tree-ishesLibravatar Junio C Hamano1-5/+6
As pointed out by Linus, these notations require the endpoints given by the end user to be commits. Clarify. Also, three-dots in AsciiDoc are turned into ellipses unless quoted with bq. Be careful. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28git-add: Make the filename globbing note a bit clearerLibravatar Petr Baudis1-3/+3
I think the trick with Git-side filename globbing is important and perhaps not that well known. Clarify a bit in git-add documentation what it means. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28git-add: Make the "tried to add ignored file" error message less confusingLibravatar Petr Baudis1-3/+3
Currently the error message seems to imply (at least to me) that only the listed files were withheld and the rest of the files was added to the index, even though that's obviously not the case. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28gitweb: Fix escaping HTML of project owner in 'projects_list' andLibravatar Jakub Narebski1-2/+2
'summary' views This for example allows to put email address in the project owner field in the projects index file (when $projects_list points to a file, and not to a directory), in the form of: path/to/repo.git Random+J+Developer+<random@developer.example.org> Noticed-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28"format-patch --root rev" is the way to show everything.Libravatar Junio C Hamano2-10/+32
We used to trigger the special case "things not in origin" semantics only when one and only one positive ref is given, and no number (e.g. "git format-patch -4 origin") was specified, and used the general revision range semantics for everything else. This narrows the special case a bit more, by making: git format-patch --root this_version to show everything that leads to the named commit. More importantly, document the two different semantics better. The generic revision range semantics came later and bolted on without being clearly documented. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28Porcelain level "log" family should recurse when diffing.Libravatar Junio C Hamano3-4/+3
Most notably, "git log --name-status" stopped at top level directory changes without "-r" option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27git-merge: do up-to-date check also for all strategiesLibravatar Junio C Hamano2-15/+97
This clarifies the logic to omit fast-forward check and omit trivial merge before running the specified strategy. The "index_merge" variable started out as a flag to say "do not do anything clever", but when recursive was changed to skip the trivial merge, the semantics were changed and the variable alone does not make sense anymore. This splits the variable into two, allow_fast_forward (which is almost always true, and avoids making a merge commit when the other commit is a descendant of our branch, but is set to false for ours and subtree) and allow_trivial_merge (which is false for ours, recursive and subtree). Unlike the earlier implementation, the "ours" strategy allows an up-to-date condition. When we are up-to-date, the result will be our commit, and by definition, we will have our tree as the result. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27git --bare cmd: do not unconditionally nuke GIT_DIRLibravatar Junio C Hamano2-2/+5
"GIT_DIR=some.where git --bare cmd" and worse yet "git --git-dir=some.where --bare cmd" were very confusing. They both ignored git-dir specified, and instead made $cwd as GIT_DIR. This changes --bare not to override existing GIT_DIR. This has been like this for a long time. Let's hope nobody sane relied on this insane behaviour. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27Fix initialization of a bare repositoryLibravatar Junio C Hamano3-5/+177
Here is my attempt to fix this with a minimally intrusive patch. * As "git --bare init" cannot tell if it was called with --bare or just "GIT_DIR=. git init", I added an explicit assignment of is_bare_repository_cfg on the codepath for "git --bare". * GIT_WORK_TREE alone without GIT_DIR does not make any sense, nor GIT_WORK_TREE with an explicit "git --bare". Catch that mistake. It might make sense to move this check to "git.c" side as well, but I tried to shoot for the minimum change for now. * Some scripts, especially from the olden days, rely on traditional GIT_DIR behaviour in "git init". Namely, these are some notable patterns: (create a bare repository) - mkdir some.git && cd some.git && GIT_DIR=. git init - mkdir some.git && cd some.git && git --bare init (create a non-bare repository) - mkdir .git && GIT_DIR=.git git init - mkdir .git && GIT_DIR=`pwd`/.git git init This comes with a new test script and also passes the existing test suite, but there may be cases that are still broken with the current tip of master and this patch does not yet fix. I'd appreciate help in straightening this mess out. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27name-rev: Fix non-shortest descriptionLibravatar Johannes Schindelin1-10/+11
Uwe Kleine-König noticed that under certain circumstances, name-rev picked a non-optimal tag. Jeff King analyzed that name-rev only takes into account the number of merge traversals, and then the _last_ number in the description. As an easy way to fix it, use a weighting factor for merge traversals: A merge traversal is now made 65535 times more expensive than a first-parent traversal. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27Describe two-dot and three-dot notation for diff endpoints.Libravatar Mike Hommey1-7/+36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27git-tag(1): Remove duplicate textLibravatar Jari Aalto1-7/+0
Options -d, -l, -v have already been explained in OPTIONS below. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27gitweb: Lift any characters restriction on searched stringsLibravatar Petr Baudis1-3/+0
Everything is already fully quoted along the way so I believe this to be unnecessary at this point. It would pose trouble for regexp searches. Signed-off-by: Petr Baudis <pasky@suse.cz> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26RelNotes draft for 1.5.3 update.Libravatar Junio C Hamano1-2/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26Merge branch 'master' of git://repo.or.cz/git-guiLibravatar Junio C Hamano3-66/+97
* 'master' of git://repo.or.cz/git-gui: git-gui: Correct 'git gui blame' in a subdirectory git-gui: Do not offer to stage three-way diff hunks into the index git-gui: Refactor diff pane popup support for future improvements git-gui: Fix "unoptimized loading" to not cause git-gui to crash git-gui: Paper bag fix "Stage Hunk For Commit" in diff context menu git-gui: Allow git-merge to use branch names in conflict markers git-gui: Fix window manager problems on ion3
2007-08-26When nothing to git-commit, honor the git-status color setting.Libravatar Brian Hetro1-4/+6
Instead of disabling color all of the time during a git-commit, allow the user's config preference in the situation where there is nothing to commit. In this situation, the status is printed to the terminal and not sent to COMMIT_EDITMSG, so honoring the status color setting is expected. Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26gitweb: Fix searchbox positioningLibravatar Petr Baudis1-1/+1
Currently, searchbox is CSS'd to have position: absolute, which has the unfortunate consequence that if the viewport is too small and can't fit into the page width together with the navbar, it gets overlapped and part of the navbar gets obscured. This makes searchbox float: right instead, thus the navbar simply gets wrapped. Discovered and fix pointed out by Michael Olson <mwolson@gnu.org>. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26Merge branch 'master' of git://linux-nfs.org/~bfields/gitLibravatar Junio C Hamano1-93/+59
* 'master' of git://linux-nfs.org/~bfields/git: Documentation/user-manual.txt: fix a few omissions of gitlink commands. user-manual: fix incorrect header level user-manual: use pithier example commit user-manual: introduce the word "commit" earlier user-manual: minor editing for conciseness user-manual: edit "ignoring files" for conciseness Documentation/user-manual.txt: fix a few omissions of gitlink commands.
2007-08-26Merge branch 'maint'Libravatar J. Bruce Fields1-84/+48
Conflicts: Documentation/user-manual.txt