summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-18Merge branch 'jc/doc-commit-only'Junio C Hamano
* jc/doc-commit-only: Documentation/git-commit: clarify that --only/--include records the working tree contents
2014-11-18Merge branch 'ta/tutorial-modernize'Junio C Hamano
* ta/tutorial-modernize: gittutorial.txt: remove reference to ancient Git version
2014-11-18Merge branch 'da/difftool'Junio C Hamano
Fix-up to a new feature in 'master'. * da/difftool: difftool: honor --trust-exit-code for builtin tools
2014-11-18t960[34]: mark cvsimport tests as requiring perlJeff King
Git-cvsimport is written in perl, which understandably causes the tests to fail if you build with NO_PERL (which will avoid building cvsimport at all). The earlier cvsimport tests in t9600-t9602 are all marked with a PERL prerequisite, but these ones are not. The one in t9603 was likely not noticed because it is an expected failure anyway. The ones in t9604 have been around for a long time, but it is likely that the combination of NO_PERL and having cvsps installed is rare enough that nobody noticed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-18t0090: mark add-interactive test with PERL prerequisiteJeff King
The add-interactive system is built in perl. If you build with NO_PERL, running "git commit --interactive" will exit with an error and the test will fail. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-18Makefile: have perl scripts depend on NO_PERL settingJeff King
If NO_PERL is not set, our perl scripts are built as usual. If it is set, then we build "dummy" versions that tell you git was built without perl support and exit gracefully. However, if you switch to NO_PERL in a directory with existing build artifacts, we do not notice that the files need rebuilt. We see only that they are newer than the "unimplemented.sh" wrapper and assume they are done. So doing: make make NO_PERL=Nope would result in a git-add--interactive script that uses perl (and running the test suite would make use of it). Instead, we should trigger a rebuild of the perl scripts anytime NO_PERL changes. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-18create_default_files(): don't set u+x bit on $GIT_DIR/configMichael Haggerty
Since time immemorial, the test of whether to set "core.filemode" has been done by trying to toggle the u+x bit on $GIT_DIR/config, which we know always exists, and then testing whether the change "took". I find it somewhat odd to use the config file for this test, but whatever. The test code didn't set the u+x bit back to its original state itself, instead relying on the subsequent call to git_config_set() to re-write the config file with correct permissions. But ever since daa22c6f8d config: preserve config file permissions on edits (2014-05-06) git_config_set() copies the permissions from the old config file to the new one. This is a good change in and of itself, but it invalidates the create_default_files()'s assumption, causing "git init" to leave the executable bit set on $GIT_DIR/config. Reset the permissions on $GIT_DIR/config when we are done with the test in create_default_files(). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-18l10n: Update Catalan translationAlex Henrie
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2014-11-17unpack_trees: plug leakage of o->resultJunio C Hamano
Most of the time the caller specifies to which destination variable the resulting index_state should be assigned by passing a non-NULL pointer in o->dst_index to receive that state, but for a caller that gives a NULL o->dst_index, the resulting index simply leaked. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17Merge branch 'master' of git://github.com/git-l10n/git-poJunio C Hamano
* 'master' of git://github.com/git-l10n/git-po: l10n: de.po: translate 62 new messages l10n: de.po: Fixup one translation l10n: de.po: use imperative form for command options
2014-11-17Documentation: change "gitlink" typo in git-pushbrian m. carlson
The git-push manual page used "gitlink" in one place instead of "linkgit". Fix this so the link renders correctly. Noticed-by: Dan Allen <dan.j.allen@gmail.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17apply: fix typo in an error messageSlavomir Vlcek
s/submoule/submodule Signed-off-by: Slavomir Vlcek <svlc@inventati.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17cmd_config(): make a copy of path obtained from git_path()Michael Haggerty
The strings returned by git_path() are recycled after a while. Make a copy of the config filename rather than holding onto the return value from git_path(). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17use labs() for variables of type long instead of abs()René Scharfe
Using abs() on long values can cause truncation, so use labs() instead. Reported by Clang 3.5 (-Wabsolute-value, enabled by -Wall). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17use labs() for variables of type long instead of abs()René Scharfe
Using abs() on long values can cause truncation, so use labs() instead. Reported by Clang 3.5 (-Wabsolute-value, enabled by -Wall). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-17Windows: correct detection of EISDIR in mingw_open()Johannes Sixt
According to the Linux open(2) man page, open() must return EISDIR if a directory was attempted to be opened for writing. Our emulation in mingw_open() does not get this right: it checks only for O_CREAT. Fix it to check for a write request. This fixes a failure in reflog handling, which opens files with O_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the named file happens to be a directory. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-15l10n: de.po: translate 62 new messagesRalf Thielow
Translate 62 new messages came from git.pot update in 16742b0 (l10n: git.pot: proposed updates for v2.2.0 (+62)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-11-15l10n: de.po: Fixup one translationStefan Beller
English grammar with German words doesn't make it a German translation. ;) Signed-off-by: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-11-14difftool: honor --trust-exit-code for builtin toolsDavid Aguilar
run_merge_tool() was not setting $status, which prevented the exit code for builtin tools from being forwarded to the caller. Capture the exit status and add a test to guarantee the behavior. Reported-by: Adria Farres <14farresa@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-14t3301: modernize styleJohan Herland
Make this test script appear somewhat less old-fashioned: - Use test helper functions: - write_script - test_commit - test_write_lines - test_line_count - test_config - test_unconfig - test_path_is_missing - Remove whitespace between redirection operators and their targets. - Move preparation of "expect" files into tests. - Rename "output" files to "actual". - More consistent quoting, especially around commands that might expand to nothing. - More visibility of important whitespace with ${indent}. - Combine pairs of tests that unnecessarily split setup and verification. Improved-by: Eric Sunshine <sunshine@sunshineco.com> Improved-by: Junio C Hamano <gitster@pobox.com> Improved-by: Michael Blume <blume.mike@gmail.com> Improved-by: Jeff King <peff@peff.net> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-14Git 2.2.0-rc2v2.2.0-rc2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-14l10n: de.po: use imperative form for command optionsRalf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-11-13checkout $tree: do not throw away unchanged index entriesJeff King
When we "git checkout $tree", we pull paths from $tree into the index, and then check the resulting entries out to the worktree. Our method for the first step is rather heavy-handed, though; it clobbers the entire existing index entry, even if the content is the same. This means we lose our stat information, leading checkout_entry to later rewrite the entire file with identical content. Instead, let's see if we have the identical entry already in the index, in which case we leave it in place. That lets checkout_entry do the right thing. Our tests cover two interesting cases: 1. We make sure that a file which has no changes is not rewritten. 2. We make sure that we do update a file that is unchanged in the index (versus $tree), but has working tree changes. We keep the old index entry, and checkout_entry is able to realize that our stat information is out of date. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-13gittutorial: fix output of 'git status'Stefan Naewe
'git status' doesn't output leading '#'s these days. Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-13t5705: the file:// URL should be absoluteTorsten Bögershausen
The test misused a URL "file://." to mean "relative to here", which we no longer accept. In a file:// URL, typically there is no host, and RFC1738 says that file:///<path> should be used. Update t5705 to use a working URL. Reported-by: Michael Blume <blume.mike@gmail.com> Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-13builtin: move builtin retrieval to get_builtin()Slavomir Vlcek
There was a redundant code for a builtin command retrieval in 'handle_builtin()' and 'is_builtin()'. Introduce a new function 'get_builtin()' and using it from both of these places to reduce the redundancy. Signed-off-by: Slavomir Vlcek <svlc@inventati.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-13SubmittingPatches: final submission is To: maintainer and CC: listSlavomir Vlcek
In an earlier part there is: "re-send it with "To:" set to the maintainer [*1*] and "cc:" the list [*2*]" for the final submission, but later we see "Send it to the list and cc the maintainer." Fix the later one to match the previous. Signed-off-by: Slavomir Vlcek <svlc@inventati.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12Update draft release notes to 2.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12Sync with 'maint'Junio C Hamano
2014-11-12Merge branch 'nd/gitignore-trailing-whitespace' into maintJunio C Hamano
* nd/gitignore-trailing-whitespace: gitignore.txt: fix spelling of "backslash"
2014-11-12Merge branch 'jk/fetch-reflog-df-conflict'Junio C Hamano
Fix-up a test for portability. * jk/fetch-reflog-df-conflict: t1410: fix breakage on case-insensitive filesystems
2014-11-12notes: empty notes should be shown by 'git log'Johan Herland
If the user has gone through the trouble of explicitly adding an empty note, then "git log" should not silently skip it (as if it didn't exist). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12builtin/notes: add --allow-empty, to allow storing empty notesJohan Herland
Although the "git notes" man page advertises that we support binary-safe notes addition (using the -C option), we currently do not support adding the empty note (i.e. using the empty blob to annotate an object). Instead, an empty note is always treated as an intent to remove the note altogether. Introduce the --allow-empty option to the add/append/edit subcommands, to explicitly allow an empty note to be stored into the notes tree. Also update the documentation, and add test cases for the new option. Reported-by: James H. Fisher <jhf@trifork.com> Improved-by: Kyle J. McKay <mackyle@gmail.com> Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12builtin/notes: split create_note() to clarify add vs. remove logicJohan Herland
create_note() has a non-trivial interface, and comprises three loosely related parts: 1. launching the editor with the note contents, if needed 2. appending to an existing note, if append_only was given 3. adding or removing the resulting note, based on whether it's non-empty Split it along those lines to make the logic clearer: The first part goes into a new function - prepare_note_data(), with a simpler interface. The second part is moved into append_edit(), which is the only user of this code. Finally, the add vs. remove decision is moved into the callers (add() and append_edit()), keeping the logic for writing the actual note object in a separate function: write_note_data(). Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12builtin/notes: simplify early exit code in add()Johan Herland
Remove the need for 'retval' and the unnecessary goto. Also reorganize to only call free_note_data() is actually needed. Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-11doc: add some crossrefs between manual pagesMax Horn
In particular, git-fast-import and -export link to each other, and gitremote-helpers links to existing remote helpers, and vice versa. Also link to fast-import from the remote helper spec, as this is relevant for remote helpers using the fast-import format. Signed-off-by: Max Horn <max@quendi.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-11gittutorial.txt: remove reference to ancient Git versionThomas Ackermann
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-11Sync with maintJunio C Hamano
* maint:
2014-11-11Merge branch 'rs/clean-menu-item-defn' into maintJunio C Hamano
* rs/clean-menu-item-defn: clean: use f(void) instead of f() to declare a pointer to a function without arguments
2014-11-10run-command: use void to declare that functions take no parametersRené Scharfe
Explicitly declare that git_atexit_dispatch() and git_atexit_clear() take no parameters instead of leaving their parameter list empty and thus unspecified. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10builtin/notes: refactor note file path into struct note_dataJohan Herland
Move the 'path' variable from create_note() and into the note_data struct. Unify cleanup of note_data objects with a free_note_data() function. This might not make too much sense on its own, but it makes the future refactoring of create_note() considerably cleaner. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10builtin/notes: improve namingJohan Herland
In preparation for some needed refactoring, rename struct msg_arg to struct note_data, and rename its instances from "msg" to "d" (also removing some unnecessary parentheses). The 'msg_arg' name was inherited from tag.c, but is not really a good name for the contents of a note. Also rename write_note_data() to copy_obj_to_fd(), which more aptly describes what it actually does: Copying the contents of a git object (given by its SHA1) into a given file descriptor. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10t3301: verify that 'git notes' removes empty notes by defaultJohan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine <sunshine@sunshineco.com> Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10builtin/notes: fix premature failure when trying to add the empty blobJohan Herland
This fixes a small buglet when trying to explicitly add the empty blob as a note object using the -c or -C option to git notes add/append. Instead of failing with a nonsensical error message indicating that the empty blob does not exist, we should rather behave as if an empty notes message was given (e.g. using -m "" or -F /dev/null). The next patch contains a test that verifies the fixed behavior. Found-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10Merge branch 'master' of git://github.com/git-l10n/git-poJunio C Hamano
* 'master' of git://github.com/git-l10n/git-po: l10n: Updated Bulgarian translation of git (2296t,0f,0u) l10n: zh_CN: translations for git v2.2.0-rc0 l10n: sv.po: Update Swedish translation (2296t0f0u) l10n: fr.po (2296t) update for version 2.2.0 l10n: vi.po: Update new message strings l10n: git.pot: v2.2.0 round 1 (62 new, 23 removed)
2014-11-10Sync with maintJunio C Hamano
* maint: Documentation/config.txt: fix minor typo config.txt: fix typo
2014-11-10Merge branch 'js/diff-highlight-avoid-sigpipe'Junio C Hamano
* js/diff-highlight-avoid-sigpipe: diff-highlight: exit when a pipe is broken
2014-11-10Documentation/config.txt: fix minor typoThomas Quinot
Add a missing article at the beginning of a sentence, and rephrase slightly. Signed-off-by: Thomas Quinot <thomas@quinot.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10config.txt: fix typoNicolas Dermine
Signed-off-by: Nicolas Dermine <nicolas.dermine@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10use args member of struct child_processRené Scharfe
Convert users of struct child_process to using the managed argv_array args instead of providing their own. This shortens the code a bit and ensures that the allocated memory is released automatically after use. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>