Граф коммитов

8570 Коммитов

Автор SHA1 Сообщение Дата
Junio C Hamano e79cbbea9e Merge branch 'maint'
* maint:
  git-diff: fix combined diff
  Fix 'git commit -a' in a newly initialized repository
  Include git-gui credits file in dist.
  Document the new core.bare configuration option.
2007-02-22 21:27:37 -08:00
Johannes Schindelin 75b62b489a git-diff: fix combined diff
The code forgets that typecast binds tighter than addition, in
other words:

    (cast *)array + i  === ((cast *)array) + i

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22 21:24:34 -08:00
Fredrik Kuivinen 755b99d815 Fix 'git commit -a' in a newly initialized repository
With current git:

$ git init
$ git commit -a
cp: cannot stat `.git/index': No such file or directory

Output a nice error message instead.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22 21:02:39 -08:00
Shawn O. Pearce 4917d2a66e Include git-gui credits file in dist.
The Makefile for the git-gui subproject will fail to execute if run
outside of a git.git directory, such as when building from a .tar.gz
or .tar.bz2.  This is because it is looking for the credits file,
which was created but omitted from the tarball by the toplevel
Makefile.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21 21:47:42 -08:00
Shawn O. Pearce e4a15f40bc Document the new core.bare configuration option.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21 16:39:09 -08:00
Junio C Hamano 2470653196 Merge branch 'maint'
* maint:
  Use gunzip -c over gzcat in import-tars example.
  git-gui: Don't crash in citool mode on initial commit.
  git-gui: Remove TODO list.
  git-gui: Include browser in our usage message.
  git-gui: Change summary of git-gui.
  git-gui: Display all authors of git-gui.
  git-gui: Use mixed path for docs on Cygwin.
  git-gui: Correct crash when saving options in blame mode.
  git-gui: Expose the browser as a subcommand.
  git-gui: Create new branches from a tag.
  git-gui: Prefer version file over git-describe.
  git-gui: Print version on the console.
  git-gui: More consistently display the application name.
  git-gui: Permit merging tags into the current branch.
  git-gui: Basic version check to ensure git 1.5.0 or later is used.
  git-gui: Refactor 'exec git subcmd' idiom.
2007-02-21 11:16:20 -08:00
Junio C Hamano 5bac4a6719 Merge branch 'master' of git://repo.or.cz/git-gui into maint
* 'master' of git://repo.or.cz/git-gui:
  git-gui: Don't crash in citool mode on initial commit.
  git-gui: Remove TODO list.
  git-gui: Include browser in our usage message.
  git-gui: Change summary of git-gui.
  git-gui: Display all authors of git-gui.
  git-gui: Use mixed path for docs on Cygwin.
  git-gui: Correct crash when saving options in blame mode.
  git-gui: Expose the browser as a subcommand.
  git-gui: Create new branches from a tag.
  git-gui: Prefer version file over git-describe.
  git-gui: Print version on the console.
  git-gui: More consistently display the application name.
  git-gui: Permit merging tags into the current branch.
  git-gui: Basic version check to ensure git 1.5.0 or later is used.
  git-gui: Refactor 'exec git subcmd' idiom.
2007-02-21 11:09:57 -08:00
Michael Loeffler c750da256a Use gunzip -c over gzcat in import-tars example.
Not everyone has gzcat or bzcat installed on their system, but
gunzip -c and bunzip2 -c perform the same task and are available
if the user has installed gzip support or bzip2 support.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 11:09:57 -05:00
Pavel Roskin b5a40a5724 git-remote: support remotes with a dot in the name
[jc: the original from Pavel was limiting the variable names to only
 fetch and url, but I loosened it to take valid variable names.]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21 00:07:24 -08:00
Johannes Schindelin 13e36ec51b Teach diff -B about colours
Matthias Lederhofer noticed that `diff -B` did not pick up on diff
colournig.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21 00:03:37 -08:00
Theodore Ts'o 1918278ea1 Allow git-remote to update named groups of remotes
In response to a feature request from Shawn Pearce, this patch allows
a user to update a named group of remotes by using "git remote update
<group>", where the group is defined in the config file by
remotes.<group>.  The default if the named group is not specified is
now fetched group remotes.default, instead of remote.fetch, which is
what had been previously used.

In addition, if remotes.default is not defined, all remotes defined in
the config file will be used, as before, but there is now also
possible to request that a particular repository to be skipped by
default by using the boolean configuration parameter
remote.<name>.skipDefaultUpdate.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 23:58:39 -08:00
Theodore Ts'o 7b9a13ece8 Add config_boolean() method to the Git perl module
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 23:58:37 -08:00
Simon 'corecode' Schubert 4a6b9bb60a Allow passing of an alternative CVSROOT via -d.
This is necessary if using CVS in an asymmetric fashion, i.e. when the
CVSROOT you are checking out from differs from the CVSROOT you have to
commit to.

Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 23:58:27 -08:00
Alex Riesen d2cd696322 disable t4016-diff-quote.sh on some filesystems
... because the filesystems (most typically FAT and NTFS) do not support
HT nor LF in filenames.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
2007-02-20 23:55:22 -08:00
Martin Waitz b97e911643 Support for large files on 32bit systems.
Glibc uses the same size for int and off_t by default.
In order to support large pack sizes (>2GB) we force Glibc to a 64bit off_t.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:45:09 -08:00
Johannes Schindelin 34c6a82b8a git grep: use pager
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:44:35 -08:00
Shawn O. Pearce 981193786f git-gui: Don't crash in citool mode on initial commit.
Attempting to use `git citool` to create an initial commit caused
git-gui to crash with a Tcl error as it tried to add the newly
born branch to the non-existant branch menu.  Moving this code
to after the normal commit cleanup logic resolves the issue, as
we only have a branch menu if we are not in singlecommit mode.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 01:33:59 -05:00
Shawn O. Pearce 7391b2e999 git-gui: Remove TODO list.
I'm apparently not very good at keeping my own TODO file current.
I its also somewhat strange to keep the TODO list as part of the
software branch, as its meta-information that is not directly
related to the code.  I'm pulling the TODO list from git-gui and
moving it into a seperate branch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 01:29:05 -05:00
Junio C Hamano 4b22f634a3 Merge branch 'fk/autoconf'
* fk/autoconf:
  New autoconf test for iconv
2007-02-20 22:28:22 -08:00
Shawn O. Pearce c0f7a6c33d git-gui: Include browser in our usage message.
Now that the 'browser' subcommand can be used to startup the tree
browser, it should be listed as a possible subcommand option in
our usage message.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 01:24:57 -05:00
Junio C Hamano 5ead60e619 Merge branch 'js/name-rev-fix'
* js/name-rev-fix:
  name-rev: avoid "^0" when unneeded
2007-02-20 22:24:03 -08:00
Junio C Hamano 1968d77dd6 prefixcmp(): fix-up leftover strncmp().
There were instances of strncmp() that were formatted improperly
(e.g. whitespace around parameter before closing parenthesis)
that caused the earlier mechanical conversion step to miss
them.  This step cleans them up.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:03:15 -08:00
Junio C Hamano 599065a3bb prefixcmp(): fix-up mechanical conversion.
Previous step converted use of strncmp() with literal string
mechanically even when the result is only used as a boolean:

    if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo")))

This step manually cleans them up to read:

    if (!prefixcmp(arg, "foo"))

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:03:15 -08:00
Junio C Hamano cc44c7655f Mechanical conversion to use prefixcmp()
This mechanically converts strncmp() to use prefixcmp(), but only when
the parameters match specific patterns, so that they can be verified
easily.  Leftover from this will be fixed in a separate step, including
idiotic conversions like

    if (!strncmp("foo", arg, 3))

  =>

    if (!(-prefixcmp(arg, "foo")))

This was done by using this script in px.perl

   #!/usr/bin/perl -i.bak -p
   if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) {
           s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
   }
   if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) {
           s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
   }

and running:

   $ git grep -l strncmp -- '*.c' | xargs perl px.perl

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:03:15 -08:00
Junio C Hamano cff0302c14 Add prefixcmp()
We have too many strncmp(a, b, strlen(b)).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 22:03:14 -08:00
Junio C Hamano 9360f27ff7 Merge branch 'maint'
* maint:
  Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.
2007-02-20 22:02:15 -08:00
Shawn O. Pearce 019f42a4ff git-gui: Change summary of git-gui.
Since git-gui does more than create commits, it is unfair to call
it "a commit creation tool".  Instead lets just call it a graphical
user interface.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 00:11:02 -05:00
Shawn O. Pearce 871f4c97ad git-gui: Display all authors of git-gui.
Now that git-gui has been released to the public as part of Git 1.5.0
I am starting to see some work from other people beyond myself and
Paul.  Consequently the copyright for git-gui is not strictly the
two of us anymore, and these others deserve to have some credit
given to them.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 00:11:01 -05:00
Shawn O. Pearce ee40599330 git-gui: Use mixed path for docs on Cygwin.
The Firefox browser requires that a URL use / to delimit directories.
This is instead of \, as \ gets escaped by the browser into its hex
escape code and then relative URLs are incorrectly resolved, Firefox
no longer sees the directories for what they are.  Since we are
handing the browser a true URL, we better use the standard / for
directories.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21 00:11:01 -05:00
Jason Riedy 3efb1f343a Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.
Thanks to Simon 'corecode' Schubert <corecode@fs.ei.tum.de> for
the clean-up.  Defining the C99 standard PRIuMAX when necessary
replaces UM_FMT and the awkward UM10_FMT.  There are no direct
C99 translations for other uses of NO_C99_FORMAT in git, alas.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 19:10:57 -08:00
Junio C Hamano a53b12c3a2 Link 1.5.0.1 documentation from the main page.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 00:44:35 -08:00
Johannes Schindelin 59d3f541cf name-rev: avoid "^0" when unneeded
When naming by a tag, we used to add "^0" even if this was not really
necessary. For example, `git name-rev de6f0def` now outputs

	de6f0def tags/v1.5.0.1~9

instead of

	de6f0def tags/v1.5.0.1^0~9

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 19:03:59 -08:00
Theodore Ts'o 1e592d65b5 Teach git-remote to update existing remotes by fetching from them
This allows users to use the command "git remote update" to update all
remotes that are being tracked in the repository.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:34:33 -08:00
Junio C Hamano 0bce7a52f2 Merge branch 'js/diff-color-check'
* js/diff-color-check:
  diff --check: use colour
2007-02-19 18:30:59 -08:00
Junio C Hamano 50cfde1453 Merge branch 'jc/fetch-notags'
* jc/fetch-notags:
  remotes.not-origin.tagopt
2007-02-19 18:30:52 -08:00
Junio C Hamano 2b2b892e36 Merge branch 'maint'
* maint:
  Obey NO_C99_FORMAT in fast-import.c.
  Add a compat/strtoumax.c for Solaris 8.
  git-clone: Sync documentation to usage note.
2007-02-19 18:29:41 -08:00
Jason Riedy e326bce65c Obey NO_C99_FORMAT in fast-import.c.
Define UM_FMT and UM10_FMT and use in place of %ju and %10ju,
respectively.  Both format as unsigned long long, so this
assumes the compiler supports long long.

Signed-off-by: Jason Riedy <jason@acm.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:20:49 -08:00
Jason Riedy bc6b4f52fc Add a compat/strtoumax.c for Solaris 8.
Solaris 8 was pre-c99, and they weren't willing to commit to
the strtoumax definition according to /usr/include/inttypes.h.

This adds NO_STRTOUMAX and NO_STRTOULL for ancient systems.
If NO_STRTOUMAX is defined, the routine in compat/strtoumax.c
will be used instead.  That routine passes its arguments to
strtoull unless NO_STRTOULL is defined.  If NO_STRTOULL, then
the routine uses strtoul (unsigned long).

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Acked-by: Shawn O Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:20:30 -08:00
Christian Schlotter f496454e0f git-clone: Sync documentation to usage note.
Documentation advertises the new `--depth <n>' parameter with an equal
sign, while the usage notes (shown after `git-clone --help') do not.  If I
understood git-clone's source code correctly, the version without the
equal sign is correct, which is why this patch syncs documentation to the
usage note.

Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:14:29 -08:00
Junio C Hamano 7e53607c95 Merge branch 'ap/cvsserver'
* ap/cvsserver:
  Have git-cvsserver call hooks/update before really altering the ref

Acked-by: Martin Langhoff <martin@catalyst.net.nz>
2007-02-19 13:12:39 -08:00
Junio C Hamano f5a9264769 Merge branch 'maint'
* maint:
  GIT 1.5.0.1
  Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
  Read the config in rev-list

Conflicts:

	RelNotes
2007-02-18 18:45:52 -08:00
Junio C Hamano 4bc94d2892 GIT 1.5.0.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 16:18:43 -08:00
Fredrik Kuivinen 38eb9329ba Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
Similarly for i18n.logoutputencoding.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:58:20 -08:00
Fredrik Kuivinen 256c3fe6c7 Read the config in rev-list
Otherwise "git rev-list --header HEAD" will not do the right
thing if i18n.commitencoding is set.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:58:08 -08:00
Fredrik Kuivinen e63ccb84e3 New autoconf test for iconv
On a Solaris machine I have access to libc contains the symbol
"iconv" but, when compiling with gcc and including iconv.h we get
iconv.h from GNU libiconv. This header file define (among other
things) "iconv" to "libiconv" and so on.

In order to link with GNU libiconv we need -liconv. Currently we
test if the symbol "iconv" is in libc (which is true), then we get
a undefined reference error because we don't have libiconv_open.

The solution this patch implements is to compile and link a
small test program, instead of just checking if the libraries
(libc and libiconv) contains the symbol "iconv".

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:57:36 -08:00
Johannes Schindelin c5a8c3ecd7 diff --check: use colour
Reuse the colour handling of the regular diff.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:45:51 -08:00
Shawn O. Pearce 372ef954a1 git-gui: Correct crash when saving options in blame mode.
Martin Waitz noticed that git-gui crashed while saving the user's
options out if the application was started in blame mode.  This
was caused by the do_save_config procedure invoking reshow_diff
incase the number of context lines was modified by the user.
Because we bypassed main window UI setup to enter blame mode we
did not set many of the globals which were accessed by reshow_diff,
and reading unset variables is an error in Tcl.

Aside from moving the globals to be set earlier, I also modified
reshow_diff to not invoke clear_diff if there is no path currently
in the diff viewer.  This way reshow_diff does not crash when in
blame mode due to the $ui_diff command not being defined.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-18 02:12:32 -05:00
Junio C Hamano b758120144 Update draft release notes for 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 16:18:14 -08:00
Junio C Hamano 69bc0e22d3 Merge branch 'maint'
* maint:
  Update draft release notes for 1.5.0.1
  Convert update-index references in docs to add.
  Attempt to improve git-rebase lead-in description.
  Do not take mode bits from index after type change.
  git-blame: prevent argument parsing segfault
  Make gitk save and restore window pane position on Linux and Cygwin.
  Make gitk save and restore the user set window position.
  [PATCH] gitk: Use show-ref instead of ls-remote
  [PATCH] Make gitk work reasonably well on Cygwin.
  [PATCH] gitk - remove trailing whitespace from a few lines.
  Change git repo-config to git config
2007-02-17 16:16:48 -08:00
Junio C Hamano 21b4875a51 Update draft release notes for 1.5.0.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 16:15:22 -08:00