Commit Graph

4307 Commits

Author SHA1 Message Date
Junio C Hamano
38035cf4a5 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>
2006-04-05 15:47:17 -07:00
Francis Daly
6cbd5d7d79 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>
2006-04-05 15:46:54 -07:00
Junio C Hamano
1b83ace35e Merge branch 'jc/blame' into next
* jc/blame:
  blame: use built-in xdiff
2006-04-05 14:26:00 -07:00
Junio C Hamano
806d097e6b Merge branch 'nh/http' into next
* nh/http:
  Fix compile with expat, but an old curl version
2006-04-05 14:25:57 -07:00
Junio C Hamano
f2f880f537 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>
2006-04-05 14:25:25 -07:00
Marco Roeland
ae5d8470f6 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>
2006-04-05 14:07:21 -07:00
Junio C Hamano
3ffe0c245f Merge branch 'jc/clone'
* jc/clone:
  git-clone: fix handling of upsteram whose HEAD does not point at master.
2006-04-05 14:06:50 -07:00
Junio C Hamano
9b6891f651 Merge branch 'pb/regex'
* pb/regex:
  On some platforms, certain headers need to be included before regex.h
  Support for pickaxe matching regular expressions
2006-04-05 14:06:26 -07:00
Mike McCormack
34c5a9e284 Avoid a crash if realloc returns a different pointer.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 13:00:07 -07:00
Mike McCormack
1cd88cc9e6 Avoid a divide by zero if there's no messages to send.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 13:00:03 -07:00
Johannes Schindelin
459a21bd35 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>
2006-04-05 12:49:56 -07:00
Junio C Hamano
521a3f6767 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
2006-04-05 12:45:17 -07:00
Junio C Hamano
d6102b53c8 Merge branch 'jc/combine' into next
* jc/combine:
  combine-diff: move the code to parse hunk-header into common library.
2006-04-05 12:25:03 -07:00
Junio C Hamano
c1e335a43f combine-diff: move the code to parse hunk-header into common library.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 12:22:35 -07:00
Junio C Hamano
b4196cf70a 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.
2006-04-05 02:58:14 -07:00
Pavel Roskin
c3b831bd84 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>
2006-04-05 02:51:27 -07:00
Junio C Hamano
12d81ce598 Merge branch 'fix'
* fix:
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006
2006-04-05 02:50:54 -07:00
Junio C Hamano
7d6c447145 diff_flush(): leakfix.
We were leaking filepairs when output-format was set to
NO_OUTPUT.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 02:48:41 -07:00
Junio C Hamano
d9ea73e056 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>
2006-04-05 02:09:58 -07:00
Junio C Hamano
fa0cdab537 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>
2006-04-04 23:00:18 -07:00
Junio C Hamano
110cb41cbf Merge branch 'nh/http' into next
* nh/http:
  http-fetch: add optional DAV-based pack list
  cvsimport: use git-update-ref when updating
2006-04-04 18:13:54 -07:00
Nick Hengeveld
8d9fbe57b3 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>
2006-04-04 18:06:35 -07:00
Keith Packard
4840be66b1 [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>
2006-04-05 10:29:47 +10:00
Mark Wooding
ce08872259 [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>
2006-04-05 10:28:34 +10:00
Rutger Nijlunsing
6e5f7203de [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>
2006-04-05 10:24:03 +10:00
Junio C Hamano
afb28f239f Merge branch 'pb/regex' into next
* pb/regex:
  On some platforms, certain headers need to be included before regex.h
2006-04-04 17:15:02 -07:00
Johannes Schindelin
46b8dec038 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>
2006-04-04 17:14:06 -07:00
Johannes Schindelin
42277bc81c 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>
2006-04-04 17:13:25 -07:00
Paul Mackerras
4e95e1f738 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>
2006-04-05 09:39:51 +10:00
Stephen Rothwell
e100712968 [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>
2006-04-05 09:14:02 +10:00
Junio C Hamano
ca3874a470 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
2006-04-04 15:00:34 -07:00
Junio C Hamano
f23fc773a2 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>
2006-04-04 14:53:43 -07:00
Junio C Hamano
fc4c4cd21c 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>
2006-04-04 14:52:53 -07:00
Junio C Hamano
3d9c54d7b3 Merge in xdiff cleanup pieces 2006-04-04 14:43:57 -07:00
Nick Hengeveld
20fc9bc5e4 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>
2006-04-04 14:42:47 -07:00
Nick Hengeveld
7fa8ddd6e2 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>
2006-04-04 14:36:22 -07:00
Junio C Hamano
46e48c3604 Merge branch 'pb/regex' into next
* pb/regex:
  Support for pickaxe matching regular expressions
2006-04-04 13:45:29 -07:00
Petr Baudis
d01d8c6782 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>
2006-04-04 13:44:15 -07:00
Junio C Hamano
810e152375 Merge branch 'pe/cleanup'
* pe/cleanup:
  Replace xmalloc+memset(0) with xcalloc.
  Use blob_, commit_, tag_, and tree_type throughout.
2006-04-04 13:43:00 -07:00
Junio C Hamano
4c61b7d15a 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
2006-04-04 13:42:02 -07:00
Junio C Hamano
00cbdec981 Merge branch 'pe/cleanup' into next
* pe/cleanup:
  Replace xmalloc+memset(0) with xcalloc.
  Use blob_, commit_, tag_, and tree_type throughout.
2006-04-04 00:23:36 -07:00
Junio C Hamano
b411fda15d Merge early part of 'jc/combine' branch 2006-04-04 00:21:50 -07:00
Peter Eriksen
90321c106c Replace xmalloc+memset(0) with xcalloc.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 00:11:19 -07:00
Peter Eriksen
8e44025925 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>
2006-04-04 00:11:19 -07:00
Davide Libenzi
ca557afff9 Clean-up trivially redundant diff.
Also corrects the line numbers in unified output when using
zero lines context.
2006-04-04 00:11:09 -07:00
Eric Wong
fc9957b005 contrib/git-svn: handle array values correctly
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 00:09:47 -07:00
Eric Wong
5f2f424002 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>
2006-04-04 00:09:45 -07:00
Eric Wong
5941a9e9d8 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>
2006-04-04 00:09:42 -07:00
Junio C Hamano
7941602983 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()
2006-04-03 23:43:16 -07:00
Jason Riedy
72fdfb50f7 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>
2006-04-03 23:42:25 -07:00