1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-28 06:06:11 +02:00
Commit Graph

5567 Commits

Author SHA1 Message Date
Alp Toker e130ddaaf3 gitweb: Make command invocations go through the git wrapper
This patch makes invocations of core git commands go through the 'git'
binary itself, which improves readability and might help system
administrators lock down their CGI environment for security.

Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-12 22:00:22 -07:00
Alp Toker 49da1dafc0 gitweb: Include a site name in page titles
This helps users tell one 'git' bookmark apart from the other in their
browser and improves the indexing of gitweb sites in Web search engines.
The title defaults to the SERVER_NAME environment variable, often given
by the webserver.

Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 14:18:42 -07:00
Alp Toker f6801d669e gitweb: Send XHTML as 'application/xhtml+xml' where possible
"The 'text/html' media type [RFC2854] is primarily for HTML, not for
XHTML. In general, this media type is NOT suitable for XHTML."

This patch makes gitweb use content negotiation to conservatively send
pages as Content-Type 'application/xhtml+xml' when the user agent
explicitly claims to support it.

It falls back to 'text/html' even if the user agent appears to
implicitly support 'application/xhtml+xml' due to a '*/*' glob, working
around an insidious bug in Internet Explorer where sending the correct
media type prevents the page from being displayed.

Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 14:18:42 -07:00
Eric Wong ed0e078f96 git-fetch: fix a bashism (==)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 14:14:09 -07:00
Linus Torvalds 38d3874ddc Make the unpacked object header functions static to sha1_file.c
Nobody else uses them, and I'm going to start changing them.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 12:58:53 -07:00
Alp Toker d2216f2317 git-send-email: Remove redundant Reply-To header
There is no sense in duplicating the sender address in Reply-To as it's
already provided in the From header.

Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 12:48:18 -07:00
Alp Toker 2a75848edd typofix (git-name-rev documentation)
Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 12:45:20 -07:00
Yakov Lerner c3f17061be Mention the [user@] part in documentation of ssh:// urls.
Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 12:39:09 -07:00
Eric Wong 8ff99e7417 tests: Set EDITOR=: and VISUAL=: globally
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-11 12:32:54 -07:00
Shawn Pearce 55b7835e1b Log ref changes made by git-fetch and git-pull.
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-10 21:21:27 -07:00
Shawn Pearce a3a733e63b Record the type of commit operation in the reflog.
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-10 21:21:16 -07:00
Shawn Pearce 0b0fe4a65d Allow user.name and user.email to drive reflog entry.
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-10 21:12:40 -07:00
Johannes Schindelin b75a82b754 Fix linking for not-so-clever linkers.
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-10 14:48:56 -07:00
Matthias Lederhofer f443455a5b git-rev-list: add documentation for --parents, --no-merges
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10 13:48:22 -07:00
Junio C Hamano 868227b0d1 Merge branch 'jc/show-merge'
* jc/show-merge:
  git log -p --merge [[--] paths...]
2006-07-10 00:53:39 -07:00
Pavel Roskin a9486b02ec Avoid C99 comments, use old-style C comments instead.
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-10 00:47:13 -07:00
Pavel Roskin 82e5a82fd7 Fix more typos, primarily in the code
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-10 00:36:44 -07:00
Luben Tuikov 930cf7dd7c gitweb.cgi: Teach "a=blob" action to know the blob/file mime type
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-10 00:30:11 -07:00
Luben Tuikov 9af2511796 gitweb.cgi: Create $git_temp if it doesn't exist
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-10 00:21:33 -07:00
Junio C Hamano 8499294c41 Merge branch 'lt/gitweb'
* lt/gitweb:
  Add "raw" output option to blobs in "tree" view format
2006-07-10 00:20:42 -07:00
Eric Wong 4ad4515dfe git-svn: fix --file/-F option in commit-diff
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-10 00:19:34 -07:00
Shawn Pearce 344c52aee5 Avoid C99 initializers
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-10 00:13:28 -07:00
Junio C Hamano 4f12d529ab Merge branch 'jc/rename'
* jc/rename:
  diffcore-rename: try matching up renames without populating filespec first.
2006-07-10 00:03:55 -07:00
Junio C Hamano 405a99a67f Merge branch 'jc/grep'
* jc/grep:
  git-grep: boolean expression on pattern matching.
2006-07-09 23:49:03 -07:00
Junio C Hamano 12d4a97a03 Merge branch 'jc/mailinfo'
* jc/mailinfo:
  mailinfo: assume input is latin-1 on the header as we do for the body
2006-07-09 23:49:00 -07:00
Junio C Hamano fc93dbbfc9 Merge branch 'ew/diff'
* 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-09 23:47:39 -07:00
Junio C Hamano e6ff54a261 Merge branch 'ew/svn'
* 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-09 23:37:19 -07:00
Alp Toker ff4c848527 Fix typos involving the word 'commit'
Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 03:31:36 -07:00
Alp Toker cb65296348 Fix some doubled word typos
Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 03:30:51 -07:00
Alp Toker 3e564f3a6c Fix some doubled word typos
Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 03:29:35 -07:00
Junio C Hamano 85fb65ed6e "git -p cmd" to page anywhere
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-09 03:27:03 -07:00
Matthias Lederhofer cfc01c0387 change ent to tree in git-diff documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 03:26:49 -07:00
Pavel Roskin 02853588a4 Typofix in Makefile comment.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 02:44:58 -07:00
Pavel Roskin addf88e455 Assorted typo fixes
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 02:42:41 -07:00
Luben Tuikov 25b7c18ecd Add "raw" output option to blobs in "tree" view format
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-09 00:57:22 -07:00
Junio C Hamano 88f0d5d7d9 Merge branch 'sf/diff' 2006-07-09 00:52:36 -07:00
Ryan Anderson f3aafa4db2 Disable color detection during format-patch
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09 00:48:16 -07:00
Peter Baumann 135a522e3f git-cvsexportcommit can't handle merge commits correctly
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-09 00:46:56 -07:00
Michal Rokos d9bffc08fd Using 'perl' in *.sh
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-08 11:35:20 -07:00
Michal Rokos 6e959ab05a sed -e '/RE/r rfile/' needs space in 'r rfile'
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-08 11:28:32 -07:00
Johannes Schindelin 6244b24906 Close the index file between writing and committing
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08 03:28:19 -07:00
Eric Wong 3a895e0268 templates/hooks--update: replace diffstat calls with git diff --stat
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-08 03:11:16 -07:00
Junio C Hamano 83ad63cfeb diff: do not use configuration magic at the core-level
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-08 03:11:01 -07:00
Junio C Hamano a0c2089c1d colored diff: diff.color = auto fix
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-07 17:48:02 -07:00
Junio C Hamano ae3e5e1ef2 git log -p --merge [[--] paths...]
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-07 13:32:31 -07:00
Johannes Schindelin 140245b3e2 Makefile: export NO_SVN_TESTS
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-07 12:43:45 -07:00
Junio C Hamano b53766483f Update diff-options and config documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07 12:28:54 -07:00
Junio C Hamano fef88bb013 diff.c: --no-color to defeat diff.color configuration.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07 12:28:54 -07:00
Eric Wong b68ea12e30 diff.c: respect diff.renames config option
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-07 12:28:53 -07:00
Stephan Feder d507bb1500 diff-options: Explain --text and -a
Signed-off-by: Stephan Feder <sf@b-i-t.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07 12:28:04 -07:00