Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 16, 2012
  1. rerere.c: mark private file-scope symbols as static

    authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 16, 2012
  1. Merge branch 'ar/clone-honor-umask-at-top'

    authored
    A handful of files and directories we create had tighter than
    necessary permission bits when the user wanted to have group
    writability (e.g. by setting "umask 002").
    
    * ar/clone-honor-umask-at-top:
      add: create ADD_EDIT.patch with mode 0666
      rerere: make rr-cache fanout directory honor umask
      Restore umasks influence on the permissions of work tree created by clone
Commits on Jul 9, 2012
  1. rerere: make rr-cache fanout directory honor umask

    authored
    This is the last remaining call to mkdir(2) that restricts the permission
    bits by passing 0755.  Just use the same mkdir_in_gitdir() used to create
    the leaf directories.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 7, 2012
  1. @pclouds

    rerere: remove i18n legos in result message

    pclouds authored committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 30, 2011
  1. Merge branch 'maint'

    authored
    * maint:
      git-submodule.sh: separate parens by a space to avoid confusing some shells
      Documentation/technical/api-diff.txt: correct name of diff_unmerge()
      read_gitfile_gently: use ssize_t to hold read result
      remove tests of always-false condition
      rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'
  2. Merge branch 'jm/maint-misc-fix' into maint

    authored
    * jm/maint-misc-fix:
      read_gitfile_gently: use ssize_t to hold read result
      remove tests of always-false condition
      rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'
Commits on May 26, 2011
  1. @meyering

    plug a DIR buffer leak in rerere.c

    meyering authored committed
    Signed-off-by: Jim Meyering <jim@meyering.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @meyering

    rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB an…

    meyering authored committed
    …d '\0'
    
    If we reach EOF after the SHA1-then-TAB, yet before the NUL that
    terminates each file name, we would fill the file name buffer with \255
    bytes resulting from the repeatedly-failing fgetc (returns EOF/-1) and
    ultimately complain about "filename too long", because no NUL was
    encountered.
    
    Signed-off-by: Jim Meyering <jim@meyering.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 8, 2011
  1. rerere: libify rerere_clear() and rerere_gc()

    authored
    This moves the two features from builtin/rerere.c to a more library-ish
    portion of the codebase.  No behaviour change.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 3, 2011
  1. @bebarino

    sparse: Fix errors and silence warnings

    bebarino authored committed
     * load_file() returns a void pointer but is using 0 for the return
       value
    
     * builtin/receive-pack.c forgot to include builtin.h
    
     * packet_trace_prefix can be marked static
    
     * ll_merge takes a pointer for its last argument, not an int
    
     * crc32 expects a pointer as the second argument but Z_NULL is defined
       to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
       2006-11-18 for more info)
    
    Signed-off-by: Stephen Boyd <bebarino@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 27, 2011
  1. Merge branch 'jc/maint-rerere-in-workdir'

    authored
    * jc/maint-rerere-in-workdir:
      rerere: make sure it works even in a workdir attached to a young repository
Commits on Mar 23, 2011
  1. rerere: make sure it works even in a workdir attached to a young repo…

    authored
    …sitory
    
    The git-new-workdir script in contrib/ makes a new work tree by sharing
    many subdirectories of the .git directory with the original repository.
    When rerere.enabled is set in the original repository, but the user has
    not encountered any conflicts yet, the original repository may not yet
    have .git/rr-cache directory.
    
    When rerere wants to run in a new work tree created from such a young
    original repository, it fails to mkdir(2) .git/rr-cache that is a symlink
    to a yet-to-be-created directory.
    
    There are three possible approaches to this:
    
     - A naive solution is not to create a symlink in the git-new-workdir
       script to a directory the original does not have (yet).  This is not a
       solution, as we tend to lazily create subdirectories of .git/, and
       having rerere.enabled configuration set is a strong indication that the
       user _wants_ to have this lazy creation to happen;
    
     - We could always create .git/rr-cache upon repository creation.  This is
       tempting but will not help people with existing repositories.
    
     - Detect this case by seeing that mkdir(2) failed with EEXIST, checking
       that the path is a symlink, and try running mkdir(2) on the link
       target.
    
    This patch solves the issue by doing the third one.
    
    Strictly speaking, this is incomplete.  It does not attempt to handle
    relative symbolic link that points into the original repository, but this
    is good enough to help people who use contrib/workdir/git-new-workdir
    script.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 16, 2011
  1. rerere "remaining"

    Martin von Zweigbergk authored committed
    After "rerere" resolves conflicts by reusing old resolution, there would
    be three kinds of paths with conflict in the index:
    
     * paths that have been resolved in the working tree by rerere;
     * paths that need further work whose resolution could be recorded;
     * paths that need resolving that rerere won't help.
    
    When the user wants a list of paths that need hand-resolving, output from
    "rerere status" does not help, as it shows only the second category, but
    the paths in the third category still needs work (rerere only makes sense
    for regular files that have both our side and their side, and does not
    help other kinds of conflicts, e.g. "we modified, they deleted").
    
    The new subcommand "rerere remaining" can be used to show both. As
    opposed to "rerere status", this subcommand also skips printing paths
    that have been added to the index, since these paths are already
    resolved and are no longer "remaining".
    
    Initial patch provided by Junio. Refactored and modified to skip
    resolved paths by Martin. Commit message mostly by Junio.
    
    Helped-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 27, 2010
  1. Merge branch 'jf/merge-ignore-ws'

    authored
    * jf/merge-ignore-ws:
      merge-recursive: options to ignore whitespace changes
      merge-recursive --patience
      ll-merge: replace flag argument with options struct
      merge-recursive: expose merge options for builtin merge
Commits on Sep 3, 2010
  1. Merge branch 'jn/merge-renormalize'

    authored
    * jn/merge-renormalize:
      merge-recursive --renormalize
      rerere: never renormalize
      rerere: migrate to parse-options API
      t4200 (rerere): modernize style
      ll-merge: let caller decide whether to renormalize
      ll-merge: make flag easier to populate
      Documentation/technical: document ll_merge
      merge-trees: let caller decide whether to renormalize
      merge-trees: push choice to renormalize away from low level
      t6038 (merge.renormalize): check that it can be turned off
      t6038 (merge.renormalize): try checkout -m and cherry-pick
      t6038 (merge.renormalize): style nitpicks
      Don't expand CRLFs when normalizing text during merge
      Try normalizing files to avoid delete/modify conflicts when merging
      Avoid conflicts when merging branches with mixed normalization
    
    Conflicts:
    	builtin/rerere.c
    	t/t4200-rerere.sh
Commits on Aug 31, 2010
  1. Merge branch 'sg/rerere-gc-old-still-used'

    authored
    * sg/rerere-gc-old-still-used:
      rerere: fix overeager gc
      mingw_utime(): handle NULL times parameter
Commits on Aug 26, 2010
  1. @jrn

    ll-merge: replace flag argument with options struct

    jrn authored committed
    Keeping track of the flag bits is proving more trouble than it's
    worth.  Instead, use a pointer to an options struct like most similar
    APIs do.
    
    Callers with no special requests can pass NULL to request the default
    options.
    
    Cc: Bert Wesarg <bert.wesarg@googlemail.com>
    Cc: Avery Pennarun <apenwarr@gmail.com>
    Helped-by: Justin Frankel <justin@cockos.com>
    Helped-by: Bert Wesarg <bert.wesarg@googlemail.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 6, 2010
  1. @jrn

    rerere: never renormalize

    jrn authored committed
    plain rerere performs three tasks; let us consider how the new
    merge.renormalize option should apply to each.
    
    After an unsuccessful merge, rerere records conflict hunks from the
    work tree under .git/rr-cache.  If the merge was performed with
    merge.renormalize enabled, both sides of the conflict hunk use the
    current work tree’s end-of-line and smudge rules; there is not really
    much of a choice.
    
    After a successful manual resolution, rerere records the postimage.
    Here, also, the file will be in the current work tree’s canonical
    format and there is not much to do about it.
    
    When encountering that conflict again, merge looks up the preimage
    and postimage using the conflict hunk as a key and runs a three-way
    merge to apply that resolution to the work tree.  Since the conflict
    hunk used the current work tree’s canonical format, chances are the
    version in the work tree, the preimage, and the postimage will, too.
    In fact using the merge.renormalize machinery is exactly the wrong
    thing to do, since its result has been run through convert_to_git
    and therefore is not suitable for writing to the work tree.
    
    The only affected caller is "git merge".
    
    NEEDSWORK: lacks test
    
    Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jrn

    ll-merge: let caller decide whether to renormalize

    jrn authored committed
    Add a “renormalize” bit to the ll-merge options word so callers can
    decide on a case-by-case basis whether the merge is likely to have
    overlapped with a change in smudge/clean rules.
    
    This reveals a few commands that have not been taking that situation
    into account, though it does not fix them.
    
    No functional change intended.
    
    Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
    Improved-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 14, 2010
  1. @szeder

    rerere: fix overeager gc

    szeder authored committed
    'rerere gc' prunes resolutions of conflicted merges that occurred long
    time ago, and when doing so it takes the creation time of the
    conflicted automerge results into account.  This can cause the loss of
    frequently used conflict resolutions (e.g. long-living topic branches
    are merged into a regularly rebuilt integration branch (think of git's
    pu)) when they become old enough to exceed 'rerere gc's threshold.
    
    To prevent the loss of valuable merge resolutions 'rerere' will (1)
    update the timestamp of the recorded conflict resolution (i.e.
    'postimage') each time when encountering and resolving the same merge
    conflict, and (2) take this timestamp, i.e. the time of the last usage
    into account when gc'ing.
    
    Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 5, 2010
  1. string_list: Add STRING_LIST_INIT macro and make use of it.

    Thiago Farina authored committed
    Acked-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Thiago Farina <tfransosi@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 30, 2010
  1. Merge branch 'jp/string-list-api-cleanup'

    authored
    * jp/string-list-api-cleanup:
      string_list: Fix argument order for string_list_append
      string_list: Fix argument order for string_list_lookup
      string_list: Fix argument order for string_list_insert_at_index
      string_list: Fix argument order for string_list_insert
      string_list: Fix argument order for for_each_string_list
      string_list: Fix argument order for print_string_list
Commits on Jun 27, 2010
  1. @qur

    string_list: Fix argument order for string_list_insert

    qur authored committed
    Update the definition and callers of string_list_insert to use the
    string_list as the first argument.  This helps make the string_list
    API easier to use by being more consistent.
    
    Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 31, 2010
  1. enums: omit trailing comma for portability

    Gary V. Vaughan authored committed
    Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
    5.1 fails to compile git.
    
    enum style is inconsistent already, with some enums declared on one
    line, some over 3 lines with the enum values all on the middle line,
    sometimes with 1 enum value per line... and independently of that the
    trailing comma is sometimes present and other times absent, often
    mixing with/without trailing comma styles in a single file, and
    sometimes in consecutive enum declarations.
    
    Clearly, omitting the comma is the more portable style, and this patch
    changes all enum declarations to use the portable omitted dangling
    comma style consistently.
    
    Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 21, 2010
  1. @jrn

    ll_merge(): add ancestor label parameter for diff3-style output

    jrn authored committed
    Commands using the ll_merge() function will present conflict hunks
    imitating ‘diff3 -m’ output if the merge.conflictstyle configuration
    option is set appropriately.  Unlike ‘diff3 -m’, the output does not
    include a label for the merge base on the ||||||| line of the output,
    and some tools misparse the conflict hunks without that.
    
    Add a new ancestor_label parameter to ll_merge() to give callers the
    power to rectify this situation.  If ancestor_label is NULL, the output
    format is unchanged.  All callers pass NULL for now.
    
    Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 23, 2010
  1. @bertwesarg

    rerere: fix memory leak if rerere images can't be read

    bertwesarg authored committed
    Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 28, 2010
  1. @peff

    rerere: fix too-short initialization

    peff authored committed
    This was caused by a typo in the sizeof parameter, and meant
    we looked at uninitialized memory.  Caught by valgrind in
    t2030.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 21, 2010
  1. Merge branch 'jc/conflict-marker-size'

    authored
    * jc/conflict-marker-size:
      rerere: honor conflict-marker-size attribute
      rerere: prepare for customizable conflict marker length
      conflict-marker-size: new attribute
      rerere: use ll_merge() instead of using xdl_merge()
      merge-tree: use ll_merge() not xdl_merge()
      xdl_merge(): allow passing down marker_size in xmparam_t
      xdl_merge(): introduce xmparam_t for merge specific parameters
      git_attr(): fix function signature
    
    Conflicts:
    	builtin-merge-file.c
    	ll-merge.c
    	xdiff/xdiff.h
    	xdiff/xmerge.c
Commits on Jan 20, 2010
  1. Merge branch 'jc/cache-unmerge'

    authored
    * jc/cache-unmerge:
      rerere forget path: forget recorded resolution
      rerere: refactor rerere logic to make it independent from I/O
      rerere: remove silly 1024-byte line limit
      resolve-undo: teach "update-index --unresolve" to use resolve-undo info
      resolve-undo: "checkout -m path" uses resolve-undo information
      resolve-undo: allow plumbing to clear the information
      resolve-undo: basic tests
      resolve-undo: record resolved conflicts in a new index extension section
      builtin-merge.c: use standard active_cache macros
    
    Conflicts:
    	builtin-ls-files.c
    	builtin-merge.c
    	builtin-rerere.c
Commits on Jan 17, 2010
  1. rerere: honor conflict-marker-size attribute

    authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. rerere: prepare for customizable conflict marker length

    authored
    This still uses the hardcoded conflict marker length of 7 but otherwise
    prepares the codepath to deal with customized marker length.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. rerere: use ll_merge() instead of using xdl_merge()

    authored
    This allows us to pay attention to the attribute settings and custom
    merge driver the user sets up.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. xdl_merge(): introduce xmparam_t for merge specific parameters

    authored
    So far we have only needed to be able to pass an option that is generic to
    xdiff family of functions to this function.  Extend the interface so that
    we can give it merge specific parameters.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 11, 2010
  1. rerere forget path: forget recorded resolution

    authored
    After you find out an earlier resolution you told rerere to use was a
    mismerge, there is no easy way to clear it.  A new subcommand "forget" can
    be used to tell git to forget a recorded resolution, so that you can redo
    the merge from scratch.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. rerere: refactor rerere logic to make it independent from I/O

    authored
    This splits the handle_file() function into in-core part and I/O
    parts of the logic to create the preimage, so that we can compute
    the conflict identifier without having to use temporary files.
    
    Earlier, I thought the output from handle_file() should also be
    refactored, but it is always about writing preimage (or thisimage)
    that is used for later three-way merge, so it is saner to keep it
    to always write to FILE *.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.