summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-06-13git-svn: cleanup: factor out longest_common_path() functionLibravatar Eric Wong1-5/+11
I hadn't looked at this code in a while and had to read this again to figure out what it did. To avoid having to do this again in the future, I just gave gave the hunk a descriptive name. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13gitview: run blame with -C -CLibravatar Aneesh Kumar K.V1-1/+1
pass -C -C option to git-blame so that blame browsing works when the data is copied over from other files. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13gitview: Fix the blame interface.Libravatar Aneesh Kumar K.V1-1/+18
The async reading from the pipe was skipping some of the input lines. Fix the same by making sure that we add the partial content of the previous read to the newly read data. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13More staticLibravatar Junio C Hamano8-64/+6
There still are quite a few symbols that ought to be static. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13-Wold-style-definition fixLibravatar Junio C Hamano3-3/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13Makefile: allow generating git.o for debugging purposesLibravatar Junio C Hamano1-2/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13Makefile: common-cmds.h depends on generate-cmdlist.sh scriptLibravatar Junio C Hamano1-0/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13Merge branch 'jc/blame' (early part)Libravatar Junio C Hamano2-7/+16
* 'jc/blame' (early part): git-blame -w: ignore whitespace git-blame: do not indent with spaces.
2007-06-12refactor dir_add_nameLibravatar Jeff King2-11/+25
This is in preparation for keeping two entry lists in the dir object. This patch adds and uses the ALLOC_GROW() macro, which implements the commonly used idiom of growing a dynamic array using the alloc_nr function (not just in dir.c, but everywhere). We also move creation of a dir_entry to dir_entry_new. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12git-remote show: Also shorten non-fast-forward refs in the 'push' listingLibravatar Johannes Sixt1-0/+1
'git-remote show remote-name' lists the refs that are pushed to the remote by showing the 'Push' line from the config file. But before showing it, it shortened 'refs/heads/here:refs/heads/there' to 'here:there'. However, if the Push line is prefixed with a plus, the ref was not shortened. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12gitweb: change filename/directory name of snapshotsLibravatar Matthias Lederhofer1-1/+3
/.git or .git is removed from the project name and the basename of the remaining path is used as the beginning of the filename and as the directory in the archive. The regexp will actually not strip off /.git or .git if there wouldn't be anything left after removing it. Currently the full project name is used as directory in the archive and the basename is used as filename. For example a repository named foo/bar/.git will have a archive named .git-<version>.* and extract to foo/bar/.git. With this patch the file is named bar-<version>.* and extracts to bar. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Don't dereference a strdup-returned NULLLibravatar Jim Meyering1-1/+1
There are only a dozen or so uses of strdup in all of git. Of those, most seem ok, but this one isn't: Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Merge branch 'maint'Libravatar Junio C Hamano0-0/+0
* maint:
2007-06-12Merge branch 'aw/cvs'Libravatar Junio C Hamano2-21/+42
* aw/cvs: cvsimport: add <remote>/HEAD reference in separate remotes more cvsimport: update documentation to include separate remotes option cvsimport: add support for new style remote layout
2007-06-12Merge branch 'ep/cvstag'Libravatar Junio C Hamano1-23/+1
* ep/cvstag: Use git-tag in git-cvsimport
2007-06-12Merge branch 'ar/clone' into maintLibravatar Junio C Hamano2-1/+47
* ar/clone: Fix clone to setup the origin if its name ends with .git
2007-06-12Merge branch 'sv/objfixes' into maintLibravatar Junio C Hamano2-1/+9
* sv/objfixes: Don't assume tree entries that are not dirs are blobs
2007-06-12Teach diff to imply --find-copies-harder upon -C -CLibravatar Johannes Schindelin2-3/+6
Earlier, a second "-C" on the command line had no effect. But "--find-copies-harder" is so long to type, let's make doubled -C enable that option. It is in line with how "git blame" handles such doubled options to mean "work harder". Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Remove trailing slash from $(template_dir).Libravatar Johannes Sixt3-3/+3
All the other directory location variables do not have the trailing slash. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Avoid double-slash in path names that depend on $(sharedir).Libravatar Johannes Sixt1-1/+1
Recent git-gui has the ability to determine the location of its library files relative to the --exec-dir. Its Makefile enables this capability depending on the install paths that are specified. However, without this fix there is an extra slash in a path specification, so that the Makefile does not recognize the equivalence of two paths that it compares. A side-effect is that all "standard" builds (which do not set $(sharedir) explicitly) now exploit above mentioned gut-gui feature. Another side-effect is that an ugly compiled-in double-slash in $(template_dir) is avoided. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Merge branch 'lh/submodule'Libravatar Junio C Hamano3-59/+78
* lh/submodule: git-submodule: clone during update, not during init git-submodule: move cloning into a separate function
2007-06-12Merge branch 'maint'Libravatar Junio C Hamano3-1/+7
* maint: Unquote From line from patch before comparing with given from address. git-cherry: Document 'limit' command-line option
2007-06-12Merge branch 'master' of git://repo.or.cz/git-guiLibravatar Junio C Hamano8-12/+28
* 'master' of git://repo.or.cz/git-gui: git-gui: Save geometry before the window layout is damaged git-gui: Give amend precedence to HEAD over MERGE_MSG git-gui: Include 'war on whitespace' fixes from git.git
2007-06-12Unquote From line from patch before comparing with given from address.Libravatar Kristian Høgsberg1-1/+2
This makes --suppress-from actually work when you're unfortunate enough to have non-ASCII in your name. Also, if there's a match use the optionally RFC2047 quoted version from the email. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12git-cherry: Document 'limit' command-line optionLibravatar Luiz Fernando N. Capitulino1-0/+3
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano7-13/+28
* 'maint' of git://repo.or.cz/git-gui: git-gui: Save geometry before the window layout is damaged git-gui: Give amend precedence to HEAD over MERGE_MSG git-gui: Include 'war on whitespace' fixes from git.git
2007-06-11Merge branch 'maint'Libravatar Shawn O. Pearce8-12/+28
* maint: git-gui: Save geometry before the window layout is damaged git-gui: Give amend precedence to HEAD over MERGE_MSG
2007-06-11git-gui: Save geometry before the window layout is damagedLibravatar Shawn O. Pearce6-9/+26
Because Tk does not assure us the order that it will process children in before it destroys the main toplevel we cannot safely save our geometry data during a "bind . <Destroy>" event binding. The geometry may have already changed as a result of a one or more children being removed from the layout. This was pointed out in gitk by Mark Levedahl, and patched over there by commit b6047c5a8166a71e01c6b63ebbb67c6894d95114. So we now also use "wm protocol . WM_DELETE_WINDOW" to detect when the window is closed by the user, and forward that close event to our main do_quit routine. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-11git-gui: Give amend precedence to HEAD over MERGE_MSGLibravatar Shawn O. Pearce1-1/+2
Apparently git-commit.sh (the command line commit user interface in core Git) always gives precedence to the prior commit's message if `commit --amend` is used and a $GIT_DIR/MERGE_MSG file also exists. We actually were doing the same here in git-gui, but the amended message got lost if $GIT_DIR/MERGE_MSG already existed because we started a rescan immediately after loading the prior commit's body into the edit buffer. When that happened the rescan found MERGE_MSG existed and replaced the commit message buffer with the contents of that file. This meant the user never saw us pick up the commit message of the prior commit we are about to replace. Johannes Sixt <J.Sixt@eudaptics.com> found this bug in git-gui by running `git cherry-pick -n $someid` and then trying to amend the prior commit in git-gui, thus combining the contents of $someid with the contents of HEAD, and reusing the commit message of HEAD, not $someid. With the recent changes to make cherry-pick use the $GIT_DIR/MERGE_MSG file Johannes saw git-gui pick up the message of $someid, not HEAD. Now we always use HEAD if we are amending. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-11Merge branch 'maint'Libravatar Shawn O. Pearce2-3/+0
* maint: git-gui: Include 'war on whitespace' fixes from git.git
2007-06-11git-gui: Include 'war on whitespace' fixes from git.gitLibravatar Shawn O. Pearce2-3/+0
Earlier git.git applied a large "war on whitespace" patch that was created using 'apply --whitespace=strip'. Unfortunately a few of git-gui's own files got caught in the mix and were also cleaned up. That was a6080a0a44d5ead84db3dabbbc80e82df838533d. This patch is needed in git-gui.git to reapply those exact same changes here, otherwise our version generator script is unable to obtain our version number from git-describe when we are hosted in the git.git repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-11Merge branch 'master' of git://repo.or.cz/git-guiLibravatar Junio C Hamano7-52/+601
* 'master' of git://repo.or.cz/git-gui: git-gui: Internalize symbolic-ref HEAD reading logic git-gui: Expose the merge.diffstat configuration option git-gui: Allow users to delete remote branches git-gui: Allow users to rename branches through 'branch -m' git-gui: Disable tearoff menus on Windows, Mac OS X git-gui: Provide fatal error if library is unavailable git-gui: Enable verbose Tcl loading earlier git-gui: Show the git-gui library path in 'About git-gui' git-gui: GUI support for running 'git remote prune <name>' git gui 0.8.0
2007-06-11Merge branch 'maint'Libravatar Junio C Hamano5-219/+825
* maint: (46 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2007-06-11Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano5-219/+825
* 'maint' of git://repo.or.cz/git-gui: (46 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2007-06-11Merge branch 'maint'Libravatar Shawn O. Pearce3-196/+786
* maint: (38 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2007-06-10gitweb: '--cc' for merges in 'commitdiff' viewLibravatar Jakub Narebski1-12/+99
Allow choosing between '-c' (combined diff) and '--cc' (compact combined) diff format in 'commitdiff' view for merge (multiparent) commits. Default is now '--cc'. In the bottom part of navigation bar there is link allowing to change diff format: "combined" for '-c' (when using '--cc') and "compact" for '--cc' (when using '-c'), just on the right of "raw" link to 'commitdiff_plain" view. About patchset part of diff --cc output: the difftree (whatchanged table) has "patch" links to anchors to individual patches (on the same page). The --cc option further compresses the patch output by omitting some hunks; when this optimization makes all hunks disappear, the patch is not shown (like in any other "empty diff" case). But the fact that patch has been simplified out is not reflected in the raw (difftree) part of diff output; the raw part is the same for '-c' and '--cc' options. As correcting difftree is rather out of the question, as it would require scanning patchset part before writing out difftree, we add "Simple merge" empty diffs as a place to have anchor to in place of those simplified out and removed patches. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10gitweb: Add links to blobdiffs in from-file/to-file header for mergesLibravatar Jakub Narebski1-3/+14
Add links to diff to file ('blobdiff' view) for each of individual versions of the file in a merge commit to the from-file/to-file header in the patch part of combined 'commitdiff' view for merges. The from-file/to-file header for combined diff now looks like: --- _1_/_git-gui/git-gui.sh_ --- _2_/_git-gui.sh_ +++ b/_git-gui/git-gui.sh_ where _<filename>_ link is link to appropriate version of a file ('blob' view), and _<n>_ is link to respective diff to mentioned version of a file ('blobdiff' view). There is even hint provided in the form of title attribute. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10gitweb: Create special from-file/to-file header for combined diffLibravatar Jakub Narebski1-11/+27
Instead of using default, diff(1) like from-file/to-file header for combined diff (for a merge commit), which looks like: --- a/git-gui/git-gui.sh +++ b/_git-gui/git-gui.sh_ (where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file header, using "--- <n>/_<filename>_" for each of parents, e.g.: --- 1/_git-gui/git-gui.sh_ --- 2/_git-gui.sh_ +++ b/_git-gui/git-gui.sh_ Test it on one of merge commits involving rename, e.g. 95f97567c1887d77f3a46b42d8622c76414d964d (rename at top) 5bac4a671907604b5fb4e24ff682d5b0e8431931 (file from one branch) This is mainly meant to easier see renames in a merge commit. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10gitweb: Split git_patchset_body into separate subroutinesLibravatar Jakub Narebski1-111/+202
This commit makes git_patchset_body easier to read, and reduces level of nesting and indent level. It adds more lines that it removes because of extra parameter passing in subroutines, and subroutine calls in git_patchset_body. Also because there are few added comments. Below there are descriptions of all split-off subroutines: Separate formatting "git diff" header into format_git_diff_header_line. While at it fix it so it always escapes pathname. It would be even more useful if we decide to use `--cc' for merges, and need to generate by hand empty patches for anchors. Separate formatting extended (git) diff header lines into format_extended_diff_header_line. This one is copied without changes. Separate formatting two-lines from-file/to-file diff header into format_diff_from_to_header subroutine. While at it fix it so it always escapes pathname. Beware calling convention: it takes _two_ lines. Separate generating %from and %to hashes (with info used among others to generate hyperlinks) into parse_from_to_diffinfo subroutine. This one is copied without changes. Separate checking if file was deleted (and among others therefore does not have link to the result file) into is_deleted subroutine. This would allow us to easily change the algotithm to find if file is_deleted in the result. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10gitweb: Improve "next" link in commitdiff viewLibravatar Jakub Narebski1-1/+8
Check if 'hp' (hash_parent) parameter to 'commitdiff' view is one of 'h' (hash) commit parents, i.e. if commitdiff is of the form "<commit>^<n> <commit>", and mark it as such in the bottom part of navigation bar. The "next" link in commitdiff view was introduced in commit 151602df00b8e5c5b4a8193f59a94b85f9b5aebc If 'hb' is n-th parent of 'h', show the following at the bottom of navigation bar: (from parent n: _commit_) Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10gitweb: Provide links to commitdiff to each parent in 'commitdiff' viewLibravatar Jakub Narebski2-0/+26
Since commit-fb1dde4a we show combined diff for merges in 'commitdiff' view, and since commit-208ecb2e also in 'commit' view. Sometimes though one would want to see diff to one of merge commit parents. It is easy in 'commit' view: in the commit header part there are "diff" links for each of parent header. This commit adds such links also for 'commitdiff' view. Add to difftree / whatchanged table row with "1", "2", ... links to 'commitdiff' view for diff with n-th parent for merge commits, as a table header. This is visible only in 'comitdiff' view, and only for a merge commit (comit with more than one parent). To save space links are shown as "n", where "n" is number of a parent, and not as for example shortened (to 7 characters) sha1 of a parent commit. To make it easier to discover what links is for, each link has 'title' attribute explaining the link. Note that one would need to remember that difftree table in 'commit' view has one less column (it doesn't have "patch" link column), if one would want to add such table header also in 'commit' view. Example output: 1 2 3 Makefile patch | diff1 | diff2 | diff3 | blob | history cache.h patch | diff1 | diff2 | diff3 | blob | history Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10Merge branch 'maint'Libravatar Junio C Hamano2-8/+13
* maint: tutorial: use "project history" instead of "changelog" in header Documentation: user-manual todo user-manual: add a missing section ID Fix typo in remote branch example in git user manual user-manual: quick-start updates
2007-06-10mktag: minimally update the description.Libravatar Junio C Hamano1-7/+7
It lacked a description for the (historically) optional tagger header line. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10Makefile: add an explicit rule for building assembly outputLibravatar Linus Torvalds2-1/+3
In the kernel we have a rule for *.c -> *.s files exactly because it's nice to be able to easily say "ok, what does that generate". Here's a patch to add such a rule to git too, in case anybody is interested. It makes it much simpler to just do make sha1_file.s and look at the compiler-generated output that way, rather than having to fire up gdb on the resulting binary. (Add -fverbose-asm or something if you want to, it can make the result even more readable) [jc: add *.s to .gitignore] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-10tutorial: use "project history" instead of "changelog" in headerLibravatar J. Bruce Fields1-2/+2
The word "changelog" seems a little too much like jargon to me, and beginners must understand section headers so they know where to look for help. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-06-10Documentation: user-manual todoLibravatar J. Bruce Fields1-0/+4
Some more user-manual todo's: how to share objects between repositories, how to recover. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-06-10user-manual: add a missing section IDLibravatar J. Bruce Fields1-0/+1
I forgot to give an ID for this section. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-06-10Fix typo in remote branch example in git user manualLibravatar Gerrit Pape1-1/+1
In Documentation/user-manual.txt the example $ git checkout --track -b origin/maint maint under "Getting updates with git pull", should read $ git checkout --track -b maint origin/maint This was noticed by Ron, and reported through http://bugs.debian.org/427502 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-06-10user-manual: quick-start updatesLibravatar J. Bruce Fields1-5/+5
Update text to reflect new position in appendix. Update the name to reflect the fact that this is closer to reference than tutorial documentation (as suggested by Jonas Fonseca). Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-06-10git-mergetool: Make default selection of merge-tool more intelligentLibravatar Theodore Ts'o1-17/+29
Make git-mergetool prefer meld under GNOME, and kdiff3 under KDE. When considering emerge and vimdiff, check $VISUAL and $EDITOR to see which the user might prefer. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Josh Triplett <josh@freedesktop.org>