summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2006-03-02Merge branch 'js/refs'Junio C Hamano
* js/refs: Warn about invalid refs
2006-03-02cvsserver: Eclipse compat -- now "compare with latest from HEAD" worksMartin Langhoff
The Eclipse client uses cvs update when that menu option is triggered. And doesn't like the standard cvs update response. Give it *exactly* what it wants. And hope the other clients don't lose the plot too badly. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02annotate: fix -S parameter to take a stringMartin Langhoff
In the conversion to Getopt::Long, the -S / --rev-list parameter stopped working. We need to tell Getopt::Long that it is a string. As a bonus, the open() now does some useful error handling. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02annotate: Add a basic set of test cases.Ryan Anderson
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02annotate: handle \No newline at end of file.Ryan Anderson
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02gitview: Use horizontal scroll bar in the tree viewAneesh Kumar K.V
Earlier we set up the window to never scroll horizontally, which made it harder to use on a narrow screen. This patch allows scrollbar to be used as needed by Gtk Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02cvsserver: Checkout correctly on EclipseMartin Langhoff
Initial checkouts were failing to create Entries files under Eclipse. Eclipse was waiting for two non-standard directory-resets to prepare for a new directory from the server. This patch is tricky, because the same directory resets tend to confuse other clients. It's taken a bit of fiddling to get the commandline cvs client and Eclipse to get a good, clean checkout. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02Re-fix compilation warnings.Luck, Tony
Commit 8fcf1ad9c68e15d881194c8544e7c11d33529c2b has a combination of double cast and Andreas' switch to using unsigned long ... just the latter is sufficient (and a lot less ugly than using the double cast). Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02Up to date with GIT 1.2.4 fixesJunio C Hamano
2006-03-02Pretty-print tagger dates.Junio C Hamano
We can show commit objects with human readable dates using various --pretty options, but there was no way to do so with tags. This introduces two such ways: $ git-cat-file -p v1.2.3 shows the tag object with tagger dates in human readable format. $ git-verify-tag --verbose v1.2.3 uses it to show the contents of the tag object as well as doing GPG verification. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02Merge branch 'lt/fix-apply' into maintv1.2.4Junio C Hamano
* lt/fix-apply: git-am: --whitespace=x option. git-apply: war on whitespace -- finishing touches. git-apply --whitespace=nowarn apply --whitespace: configuration option. apply: squelch excessive errors and --whitespace=error-all apply --whitespace fixes and enhancements. The war on trailing whitespace
2006-03-02Merge branch 'lt/apply'Junio C Hamano
* lt/apply: git-am: --whitespace=x option. git-apply: war on whitespace -- finishing touches. git-apply --whitespace=nowarn apply --whitespace: configuration option. apply: squelch excessive errors and --whitespace=error-all apply --whitespace fixes and enhancements. The war on trailing whitespace
2006-03-02Merge early parts of 'np/delta' branchJunio C Hamano
2006-03-01Merge git-mv fixes from 'maint'Junio C Hamano
2006-03-01git-mv: fixes for path handlingJosef Weidendorfer
Moving a directory ending in a slash was not working as the destination was not calculated correctly. E.g. in the git repo, git-mv t/ Documentation gave the error Error: destination 'Documentation' already exists To get rid of this problem, strip trailing slashes from all arguments. The comment in cg-mv made me curious about this issue; Pasky, thanks! As result, the workaround in cg-mv is not needed any more. Also, another bug was shown by cg-mv. When moving files outside of a subdirectory, it typically calls git-mv with something like git-mv Documentation/git.txt Documentation/../git-mv.txt which triggers the following error from git-update-index: Ignoring path Documentation/../git-mv.txt The result is a moved file, removed from git revisioning, but not added again. To fix this, the paths have to be normalized not have ".." in the middle. This was already done in git-mv, but only for a better visual appearance :( Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01git-mv: Allow -h without repo & fix error messageJosef Weidendorfer
This fixes "git-mv -h" to output the usage without the need to be in a git repository. Additionally: - fix confusing error message when only one arg was given - fix typo in error message Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01Allow git-mv to accept ./ in paths.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 9a0e6731c632c841cd2de9dec0b9091b2f10c6fd commit)
2006-03-01combine-diff: Honour -z option correctly.Mark Wooding
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> (cherry picked from 6baf0484efcd29bb5e58ccd5ea0379481d4a83f4 commit)
2006-03-01combine-diff: Honour --full-index.Mark Wooding
For some reason, combined diffs don't honour the --full-index flag when emitting patches. Fix this. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from e70c6b35749c316f6e97099bd6bdac895c9d6f68 commit)
2006-03-01diffcore-break: micro-optimize by avoiding delta between identical files.Junio C Hamano
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> (cherry picked from aeecd23ae2785a0462d42191974e9d9a8e439fbe commit)
2006-03-01git-log (internal): more options.Junio C Hamano
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-01git-log (internal): add approxidate.Junio C Hamano
Next will be the pretty-print format. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds
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-01Warn about invalid refsJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01cvsserver: Eclipse compat - browsing 'modules' (heads in our case) worksMartin Langhoff
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-01cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a ↵Martin Langhoff
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-01cvsserver: add notes on how to get a checkout under EclipseMartin Langhoff
2006-03-01git-am: --whitespace=x option.Junio C Hamano
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-03-01git-am: --whitespace=x option.Junio C Hamano
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-03-01diffcore-rename: split out the delta counting code.Junio C Hamano
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-03-01diffcore-break: micro-optimize by avoiding delta between identical files.Junio C Hamano
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-28Tie it all together: "git log"Linus Torvalds
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-28Introduce trivial new pager.c helper infrastructureLinus Torvalds
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-28git-rev-list libification: rev-list walkingLinus Torvalds
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-28Darwin: Ignore missing /sw/libShawn Pearce
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-28gitview: Set the default width of graph cellAneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28gitview: Some window layout changes.Aneesh Kumar K.V
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-28gitview: Select the text color based on whether the entry in highlighted. ↵Pavel Roskin
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-28git-apply: war on whitespace -- finishing touches.Junio C Hamano
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-28git-apply: war on whitespace -- finishing touches.Junio C Hamano
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-28git-apply --whitespace=nowarnJunio C Hamano
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-28apply --whitespace: configuration option.Junio C Hamano
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-28apply: squelch excessive errors and --whitespace=error-allJunio C Hamano
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-28apply --whitespace fixes and enhancements.Junio C Hamano
In addition to fixing obvious command line parsing bugs in the previous round, this changes the following: * Adds "--whitespace=strip". This applies after stripping the new trailing whitespaces introduced to the patch. * The output error message format is changed to say "patch-filename:linenumber:contents of the line". This makes it similar to typical compiler error message format, and helps C-x ` (next-error) in Emacs compilation buffer. * --whitespace=error and --whitespace=warn do not stop at the first error. We might want to limit the output to say first 20 such lines to prevent cluttering, but on the other hand if you are willing to hand-fix after inspecting them, getting everything with a single run might be easier to work with. After all, somebody has to do the clean-up work somewhere. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28The war on trailing whitespaceLinus Torvalds
On Sat, 25 Feb 2006, Andrew Morton wrote: > > I'd suggest a) git will simply refuse to apply such a patch unless given a > special `forcing' flag, b) even when thus forced, it will still warn and c) > with a different flag, it will strip-then-apply, without generating a > warning. This doesn't do the "strip-then-apply" thing, but it allows you to make git-apply generate a warning or error on extraneous whitespace. Use --whitespace=warn to warn, and (surprise, surprise) --whitespace=error to make it a fatal error to have whitespace at the end. Totally untested, of course. But it compiles, so it must be fine. HOWEVER! Note that this literally will check every single patch-line with "+" at the beginning. Which means that if you fix a simple typo, and the line had a space at the end before, and you didn't remove it, that's still considered a "new line with whitespace at the end", even though obviously the line wasn't really new. I assume this is what you wanted, and there isn't really any sane alternatives (you could make the warning activate only for _pure_ additions with no deletions at all in that hunk, but that sounds a bit insane). Linus
2006-02-28git-apply --whitespace=nowarnJunio C Hamano
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-27Merge part of kh/svnimport branch into masterJunio C Hamano
2006-02-27contrib/git-svn: correct commit example in manpageEric Wong
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-27Save username -> Full Name <email@addr.es> map fileKarl Hasselström
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-27Let git-svnimport's author file use same syntax as git-cvsimport'sKarl Hasselström
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>