Permalink
Switch branches/tags
Commits on Jun 6, 2012
  1. submodule: fix handling of superproject origin URLs like foo, ./foo a…

    jonseymour authored and gitster committed Jun 6, 2012
    …nd ./foo/bar
    
    Currently git submodule init and git submodule sync fail with an error
    if the superproject origin URL is of the form foo but succeed if the
    superproject origin URL is of the form ./foo or ./foo/bar or foo/bar.
    
    This change makes handling of the foo case behave like the handling
    of the ./foo case and also ensures that superfluous leading and
    embedded ./'s are removed from the resulting derived URLs.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. submodule: fix sync handling of some relative superproject origin URLs

    jonseymour authored and gitster committed Jun 6, 2012
    When the origin URL of the superproject is itself relative, git submodule sync
    configures the remote.origin.url configuration property of the submodule
    with a path that is relative to the work tree of the superproject
    rather than the work tree of the submodule.
    
    To fix this an 'up_path' that navigates from the work tree of the submodule
    to the work tree of the superproject needs to be prepended to the URL
    otherwise calculated.
    
    Correct handling of superproject origin URLs like foo, ./foo and ./foo/bar is
    left to a subsequent patch since an additional change is required to handle
    these cases.
    
    The documentation of resolve_relative_url() is expanded to give a more thorough
    description of the function's objective.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 3, 2012
  1. submodule: document failure to handle relative superproject origin URLs

    jonseymour authored and gitster committed Jun 3, 2012
    This test case documents several cases where handling of relative
    superproject origin URLs doesn't produce an expected result.
    
    submodule.{sub}.url in the superproject is incorrect in these cases:
      foo
      ./foo
      ./foo/bar
    
    The remote.origin.url of the submodule is incorrect in the above cases
    and also when the superproject origin URL is like:
      foo/bar
      ../foo
      ../foo/bar
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. submodule: additional regression tests for relative URLs

    jonseymour authored and gitster committed Jun 3, 2012
    Some additional tests are added to support regression testing of the changes in the
    remainder of the series.
    
    We also add a pristine copy of .gitmodules in anticipation of this being
    required by later tests.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 18, 2012
  1. rev-parse doc: --git-dir does not always show a relative path

    jonseymour authored and gitster committed May 18, 2012
    The description was misleading because it lead the reader to believe
    that --git-dir would always show a relative path when, in fact, the
    actual behaviour does not guarantee this.
    
    Rather, it was intended that the advice be given that if a relative
    path is shown, then the path is relative to the current working
    directory and not some other directory (for example, the root of the
    working tree).
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Acked-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 17, 2012
  1. git-svn: clarify the referent of dcommit's optional argument

    jonseymour authored and Eric Wong committed May 17, 2012
    The documentation of the dcommit subcommand is reworded to clarify that
    the optional argument refers to a git branch, not an SVN branch.
    
    The discussion of the optional argument is put into its own paragraph
    as is the guidance about using 'dcommit' in preference to 'set-tree'.
    
    The section on REBASE vs. PULL/MERGE is reworded to incorporate the
    advice to prefer 'git rebase' previously in the description of 'dcommit'.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Acked-by: Eric Wong <normalperson@yhbt.net>
Commits on Aug 30, 2011
  1. bisect: take advantage of gettextln, eval_gettextln.

    jonseymour authored and gitster committed Aug 30, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 9, 2011
  1. bisect: add support for bisecting bare repositories

    jonseymour authored and gitster committed Aug 9, 2011
    This enhances the support for bisecting history in bare repositories.
    
    The "git bisect" command no longer needs to be run inside a repository
    with a working tree; it defaults to --no-checkout when run in a bare
    repository.
    
    Two tests are included to demonstrate this behaviour.
    
    Suggested-by: Junio C Hamano <gitster@pobox.com>
    Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 8, 2011
  1. submodule: take advantage of gettextln and eval_gettextln.

    jonseymour authored and gitster committed Aug 7, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. stash: take advantage of eval_gettextln

    jonseymour authored and gitster committed Aug 7, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. pull: take advantage of eval_gettextln

    jonseymour authored and gitster committed Aug 7, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. git-am: take advantage of gettextln and eval_gettextln.

    jonseymour authored and gitster committed Aug 7, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. gettext: add gettextln, eval_gettextln to encode common idiom

    jonseymour authored and gitster committed Aug 7, 2011
    Currently, if you want to use gettext or eval_gettext to format a message
    you may have to add a separate echo statement and a surrounding subshell
    in order to interpolate the required trailing new line.
    
    This patch introduces two new helper functions, gettextln and eval_gettextln
    which append a trailing newline to the gettext output.
    
    This allows constructions of the form:
    
    	if test -s "$GIT_DIR/BISECT_START"
    	then
    		(
    			gettext "You need to give me at least one good and one bad revisions.
    (You can use \"git bisect bad\" and \"git bisect good\" for that.)" &&
    			echo
    		) >&2
    	else
    	...
    
    to be expressed more concisely as:
    
    	if test -s "$GIT_DIR/BISECT_START"
    	then
    		gettextln "You need to give me at least one good and one bad revisions.
    (You can use \"git bisect bad\" and \"git bisect good\" for that.)" >&2
    	else
    	...
    
    Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 5, 2011
  1. misc-sh: fix up whitespace in some other .sh files.

    jonseymour authored and gitster committed Aug 5, 2011
    I found that the patched 4 files were different when this
    filter is applied.
    
    	expand -i | unexpand --first-only
    
    This patch contains the corrected files.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. bisect: replace "; then" with "\n<tab>*then"

    jonseymour authored and gitster committed Aug 5, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. bisect: cleanup whitespace errors in git-bisect.sh.

    jonseymour authored and gitster committed Aug 5, 2011
    All leading whitespace is now encoded with tabs.
    
    After this patch, the following is true:
    
    	RAW=$(cat git-bisect.sh | md5sum) &&
    	ROUNDTRIP=$(cat git-bisect.sh | expand -i - | unexpand --first-only - | md5sum) &&
    	LEADING=$(sed -n "/^  */p" < git-bisect.sh | wc -l) &&
    	test $RAW = $ROUNDTRIP &&
    	test $LEADING = 0 &&
    	test -z "$(git diff -w HEAD~1 HEAD)"
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 4, 2011
  1. bisect: add documentation for --no-checkout option.

    jonseymour authored and gitster committed Aug 4, 2011
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. bisect: add tests for the --no-checkout option.

    jonseymour authored and gitster committed Aug 4, 2011
    These tests verify that git-bisect --no-checkout can successfully
    bisect commit histories that reference damaged trees.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. bisect: introduce --no-checkout support into porcelain.

    jonseymour authored and gitster committed Aug 4, 2011
    git-bisect can now perform bisection of a history without performing
    a checkout at each stage of the bisection process. Instead, HEAD is updated.
    
    One use-case for this function is allow git bisect to be used with
    damaged repositories where git checkout would fail because the tree
    referenced by the commit is damaged.
    
    It can also be used in other cases where actual checkout of the tree
    is not required to progress the bisection.
    
    Improved-by: Christian Couder <chriscool@tuxfamily.org>
    Improved-by: Junio C Hamano <gitster@pobox.com>
    Improved-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. bisect: introduce support for --no-checkout option.

    jonseymour authored and gitster committed Aug 4, 2011
    If --no-checkout is specified, then the bisection process uses:
    
    	git update-ref --no-deref HEAD <trial>
    
    at each trial instead of:
    
    	git checkout <trial>
    
    Improved-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. bisect: add tests to document expected behaviour in presence of broke…

    jonseymour authored and gitster committed Aug 4, 2011
    …n trees.
    
    If the repo is broken, we expect bisect to fail.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. bisect: use && to connect statements that are deferred with eval.

    jonseymour authored and gitster committed Aug 4, 2011
    Christian Couder pointed out that the existing eval strategy
    swallows an initial non-zero return. Using && to connect
    the statements should fix this.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. bisect: move argument parsing before state modification.

    jonseymour authored and gitster committed Aug 4, 2011
    Currently 'git bisect start' modifies some state prior to checking
    that its arguments are valid.
    
    This change moves argument validation before state modification
    with the effect that state modification does not occur
    unless argument validations succeeds.
    
    An existing test is changed to check that new bisect state
    is not created if arguments are invalid.
    
    A new test is added to check that existing bisect state
    is not modified if arguments are invalid.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 25, 2011
  1. Ensure git ls-tree exits with a non-zero exit code if read_tree_recur…

    jonseymour authored and gitster committed Jul 24, 2011
    …sive fails.
    
    In the case of a corrupt repository, git ls-tree may report an error but
    presently it exits with a code of 0.
    
    This change uses the return code of read_tree_recursive instead.
    
    Improved-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 24, 2011
  1. Add a test to check that git ls-tree sets non-zero exit code on error.

    jonseymour authored and gitster committed Jul 24, 2011
    Expected to fail at this commit, fixed by subsequent commit.
    
    Additional tests of adhoc or uncategorised nature should be added to this
    file.
    
    Improved-by: Jens Lehmann <Jens.Lehmann@web.de>
    Improved-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 2, 2011
  1. git: add --info-path and --man-path options

    jonseymour authored and gitster committed May 1, 2011
    Similar to the way the --html-path option lets UI programs learn where git
    has its HTML documentation pages, expose the other two paths used to store
    the documentation pages of these two types.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 6, 2011
  1. stash: fix false positive in the invalid ref test.

    jonseymour authored and gitster committed Apr 5, 2011
    Jeff King reported a problem with git stash apply incorrectly
    applying an invalid stash reference.
    
    There is an existing test that should have caught this, but
    the test itself was broken, resulting in a false positive.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 29, 2010
  1. stash: simplify parsing fixes

    jonseymour authored and gitster committed Sep 27, 2010
    This patch simplifies Brian's fix for the recent regression by:
    
    * eliminating the extra loop
    * eliminating use of git rev-parse for parsing flags
    * making use of the for opt idiom for the retained loop
    * eliminating the redundant -- case
    
    The patch has been tested with the tests in current maint.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. stash: fix git stash branch regression when branch creation fails

    jonseymour authored and gitster committed Sep 28, 2010
    "git stash branch <branch> <stash>" started discarding the stash
    when the branch creation fails.  It should have kept the stash
    intact when aborting.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 31, 2010
  1. t3903: fix broken test_must_fail calls

    jonseymour authored and gitster committed Aug 31, 2010
    Some tests in detached-stash are calling test_must_fail
    in such a way that the arguments to test_must_fail do, indeed, fail
    but not in the manner expected by the test.
    
    This patch removes the unnecessary and unhelpful double quotes.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. t1503: fix broken test_must_fail calls

    jonseymour authored and gitster committed Aug 31, 2010
    Some tests in maint-reflog-beyond-horizon are calling test_must_fail
    in such a way that the arguments to test_must_fail do, indeed, fail
    but not in the manner expected by the test.
    
    This patch removes the unnecessary and unhelpful double quotes.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 24, 2010
  1. rev-parse: tests git rev-parse --verify master@{n}, for various n

    jonseymour authored and gitster committed Aug 24, 2010
    This commit introduces tests that verify that rev-parse
    parses master@{n} correctly for various values of n less
    than, equal to and greater than the number of revisions
    in the reference log.
    
    In particular, these tests check that rev-parse exits with a
    non-zero status code and prints a message of the
    following form to stderr.
    
        fatal: Log for [^ ]* only has [0-9][0-9]* entries.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. sha1_name.c: use warning in preference to fprintf(stderr

    jonseymour authored and gitster committed Aug 24, 2010
    This commit changes sha1_name.c to use warning instead of
    fprintf(stderr).
    
    Trailing newlines from message formats have been removed
    since warning adds one itself.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. rev-parse: exit with non-zero status if ref@{n} is not valid.

    jonseymour authored and gitster committed Aug 24, 2010
    "The current behaviour of ref@{...} syntax parser is suboptimal:
    
        $ git rev-parse --verify jch@{99999} && echo true
        warning: Log for 'jch' only has 1368 entries.
        cfb88e9
        true
    
    It even knows that it is running off the cut-off point; it should just
    cause the caller to notice that fact.  I don't think changing it to error
    out should cause any harm to existing callers."
    
    With this change:
    
       $ git rev-parse --verify jch@{99999} || echo false
       fatal: Log for 'jch' only has 1368 entries.
       false
    
       $ git rev-parse jch@{99999} || echo false
       fatal: Log for 'jch' only has 1368 entries.
       false
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 22, 2010
  1. detached-stash: update Documentation

    jonseymour authored and gitster committed Aug 21, 2010
    Update the documentation to indicate that git stash branch only attempts
    to drop the specified stash if it looks like stash reference.
    
    Also changed the synopsis to more clearly indicate which commands require
    a stash entry reference as opposed to merely a stash-like commit.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>