This patch does:
- always reset the color _before_ printing out the newline.
This is actually important. You (and Johannes) didn't see it, because
it only matters if you set the background, but if you don't do this,
you get some random and funky behaviour if you pick a color with a
non-default background (which still potentially has problems with tabs
etc, but less so).
- allow people to have a different color for the "file headers"
(DIFF_METAINFO) and for the "fragment header" (DIFF_FRAGINFO). Also,
make a difference between "normal color" and "reset colors"
- default to red/green for old/new lines. That's the norm, I'd think.
- instead of that eye-popping (and eye-ball-with-a-fondue-fork-popping)
purple color for metadata, use bold-face for file headers, and cyan for
the frag headers. I actually prefer the "gray background" for that, but
it only works well in xterms, so COLOR_CYAN it is..
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* master:
git-svn: fix commit --edit flag when using SVN:: libraries
Makefile: do not force unneeded recompilation upon GIT_VERSION changes
Check and document the options to prevent mistakes.
Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.
* js/lsfix:
Initialize lock_file struct to all zero.
Make git-update-ref a builtin
Make git-update-index a builtin
Make git-stripspace a builtin
Make git-mailinfo a builtin
Make git-mailsplit a builtin
Make git-write-tree a builtin
* ew/rebase:
rebase --merge: fix for rebasing more than 7 commits.
rebase: error out for NO_PYTHON if they use recursive merge
Add renaming-rebase test.
rebase: Allow merge strategies to be used when rebasing
* jn/web:
gitweb: whitespace cleanup around '='
gitweb: Use $hash_base as $search_hash if possible
gitweb: Make use of $PATH_INFO for project parameter
Move $gitbin earlier in gitweb.cgi
Add git version to gitweb output
gitweb: whitespace cleanup
gitweb: style done with stylesheet
gitweb: A couple of page title tweaking
Fix: Support for the standard mime.types map in gitweb
gitweb: add type="text/css" to stylesheet link
Make CSS file gitweb/gitweb.css more readable
Fix gitweb stylesheet
Support for the standard mime.types map in gitweb
gitweb: text files for 'blob_plain' action without charset by default
gitweb: safely output binary files for 'blob_plain' action
Move gitweb style to gitweb.css
* jc/upload-corrupt:
daemon: send stderr to /dev/null instead of closing.
upload-pack/fetch-pack: support side-band communication
Retire git-clone-pack
upload-pack: prepare for sideband message support.
upload-pack: avoid sending an incomplete pack upon failure
$hash (h parameter) does not always point to a commit. Use $hash_base as
$search_hash when it is defined.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* ff/c99:
Remove all void-pointer arithmetic.
Change types used in bitfields to be `int's.
Don't use empty structure initializers.
Cast pointers to `void *' when used in a format.
Don't instantiate structures with FAMs.
Initialize FAMs using `FLEX_ARRAY'.
Remove ranges from switch statements.
* pb/config:
git_config: access() returns 0 on success, not > 0
repo-config: Fix late-night bug
Read configuration also from $HOME/.gitconfig
Fix setting config variables with an alternative GIT_CONFIG
Support for extracting configuration from different files
Trying to open an interactive editor in the console while stdout is
being piped to the parent process doesn't work out very well.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of using 4-digit numbers to name commits being rebased,
just use "cmt.$msgnum" string, with $msgnum as a decimal number
without leading zero padding. This makes it possible to rebase
more than 9999 commits, but of more practical importance is that
the earlier code used "printf" to format already formatted
$msgnum and barfed when it counted up to 0008. In other words,
the old code was incapable of rebasing more than 7 commits, and
this fixes that problem.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When multiple recipients are given to git-send-email on the same
--cc line the code does not properly handle it.
Full and proper parsing of the email addresses so I can detect
which commas mean a new email address is more than I care to implement.
In particular this email address: "bibo,mao" <bibo.mao@intel.com>
must not be treated as two email addresses.
So this patch simply treats all commas in recipient lists as
an error and fails if one is given.
At the same time it documents that git-send-email wants multiple
instances of --cc specified on the command line if you want to
cc multiple recipients.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Before this patch, -DDEFAULT_GIT_TEMPLATE_DIR was passed on compilation
command line to all and every .c file compiled. In fact the macro
is used by only one .c file, and unused by all other .c files.
Remove -DDEFAULT_GIT_TEMPLATE_DIR where unused. Follow the example of
exec_cmd.o. Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.
Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Allow to have project name in the path part of URL, just after the name of
script. For example instead of gitweb.cgi?p=git.git you can write
gitweb.cgi/git.git or gitweb.cgi/git.git/
Not used in URLs inside gitweb; it means that the above alternate syntax
must be generated by hand, at least for now.
Side effect: project name parameter is now stripped of leading and
trailing slash before validation.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Earlier commit 3e4339e6f9 had a
thinko that did not check for collisions while repopulating the
objects in the new hash table.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* ew/rebase:
rebase: error out for NO_PYTHON if they use recursive merge
Add renaming-rebase test.
rebase: Allow merge strategies to be used when rebasing
object-refs: avoid division by zero
recursive merge relies on Python, and we can't perform
rename-aware merges without the recursive merge. So bail out
before trying it.
The test won't work w/o recursive merge, either, so skip that,
too.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This solves the problem of rebasing local commits against an
upstream that has renamed files.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Currently, we don't check refs_hash_size size and happily call
lookup_object_refs() even if refs_hash_size is zero which leads to
a division by zero in hash_obj().
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/upload-corrupt:
upload-pack/fetch-pack: support side-band communication
Retire git-clone-pack
upload-pack: prepare for sideband message support.
upload-pack: avoid sending an incomplete pack upon failure
Fix possible out-of-bounds array access
This implements a protocol extension between fetch-pack and
upload-pack to allow stderr stream from upload-pack (primarily
used for the progress bar display) to be passed back.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The program is not used by git-clone since git-fetch-pack was extended
to allow its caller do what git-clone-pack alone did, and git-clone was
updated to use it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This does not implement sideband for propagating the status to
the downloader yet, but add code to capture the standard error
output from the pack-objects process in preparation for sending
it off to the client when the protocol extension allows us to do
so.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When the repository on the remote side is corrupted, rev-list
spawned from upload-pack would die with error, but pack-objects
that reads from the rev-list happily created a packfile that can
be unpacked by the downloader. When this happens, the resulting
packfile is not corrupted and unpacks cleanly, but the list of
the objects contained in it is not what the protocol exchange
computed.
This update makes upload-pack to monitor its subprocesses, and
when either of them dies with error, sends an incomplete pack
data to the downloader to cause it to fail.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If match is "", match[-1] is accessed. Let pathspec_matches return 1 in that
case indicating that "" matches everything.
Incidently this fixes git-grep'ing in ".".
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 9dca843086356b964f27d8fabe1e3c48074a9f02 commit)
Signed-off-by: Jakub Narebski <jnareb.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add git-core binaries used version as the comment at the beginning of HTML
output, just below the comment with version of git web interface version.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Do not use tabs to align variable initialization (actually use
tabs only at the beginning of line, for code indent). Remove trailing
whitespace. Make whitespace usage more consistent.
Signed-off-by: Jakub Narebski <jnareb.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Earlier we did not consider untracked working tree files
"precious", but we have always considered them fair game to
clobber. These days, branch switching by read-tree is more
careful and tries to protect untracked working tree files. This
caused the following workflow to stop working:
git checkout one-branch-with-file-F
git checkout -f another-without-file-F
git pull . one-branch-with-file-F
Because the second checkout leaves F from the previous state as
untracked file in the working tree, the merge would fail, trying
to protect F from being clobbered.
This changes "git checkout -f" to remove working tree files that
are known to git in the switched-from state but do not exist in
the switched-to state, borrowing the same logic from "reset --hard".
Signed-off-by: Junio C Hamano <junkio@cox.net>
When we run git-daemon from inetd, even with the --verbose option, it
doesn't log the peer address. That logic was only in the standalone
daemon code -- move it to the execute() function instead. Tested with
both IPv6 and Legacy IP clients, in both inetd and daemon mode.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Replace (almost) all 'style' attributes with 'class' attribute
and adding rule to CSS file. Some tables use CSS for styling
instead of legacy styling attributes.
[jc: too many rejects -- hand fixed and reindented]