summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-11-02Stop using compat/regex.c on platforms with working regexp libraryLibravatar Junio C Hamano1-6/+0
We used to have non-POSIX comformant BRE in our code, and linked with GNU regexp library on a few platforms (Darwin, FreeBSD and AIX) to work it around. This was backwards. We've fixed the broken regexps to use ERE that native regexp libraries on these platforms can handle just fine. There is no need to link with GNU regexp library on these platforms anymore. Tested-on-AIX-by: Mike Ralphson <mike@abacus.co.uk> Tested-on-FreeBSD-by: Jeff King <peff@peff.net> Tested-on-Darwin-by: Arjen Laarhoven <arjen@yaph.org> Tested-on-Darwin-by: Pieter de Bie <pieter@frim.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02connect.c: add a way for git-daemon to pass an error back to clientLibravatar Tom Preston-Werner1-0/+3
The current behavior of git-daemon is to simply close the connection on any error condition. This leaves the client without any information as to the cause of the failed fetch/push/etc. This patch allows get_remote_heads to accept a line prefixed with "ERR" that it can display to the user in an informative fashion. Once clients can understand this ERR line, git-daemon can be made to properly report "repository not found", "permission denied", or other errors. Example S: ERR No matching repository. C: fatal: remote error: No matching repository. Signed-off-by: Tom Preston-Werner <tom@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Introduce receive.denyDeletesLibravatar Jan Krüger3-0/+27
Occasionally, it may be useful to prevent branches from getting deleted from a centralized repository, particularly when no administrative access to the server is available to undo it via reflog. It also makes receive.denyNonFastForwards more useful if it is used for access control since it prevents force-updating by deleting and re-creating a ref. Signed-off-by: Jan Krüger <jk@jk.gs> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Merge branch 'maint'Libravatar Junio C Hamano8-6/+74
* maint: Start 1.6.0.4 cycle add instructions on how to send patches to the mailing list with Gmail Documentation/gitattributes: Add subsection header for each attribute git send-email: avoid leaking directory file descriptors. send-pack: do not send out single-level refs such as refs/stash fix overlapping memcpy in normalize_absolute_path pack-objects: avoid reading uninitalized data correct cache_entry allocation Conflicts: RelNotes
2008-11-02Start 1.6.0.4 cycleLibravatar Junio C Hamano2-1/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01add instructions on how to send patches to the mailing list with GmailLibravatar Tom Preston-Werner1-0/+27
Gmail is one of the most popular email providers in the world. Now that Gmail supports IMAP, sending properly formatted patches via `git imap-send` is trivial. This section in SubmittingPatches explains how to do so. Signed-off-by: Tom Preston-Werner <tom@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01Documentation/gitattributes: Add subsection header for each attributeLibravatar Jakub Narebski1-0/+6
This makes attributes easier to find; before this patch some attributes had individual subsections, and some didn't. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01git send-email: avoid leaking directory file descriptors.Libravatar Pierre Habouzit1-2/+1
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01send-pack: do not send out single-level refs such as refs/stashLibravatar Jeff King1-1/+7
Since no version of receive-pack accepts these "funny refs", we should mirror the check when considering the list of refs to send. IOW, don't even make them eligible for matching or mirroring. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01fix overlapping memcpy in normalize_absolute_pathLibravatar Jeff King1-1/+1
The comments for normalize_absolute_path explicitly claim that the source and destination buffers may be the same (though they may not otherwise overlap). Thus the call to memcpy may involve copying overlapping data, and memmove should be used instead. This fixes a valgrind error in t1504. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01pack-objects: avoid reading uninitalized dataLibravatar Jeff King1-1/+2
In the main loop of find_deltas, we do: struct object_entry *entry = *list++; ... if (!*list_size) ... break Because we look at and increment *list _before_ the check of list_size, in the very last iteration of the loop we will look at uninitialized data, and increment the pointer beyond one past the end of the allocated space. Since we don't actually do anything with the data until after the check, this is not a problem in practice. But since it technically violates the C standard, and because it provokes a spurious valgrind warning, let's just move the initialization of entry to a safe place. This fixes valgrind errors in t5300, t5301, t5302, t303, and t9400. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01correct cache_entry allocationLibravatar Jeff King1-1/+1
Most cache_entry structs are allocated by using the cache_entry_size macro, which rounds the size of the struct up to the nearest multiple of 8 bytes (presumably to avoid memory fragmentation). There is one exception: the special "conflict entry" is allocated with an empty name, and so is explicitly given just one extra byte to hold the NUL. However, later code doesn't realize that this particular struct has been allocated differently, and happily tries reading and copying it based on the ce_size macro, which assumes the 8-byte alignment. This can lead to reading uninitalized data, though since that data is simply padding, there shouldn't be any problem as a result. Still, it makes sense to hold the padding assumption so as not to surprise later maintainers. This fixes valgrind errors in t1005, t3030, t4002, and t4114. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-01Merge git://repo.or.cz/git-guiLibravatar Junio C Hamano17-190/+1080
* git://repo.or.cz/git-gui: (27 commits) git-gui: Update German translation. git-gui: Do not munge conflict marker lines in a normal diff git-gui: Add a simple implementation of SSH_ASKPASS. git-gui: Add a dialog that shows the OpenSSH public key. git-gui: Mark-up strings in show_{other,unmerged}_diff() for localization git-gui: Show a round number of bytes of large untracked text files git-gui: Fix the blame viewer destroy handler. git-gui: Add a search command to the blame viewer. git-gui: Fix the blame window shape. git-gui: Fix switch statement in lib/merge.tcl git-gui: Fix fetching from remotes when adding them git-gui: Fix removing non-pushable remotes git-gui: Make input boxes in init/clone/open dialogs consistent git-gui: Avoid using the term URL when specifying repositories git-gui: gui.autoexplore makes explorer to pop up automatically after picking git-gui: Add Explore Working Copy to the Repository menu git-gui: Use git web--browser for web browsing git-gui: mkdir -p when initializing new remote repository git-gui: Add support for removing remotes git-gui: Add support for adding remotes ...
2008-11-01Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano1-1/+1
* 'maint' of git://repo.or.cz/git-gui: git-gui: Help identify aspell version on Windows too
2008-11-01git-gui: Update German translation.Libravatar Christian Stimming1-46/+233
Not yet completed, though. Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-01git-gui: Do not munge conflict marker lines in a normal diffLibravatar Johannes Sixt1-1/+0
Previously, conflict markers were highlighted in two ways: (1) They received a distinguishing color; and (2) they had the '+' removed at the beginning of the line. However, by doing (2), a hunk that contained conflict markers could not be staged or unstaged because the resulting patch was corrupted. With this change we no longer modify the diff text of a 2-way diff, so that "Stage Hunk" and friends work. Note that 3-way diff of a conflicted file is unaffected by this change, and '++' before conflict markers is still removed. But this has no negative impact because in this mode staging hunks or lines is disabled anyway. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-01git-gui: Add a simple implementation of SSH_ASKPASS.Libravatar Alexander Gavrilov3-0/+73
OpenSSH allows specifying an external program to use for direct user interaction. While most Linux systems already have such programs, some environments, for instance, msysgit, lack it. This patch adds a simple fallback Tcl implementation of the tool. In msysgit it is also necessary to set a fake value of the DISPLAY variable, because otherwise ssh won't even try to use SSH_ASKPASS handlers. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-01git-gui: Add a dialog that shows the OpenSSH public key.Libravatar Alexander Gavrilov2-0/+130
Generating a new SSH key or finding an existing one may be a difficult task for non-technical users, especially on Windows. This commit adds a new dialog that shows the public key, or allows the user to generate a new one if none were found. Since this is a convenience/informational feature for new users, and the dialog is mostly read-only, it is located in the Help menu. The command line used to invoke ssh-keygen is designed to force it to use SSH_ASKPASS if available, or accept empty passphrases, but _never_ wait for user response on the tty. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-31Merge branch 'maint'Libravatar Junio C Hamano8-27/+99
* maint: git-svn: change dashed git-commit-tree to git commit-tree Documentation: clarify information about 'ident' attribute bash completion: add doubledash to "git show" Use test-chmtime -v instead of perl in t5000 to get mtime of a file Add --verbose|-v to test-chmtime asciidoc: add minor workaround to add an empty line after code blocks Plug a memleak in builtin-revert Add file delete/create info when we overflow rename_limit Install git-cvsserver in $(bindir) Install git-shell in bindir, too
2008-10-31git-svn: change dashed git-commit-tree to git commit-treeLibravatar Deskin Miller1-1/+1
Signed-off-by: Deskin Miller <deskinm@umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-31Documentation: clarify information about 'ident' attributeLibravatar Jan Krüger1-2/+2
The documentation spoke of the attribute being set "to" a path; this can mistakenly be interpreted as "the attribute needs to have its value set to some kind of path". This clarifies things. Signed-off-by: Jan Krüger <jk@jk.gs> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-31bash completion: add doubledash to "git show"Libravatar Markus Heidelberg1-0/+2
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-31Use test-chmtime -v instead of perl in t5000 to get mtime of a fileLibravatar Alex Riesen1-1/+1
The test was broken on admittedly broken combination of Windows, Cygwin, and ActiveState Perl. Signed-off-by: Alex Riesen <ariesen@harmanbecker.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-31Add --verbose|-v to test-chmtimeLibravatar Alex Riesen1-21/+70
This allows us replace perl when getting the mtime of a file because of time zone conversions, though at the moment only one platform which does this has been identified: Cygwin when used with ActiveState Perl (as usual). The output format is: <mtime1> TAB <filename1> <LF> <mtime2> TAB <filename2> <LF> ... which, if only mtime is needed can be parsed with cut(1): test-chmtime -v +0 filename1 | cut -f 1 Also, the change adds a description of programs features, with examples. Signed-off-by: Alex Riesen <ariesen@harmanbecker.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30asciidoc: add minor workaround to add an empty line after code blocksLibravatar Jonas Fonseca1-0/+20
Insert an empty <simpara> in manpages after code blocks to force and empty line. The problem can be seen on the manpage for the git tutorial, where an example command and the following paragraph is printed with no empty line between them: First, note that you can get documentation for a command such as git log --graph with: $ man git-log It is a good idea to introduce yourself to git [...] Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30Plug a memleak in builtin-revertLibravatar Alex Riesen1-1/+2
Probably happened when working around git_path's problem with returned buffer being reused. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-28compat/cygwin.c: make runtime detection of lstat/stat lessor impactLibravatar Junio C Hamano1-7/+13
The original patch that lead to an earlier commit adbc0b6 (cygwin: Use native Win32 API for stat, 2008-09-30) did not call git_default_config() and it was a good thing. The lazy config reading when lstat/stat is called for the first time to find out if core.filemode is set can happen anytime in the calling program. If it happens after the calling program parsed the configuration file to prime its default parameter settings and processed its command line parameters to tweak them, this will overwrite the values set by the program with the values read from the config file. This essentially reverts the code to the version as submitted by Mark, with a bit more comments to clarify why we do not fall back on the default configuration parser from git_cygwin_config(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-28Add file delete/create info when we overflow rename_limitLibravatar Linus Torvalds1-1/+1
When we refuse to do rename detection due to having too many files created or deleted, let the user know the numbers. That way there is a reasonable starting point for setting the diff.renamelimit option. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-28Install git-cvsserver in $(bindir)Libravatar Nanako Shiraishi1-1/+1
It is one of the server side programs and needs to be found on usual $PATH. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-28Install git-shell in bindir, tooLibravatar Tommi Virtanen1-1/+1
/etc/passwd shell field must be something execable, you can't enter "/usr/bin/git shell" there. git-shell must be present as a separate executable, or it is useless. Signed-off-by: Tommi Virtanen <tv@eagain.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-26Merge branch 'maint'Libravatar Junio C Hamano5-5/+31
* maint: add -p: warn if only binary changes present git-archive: work in bare repos git-svn: change dashed git-config to git config
2008-10-26add -p: warn if only binary changes presentLibravatar Thomas Rast1-2/+7
Current 'git add -p' will say "No changes." if there are no changes to text files, which can be confusing if there _are_ changes to binary files. Add some code to distinguish the two cases, and give a different message in the latter one. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-26git-archive: work in bare reposLibravatar Charles Bailey3-2/+23
This moves the call to git_config to a place where it doesn't break the logic for using git archive in a bare repository but retains the fix to make git archive respect core.autocrlf. Tests are by René Scharfe. Signed-off-by: Charles Bailey <charles@hashpling.org> Tested-by: Deskin Miller <deskinm@umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-26receive-pack: fix "borrowing from alternate object store" implementationLibravatar Junio C Hamano1-2/+7
In the alternate_object_database structure, ent->base[] is a buffer the users can use to form pathnames to loose objects, and ent->name is a pointer into that buffer (it points at one beyond ".git/objects/"). If you get a call to add_refs_from_alternate() after somebody used the entry (has_loose_object() has been called, for example), *ent->name would not be NUL, and ent->base[] won't be the path to the object store. This caller is expecting to read the path to the object store in ent->base[]; it needs to NUL terminate the buffer if it wants to. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-24git-daemon: set REMOTE_ADDR to client addressLibravatar Joey Hess2-0/+13
This allows hooks like pre-receive to look at the client's IP address. Of course the IP address can't be used to get strong security; git-daemon isn't the right thing to use if you need that. However, basic IP address checking can be good enough in some situations. REMOTE_ADDR is the same environment variable used to communicate the client's address to CGI scripts. Signed-off-by: Joey Hess <joey@kitenet.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-24git-svn: change dashed git-config to git configLibravatar Deskin Miller1-1/+1
Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-22submodule: fix some non-portable grep invocationsLibravatar Jeff King1-2/+2
Not all greps support "-e", but in this case we can easily convert it to a single extended regex. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-22git-remote: list branches in vertical listsLibravatar Johannes Sixt3-12/+17
Previously, branches were listed on a single line in each section. But if there are many branches, then horizontal, line-wrapped lists are very inconvenient to scan for a human. This makes the lists vertical, i.e one branch per line is printed. Since "git remote" is porcelain, we can easily make this backwards-incompatible change. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-22rm: loosen safety valve for empty filesLibravatar Jeff King4-2/+17
If a file is different between the working tree copy, the index, and the HEAD, then we do not allow it to be deleted without --force. However, this is overly tight in the face of "git add --intent-to-add": $ git add --intent-to-add file $ : oops, I don't actually want to stage that yet $ git rm --cached file error: 'empty' has staged content different from both the file and the HEAD (use -f to force removal) $ git rm -f --cached file Unfortunately, there is currently no way to distinguish between an empty file that has been added and an "intent to add" file. The ideal behavior would be to disallow the former while allowing the latter. This patch loosens the safety valve to allow the deletion only if we are deleting the cached entry and the cached content is empty. This covers the intent-to-add situation, and assumes there is little harm in not protecting users who have legitimately added an empty file. In many cases, the file will still be empty, in which case the safety valve does not trigger anyway (since the content remains untouched in the working tree). Otherwise, we do remove the fact that no content was staged, but given that the content is by definition empty, it is not terribly difficult for a user to recreate it. However, we still document the desired behavior in the form of two tests. One checks the correct removal of an intent-to-add file. The other checks that we still disallow removal of empty files, but is marked as expect_failure to indicate this compromise. If the intent-to-add feature is ever extended to differentiate between normal empty files and intent-to-add files, then the safety valve can be re-tightened. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-21Merge branch 'jk/diff-convfilter'Libravatar Junio C Hamano6-247/+290
* jk/diff-convfilter: diff: add filter for converting binary to text diff: introduce diff.<driver>.binary diff: unify external diff and funcname parsing code t4012: use test_cmp instead of cmp
2008-10-21Merge branch 'js/maint-fetch-update-head'Libravatar Junio C Hamano7-5/+44
* js/maint-fetch-update-head: pull: allow "git pull origin $something:$current_branch" into an unborn branch Fix fetch/pull when run without --update-head-ok Conflicts: t/t5510-fetch.sh
2008-10-21Merge branch 'jc/maint-co-track'Libravatar Junio C Hamano12-29/+62
* jc/maint-co-track: Enhance hold_lock_file_for_{update,append}() API demonstrate breakage of detached checkout with symbolic link HEAD Fix "checkout --track -b newbranch" on detached HEAD Conflicts: builtin-commit.c
2008-10-21Merge branch 'rs/alloc-ref'Libravatar Junio C Hamano7-43/+30
* rs/alloc-ref: make alloc_ref_from_str() the new alloc_ref() use alloc_ref_from_str() everywhere add alloc_ref_with_prefix()
2008-10-21Merge branch 'jk/fix-ls-files-other'Libravatar Junio C Hamano5-44/+39
* jk/fix-ls-files-other: refactor handling of "other" files in ls-files and status
2008-10-21Merge branch 'jc/maint-reset-remove-unmerged-new'Libravatar Junio C Hamano2-13/+78
* jc/maint-reset-remove-unmerged-new: reset --hard/read-tree --reset -u: remove unmerged new paths
2008-10-21Merge branch 'maint'Libravatar Junio C Hamano3-12/+35
* maint: GIT 1.6.0.3 rehabilitate 'git index-pack' inside the object store
2008-10-21GIT 1.6.0.3Libravatar Junio C Hamano1-9/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-21rehabilitate 'git index-pack' inside the object storeLibravatar Nicolas Pitre2-3/+29
Before commit d0b92a3f6e it was possible to run 'git index-pack' directly in the .git/objects/pack/ directory. Restore that ability. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-20Merge branch 'maint'Libravatar Junio C Hamano1-4/+6
* maint: Fix testcase failure when extended attributes are in use
2008-10-20workflows documentation: fix link to git-request-pull[1]Libravatar Lee Marlow1-1/+1
Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>