1
0
mirror of https://github.com/git/git.git synced 2024-10-01 03:42:35 +02:00
Commit Graph

4987 Commits

Author SHA1 Message Date
Björn Engelmann
cfba045930 add more informative error messages to git-mktag
Signed-off-by: Björn Engelmann <BjEngelmann@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:38:29 -07:00
Björn Engelmann
e7332f96b3 remove the artificial restriction tagsize < 8kb
Signed-off-by: Björn Engelmann <BjEngelmann@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:38:29 -07:00
Peter Eriksen
e8cc9cd98e Builtin git-diff-files, git-diff-index, git-diff-stages, and git-diff-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:13 -07:00
Peter Eriksen
51ce34b992 Builtin git-show-branch.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:13 -07:00
Peter Eriksen
ac6245e31a Builtin git-apply.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:13 -07:00
Peter Eriksen
6d96ac18e5 Builtin git-commit-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:12 -07:00
Peter Eriksen
d147e501f3 Builtin git-read-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:12 -07:00
Peter Eriksen
56d1398ad3 Builtin git-tar-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:12 -07:00
Peter Eriksen
aae01bda7f Builtin git-ls-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:12 -07:00
Peter Eriksen
0864f26421 Builtin git-ls-files.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 13:11:12 -07:00
Junio C Hamano
3fb3cc69af builtin-rm: squelch compiler warnings.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 01:31:38 -07:00
Peter Eriksen
405053d2d9 Add git-quiltimport to .gitignore.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 01:26:21 -07:00
Martin Langhoff
55cad84299 cvsimport: introduce _fetchfile() method and used a 1M buffer to read()
File retrieval from the socket is now moved to _fetchfile() and we now
cap reads at 1MB. This should limit the memory growth of the cvsimport
process.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 01:16:08 -07:00
Jeff King
e73aefe4fd cvsimport: cleanup commit function
This change attempts to clean up the commit function to make it a bit
easier to read (or at least the first half of it). It also improves
robustness and performance. Specifically:
  - report get_headref errors on opening ref unless the error is ENOENT
  - use regex to check for sha1 instead of length
  - use lexically scoped filehandles which get cleaned up automagically
  - check for error on both 'print' and 'close' (since output is buffered)
  - avoid "fork, do some perl, then exec" in commit(). It's not necessary,
    and we probably end up COW'ing parts of the perl process. Plus the code
    is much smaller because we can use open2()
  - avoid calling strftime over and over (mainly a readability cleanup)

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 00:50:50 -07:00
Jeff King
6a1871e174 cvsimport: use git-update-index --index-info
This should reduce the number of git-update-index forks required per
commit. We now do adds/removes in one call, and we are no longer forced to
deal with argv limitations.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 00:41:39 -07:00
Matthias Lederhofer
443f8338b9 git status: skip empty directories, and add -u to show all untracked files
By default, we use --others --directory to show uninteresting
directories (to get user's attention) without their contents (to
unclutter output).  Showing empty directories do not make sense,
so pass --no-empty-directory when we do so.

Giving -u (or --untracked) disables this uncluttering to let the
user get all untracked files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 00:36:51 -07:00
Linus Torvalds
4adcea995e cvsimport: repack every kilo-commits.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Acked-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 00:31:36 -07:00
Martin Langhoff
06918348de cvsimport: introduce -L<imit> option to workaround memory leaks
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23 00:29:35 -07:00
Sean
07001f95a6 Remove possible segfault in http-fetch.
Free the curl string lists after running http_cleanup to
avoid an occasional segfault in the curl library.  Seems
to only occur if the website returns a 405 error.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:52:58 -07:00
Sean
7f7e6eacf9 Install git builtins into gitexecdir rather than bindir.
Moving "git-cmd" commands out of the path and into a special
git exec path, should include the builtins.

[jc: fixed the case where bindir == gitexecdir - ln -f fails
 with a complaint that src and dst are the same, likewise for
 the fallback cp.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:52:19 -07:00
Sean
1100ac81a9 Change GIT-VERSION-GEN to call git commands with "git" not "git-".
GIT-VERSION-GEN can incorrectly return a default version of
"v1.3.GIT" because it tries to execute git commands using the
"git-cmd" format that expects all git commands to be in the $PATH.
Convert these to  "git cmd" format so that a proper answer is
returned even when the git commands have been moved out of the
$PATH and into a $gitexecdir.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:20:46 -07:00
Martin Langhoff
c4b16f8d77 cvsimport: replace anonymous sub ref with a normal sub
commit() does not need to be an anonymous subreference. Keep it simple.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:16:44 -07:00
Martin Langhoff
f396f01f11 cvsimport: minor fixups
Cleanup @skipped after it's used. Close a fhandle.
Removing suspects one at a time.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:12:27 -07:00
Yakov Lerner
f803eec51b Problem: 'trap...exit' causes error message when /bin/sh is ash.
Problem: 'trap...exit' causes error message when /bin/sh is ash.
Fix: Change 'trap...exit' to 'trap...0' like in other scripts.

Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:11:52 -07:00
Sean
e3008464e7 Avoid segfault in diff --stat rename output.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 18:00:38 -07:00
Junio C Hamano
884e3134a0 Tutorial #2: broken link fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 15:34:40 -07:00
Martin Waitz
5126f35a54 git help: remove whatchanged from list of common commands
whatchanged is replaced by git log now.

Signed-off-by: Martin Waitz
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 13:42:58 -07:00
Junio C Hamano
9546010b7b fetch-pack: output refs in the order they were given on the command line.
Currently, fetched refs are output in the order the remote side
happened to send them.  This changes the order to match the
order of refs that were given on the command line.  To the
existing core callers (git-fetch and git-clone) this does not
make any difference, but for other Porcelain use, it would be
more intuitive.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 05:32:38 -07:00
Kay Sievers
9e4f7d9a5d v266 2006-05-22 14:31:09 +02:00
Kay Sievers
00cd07943a remove Christian's email address 2006-05-22 14:30:47 +02:00
Junio C Hamano
5e363541d0 diff: minor option combination fix.
output_format == DIFFSTAT and with_stat == true does not make sense, and
the way the code is structured it causes trouble.  Avoid it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-22 00:31:02 -07:00
Junio C Hamano
c831da6647 builtin format-patch: squelch content-type for 7-bit ASCII
When --attach is not used, usually we do not say Content-Type:
and fluff, but if the commit message is not 7-bit ASCII, mark
it as "text/plain; charset=UTF-8".  This unclutters output
somewhat.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 23:55:00 -07:00
Junio C Hamano
cdd406e389 CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.
By convention, the commit message and the author/committer names
in the commit objects are UTF-8 encoded.  When formatting for
e-mails, Q-encode them according to RFC 2047.

While we are at it, generate the content-type and
content-transfer-encoding headers as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 21:39:20 -07:00
Junio C Hamano
81c5cf7865 mailinfo: skip bogus UNIX From line inside body
Sometimes people just include the whole format-patch output in
the commit e-mail.  Detect it and skip the bogus ">From " line.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 17:37:46 -07:00
Junio C Hamano
d5e3d60c20 tutorial-2: typofix in examples.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 17:37:25 -07:00
J. Bruce Fields
e31952da5c tutorial: add discussion of index file, object database
Add a sequel to tutorial.txt which discusses the index file and
the object database.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 17:15:43 -07:00
J. Bruce Fields
f1fe3846e4 tutorial: expanded discussion of commit history
Expand the history-browsing section of the tutorial a bit, in part to
address Junio's suggestion that we mention "git grep" and Linus's
complaint that people are missing the flexibility of the commandline
interfaces for selecting commits.

This reads a little more like a collection of examples than a
"tutorial", but maybe that's what people need at this point.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 17:15:40 -07:00
J. Bruce Fields
67e6e5c4e7 tutorial: replace "whatchanged" by "log"
Junio suggested changing references to git-whatchanged to git-log.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 17:15:19 -07:00
Yakov Lerner
6ba68ab288 NO_INET_NTOP and compat/inet_ntop.c for some systems (e.g. old Cygwin).
For systems which lack inet_ntop(), this adds compat/inet_ntop.c,
and related build constant, NO_INET_NTOP. Older Cygwin(s) lack
inet_ntop().

Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 16:44:36 -07:00
Alex Riesen
fbd01abf50 remove superflous "const"
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 16:40:45 -07:00
Junio C Hamano
efbff23609 git-rebase: use canonical A..B syntax to format-patch
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 03:16:38 -07:00
Junio C Hamano
9e848163ed checkdiff_consume: strtol parameter fix.
The second parameter is not the end of string input; it is
the optional return value to retrieve where the parser stopped.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 03:01:59 -07:00
Junio C Hamano
685637381a git-format-patch: now built-in.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 02:48:21 -07:00
Shawn Pearce
87a56cd3b1 Elaborate on why ':' is a bad idea in a ref name.
With the new cat-file syntax of 'v1.3.3:refs.c' we should mention
it as part of the reason why ':' is not permitted in a ref name.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 02:07:43 -07:00
Shawn Pearce
2b1f4247ab Reference git-check-ref-format in git-branch.
Its nice to have git-check-ref-format actually get mentioned in
git-branch's documentation as the syntax of a ref name must conform
to what is described in git-check-ref-format.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 02:05:41 -07:00
Johannes Schindelin
698ce6f87e fmt-patch: Support --attach
This patch touches a couple of files, because it adds options to print a
custom text just after the subject of a commit, and just after the
diffstat.

[jc: made "many dashes" used as the boundary leader into a single
 variable, to reduce the possibility of later tweaks to miscount the
 number of dashes to break it.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 02:03:09 -07:00
Junio C Hamano
328b710d80 Merge branch 'master' into js/fmt-patch
* master: (119 commits)
  diff family: add --check option
  Document that "git add" only adds non-ignored files.
  Add a conversion tool to migrate remote information into the config
  fetch, pull: ask config for remote information
  Fix build procedure for builtin-init-db
  read-tree -m -u: do not overwrite or remove untracked working tree files.
  apply --cached: do not check newly added file in the working tree
  Implement a --dry-run option to git-quiltimport
  Implement git-quiltimport
  Revert "builtin-grep: workaround for non GNU grep."
  builtin-grep: workaround for non GNU grep.
  builtin-grep: workaround for non GNU grep.
  git-am: use apply --cached
  apply --cached: apply a patch without using working tree.
  apply --numstat: show new name, not old name.
  Documentation/Makefile: create tarballs for the man pages and html files
  Allow pickaxe and diff-filter options to be used by git log.
  Libify the index refresh logic
  Builtin git-init-db
  Remove unnecessary local in get_ref_sha1.
  ...
2006-05-21 01:34:54 -07:00
Johannes Schindelin
8824689884 diff family: add --check option
Actually, it is a diff option now, so you can say

	git diff --check

to ask if what you are about to commit is a good patch.

[jc: this also would work for fmt-patch, but the point is that
 the check is done before making a commit.  format-patch is run
 from an already created commit, and that is too late to catch
 whitespace damaged change.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 01:16:09 -07:00
Santi
845ae27bf8 Document that "git add" only adds non-ignored files.
Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-20 18:22:11 -07:00
Paul Mackerras
45a9d5054d gitk: Highlight paths of interest in tree view as well
With this, when the file list window is in tree view mode, we highlight
the paths of interest.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-20 22:56:27 +10:00