summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-11-10notes.h/c: Allow combine_notes functions to remove notesJohan Herland
Allow combine_notes functions to request that a note be removed, by setting the resulting note SHA1 to null_sha1 (0000000...). For consistency, also teach note_tree_insert() to skip insertion of an empty note (a note with entry->val_sha1 equal to null_sha1) when there is no note to combine it with. In general, an empty note (null_sha1) is treated identically to no note at all, but when adding an empty note where there already exists a non-empty note, we allow the combine_notes function to potentially record a new/changed note. Document this behaviour, and clearly specify how combine_notes functions are expected to handle null_sha1 in input. Before this patch, storing null_sha1s in the notes tree were silently allowed, causing an invalid notes tree (referring to blobs with null_sha1) to be produced by write_notes_tree(). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10notes.c: Reorder functions in preparation for next commitJohan Herland
This patch introduces no functional change. It consists solely of reordering functions in notes.c to avoid use-before-declaration errors after applying the next commit in this series. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10notes.h: Make default_notes_ref() available in notes APIJohan Herland
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10(trivial) notes.h: Minor documentation fixes to copy_notes()Johan Herland
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10notes.c: Hexify SHA1 in die() message from init_notes()Johan Herland
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09notes: allow --dry-run for -n and --verbose for -vRené Scharfe
For consistency with other git commands, let the prune subcommand of git notes accept the long options --dry-run and --verbose for the respective short ones -n and -v. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -CMatthieu Moy
These options take an optional argument, but this optional argument was not documented. Original patch by Matthieu Moy, but documentation for -B mostly copied from the explanations of Junio C Hamano. While we're there, fix a typo in a comment in diffcore.h. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Documentation: cite git-am from git-applyBrad King
Users reading git-apply documentation may also be interested in git-am, especially after receiving an email created with git-format-patch. The documentation for git-am already references git-apply. Add the reverse. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09t7003: fix subdirectory-filter testThomas Rast
The test would not fail if the filtering failed to do anything, since in test -z "$(git diff HEAD directorymoved:newsubdir)"' 'directorymoved:newsubdir' is not valid, so git-diff fails without printing anything on stdout. But then the exit status of git-diff is lost, whereas test -z "" succeeds. Use 'git diff --exit-code' instead, which does the right thing and has the added bonus of showing the differences if there are any. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-06Allow "check-ref-format --branch" from subdirectoryJonathan Nieder
check-ref-format --branch requires access to the repository to resolve refs like @{-1}. Noticed by Nguyễn Thái Ngọc Duy. Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-06check-ref-format: handle subcommands in separate functionsJonathan Nieder
The code for each subcommand should be easier to read and manipulate this way. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-05pretty-options.txt: match --format's documentation with implementation.Matthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-03Merge branch 'sv/maint-diff-q-clear-fix' into maintJunio C Hamano
* sv/maint-diff-q-clear-fix: Fix DIFF_QUEUE_CLEAR refactoring
2010-08-03Merge branch 'rr/svn-fe' into maintJunio C Hamano
* rr/svn-fe: contrib/svn-fe: Add the svn-fe target to .gitignore contrib/svn-fe: Fix IncludePath
2010-08-03Merge branch 'pt/git-gui' into maintJunio C Hamano
* pt/git-gui: git-gui: fix size and position of window panes on startup git-gui: mc cannot be used before msgcat has been loaded git-gui: use textconv filter for diff and blame git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32 git-gui: fix shortcut creation on cygwin git-gui: fix PATH environment for mingw development environment git-gui: fix usage of _gitworktree when creating shortcut for windows git-gui: fix "Explore Working Copy" for Windows again git-gui: fix usage of themed widgets variable git-gui: Handle failure of core.worktree to identify the working directory. git-gui: check whether systems nice command works or disable it
2010-08-03contrib/svn-fe: Add the svn-fe target to .gitignoreRamkumar Ramachandra
Add the svn-fe target to .gitignroe. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-03contrib/svn-fe: Fix IncludePathRamkumar Ramachandra
Include the path "../../vcs-svn" while compiling it in the Makefile and change svn-fe.c to include svndump.h. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02Merge branch 'ab/tap' into maintJunio C Hamano
* ab/tap: test-lib: Remove 3 year old no-op --no-python option test-lib: Ignore --quiet under a TAP harness
2010-08-02test-lib: Remove 3 year old no-op --no-python optionÆvar Arnfjörð Bjarmason
The --no-python option was added to test-lib.sh by Johannes Schindelin in early 2006 in abb7c7b3. It was later turned into a no-op by Junio C Hamano in 7cdbff14 the same year. Over three years is long enough before removing this old wart which was retained for backwards compatibility. Our tests have been using NO_PYTHON and "test_have_prereq PYTHON" for a long time now. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02test-lib: Ignore --quiet under a TAP harnessÆvar Arnfjörð Bjarmason
Running the tests with --quiet under a TAP harness will always fail, since a TAP harness always needs actual test output to go along with the plan that's being emitted. Change the test-lib.sh to ignore the --quiet option under HARNESS_ACTIVE to work around this. Then users that have --quiet in their GIT_TEST_OPTS can run tests under prove(1) without everything breaking. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02Merge git://repo.or.cz/git-gui into pt/git-guiJunio C Hamano
* git://repo.or.cz/git-gui: git-gui: fix size and position of window panes on startup git-gui: mc cannot be used before msgcat has been loaded git-gui: use textconv filter for diff and blame git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32 git-gui: fix shortcut creation on cygwin git-gui: fix PATH environment for mingw development environment git-gui: fix usage of _gitworktree when creating shortcut for windows git-gui: fix "Explore Working Copy" for Windows again git-gui: fix usage of themed widgets variable git-gui: Handle failure of core.worktree to identify the working directory. git-gui: check whether systems nice command works or disable it
2010-08-02Documentation/rev-parse: quoting is required with --parseoptThomas Rast
When calling rev-parse --parseopt, as in the (now fixed) documented example eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)" the outermost quoting is required, as otherwise all runs of arbitrary whitespace inside the resulting 'set -- ...' call would be collapsed into a single space. This was exposed as a result of our new use of cat <<\EOF since 47e9cd2 (parseopt: wrap rev-parse --parseopt usage for eval consumption, 2010-06-12), but has always been a problem when handling arguments containing e.g. newlines. Point this out in the documentation, and in particular correct the example that did not have the quotes. Noticed-by: Joshua Jensen <jjensen@workspacewhiz.com> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02Documentation: reporting bugsJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02Fix DIFF_QUEUE_CLEAR refactoringJunio C Hamano
It introduced a macro to reduce repeated assignments to three fields, but an unrelated and incorrect change snuck in by mistake, which broke commands like "git diff-files -p --submodule". Noticed by Sven Verdoolaege. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02git-gui: fix size and position of window panes on startupPat Thoyts
The themed panedwindow needs to have the sash position set after the widget has been mapped therefore apply this setting in the Map event binding. To avoid visible redraws as the application is constructed the main window should be withdrawn until all the widgets have been added Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-02git-gui: mc cannot be used before msgcat has been loadedPat Thoyts
If someone attempts to use an older version that Tk 8.4 the error was masked by the lack of a mc command. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: use textconv filter for diff and blameClément Poulain
Create a checkbox "Use Textconv For Diffs and Blame" in git-gui options. If checked and if the driver for the concerned file exists, git-gui calls diff and blame with --textconv option Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32Pat Thoyts
On Windows the Control-C binding is used to copy and is mapped to the Tk virtual event <<Copy>>. In the initial git-gui dialog this is also bound as an accelerator for the Clone menu item. The effect is that both bindings run, copying the text but resetting the clone page or switching to the clone page when the user tries to copy text from one of the entry fields. This patch avoids this by using Control-L instead for Windows only. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix shortcut creation on cygwinHeiko Voigt
When the user tried to create a desktop icon with git gui on cygwin wscript was complaining about an unknown option and displaying the non-native path as such. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix PATH environment for mingw development environmentHeiko Voigt
When creating a desktop shortcut from the gui the shortcut directly starts wish with the git-gui script. In the msysgit development environment some dll's reside in the mingw/bin directory which causes that git can not start because libiconv2.dll is not found. When using such a link the error is even more cryptic stating: "child killed: unknown signal" Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix usage of _gitworktree when creating shortcut for windowsHeiko Voigt
This fixes msysGit issue 425. Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix "Explore Working Copy" for Windows againMarkus Heidelberg
It has already been fixed in commit 454efb47 (git-gui (Win): make "Explore Working Copy" more robust, 2009-04-01), but has been broken in commit 21985a11 (git-gui: handle non-standard worktree locations, 2010-01-23) by accidentally replacing too much with a new variable. The problem can be reproduced when starting git-gui from within a subdirectory. The solution is to convert the path name, explorer.exe is invoked with, to a platform native name. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-28Fix git rebase --continue to work with touched filesDavid D. Kilzer
When performing a non-interactive rebase, sometimes "git rebase --continue" will fail if an unmodified file is touched in the working directory: You must edit all merge conflicts and then mark them as resolved using git add This is caused by "git diff-files" reporting a difference between the index and the filesystem: :100644 100644 d00491...... 000000...... M file The fix is to run "git update-index --refresh" before "git diff-files" as is done in git-rebase--interactive. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-28Document ls-files -t as semi-obsolete.Matthieu Moy
The behavior of "git ls-files -t" is very misleading (see http://thread.gmane.org/gmane.comp.version-control.git/126516 and http://thread.gmane.org/gmane.comp.version-control.git/144394/focus=144397 for examples of mislead users) and badly documented, hence we point the users to superior alternatives. The feature is marked as "semi-obsolete" but not "scheduled for removal" since it's a plumbing command, scripts might use it, and Git testsuite already uses it to test the state of the index. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Git 1.7.2.1v1.7.2.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Sync with 1.7.1.2Junio C Hamano
2010-07-27Git 1.7.1.2v1.7.1.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Sync with 1.7.0 seriesJunio C Hamano
2010-07-27Git 1.7.0.7v1.7.0.7Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27config --get --path: check for unset $HOMEJonathan Nieder
If $HOME is unset (as in some automated build situations), currently git config --path path.home "~" git config --path --get path.home segfaults. Error out with Failed to expand user dir in: '~/' instead. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27commit: remove full stop from usage help for -uStephen Boyd
From api-parse-options.txt: `description` is a short string to describe the effect of the option. It shall begin with a lower-case letter and a full stop (`.`) shall be omitted at the end. It also makes it less confusing if the argument is 'no.' or 'no'. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Clarify help message when no remote is specified in fetch/pull.Matthieu Moy
The message is especially confusing when "git fetch" is ran from "git pull", for users not aware of "git fetch". The new message makes it clear that "fetch" means "fetch new revisions", and gives hint on the solution. We don't add a advice.* configuration option since this message doesn't appear in normal use, and shouldn't disturb advanced users. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Makefile: add check-docs exception for gitrevisionsThomas Rast
The manpage was added in 1ed6f2c (Documentation: gitrevisions, 2010-07-05), but since it does not have a corresponding git command, it needs an exception for check-docs. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Fix 'git' wrapper usage stringThomas Rast
8b1fa77 (Allow passing of configuration parameters in the command line, 2010-03-26) forgot the closing ']' for the -c option. While we're there, also rewrap. Instead of folding the last two lines together, try to highlight that COMMAND is required by starting a line with it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26Documentation/git-push: Explain status output in more detailThomas Rast
Mention the effects of the receive.deny* family of options for the "remote rejected" case. While there, also split up the explanation into an easier-to-parse list format. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26Document receive.denyDeleteCurrentThomas Rast
This option was introduced by 747ca24 (receive-pack: receive.denyDeleteCurrent, 2009-02-08) but never documented. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26Cast execl*() NULL sentinels to (char *)Thomas Rast
The NULL sentinel argument to the execl*() family of calls must be cast to (char *), as otherwise: - platforms where NULL is just 0 (not (void *)) would pass an int - (admittedly esoteric) platforms where NULL is (void *)0 and (void *) and (char *) have different memory layouts would pass the wrong kind of pointer Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26git-read-tree.txt: acknowledge the directory matching bug in sparse checkoutNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26INSTALL: configure /etc/xml/catalog to build docs on CygwinJon Seymour
Without additional configuration steps, the documentation build on Cygwin fails because the XML catalog is missing required rewrites for certain docbook resources. This patch documents the required configuration. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-26t3700-add: fix dependence on stdout and stderr bufferingJohannes Sixt
One test case checked the stdout and stderr of 'git add' by constructing a single 'expect' file that contained both streams. But when the command runs, the order of stdout and stderr output is unpredictable because it depends on how the streams are buffered. At least on Windows, the buffering is different from what the test case expected. Hence, check the two output texts separately. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>