Skip to content
This repository

Feb 11, 2009

  1. Junio C Hamano

    Revert "Merge branch 'js/notes'"

    This reverts commit 7b75b33, reversing
    changes made to 5d680a6.
    authored February 10, 2009

Dec 21, 2008

  1. dscho

    Introduce commit notes

    Commit notes are blobs which are shown together with the commit
    message.  These blobs are taken from the notes ref, which you can
    configure by the config variable core.notesRef, which in turn can
    be overridden by the environment variable GIT_NOTES_REF.
    
    The notes ref is a branch which contains "files" whose names are
    the names of the corresponding commits (i.e. the SHA-1).
    
    The rationale for putting this information into a ref is this: we
    want to be able to fetch and possibly union-merge the notes,
    maybe even look at the date when a note was introduced, and we
    want to store them efficiently together with the other objects.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored December 20, 2008 gitster committed December 21, 2008

Nov 15, 2008

  1. Linus Torvalds

    Add cache preload facility

    This can do the lstat() storm in parallel, giving potentially much
    improved performance for cold-cache cases or things like NFS that have
    weak metadata caching.
    
    Just use "read_cache_preload()" instead of "read_cache()" to force an
    optimistic preload of the index stat data.  The function takes a
    pathspec as its argument, allowing us to preload only the relevant
    portion of the index.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored November 13, 2008 gitster committed November 14, 2008

Nov 11, 2008

  1. Junio C Hamano

    Merge branch 'maint'

    * maint:
      Fix non-literal format in printf-style calls
      git-submodule: Avoid printing a spurious message.
      git ls-remote: make usage string match manpage
      Makefile: help people who run 'make check' by mistake
    authored November 11, 2008
  2. Daniel Lowe

    Fix non-literal format in printf-style calls

    These were found using gcc 4.3.2-1ubuntu11 with the warning:
    
        warning: format not a string literal and no format arguments
    
    Incorporated suggestions from Brandon Casey <casey@nrlssc.navy.mil>.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored November 10, 2008 gitster committed November 11, 2008

Oct 31, 2008

  1. Junio C Hamano

    Merge branch 'ar/maint-mksnpath' into ar/mksnpath

    * ar/maint-mksnpath:
      Use git_pathdup instead of xstrdup(git_path(...))
      git_pathdup: returns xstrdup-ed copy of the formatted path
      Fix potentially dangerous use of git_path in ref.c
      Add git_snpath: a .git path formatting routine with output buffer
    
    Conflicts:
    	builtin-revert.c
    	refs.c
    	rerere.c
    authored October 30, 2008
  2. Use git_pathdup instead of xstrdup(git_path(...))

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored October 27, 2008 gitster committed October 30, 2008

Sep 30, 2008

  1. Dmitry Potapov

    add have_git_dir() function

    This function is used to learn whether git_dir is already set up or not.
    It is necessary, because we want to read configuration in compat/cygwin.c
    
    Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    authored September 27, 2008 spearce committed September 30, 2008

Jul 29, 2008

  1. Make use of stat.ctime configurable

    A new configuration variable 'core.trustctime' is introduced to
    allow ignoring st_ctime information when checking if paths
    in the working tree has changed, because there are situations where
    it produces too much false positives.  Like when file system crawlers
    keep changing it when scanning and using the ctime for marking scanned
    files.
    
    The default is to notice ctime changes.
    
    Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored July 28, 2008 gitster committed July 28, 2008

Jun 28, 2008

  1. Dmitry Potapov

    shrink git-shell by avoiding redundant dependencies

    A lot of modules that have nothing to do with git-shell functionality
    were linked in, bloating git-shell more than 8 times.
    
    This patch cuts off redundant dependencies by:
    1. providing stubs for three functions that make no sense for git-shell;
    2. moving quote_path_fully from environment.c to quote.c to make the
       later self sufficient;
    3. moving make_absolute_path into a new separate file.
    
    The following numbers have been received with the default optimization
    settings on master using GCC 4.1.2:
    
    Before:
       text    data     bss     dec     hex filename
     143915    1348   93168  238431   3a35f git-shell
    
    After:
       text    data     bss     dec     hex filename
      17670     788    8232   26690    6842 git-shell
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored June 28, 2008 gitster committed June 27, 2008

Jun 25, 2008

  1. Junio C Hamano

    Merge branch 'lt/config-fsync'

    * lt/config-fsync:
      Add config option to enable 'fsync()' of object files
      Split up default "i18n" and "branch" config parsing into helper routines
      Split up default "user" config parsing into helper routine
      Split up default "core" config parsing into helper routine
    authored June 25, 2008

Jun 20, 2008

  1. environment.c: remove unused function

    get_refs_directory() is not used anywhere.
    
    Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored June 19, 2008 gitster committed June 19, 2008

Jun 18, 2008

  1. Linus Torvalds

    Add config option to enable 'fsync()' of object files

    As explained in the documentation[*] this is totally useless on
    filesystems that do ordered/journalled data writes, but it can be a
    useful safety feature on filesystems like HFS+ that only journal the
    metadata, not the actual file contents.
    
    It defaults to off, although we could presumably in theory some day
    auto-enable it on a per-filesystem basis.
    
    [*] Yes, I updated the docs for the thing.  Hell really _has_ frozen
        over, and the four horsemen are probably just beyond the horizon.
        EVERYBODY PANIC!
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored June 18, 2008 gitster committed June 18, 2008

May 25, 2008

  1. Junio C Hamano

    Merge branch 'db/clone-in-c'

    * db/clone-in-c:
      Add test for cloning with "--reference" repo being a subset of source repo
      Add a test for another combination of --reference
      Test that --reference actually suppresses fetching referenced objects
      clone: fall back to copying if hardlinking fails
      builtin-clone.c: Need to closedir() in copy_or_link_directory()
      builtin-clone: fix initial checkout
      Build in clone
      Provide API access to init_db()
      Add a function to set a non-default work tree
      Allow for having for_each_ref() list extra refs
      Have a constant extern refspec for "--tags"
      Add a library function to add an alternate to the alternates file
      Add a lockfile function to append to a file
      Mark the list of refs to fetch as const
    
    Conflicts:
    
    	cache.h
    	t/t5700-clone-reference.sh
    authored May 25, 2008

May 14, 2008

  1. Junio C Hamano

    Merge branch 'sb/committer'

    * sb/committer:
      commit: Show committer if automatic
      commit: Show author if different from committer
      Preparation to call determine_author_info from prepare_to_commit
    authored May 14, 2008

May 11, 2008

  1. Junio C Hamano

    Merge branch 'lt/core-optim'

    * lt/core-optim:
      Optimize symlink/directory detection
      Avoid some unnecessary lstat() calls
      is_racy_timestamp(): do not check timestamp for gitlinks
      diff-lib.c: rename check_work_tree_entity()
      diff: a submodule not checked out is not modified
      Add t7506 to test submodule related functions for git-status
      t4027: test diff for submodule with empty directory
      Make git-add behave more sensibly in a case-insensitive environment
      When adding files to the index, add support for case-independent matches
      Make unpack-tree update removed files before any updated files
      Make branch merging aware of underlying case-insensitive filsystems
      Add 'core.ignorecase' option
      Make hash_name_lookup able to do case-independent lookups
      Make "index_name_exists()" return the cache_entry it found
      Move name hashing functions into a file of its own
      Make unpack_trees_options bit flags actual bitfields
    authored May 11, 2008
  2. Dustin Sallings

    Allow tracking branches to set up rebase by default.

    Change cd67e4d introduced a new configuration parameter that told
    pull to automatically perform a rebase instead of a merge.  This
    change provides a configuration option to enable this feature
    automatically when creating a new branch.
    
    If the variable branch.autosetuprebase applies for a branch that's
    being created, that branch will have branch.<name>.rebase set to true.
    
    Signed-off-by: Dustin Sallings <dustin@spy.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored May 10, 2008 gitster committed May 11, 2008
  3. Junio C Hamano

    Merge branch 'lt/case-insensitive'

    * lt/case-insensitive:
      Make git-add behave more sensibly in a case-insensitive environment
      When adding files to the index, add support for case-independent matches
      Make unpack-tree update removed files before any updated files
      Make branch merging aware of underlying case-insensitive filsystems
      Add 'core.ignorecase' option
      Make hash_name_lookup able to do case-independent lookups
      Make "index_name_exists()" return the cache_entry it found
      Move name hashing functions into a file of its own
      Make unpack_trees_options bit flags actual bitfields
    authored May 10, 2008

May 06, 2008

  1. commit: Show committer if automatic

    To warn the user in case he/she might be using an unintended
    committer identity.
    
    Signed-off-by: Santi Béjar <sbejar@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored May 04, 2008 gitster committed May 06, 2008

May 05, 2008

  1. Add a function to set a non-default work tree

    This function may only be used before the work tree is used.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored April 27, 2008 gitster committed May 04, 2008

Apr 09, 2008

  1. Add platform-independent .git "symlink"

    This patch allows .git to be a regular textfile containing the path of
    the real git directory (prefixed with "gitdir: "), which can be useful on
    platforms lacking support for real symlinks.
    
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored February 20, 2008 gitster committed April 09, 2008
  2. Add 'core.ignorecase' option

    ..and start using it for directory entry traversal (ie "git status" will
    not consider entries that match an existing entry case-insensitively to
    be a new file)
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored March 21, 2008 gitster committed April 09, 2008

Feb 27, 2008

  1. Junio C Hamano

    Merge branch 'js/branch-track'

    * js/branch-track:
      doc: documentation update for the branch track changes
      branch: optionally setup branch.*.merge from upstream local branches
    
    Conflicts:
    
    	Documentation/config.txt
    	Documentation/git-branch.txt
    	Documentation/git-checkout.txt
    	builtin-branch.c
    	cache.h
    	t/t7201-co.sh
    authored February 27, 2008

Feb 20, 2008

  1. Jay Soffian

    branch: optionally setup branch.*.merge from upstream local branches

    "git branch" and "git checkout -b" now honor --track option even when
    the upstream branch is local.  Previously --track was silently ignored
    when forking from a local branch.  Also the command did not error out
    when --track was explicitly asked for but the forked point specified
    was not an existing branch (i.e. when there is no way to set up the
    tracking configuration), but now it correctly does.
    
    The configuration setting branch.autosetupmerge can now be set to
    "always", which is equivalent to using --track from the command line.
    Setting branch.autosetupmerge to "true" will retain the former behavior
    of only setting up branch.*.merge for remote upstream branches.
    
    Includes test cases for the new functionality.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored February 19, 2008 gitster committed February 19, 2008

Feb 17, 2008

  1. Junio C Hamano

    Merge branch 'sp/safecrlf'

    * sp/safecrlf:
      safecrlf: Add mechanism to warn about irreversible crlf conversions
    authored February 16, 2008

Feb 16, 2008

  1. Christian Couder

    Add "const" qualifier to "char *excludes_file".

    Also use "git_config_string" to simplify "config.c" code
    where "excludes_file" is set.
    
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored February 16, 2008 gitster committed February 15, 2008
  2. Christian Couder

    Add "const" qualifier to "char *editor_program".

    Also use "git_config_string" to simplify "config.c" code
    where "editor_program" is set.
    
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored February 16, 2008 gitster committed February 15, 2008
  3. Christian Couder

    Add "const" qualifier to "char *pager_program".

    Also use "git_config_string" to simplify "config.c" code
    where "pager_program" is set.
    
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored February 16, 2008 gitster committed February 15, 2008

Feb 06, 2008

  1. sprohaska

    safecrlf: Add mechanism to warn about irreversible crlf conversions

    CRLF conversion bears a slight chance of corrupting data.
    autocrlf=true will convert CRLF to LF during commit and LF to
    CRLF during checkout.  A file that contains a mixture of LF and
    CRLF before the commit cannot be recreated by git.  For text
    files this is the right thing to do: it corrects line endings
    such that we have only LF line endings in the repository.
    But for binary files that are accidentally classified as text the
    conversion can corrupt data.
    
    If you recognize such corruption early you can easily fix it by
    setting the conversion type explicitly in .gitattributes.  Right
    after committing you still have the original file in your work
    tree and this file is not yet corrupted.  You can explicitly tell
    git that this file is binary and git will handle the file
    appropriately.
    
    Unfortunately, the desired effect of cleaning up text files with
    mixed line endings and the undesired effect of corrupting binary
    files cannot be distinguished.  In both cases CRLFs are removed
    in an irreversible way.  For text files this is the right thing
    to do because CRLFs are line endings, while for binary files
    converting CRLFs corrupts data.
    
    This patch adds a mechanism that can either warn the user about
    an irreversible conversion or can even refuse to convert.  The
    mechanism is controlled by the variable core.safecrlf, with the
    following values:
    
     - false: disable safecrlf mechanism
     - warn: warn about irreversible conversions
     - true: refuse irreversible conversions
    
    The default is to warn.  Users are only affected by this default
    if core.autocrlf is set.  But the current default of git is to
    leave core.autocrlf unset, so users will not see warnings unless
    they deliberately chose to activate the autocrlf mechanism.
    
    The safecrlf mechanism's details depend on the git command.  The
    general principles when safecrlf is active (not false) are:
    
     - we warn/error out if files in the work tree can modified in an
       irreversible way without giving the user a chance to backup the
       original file.
    
     - for read-only operations that do not modify files in the work tree
       we do not not print annoying warnings.
    
    There are exceptions.  Even though...
    
     - "git add" itself does not touch the files in the work tree, the
       next checkout would, so the safety triggers;
    
     - "git apply" to update a text file with a patch does touch the files
       in the work tree, but the operation is about text files and CRLF
       conversion is about fixing the line ending inconsistencies, so the
       safety does not trigger;
    
     - "git diff" itself does not touch the files in the work tree, it is
       often run to inspect the changes you intend to next "git add".  To
       catch potential problems early, safety triggers.
    
    The concept of a safety check was originally proposed in a similar
    way by Linus Torvalds.  Thanks to Dimitry Potapov for insisting
    on getting the naked LF/autocrlf=true case right.
    
    Signed-off-by: Steffen Prohaska <prohaska@zib.de>
    authored February 06, 2008 gitster committed February 06, 2008

Dec 11, 2007

  1. Jeff King

    Support GIT_PAGER_IN_USE environment variable

    When deciding whether or not to turn on automatic color
    support, git_config_colorbool checks whether stdout is a
    tty. However, because we run a pager, if stdout is not a
    tty, we must check whether it is because we started the
    pager. This used to be done by checking the pager_in_use
    variable.
    
    This variable was set only when the git program being run
    started the pager; there was no way for an external program
    running git indicate that it had already started a pager.
    This patch allows a program to set GIT_PAGER_IN_USE to a
    true value to indicate that even though stdout is not a tty,
    it is because a pager is being used.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored December 11, 2007 gitster committed December 11, 2007

Dec 09, 2007

  1. Junio C Hamano

    Merge branch 'jc/spht'

    * jc/spht:
      Use gitattributes to define per-path whitespace rule
      core.whitespace: documentation updates.
      builtin-apply: teach whitespace_rules
      builtin-apply: rename "whitespace" variables and fix styles
      core.whitespace: add test for diff whitespace error highlighting
      git-diff: complain about >=8 consecutive spaces in initial indent
      War on whitespace: first, a bit of retreat.
    
    Conflicts:
    
    	cache.h
    	config.c
    	diff.c
    authored December 09, 2007

Dec 06, 2007

  1. Junio C Hamano

    Use gitattributes to define per-path whitespace rule

    The `core.whitespace` configuration variable allows you to define what
    `diff` and `apply` should consider whitespace errors for all paths in
    the project (See gitlink:git-config[1]).  This attribute gives you finer
    control per path.
    
    For example, if you have these in the .gitattributes:
    
        frotz   whitespace
        nitfol  -whitespace
        xyzzy   whitespace=-trailing
    
    all types of whitespace problems known to git are noticed in path 'frotz'
    (i.e. diff shows them in diff.whitespace color, and apply warns about
    them), no whitespace problem is noticed in path 'nitfol', and the
    default types of whitespace problems except "trailing whitespace" are
    noticed for path 'xyzzy'.  A project with mixed Python and C might want
    to have:
    
        *.c    whitespace
        *.py   whitespace=-indent-with-non-tab
    
    in its toplevel .gitattributes file.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored December 06, 2007

Nov 14, 2007

  1. Junio C Hamano

    core.excludesfile clean-up

    There are inconsistencies in the way commands currently handle
    the core.excludesfile configuration variable.  The problem is
    the variable is too new to be noticed by anything other than
    git-add and git-status.
    
     * git-ls-files does not notice any of the "ignore" files by
       default, as it predates the standardized set of ignore files.
       The calling scripts established the convention to use
       .git/info/exclude, .gitignore, and later core.excludesfile.
    
     * git-add and git-status know about it because they call
       add_excludes_from_file() directly with their own notion of
       which standard set of ignore files to use.  This is just a
       stupid duplication of code that need to be updated every time
       the definition of the standard set of ignore files is
       changed.
    
     * git-read-tree takes --exclude-per-directory=<gitignore>,
       not because the flexibility was needed.  Again, this was
       because the option predates the standardization of the ignore
       files.
    
     * git-merge-recursive uses hardcoded per-directory .gitignore
       and nothing else.  git-clean (scripted version) does not
       honor core.* because its call to underlying ls-files does not
       know about it.  git-clean in C (parked in 'pu') doesn't either.
    
    We probably could change git-ls-files to use the standard set
    when no excludes are specified on the command line and ignore
    processing was asked, or something like that, but that will be a
    change in semantics and might break people's scripts in a subtle
    way.  I am somewhat reluctant to make such a change.
    
    On the other hand, I think it makes perfect sense to fix
    git-read-tree, git-merge-recursive and git-clean to follow the
    same rule as other commands.  I do not think of a valid use case
    to give an exclude-per-directory that is nonstandard to
    read-tree command, outside a "negative" test in the t1004 test
    script.
    
    This patch is the first step to untangle this mess.
    
    The next step would be to teach read-tree, merge-recursive and
    clean (in C) to use setup_standard_excludes().
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored November 14, 2007

Nov 03, 2007

  1. Junio C Hamano

    War on whitespace: first, a bit of retreat.

    This introduces core.whitespace configuration variable that lets
    you specify the definition of "whitespace error".
    
    Currently there are two kinds of whitespace errors defined:
    
     * trailing-space: trailing whitespaces at the end of the line.
    
     * space-before-tab: a SP appears immediately before HT in the
       indent part of the line.
    
    You can specify the desired types of errors to be detected by
    listing their names (unique abbreviations are accepted)
    separated by comma.  By default, these two errors are always
    detected, as that is the traditional behaviour.  You can disable
    detection of a particular type of error by prefixing a '-' in
    front of the name of the error, like this:
    
    	[core]
    		whitespace = -trailing-space
    
    This patch teaches the code to output colored diff with
    DIFF_WHITESPACE color to highlight the detected whitespace
    errors to honor the new configuration.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored November 02, 2007

Aug 11, 2007

  1. Junio C Hamano

    Merge branch 'cr/tag'

    * cr/tag:
      Teach "git stripspace" the --strip-comments option
      Make verify-tag a builtin.
      builtin-tag.c: Fix two memory leaks and minor notation changes.
      launch_editor(): Heed GIT_EDITOR and core.editor settings
      Make git tag a builtin.
    authored August 10, 2007
Something went wrong with that request. Please try again.