aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* receive-pack: do not insist on fast-forward outside refs/heads/Junio C Hamano2006-12-04
| | | | | | | Especially refs/tags/ hierarchy should match what git-fetch checks. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-mv: search more precisely for source directory in indexJohannes Schindelin2006-12-04
| | | | | | | | | | | | | | | A move of a directory should find the entries in the index by searching for the name _including_ the slash. Otherwise, the directory can be shadowed by a file when it matches the prefix and is lexicographically smaller, e.g. "ab.c" shadows "ab/". Noticed by Sergey Vlasov. [jc: added Sergey's original reproduction recipe as a test case at the end of t7001.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: avoid fetching files twice in the same revisionEric Wong2006-12-02
| | | | | | | | | | | | | | | | | | | | | SVN is not entirely consistent in returning log information and sometimes returns file information when adding subdirectories, and sometimes it does not (only returning information about the directory that was added). This caused git-svn to occasionally add a file to the list of files to be fetched twice. Now we change the data structure to be hash to avoid repeated fetches. As of now (in master), this only affects repositories fetched without deltas enabled (file://, and when manually overriden with GIT_SVN_DELTA_FETCH=0); so this bug mainly affects users of 1.4.4.1 and maint. Thanks to Florian Weimer for reporting this bug. [jc: backported for maint] Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document git-repo-config --bool/--int options.Andy Parkins2006-11-29
| | | | | Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* tutorial: talk about user.name early and don't start with commit -aJunio C Hamano2006-11-29
| | | | | | | | | | | | Introducing yourself to git early would be a good idea; otherwise the user may not find the mistake until much later when "git log" is learned. Teaching "commit -a" without saying that it is a shortcut for listing the paths to commit leaves the user puzzled. Teach the form with explicit paths first. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-blame: fix rev parameter handling.Alex Riesen2006-11-29
| | | | | | | | We lacked "--" termination in the underlying init_revisions() call which made it impossible to specify a revision that happens to have the same name as an existing file. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git blame -C: fix output format tweaks when crossing file boundary.Junio C Hamano2006-11-28
| | | | | | | | | | | We used to get the case that more than two paths came from the same commit wrong when computing the output width and deciding to turn on --show-name option automatically. When we find that lines that came from a path that is different from what we started digging from, we should always turn --show-name on, and we should count the name length for all files involved. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Increase length of function name bufferAndy Parkins2006-11-23
| | | | | | | | | | | | | In xemit.c:xdl_emit_diff() a buffer for showing the function name as commentary is allocated; this buffer was 40 characters. This is a bit small; particularly for C++ function names where there is often an identical prefix (like void LongNamespace::LongClassName) on multiple functions, which makes the context the same everywhere. In other words the context is useless. This patch increases that buffer to 80 characters - which may still not be enough, but is better Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: preserve uncommitted changes after dcommitEric Wong2006-11-23
| | | | | | | | | | | Using dcommit could cause the user to lose uncommitted changes during the reset --hard operation, so change it to reset --mixed. If dcommit chooses the rebase path, then git-rebase will already error out when local changes are made. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: correctly handle revision 0 in SVN repositoriesEric Wong2006-11-23
| | | | | | | | | | some SVN repositories have a revision 0 (committed by no author and no date) when created; so when we need to ensure that we check any revision variables are defined, and not just non-zero. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: error out from dcommit on a parent-less commitEric Wong2006-11-23
| | | | | | | | | dcommit would unconditionally append "~1" to a commit in order to generate a diff. Now we generate a meaningful error message if we try to generate an impossible diff. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* archive-zip: don't use sizeof(struct ...)René Scharfe2006-11-23
| | | | | | | | | | | | | | | | | | | | | | We can't rely on sizeof(struct zip_*) returning the sum of all struct members. At least on ARM padding is added at the end, as Gerrit Pape reported. This fixes the problem but still lets the compiler do the summing by introducing explicit padding at the end of the structs and then taking its offset as the combined size of the preceding members. As Junio correctly notes, the _end[] marker array's size must be greater than zero for compatibility with compilers other than gcc. The space wasted by the markers can safely be neglected because we only have one instance of each struct, i.e. in sum 3 wasted bytes on i386, and 0 on ARM. :) We still rely on the compiler to not add padding between the struct members, but that's reasonable given that all of them are unsigned char arrays. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT 1.4.4.1v1.4.4.1Junio C Hamano2006-11-22
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* trust-executable-bit: fix breakage for symlinksJunio C Hamano2006-11-22
| | | | | | | | | | An earlier commit f28b34a broke symlinks when trust-executable-bit is not set because it incorrectly assumed that everything was a regular file. Reported by Juergen Ruehle. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move --pretty options into Documentation/pretty-formats.txtChris Riddoch2006-11-22
| | | | | | | | | | | | | | | | Asciidoc-include it into the manuals for programs that use the --pretty command-line option, for consistency among the docs. This describes all the pretty-formats currently listed in the cmit_fmt enum in commit.h, and also briefly describes the presence and format of the 'Merge: ' line in some pretty formats. There's a hedge that limiting your view of history can affect what goes in the Merge: line, and that --abbrev/--no-abbrev do nothing to the 'raw' format. Signed-off-by: Chris Riddoch <chris@syntacticsugar.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Doc: Make comment about merging in tutorial.txt more clearPaolo Ciarrocchi2006-11-21
| | | | | | | | Rephrased a sentence in order to make more clear the concept of pull . branch Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* archive: use setvbuf() instead of setlinebuf()Michal Rokos2006-11-21
| | | | | | | | | | This tiny patch makes GIT compile again on HP-UX 11i. [jc: The setlinebuf() is described as unportable to BSD before 4.2; it's not even in POSIX, while setvbuf() is in ISO C.] Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach SubmittingPatches about git-commit -sPaolo Ciarrocchi2006-11-21
| | | | | | | | | As discussed on git mailing list let's teach the reader about the possiblity to have automatically signed off the commit running the git-commit -s command Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* do_for_each_ref: perform the same sanity check for leftovers.Junio C Hamano2006-11-19
| | | | | | | | | | | | | | | An earlier commit b37a562a added a check to see if the ref points at a valid object (as a part of 'negative ref' support which we currently do not use), but did so only while iterating over both packed and loose refs, and forgot to apply the same check while iterating over the remaining ones. We might want to replace the "if null then omit it" check with "eh --- what business does a 0{40} value have here?" complaint later since we currently do not use negative refs, but that is a separate issue. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-fetch: follow lightweit tags as well.Junio C Hamano2006-11-19
| | | | | | | | This side-ports commit fd19f620 from Cogito, in which I fixed exactly the same bug. Somehow nobody noticed this for a long time in git. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: Correct alternates documentation, document http-alternatesPetr Baudis2006-11-18
| | | | | | | | | For one, the documentation invalidly claimed that the paths have to be absolute when that's not the case and in fact there is a very valid reason not to use absolute paths (documented the reason as well). Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: Define symref and update HEAD descriptionPetr Baudis2006-11-18
| | | | | | | HEAD was still described as a symlink instead of a symref. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document git-runstatusRene Scharfe2006-11-18
| | | | | | | I copied most of the text from git-status.txt. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-apply: slightly clean up bitfield usageRene Scharfe2006-11-18
| | | | | | | | | | This patch fixes a sparse warning about inaccurate_eof being a "dubious one-bit signed bitfield", makes three more binary variables members of this (now unsigned) bitfield and adds a short comment to indicate the nature of two ternary variables. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sparse fix: Using plain integer as NULL pointerRene Scharfe2006-11-18
| | | | | | | Z_NULL is defined as 0, use a proper NULL pointer in its stead. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sparse fix: non-ANSI function declarationRene Scharfe2006-11-18
| | | | | | | The declaration of discard_cache() in cache.h already has its "void". Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-apply: Documentation typo fixPetr Baudis2006-11-18
| | | | | | | inacurate -> inaccurate, sorry if it was a pun. ;-) Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix git-for-each-refs broken for tagsPetr Baudis2006-11-18
| | | | | | | | | | | Unfortunately, git-for-each-refs is currently unusable for peeking into tag comments, since it uses freed pointers, so it just prints out all sort of garbage. This makes it strdup() contents and body values. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* "git fmt-merge-msg" SIGSEGVLinus Torvalds2006-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | Ok, this is a _really_ stupid case, and I don't think it matters, but hey, we should never SIGSEGV. Steps to reproduce: mkdir duh cd duh git init-db git-fmt-merge-msg < /dev/null will cause a SIGSEGV in cmd_fmt_merge_msg(), because we're doing a strncmp() with a NULL current_branch. And yeah, it's an insane schenario, and no, it doesn't really matter. The only reason I noticed was that a broken version of my "git pull" into an empty directory would cause this. This silly patch just replaces the SIGSEGV with a controlled exit with an error message. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-pull: allow pulling into an empty repositoryLinus Torvalds2006-11-16
| | | | | | | | | | | | | | | | We used to complain that we cannot merge anything we fetched with a local branch that does not exist yet. Just treat the case as a natural extension of fast forwarding and make the local branch'es tip point at the same commit we just fetched. After all an empty repository without an initial commit is an ancestor of any commit. [jc: I added a trivial test. We've become sloppy but we should stick to the discipline of covering new behaviour with new tests. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* convert-objects: set _XOPEN_SOURCE to 600Junio C Hamano2006-11-15
| | | | | | | Otherwise OpenBSD header files drop S_ISLNK() definition which is used in an inline defined in cache.h Signed-off-by: Junio C Hamano <junkio@cox.net>
* Run "git repack -a -d" once more at end, if there's 1MB or more of ↵Jim Meyering2006-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not-packed data. Although I converted upstream coreutils to git last month, I just reconverted coreutils once again, as a test, and ended up with a git repository of about 130MB (contrast with my packed git repo of size 52MB). That was because there were a lot of commits (but < 1024) after the final automatic "git-repack -a -d". Running a final git-repack -a -d && git-prune-packed cut the final repository size down to the expected size. So this looks like an easy way to improve git-cvsimport. Just run "git repack ..." at the end if there's more than some reasonable amount of not-packed data. My choice of 1MB is a little arbitrarily. I wouldn't mind missing the minimal repo size by 1MB. At the other end of the spectrum, it's probably not worthwhile to pack everything when the total repository size is less than 1MB. Here's the patch: Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Put back shortlog instead of graphiclog in the project list.Alexandre Julliard2006-11-15
| | | | | | | Looks like a repo.or.cz-specific change slipped in. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-checkout: allow pathspec to recover lost working tree directoryJunio C Hamano2006-11-15
| | | | | | | | | | | | | It is often wanted on the #git channel that this were to work to recover removed directory: rm -fr Documentation git checkout -- Documentation git checkout HEAD -- Documentation ;# alternatively Now it does. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-checkout: do not allow -f and -m at the same time.Junio C Hamano2006-11-15
| | | | | | | Instead of silently ignoring one over the other, complain on this incompatible combination. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Seek back to current filepos when mmap()ing with NO_MMAPJohannes Schindelin2006-11-15
| | | | | | | | | "git-index-pack --fix-thin" relies on mmap() not changing the current file position (otherwise the pack will be corrupted when writing the final SHA1). Meet that expectation. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT 1.4.4v1.4.4Junio C Hamano2006-11-14
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-11-13
|\ | | | | | | | | | | | | | | * maint: Rework cvsexportcommit to handle binary files for all cases. Catch errors when writing an index that contains invalid objects. test-lib.sh: A command dying due to a signal is an unexpected failure. git-update-index(1): fix use of quoting in section title
| * Rework cvsexportcommit to handle binary files for all cases.Robin Rosenberg2006-11-13
| | | | | | | | | | | | | | | | | | Also adds test cases for adding removing and deleting binary and text files plus two tests for the checks on binary files. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Catch errors when writing an index that contains invalid objects.Johannes Sixt2006-11-13
| | | | | | | | | | | | | | | | | | If git-write-index is called without --missing-ok, it reports invalid objects that it finds in the index. But without this patch it dies right away or may run into an infinite loop. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * test-lib.sh: A command dying due to a signal is an unexpected failure.Johannes Sixt2006-11-13
| | | | | | | | | | | | | | | | When test_expect_failure detects that a command failed, it still has to treat a program that crashed from a signal as unexpected failure. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-update-index(1): fix use of quoting in section titleJonas Fonseca2006-11-12
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | GIT 1.4.4-rc2v1.4.4-rc2Junio C Hamano2006-11-11
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-11
|\ \ | |/ | | | | | | * maint: git-cvsserver: read from git with -z to get non-ASCII pathnames.
| * git-cvsserver: read from git with -z to get non-ASCII pathnames.v1.4.3.5Junio C Hamano2006-11-11
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-11
|\ \ | |/ | | | | | | * maint: path-list: fix path-list-insert return value
| * path-list: fix path-list-insert return valueJunio C Hamano2006-11-11
| | | | | | | | | | | | | | | | | | When path-list-insert is called on an existing path, it returned an unrelated element in the list. Luckily most of the callers are ignoring the return value, but merge-recursive uses it at three places and this would have resulted in a bogus rename detection. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-annotate: fix -S on graft file with comments.Junio C Hamano2006-11-10
| | | | | | | | | | | | | | | | The graft file can contain comment lines and read_graft_line can return NULL for such an input, which should be skipped by the reader. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-annotate: no need to exec blame; it is built-in now.Junio C Hamano2006-11-10
| |
* | Merge branch 'maint'Junio C Hamano2006-11-09
|\ \ | |/ | | | | | | | | | | | | * maint: git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch. git-svn: fix dcommit losing changes when out-of-date from svn git-svn: don't die on rebuild when --upgrade is specified git-svn: avoid printing filenames of files we're not tracking