summaryrefslogtreecommitdiff
path: root/builtin-log.c
AgeCommit message (Collapse)Author
2006-06-17gitweb.cgi history not shownLinus Torvalds
This does: - add a "rev.simplify_history" flag which defaults to on - it turns it off for "git whatchanged" (which thus now has real semantics outside of "git log") - it adds a command line flag ("--full-history") to turn it off for others (ie you can make "git log" and "gitk" etc get the semantics if you want to. Now, just as an example of _why_ you really really really want to simplify history by default, apply this patch, install it, and try these two command lines: gitk --full-history -- git.c gitk -- git.c and compare the output. So with this, you can also now do git whatchanged -p -- gitweb.cgi git log -p --full-history -- gitweb.cgi and it will show the old history of gitweb.cgi, even though it's not relevant to the _current_ state of the name "gitweb.cgi" NOTE NOTE NOTE! It will still actually simplify away merges that didn't change anything at all into either child. That creates these bogus strange discontinuities if you look at it with "gitk" (look at the --full-history gitk output for git.c, and you'll see a few strange cases). So the whole "--parent" thing ends up somewhat bogus with --full-history because of this, but I'm not sure it's worth even worrying about. I don't think you'd ever want to really use "--full-history" with the graphical representation, I just give it as an example exactly to show _why_ doing so would be insane. I think this is trivial enough and useful enough to be worth merging into the stable branch. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Implement safe_strncpy() as strlcpy() and use it more.Peter Eriksen
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-06git-format-patch: add --output-directory long option againJunio C Hamano
Additionally notices and complains to an -o option without directory or a duplicated -o option, -o and --stdout given together. Also delays the creation of directory until all arguments are parsed, so that the command does not leave an empty directory behind when it exits after seeing an unrelated invalid option. [jc: originally from Dennis Stosberg but with minor fixes, and documentation updates from Dennis.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-02format-patch: resurrect extra headers from configJohannes Schindelin
Once again, if you have [format] headers = "Origamization: EvilEmpire\n" format-patch will add these headers just after the "Subject:" line. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-31format-patch --signoffJunio C Hamano
This resurrects --signoff option to format-patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-28format-patch: -n and -k are mutually exclusive.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-26built-in format-patch: various fixups.Junio C Hamano
- The --start-number handling introduced breakage in the normal code path. It started numbering at 0 when not --numbered, for example. - When generating one file per patch, we needlessly added an extra blank line in front for second and subsequent files. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-26git-format-patch --start-number <n>Johannes Schindelin
Since the "a..b c..d" syntax is interpreted as "b ^a d ^c" as other range-ish commands, if you want to format a..b and then c..d and end up with files consecutively numbered, the second run needs to be able to tell the command what number to start from. This does not imply --numbered (which gives [PATCH n/m] to the subject). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21fmt-patch: Support --attachJohannes Schindelin
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-21Merge branch 'master' into js/fmt-patchJunio C Hamano
* 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-19Allow pickaxe and diff-filter options to be used by git log.Sean
Handle the -S option when passed to git log such that only the appropriate commits are displayed. Also per Junio's comments, do the same for "--diff-filter", so that it too can be used as an option to git log. By default no patch or diff information is displayed. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-06fmt-patch: understand old <his> notationJohannes Schindelin
When calling "git fmt-patch HEAD~5", you now get the same as if you would have said "git fmt-patch HEAD~5..". This makes it easier for my fingers which are so used to the old syntax. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05Teach fmt-patch about --keep-subjectJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05Teach fmt-patch about --numberedJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05fmt-patch: implement -o <dir>Johannes Schindelin
I had to move the command line parsing around a little; setup_revisions() could mistaken <dir> for a valid ref. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05fmt-patch: output file names to stdoutJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05Teach fmt-patch to write individual files.Johannes Schindelin
When called with "--stdout", it still writes to standard output. Notable differences to git-format-patch: - since fmt-patch uses the standardized logging machinery, it is no longer "From nobody", but "From <commit_sha1>", - the empty lines before and after the "---" just before the diffstat are no longer there, - git-format-patch outputs the commit_sha1 just before the first diff, which fmt-patch does not, - the file names are no longer output to stdout, but to stderr (since stdout is freopen()ed all the time), and - "git fmt-patch HEAD^" does not work as expected: it outputs *all* commits reachable from HEAD^! The last one is possibly a showstopper. At least I used to call that command quite often... Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-21Merge branch 'master' into jc/fmt-patchJunio C Hamano
* master: Split up builtin commands into separate files from git.c git-log produces no output fix pack-object buffer size mailinfo: decode underscore used in "Q" encoding properly. Reintroduce svn pools to solve the memory leak. pack-objects: do not stop at object that is "too small" git-commit --amend: two fixes. get_tree_entry(): make it available from tree-walk sha1_name.c: no need to include diff.h; tree-walk.h will do. sha1_name.c: prepare to make get_tree_entry() reusable from others. get_sha1() shorthands for blob/tree objects pre-commit hook: complain about conflict markers. git-merge: a bit more readable user guidance. diff: move diff.c to diff-lib.c to make room. git log: don't do merge diffs by default Allow "git repack" users to specify repacking window/depth Document git-clone --reference Fix filename scaling for binary files Fix uninteresting tags in new revision parsing Conflicts: Adjusted the addition of fmt-patch to match the recent split from git.c to builtin.log.c.
2006-04-21Split up builtin commands into separate files from git.cLinus Torvalds
Right now it split it into "builtin-log.c" for log-related commands ("log", "show" and "whatchanged"), and "builtin-help.c" for the informational commands (usage printing and "help" and "version"). This just makes things easier to read, I find. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>