aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Move B and Q decoding into check header.Eric W. Biederman2006-05-23
| | | | | | | | B and Q decoding is not appropriate for in body headers, so move it up to where we explicitly know we have a real email header. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make read_one_header_line return a flag not a length.Eric W. Biederman2006-05-23
| | | | | | | | | Currently we only use the return value from read_one_header line to tell if the line we have read is a header or not. So make it a flag. This paves the way for better email detection. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-quiltimport to .gitignore.Peter Eriksen2006-05-23
| | | | | Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cvsimport: introduce _fetchfile() method and used a 1M buffer to read()Martin Langhoff2006-05-23
| | | | | | | | | 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>
* cvsimport: cleanup commit functionJeff King2006-05-23
| | | | | | | | | | | | | | | | | 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>
* cvsimport: use git-update-index --index-infoJeff King2006-05-23
| | | | | | | | | 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>
* git status: skip empty directories, and add -u to show all untracked filesMatthias Lederhofer2006-05-23
| | | | | | | | | | | | 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>
* cvsimport: repack every kilo-commits.Linus Torvalds2006-05-23
| | | | | | 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>
* cvsimport: introduce -L<imit> option to workaround memory leaksMartin Langhoff2006-05-23
| | | | | Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Install git builtins into gitexecdir rather than bindir.Sean2006-05-22
| | | | | | | | | | | 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>
* Change GIT-VERSION-GEN to call git commands with "git" not "git-".Sean2006-05-22
| | | | | | | | | | | 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>
* cvsimport: replace anonymous sub ref with a normal subMartin Langhoff2006-05-22
| | | | | | | 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>
* cvsimport: minor fixupsMartin Langhoff2006-05-22
| | | | | | | | 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>
* Problem: 'trap...exit' causes error message when /bin/sh is ash.Yakov Lerner2006-05-22
| | | | | | | | 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>
* Avoid segfault in diff --stat rename output.Sean2006-05-22
| | | | | Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Tutorial #2: broken link fix.Junio C Hamano2006-05-22
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git help: remove whatchanged from list of common commandsMartin Waitz2006-05-22
| | | | | | | whatchanged is replaced by git log now. Signed-off-by: Martin Waitz Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff: minor option combination fix.Junio C Hamano2006-05-22
| | | | | | | 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>
* tutorial-2: typofix in examples.Junio C Hamano2006-05-21
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* tutorial: add discussion of index file, object databaseJ. Bruce Fields2006-05-21
| | | | | | | | 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>
* tutorial: expanded discussion of commit historyJ. Bruce Fields2006-05-21
| | | | | | | | | | | | | 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>
* tutorial: replace "whatchanged" by "log"J. Bruce Fields2006-05-21
| | | | | | | 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>
* NO_INET_NTOP and compat/inet_ntop.c for some systems (e.g. old Cygwin).Yakov Lerner2006-05-21
| | | | | | | | | 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>
* remove superflous "const"Alex Riesen2006-05-21
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* checkdiff_consume: strtol parameter fix.Junio C Hamano2006-05-21
| | | | | | | 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>
* Elaborate on why ':' is a bad idea in a ref name.Shawn Pearce2006-05-21
| | | | | | | | 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>
* Reference git-check-ref-format in git-branch.Shawn Pearce2006-05-21
| | | | | | | | | 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>
* diff family: add --check optionJohannes Schindelin2006-05-21
| | | | | | | | | | | | | | | | 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>
* Document that "git add" only adds non-ignored files.Santi2006-05-20
| | | | | Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'js/fetchconfig'Junio C Hamano2006-05-19
|\ | | | | | | | | | | * js/fetchconfig: Add a conversion tool to migrate remote information into the config fetch, pull: ask config for remote information
| * Add a conversion tool to migrate remote information into the configJohannes Schindelin2006-05-04
| | | | | | | | | | | | | | Use this tool to rewrite the .git/remotes/* files into the config. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * fetch, pull: ask config for remote informationJohannes Schindelin2006-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now you can say [remote.junio] url = git://git.kernel.org/pub/scm/git/git.git fetch = next:next in your .git/config. [jc: fixed up the log message that still said "pull" ] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix build procedure for builtin-init-dbJunio C Hamano2006-05-19
| | | | | | | | | | | | | | | | c3c8835fbb182d971d71939b9a3ec7c8b86d6caf broke the default template location which is in builtin-init-db.o, by not supplying the compilation-time constant to the right build commands. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/read-tree-safety'Junio C Hamano2006-05-19
|\ \ | | | | | | | | | | | | * jc/read-tree-safety: read-tree -m -u: do not overwrite or remove untracked working tree files.
| * | read-tree -m -u: do not overwrite or remove untracked working tree files.Junio C Hamano2006-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a merge results in a creation of a path that did not exist in HEAD, and if you already have that path on the working tree, because the index has not been told about the working tree file, read-tree happily removes it. The issue was brought up by Santi Béjar on the list. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/apply'Junio C Hamano2006-05-19
|\ \ \ | | | | | | | | | | | | | | | | * jc/apply: apply --cached: do not check newly added file in the working tree
| * | | apply --cached: do not check newly added file in the working treeJunio C Hamano2006-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --cached mode does not deal with the working tree, so we should not check it with lstat. An earlier code omitted the call to lstat but forgot to omit the check for the errno. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'eb/quilt'Junio C Hamano2006-05-19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * eb/quilt: Implement a --dry-run option to git-quiltimport Implement git-quiltimport
| * | | | Implement a --dry-run option to git-quiltimportEric W. Biederman2006-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since large quilt trees like -mm can easily have patches without clear authorship information, add a --dry-run option to make the problem patches easy to find. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Implement git-quiltimportEric W. Biederman2006-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Importing a quilt patch series into git is not very difficult but parsing the patch descriptions and all of the other minutia take a bit of effort to get right, so this automates it. Since git and quilt complement each other it makes sense to make it easy to go back and forth between the two. If a patch is encountered that it cannot derive the author from the user is asked. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'jc/grep'Junio C Hamano2006-05-19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/grep: Revert "builtin-grep: workaround for non GNU grep." builtin-grep: workaround for non GNU grep.
| * | | | | Revert "builtin-grep: workaround for non GNU grep."Junio C Hamano2006-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 518920b764ee9150781e68217181b24d0712748e commit. Linus has a more portable alternative.
| * | | | | builtin-grep: workaround for non GNU grep.Junio C Hamano2006-05-17
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some implementations do not know what to do with -H; define NO_H_OPTION_IN_GREP when you build git if your grep lacks -H. Most of the time, it can be worked around by prepending /dev/null to the argument list, but that causes -L and -c to slightly misbehave (they both expose /dev/null is given), so when these options are given, do not run external grep that does not understand -H. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'lt/grep'Junio C Hamano2006-05-19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/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.
| * | | | | builtin-grep: workaround for non GNU grep.Linus Torvalds2006-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of course, it still ignores the fact that not all grep's support some of the flags like -F/-L/-A/-C etc, but for those cases, the external grep itself will happily just say "unrecognized option -F" or similar. So with this change, "git grep" should handle all the flags the native grep handles, which is really quite fine. We don't _need_ to expose anything more, and if you do want our extensions, you can get them with "--uncached" and an up-to-date index. No configuration necessary, and we automatically take advantage of any native grep we have, if possible. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | Merge branch 'ew/pretty-fmt'Junio C Hamano2006-05-17
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ew/pretty-fmt: commit: allow --pretty= args to be abbreviated
| * \ \ \ \ \ Merge branch 'jc/apply'Junio C Hamano2006-05-17
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | / / | | | |_|/ / | | |/| | | | | | | | | | | | | | | * jc/apply: git-am: use apply --cached apply --cached: apply a patch without using working tree. apply --numstat: show new name, not old name.
| | * | | | git-am: use apply --cachedJunio C Hamano2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now 'git apply' can apply patch without working tree, preparation of pristine preimage and postimage trees that are done when falling back on 3-way merge by "git am" can do so without temporary files. Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | apply --cached: apply a patch without using working tree.Junio C Hamano2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new flag "--cached" takes the cached data, applies the patch and stores the result in the index, without using the working tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | apply --numstat: show new name, not old name.Junio C Hamano2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somehow --stat showed the new name but --numstat showed the old name for renamed/copied paths. Signed-off-by: Junio C Hamano <junkio@cox.net>