Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 6, 2008
  1. @gitster

    Merge branch 'lh/git-file'

    gitster authored
    * lh/git-file:
      Teach GIT-VERSION-GEN about the .git file
      Teach git-submodule.sh about the .git file
      Teach resolve_gitlink_ref() about the .git file
      Add platform-independent .git "symlink"
Commits on Apr 20, 2008
  1. @gitster

    Merge branch 'py/submodule'

    gitster authored
    * py/submodule:
      builtin-status: Add tests for submodule summary
      builtin-status: submodule summary support
      git-submodule summary: --for-status option
Commits on Apr 15, 2008
  1. @mark987 @gitster

    git-submodule - possibly use branch name to describe a module

    mark987 authored gitster committed
    This changes the search logic for describing a submodule from:
    - annotated tag
    - any tag
    - tag on a subsequent commit
    - commit id
    
    to
    
    - annotated tag
    - any tag
    - tag on a subsequent commit
    - local or remote branch
    - commit id
    
    The change is describing with respect to a branch before falling
    back to the commit id. By itself, git-submodule will maintain submodules
    as headless checkouts without ever making a local branch. In
    general, such heads can always be described relative to the remote branch
    regardless of existence of tags, and so provides a better fallback
    summary than just the commit id.
    
    This requires inserting an extra describe step as --contains is
    incompatible with --all, but the latter can be used with --always
    to fall back to a commit ID. Also, --contains implies --tags, so the
    latter is not needed.
    
    Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 13, 2008
  1. @pkufranky @gitster

    git-submodule summary: --for-status option

    pkufranky authored gitster committed
    The --for-status option is mainly used by builtin-status/commit.
    It adds 'Modified submodules:' line at top and  '# ' prefix to all
    following lines.
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 12, 2008
  1. @pkufranky @gitster

    git-submodule: Avoid 'fatal: cannot describe' message

    pkufranky authored gitster committed
    When "git submodule status" command tries to show the name of the
    submodule HEAD revision more descriptively, but the submodule
    repository lacked a suitable tag to do so, it leaked "fatal: cannot
    describe" message to the UI.  Squelch it by using '--always'.
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 9, 2008
  1. @hjemli @gitster

    Teach git-submodule.sh about the .git file

    hjemli authored gitster committed
    When git-submodule tries to detect 'active' submodules, it checks for the
    existence of a directory named '.git'. This isn't good enough now that .git
    can be a file pointing to the real $GIT_DIR so the tests are changed to
    reflect this.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 15, 2008
  1. @gitster

    Merge branch 'jk/portable'

    gitster authored
    * jk/portable:
      t6000lib: re-fix tr portability
      t7505: use SHELL_PATH in hook
      t9112: add missing #!/bin/sh header
      filter-branch: use $SHELL_PATH instead of 'sh'
      filter-branch: don't use xargs -0
      add NO_EXTERNAL_GREP build option
      t6000lib: tr portability fix
      t4020: don't use grep -a
      add test_cmp function for test scripts
      remove use of "tail -n 1" and "tail -1"
      grep portability fix: don't use "-e" or "-q"
      more tr portability test script fixes
      t0050: perl portability fix
      tr portability fixes
  2. @gitster

    Merge branch 'py/submodule'

    gitster authored
    * py/submodule:
      git-submodule summary: fix that some "wc" flavors produce leading spaces
      git-submodule summary: test
      git-submodule summary: documentation
      git-submodule summary: limit summary size
      git-submodule summary: show commit summary
      git-submodule summary: code framework
Commits on Mar 13, 2008
  1. @peff @gitster

    grep portability fix: don't use "-e" or "-q"

    peff authored gitster committed
    System V versions of grep (such as Solaris /usr/bin/grep)
    don't understand either of these options. git's usage of
    "grep -e pattern" fell into one of two categories:
    
     1. equivalent to "grep pattern". -e is only useful here if
        the pattern begins with a "-", but all of the patterns
        are hardcoded and do not begin with a dash.
    
     2. stripping comments and blank lines with
    
          grep -v -e "^$" -e "^#"
    
        We can fortunately do this in the affirmative as
    
          grep '^[^#]'
    
    Uses of "-q" can be replaced with redirection to /dev/null.
    In many tests, however, "grep -q" is used as "if this string
    is in the expected output, we are OK". In this case, it is
    fine to just remove the "-q" entirely; it simply makes the
    "verbose" mode of the test slightly more verbose.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 12, 2008
  1. @gitster

    git-submodule summary: fix that some "wc" flavors produce leading spaces

    Johannes Sixt authored gitster committed
    We print the number of commits in parentheses, but without this change
    we would get an oddly looking line like this:
    
        * sm1 4c8d358...41fbea9 (      4):
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @pkufranky @gitster

    git-submodule summary: limit summary size

    pkufranky authored gitster committed
    This patch teaches git-submodule an option '--summary-limit|-n <number>'
    to limit number of commits in total for the summary of each submodule in
    the modified case (only a single commit is shown in other cases).
    
    Giving 0 will disable the summary; a negative number means unlimted, which
    is the default.
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @pkufranky @gitster

    git-submodule summary: show commit summary

    pkufranky authored gitster committed
    This patch does the hard work to show submodule commit summary.
    
    For a modified submodule, a series of commits will be shown with
    the following command:
    
        git log --pretty='format:%m %s' \
            --first-parent sha1_src...sha1_dst
    
    where the sha1_src is from the given super project commit and the
    sha1_dst is from the index or working tree (switched by --cached).
    
    For a deleted, added, or typechanged (blob<->submodule) submodule,
    only one single newest commit from the existing end (for example,
    src end for submodule deleted or type changed from submodule to blob)
    will be shown.
    
    If the src/dst sha1 for a submodule is missing in the submodule
    directory, a warning will be issued except in two cases where the
    submodule directory is deleted (type 'D') or typechanged to blob
    (one case of type 'T').
    
    In the title line for a submodule, the src/dst sha1 and the number
    of commits (--first-parent) between the two commits will be shown.
    
    The following example demonstrates most cases.
    
        Example: commit summary for modified submodules sm1-sm5.
        --------------------------------------------
        $ git submodule summary
        * sm1 354cd45...3f751e5 (4):
          < one line message for C
          < one line message for B
          > one line message for D
          > one line message for E
    
        * sm2 5c8bfb5...000000 (3):
          < one line message for F
    
        * sm3 354cd45...3f751e5:
          Warn: sm3 doesn't contain commit 354cd45
    
        * sm4 354cd34(submodule)-> 235efa(blob) (1):
          < one line message for G
    
        * sm5 354cd34(blob)-> 235efa(submodule) (5):
          > one line message for H
    
        --------------------------------------------
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @pkufranky @gitster

    git-submodule summary: code framework

    pkufranky authored gitster committed
    These patches teach git-submodule a new subcommand 'summary' to show
    commit summary of checked out submodules between a given super project
    commit (defaults to HEAD) and working tree (or index, when --cached is
    given).
    
    This patch just introduces the framework to find submodules which have
    summary to show. A submodule will have summary if it falls into these
    cases:
    
      - type 'M': modified and checked out    (1)
      - type 'A': added and checked out       (2)
      - type 'D': deleted
      - type 'T': typechanged (blob <-> submodule)
    
    Notes:
    
      1. There may be modified but not checked out cases. In the case of a
         merge conflict, even if the submodule is not checked out, there may
    	 be still a diff between index and HEAD on the submodule entry
    	 (i.e. modified). The summary will not be show for such a submodule.
      2. A similar explanation applies to the added but not checked out case.
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 5, 2008
  1. @mark987 @gitster

    git-submodule - Allow adding a submodule in-place

    mark987 authored gitster committed
    When working in the top-level project, it is useful to create a new
    submodule as a git repo in a subdirectory, then add that submodule to
    the top-level in place.
    
    This patch allows "git submodule add <intended url> subdir" to add the
    existing subdir to the current project.  The presumption is the user will
    later push / clone the subdir to the <intended url> so that future
    submodule init / updates will work.
    
    Absent this patch, "git submodule add" insists upon cloning the subdir
    from a repository at the given url, which is fine for adding an existing
    project in, but less useful when adding a new submodule from scratch to an
    existing project.  The former functionality remains, and the clone is
    attempted if the subdir does not already exist as a valid git repo.
    
    Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 3, 2008
  1. @pkufranky @gitster

    git-submodule: Fix typo 'url' which should be '$url'

    pkufranky authored gitster committed
    Fix typo in 'test -z "url"' when checking whether a submodule url is
    empty. "url" should be "$url".
    
    Signed-off-by: Ping Yin <pkufranky@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 21, 2008
  1. @gitster

    git-submodule: fix subcommand parser

    gitster authored
    The subcommand parser of "git submodule" made its subcommand
    names reserved words.  As a consequence, a command like this:
    
        $ git submodule add init update
    
    which is meant to add a submodule called 'init' at path 'update'
    was misinterpreted as a request to invoke more than one mutually
    incompatible subcommands and incorrectly rejected.
    
    This patch fixes the issue by stopping the subcommand parsing at
    the first subcommand word, to allow the sample command line
    above to work as expected.
    
    It also introduces the usual -- option disambiguator, so that a
    submodule at path '-foo' can be updated with
    
        $ git submodule update -- -foo
    
    without triggering an "unrecognized option -foo" error.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    git-submodule: rename shell functions for consistency

    gitster authored
    This renames the shell functions used in git-submodule that
    implement top-level subcommands.  The rule is that the
    subcommand $foo is implemented by cmd_$foo function.
    
    A noteworthy change is that modules_list() is now known as
    cmd_status().  There is no "submodule list" command.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 4, 2007
  1. @Tux @gitster

    Do not rely on the exit status of "unset" for unset variables

    Tux authored gitster committed
    POSIX says that exit status "0" means that "unset" successfully unset
    the variable.  However, it is kind of ambiguous if an environment
    variable which was not set could be successfully unset.
    
    At least the default shell on HP-UX insists on reporting an error in
    such a case, so just ignore the exit status of "unset".
    
    [Dscho: extended the patch to git-submodule.sh, as Junio realized that
     this is the only other place where we check the exit status of "unset".]
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 18, 2007
  1. @gitster

    Merge branch 'ph/parseopt-sh'

    gitster authored
    * ph/parseopt-sh:
      git-quiltimport.sh fix --patches handling
      git-am: -i does not take a string parameter.
      sh-setup: don't let eval output to be shell-expanded.
      git-sh-setup: fix parseopt `eval` string underquoting
      Give git-am back the ability to add Signed-off-by lines.
      git-rev-parse --parseopt
      scripts: Add placeholders for OPTIONS_SPEC
      Migrate git-repack.sh to use git-rev-parse --parseopt
      Migrate git-quiltimport.sh to use git-rev-parse --parseopt
      Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash
      Migrate git-instaweb.sh to use git-rev-parse --parseopt
      Migrate git-merge.sh to use git-rev-parse --parseopt
      Migrate git-am.sh to use git-rev-parse --parseopt
      Migrate git-clone to use git-rev-parse --parseopt
      Migrate git-clean.sh to use git-rev-parse --parseopt.
      Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt
      Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.
Commits on Nov 9, 2007
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      Start preparing for 1.5.3.6
      git-send-email: Change the prompt for the subject of the initial message.
      SubmittingPatches: improve the 'Patch:' section of the checklist
      instaweb: Minor cleanups and fixes for potential problems
      stop t1400 hiding errors in tests
      Makefile: add missing dependency on wt-status.h
      refresh_index_quietly(): express "optional" nature of index writing better
      Fix sed string regex escaping in module_name.
      Avoid a few unportable, needlessly nested "...`...".
      git-mailsplit: with maildirs not only process cur/, but also new/
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 8, 2007
  1. @gitster

    Fix sed string regex escaping in module_name.

    Ralf Wildenhues authored gitster committed
    When escaping a string to be used as a sed regex, it is important
    to only escape active characters.  Escaping other characters is
    undefined according to POSIX, and in practice leads to issues with
    extensions such as GNU sed's \+.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 6, 2007
  1. @gitster

    scripts: Add placeholders for OPTIONS_SPEC

    gitster authored
    --text follows this line--
    These commands currently lack OPTIONS_SPEC; allow people to
    easily list with "git grep 'OPTIONS_SPEC=$'" what they can help
    improving.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 30, 2007
  1. @gitster

    Fix adding a submodule with a remote url

    Daniel Barkalow authored gitster committed
    Without this, a non-path URL gets lost before the clone.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 25, 2007
  1. @mark987 @gitster

    git-submodule - allow a relative path as the subproject url

    mark987 authored gitster committed
    This allows a subproject's location to be specified and stored as relative
    to the parent project's location (e.g., ./foo, or ../foo). This url is
    stored in .gitmodules as given. It is resolved into an absolute url by
    appending it to the parent project's url when the information is written
    to .git/config (i.e., during submodule add for the originator, and
    submodule init for a downstream recipient). This allows cloning of the
    project to work "as expected" if the project is hosted on a different
    server than when the subprojects were added.
    
    Signed-off-by: Mark Levedahl <mdl123@verizon.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 23, 2007
  1. @gitster

    Supplant the "while case ... break ;; esac" idiom

    David Kastrup authored gitster committed
    A lot of shell scripts contained stuff starting with
    
    	while case "$#" in 0) break ;; esac
    
    and similar.  I consider breaking out of the condition instead of the
    body od the loop ugly, and the implied "true" value of the
    non-matching case is not really obvious to humans at first glance.  It
    happens not to be obvious to some BSD shells, either, but that's
    because they are not POSIX-compliant.  In most cases, this has been
    replaced by a straight condition using "test".  "case" has the
    advantage of being faster than "test" on vintage shells where "test"
    is not a builtin.  Since none of them is likely to run the git
    scripts, anyway, the added readability should be worth the change.
    
    A few loops have had their termination condition expressed
    differently.
    
    Signed-off-by: David Kastrup <dak@gnu.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 17, 2007
  1. @hjemli @gitster

    git-submodule: re-enable 'status' as the default subcommand

    hjemli authored gitster committed
    This was broken as part of ecda072.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Acked-by: Sven Verdoolaege <skimo@kotnet.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 25, 2007
  1. @gitster

    git-submodule: remove redundant call to git-describe

    gitster authored
    The code to find a more descriptive name given a commit in a
    submodule were improved in bffe71f, but it forgot to remove the
    older logic the patch replaced.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    git-submodule module_name: avoid using unwieldy "value_regexp" feature.

    gitster authored
    "module_name $path" function wants to look up a configuration
    variable "submodule.<modulename>.path" whose value is $path, and
    return the <modulename> found.  "git-config --get-regexp" is the
    natural thing to use for this, but (1) its value matching has an
    unfortunate "feature" that takes leading '!' specially, and (2)
    its output needs to be parsed with sed to extract <modulename>
    part anyway.
    
    This changes the call to "git-config --get-regexp" not to use
    the value-regexp part, and moves the "pick the one whose value
    is $path" part to the downstream sed.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 4, 2007
  1. @neurocyte @gitster

    git-submodule: Fix two instances of the same typo

    neurocyte authored gitster committed
    They break the output of git submodule status.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 3, 2007
  1. @gitster

    Rewrite "git-frotz" to "git frotz"

    gitster authored
    This uses the remove-dashes target to replace "git-frotz" to "git frotz".
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 2, 2007
  1. @gitster

    git-submodule: Instead of using only annotated tags, use any tags.

    Emil Medve authored gitster committed
    Some repositories might not use/have annotated tags (for example the
    ones created with git-cvsimport) and git-submodule status might fail
    because git-describe might fail to find a tag.  This change allows the
    status of a submodule to be described/displayed relative to lightweight
    tags as well.
    
    Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    git-submodule: provide easy way of adding new submodules

    Sven Verdoolaege authored gitster committed
    To make a submodule effectively usable, the path and
    a URL where the submodule can be cloned need to be stored
    in .gitmodules.  This subcommand takes care of setting
    this information after cloning the new submodule.
    Only the index is updated, so, if needed, the user may still
    change the URL or switch to a different branch of the submodule
    before committing.
    
    Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 12, 2007
  1. @hjemli @gitster

    git-submodule: give submodules proper names

    hjemli authored gitster committed
    This changes the way git-submodule uses .gitmodules: Subsections no longer
    specify the submodule path, they now specify the submodule name. The
    submodule path is found under the new key "submodule.<name>.path", which is
    a required key.
    
    With this change a submodule can be moved between different 'checkout paths'
    without upsetting git-submodule.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @hjemli @gitster

    Rename sections from "module" to "submodule" in .gitmodules

    hjemli authored gitster committed
    Rename [module] to [submodule], so that it would be more
    forward compatible with the proposed extension by harmonizing
    the section names used in .gitmodules and .git/config.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @hjemli @gitster

    git-submodule: remember to checkout after clone

    hjemli authored gitster committed
    After the initial clone of a submodule, no files would be checked out in
    the submodule directory if the submodule HEAD was equal to the SHA-1
    specified in the index of the containing repository. This fixes the problem
    by simply ignoring submodule HEAD for a fresh clone.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.