summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-11-17notes.c: Use two newlines (instead of one) when concatenating notesLibravatar Johan Herland5-3/+15
When using combine_notes_concatenate() to concatenate notes, it currently ensures exactly one newline character between the given notes. However, when using builtin/notes.c:create_note() to concatenate notes (e.g. by 'git notes append'), it adds a newline character to the trailing newline of the preceding notes object, thus resulting in _two_ newlines (aka. a blank line) separating contents of the two notes. This patch brings combine_notes_concatenate() into consistency with builtin/notes.c:create_note(), by ensuring exactly _two_ newline characters between concatenated notes. The patch also changes a few notes-related selftests accordingly. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-17(trivial) t3303: Indent with tabs instead of spaces for consistencyLibravatar Johan Herland1-9/+9
The rest of the file uses tabs for indenting. Fix the one function that doesn't. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-17notes.h/c: Propagate combine_notes_fn return value to add_note() and beyondLibravatar Johan Herland4-37/+43
The combine_notes_fn functions uses a non-zero return value to indicate failure. However, this return value was converted to a call to die() in note_tree_insert(). Instead, propagate this return value out to add_note(), and return it from there to enable the caller to handle errors appropriately. Existing add_note() callers are updated to die() upon failure, thus preserving the current behaviour. The only exceptions are copy_note() and notes_cache_put() where we are able to propagate the add_note() return value instead. This patch has been improved by the following contributions: - Jonathan Nieder: Future-proof by always checking add_note() return value - Jonathan Nieder: Improve clarity of final if-condition in note_tree_insert() Thanks-to: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10notes.h/c: Allow combine_notes functions to remove notesLibravatar Johan Herland2-2/+26
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 commitLibravatar Johan Herland1-73/+73
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 APILibravatar Johan Herland2-1/+15
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()Libravatar Johan Herland1-0/+5
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()Libravatar Johan Herland1-1/+1
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 -vLibravatar René Scharfe2-2/+5
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 -CLibravatar Matthieu Moy2-6/+31
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-applyLibravatar Brad King1-0/+10
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 testLibravatar Thomas Rast1-1/+2
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 subdirectoryLibravatar Jonathan Nieder2-0/+19
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 functionsLibravatar Jonathan Nieder1-17/+25
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.Libravatar Matthieu Moy1-1/+1
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 maintLibravatar Junio C Hamano1-1/+0
* sv/maint-diff-q-clear-fix: Fix DIFF_QUEUE_CLEAR refactoring
2010-08-03Merge branch 'rr/svn-fe' into maintLibravatar Junio C Hamano3-2/+3
* 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 maintLibravatar Junio C Hamano9-33/+112
* 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 .gitignoreLibravatar Ramkumar Ramachandra1-0/+1
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 IncludePathLibravatar Ramkumar Ramachandra2-2/+2
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 maintLibravatar Junio C Hamano1-4/+3
* 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 optionLibravatar Ævar Arnfjörð Bjarmason1-3/+0
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 harnessLibravatar Ævar Arnfjörð Bjarmason1-1/+3
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-guiLibravatar Junio C Hamano9-33/+112
* 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 --parseoptLibravatar Thomas Rast1-2/+5
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 bugsLibravatar Junio C Hamano1-0/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02Fix DIFF_QUEUE_CLEAR refactoringLibravatar Junio C Hamano1-1/+0
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 startupLibravatar Pat Thoyts1-18/+37
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 loadedLibravatar Pat Thoyts1-1/+1
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 blameLibravatar Clément Poulain4-4/+51
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 win32Libravatar Pat Thoyts1-3/+8
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 cygwinLibravatar Heiko Voigt1-2/+2
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 environmentLibravatar Heiko Voigt1-2/+3
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 windowsLibravatar Heiko Voigt1-2/+2
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 againLibravatar Markus Heidelberg1-1/+1
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 filesLibravatar David D. Kilzer2-0/+44
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.Libravatar Matthieu Moy1-2/+10
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.1Libravatar Junio C Hamano4-3/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Sync with 1.7.1.2Libravatar Junio C Hamano5-3/+54
2010-07-27Git 1.7.1.2Libravatar Junio C Hamano3-2/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27Sync with 1.7.0 seriesLibravatar Junio C Hamano4-2/+44
2010-07-27Git 1.7.0.7Libravatar Junio C Hamano4-3/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27config --get --path: check for unset $HOMELibravatar Jonathan Nieder2-1/+25
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 -uLibravatar Stephen Boyd1-1/+1
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.Libravatar Matthieu Moy1-1/+2
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 gitrevisionsLibravatar Thomas Rast1-0/+1
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 stringLibravatar Thomas Rast1-2/+2
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-25Documentation/git-push: Explain status output in more detailLibravatar Thomas Rast1-10/+23
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-25Document receive.denyDeleteCurrentLibravatar Thomas Rast1-0/+4
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-25Cast execl*() NULL sentinels to (char *)Libravatar Thomas Rast1-6/+6
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>