aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* git-stash: use stdout instead of stderr for non error messagesMarco Costalba2008-01-05
| | | | | | | | | | | Some scripts and libraries check stderr to detect a failing command, instead of checking the exit code. Because the output from git-status is not primarily for machine consumption, it would not hurt to send these messages to stdout instead and it will make it easier to drive the command for such callers. Signed-off-by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update draft release notes for 1.5.4Junio C Hamano2008-01-05
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-am: Run git gc only once and not for every patch.Michael Stefaniuc2008-01-05
| | | | | | | | With "too many unreachable loose objects" git gc --auto will always trigger. This clutters the output of git am and thus git rebase. Signed-off-by: Michael Stefaniuc <mstefani@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t3800: do not use a temporary file to hold expected result.Junio C Hamano2008-01-05
| | | | | | | | | | | | | | | It is a good practice to write program output to a temporary file during the test, as it would allow easier postmortem when the tested program does break. But there is no benefit in writing the expected output out to the temporary. This actually fixes a bug in check_verify_failure() routine. The intention of the test seems to make sure the "git mktag" command fails, and it spits out the expected error message. But if the command did not fail as expected, the shell function as originally written would not have detected the failure. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t{3600,3800,5401}: do not use egrep when grep would doJunio C Hamano2008-01-05
| | | | | | | There is nothing _wrong_ with egrep per se, but this way we would have less dependency on external tools. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t7001: avoid unnecessary ERE when using grepMiklos Vajna2008-01-05
| | | | | | | | As pointed out by Junio, it's unnecessary to use "grep -E" and ".+" when we can just use "grep" and "..*". Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t7600: avoid GNUism in grepJunio C Hamano2008-01-05
| | | | | | | Using \+ to mean "one or more" in grep without -E is a GNU extension outside POSIX. Avoid it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge git://repo.or.cz/git-guiJunio C Hamano2008-01-04
|\ | | | | | | | | | | | | | | | | * git://repo.or.cz/git-gui: git-gui: Make commit log messages end with a newline Added Swedish translation. git-gui: Unconditionally use absolute paths with Cygwin git-gui: Handle file mode changes (644->755) in diff viewer git-gui: Move frequently used commands to the top of the context menu.
| * git-gui: Make commit log messages end with a newlinegitgui-0.9.1Bernt Hansen2007-12-29
| | | | | | | | | | | | | | | | | | | | | | | | Concatenating commit log messages from multiple commits works better when all of the commits end with a clean line break. Its good to be strict in what you create, and lenient in what you accept, and since we're creating here, we should always try to Do The Right Thing(tm). Signed-off-by: Bernt Hansen <bernt@alumni.uwaterloo.ca> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * Added Swedish translation.Peter Karlsson2007-12-29
| |
| * git-gui: Unconditionally use absolute paths with CygwinMark Levedahl2007-12-14
| | | | | | | | | | | | | | | | | | | | | | The mapping of Windows vs Cygwin/Posix paths is arbitrary and not knowable from the Posix side, so logic to determine whether to use relative paths to locate the git-gui library just does not work on Cygwin. Fix this to unconditionally use absolute path on Cygwin. (This fixes a regression from 1.5.4). Signed-off-by: Mark Levedahl <mdl123@verizon.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Handle file mode changes (644->755) in diff viewerShawn O. Pearce2007-12-14
| | | | | | | | | | | | | | Johannes Sixt pointed out the diff headers "old mode ..." and "new mode ..." were not being parsed properly by git-gui. We now include them in the diff viewer for a file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Move frequently used commands to the top of the context menu.Johannes Sixt2007-12-14
| | | | | | | | | | | | | | | | | | | | | | | | "Stage/Unstage Hunk" is probably the most frequently used command of the patch context menu *and* it is not available in some other form than the context menu. Therefore, it should go to the top. "Less Context" and "More Context" entries are also not easily available otherwise, and are therefore, moved second. The other entries are available via key strokes (Copy, Paste, Refresh) or rarly used (Font Size, Options) and can go last. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Document git-reset defaults to HEAD if no commit is givenMarco Costalba2008-01-04
| | | | | | | | | | | | Signed-off by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff: remove lazy config loadingJeff King2008-01-04
| | | | | | | | | | | | | | | | | | | | | | | | There is no point to this. Either: 1. The program has already loaded git_diff_ui_config, in which case this is a noop. 2. The program didn't, which means it is plumbing that does not _want_ git_diff_ui_config to be loaded. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff: load funcname patterns in "basic" configJeff King2008-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The funcname patterns influence the "comment" on @@ lines of the diff. They are safe to use with plumbing since they don't fundamentally change the meaning of the diff in any way. Since all diff users call either diff_ui_config or diff_basic_config, we can get rid of the lazy reading of the config. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | add a "basic" diff config callbackJeff King2008-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff porcelain uses git_diff_ui_config to set porcelain-ish config options, like automatically turning on color. The plumbing specifically avoids calling this function, since it doesn't want things like automatic color or rename detection. However, some diff options should be set for both plumbing and porcelain. For example, one can still turn on color in git-diff-files using the --color command line option. This means we want the color config from color.diff.* (so that once color is on, we use the user's preferred scheme), but _not_ the color.diff variable. We split the diff config into "ui" and "basic", where "basic" is suitable for use by plumbing (so _most_ things affecting the output should still go into the "ui" part). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | receive-pack: reject invalid refnamesMartin Koegler2008-01-04
| | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Don't access line[-1] for a zero-length "line" from fgets.Jim Meyering2008-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A NUL byte at beginning of file, or just after a newline would provoke an invalid buf[-1] access in a few places. * builtin-grep.c (cmd_grep): Don't access buf[-1]. * builtin-pack-objects.c (get_object_list): Likewise. * builtin-rev-list.c (read_revisions_from_stdin): Likewise. * bundle.c (read_bundle_header): Likewise. * server-info.c (read_pack_info_file): Likewise. * transport.c (insert_packed_refs): Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-clean: make "Would remove ..." path relative to cwd againJunio C Hamano2008-01-03
| | | | | | | | | | | | | | The rewrite changed the output to use the path relative to the top of the work tree without a good reason. This fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix grammar nits in documentation and in code comments.Jim Meyering2008-01-03
| | | | | | | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Uninline prefixcmp()Junio C Hamano2008-01-03
| | | | | | | | | | | | | | | | | | Now the routine is an open-coded loop that avoids an extra strlen() in the previous implementation, it got a bit too big to be inlined. Uninlining it makes code footprint smaller but the result still retains the avoidance of strlen() cost. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update callers of check_ref_format()Junio C Hamano2008-01-02
| | | | | | | | | | | | | | | | | | | | This updates send-pack and fast-import to use symbolic constants for checking the return values from check_ref_format(), and also futureproof the logic in lock_any_ref_for_update() to explicitly name the case that is usually considered an error but is Ok for this particular use. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-svn: unlink index files that were globbed, tooEric Wong2008-01-02
| | | | | | | | | | | | | | | | | | | | | | | | commit 3157dd9e89a71e80673d0bc21b5c0630f3b1fe68 (git-svn: unlink internal index files after operations) introduced unlinking index files after fetching. However, this missed indices for refs that were created by globbing branches and tags. This will track all refs we ever touch during a fetch and unlink them at exit time. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-svn: allow dcommit --no-rebase to commit multiple, dependent changesEric Wong2008-01-02
| | | | | | | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | receive-pack: check object type of sha1 before using them as commitsMartin Koegler2008-01-02
| | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Optimize prefixcmp()Johannes Schindelin2008-01-02
| | | | | | | | | | | | | | | | | | | | | | Certain codepaths (notably "git log --pretty=format...") use prefixcmp() extensively, with very short prefixes. In those cases, calling strlen() is a wasteful operation, so avoid it. Initial patch by Marco Costalba. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | lock_any_ref_for_update(): reject wildcard return from check_ref_formatJunio C Hamano2008-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent check_ref_format() returns -3 as well as -1 (general error) and -2 (less than two levels). The caller was explicitly checking for -1, to allow "HEAD" but still needed to disallow bogus refs. This introduces symbolic constants for the return values from check_ref_format() to make them read better and more meaningful. Normal ref creation codepath can still treat non-zero return values as errors. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-reset: refuse to do hard reset in a bare repositoryJeff King2008-01-02
| | | | | | | | | | | | | | | | It makes no sense since there is no working tree. A soft reset should be fine, though. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | config: handle lack of newline at end of file betterJeff King2008-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config parsing routines use the static global 'config_file' to store the FILE* pointing to the current config file being parsed. The function get_next_char() automatically converts an EOF on this file to a newline for the convenience of its callers, and it sets config_file to NULL to indicate that EOF was reached. This throws away useful information, though, since some routines want to call ftell on 'config_file' to find out exactly _where_ the routine ended. In the case of a key ending at EOF boundary, we ended up segfaulting in some cases (changing that key or adding another key in its section), or failing to provide the necessary newline (adding a new section). This patch adds a new flag to indicate EOF and uses that instead of setting config_file to NULL. It also makes sure to add newlines where necessary for truncated input. All three included tests fail without the patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint' of git://linux-nfs.org/~bfields/gitJunio C Hamano2007-12-31
|\ \ | | | | | | | | | | | | | | | * 'maint' of git://linux-nfs.org/~bfields/git: Documentation/user-manual.txt: fix typo Documentation: fix remote.<name>.skipDefaultUpdate description
| * | Documentation/user-manual.txt: fix typoGustaf Hendeby2007-12-31
| | | | | | | | | | | | | | | Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | Documentation: fix remote.<name>.skipDefaultUpdate descriptionJ. Bruce Fields2007-12-31
| | | | | | | | | | | | | | | | | | Fix the subcommand name. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* | | git-rebase -i: clean-up error check codepath.Junio C Hamano2007-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | After replaying a single change, the code performed a number of checks, but some of them were for sanity checking, failures from which should make the command abort, and others were checks to see if it should make a new commit object. Stringing them together with "&&" was wrong. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-rebase -i behaves better on commits with incomplete messagesJunio C Hamano2007-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit message template when squashing multiple commits is prepared by concatenating the messages of existing commits together. If the messages from some of them end with incomplete lines, this would result in a suboptimal message template. Make sure that we add a terminating LF after each commit message. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fix double-free() in http-push.c:remote_exists()Grégoire Barbier2007-12-30
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | "git pull --tags": error out with a better message.Junio C Hamano2007-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git pull --tags" is run without any other arguments, the standard error message "You told me to fetch and merge stuff but there is nothing to merge! You might want to fix your config" is given. While the error may be technically correct, fixing the config would not help, as "git pull --tags" itself tells "git fetch" not to use the configured refspecs. This commit makes "git pull --tags" to issue a different error message to avoid confusion. This is merely an interim solution. In the longer term, it would be a better approach to change the semantics of --tags option to make "git fetch" and "git pull" to: (1) behave as if no --tags was given (so an explicit refspec on the command line overrides configured ones, or no explicit refspecs on the command line takes configured ones); but (2) no auto-following of tags is made even when using configured refspecs; and (3) fetch all tags as not-for-merge entries". Then we would not need to have this separate error message, as the ordinary merge will happen even with the --tags option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-sh-setup: document git_editor() and get_author_ident_from_commit()Miklos Vajna2007-12-28
| | | | | | | | | | | | | | | | | | | | | These 2 functions were missing from the manpage. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Documentation/git-submodule.txt: typofixJunio C Hamano2007-12-27
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | GIT 1.5.4-rc2v1.5.4-rc2Junio C Hamano2007-12-26
| | | | | | | | | | | | | | | | | | | | | Although everybody was quiet during the Christmas holiday, it's been a week since -rc1, so here is -rc2. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rs/pretty-safety'Junio C Hamano2007-12-26
|\ \ \ | | | | | | | | | | | | | | | | * rs/pretty-safety: Make "--pretty=format" parser a bit more careful.
| * | | Make "--pretty=format" parser a bit more careful.René Scharfe2007-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a commit message that does not have a terminating LF is read in and the memory that was allocated to read it happens to have a LF immediately after that, the code was not careful and went past the terminating NUL. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | contrib: resurrect scripted git-revert.Junio C Hamano2007-12-26
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ar/commit-cleanup'Junio C Hamano2007-12-26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ar/commit-cleanup: Allow selection of different cleanup modes for commit messages builtin-commit: avoid double-negation in the code. builtin-commit: fix amending of the initial commit t7005: do not exit inside test.
| * | | | Allow selection of different cleanup modes for commit messagesAlex Riesen2007-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although we traditionally stripped away excess blank lines, trailing whitespaces and lines that begin with "#" from the commit log message, sometimes the message just has to be the way user wants it. For instance, a commit message template can contain lines that begin with "#", the message must be kept as close to its original source as possible if you are converting from a foreign SCM, or maybe the message has a shell script including its comments for future reference. The cleanup modes are default, verbatim, whitespace and strip. The default mode depends on if the message is being edited and will either strip whitespace and comments (if editor active) or just strip the whitespace (for where the message is given explicitely). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | builtin-commit: avoid double-negation in the code.Junio C Hamano2007-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag no_edit meant "we have got final message from the user and will not editing it any further", but there were quite a few places that needed to check !no_edit. Rename the variable to use_editor and reverse the logic everywhere. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | builtin-commit: fix amending of the initial commitJunio C Hamano2007-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When amending initial commit without editor, the command incorrectly barfed because the check to see if there is anything to commit referenced the non-existent HEAD^1. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t7005: do not exit inside test.Junio C Hamano2007-12-22
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The way to signal failure is to leave non-zero in $?, not abort the entire test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix rewrite_diff() name quoting.Junio C Hamano2007-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the logic to quote two paths (prefix + path) in C-style introduced in the previous commit from the dump_quoted_path() in combine-diff.c to quote.c, and uses it to fix rewrite_diff() that never C-quoted the pathnames correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | combine-diff: Fix path quotingJunio C Hamano2007-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier when showing combined diff, the filenames on the ---/+++ header lines were quoted incorrectly. a/ (or b/) prefix was output literally and then the path was output, with c-quoting. This fixes the quoting logic, and while at it, adjusts the code to use the customizable prefix (a_prefix and b_prefix) introduced recently. Signed-off-by: Junio C Hamano <gitster@pobox.com>