1
0
mirror of https://github.com/git/git.git synced 2024-10-03 16:22:22 +02:00
Commit Graph

15778 Commits

Author SHA1 Message Date
Junio C Hamano
d96ca27e10 Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
  git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
  git-gui: add a part about format strings in po/README
  git-gui: update po/it.po
  git-gui: update Japanese translation
  git-gui: Update swedish translation.
  git-gui: Update git-gui.pot for 0.11 nearing release
  git-gui: Update German translation
2008-08-06 13:32:18 -07:00
Junio C Hamano
847d10f56d Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update swedish translation.
  gitk: Updated German translation
  gitk: Fallback to selecting the head commit upon load
  gitk: Fixed automatic row selection during load
  gitk: Fixed broken exception handling in diff
  gitk: On Windows, use a Cygwin-specific flag for kill
  gitk: Arrange to kill diff-files & diff-index on quit
  gitk: Kill back-end processes on window close
2008-08-06 13:32:12 -07:00
Junio C Hamano
65ac5530ab Merge branch 'rs/archive-parse-options'
* rs/archive-parse-options:
  archive: allow --exec and --remote without equal sign
2008-08-06 13:31:38 -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
Steven Grimm
ddd63e64e4 Optimize sha1_object_info for loose objects, not concurrent repacks
When dealing with a repository with lots of loose objects, sha1_object_info
would rescan the packs directory every time an unpacked object was referenced
before finally giving up and looking for the loose object. This caused a lot
of extra unnecessary system calls during git pack-objects; the code was
rereading the entire pack directory once for each loose object file.

This patch looks for a loose object before falling back to rescanning the
pack directory, rather than the other way around.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Brandon Casey
3d32a46b24 Teach fsck and prune that tmp_obj_ file names may not be 14 bytes long
As Shawn pointed out, not all temporary file creation routines can
ensure that the generated temporary file is of a certain length.
e.g. Java's createTempFile(prefix, suffix). So just depend on the
prefix 'tmp_obj_' for detection.

Update prune, and fix the "fix" introduced by a08c53a1 :)

Signed-off-by: Brandon "appendixless" Casey <casey@nrlssc.navy.mil>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Lee Marlow
1127c51cfe bash completion: Add completion for 'git mv'
Add completions for all long options specified in the docs
    --dry-run

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Lee Marlow
b1bc1494ed bash completion: Add completion for 'git ls-files'
Add completions for all long options specified in the docs
    --cached --deleted --modified --others --ignored
    --stage --directory --no-empty-directory --unmerged
    --killed --exclude= --exclude-from=
    --exclude-per-directory= --exclude-standard
    --error-unmatch --with-tree= --full-name
    --abbrev --ignored --exclude-per-directory

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
b3191ce2d5 bash completion: Add completion for 'git archive'
Add completions for all long options specified in the docs
    --format= --list --verbose
    --prefix= --remote= --exec=

The --format= long option can be completed with available formats
and the --remote= can be completed with defined remote repositories.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
95d43780cf bash completion: More completions for 'git stash'
Add branch subcommand to completions and USAGE for git-stash.sh.
Complete stash names for show, apply, drop, pop, and branch.
Add "--index" long option for apply.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
a6c2be244f bash completion: Add completion for 'git revert'
Add completions for all long options specified in the docs
    --edit --mainline --no-edit --no-commit --signoff

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
5dad868b26 bash completion: Add completion for 'git init'
Add completions for all long options specified in the docs
    --quiet --bare --template= --shared
    --shared={false|true|umask|group|all|world|everybody}

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
4181c7e8a7 bash completion: Add completion for 'git clean'
Add completions for all long options specified in the docs
    --dry-run --quiet

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow
3eb1101207 bash completion: Add completion for 'git clone'
Add completions for all long options specified in the docs
    --local --no-hardlinks --shared --reference
    --quiet --no-checkout --bare --mirror --origin
    --upload-pack --template= --depth

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Eric Wong
80828488cc t9119: conditionally re-enable test depending on svn(1) version
I've tested this with svn 1.4.4

This also adds quoting to make it work odd characters
in the trash path.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
David D. Kilzer
d9042a0ac4 Fix race condition in t9119-git-svn-info.sh
Changed the ptouch bash function to use the "Text Last Updated"
date reported by 'svn info' when changing the modified time
(mtime) of the file/symlink/directory in the git working
directory.  Previously it used the mtime of the item in the
svn working directory, which caused the race condition.

[ew: swapped argument order of ptouch() to minimize diff]

From: David D. Kilzer <ddkilzer@kilzer.net>

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Eric Wong
bd2d4f96b3 git-svn: properly set path for "info" command
canonicalize_path() was previously changed to better
fit SVN 1.5, but it makes the "info" command not match
svn(1) in two places:

  1) URL ended up with a trailing slash when run without an
     argument.

  2) "Path: " was displayed instead of "Path: ." when run
     without an argument.

We will also handle odd cases where a user wants to
get information on a file or directory named "0", too.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Mike Ralphson
1168d402d2 Documentation: typos / spelling fixes
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:18 -07:00
Junio C Hamano
04bb50f45d Merge branch 'maint'
* maint:
  RelNotes 1.5.6.5 updates
  diff.renamelimit is a basic diff configuration
  git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
  Documentation: typos / spelling fixes in older RelNotes
2008-08-05 21:21:08 -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
Junio C Hamano
725b06050a add: refuse to add working tree items beyond symlinks
This is the same fix for the issue of adding "sym/path" when "sym" is a
symblic link that points at a directory "dir" with "path" in it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 23:31:23 -07:00
Junio C Hamano
806d13b1cc update-index: refuse to add working tree items beyond symlinks
When "sym" is a symbolic link that is inside the working tree, and it
points at a directory "dir" that has "path" in it, "update-index --add
sym/path" used to mistakenly add "sym/path" as if "sym" were a normal
directory.

"git apply", "git diff" and "git merge" have been taught about this issue
some time ago, but "update-index" and "add" have been left ignorant for
too long.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 23:31:23 -07:00
Dmitry Potapov
fba5279db9 correct access right for git-svn-dcommit test
The tests requires anonymous write access. Therefore, "anon-access =
write" is added to conf/svnserve.conf. But because it was added to
the end of the file, it is impossible to guarantee in what section
it will be located. It turned out that on SVN 1.5, it was placed in
the wrong section and as result the test failed.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Tested-by: Brad King <brad.king@kitware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:53:45 -07:00
Abhijit Menon-Sen
25032ccd5f Fix typos in INSTALL
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:52:08 -07:00
Abhijit Menon-Sen
9751a32a6b Fix typo in perl/Git.pm
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:51:53 -07:00
Abhijit Menon-Sen
452d36b1f3 Fix hash slice syntax error
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:51:23 -07:00
Abhijit Menon-Sen
108c2aaf79 Git.pm: localise $? in command_close_bidi_pipe()
Git::DESTROY calls _close_cat_blob and _close_hash_and_insert_object,
which in turn call command_close_bidi_pipe, which calls waitpid, which
alters $?. If this happens during global destruction, it may alter the
program's exit status unexpectedly. Making $? local to the function
solves the problem.

(The problem was discovered due to a failure of test #8 in
t9106-git-svn-commit-diff-clobber.sh.)

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:51:17 -07:00
Lee Marlow
c72e0db1ff bash completion: Add completion for 'git grep'
Add completions for all long options specified in the docs

    --cached
    --text --ignore-case --word-regexp --invert-match
    --full-name
    --extended-regexp --basic-regexp --fixed-strings
    --files-with-matches --name-only
    --files-without-match
    --count
    --and --or --not --all-match

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:48:51 -07:00
Anders Melchiorsen
7d0b18a4da Add output flushing before fork()
This adds fflush(NULL) before fork() in start_command(), to keep
the generic interface safe.

A remaining use of fork() with no flushing is in a comment in
show_tree(). Rewrite that comment to use start_command().

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:46:42 -07:00
Johannes Sixt
9534c9fb31 git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
The new execdir is two levels below the root directory, while
the old execdir 'bin' was only one level below.  This commit
adapts the discovery of oguilib that uses relative paths
accordingly. We determine whether we have the extra level in the same
way in which the Makefile defines sharedir, i.e. whether the last
directory part is 'git-core'.

Inspired-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-04 17:38:17 -07:00
Avery Pennarun
611921654f git-svn: Abort with an error if 'fetch' parameter is invalid.
Previously, if a config entry looked like this:

         svn-remote.svn.fetch=:refs/heads/whatever

git-svn would silently do nothing if you asked it to "git svn fetch", and
give a strange error if asked to "git svn dcommit".  What it really wants is
a line that looks like this:

	svn-remote.svn.fetch=:refs/remotes/whatever

So we should simply abort if we get the wrong thing.

On the other hand, there's actually no good reason for git-svn to enforce
using the refs/remotes namespace, but the code seems to have hardcoded this
in several places and I'm not brave enough to try to fix it all right now.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 18:13:53 -07:00
Anders Melchiorsen
2c3766f06a Flush output in start_async
This prevents double output in case stdout is redirected.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 17:55:40 -07:00
Mikael Magnusson
8eacbc1b03 gitk: Update swedish translation.
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-04 09:17:26 +10:00
Steffen Prohaska
22537765f5 Modify mingw_main() workaround to avoid link errors
With MinGW's

   gcc.exe (GCC) 3.4.5 (mingw special)
   GNU ld version 2.17.50 20060824

the old define caused link errors:

   git.o: In function `main':
   C:/msysgit/git/git.c:500: undefined reference to `mingw_main'
   collect2: ld returned 1 exit status

The modified define works.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 14:18:23 -07:00
Junio C Hamano
57b0fc4516 Merge branch 'maint'
* maint:
  git-name-rev: don't use printf without format
2008-08-03 14:14:10 -07:00
Johannes Schindelin
6612f877cc clone --bare: Add ".git" suffix to the directory name to clone into
We have a tradition that bare repositories live in directories ending
in ".git".  To make this more a convention than just a tradition, teach
"git clone --bare" to add a ".git" suffix to the directory name.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 14:05:55 -07:00
Michele Ballabio
fbbdaa5f42 git-gui: add a part about format strings in po/README
This should help tranlators that need to reorder words and strings.
Original explanation by Christian Stimming.

Also remove unneeded backslashes.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-03 13:53:42 -07:00
Michele Ballabio
7cce5b2cbc git-gui: update po/it.po
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-03 13:51:26 -07:00
しらいしななこ
6b312253cb git-gui: update Japanese translation
This updates Japanese translation to match the updated git-gui.pot.

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-03 13:49:53 -07:00
Dmitry Potapov
4a3d85dcf6 add --no-filters option to git hash-object
The new option allows the contents to be hashed as is, ignoring any input
filter that would have been chosen by the attributes mechanism.

This option is incompatible with --path and --stdin-paths options.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:38:22 -07:00
Dmitry Potapov
3970243150 add --path option to git hash-object
The --path option allows us to pretend as if the contents being hashed
came from the specified path, and affects which input filter is used via
the attributes mechanism.  This is useful for hashing a temporary file
whose name is different from the path that is meant to have the hashed
contents.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:33:06 -07:00
Dmitry Potapov
548601adcc use parse_options() in git hash-object
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:23:54 -07:00
Dmitry Potapov
9ae8e008ab correct usage help string for git-hash-object
The usage string is corrected to make it fit in 80 columns and to make it
unequivocal about what options can be used with --stdin-paths.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:23:15 -07:00
Dmitry Potapov
81014073f2 correct argument checking test for git hash-object
Because the file name given to stdin did not exist, git hash-object
fails to open it and exits with non-zero error code.

Thus the test may pass even if there is an error in argument checking.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:22:57 -07:00
Dmitry Potapov
43df4f86e0 teach index_fd to work with pipes
index_fd can now work with file descriptors that are not normal files
but any readable file. If the given file descriptor is a regular file
then mmap() is used; for other files, strbuf_read is used.

The path parameter, which has been used as hint for filters, can be
NULL now to indicate that the file should be hashed literally without
any filter.

The index_pipe function is removed as redundant.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:14:35 -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
Christian Stimming
12aaf1f64d gitk: Updated German translation
This includes suggestions by Stephan Beyer.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-03 22:45:43 +10:00