Test t6002 unnecessarily fails when bc is a bit older than average.
Signed-off-by: Johannes.Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-prune-script still contained that non-portable option.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When git-apply was printing out long filenames, it used to just truncate
them to show the last "max_len" characters of the filename. Which can be
really quite ugly (note the two filenames that have just been silently
truncated from the beginning - it looks even worse when there are lots
of them, like there were in the current v2.6.13-rc4 cris arch update):
Documentation/video4linux/README.saa7134 | 9
Documentation/video4linux/bttv/Cards | 74
umentation/video4linux/hauppauge-wintv-cx88-ir.txt | 54
Documentation/video4linux/lifeview.txt | 42
mentation/video4linux/not-in-cx2388x-datasheet.txt | 41
Documentation/w1/w1.generic | 107
With this patch it now looks like so:
Documentation/video4linux/README.saa7134 | 9
Documentation/video4linux/bttv/Cards | 74
.../video4linux/hauppauge-wintv-cx88-ir.txt | 54
Documentation/video4linux/lifeview.txt | 42
.../video4linux/not-in-cx2388x-datasheet.txt | 41
Documentation/w1/w1.generic | 107
ie we've made it clear with an ellipsis that we've cut off something from
the beginning, and it also tries to do it cleanly at a subdirectory level.
Signed-off-by: Linus "good taste" Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
In particular, warn about things like zero-padding of the mode bits,
which is a big no-no, since it makes otherwise identical trees have
different representations (and thus different SHA1 numbers).
Also make the warnings more regular.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The old mode conversion was not only complex, it also refused to change
the length of a mode, which made it fragile. By moving the mode
conversion around a bit, we can not only simplify it, it also ends up
being more powerful.
Also fix a memory leak that made it impossible to convert huge archives
without tons and tons of memory.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
We historically used to be very careful in fsck-cache, but when it was
re-written to use "parse_object()" instead of parsing everything by
hand, it lost a bit of the checks. This, together with the previous
commit, should make it do more proper commit object syntax checks.
Also add a "--strict" flag, which warns about the old-style "0664" file
mode bits, which shouldn't exist in modern trees, but that happened
early on in git trees and that the default git-fsck-cache thus silently
accepts.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This was brought on by a bad tree of Thomas Gleixner, where some bogus
commit objects weren't warned about properly
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When no usable head/tag is specified, git log barfed with
underlying error message from rev-list, which was not helpful.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
- use --verify to make sure rev param is a rev, and barf otherwise.
- make it always output to stdout; no funny business with tee.
- take optional branch head name to specify which branch to summarize.
- show baserev in a human readable way.
- do not depend on diffstat; use git-apply --stat instead.
Signed-off-by: Junio C Hamano <junkio@cox.net>
A short message requesting a pull from the repository is also included.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-status-script was missed during the conversion from "N" to "A" as
the new-file marker flag.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch includes two fixes to the git-core Debian package:
* Conflict with the GNU Interactive Tools package, which _also_
wants to install /usr/bin/git.
* Compile against the unencumbered Mozilla SHA1 code, instead of
the iffy OpenSSL code, as much as possible. This makes it easier to get
the package included for distribution with Debian.
This has been based upon the original patch by Sebastian Kuzminsky
<seb@highlab.com>, but has been fixed up based upon feedback.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The check that the source is ahead of the destination incorrectly expects
pop_most_recent_commit() to gracefully handle an empty list.
Fix by just checking the list itself, rather than the return value of the
pop function.
[jc: I did the test script that demonstrated the problem]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
We use 'A' for added files instead of 'N' to make the it
visually easier to distinguish from 'M' now.
While we are at it, make the test scripts executable. Yes, I
know it does not matter because t/Makefile runs them explicitly
with "sh tXXXX-blah.sh", but being consistent is always better.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Both Cogito and StGIT prefer to see 'A' for new files. The
current 'N' is visually harder to distinguish from 'M', which is
used for modified files. Prepare the internals to use symbolic
constants to make the change easier.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add --exclude-per-directory=<name> option that specifies a file
to contain exclude patterns local to that directory and its
subdirectories. Update the exclusion logic to be able to say
"include files that match this more specific pattern, even
though later exclude patterns may match them". Also enhances
that a pattern can contain '/' in which case fnmatch is called
with FNM_PATHNAME flag to match the entire path.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This adds -a (annotate only but not sign) option "A Large Angry
SCM" <gitzilla@gmail.com> sent to the list, after fixing up the
whitespace corruption in the patch, with some of my own fixes.
Namely:
* A new flag '-a' can be used to create an unsigned tag
object;
* The '-f' flag logic did not do the right thing;
* When creating a signed tag, we did not check for GPG failure
as we should;
* Try to use the key for the tagger identity when signing the
tag.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of finding old/new pair that one side has and the
other side does not have the specified string, find old/new pair
that contains the specified string as a substring different
number of times. This would still not catch a case where you
introduce two static variable declarations and remove two static
function definitions from a file with -S"static", but would make
it behave a bit more intuitively.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
It's stupid. We'd want to rename directories too, but this doesn't do
that yet - easy enough to do per se, we just need to carefully list all
the pathnames that got moved (and remember to ignore the files that
weren't tracked but are in the subdirectory that got moved).
Doing the directory case will require a bit more scripting.. Something like
oldfiles=($(git-ls-files | grep '^$src'))
newfiles=($(git-ls-files | sed ':^$src: s:^$src:$dst:'))
mv $src $dst && git-update-cache --add --remove -- "${oldfiles[@]}" "${newfiles[@]}"
might do it, except it needs to be done right, and carefully. Methinks
perl is probably better at this. Hint hint..
Hey, people are using them, and we have an install target for them, so
make sure that we can actually install them sanely without disturbing
the namespace.
Using the information prepared with update-server-info, a truly
dumb http server can allow cloning with this client side
support.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The git-update-server-info command prepares informational files
to help clients discover the contents of a repository, and pull
from it via a dumb transport protocols. Currently, the
following files are produced.
- The $repo/info/refs file lists the name of heads and tags
available in the $repo/refs/ directory, along with their
SHA1. This can be used by git-ls-remote command running on
the client side.
- The $repo/info/rev-cache file describes the commit ancestry
reachable from references in the $repo/refs/ directory. This
file is in an append-only binary format to make the server
side friendly to rsync mirroring scheme, and can be read by
git-show-rev-cache command.
- The $repo/objects/info/pack file lists the name of the packs
available, the interdependencies among them, and the head
commits and tags contained in them. Along with the other two
files, this is designed to help clients to make smart pull
decisions.
The git-receive-pack command is changed to invoke it at the end,
so just after a push to a public repository finishes via "git
push", the server info is automatically updated.
In addition, building of the rev-cache file can be done by a
standalone git-build-rev-cache command separately.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Retrieve and list the remote refs from git, http, and rsync
repositories, and optionally stores the retrieved refs in the
local repository under the same name.
To access a git URL, git-peek-remote command is used. An http
URL needs to have an up-to-date info/refs file for discovery,
which will be introduced by a later update-server-info patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Add documentation for the git-peek-remote and link it from the
main index.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Add a git-peek-remote command that talks with upload-pack the
same way git-fetch-pack and git-clone-pack do, to show the
references the remote side has on the standard output.
A later patch introduces git-ls-remote that implements a UI to
store tag values retrieved using this command.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Teach people to use "git tag <tag-name>" instead of writing the current
HEAD by hand into the .git/refs/tags/<tag-name> file. Most people
probably don't really want to know about how git does things internally.
A simple tag is just a direct pointer to the object, while a signed tag
is a pointer to a "tag object" that has a pgp signature and points to
the object we tagged.
Use "git tag -s tagname" to create a signed tag.
The "-f" flag overwrites any previous tag of that name (useful if you
update a tag to point to a newer version for things like "latest" etc
tags that aren't necessarily static versions).
Some people split their long E-mail address over two lines
using the RFC2822 header "folding". We can lose authorship
information this way, so make a minimum effort to deal with it,
instead of special casing only the "Subject:" field.
We could teach mailsplit to unfold the folded header, but
teaching mailinfo about folding would make more sense; a single
message can be fed to mailinfo without going through mailsplit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Try all addresses for given remote name until it succeeds. Also
supports IPv6.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The deb package building needs these two new files to work correctly.
debian/compat sets the rules under which the debhelper scripts (dh_*)
operate.
debian/git-core.install tells dh_install what files to install in each
package that is generated. There is only one package being generated,
so all files go into it.
(I missed these in the last patch, mostly because I needed to do this to
find stuff I had missed:
find . -name .git -type d -prune -o -type f -print \
| grep -v -e .tree1 -e .tree2 \
| sed -e "s/^\.\///" \
| sort >.tree1
git-ls-files | grep -v -e .tree1 -e .tree2 \
| sort >.tree2
diff -u .tree1 .tree2
)
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The Deb packages were missing a dependency on "build install" from the
binary target - this fixes that, and cleans up some inconsistencies
elsewhere in the rulesets.
Traditionally, Debian packaging uses a file called "build-stamp" (or
"install-stamp", etc) in the main source tree. The initial deb package
support for Git tried to move this "build-stamp" file into the debian/
directory, but some instances were missed. That problem, however, was
incidental - the real fix is the missing dependency mentioned above.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
We'll mark all the trees at the edges (as deep as we had to go to
realize that we have all the commits needed) as uninteresting.
Otherwise we'll occasionally list a lot of objects that were actually
available at the edge in a commit that we just never ended up parsing
because we could determine early that we had all relevant commits.
NOTE! The object listing is still just a _heuristic_. It's guaranteed
to list a superset of the actual new objects, but there might be the
occasional old object in the list, just because the commit that
referenced it was much further back in the history.
For example, let's say that a recent commit is a revert of part of the
tree to much older state: since we didn't walk _that_ far back in the
commit history tree to list the commits necessary, git-rev-tree will
never have marked the old objects uninteresting, and we'll end up
listing them as "new".
That's ok.
Update the recommended workflow for individual developers.
While they are tracking the origin, refs/heads/origin is updated
by "git fetch", so there is no need to manually copy FETCH_HEAD
to refs/heads/ anywhere.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
A bit more usability enhancement, while retaining Cogito
compatibility (and fixing the "-u" flag).
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The output from a failure case had the test description message
and the first line of the actual test script concatenated on the
same line, which was ugly. Correct the output routine a bit to
make it more readable.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Match the main Makefile by separating COPTS from CFLAGS,
defining INSTALL, prefix, and bin. Add a new target 'install-tools'
to the main Makefile to install them.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>