Code

git.git
18 years agoRetire git-log.sh (take #3)
Junio C Hamano [Tue, 11 Apr 2006 18:29:36 +0000 (11:29 -0700)]
Retire git-log.sh (take #3)

Do not install built-in commands as separate files -- use
hardlinks instead.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoRetire git-log.sh (take#2)
Junio C Hamano [Tue, 11 Apr 2006 00:37:58 +0000 (17:37 -0700)]
Retire git-log.sh (take#2)

... and install a replacement properly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoRetire git-log.sh
Junio C Hamano [Tue, 11 Apr 2006 00:37:58 +0000 (17:37 -0700)]
Retire git-log.sh

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'lt/rev'
Junio C Hamano [Mon, 10 Apr 2006 22:58:41 +0000 (15:58 -0700)]
Merge branch 'lt/rev'

* lt/rev:
  Make "--parents" logs also be incremental

18 years agoRetire diffcore-pathspec.
Junio C Hamano [Mon, 10 Apr 2006 22:57:24 +0000 (15:57 -0700)]
Retire diffcore-pathspec.

Nobody except diff-stages used it -- the callers instead filtered
the input to diffcore themselves.  Make diff-stages do that as
well and retire diffcore-pathspec.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoImprove the git-diff-tree -c/-cc documentation
Petr Baudis [Sun, 9 Apr 2006 13:43:17 +0000 (15:43 +0200)]
Improve the git-diff-tree -c/-cc documentation

This tries to clarify the -c/-cc documentation and clean up the style and
grammar.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake "--parents" logs also be incremental
Linus Torvalds [Sun, 9 Apr 2006 00:05:58 +0000 (17:05 -0700)]
Make "--parents" logs also be incremental

The parent rewriting feature caused us to create the whole history in one
go, and then simplify it later, because of how rewrite_parents() had been
written. However, with a little tweaking, it's perfectly possible to do
even that one incrementally.

Right now, this doesn't really much matter, because every user of
"--parents" will probably generally _also_ use "--topo-order", which will
cause the old non-incremental behaviour anyway. However, I'm hopeful that
we could make even the topological sort incremental, or at least
_partially_ so (for example, make it incremental up to the first merge).

In the meantime, this at least moves things in the right direction, and
removes a strange special case.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxdiff/xdiffi.c: fix warnings about possibly uninitialized variables
Marco Roeland [Sat, 8 Apr 2006 15:27:20 +0000 (17:27 +0200)]
xdiff/xdiffi.c: fix warnings about possibly uninitialized variables

Compiling this module gave the following warnings (some double dutch!):

xdiff/xdiffi.c: In functie 'xdl_recs_cmp':
xdiff/xdiffi.c:298: let op: 'spl.i1' may be used uninitialized in this function
xdiff/xdiffi.c:298: let op: 'spl.i2' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'fbest1' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'bbest1' may be used uninitialized in this function

A superficial tracking of their usage, without deeper knowledge about the
algorithm, indeed confirms that there are code paths on which these
variables will be used uninitialized. In practice these code paths might never
be reached, but then these fixes will not change the algorithm. If these
code paths are ever reached we now at least have a predictable outcome. And
should the very small performance impact of these initializations be
noticeable, then they should at least be replaced by comments why certain
code paths will never be reached.

Some extra initializations in this patch now fix the warnings.

18 years agodiffcore-rename: fix merging back a broken pair.
Junio C Hamano [Sun, 9 Apr 2006 03:17:46 +0000 (20:17 -0700)]
diffcore-rename: fix merging back a broken pair.

When a broken pair is matched up by rename detector to be merged
back, we do not want to say it is "dissimilar" with the
similarity index.  The output should just say they were changed,
taking the break score left by the earlier diffcore-break run if
any.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agodiff: fix output of total-rewrite diff.
Junio C Hamano [Sun, 9 Apr 2006 02:45:39 +0000 (19:45 -0700)]
diff: fix output of total-rewrite diff.

We did not read in the file data before emitting the
total-rewrite diff.  Noticed by Pasky.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-log: match rev-list --abbrev and --abbrev-commit
Junio C Hamano [Sat, 8 Apr 2006 05:34:11 +0000 (22:34 -0700)]
git-log: match rev-list --abbrev and --abbrev-commit

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'master' into next
Junio C Hamano [Sat, 8 Apr 2006 01:03:07 +0000 (18:03 -0700)]
Merge branch 'master' into next

* master:
  GIT 1.3.0-rc3

18 years agoGIT 1.3.0-rc3 v1.3.0-rc3
Junio C Hamano [Sat, 8 Apr 2006 01:02:40 +0000 (18:02 -0700)]
GIT 1.3.0-rc3

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'kh/svn'
Junio C Hamano [Sat, 8 Apr 2006 01:01:55 +0000 (18:01 -0700)]
Merge branch 'kh/svn'

* kh/svn:
  git-svnimport: Don't assume that copied files haven't changed

18 years agoMerge branch 'jc/thinpack'
Junio C Hamano [Sat, 8 Apr 2006 01:00:16 +0000 (18:00 -0700)]
Merge branch 'jc/thinpack'

* jc/thinpack:
  Thin pack generation: optimization.

18 years agoMerge branch 'jc/date'
Junio C Hamano [Sat, 8 Apr 2006 01:00:06 +0000 (18:00 -0700)]
Merge branch 'jc/date'

* jc/date:
  date parsing: be friendlier to our European friends.

18 years agoMerge branch 'nh/http'
Junio C Hamano [Sat, 8 Apr 2006 00:59:36 +0000 (17:59 -0700)]
Merge branch 'nh/http'

* nh/http:
  Fix compile with expat, but an old curl version
  http-fetch: add optional DAV-based pack list

18 years agoMerge branch 'ew/rev-abbrev'
Junio C Hamano [Sat, 8 Apr 2006 00:59:10 +0000 (17:59 -0700)]
Merge branch 'ew/rev-abbrev'

* ew/rev-abbrev:
  rev-list --abbrev-commit

18 years agoMerge branch 'jc/blame'
Junio C Hamano [Sat, 8 Apr 2006 00:57:46 +0000 (17:57 -0700)]
Merge branch 'jc/blame'

* jc/blame:
  blame -S <ancestry-file>
  Match ofs/cnt types in diff interface.
  blame: use built-in xdiff
  combine-diff: move the code to parse hunk-header into common library.
  combine-diff: refactor built-in xdiff interface.
  combine-diff: use built-in xdiff.

18 years agoMerge branch 'master' into next
Junio C Hamano [Fri, 7 Apr 2006 23:53:06 +0000 (16:53 -0700)]
Merge branch 'master' into next

* master:
  gitk: Fix incorrect invocation of getmergediffline
  [PATCH] gitk: Fix searching for filenames in gitk
  count-delta: match get_delta_hdr_size() changes.
  check patch_delta bounds more carefully

18 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Fri, 7 Apr 2006 23:52:59 +0000 (16:52 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Fix incorrect invocation of getmergediffline
  [PATCH] gitk: Fix searching for filenames in gitk

18 years agoMerge branch 'maint'
Junio C Hamano [Fri, 7 Apr 2006 23:51:55 +0000 (16:51 -0700)]
Merge branch 'maint'

* maint:
  count-delta: match get_delta_hdr_size() changes.
  check patch_delta bounds more carefully

18 years agocount-delta: match get_delta_hdr_size() changes. v1.2.6
Junio C Hamano [Fri, 7 Apr 2006 23:48:09 +0000 (16:48 -0700)]
count-delta: match get_delta_hdr_size() changes.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocheck patch_delta bounds more carefully
Nicolas Pitre [Fri, 7 Apr 2006 19:26:10 +0000 (15:26 -0400)]
check patch_delta bounds more carefully

Let's avoid going south with invalid delta data.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'jc/thinpack' into next
Junio C Hamano [Fri, 7 Apr 2006 09:13:20 +0000 (02:13 -0700)]
Merge branch 'jc/thinpack' into next

* jc/thinpack:
  Thin pack generation: optimization.

18 years agoMerge branch 'ew/rev-abbrev' into next
Junio C Hamano [Fri, 7 Apr 2006 09:12:55 +0000 (02:12 -0700)]
Merge branch 'ew/rev-abbrev' into next

* ew/rev-abbrev:
  rev-list --abbrev-commit

18 years agoMerge branch 'jc/blame' into next
Junio C Hamano [Fri, 7 Apr 2006 09:12:48 +0000 (02:12 -0700)]
Merge branch 'jc/blame' into next

* jc/blame:
  blame -S <ancestry-file>
  Match ofs/cnt types in diff interface.

18 years agoMerge branch 'kh/svn' into next
Junio C Hamano [Fri, 7 Apr 2006 09:12:18 +0000 (02:12 -0700)]
Merge branch 'kh/svn' into next

* kh/svn:
  git-svnimport: Don't assume that copied files haven't changed
  Add Documentation/technical/pack-format.txt
  Added Packing Heursitics IRC writeup.
  Add documentation for git-imap-send.

18 years agogit-svnimport: Don't assume that copied files haven't changed
Karl Hasselström [Fri, 7 Apr 2006 06:06:09 +0000 (08:06 +0200)]
git-svnimport: Don't assume that copied files haven't changed

Don't assume that a file that SVN claims was copied from somewhere
else is bit-for-bit identical with its parent, since SVN allows
changes to copied files before they are committed.

Without this fix, such copy-modify-commit operations causes the
imported file to lack the "modify" part -- that is, we get subtle data
corruption.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agorev-list --abbrev-commit
Junio C Hamano [Fri, 7 Apr 2006 04:32:36 +0000 (21:32 -0700)]
rev-list --abbrev-commit

This should make --pretty=oneline a whole lot more readable for
people using 80-column terminals.  Originally from Eric Wong.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoThin pack generation: optimization.
Junio C Hamano [Thu, 6 Apr 2006 06:24:57 +0000 (23:24 -0700)]
Thin pack generation: optimization.

Jens Axboe noticed that recent "git push" has become very slow
since we made --thin transfer the default.

Thin pack generation to push a handful revisions that touch
relatively small number of paths out of huge tree was stupid; it
registered _everything_ from the excluded revisions.  As a
result, "Counting objects" phase was unnecessarily expensive.

This changes the logic to register the blobs and trees from
excluded revisions only for paths we are actually going to send
to the other end.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdd Documentation/technical/pack-format.txt
Junio C Hamano [Fri, 7 Apr 2006 09:07:40 +0000 (02:07 -0700)]
Add Documentation/technical/pack-format.txt

... along with the previous one, pack-heuristics, by popular
demand.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdded Packing Heursitics IRC writeup.
Jon Loeliger [Fri, 3 Mar 2006 01:19:29 +0000 (19:19 -0600)]
Added Packing Heursitics IRC writeup.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoblame -S <ancestry-file>
Junio C Hamano [Fri, 7 Apr 2006 06:58:51 +0000 (23:58 -0700)]
blame -S <ancestry-file>

This adds the -S <ancestry-file> option to blame, which is
needed by the CVS server emulation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMatch ofs/cnt types in diff interface.
Junio C Hamano [Fri, 7 Apr 2006 05:29:55 +0000 (22:29 -0700)]
Match ofs/cnt types in diff interface.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdd documentation for git-imap-send.
Mike McCormack [Thu, 6 Apr 2006 03:32:19 +0000 (12:32 +0900)]
Add documentation for git-imap-send.

Signed-off-by: Mike McCormack <mike@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'master' into next
Junio C Hamano [Thu, 6 Apr 2006 01:22:19 +0000 (18:22 -0700)]
Merge branch 'master' into next

* master:
  blame.c: fix completely broken ancestry traversal.

18 years agoblame.c: fix completely broken ancestry traversal.
Junio C Hamano [Thu, 6 Apr 2006 01:21:17 +0000 (18:21 -0700)]
blame.c: fix completely broken ancestry traversal.

Recent revision.c updates completely broken the assignment of
blames by not rewriting commit->parents field unless explicitly
asked to by the caller.  The caller needs to set revs.parents.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitk: Fix incorrect invocation of getmergediffline
Paul Mackerras [Thu, 6 Apr 2006 00:20:03 +0000 (10:20 +1000)]
gitk: Fix incorrect invocation of getmergediffline

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] gitk: Fix searching for filenames in gitk
Pavel Roskin [Wed, 5 Apr 2006 23:02:50 +0000 (19:02 -0400)]
[PATCH] gitk: Fix searching for filenames in gitk

findcont should not accept any arguments.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge branch 'jc/date' into next
Junio C Hamano [Wed, 5 Apr 2006 22:47:29 +0000 (15:47 -0700)]
Merge branch 'jc/date' into next

* jc/date:
  date parsing: be friendlier to our European friends.
  Tweaks to make asciidoc play nice.
  git-commit: document --amend
  Avoid a crash if realloc returns a different pointer.
  Avoid a divide by zero if there's no messages to send.
  [PATCH] Provide configurable UI font for gitk
  [PATCH] gitk: Use git wrapper to run git-ls-remote.
  [PATCH] gitk: add key bindings for selecting first and last commit
  gitk: Add a help menu item to display key bindings
  [PATCH] gitk: allow goto heads
  gitk: replace parent and children arrays with lists

18 years agodate parsing: be friendlier to our European friends.
Junio C Hamano [Wed, 5 Apr 2006 22:31:12 +0000 (15:31 -0700)]
date parsing: be friendlier to our European friends.

This does three things, only applies to cases where the user
manually tries to override the author/commit time by environment
variables, with non-ISO, non-2822 format date-string:

 - Refuses to use the interpretation to put the date in the
   future; recent kernel history has a commit made with
   10/03/2006 which is recorded as October 3rd.

 - Adds '.' as the possible year-month-date separator.  We
   learned from our European friends on the #git channel that
   dd.mm.yyyy is the norm there.

 - When the separator is '.', we prefer dd.mm.yyyy over
   mm.dd.yyyy; otherwise mm/dd/yy[yy] takes precedence over
   dd/mm/yy[yy].

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoTweaks to make asciidoc play nice.
Francis Daly [Wed, 5 Apr 2006 22:25:17 +0000 (23:25 +0100)]
Tweaks to make asciidoc play nice.

Once the content has been generated, the formatting elves can reorder
it to be pretty...

Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'jc/blame' into next
Junio C Hamano [Wed, 5 Apr 2006 21:26:00 +0000 (14:26 -0700)]
Merge branch 'jc/blame' into next

* jc/blame:
  blame: use built-in xdiff

18 years agoMerge branch 'nh/http' into next
Junio C Hamano [Wed, 5 Apr 2006 21:25:57 +0000 (14:25 -0700)]
Merge branch 'nh/http' into next

* nh/http:
  Fix compile with expat, but an old curl version

18 years agoblame: use built-in xdiff
Junio C Hamano [Wed, 5 Apr 2006 19:23:29 +0000 (12:23 -0700)]
blame: use built-in xdiff

This removes the last use of external diff from core git suite.
Also addresses the use of index() -- elsewhere we tend to use
strchr().

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-commit: document --amend
Marco Roeland [Wed, 5 Apr 2006 20:28:28 +0000 (22:28 +0200)]
git-commit: document --amend

The "--amend" option is used to amend the tip of the current branch. This
documentation text was copied straight from the commit that implemented it.

Some minor format tweaks for asciidoc were taken from work by Francis Daly
in commit b0d08a5.. It looks good now also in the html page.

[jc: amended further to follow the recommendation by Francis in
commit 3070b60].

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'jc/clone'
Junio C Hamano [Wed, 5 Apr 2006 21:06:50 +0000 (14:06 -0700)]
Merge branch 'jc/clone'

* jc/clone:
  git-clone: fix handling of upsteram whose HEAD does not point at master.

18 years agoMerge branch 'pb/regex'
Junio C Hamano [Wed, 5 Apr 2006 21:06:26 +0000 (14:06 -0700)]
Merge branch 'pb/regex'

* pb/regex:
  On some platforms, certain headers need to be included before regex.h
  Support for pickaxe matching regular expressions

18 years agoAvoid a crash if realloc returns a different pointer.
Mike McCormack [Wed, 5 Apr 2006 14:22:19 +0000 (23:22 +0900)]
Avoid a crash if realloc returns a different pointer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAvoid a divide by zero if there's no messages to send.
Mike McCormack [Wed, 5 Apr 2006 14:22:52 +0000 (23:22 +0900)]
Avoid a divide by zero if there's no messages to send.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix compile with expat, but an old curl version
Johannes Schindelin [Wed, 5 Apr 2006 14:22:40 +0000 (16:22 +0200)]
Fix compile with expat, but an old curl version

With an old curl version, git-http-push is not compiled. But git-http-fetch
still needs to be linked with expat if NO_EXPAT is not defined.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Wed, 5 Apr 2006 19:45:17 +0000 (12:45 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  [PATCH] Provide configurable UI font for gitk
  [PATCH] gitk: Use git wrapper to run git-ls-remote.
  [PATCH] gitk: add key bindings for selecting first and last commit
  gitk: Add a help menu item to display key bindings
  [PATCH] gitk: allow goto heads
  gitk: replace parent and children arrays with lists

18 years agoMerge branch 'jc/combine' into next
Junio C Hamano [Wed, 5 Apr 2006 19:25:03 +0000 (12:25 -0700)]
Merge branch 'jc/combine' into next

* jc/combine:
  combine-diff: move the code to parse hunk-header into common library.

18 years agocombine-diff: move the code to parse hunk-header into common library.
Junio C Hamano [Wed, 5 Apr 2006 19:22:35 +0000 (12:22 -0700)]
combine-diff: move the code to parse hunk-header into common library.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branches 'master' and 'jc/combine' into next
Junio C Hamano [Wed, 5 Apr 2006 09:58:14 +0000 (02:58 -0700)]
Merge branches 'master' and 'jc/combine' into next

* master:
  Add git-clean command
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006

* jc/combine:
  combine-diff: refactor built-in xdiff interface.

18 years agoAdd git-clean command
Pavel Roskin [Wed, 5 Apr 2006 06:00:48 +0000 (02:00 -0400)]
Add git-clean command

This command removes untracked files from the working tree.  This
implementation is based on cg-clean with some simplifications.  The
documentation is included.

[jc: with trivial documentation fix, noticed by Jakub Narebski]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'fix'
Junio C Hamano [Wed, 5 Apr 2006 09:50:54 +0000 (02:50 -0700)]
Merge branch 'fix'

* fix:
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006

18 years agodiff_flush(): leakfix.
Junio C Hamano [Wed, 5 Apr 2006 09:06:49 +0000 (02:06 -0700)]
diff_flush(): leakfix.

We were leaking filepairs when output-format was set to
NO_OUTPUT.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocombine-diff: refactor built-in xdiff interface.
Junio C Hamano [Wed, 5 Apr 2006 09:03:58 +0000 (02:03 -0700)]
combine-diff: refactor built-in xdiff interface.

This refactors the line-by-line callback mechanism used in
combine-diff so that other programs can reuse it more easily.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoparse_date(): fix parsing 03/10/2006
Junio C Hamano [Wed, 5 Apr 2006 05:57:15 +0000 (22:57 -0700)]
parse_date(): fix parsing 03/10/2006

The comment associated with the date parsing code for three
numbers separated with slashes or dashes implied we wanted to
interpret using this order:

yyyy-mm-dd
yyyy-dd-mm
mm-dd-yy
dd-mm-yy

However, the actual code had the last two wrong, and making it
prefer dd-mm-yy format over mm-dd-yy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'nh/http' into next
Junio C Hamano [Wed, 5 Apr 2006 01:13:54 +0000 (18:13 -0700)]
Merge branch 'nh/http' into next

* nh/http:
  http-fetch: add optional DAV-based pack list
  cvsimport: use git-update-ref when updating

18 years agohttp-fetch: add optional DAV-based pack list
Nick Hengeveld [Tue, 4 Apr 2006 12:33:18 +0000 (05:33 -0700)]
http-fetch: add optional DAV-based pack list

If git is not built with NO_EXPAT, this patch changes git-http-fetch to
attempt using DAV to get a list of remote packs and fall back to using
objects/info/packs if the DAV request fails.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Provide configurable UI font for gitk
Keith Packard [Tue, 4 Apr 2006 07:19:45 +0000 (00:19 -0700)]
[PATCH] Provide configurable UI font for gitk

This makes the font used in the UI elements of gitk configurable in the
same way the other fonts are. The default fonts used in the Xft build of
tk8.5 are particularily horrific, making this change more important
there.

Signed-off-by: Keith Packard <keithp@neko.keithp.com>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] gitk: Use git wrapper to run git-ls-remote.
Mark Wooding [Tue, 4 Apr 2006 06:24:55 +0000 (23:24 -0700)]
[PATCH] gitk: Use git wrapper to run git-ls-remote.

For some reason, the Cygwin Tcl's `exec' command has trouble running
scripts.  Fix this by using the C `git' wrapper.  Other GIT programs run
by gitk are written in C already, so we don't need to incur a
performance hit of going via the wrapper (which I'll bet isn't pretty
under Cygwin).

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] gitk: add key bindings for selecting first and last commit
Rutger Nijlunsing [Wed, 5 Apr 2006 00:24:03 +0000 (10:24 +1000)]
[PATCH] gitk: add key bindings for selecting first and last commit

For a keyboard addict like me some keys are still missing from
gitk. Especially a key to select a commit when no commit is selected,
like just after startup. While we're at it, complete the bindings for
moving the view seperately from the selected line. Currently, the up
and down keys act on the selected line while pageup and pagedown act
on the commits viewed.

The idea is to have to normal keys change the selected line:
  - Home selects first commit
  - End selects last commit
  - Up selects previous commit
  - Down selects next commit
  - PageUp moves selected line one page up
  - PageDown moves selected line one page down
...and together with the Control key, it moves the commits view:
  - Control-Home views first page of commits
  - Control-End views last page of commits
  - Control-Up moves commit view one line up
  - Control-Down moves commit view one line down
  - Control-PageUp moves commit view one page up
  - Control-PageDown moves commit view one page down

Signed-off-By: Rutger Nijlunsing <gitk@tux.tmfweb.nl>
and with some cleanups and simplifications...
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge branch 'pb/regex' into next
Junio C Hamano [Wed, 5 Apr 2006 00:15:02 +0000 (17:15 -0700)]
Merge branch 'pb/regex' into next

* pb/regex:
  On some platforms, certain headers need to be included before regex.h

18 years agoOn some platforms, certain headers need to be included before regex.h
Johannes Schindelin [Tue, 4 Apr 2006 23:01:03 +0000 (01:01 +0200)]
On some platforms, certain headers need to be included before regex.h

Happily, these are already included in cache.h, which is included anyway...
so: change the order of includes.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvsimport: use git-update-ref when updating
Johannes Schindelin [Thu, 30 Mar 2006 12:06:15 +0000 (14:06 +0200)]
cvsimport: use git-update-ref when updating

This simplifies code, and also fixes a subtle bug: when importing in a
shared repository, where another user last imported from CVS, cvsimport
used to complain that it could not open <branch> for update.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitk: Add a help menu item to display key bindings
Paul Mackerras [Tue, 4 Apr 2006 23:39:51 +0000 (09:39 +1000)]
gitk: Add a help menu item to display key bindings

Suggested by Paul Schulz.  I made it a separate entry under the Help
menu rather than putting it in the About box, though.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] gitk: allow goto heads
Stephen Rothwell [Thu, 30 Mar 2006 05:13:12 +0000 (16:13 +1100)]
[PATCH] gitk: allow goto heads

This patch allows you to enter a head name in the SHA1 id: field.

It also removes some unnecessary global declarations.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge branch 'jc/combine' into next
Junio C Hamano [Tue, 4 Apr 2006 22:00:34 +0000 (15:00 -0700)]
Merge branch 'jc/combine' into next

* jc/combine:
  combine-diff: use built-in xdiff.
  GIT 1.3.0-rc2
  Set HTTP user agent to git/GIT_VERSION
  git-ls-remote: send no-cache header when fetching info/refs

18 years agocombine-diff: use built-in xdiff.
Junio C Hamano [Tue, 4 Apr 2006 01:53:15 +0000 (18:53 -0700)]
combine-diff: use built-in xdiff.

Now there is no GNU diff invocations, except the one from
blame.c

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoGIT 1.3.0-rc2 v1.3.0-rc2
Junio C Hamano [Tue, 4 Apr 2006 21:52:53 +0000 (14:52 -0700)]
GIT 1.3.0-rc2

Bunch of cleanups with a few notable enhancements since
1.3.0-rc1:

 - revision traversal infrastructure is updated so that
   existence of paths limiters and/or --max-age does not cause
   it to call limit_list().  This helps the latency working with
   the command quite a bit.

 - comes with updated gitk.

One notable fix is to make sure that the IO is restarted upon
signal even on platforms whose default signal semantics is not
to do so.  This is the fix for the notorious "clone is broken
since 1.2.2 on Solaris" problem.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge in xdiff cleanup pieces
Junio C Hamano [Tue, 4 Apr 2006 21:43:57 +0000 (14:43 -0700)]
Merge in xdiff cleanup pieces

18 years agoSet HTTP user agent to git/GIT_VERSION
Nick Hengeveld [Tue, 4 Apr 2006 17:11:29 +0000 (10:11 -0700)]
Set HTTP user agent to git/GIT_VERSION

Useful for diagnostics/troubleshooting to know which client versions are
hitting your server.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-ls-remote: send no-cache header when fetching info/refs
Nick Hengeveld [Tue, 4 Apr 2006 18:01:30 +0000 (11:01 -0700)]
git-ls-remote: send no-cache header when fetching info/refs

Proxies should not cache this file as it can cause a client to end up with
a stale version, as reported here:

http://marc.theaimsgroup.com/?l=git&m=114407944125389

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'pb/regex' into next
Junio C Hamano [Tue, 4 Apr 2006 20:45:29 +0000 (13:45 -0700)]
Merge branch 'pb/regex' into next

* pb/regex:
  Support for pickaxe matching regular expressions

18 years agoSupport for pickaxe matching regular expressions
Petr Baudis [Wed, 29 Mar 2006 00:16:33 +0000 (02:16 +0200)]
Support for pickaxe matching regular expressions

git-diff-* --pickaxe-regex will change the -S pickaxe to match
POSIX extended regular expressions instead of fixed strings.

The regex.h library is a rather stupid interface and I like pcre too, but
with any luck it will be everywhere we will want to run Git on, it being
POSIX.2 and all. I'm not sure if we can expect platforms like AIX to
conform to POSIX.2 or if win32 has regex.h. We might add a flag to
Makefile if there is a portability trouble potential.

Signed-off-by: Petr Baudis <pasky@suse.cz>
18 years agoMerge branch 'pe/cleanup'
Junio C Hamano [Tue, 4 Apr 2006 20:43:00 +0000 (13:43 -0700)]
Merge branch 'pe/cleanup'

* pe/cleanup:
  Replace xmalloc+memset(0) with xcalloc.
  Use blob_, commit_, tag_, and tree_type throughout.

18 years agoMerge branch 'lt/fix-sol-pack'
Junio C Hamano [Tue, 4 Apr 2006 20:42:02 +0000 (13:42 -0700)]
Merge branch 'lt/fix-sol-pack'

* lt/fix-sol-pack:
  Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.
  safe_fgets() - even more anal fgets()
  pack-objects: be incredibly anal about stdio semantics
  Fix Solaris stdio signal handling stupidities

18 years agoMerge branch 'pe/cleanup' into next
Junio C Hamano [Tue, 4 Apr 2006 07:23:36 +0000 (00:23 -0700)]
Merge branch 'pe/cleanup' into next

* pe/cleanup:
  Replace xmalloc+memset(0) with xcalloc.
  Use blob_, commit_, tag_, and tree_type throughout.

18 years agoMerge early part of 'jc/combine' branch
Junio C Hamano [Tue, 4 Apr 2006 07:21:50 +0000 (00:21 -0700)]
Merge early part of 'jc/combine' branch

18 years agoReplace xmalloc+memset(0) with xcalloc.
Peter Eriksen [Mon, 3 Apr 2006 18:30:46 +0000 (19:30 +0100)]
Replace xmalloc+memset(0) with xcalloc.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUse blob_, commit_, tag_, and tree_type throughout.
Peter Eriksen [Sun, 2 Apr 2006 12:44:09 +0000 (14:44 +0200)]
Use blob_, commit_, tag_, and tree_type throughout.

This replaces occurences of "blob", "commit", "tag", and "tree",
where they're really used as type specifiers, which we already
have defined global constants for.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoClean-up trivially redundant diff.
Davide Libenzi [Tue, 4 Apr 2006 01:47:55 +0000 (18:47 -0700)]
Clean-up trivially redundant diff.

Also corrects the line numbers in unified output when using
zero lines context.

18 years agocontrib/git-svn: handle array values correctly
Eric Wong [Tue, 4 Apr 2006 00:41:44 +0000 (17:41 -0700)]
contrib/git-svn: handle array values correctly

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocontrib/git-svn: make sure our git-svn is up-to-date for test
Eric Wong [Mon, 3 Apr 2006 22:18:49 +0000 (15:18 -0700)]
contrib/git-svn: make sure our git-svn is up-to-date for test

Bugs like the last one could've been avoided if it weren't for
this...

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocontrib/git-svn: ensure repo-config returns a value before using it
Eric Wong [Mon, 3 Apr 2006 22:18:48 +0000 (15:18 -0700)]
contrib/git-svn: ensure repo-config returns a value before using it

fetching from repos without an authors-file defined was broken.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'lt/fix-sol-pack' into next
Junio C Hamano [Tue, 4 Apr 2006 06:43:16 +0000 (23:43 -0700)]
Merge branch 'lt/fix-sol-pack' into next

* lt/fix-sol-pack:
  Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.
  safe_fgets() - even more anal fgets()

18 years agoUse sigaction and SA_RESTART in read-tree.c; add option in Makefile. v1.2.5
Jason Riedy [Sun, 2 Apr 2006 22:29:34 +0000 (15:29 -0700)]
Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.

Might as well ape the sigaction change in read-tree.c to avoid
the same potential problems.  The fprintf status output will
be overwritten in a second, so don't bother guarding it.  Do
move the fputc after disabling SIGALRM to ensure we go to the
next line, though.

Also add a NO_SA_RESTART option in the Makefile in case someone
doesn't have SA_RESTART but does restart (maybe older HP/UX?).
We want the builder to chose this specifically in case the
system both lacks SA_RESTART and does not restart stdio calls;
a compat #define in git-compat-utils.h would silently allow
broken systems.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agosafe_fgets() - even more anal fgets()
Junio C Hamano [Tue, 4 Apr 2006 06:41:09 +0000 (23:41 -0700)]
safe_fgets() - even more anal fgets()

This is from Linus -- the previous round forgot to clear error
after EINTR case.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'jc/clone' into next
Junio C Hamano [Mon, 3 Apr 2006 05:23:49 +0000 (22:23 -0700)]
Merge branch 'jc/clone' into next

* jc/clone:
  git-clone: fix handling of upsteram whose HEAD does not point at master.
  fix repacking with lots of tags
  Documentation: revise top of git man page

18 years agogit-clone: fix handling of upsteram whose HEAD does not point at master.
Junio C Hamano [Sun, 2 Apr 2006 23:25:01 +0000 (16:25 -0700)]
git-clone: fix handling of upsteram whose HEAD does not point at 

When cloning from a remote repository that has master, main, and
origin branches _and_ with the HEAD pointing at main branch, we
did quite confused things during clone.  So this cleans things
up.  The behaviour is a bit different between separate remotes/
layout and the mixed branches layout.

The newer layout with $GIT_DIR/refs/remotes/$origin/, things are
simpler and more transparent:

 - remote branches are copied to refs/remotes/$origin/.

 - HEAD points at the branch with the same name as the remote
   HEAD points at, and starts at where the remote HEAD points at.

 - $GIT_DIR/remotes/$origin file is set up to fetch all remote
   branches, and merge the branch HEAD pointed at at the time of
   the cloning.

Everything-in-refs/heads layout was the more confused one, but
cleaned up like this:

 - remote branches are copied to refs/heads, but the branch
   "$origin" is not copied, instead a copy of the branch the
   remote HEAD points at is created there.

 - HEAD points at the branch with the same name as the remote
   HEAD points at, and starts at where the remote HEAD points at.

 - $GIT_DIR/remotes/$origin file is set up to fetch all remote
   branches except "$origin", and merge the branch HEAD pointed
   at at the time of the cloning.

With this, the remote has master, main and origin, and its HEAD
points at main, you could:

git clone $URL --origin upstream

to use refs/heads/upstream as the tracking branch for remote
"main", and your primary working branch will also be "main".
"master" and "origin" are used to track the corresponding remote
branches and with this setup they do not have any special meaning.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agofix repacking with lots of tags
Jim Radford [Mon, 3 Apr 2006 03:50:17 +0000 (20:50 -0700)]
fix repacking with lots of tags

Use git-rev-list's --all instead of git-rev-parse's to keep from
hitting the shell's argument list length limits when repacking
with lots of tags.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocumentation: revise top of git man page
J. Bruce Fields [Sun, 2 Apr 2006 21:54:34 +0000 (17:54 -0400)]
Documentation: revise top of git man page

I'm afraid I'll be accused of trying to suck all the jokes and the
personality out of the git documentation.  I'm not!  Really!

That said, "man git" is one of the first things a new user is likely try,
and it seems a little cruel to start off with a somewhat obscure joke
about the architecture of git.

So instead I'm trying for a relatively straightforward description of what
git does, and what features distinguish it from other systems, together
with immediate links to introductory documentation.

I also did some minor reorganization in an attempt to clarify the
classification of commands.  And revised a bit for conciseness (as is
obvious from the diffstat--hopefully I didn't cut anything important).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'lt/fix-sol-pack' into next
Junio C Hamano [Sun, 2 Apr 2006 20:54:28 +0000 (13:54 -0700)]
Merge branch 'lt/fix-sol-pack' into next

* lt/fix-sol-pack:
  pack-objects: be incredibly anal about stdio semantics
  Fix Solaris stdio signal handling stupidities

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agopack-objects: be incredibly anal about stdio semantics
Linus Torvalds [Sun, 2 Apr 2006 20:31:54 +0000 (13:31 -0700)]
pack-objects: be incredibly anal about stdio semantics

This is the "letter of the law" version of using fgets() properly in the
face of incredibly broken stdio implementations.  We can work around the
Solaris breakage with SA_RESTART, but in case anybody else is ever that
stupid, here's the "safe" (read: "insanely anal") way to use fgets.

It probably goes without saying that I'm not terribly impressed by
Solaris libc.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix Solaris stdio signal handling stupidities
Linus Torvalds [Sun, 2 Apr 2006 20:28:27 +0000 (13:28 -0700)]
Fix Solaris stdio signal handling stupidities

This uses sigaction() to install the SIGALRM handler with SA_RESTART, so
that Solaris stdio doesn't break completely when a signal interrupts a
read.

Thanks to Jason Riedy for confirming the silly Solaris signal behaviour.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix sparse warnings about non-ANSI function prototypes
Rene Scharfe [Sun, 2 Apr 2006 11:13:10 +0000 (13:13 +0200)]
Fix sparse warnings about non-ANSI function prototypes

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>