summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add add_object_array_with_modeMartin Koegler2007-04-242-0/+8
| | | | | | | | | Each object in struct object_array is extended with the mode. If not specified, S_IFINVALID is used. An object with an mode value can be added with add_object_array_with_mode. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* add get_sha1_with_modeMartin Koegler2007-04-242-2/+10
| | | | | | | | | | get_sha1_with_mode basically behaves as get_sha1. It has an additional parameter for storing the mode of the object. If the mode can not be determined, it stores S_IFINVALID. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add S_IFINVALID modeMartin Koegler2007-04-241-0/+3
| | | | | | | S_IFINVALID is used to signal, that no mode information is available. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2007-04-247-5/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Documentation/git-reset.txt: suggest git commit --amend in example. Build RPM with ETC_GITCONFIG=/etc/gitconfig Ignore all man sections as they are generated files. Fix typo in git-am: s/Was is/Was it/ Reverse the order of -b and --track in the man page. dir.c(common_prefix): Fix two bugs Conflicts: git.spec.in
| * Documentation/git-reset.txt: suggest git commit --amend in example.Gerrit Pape2007-04-231-0/+2
| | | | | | | | | | | | | | In example 'Undo a commit and redo', refer to 'git commit --amend', as this is the easier alternative. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Build RPM with ETC_GITCONFIG=/etc/gitconfigJunio C Hamano2007-04-231-0/+2
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Ignore all man sections as they are generated files.Brian Gernhardt2007-04-231-2/+1
| | | | | | | | | | Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix typo in git-am: s/Was is/Was it/Josh Triplett2007-04-231-1/+1
| | | | | | | | | | Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Reverse the order of -b and --track in the man page.Brian Gernhardt2007-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using "-b --track newbranch oldbranch" gives the error: git checkout: updating paths is incompatible with switching branches/forcing However, "--track -b ..." works just fine. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * dir.c(common_prefix): Fix two bugsJohannes Schindelin2007-04-232-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function common_prefix() is used to find the common subdirectory of a couple of pathnames. When checking if the next pathname matches up with the prefix, it incorrectly checked the whole path, not just the prefix (including the slash). Thus, the expensive part of the loop was executed always. The other bug is more serious: if the first and the last pathname in the list have a longer common prefix than the common prefix for _all_ pathnames in the list, the longer one would be chosen. This bug was probably hidden by the fact that bash's wildcard expansion sorts the results, and the code just so happens to work with sorted input. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-fetch: Fix "argument list too long"OGAWA Hirofumi2007-04-242-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If $ls_remote_result was too long, git-fetch--tool -s pick-rref "$rref" "$ls_remote_result" in git-fetch will fail with "argument list too long". This patch fixes git-fetch--tool and git-fetch by passing $ls_remote_result via stdin. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add clean.requireForce option, and add -f option to git-clean to override itJosh Triplett2007-04-234-2/+22
| | | | | | | | | | | | | | | | Add a new configuration option clean.requireForce. If set, git-clean will refuse to run, unless forced with the new -f option, or not acting due to -n. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t6030: grab commit object name as we goJunio C Hamano2007-04-231-7/+10
| | | | | | | | | | | | | | | | Instead of running rev-list and picking earlier lines using head/tail pipeline, grab commit object name as we build commits. This also removes a non POSIX use of tail with -linenum (more posixly-correct way to say it is "-n linenum") Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t5302: avoid using tail -cJunio C Hamano2007-04-231-1/+1
| | | | | | | | | | | | | | A Large Angry SCM (gitzilla) noticed that on an unnamed platform, tail -c wants its byte count as part of the option, not as a separate argument. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t4201: Do not display weird characters on the terminalJohannes Schindelin2007-04-231-4/+4
| | | | | | | | | | | | | | Now that git-commit got chatty, we have to shut it up again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | add file checkout progressNicolas Pitre2007-04-232-4/+6
| | | | | | | | | | | | | | | | | | | | It is nice to see what is happening when checking out large amount of files, either with git-checkout or git-reset. The new progress code already decides what is a "significant amount" and displays progress only in that case.. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Document "diff=driver" attributeJunio C Hamano2007-04-231-3/+29
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: Show "no difference" message for empty diffv1.5.2-rc0Martin Koegler2007-04-222-0/+7
| | | | | | | | | | | | | | | | | | | | Currently, gitweb shows only header and footer, if no differences are found. This patch adds a "No differences found" message for the html output. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | delay progress display when checking out filesNicolas Pitre2007-04-221-7/+2
| | | | | | | | | | | | | | | | Let's start displaying progress only if more than 50% of total number of files remains to be checked out after 2 seconds. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | provide a facility for "delayed" progress reportingNicolas Pitre2007-04-222-0/+40
| | | | | | | | | | | | | | | | This allows for progress to be displayed only if the progress has not reached a specified percentage treshold within a given delay in seconds. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | make progress "title" part of the common progress interfaceNicolas Pitre2007-04-226-34/+27
| | | | | | | | | | | | | | If the progress bar ends up in a box, better provide a title for it too. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | common progress display supportNicolas Pitre2007-04-227-185/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having this code duplicated in multiple places, let's have a common interface for progress display. If someday someone wishes to display a cheezy progress bar instead then only one file will have to be changed. Note: I left merge-recursive.c out since it has a strange notion of progress as it apparently increase the expected total number as it goes. Someone with more intimate knowledge of what that is supposed to mean might look at converting it to the common progress interface. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Support 'diff=pgm' attributeJunio C Hamano2007-04-225-5/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enhances the attributes mechanism so that external programs meant for existing GIT_EXTERNAL_DIFF interface can be specifed per path. To configure such a custom diff driver, first define a custom diff driver in the configuration: [diff "my-c-diff"] command = <<your command string comes here>> Then mark the paths that you want to use this custom driver using the attribute mechanism. *.c diff=my-c-diff The intent of this separation is that the attribute mechanism is used for specifying the type of the contents, while the configuration mechanism is used to define what needs to be done to that type of the contents, which would be specific to both platform and personal taste. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | pack-objects: make generated packfile read-onlyJunio C Hamano2007-04-221-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Update tests not to assume that generated packfiles are writable.Junio C Hamano2007-04-221-11/+11
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix 'quickfix' on pack-objects.Junio C Hamano2007-04-221-2/+14
| | | | | | | | | | | | | | The earlier quickfix forced world-readable permission bits. This updates it to honor umask and core.sharedrepository settings. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | pack-objects: quickfix for permission modes.Junio C Hamano2007-04-221-0/+6
| | | | | | | | | | | | | | | | | | mkstemp() often creates the file in 0600 which means the resulting packfile is not readable by anybody other than the repository owner. Force 0644 for now, even though this is not strictly correct. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix crash in t0020 (crlf conversion)Alex Riesen2007-04-221-2/+4
| | | | | | | | | | | | | | | | | | | | Reallocated wrong size. Noticed on Ubuntu 7.04 probably because it has some malloc diagnostics in libc: "git-read-tree --reset -u HEAD" aborted in the test. Valgrind sped up the debugging greatly: took me 10 minutes. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix a typo in crlf conversion codeAlex Riesen2007-04-221-5/+5
| | | | | | | | | | | | | | | | | | Also, noticed by valgrind: the code caused a read out-of-bounds. Some comments updated as well (they still reflected old calling conventions). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Cleanup variables in cat-fileShawn O. Pearce2007-04-221-12/+18
| | | | | | | | | | | | | | | | | | | | I want to add new command line options to cat-file, but to do that we need to change how we handle argv[] first. This is a simple cleanup that assigns names to the two arguments we currently care about. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Update draft release notes for v1.5.2Junio C Hamano2007-04-221-26/+51
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation/Makefile: fix section (5) installationJunio C Hamano2007-04-222-2/+2
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Update documentation links to point at v1.5.1.2Junio C Hamano2007-04-211-1/+5
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lt/objalloc'Junio C Hamano2007-04-218-59/+43
|\ \ | | | | | | | | | | | | | | | * 'lt/objalloc': Clean up object creation to use more common code Use proper object allocators for unknown object nodes too
| * | Clean up object creation to use more common codeLinus Torvalds2007-04-168-43/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the fairly odd "created_object()" function that did _most_ of the object setup with a more complete "create_object()" function that also has a more natural calling convention. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Use proper object allocators for unknown object nodes tooLinus Torvalds2007-04-163-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to use a different allocator scheme for when we didn't know the object type. That meant that objects that were created without any up-front knowledge of the type would not go through the same allocation paths as normal object allocations, and would miss out on the statistics. But perhaps more importantly than the statistics (that are useful when looking at memory usage but not much else), if we want to make the object hash tables use a denser object pointer representation, we need to make sure that they all go through the same blocking allocator. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/add'Junio C Hamano2007-04-211-1/+57
|\ \ \ | | | | | | | | | | | | | | | | * jc/add: git-add -u: match the index with working tree.
| * | | git-add -u: match the index with working tree.Junio C Hamano2007-04-201-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a shorthand of what "git commit -a" does in preparation for making a commit, which is: git diff-files --name-only -z | git update-index --remove -z --stdin Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/attr'Junio C Hamano2007-04-2122-134/+1816
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'jc/attr': (28 commits) lockfile: record the primary process. convert.c: restructure the attribute checking part. Fix bogus linked-list management for user defined merge drivers. Simplify calling of CR/LF conversion routines Document gitattributes(5) Update 'crlf' attribute semantics. Documentation: support manual section (5) - file formats. Simplify code to find recursive merge driver. Counto-fix in merge-recursive Fix funny types used in attribute value representation Allow low-level driver to specify different behaviour during internal merge. Custom low-level merge driver: change the configuration scheme. Allow the default low-level merge driver to be configured. Custom low-level merge driver support. Add a demonstration/test of customized merge. Allow specifying specialized merge-backend per path. merge-recursive: separate out xdl_merge() interface. Allow more than true/false to attributes. Document git-check-attr Change attribute negation marker from '!' to '-'. ...
| * | | | lockfile: record the primary process.Junio C Hamano2007-04-212-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual process flow is the main process opens and holds the lock to the index, does its thing, perhaps spawning children during the course, and then writes the resulting index out by releaseing the lock. However, the lockfile interface uses atexit(3) to clean it up, without regard to who actually created the lock. This typically leads to a confusing behaviour of lock being released too early when the child exits, and then the parent process when it calls commit_lockfile() finds that it cannot unlock it. This fixes the problem by recording who created and holds the lock, and upon atexit(3) handler, child simply ignores the lockfile the parent created. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | convert.c: restructure the attribute checking part.Junio C Hamano2007-04-211-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This separates the checkattr() call and interpretation of the returned value specific to the 'crlf' attribute into separate routines, so that we can run a single call to checkattr() to check for more than one attributes, and then interprete what the returned settings mean separately. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Fix bogus linked-list management for user defined merge drivers.Junio C Hamano2007-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ll_user_merge_tail is supposed to point at the pointer to be updated to point at a newly created item. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Simplify calling of CR/LF conversion routinesAlex Riesen2007-04-206-60/+51
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Document gitattributes(5)Junio C Hamano2007-04-193-2/+300
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Update 'crlf' attribute semantics.Junio C Hamano2007-04-192-60/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the semantics of 'crlf' so that .gitattributes file can say "this is text, even though it may look funny". Setting the `crlf` attribute on a path is meant to mark the path as a "text" file. 'core.autocrlf' conversion takes place without guessing the content type by inspection. Unsetting the `crlf` attribute on a path is meant to mark the path as a "binary" file. The path never goes through line endings conversion upon checkin/checkout. Unspecified `crlf` attribute tells git to apply the `core.autocrlf` conversion when the file content looks like text. Setting the `crlf` attribut to string value "input" is similar to setting the attribute to `true`, but also forces git to act as if `core.autocrlf` is set to `input` for the path. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Documentation: support manual section (5) - file formats.Junio C Hamano2007-04-192-7/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Simplify code to find recursive merge driver.Junio C Hamano2007-04-181-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to intern the string to git_attr, as we are already dealing with the name of the driver there. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Counto-fix in merge-recursiveJunio C Hamano2007-04-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the configuration has variables unrelated to low-level merge drivers (e.g. merge.summary), the code failed to ignore them but did something totally senseless. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Fix funny types used in attribute value representationJunio C Hamano2007-04-186-26/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was bothering me a lot that I abused small integer values casted to (void *) to represent non string values in gitattributes. This corrects it by making the type of attribute values (const char *), and using the address of a few statically allocated character buffer to denote true/false. Unset attributes are represented as having NULLs as their values. Added in-header documentation to explain how git_checkattr() routine should be called. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Allow low-level driver to specify different behaviour during internal merge.Junio C Hamano2007-04-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows [merge "drivername"] to have a variable "recursive" that names a different low-level merge driver to be used when merging common ancestors to come up with a virtual ancestor. Signed-off-by: Junio C Hamano <junkio@cox.net>