summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-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>
2008-10-20bash completion: Add 'workflows' to 'git help'Libravatar Lee Marlow1-0/+1
Completion for new workflow documentation introduced in f948dd8 Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-20Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano5-1067/+1340
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Turn short SHA1 names into links too gitk: Regenerate .po files gitk: New way of constructing menus that allows for Alt+letter accelerators gitk: Bind Key-Return to create on new branch dialog gitk: Fix binding for <Return> in sha1 entry field gitk: Clean up file encoding code and add enable/disable option gitk: Implement batch lookup and caching of encoding attrs gitk: Enhance file encoding support gitk: Add untranslated error messages to translation gitk: Fix a bug in collapsing deeply nested trees gitk: Use <Button-2> for context menus on OSX
2008-10-20document "intent to add" option to git-addLibravatar Jeff King1-2/+11
This was added by 3942581 but never documented. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-21gitk: Turn short SHA1 names into links tooLibravatar Paul Mackerras1-30/+77
This changes the link detection logic to accept strings of between 6 and 40 hex characters as a possible SHA1 ID of another commit, rather than insisting on seeing the full 40 hex characters. To make the logic that turns a possible link into an actual link work with abbreviated IDs, this changes the way the commitinterest array is used, and puts the code that deals with it in a pair of new functions. The commitinterest array is now indexed by just the first 4 characters of the interesting SHA1 ID, and each element is a list of id + command pairs. This also pulls out the logic for expanding an abbreviated SHA1 to the list of matching full IDs into its own function (the way it is done is still the same slow way it was done before, which should be improved some day). This also fixes the bug where clicking on a link would take you to the wrong commit if the line number of the target had changed since the link was made. This is based on a patch by Linus Torvalds, but totally rewritten by me. Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-10-19Fix testcase failure when extended attributes are in useLibravatar Junio C Hamano1-4/+6
06cbe855 (Make core.sharedRepository more generic, 2008-04-16) made several testcases in t1301-shared-repo.sh which fail if on a system which creates files with extended attributes (e.g. SELinux), since ls appends a '+' sign to the permission set in such cases. In fact, POSIX.1 allows ls to add a single printable character after the usual 3x3 permission bits to show that an optional alternate/additional access method is associated with the path. This fixes the testcase to strip any such sign prior to verifying the permission set. Signed-off-by: Junio C Hamano <gitster@pobox.com> Tested-by: Deskin Miller <deskinm@umich.edu>
2008-10-19Merge branch 'sh/maint-rebase3'Libravatar Junio C Hamano2-2/+174
* sh/maint-rebase3: rebase--interactive: fix parent rewriting for dropped commits
2008-10-19Merge branch 'tr/workflow-doc'Libravatar Junio C Hamano6-8/+500
* tr/workflow-doc: Documentation: add manpage about workflows Documentation: Refer to git-rebase(1) to warn against rewriting Documentation: new upstream rebase recovery section in git-rebase
2008-10-19Merge branch 'mv/clonev'Libravatar Junio C Hamano5-1/+25
* mv/clonev: Implement git clone -v
2008-10-19Merge branch 'ml/cygwin-filemode'Libravatar Junio C Hamano2-5/+17
* ml/cygwin-filemode: compat/cygwin.c - Use cygwin's stat if core.filemode == true
2008-10-19Merge branch 'gb/refactor-pathinfo'Libravatar Junio C Hamano1-137/+178
* gb/refactor-pathinfo: gitweb: refactor input parameters parse/validation
2008-10-19Merge branch 'dp/checkattr'Libravatar Junio C Hamano3-25/+110
* dp/checkattr: git-check-attr(1): use 'verse' for multi-line synopsis sections check-attr: Add --stdin option check-attr: add an internal check_attr() function
2008-10-19Merge branch 'gb/formatpatch-autonbr'Libravatar Junio C Hamano15-32/+298
* gb/formatpatch-autonbr: format-patch: autonumber by default
2008-10-19Merge branch 'sp/describe-lwtag'Libravatar Junio C Hamano3-10/+13
* sp/describe-lwtag: describe: Make --tags and --all match lightweight tags more often
2008-10-19Merge branch 'ae/preservemerge'Libravatar Junio C Hamano3-5/+81
* ae/preservemerge: rebase: Support preserving merges in non-interactive mode
2008-10-19Merge branch 'mv/merge-noff'Libravatar Junio C Hamano4-1/+40
* mv/merge-noff: builtin-commit: use reduce_heads() only when appropriate Conflicts: builtin-commit.c t/t7600-merge.sh
2008-10-19Merge branch 'ns/rebase-noverify'Libravatar Junio C Hamano4-3/+35
* ns/rebase-noverify: rebase: Document --no-verify option to bypass pre-rebase hook rebase --no-verify
2008-10-19Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: Documentation: Clarify '--signoff' for git-commit
2008-10-19Fix mismerge at cdb22c4 in builtin-checkout.cLibravatar Junio C Hamano1-3/+0
The code to complain when -b is not given but an explicit --track/--no-track override was given from the command line was unchanged on one branch and reworked on the other branch. The merge result incorrectly kept it. Spotted by Matt McCutchen. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19git-merge-recursive: honor merge.conflictstyle once againLibravatar Matt McCutchen1-1/+1
This was originally implemented in c236bcd06138bcbc929b86ad1a513635bf4847b2 but was lost to a mismerge in 9ba929ed652f5ed7707f1c684999af4ad02c4925. Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19Documentation: add manpage about workflowsLibravatar Thomas Rast2-1/+365
This attempts to make a manpage about workflows that is both handy to point people at it and as a beginner's introduction. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19Documentation: Spelling fixLibravatar Fredrik Skolmli1-1/+1
Signed-off-by: Fredrik Skolmli <fredrik@frsk.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19Merge branch 'pb/rename-rowin32'Libravatar Junio C Hamano1-2/+3
* pb/rename-rowin32: Do not rename read-only files during a push Looks-fine-to-me-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
2008-10-19Enhance hold_lock_file_for_{update,append}() APILibravatar Junio C Hamano11-23/+39
This changes the "die_on_error" boolean parameter to a mere "flags", and changes the existing callers of hold_lock_file_for_update/append() functions to pass LOCK_DIE_ON_ERROR. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19demonstrate breakage of detached checkout with symbolic link HEADLibravatar Junio C Hamano1-0/+12
When core.prefersymlinkrefs is in use, detaching the HEAD by checkout incorrectly clobbers the tip of the current branch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18Documentation: Clarify '--signoff' for git-commitLibravatar Abhijit Bhopatkar1-1/+2
'--signoff' uses commiter name always to add the signoff line, make it explicit in the documentation. Signed-off-by: Abhijit Bhopatkar <bain@devslashzero.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18reset --hard/read-tree --reset -u: remove unmerged new pathsLibravatar Junio C Hamano2-13/+78
When aborting a failed merge that has brought in a new path using "git reset --hard" or "git read-tree --reset -u", we used to first forget about the new path (via read_cache_unmerged) and then matched the working tree to what is recorded in the index, thus ending up leaving the new path in the work tree. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18Update draft release notes for 1.6.1Libravatar Junio C Hamano1-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18Merge branch 'maint'Libravatar Junio C Hamano4-10/+23
* maint: Hopefully the final draft release notes update before 1.6.0.3 diff(1): clarify what "T"ypechange status means contrib: update packinfo.pl to not use dashed commands force_object_loose: Fix memory leak tests: shell negation portability fix
2008-10-18Hopefully the final draft release notes update before 1.6.0.3Libravatar Junio C Hamano1-1/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>