1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 16:52:59 +01:00
Commit graph

3620 commits

Author SHA1 Message Date
Junio C Hamano
2b443e0fc3 Merge branch 'lt/rev-list' into next
* lt/rev-list:
  git-log (internal): more options.
  git-log (internal): add approxidate.
2006-03-01 03:17:13 -08:00
Junio C Hamano
7ae0b0cb65 git-log (internal): more options.
This ports the following options from rev-list based git-log
implementation:

 * -<n>, -n<n>, and -n <n>.  I am still wondering if we want
    this natively supported by setup_revisions(), which already
    takes --max-count.  We may want to move them in the next
    round.  Also I am not sure if we can get away with not
    setting revs->limited when we set max-count.  The latest
    rev-list.c and revision.c in this series do not, so I left
    them as they are.

 * --pretty and --pretty=<fmt>.

 * --abbrev=<n> and --no-abbrev.

The previous commit already handles time-based limiters
(--since, --until and friends).  The remaining things that
rev-list based git-log happens to do are not useful in a pure
log-viewing purposes, and not ported:

 * --bisect (obviously).

 * --header.  I am actually in favor of doing the NUL
   terminated record format, but rev-list based one always
   passed --pretty, which defeated this option.  Maybe next
   round.

 * --parents.  I do not think of a reason a log viewer wants
   this.  The flag is primarily for feeding squashed history
   via pipe to downstream tools.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 03:16:34 -08:00
Junio C Hamano
fd751667a2 git-log (internal): add approxidate.
Next will be the pretty-print format.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 03:16:34 -08:00
Junio C Hamano
1025fe51bf Merge branch 'lt/rev-list' into next
* lt/rev-list:
  Rip out merge-order and make "git log <paths>..." work again.
  Tie it all together: "git log"
  Introduce trivial new pager.c helper infrastructure
  git-rev-list libification: rev-list walking

blame.c #include's epoch.h; it needed to be killed.
2006-03-01 02:55:56 -08:00
Linus Torvalds
765ac8ec46 Rip out merge-order and make "git log <paths>..." work again.
Well, assuming breaking --merge-order is fine, here's a patch (on top of
the other ones) that makes

	git log <filename>

actually work, as far as I can tell.

I didn't add the logic for --before/--after flags, but that should be
pretty trivial, and is independent of this anyway.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 01:45:50 -08:00
Junio C Hamano
213523f46c Merge part of 'jc/diff' into next 2006-03-01 01:36:29 -08:00
Junio C Hamano
d54000ca3e Merge part of 'sp/checkout' into next 2006-03-01 01:35:51 -08:00
Junio C Hamano
f64c429ff7 Merge branch 'lt/apply' into next
* lt/apply:
  git-am: --whitespace=x option.
2006-03-01 01:35:00 -08:00
Junio C Hamano
dcf7e417c6 Merge branch 'js/refs' into next
* js/refs:
  Warn about invalid refs
2006-03-01 01:34:00 -08:00
Junio C Hamano
6ecc321ba5 Merge branch 'cvsserver' of http://locke.catalyst.net.nz/git/git-martinlanghoff; branch 'master' into next
Conflicts:

	Documentation/git-cvsserver.txt
	git-cvsserver.perl

Originally Martin's tree was based on "next", which meant that all
the other things that I am not ready to push out to "master" were
contained in it.  His changes looked good, and I wanted to have them
in "master".

So, here is what I did:

 - fetch Martin's tree into a temporary topic branch.
   $ git fetch $URL $remote:ml/cvsserver
   $ git checkout ml/cvsserver

 - rebase it on top of "master".
   $ git rebase --onto master next

 - pull that master into "next", recording Martin's head as well.
   $ git pull --append . master

Since I have apply.whitespace=strip in my configuration file, the
rebased cvsserver changes have trailing whitespaces introduced by
Martin's tree cleansed out.  Hence the above conflicts.

The reason I made this octopus is to make sure that next time Martin
pulls from my "next" branch, it results in a fast forward.  There is
no reason to force him do the same conflict resolution I did with this
merge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 01:33:23 -08:00
Shawn Pearce
9debe63d10 Teach git-checkout-index to read filenames from stdin.
Since git-checkout-index is often used from scripts which
may have a stream of filenames they wish to checkout it is
more convenient to use --stdin than xargs.  On platforms
where fork performance is currently sub-optimal and
the length of a command line is limited (*cough* Cygwin
*cough*) running a single git-checkout-index process for
a large number of files beats spawning it multiple times
from xargs.

File names are still accepted on the command line if
--stdin is not supplied.  Nothing is performed if no files
are supplied on the command line or by stdin.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 01:15:31 -08:00
Johannes Schindelin
c401cb48e7 Warn about invalid refs
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 01:15:12 -08:00
Martin Langhoff
858cbfbabe cvsserver: Eclipse compat - browsing 'modules' (heads in our case) works
Eclipse CVS clients have an odd way of perusing the top level of
the repository, by calling update on module "". So reproduce cvs'
odd behaviour in the interest of compatibility.

It makes it much easier to get a checkout when using Eclipse.
2006-03-01 01:10:27 -08:00
Martin Langhoff
7172aabb4b cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U
A few things to satisfy Eclipse's strange habits as a cvs client:

- Implement Questionable
- Aliased rlog to log, but more work may be needed
- Add a space after the U that indicates updated
2006-03-01 01:10:26 -08:00
Martin Langhoff
ee75d4cd31 cvsserver: add notes on how to get a checkout under Eclipse 2006-03-01 01:10:26 -08:00
Martin Langhoff
f0bcd511ee cvsserver: Eclipse compat - browsing 'modules' (heads in our case) works
Eclipse CVS clients have an odd way of perusing the top level of
the repository, by calling update on module "". So reproduce cvs'
odd behaviour in the interest of compatibility.

It makes it much easier to get a checkout when using Eclipse.
2006-03-01 21:07:55 +13:00
Martin Langhoff
5793aa1cc0 cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U
A few things to satisfy Eclipse's strange habits as a cvs client:

- Implement Questionable
- Aliased rlog to log, but more work may be needed
- Add a space after the U that indicates updated
2006-03-01 21:07:55 +13:00
Martin Langhoff
49cc27bb46 cvsserver: add notes on how to get a checkout under Eclipse 2006-03-01 21:07:40 +13:00
Junio C Hamano
8c31cb822f git-am: --whitespace=x option.
This is passed down to git-apply to override the built-in
default and per-repository configuration at runtime.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 22:34:57 -08:00
Junio C Hamano
65416758cd diffcore-rename: split out the delta counting code.
This is to rework diffcore break/rename/copy detection code
so that it does not affected when deltifier code gets improved.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 20:20:04 -08:00
Junio C Hamano
aeecd23ae2 diffcore-break: micro-optimize by avoiding delta between identical files.
We did not check if we have the same file on both sides when
computing break score.  This is usually not a problem, but if
the user said --find-copies-harde with -B, we ended up trying a
delta between the same data even when we know the SHA1 hash of
both sides match.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 20:19:47 -08:00
Linus Torvalds
70b006b971 Tie it all together: "git log"
This is what the previous diffs all built up to.

We can do "git log" as a trivial small helper function inside git.c,
because the infrastructure is all there for us to use as a library.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 14:49:34 -08:00
Linus Torvalds
f67b45f862 Introduce trivial new pager.c helper infrastructure
This introduces the new function

	void setup_pager(void);

to set up output to be written through a pager applocation.

All in preparation for doing the simple scripts in C.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 14:49:32 -08:00
Linus Torvalds
a4a88b2bab git-rev-list libification: rev-list walking
This actually moves the "meat" of the revision walking from rev-list.c
to the new library code in revision.h. It introduces the new functions

	void prepare_revision_walk(struct rev_info *revs);
	struct commit *get_revision(struct rev_info *revs);

to prepare and then walk the revisions that we have.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 14:49:29 -08:00
Shawn Pearce
e3601e8bb7 Darwin: Ignore missing /sw/lib
When on Darwin platforms don't include Fink or DarwinPorts
into the link path unless the related library directory
is actually present.  The linker on MacOS 10.4 complains
if it is given a directory which does not exist.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 11:02:13 -08:00
Aneesh Kumar K.V
d82343b938 gitview: Set the default width of graph cell
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 11:02:10 -08:00
Aneesh Kumar K.V
0852694ba4 gitview: Some window layout changes.
This makes menubar look nice

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 11:02:08 -08:00
Pavel Roskin
3abe217a5b gitview: Select the text color based on whether the entry in highlighted. Use standard font.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 11:02:02 -08:00
Junio C Hamano
d00e0f8101 Merge part of np/delta 2006-02-28 01:15:29 -08:00
Junio C Hamano
a369bbfcc0 Merge branch 'lt/apply' into next
* lt/apply:
  git-apply: war on whitespace -- finishing touches.
  git-apply --whitespace=nowarn
2006-02-28 01:14:56 -08:00
Junio C Hamano
f21d672615 git-apply: war on whitespace -- finishing touches.
This changes the default --whitespace policy to nowarn when we
are only getting --stat, --summary etc. IOW when not applying
the patch.  When applying the patch, the default is warn (spit
out warning message but apply the patch).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 01:12:52 -08:00
Nicolas Pitre
2b8d9347aa diff-delta: bound hash list length to avoid O(m*n) behavior
The diff-delta code can exhibit O(m*n) behavior with some patological
data set where most hash entries end up in the same hash bucket.

The latest code rework reduced the block size making it particularly
vulnerable to this issue, but the issue was always there and can be
triggered regardless of the block size.

This patch does two things:

1) the hashing has been reworked to offer a better distribution to
   atenuate the problem a bit, and

2) a limit is imposed to the number of entries that can exist in the
   same hash bucket.

Because of the above the code is a bit more expensive on average, but
the problematic samples used to diagnoze the issue are now orders of
magnitude less expensive to process with only a slight loss in
compression.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 21:38:01 -08:00
Junio C Hamano
bec2a69fe4 Revert "Revert "diff-delta: produce optimal pack data"" 2006-02-27 21:37:56 -08:00
Junio C Hamano
621603b76a git-apply --whitespace=nowarn
Andrew insists --whitespace=warn should be the default, and I
tend to agree.  This introduces --whitespace=warn, so if your
project policy is more lenient, you can squelch them by having
apply.whitespace=nowarn in your configuration file.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 17:34:26 -08:00
Junio C Hamano
6d5e6fff52 Merge branch 'master' into next
* master:
  Merge part of kh/svnimport branch into master
  contrib/git-svn: correct commit example in manpage
  contrib/git-svn: tell the user to not modify git-svn-HEAD directly
  gitview: Remove trailing white space
  gitview: Fix the encoding related bug
  git-format-patch: Always add a blank line between headers and body.
  combine-diff: Honour -z option correctly.
  combine-diff: Honour --full-index.
2006-02-27 15:54:36 -08:00
Junio C Hamano
bfea9fc499 Merge branch 'lt/rev-list' into next
* lt/rev-list:
  Splitting rev-list into revisions lib, end of beginning.
2006-02-27 15:48:17 -08:00
Junio C Hamano
27a3f33945 Merge branch 'lt/apply' into next
* lt/apply:
  apply --whitespace: configuration option.
  apply: squelch excessive errors and --whitespace=error-all
2006-02-27 15:48:13 -08:00
Junio C Hamano
6490603b1b Merge branch 'kh/svnimport' into next
* kh/svnimport:
  Save username -> Full Name <email@addr.es> map file
  Let git-svnimport's author file use same syntax as git-cvsimport's
2006-02-27 15:48:06 -08:00
Junio C Hamano
f3a4ec48e4 Merge part of kh/svnimport branch into master 2006-02-27 15:46:39 -08:00
Eric Wong
7be737680f contrib/git-svn: correct commit example in manpage
Thanks to Nicolas Vilz <niv@iaglans.de> for noticing this.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 15:27:51 -08:00
Karl Hasselström
d3cac2c95a Save username -> Full Name <email@addr.es> map file
When the user specifies a username -> Full Name <email@addr.es> map
file with the -A option, save a copy of that file as
$git_dir/svn-authors. When running git-svnimport with an existing GIT
directory, use $git_dir/svn-authors (if it exists) unless a file was
explicitly specified with -A.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 15:27:24 -08:00
Karl Hasselström
80804d0af8 Let git-svnimport's author file use same syntax as git-cvsimport's
git-cvsimport uses a username => Full Name <email@addr.es> mapping
file with this syntax:

  kha=Karl Hasselström <kha@treskal.com>

Since there is no reason to use another format for git-svnimport, use
the same format.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 15:27:21 -08:00
Junio C Hamano
2ae1c53b51 apply --whitespace: configuration option.
The new configuration option apply.whitespace can take one of
"warn", "error", "error-all", or "strip".  When git-apply is run
to apply the patch to the index, they are used as the default
value if there is no command line --whitespace option.

Andrew can now tell people who feed him git trees to update to
this version and say:

	git repo-config apply.whitespace error

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 14:47:45 -08:00
Junio C Hamano
fc96b7c9ba apply: squelch excessive errors and --whitespace=error-all
This by default makes --whitespace=warn, error, and strip to
warn only the first 5 additions of trailing whitespaces.  A new
option --whitespace=error-all can be used to view all of them
before applying.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 14:16:30 -08:00
Eric Wong
b705ba43c6 contrib/git-svn: tell the user to not modify git-svn-HEAD directly
As a rule, interface branches to different SCMs should never be modified
directly by the user.  They are used exclusively for talking to the
foreign SCM.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 12:55:16 -08:00
Linus Torvalds
d9a83684c4 Splitting rev-list into revisions lib, end of beginning.
This makes the rewrite easier to validate in that revision flag
parsing and warlking part are now all in rev_info structure.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:10:16 -08:00
Aneesh Kumar K.V
c447f10f99 gitview: Remove trailing white space
Do the cleanup using Dave jones vim script

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:01:58 -08:00
Aneesh Kumar K.V
68d55b83a5 gitview: Fix the encoding related bug
Get the encoding information from repository and convert it to utf-8 before
passing to gtk.TextBuffer.set_text. gtk.TextBuffer.set_text work only with utf-8

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:01:54 -08:00
Alexandre Julliard
f891cb3fd6 git-format-patch: Always add a blank line between headers and body.
If the second line of the commit message isn't empty, git-format-patch
needs to add an empty line in order to generate a properly formatted
mail. Otherwise git-rebase drops the rest of the commit message.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:01:47 -08:00
Mark Wooding
6baf0484ef combine-diff: Honour -z option correctly.
Combined diffs don't null terminate things in the same way as standard
diffs.  This is presumably wrong.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:01:22 -08:00