Commit graph

14944 commits

Author SHA1 Message Date
Joey Hess 8a124b82a0 README: tutorial.txt is now called gittutorial.txt
Signed-off-by: Joey Hess <joey@gnu.kitenet.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-06 22:12:07 -08:00
Junio C Hamano 438d2991ea GIT 1.5.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-16 22:13:36 -08:00
Junio C Hamano f23ffbe890 GIT 1.5.5.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-16 22:08:28 -08:00
Junio C Hamano 34b146c0f4 GIT 1.5.4.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-16 22:06:47 -08:00
Junio C Hamano dfff4b7aa4 gitweb: do not run "git diff" that is Porcelain
Jakub says that legacy-style URI to view two blob differences are never
generated since 1.4.3.  This codepath runs "git diff" Porcelain from the
gitweb, which is a no-no.  It can trigger diff.external command that is
specified in the configuration file of the repository being viewed.

This patch applies to v1.5.4 and later.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-16 21:54:44 -08:00
Brandon Casey 21926fe885 t5304-prune: adjust file mtime based on system time rather than file mtime
test-chmtime can adjust the mtime of a file based on the file's mtime, or
based on the system time. For files accessed over NFS, the file's mtime is
set by the NFS server, and as such may vary a great deal from the NFS
client's system time if the clocks of the client and server are out of
sync. Since these tests are testing the expire feature of git-prune, an
incorrect mtime could cause a file to be expired or not expired incorrectly
and produce a test failure.

Avoid this NFS pitfall by modifying the calls to test-chmtime so that the
mtime is adjusted based on the system time, rather than the file's mtime.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-13 18:18:23 -07:00
Kevin Ballard ea335b56d4 Fix escaping of glob special characters in pathspecs
match_one implements an optimized pathspec match where it only uses
fnmatch if it detects glob special characters in the pattern. Unfortunately
it didn't treat \ as a special character, so attempts to escape a glob
special character would fail even though fnmatch() supports it.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-13 17:11:03 -07:00
Junio C Hamano 9612e74342 Do not talk about "diff" in rev-list documentation.
Since 8c02eee (git-rev-list(1): group options; reformat; document more
options, 2006-09-01), git-rev-list documentation talks as if it supports
any kind of diff output.  It doesn't.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 22:40:44 -07:00
Francis Moreau e5d3afd78b git-bisect: fix wrong usage of read(1)
Signed-off-by:  Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 16:48:11 -07:00
Junio C Hamano e534735a4c Re-fix rev-list-options documentation
18a2197 (Documentation: rev-list-options: Fix -g paragraph formatting,
2008-08-10) introduced the third paragraph that is continued, but it seems
to confuse docbook toolchain on FC9 machines.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 14:24:51 -07:00
Ivan Stankovic 4f80b27d48 Documentation: fix invalid reference to 'mybranch' in user manual
Signed-off-by: Ivan Stankovic <pokemon@fly.srk.fer.hr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:56:22 -07:00
Junio C Hamano 55beff4f53 Fix deleting reflog entries from HEAD reflog
dwim_ref() used to resolve HEAD symbolic ref to its target (i.e. current
branch).  This incorrectly removed the reflog entry from the current
branch when 'git reflog delete HEAD@{1}' was asked for.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:21:25 -07:00
Pieter de Bie 38881a9066 reflog test: add more tests for 'reflog delete'
This adds more tests for 'reflog delete' and marks it as
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.

Noticed by John Wiegley

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:15:44 -07:00
Thomas Rast 18a2197e6d Documentation: rev-list-options: Fix -g paragraph formatting
- Add an escape to @{now}.  Without the escape, the brace does
  something magic and eats half the sentence up to the closing brace
  at 'timestamp}'.

- Join the last paragraph with a '+'.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:11:48 -07:00
Junio C Hamano 0f4f4d1597 asciidoc markup fixes
I see quite a few pages on k.org site, e.g.

    http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html
    (scroll down to find "After this test merge")

are misformatted to lose teletype text '+' that is followed by a comma,
and turns the following paragraph all typeset in teletype.

This patch seems to fix the issue at the site (meaning, with the
particular vintage of asciidoc and docbook toolchain), without breaking
things with the version I have at my primary development machine, but
wider testing is very much appreciated.

After this patch,

    git grep '`+`,' -- Documentation

should report noting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 22:41:24 -07:00
Junio C Hamano e19b92beca Merge branch 'lt/config-fsync' into maint
* lt/config-fsync:
  Add config option to enable 'fsync()' of object files
  Split up default "i18n" and "branch" config parsing into helper routines
  Split up default "user" config parsing into helper routine
  Split up default "core" config parsing into helper routine
2008-08-07 11:40:29 -07:00
Junio C Hamano 7be9467204 Merge branch 'jc/reflog-expire' into maint
* jc/reflog-expire:
  Make default expiration period of reflog used for stash infinite
  Per-ref reflog expiry configuration
2008-08-07 11:40:22 -07:00
Junio C Hamano 1e040c0b05 Merge branch 'ag/rewrite_one' into maint
* ag/rewrite_one:
  Fix quadratic performance in rewrite_one.
2008-08-07 11:40:12 -07:00
Petr Baudis fd35e42683 Fail properly when cloning from invalid HTTP URL
Currently, when cloning from invalid HTTP URL, git clone will possibly
return curl error, then a confusing message about remote HEAD and then
return success and leave an empty repository behind, confusing either
the end-user or the automated service calling it (think repo.or.cz).

This patch changes the error() calls in get_refs_via_curl() to die()s,
akin to the other get_refs_*() functions.

Cc: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 11:39:14 -07:00
Junio C Hamano 781c1834f5 GIT 1.5.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 13:40:53 -07:00
Junio C Hamano dbd0f5c769 Files given on the command line are relative to $cwd
When running "git commit -F file" and "git tag -F file" from a
subdirectory, we should take it as relative to the directory we started
from, not relative to the top-level directory.

This adds a helper function "parse_options_fix_filename()" to make it more
convenient to fix this class of issues.  Ideally, parse_options() should
support a new type of option, "OPT_FILENAME", to do this uniformly, but
this patch is meant to go to 'maint' to fix it minimally.

One thing to note is that value for "commit template file" that comes from
the command line is taken as relative to $cwd just like other parameters,
but when it comes from the configuration varilable 'commit.template', it
is taken as relative to the working tree root as before.  I think this
difference actually is sensible (not that I particularly think
commit.template itself is sensible).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 13:38:18 -07:00
Junio C Hamano eabbc99a21 fix diff-tree --stdin documentation
Long time ago, the feature of "diff-tree --stdin" to take a commit and its
parents on one line was broken, and did not support the common:

    git rev-list --parents $commits... -- $paths... |
    git diff-tree --stdin -v -p

usage pattern by Porcelains properly.  For diff-tree to talk sensibly
about commits, it needs to see commits, not just trees; the code was fixed
to take list of commits on the standard input in 1.2.0.

However we left the documentation stale for a long time, until Karl
Hasselström finally noticed it very recently.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 23:30:11 -07:00
Junio C Hamano 2d0f5f3459 RelNotes 1.5.6.5 updates
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:20:59 -07:00
Linus Torvalds 2b6ca6df2d diff.renamelimit is a basic diff configuration
The configuration was added as a core option in 3299c6f (diff: make
default rename detection limit configurable., 2005-11-15), but 9ce392f
(Move diff.renamelimit out of default configuration., 2005-11-21)
separated diff-related stuff out of the core.

Up to that point it was Ok.

When we separated the Porcelain options out of the git_diff_config in
83ad63c (diff: do not use configuration magic at the core-level,
2006-07-08), we should have been more careful.

This mistake made diff-tree plumbing and git-show Porcelain to notice
different set of renames when the user explicitly asked for rename
detection.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 18:27:31 -07:00
Jim Meyering 3be3999849 git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 11:40:28 -07:00
Mike Ralphson f70f988b11 Documentation: typos / spelling fixes in older RelNotes
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 11:38:11 -07:00
René Scharfe 7c5b1675a8 git-name-rev: don't use printf without format
printf() without an explicit format string is not a good coding practise,
unless the printed string is guaranteed to not contain percent signs.  While
fixing this, we might as well combine the calls to fwrite() and printf().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 12:48:41 -07:00
Pieter de Bie b003c00b7b git-name-rev: allow --name-only in combination with --stdin
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02 11:07:50 -07:00
Junio C Hamano e8b55fab62 builtin-name-rev.c: split deeply nested part from the main function
The main function of this command implementation tries to do too many
things.  Split out a handling of single input line into a separate
function to reduce nesting level and clutter.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02 11:04:22 -07:00
Junio C Hamano e124554796 Start 1.5.6.5 RelNotes to describe accumulated fixes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:54:01 -07:00
Ciaran McCreesh 69c231f473 Make git-add -i accept ranges like 7-
git-add -i ranges expect number-number. But for the supremely lazy, typing in
that second number when selecting "from patch 7 to the end" is wasted effort.
So treat an empty second number in a range as "until the last item".

Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:26:40 -07:00
Junio C Hamano 1ceb95c804 Update my e-mail address
The old cox.net address is still getting mails from gitters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:21:44 -07:00
Jonathan Nieder 61d47feec6 git-diff(1): "--c" -> "--cc" typo fix
git diff does not take a --c option.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:21:23 -07:00
Pierre Habouzit 00332b8152 git-submodule: move ill placed shift.
When running git submodule update -i, the "-i" is shifted before recursing
into cmd_init and then again outside of the loop. This causes some /bin/sh
to complain about shifting when there are no arguments left (and would
discard anything written after -i too).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:16:38 -07:00
Brandon Casey 734a6ffafb t/t4202-log.sh: add newline at end of file
Some shells hang when parsing the script if the last statement is not
followed by a newline. So add one.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:15:02 -07:00
Johannes Schindelin 11ee57bc4c sort_in_topological_order(): avoid setting a commit flag
We used to set the TOPOSORT flag of commits during the topological
sorting, but we can just as well use the member "indegree" for it:
indegree is now incremented by 1 in the cases where the commit used
to have the TOPOSORT flag.

This is the same behavior as before, since indegree could not be
non-zero when TOPOSORT was unset.

Incidentally, this fixes the bug in show-branch where the 8th column
was not shown: show-branch sorts the commits in topological order,
assuming that all the commit flags are available for show-branch's
private matters.

But this was not true: TOPOSORT was identical to the flag corresponding
to the 8th ref.  So the flags for the 8th column were unset by the
topological sorting.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:14:22 -07:00
Junio C Hamano b1264da863 Documentation: clarify diff --cc
The definition of an "uninteresting" hunk was not in line with reality.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:00:42 -07:00
Steve Haslam 31f4e768a4 Propagate -u/--upload-pack option of "git clone" to transport.
The -u option to override the remote system's path to git-upload-pack was
being ignored by "git clone"; caused by a missing call to
transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in
when git-clone was converted from shell to C.

Signed-off-by: Steve Haslam <shaslam@lastminute.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:49:25 -07:00
Anders Melchiorsen bbff8aaaf2 Documentation: fix diff.external example
The diff.external examples pass a flag to gnu-diff, but GNU diff
does not follow the GIT_EXTERNAL_DIFF interface.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:45:27 -07:00
Junio C Hamano b2a5627651 make sure parsed wildcard refspec ends with slash
A wildcard refspec is internally parsed into a refspec structure with src
and dst strings.  Many parts of the code assumed that these do not include
the trailing "/*" when matching the wildcard pattern with an actual ref we
see at the remote.  What this meant was that we needed to make sure not
just that the prefix matched, and also that a slash followed the part that
matched.

But a codepath that scans the result from ls-remote and finds matching
refs forgot to check the "matching part must be followed by a slash" rule.
This resulted in "refs/heads/b1" from the remote side to mistakenly match
the source side of "refs/heads/b/*:refs/remotes/b/*" refspec.

Worse, the refspec crafted internally by "git-clone", and a hardcoded
preparsed refspec that is used to implement "git-fetch --tags", violated
this "parsed widcard refspec does not end with slash" rule; simply adding
the "matching part must be followed by a slash" rule then would have
broken codepaths that use these refspecs.

This commit changes the rule to require a trailing slash to parsed
wildcard refspecs.  IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as
src = "refs/heads/b/" and dst = "refs/remotes/b/".  This allows us to
simplify the matching logic because we only need to do a prefixcmp() to
notice "refs/heads/b/one" matches and "refs/heads/b1" does not.

Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:41:15 -07:00
Jeff King d65d2b2fb4 init: handle empty "template" parameter
If a user passes "--template=", then our template parameter
is blank. Unfortunately, copy_templates() assumes it has at
least one character, and does all sorts of bad things like
reading from template[-1] and then proceeding to link all of
'/' into the .git directory.

This patch just checks for that condition in copy_templates
and aborts. As a side effect, this means that --template=
now has the meaning "don't copy any templates."

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:41:07 -07:00
Stephan Beyer 1e5f7add98 builtin-revert.c: typofix
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 21:10:40 -07:00
Junio C Hamano bfce5087ee Makefile: fix shell quoting
Makefile records paths to a few programs in GIT-BUILD-OPTIONS file.  These
paths need to be quoted twice: once to protect specials from the shell
that runs the generated GIT-BUILD-OPTIONS file, and again to protect them
(and the first level of quoting itself) from the shell that runs the
"echo" inside the Makefile.

You can test this by trying:

    $ ln -s /bin/tar "$HOME/Tes' program/tar"
    $ make TAR="$HOME/Tes' program/tar" test

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 12:36:16 -07:00
Junio C Hamano c30e699fc5 tests: propagate $(TAR) down from the toplevel Makefile
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 11:09:48 -07:00
Björn Steinbrink 72de2883bd index-pack.c: correctly initialize appended objects
When index-pack completes a thin pack it appends objects to the pack.
Since the commit 92392b4(index-pack: Honor core.deltaBaseCacheLimit when
resolving deltas) such an object can be pruned in case of memory
pressure, and will be read back again by get_data_from_pack().  For this
to work, the fields in object_entry structure need to be initialized
properly.

Noticed by Pierre Habouzit.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 10:46:46 -07:00
Peter Valdemar Mørch 8892048d51 send-email: find body-encoding correctly
In 8291db6 (git-send-email: add charset header if we add encoded 'From',
2007-11-16), "$1" is used from a regexp without using () to capture
anything in $1. Later, when that value was used, it causes a warning about
a variable being undefined, instead of using the correct value for
comparison (not that it makes difference in the current code that does not
do actual re-encoding).

Signed-off-by: Peter Valdemar Mørch <peter@morch.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 09:27:13 -07:00
Pierre Habouzit f5242ebf0d git-checkout: fix command line parsing.
This fixes an issue when you use:

    $ git checkout -- <path1> [<paths>...]

and that <path1> can also be understood as a reference. git-checkout
mistakenly understands this as the same as:

    $ git checkout <path1> -- [<paths>...]

because parse-options was eating the '--' and the argument parser thought
he was parsing:

    $ git checkout <path1> [<paths>...]

Where there indeed is an ambiguity

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 12:09:47 -07:00
Jonathan Nieder 2d9c572578 fix usage string for git grep
Without this patch, git-grep gives confusing usage information:

	$ git grep --confused
	usage: git grep <option>* <rev>* [-e] <pattern> [<path>...]
	$ git grep HEAD pattern
	fatal: ambiguous argument 'pattern': unknown revision or path no
	t in the working tree.
	Use '--' to separate paths from revisions

So put <pattern> before the <rev>s, in accordance with actual correct
usage.  While we're changing the usage string, we might as well include
the "--" separating revisions and paths, too.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 13:01:26 -07:00
Junio C Hamano 3f1b7b607a refresh-index: fix bitmask assignment
5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a
new refresh option flag but did not assign a unique bit for it correctly,
and broke "update-index --ignore-missing".

This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 00:00:46 -07:00
Junio C Hamano a1b6fb04b1 GIT 1.5.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 10:58:01 -07:00