summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-07-11tests: Set EDITOR=: and VISUAL=: globallyLibravatar Eric Wong4-3/+5
This way we don't have to remember to set it for each test; and if we forget, we won't cause interactive editors to be spawned for non-interactive tests. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Log ref changes made by git-fetch and git-pull.Libravatar Shawn Pearce2-6/+16
When git-fetch updates a reference record in the associated reflog what type of update took place and who caused it (git-fetch or git-pull, by invoking git-fetch). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Record the type of commit operation in the reflog.Libravatar Shawn Pearce2-4/+21
If committing a merge (.git/MERGE_HEAD exists), an initial tree (no HEAD) or using --amend to amend the prior commit then denote the subtype of commit in the reflog. This helps to distinguish amended or merge commits from normal commits. In the case of --amend the prior sha1 is probably the commit which is being thrown away in favor of the new commit. Since it is likely that the old commit doesn't have any ref pointing to it anymore it can be interesting to know why that the commit was replaced and orphaned. In the case of a merge the prior sha1 is probably the first parent of the new merge commit. Consequently having its prior sha1 in the reflog is slightly less interesting but its still informative to know the commit was the result of a merge which had to be completed by hand. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Allow user.name and user.email to drive reflog entry.Libravatar Shawn Pearce2-1/+1
Apparently calling setup_ident() after git_config causes the user.name and user.email values read from the config file to be replaced with the data obtained from the host. This means that users who have setup their email address in user.email will instead be writing reflog entries with their hostname. Moving setup_ident() to before git_config in update-ref resolves this ordering problem. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Fix linking for not-so-clever linkers.Libravatar Johannes Schindelin2-2/+1
On one of my systems, the linker is not intelligent enough to link with pager.o (in libgit.a) when only the variable pager_in_use is needed. The consequence is that the linker complains about an undefined variable. So, put the variable into environment.o, where it is linked always. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10git-rev-list: add documentation for --parents, --no-mergesLibravatar Matthias Lederhofer1-0/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Merge branch 'jc/show-merge'Libravatar Junio C Hamano1-2/+51
* jc/show-merge: git log -p --merge [[--] paths...]
2006-07-10Avoid C99 comments, use old-style C comments instead.Libravatar Pavel Roskin10-31/+33
This doesn't make the code uglier or harder to read, yet it makes the code more portable. This also simplifies checking for other potential incompatibilities. "gcc -std=c89 -pedantic" can flag many incompatible constructs as warnings, but C99 comments will cause it to emit an error. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Fix more typos, primarily in the codeLibravatar Pavel Roskin34-56/+56
The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10gitweb.cgi: Teach "a=blob" action to know the blob/file mime typeLibravatar Luben Tuikov1-60/+67
Now action "blob" knows the file type: if the file type is not "text/*" then action "blob" defaults to "blob_plain", i.e. the file is downloaded raw for the browser to interpret. If the file type is "text/*", then "blob" defaults to the current "cat -n"-like output, from which you can click "plain", to get the "blob_plain" output. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10gitweb.cgi: Create $git_temp if it doesn't existLibravatar Luben Tuikov1-0/+3
Unless we'd done diffs, $git_temp doesn't exist and then mime lookups fail. Explicitly create it, if it doesn't exist already. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Merge branch 'lt/gitweb'Libravatar Junio C Hamano1-0/+1
* lt/gitweb: Add "raw" output option to blobs in "tree" view format
2006-07-10git-svn: fix --file/-F option in commit-diffLibravatar Eric Wong1-3/+3
Also, allow messages from tags to be used as commit messages. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Avoid C99 initializersLibravatar Shawn Pearce3-24/+16
In a handful places, we use C99 structure and array initializers, which some compilers do not support. This can be handy when you are trying to compile GIT on a Solaris system that has an older C compiler, for example. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Merge branch 'jc/rename'Libravatar Junio C Hamano1-11/+22
* jc/rename: diffcore-rename: try matching up renames without populating filespec first.
2006-07-09Merge branch 'jc/grep'Libravatar Junio C Hamano1-51/+327
* jc/grep: git-grep: boolean expression on pattern matching.
2006-07-09Merge branch 'jc/mailinfo'Libravatar Junio C Hamano1-8/+24
* jc/mailinfo: mailinfo: assume input is latin-1 on the header as we do for the body
2006-07-09Merge branch 'ew/diff'Libravatar Junio C Hamano11-17/+78
* ew/diff: templates/hooks--update: replace diffstat calls with git diff --stat diff: do not use configuration magic at the core-level Update diff-options and config documentation. diff.c: --no-color to defeat diff.color configuration. diff.c: respect diff.renames config option
2006-07-09Merge branch 'ew/svn'Libravatar Junio C Hamano15-97/+72
* ew/svn: Fix some doubled word typos Typofix in Makefile comment. Makefile: export NO_SVN_TESTS git-svn: migrate out of contrib (follow-up) git-svn: migrate out of contrib
2006-07-09Fix typos involving the word 'commit'Libravatar Alp Toker2-7/+7
Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Fix some doubled word typosLibravatar Alp Toker1-1/+1
Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Fix some doubled word typosLibravatar Alp Toker1-1/+1
Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09"git -p cmd" to page anywhereLibravatar Junio C Hamano4-1/+11
This allows you to say: git -p diff v2.6.16-rc5.. and the command pipes the output of any git command to your pager. [jc: this resurrects a month old RFC patch with improvement suggested by Linus to call it --paginate instead of --less.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09change ent to tree in git-diff documentationLibravatar Matthias Lederhofer2-10/+10
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Typofix in Makefile comment.Libravatar Pavel Roskin1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Assorted typo fixesLibravatar Pavel Roskin21-34/+34
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Add "raw" output option to blobs in "tree" view formatLibravatar Luben Tuikov1-0/+1
Add a "raw" output option to blobs in "tree" view format, so that the user doesn't have to click on "blob", wait for the (binary) file to be uploaded and shown in "blob" mode, and then click on "plain" to download the (binary) file. This is useful when the file is clearly binary and we don't want the browser to upload and display it in "blob" mode, but we just want to download it. Case in point: pdf files, wlg. Note: the "raw" format is equivalent to the blob->plain view, not blob->head view. I.e. the view has the hash of the file as listed by git-ls-tree, not just "HEAD". Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Merge branch 'sf/diff'Libravatar Junio C Hamano3-2/+13
2006-07-09Disable color detection during format-patchLibravatar Ryan Anderson1-0/+3
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09git-cvsexportcommit can't handle merge commits correctlyLibravatar Peter Baumann1-2/+2
git-cvsexportcommit should check if the parent (supplied on the cmdline) to use for a merge commit is one of the real parents of the merge. But it errors out if the _first_ parent doesn't match and never checks the other parents. Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08Using 'perl' in *.shLibravatar Michal Rokos6-5/+6
Some GIT's shell script are using bare 'perl' for perl invocation. Use @@PERL@@ symbol and replace it with PERL_PATH_SQ everywhere. Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08sed -e '/RE/r rfile/' needs space in 'r rfile'Libravatar Michal Rokos1-2/+2
Some implementations of sed (like HP-UX one) mandate a space between 'r' and 'rfile'. Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08Close the index file between writing and committingLibravatar Johannes Schindelin7-7/+8
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08templates/hooks--update: replace diffstat calls with git diff --statLibravatar Eric Wong1-2/+2
Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08diff: do not use configuration magic at the core-levelLibravatar Junio C Hamano8-11/+17
The Porcelainish has become so much usable as the UI that there is not much reason people should be using the core programs by hand anymore. At this point we are better off making the behaviour of the core programs predictable by keeping them unaffected by the configuration variables. Otherwise they will become very hard to use as reliable building blocks. For example, "git-commit -a" internally uses git-diff-files to figure out the set of paths that need to be updated in the index, and we should never allow diff.renames that happens to be in the configuration to interfere (or slow down the process). The UI level configuration such as showing renamed diff and coloring are still honored by the Porcelainish ("git log" family and "git diff"), but not by the core anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07colored diff: diff.color = auto fixLibravatar Junio C Hamano1-2/+8
Even if the standard output is connected to a tty, do not colorize the diff if we are talking to a dumb terminal when diff.color configuration variable is set to "auto". Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07git log -p --merge [[--] paths...]Libravatar Junio C Hamano1-2/+51
This adds Linus's wish, "--merge" flag, which makes the above expand to a rough equivalent to: git log -p HEAD MERGE_HEAD ^$(git-merge-base HEAD MERGE_HEAD) \ -- $(git-ls-files -u [paths...] | cut -f2 | uniq) Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07Makefile: export NO_SVN_TESTSLibravatar Johannes Schindelin1-0/+1
Without this patch, it really is not sufficient to define NO_SVN_TESTS in config.mak or the Makefile. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07Update diff-options and config documentation.Libravatar Junio C Hamano2-4/+38
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07diff.c: --no-color to defeat diff.color configuration.Libravatar Junio C Hamano1-0/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07diff.c: respect diff.renames config optionLibravatar Eric Wong2-0/+19
diff.renames is mentioned several times in the documentation, but to my surprise it didn't do anything before this patch. Also add the --no-renames option to override this from the command-line. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07diff-options: Explain --text and -aLibravatar Stephan Feder1-0/+6
Signed-off-by: Stephan Feder <sf@b-i-t.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07Add -a and --text to common diff options helpLibravatar Stephan Feder1-1/+2
Signed-off-by: Stephan Feder <sf@b-i-t.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07Teach diff -a as shorthand for --textLibravatar Stephan Feder1-1/+1
Signed-off-by: Stephan Feder <sf@b-i-t.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07Teach --text option to diffLibravatar Stephan Feder2-1/+5
Add new item text to struct diff_options. If set then do not try to detect binary files. Signed-off-by: Stephan Feder <sf@b-i-t.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07send-email: format 2822 datestring ourselves.Libravatar Jakub Narebski1-3/+38
It is not worth trying to force C locale (and failing) just to format the 2822 datestring. This code was borrowed from /usr/bin/822-date (Ian Jackson and Klee Dienes, both in public domain), per suggestion by Eric Wong. Signed-off-by: Junio C Hamano <junkio@cox.net> Acked-by: Jakub Narebski <jnareb@gmail.com>
2006-07-07Do not drop data from '\0' until eol in patch outputLibravatar Stephan Feder1-1/+3
The binary file detection is just a heuristic which can well fail. Do not produce garbage patches in these cases. Signed-off-by: Stephan Feder <sf@b-i-t.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07builtin-log: respect diff configuration optionsLibravatar Eric Wong1-2/+5
The log commands are all capable of generating diffs, so we should respect those configuration options for diffs here. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07git-svn: migrate out of contrib (follow-up)Libravatar Junio C Hamano1-2/+9
Check for SVN::Core so test 910[45] don't fail if the user doesn't have those installed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-06rev-parse documentation: talk about range notation.Libravatar Junio C Hamano1-8/+37
Signed-off-by: Junio C Hamano <junkio@cox.net>