Switch branches/tags
Commits on Aug 6, 2008
  1. GIT

    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 6, 2008
  2. Files given on the command line are relative to $cwd

    When running "git commit -F file" and "git tag -F file" from a
    subdirectory, we should take it as relative to the directory we started
    from, not relative to the top-level directory.
    This adds a helper function "parse_options_fix_filename()" to make it more
    convenient to fix this class of issues.  Ideally, parse_options() should
    support a new type of option, "OPT_FILENAME", to do this uniformly, but
    this patch is meant to go to 'maint' to fix it minimally.
    One thing to note is that value for "commit template file" that comes from
    the command line is taken as relative to $cwd just like other parameters,
    but when it comes from the configuration varilable 'commit.template', it
    is taken as relative to the working tree root as before.  I think this
    difference actually is sensible (not that I particularly think
    commit.template itself is sensible).
    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 6, 2008
  3. fix diff-tree --stdin documentation

    Long time ago, the feature of "diff-tree --stdin" to take a commit and its
    parents on one line was broken, and did not support the common:
        git rev-list --parents $commits... -- $paths... |
        git diff-tree --stdin -v -p
    usage pattern by Porcelains properly.  For diff-tree to talk sensibly
    about commits, it needs to see commits, not just trees; the code was fixed
    to take list of commits on the standard input in 1.2.0.
    However we left the documentation stale for a long time, until Karl
    Hasselström finally noticed it very recently.
    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 6, 2008
  4. RelNotes updates

    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 6, 2008
  5. diff.renamelimit is a basic diff configuration

    The configuration was added as a core option in 3299c6f (diff: make
    default rename detection limit configurable., 2005-11-15), but 9ce392f
    (Move diff.renamelimit out of default configuration., 2005-11-21)
    separated diff-related stuff out of the core.
    Up to that point it was Ok.
    When we separated the Porcelain options out of the git_diff_config in
    83ad63c (diff: do not use configuration magic at the core-level,
    2006-07-08), we should have been more careful.
    This mistake made diff-tree plumbing and git-show Porcelain to notice
    different set of renames when the user explicitly asked for rename
    Signed-off-by: Junio C Hamano <>
    torvalds committed with gitster Aug 5, 2008
Commits on Aug 5, 2008
  1. git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.

    Signed-off-by: Jim Meyering <>
    Signed-off-by: Junio C Hamano <>
    meyering committed with gitster Aug 5, 2008
  2. Documentation: typos / spelling fixes in older RelNotes

    Signed-off-by: Mike Ralphson <>
    Signed-off-by: Junio C Hamano <>
    MikeRalphson committed with gitster Aug 5, 2008
Commits on Aug 3, 2008
  1. git-name-rev: don't use printf without format

    printf() without an explicit format string is not a good coding practise,
    unless the printed string is guaranteed to not contain percent signs.  While
    fixing this, we might as well combine the calls to fwrite() and printf().
    Signed-off-by: Rene Scharfe <>
    Signed-off-by: Junio C Hamano <>
    René Scharfe committed with gitster Aug 3, 2008
Commits on Aug 2, 2008
  1. git-name-rev: allow --name-only in combination with --stdin

    Signed-off-by: Pieter de Bie <>
    Signed-off-by: Junio C Hamano <>
    pieter committed with gitster Jul 31, 2008
  2. builtin-name-rev.c: split deeply nested part from the main function

    The main function of this command implementation tries to do too many
    things.  Split out a handling of single input line into a separate
    function to reduce nesting level and clutter.
    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 2, 2008
  3. Start RelNotes to describe accumulated fixes

    Signed-off-by: Junio C Hamano <>
    gitster committed Aug 2, 2008
  4. Make git-add -i accept ranges like 7-

    git-add -i ranges expect number-number. But for the supremely lazy, typing in
    that second number when selecting "from patch 7 to the end" is wasted effort.
    So treat an empty second number in a range as "until the last item".
    Signed-off-by: Ciaran McCreesh <>
    Signed-off-by: Junio C Hamano <>
    ciaranm committed with gitster Jul 14, 2008
  5. Update my e-mail address

    The old address is still getting mails from gitters.
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 21, 2008
  6. git-diff(1): "--c" -> "--cc" typo fix

    git diff does not take a --c option.
    Signed-off-by: Jonathan Nieder <>
    Signed-off-by: Junio C Hamano <>
    Jonathan Nieder committed with gitster Jul 21, 2008
  7. git-submodule: move ill placed shift.

    When running git submodule update -i, the "-i" is shifted before recursing
    into cmd_init and then again outside of the loop. This causes some /bin/sh
    to complain about shifting when there are no arguments left (and would
    discard anything written after -i too).
    Signed-off-by: Pierre Habouzit <>
    Signed-off-by: Junio C Hamano <>
    MadCoder committed with gitster Jul 21, 2008
  8. t/ add newline at end of file

    Some shells hang when parsing the script if the last statement is not
    followed by a newline. So add one.
    Signed-off-by: Brandon Casey <>
    Signed-off-by: Junio C Hamano <>
    Brandon Casey committed with gitster Jul 22, 2008
  9. sort_in_topological_order(): avoid setting a commit flag

    We used to set the TOPOSORT flag of commits during the topological
    sorting, but we can just as well use the member "indegree" for it:
    indegree is now incremented by 1 in the cases where the commit used
    to have the TOPOSORT flag.
    This is the same behavior as before, since indegree could not be
    non-zero when TOPOSORT was unset.
    Incidentally, this fixes the bug in show-branch where the 8th column
    was not shown: show-branch sorts the commits in topological order,
    assuming that all the commit flags are available for show-branch's
    private matters.
    But this was not true: TOPOSORT was identical to the flag corresponding
    to the 8th ref.  So the flags for the 8th column were unset by the
    topological sorting.
    Signed-off-by: Johannes Schindelin <>
    Signed-off-by: Junio C Hamano <>
    dscho committed with gitster Jul 23, 2008
  10. Documentation: clarify diff --cc

    The definition of an "uninteresting" hunk was not in line with reality.
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 23, 2008
  11. Propagate -u/--upload-pack option of "git clone" to transport.

    The -u option to override the remote system's path to git-upload-pack was
    being ignored by "git clone"; caused by a missing call to
    transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in
    when git-clone was converted from shell to C.
    Signed-off-by: Steve Haslam <>
    Signed-off-by: Junio C Hamano <>
    Steve Haslam committed with gitster Jul 25, 2008
  12. Documentation: fix diff.external example

    The diff.external examples pass a flag to gnu-diff, but GNU diff
    does not follow the GIT_EXTERNAL_DIFF interface.
    Signed-off-by: Anders Melchiorsen <>
    Signed-off-by: Junio C Hamano <>
    Anders Melchiorsen committed with gitster Jul 27, 2008
  13. make sure parsed wildcard refspec ends with slash

    A wildcard refspec is internally parsed into a refspec structure with src
    and dst strings.  Many parts of the code assumed that these do not include
    the trailing "/*" when matching the wildcard pattern with an actual ref we
    see at the remote.  What this meant was that we needed to make sure not
    just that the prefix matched, and also that a slash followed the part that
    But a codepath that scans the result from ls-remote and finds matching
    refs forgot to check the "matching part must be followed by a slash" rule.
    This resulted in "refs/heads/b1" from the remote side to mistakenly match
    the source side of "refs/heads/b/*:refs/remotes/b/*" refspec.
    Worse, the refspec crafted internally by "git-clone", and a hardcoded
    preparsed refspec that is used to implement "git-fetch --tags", violated
    this "parsed widcard refspec does not end with slash" rule; simply adding
    the "matching part must be followed by a slash" rule then would have
    broken codepaths that use these refspecs.
    This commit changes the rule to require a trailing slash to parsed
    wildcard refspecs.  IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as
    src = "refs/heads/b/" and dst = "refs/remotes/b/".  This allows us to
    simplify the matching logic because we only need to do a prefixcmp() to
    notice "refs/heads/b/one" matches and "refs/heads/b1" does not.
    Acked-by: Daniel Barkalow <>
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 27, 2008
  14. init: handle empty "template" parameter

    If a user passes "--template=", then our template parameter
    is blank. Unfortunately, copy_templates() assumes it has at
    least one character, and does all sorts of bad things like
    reading from template[-1] and then proceeding to link all of
    '/' into the .git directory.
    This patch just checks for that condition in copy_templates
    and aborts. As a side effect, this means that --template=
    now has the meaning "don't copy any templates."
    Signed-off-by: Junio C Hamano <>
    peff committed with gitster Jul 28, 2008
  15. builtin-revert.c: typofix

    Signed-off-by: Stephan Beyer <>
    Signed-off-by: Junio C Hamano <>
    sbeyer committed with gitster Aug 2, 2008
Commits on Jul 25, 2008
  1. Makefile: fix shell quoting

    Makefile records paths to a few programs in GIT-BUILD-OPTIONS file.  These
    paths need to be quoted twice: once to protect specials from the shell
    that runs the generated GIT-BUILD-OPTIONS file, and again to protect them
    (and the first level of quoting itself) from the shell that runs the
    "echo" inside the Makefile.
    You can test this by trying:
        $ ln -s /bin/tar "$HOME/Tes' program/tar"
        $ make TAR="$HOME/Tes' program/tar" test
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 25, 2008
  2. tests: propagate $(TAR) down from the toplevel Makefile

    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 25, 2008
  3. index-pack.c: correctly initialize appended objects

    When index-pack completes a thin pack it appends objects to the pack.
    Since the commit 92392b4(index-pack: Honor core.deltaBaseCacheLimit when
    resolving deltas) such an object can be pruned in case of memory
    pressure, and will be read back again by get_data_from_pack().  For this
    to work, the fields in object_entry structure need to be initialized
    Noticed by Pierre Habouzit.
    Signed-off-by: Björn Steinbrink <>
    Acked-by: Nicolas Pitre <>
    Acked-by: Shawn O. Pearce <>
    Signed-off-by: Junio C Hamano <>
    dotdash committed with gitster Jul 24, 2008
  4. send-email: find body-encoding correctly

    In 8291db6 (git-send-email: add charset header if we add encoded 'From',
    2007-11-16), "$1" is used from a regexp without using () to capture
    anything in $1. Later, when that value was used, it causes a warning about
    a variable being undefined, instead of using the correct value for
    comparison (not that it makes difference in the current code that does not
    do actual re-encoding).
    Signed-off-by: Peter Valdemar Mørch <>
    Signed-off-by: Junio C Hamano <>
    pmorch committed with gitster Jul 25, 2008
Commits on Jul 23, 2008
  1. git-checkout: fix command line parsing.

    This fixes an issue when you use:
        $ git checkout -- <path1> [<paths>...]
    and that <path1> can also be understood as a reference. git-checkout
    mistakenly understands this as the same as:
        $ git checkout <path1> -- [<paths>...]
    because parse-options was eating the '--' and the argument parser thought
    he was parsing:
        $ git checkout <path1> [<paths>...]
    Where there indeed is an ambiguity
    Signed-off-by: Pierre Habouzit <>
    Signed-off-by: Junio C Hamano <>
    MadCoder committed with gitster Jul 23, 2008
Commits on Jul 20, 2008
  1. fix usage string for git grep

    Without this patch, git-grep gives confusing usage information:
    	$ git grep --confused
    	usage: git grep <option>* <rev>* [-e] <pattern> [<path>...]
    	$ git grep HEAD pattern
    	fatal: ambiguous argument 'pattern': unknown revision or path no
    	t in the working tree.
    	Use '--' to separate paths from revisions
    So put <pattern> before the <rev>s, in accordance with actual correct
    usage.  While we're changing the usage string, we might as well include
    the "--" separating revisions and paths, too.
    Signed-off-by: Jonathan Nieder <>
    Signed-off-by: Junio C Hamano <>
    Jonathan Nieder committed with gitster Jul 20, 2008
  2. refresh-index: fix bitmask assignment

    5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a
    new refresh option flag but did not assign a unique bit for it correctly,
    and broke "update-index --ignore-missing".
    This fixes it.
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 20, 2008
Commits on Jul 19, 2008
  1. GIT

    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 19, 2008
  2. builtin-rm: fix index lock file path

    When hold_locked_index() is called with a relative git_dir and you are
    outside the work tree, the lock file become relative to the current
    directory. So when later setup_work_tree() change the current directory
    it breaks lock file path and commit_locked_index() fails.
    This patch move index locking code after setup_work_tree() call to make
    lock file relative to the working tree as it should be and add a test
    Noticed by Nick Andrew.
    Signed-off-by: Olivier Marin <>
    Signed-off-by: Junio C Hamano <>
    Olivier Marin committed with gitster Jul 19, 2008
Commits on Jul 18, 2008
  1. Merge branch 'sp/maint-index-pack' into maint

    * sp/maint-index-pack:
      index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
      index-pack: Track the object_entry that creates each base_data
      index-pack: Chain the struct base_data on the stack for traversal
      index-pack: Refactor base arguments of resolve_delta into a struct
    gitster committed Jul 18, 2008
  2. http-fetch: do not SEGV after fetching a bad pack idx file

    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 18, 2008
  3. rev-list: honor --quiet option

    Nick Andrew noticed that rev-list lets --quiet option to be parsed by
    underlying diff_options parser but did not pick up the result.  This
    resulted in --quiet option to become effectively a no-op.
    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 18, 2008