Commit Graph

7095 Commits

Author SHA1 Message Date
Josef Weidendorfer
62b339a544 Add branch.*.merge warning and documentation update
This patch clarifies the meaning of the branch.*.merge option.
Previously, if branch.*.merge was specified but did not match any
ref, the message "No changes." was not really helpful regarding
the misconfiguration. This patch adds a warning for this.

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 18:13:31 -08:00
Junio C Hamano
2cdf87ebd9 Fix perl/ build.
An earlier commit f848718a broke the build in perl/ directory by
allowing the Makefile.PL to overwrite the now-tracked Makefile.
Fix this by forcing Makefile.PL to produce its output in
perl.mak as the broken commit originally intended.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 14:07:45 -08:00
Eric Wong
a552db3a64 git-svn: use do_switch for --follow-parent if the SVN library supports it
do_switch works with the SVN Perl bindings after r22312 in the
Subversion trunk.  Since no released version of SVN currently
supports it; we'll just autodetect it and enable its usage
when a user has a recent-enough version of SVN.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 11:31:49 -08:00
Uwe Zeisberger
bbee1d971d Fix documentation copy&paste typo
This was introduced in 45a3b12cfd

Signed-off-by: Uwe Kleine-K,AC6(Bnig <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 10:51:12 -08:00
Eric Wong
006ede5e86 git-svn: extra error check to ensure we open a file correctly
This may be an issue with repositories imported with commit
27a1a8014b or later, but before
commit dad73c0bb9.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 02:07:01 -08:00
J. Bruce Fields
db9819a40a Documentation: update git-clone man page with new behavior
Update git-clone man page to reflect recent changes
(--use-separate-remote default and use of .git/config instead of
remotes files), and rewrite introduction.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-07 23:10:05 -08:00
Junio C Hamano
efe2c9e002 Merge branch 'maint'
* maint:
  cvsserver: Avoid miscounting bytes in Perl v5.8.x
2006-12-06 21:53:32 -08:00
Martin Langhoff
4f88d3e0cb cvsserver: Avoid miscounting bytes in Perl v5.8.x
At some point between v5.6 and 5.8 Perl started to assume its input,
output and filehandles are UTF-8. This breaks the counting of bytes
for the CVS protocol, resulting in the client expecting less data
than we actually send, and storing truncated files.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 21:47:19 -08:00
Nicolas Pitre
46732fae3d change the unpack limit treshold to a saner value
Currently the treshold is 5000.  The likelihood of this value to ever be
crossed for a single push is really small making it not really useful.

The optimal treshold for a pure space saving on a filesystem with 4kb
blocks is 3.  However this is likely to create many small packs
concentrating a large number of files in a single directory compared to
the same objects which are spread over 256 directories when loose.  This
means we would need 512 objects per pack on average to approximagte the
same directory cost (a pack has 2 files because of the index).

But 512 is a really high value just like 5000 since most pushes are
unlikely to have that many objects.  So let's try with a value of 100
which should have a good balance between small pushes going to be
exploded into loose objects and large pushes kept as whole packs.

This is not a replacement for periodic repacks of course.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 21:47:07 -08:00
J. Bruce Fields
cd976f5c52 Documentation: reorganize cvs-migration.txt
Modify cvs-migration.txt so it explains first how to develop against a
shared repository, then how to set up a shared repository, then how to
import a repository from cvs.  Though this seems chronologically
backwards, it's still readable in this order, and it puts the more
commonly needed material closer to the front.

Remove the annotate/pickaxe section; perhaps it can find a place elsewhere
in the future.  Remove most of the "why git is better than cvs" stuff from
the introduction.

Add some minor clarifications, including two that have come up several
times on the mailing list:

	1. Recommend committing any changes before running pull.
	2. Note that changes must be commited before they can be pushed.

Update the clone discussion to reflect the new --use-separate-remotes
default, and add a brief mention of git-cvsserver.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 21:35:53 -08:00
Junio C Hamano
de51faf388 git-merge: fix "fix confusion between tag and branch" for real
An earlier commit 3683dc5a broke the merge message generation with
a careless use of && where it was not needed, breaking the merge
message for cases where non branches are given.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 11:22:55 -08:00
Eric Wong
ebdf7b9522 git-svn: avoid network timeouts for long-running fetches
Long-running fetches run inside children to avoid memory leaks.
When we refork, the connection in the parent can be idle for a
long time; attempting to reuse it in the next child can result
in timeouts.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 11:11:58 -08:00
Jakub Narebski
5a4cf3346d gitweb: Allow PNG, GIF, JPEG images to be displayed in "blob" view
Allow images in one of web formats (PNG, GIF, JPEG) - actually files
with mimetype of image/png, image/git, image/jpeg - to be displayed in
"blob" view using <img /> element, instead of using "blob_plain" view
for them, like for all other files except also text/* mimetype files.

This makes possible to easily go to file history, to HEAD version of
the file, to appropriate commit etc; all of those are not available
in "blob_plain" (raw) view.

Only text files can have "blame" view link in the formats part of
navbar.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 11:11:58 -08:00
Junio C Hamano
211e6eb513 git-merge: squelch needless error message.
While deciding if the new style command line argument is a tag
or a branch, we checked it with "git show-ref -s --verify" to
see if results in an error, but when it is not a branch, the
check leaked the error message out, which was not needed to be
shown to the end user.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 10:52:04 -08:00
Junio C Hamano
c0b7391bf5 Merge 2006-12-06 10:48:08 -08:00
Junio C Hamano
2d13b732e3 Merge branch 'maint'
* maint:
  git-reset to remove "$GIT_DIR/MERGE_MSG"
  unpack-trees: make sure "df_conflict_entry.name" is NUL terminated.
2006-12-06 10:47:37 -08:00
Junio C Hamano
49ed2bc466 git-reset to remove "$GIT_DIR/MERGE_MSG"
An earlier commit a9cb3c6e changed git-commit to use the
contents of MERGE_MSG even when we do not have MERGE_HEAD (the
rationale is in its log message).

However, the change tricks the following sequence to include a
merge message in a completely unrelated commit:

	$ git pull somewhere
	: oops, the conflicts are too much.  forget it.
        $ git reset --hard
        : work work work
        $ git commit

To fix this confusion, this patch makes "git reset" to remove
the leftover MERGE_MSG that was prepared when the user abandoned
the merge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Luben Tuikov <ltuikov@yahoo.com
2006-12-06 10:47:14 -08:00
J. Bruce Fields
4003a58e41 cvs-migration: improved section titles, better push/commit explanation
Rename the section titles to make the "how-to" content of the section
obvious.  Also clarify that changes have to be commited before they can
be pushed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 09:53:33 -08:00
Johannes Schindelin
3a9f1a55ee cvs-migration document: make the need for "push" more obvious
It really is an important concept to grasp for people coming
from CVS. Even if it is briefly mentioned, it is not obvious
enough to sink in.

[jc: with wording updates from J. Bruce Fields]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 09:52:57 -08:00
Jakub Narebski
8ebe185bbf Document git-diff whitespace flags -b and -w
Document git diff options -b / --ignore-space-change and
-w / --ignore-all-space, introduced by Johannes Schindelin
in commit 0d21efa5, "Teach diff about -b and -w flags".

The description of options is taken from GNU diff man page and
GNU Diffutils info documentation.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 16:30:54 -08:00
Johannes Schindelin
c7c24889bb diff -b: ignore whitespace at end of line
This is _not_ the same as "treat eol as whitespace", since that would mean
that multiple empty lines would be treated as equal to e.g. a space.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 16:30:54 -08:00
Junio C Hamano
ba988a83f0 Merge branch 'maint'
* maint:
  receive-pack: do not insist on fast-forward outside refs/heads/
  git-mv: search more precisely for source directory in index

Conflicts:

	receive-pack.c
2006-12-04 16:30:00 -08:00
Junio C Hamano
0fb1eaa885 unpack-trees: make sure "df_conflict_entry.name" is NUL terminated.
The structure that ends with a flexible array member (or 0
length array with older GCC) "char name[FLEX_ARRAY]" is
allocated on the stack and we use it after clearing its entire
size with memset.  That does not guarantee that "name" is
properly NUL terminated as we intended on platforms with more
forgiving structure alignment requirements.

Reported breakage on m68k by Roman Zippel.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 14:24:28 -08:00
Junio C Hamano
562cefbdbf receive-pack: do not insist on fast-forward outside refs/heads/
Especially refs/tags/ hierarchy should match what git-fetch
checks.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 14:24:12 -08:00
Michael Loeffler
4cd75359ad git-fetch: ignore dereferenced tags in expand_refs_wildcard
There was a little bug in the brace expansion which should remove
the ^{} from the tagname. It used ${name#'^{}'} instead of $(name%'^{}'},
the difference is that '#' will remove the given pattern only from the
beginning of a string and '%' only from the end of a string.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:54:57 -08:00
Jakub Narebski
b360cca0b1 git-clone: Rename --use-immingled-remote option to --no-separate-remote
With making --use-separate-remote default when creating non-bare
clone, there was need for the flag which would turn off this behavior.
It was called --use-immingled-remote.

Immingle means to blend, to combine into one, to intermingle, but it
is a bit obscure word. I think it would be better to use simply
--no-separate-remote as the opposite to --use-separate-remote
option to git clone.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:49:08 -08:00
Jakub Narebski
e1147267af gitweb: Fix Atom feed <logo>: it is $logo, not $logo_url
Fix contents of Atom feed <logo> element; it should be URL
of $logo, not URL pointed by logo link.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:48:58 -08:00
Alex Riesen
f848718a69 Make perl/ build procedure ActiveState friendly.
On Cygwin + ActivateState Perl, Makefile generated with
MakeMaker is not usable because of line-endings and
back-slashes.

This teaches perl/Makefile to write a handcrafted equivalent
perl.mak file with 'make NO_PERL_MAKEMAKER=NoThanks'.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:39:32 -08:00
David Miller
396db813f2 Pass -M to diff in request-pull
Linus recommended this, otherwise any renames cause the
diffstat output to be ridiculous in some circumstances.

Because the corresponding "git-pull" done when the requestee
actually makes pull shows the stat with rename detection
enabled, it makes sense to match what the request message
includes to that output, to make the result easier to verify.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:39:27 -08:00
Jim Meyering
7c0f7028ee Set permissions of each new file before "cvs add"ing it.
Otherwise, an executable script in git would end up being
checked into the CVS repository without the execute bit.

[jc: with an additional test script from Robin Rosenberg.]

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:34:45 -08:00
Johannes Schindelin
aca085e577 git-mv: search more precisely for source directory in index
A move of a directory should find the entries in the index by
searching for the name _including_ the slash. Otherwise, the
directory can be shadowed by a file when it matches the prefix
and is lexicographically smaller, e.g. "ab.c" shadows "ab/".

Noticed by Sergey Vlasov.

[jc: added Sergey's original reproduction recipe as a test case
 at the end of t7001.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 00:55:12 -08:00
Junio C Hamano
278fcd7deb Merge branch 'maint'
* maint:
  git-svn: avoid fetching files twice in the same revision
2006-12-02 17:26:58 -08:00
Eric Wong
6173c197c9 git-svn: avoid fetching files twice in the same revision
SVN is not entirely consistent in returning log information and
sometimes returns file information when adding subdirectories,
and sometimes it does not (only returning information about the
directory that was added).  This caused git-svn to occasionally
add a file to the list of files to be fetched twice.  Now we
change the data structure to be hash to avoid repeated fetches.

As of now (in master), this only affects repositories fetched
without deltas enabled (file://, and when manually overriden
with GIT_SVN_DELTA_FETCH=0); so this bug mainly affects users of
1.4.4.1 and maint.

Thanks to Florian Weimer for reporting this bug.

[jc: backported for maint]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-02 17:25:34 -08:00
Junio C Hamano
3683dc5a9a git-merge: fix confusion between tag and branch
In a repository with core.warnambiguousrefs turned off, and with
a branch and a tag that have the same name 'frotz',

	git merge frotz

would merge the commit pointed at by the tag 'frotz' but
incorrectly would identify what was merged as 'branch frotz' in
the merge message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-02 16:58:30 -08:00
Andy Parkins
22b1c7ee01 De-emphasise the symbolic link documentation.
The fact that git has previously used symbolic links for representing
symbolic refs doesn't seem relevant to the current function of
git-symbolic-ref.  This patch makes less of a big deal about the
symbolic link history and instead focuses on what git does now.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-01 21:57:47 -08:00
Andreas Ericsson
4c81c213a4 git-diff: Introduce --index and deprecate --cached.
'git diff --cached' still works, but its use is discouraged
in the documentation. 'git diff --index' does the same thing
and is consistent with how 'git apply --index' works.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-01 21:57:04 -08:00
Andreas Ericsson
ced7b828fa ls-files: Give hints when errors happen.
Without this patch "git commit file.c file2.c" produces the not
so stellar output:

	error: pathspec 'file.c' did not match any.
	error: pathspec 'file2.c' did not match any.

With this patch, the output is changed to:

	error: pathspec 'file.c' did not match any file(s) known to git.
	error: pathspec 'file2.c' did not match any file(s) known to git.
	Did you forget to 'git add'?

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-01 21:55:45 -08:00
Nicolas Pitre
67c08ce14f pack-objects: remove redundent status information
The final 'nr_result' and 'written' values must always be the same
otherwise we're in deep trouble.  So let's remove a redundent report.

And for paranoia sake let's make sure those two variables are actually
equal after all objects are written (one never knows).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 19:06:53 -08:00
Junio C Hamano
03f99c03f8 Merge master.kernel.org:/pub/scm/gitk/gitk
* master.kernel.org:/pub/scm/gitk/gitk:
  gitk: Fix enabling/disabling of menu items on Mac OS X
2006-11-29 14:24:51 -08:00
Junio C Hamano
aed4509251 Merge branch 'maint'
* branch 'maint':
  Document git-repo-config --bool/--int options.
  tutorial: talk about user.name early and don't start with commit -a
  git-blame: fix rev parameter handling.
2006-11-29 12:16:55 -08:00
Andy Parkins
eb07fd59ac Document git-repo-config --bool/--int options.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 10:34:20 -08:00
Junio C Hamano
6658923070 tutorial: talk about user.name early and don't start with commit -a
Introducing yourself to git early would be a good idea; otherwise
the user may not find the mistake until much later when "git log"
is learned.

Teaching "commit -a" without saying that it is a shortcut for
listing the paths to commit leaves the user puzzled.  Teach the
form with explicit paths first.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 10:34:18 -08:00
Alex Riesen
6bee4e408c git-blame: fix rev parameter handling.
We lacked "--" termination in the underlying init_revisions() call
which made it impossible to specify a revision that happens to
have the same name as an existing file.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 10:33:25 -08:00
Junio C Hamano
df6b7bfb71 Merge branch 'jc/globfetch'
* jc/globfetch:
  fetch-pack: do not barf when duplicate re patterns are given
  git-fetch: allow forcing glob pattern in refspec
  git-fetch: allow glob pattern in refspec
  git-fetch: fix dumb protocol transport to fetch from pack-pruned ref
  git-fetch: reuse ls-remote result.
2006-11-28 23:07:20 -08:00
Junio C Hamano
2570458fda Merge branch 'maint'
* maint:
  git blame -C: fix output format tweaks when crossing file boundary.
2006-11-28 22:32:41 -08:00
Junio C Hamano
ab3bb800b4 git blame -C: fix output format tweaks when crossing file boundary.
We used to get the case that more than two paths came from the
same commit wrong when computing the output width and deciding
to turn on --show-name option automatically.  When we find that
lines that came from a path that is different from what we
started digging from, we should always turn --show-name on, and
we should count the name length for all files involved.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 22:32:23 -08:00
Eric Wong
1ca7558dd8 git-svn: fix multi-init
After the bugfix to connect to repositories where the user has
limited read permissions, multi-init was broken due to our
SVN::Ra connection being limited to working in a subdirectory;
so we now create a new Ra connection for init-ing branches
and another for tags

Along with that fix, allow the user to use the command-line
option flags for multi-init (--revision being the most notable;
but also --no-auth-cache, --config-dir, --username (for passing
to SVN), and --shared/--template for passing to git-init-db

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 20:59:43 -08:00
Eric Wong
4511c899e6 git-svn: documentation updates
Eliminate 'commit' from some places and plug 'dcommit' more.
Also update the section --id (GIT_SVN_ID) usage since we
have multi-init/multi-fetch now.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 20:59:41 -08:00
Eric Wong
9aca025849 git-svn: color support for the log command
* match LESS environment settings to those in pager.c
 * parse diff.color and pager.color settings in the
   config file, and pass --color to git-log
 * --color and --pager= settings are supported

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 20:59:35 -08:00
Han-Wen Nienhuys
d5cc2de9ff ident.c: Trim hint printed when gecos is empty.
Also remove asterisks for readability, and suggest use of
git-config for easy cut & pasting.

Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 16:33:45 -08:00