summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-11-12checkout: Fix "initial checkout" detectionLibravatar Junio C Hamano4-3/+9
Earlier commit 5521883 (checkout: do not lose staged removal, 2008-09-07) tightened the rule to prevent switching branches from losing local changes, so that staged removal of paths can be protected, while attempting to keep a loophole to still allow a special case of switching out of an un-checked-out state. However, the loophole was made a bit too tight, and did not allow switching from one branch (in an un-checked-out state) to check out another branch. The change to builtin-checkout.c in this commit loosens it to allow this, by not insisting the original commit and the new commit to be the same. It also introduces a new function, is_index_unborn (and an associated macro, is_cache_unborn), to check if the repository is truly in an un-checked-out state more reliably, by making sure that $GIT_INDEX_FILE did not exist when populating the in-core index structure. A few places the earlier commit 5521883 added the check for the initial checkout condition are updated to use this function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Remove the period after the git-check-attr summaryLibravatar Matt Kraai1-1/+1
The period at the end of the git-check-attr summary causes there to be two periods after the summary in the git(1) manual page. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11Fix non-literal format in printf-style callsLibravatar Daniel Lowe8-12/+12
These were found using gcc 4.3.2-1ubuntu11 with the warning: warning: format not a string literal and no format arguments Incorporated suggestions from Brandon Casey <casey@nrlssc.navy.mil>. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11git-submodule: Avoid printing a spurious message.Libravatar Alexandre Julliard1-1/+1
Fix 'git submodule update' to avoid printing a spurious "Maybe you want to use 'update --init'?" once for every uninitialized submodule it encounters. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11git ls-remote: make usage string match manpageLibravatar Stefan Naewe1-1/+1
The usage string of 'git ls-remote' is pretty terse. The manpage however gives the correct 'synopsis'. Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11Makefile: help people who run 'make check' by mistakeLibravatar Junio C Hamano1-1/+10
The target to run self test is 'make test', but there are people who try 'make check' and worse yet do not have sparse installed. Suggest 'make test' target when they do not have 'sparse'. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09Documentation: bisect: change a few instances of "git-cmd" to "git cmd"Libravatar Christian Couder1-3/+3
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"Libravatar Christian Couder1-4/+4
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09checkout: Don't crash when switching away from an invalid branch.Libravatar Alexandre Julliard2-4/+22
When using alternates, it is possible for HEAD to end up pointing to an invalid commit. git checkout should be able to recover from that situation without crashing. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-08GIT 1.6.0.4Libravatar Junio C Hamano1-6/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-08Update RPM spec for the new location of git-cvsserver.Libravatar Quy Tonthat1-0/+4
git-cvsserver has been moved from libexecdir to bindir. Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-08Merge branch 'cb/maint-update-ref-fix' into maintLibravatar Junio C Hamano4-17/+50
* cb/maint-update-ref-fix: push: fix local refs update if already up-to-date do not force write of packed refs
2008-11-08Merge branch 'cj/maint-gitpm-fix-maybe-self' into maintLibravatar Junio C Hamano1-2/+1
* cj/maint-gitpm-fix-maybe-self: Git.pm: do not break inheritance
2008-11-08Merge branch 'ar/maint-mksnpath' into maintLibravatar Junio C Hamano13-19/+84
* ar/maint-mksnpath: Use git_pathdup instead of xstrdup(git_path(...)) git_pathdup: returns xstrdup-ed copy of the formatted path Fix potentially dangerous use of git_path in ref.c Add git_snpath: a .git path formatting routine with output buffer Fix potentially dangerous uses of mkpath and git_path Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c Add mksnpath which allows you to specify the output buffer Conflicts: builtin-revert.c rerere.c
2008-11-08Merge branch 'mv/maint-branch-m-symref' into maintLibravatar Junio C Hamano11-24/+65
* mv/maint-branch-m-symref: update-ref --no-deref -d: handle the case when the pointed ref is packed git branch -m: forbid renaming of a symref Fix git update-ref --no-deref -d. rename_ref(): handle the case when the reflog of a ref does not exist Fix git branch -m for symrefs.
2008-11-05push: fix local refs update if already up-to-dateLibravatar Clemens Buchacher2-14/+39
git push normally updates local refs only after a successful push. If the remote already has the updates -- pushed indirectly through another repository, for example -- we forget to update local tracking refs. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-05do not force write of packed refsLibravatar Clemens Buchacher2-3/+11
We force writing a ref if it does not exist. Originally, we only had to look for the ref file to check if it existed. Now we have to look for a packed ref as well. Luckily, resolve_ref already does all the work for us. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02format-patch documentation: mention the special case of showing a single commitLibravatar Junio C Hamano1-1/+2
Even long timers seem to have missed that "format-patch -1 $commit" is a much simpler and more obvious way to say "format-patch $commit^..$commit" from the current documentation (and an example "format-patch -3 $commit" to get three patches). Add an explicit instruction in a much earlier part of the documentation to make it easier to find. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Add reference for status letters in documentation.Libravatar Yann Dirson2-1/+17
Also fix error in diff_filepair::status documentation, and point to the in-code reference as well as the doc. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Document that git-log takes --all-match.Libravatar Mikael Magnusson1-0/+4
Signed-off-by: Mikael Magnusson <mikachu@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Update draft 1.6.0.4 release notesLibravatar Junio C Hamano1-7/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02Merge branch 'js/maint-fetch-update-head' into maintLibravatar 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
2008-11-02Merge branch 'jk/maint-ls-files-other' into maintLibravatar Junio C Hamano5-44/+40
* jk/maint-ls-files-other: refactor handling of "other" files in ls-files and status
2008-11-02Merge branch 'jc/maint-reset-remove-unmerged-new' into maintLibravatar Junio C Hamano2-13/+78
* jc/maint-reset-remove-unmerged-new: reset --hard/read-tree --reset -u: remove unmerged new paths
2008-11-02Merge branch 'jc/maint-co-track' into maintLibravatar Junio C Hamano12-29/+61
* 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
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 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-10-31update-ref --no-deref -d: handle the case when the pointed ref is packedLibravatar Miklos Vajna2-1/+12
In this case we did nothing in the past, but we should delete the reference in fact. The problem was that when the symref is not packed but the referenced ref is packed, then we assumed that the symref is packed as well, but symrefs are never packed. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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-30Use git_pathdup instead of xstrdup(git_path(...))Libravatar Alex Riesen9-12/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30git_pathdup: returns xstrdup-ed copy of the formatted pathLibravatar Alex Riesen2-4/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30Fix potentially dangerous use of git_path in ref.cLibravatar Alex Riesen1-3/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30Add git_snpath: a .git path formatting routine with output bufferLibravatar Alex Riesen2-0/+25
The function's purpose is to replace git_path where the buffer of formatted path may not be reused by subsequent calls of the function or will be copied anyway. 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-30git branch -m: forbid renaming of a symrefLibravatar Miklos Vajna2-20/+17
There may be cases where one would really want to rename the symbolic ref without changing its value, but "git branch -m" is not such a use-case. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> 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>