Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 29, 2007
  1. @gitster

    scripts: do not get confused with HEAD in work tree

    gitster authored
    When you have a file called HEAD in your work tree, many commands that
    our scripts feed "HEAD" to would complain about the rev vs path
    ambiguity.  A solution is to form command line more carefully by
    appending -- to them, which makes it clear that we mean HEAD rev not
    HEAD file.
    
    This patch would apply to maint.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 2, 2007
  1. @gitster

    Fixing path quoting in git-rebase

    Jonathan del Strother authored gitster committed
    git-rebase used to fail when run from a path containing a space.
    
    Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
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 Sep 1, 2007
  1. @gitster

    Avoid one-or-more (\+) non BRE in sed scripts.

    gitster authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    rebase -m: Fix incorrect short-logs of already applied commits.

    Johannes Sixt authored gitster committed
    When a topic branch is rebased, some of whose commits are already
    cherry-picked upstream:
    
        o--X--A--B--Y    <- master
         \
          A--B--Z        <- topic
    
    then 'git rebase -m master' would report:
    
        Already applied: 0001 Y
        Already applied: 0002 Y
    
    With this fix it reports the expected:
    
        Already applied: 0001 A
        Already applied: 0002 B
    
    As an added bonus, this change also avoids 'echo' of a commit message,
    which might contain escapements.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 7, 2007
  1. @dscho @gitster

    Enable "git rerere" by the config variable rerere.enabled

    dscho authored gitster committed
    Earlier, "git rerere" was enabled by creating the directory
    .git/rr-cache.  That is definitely not in line with most other
    features, which are enabled by a config variable.
    
    So, check the config variable "rerere.enabled". If it is set
    to "false" explicitely, do not activate rerere, even if
    .git/rr-cache exists. This should help when you want to disable
    rerere temporarily.
    
    If "rerere.enabled" is not set at all, fall back to detection
    of the directory .git/rr-cache.
    
    [jc: with minimum tweaks]
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 5, 2007
  1. @gitster

    Allow rebase to run if upstream is completely merged

    Johannes Sixt authored gitster committed
    Consider this history:
    
      o--o-...-B          <- origin
          \     \
           x--x--M--x--x  <- master
    
    In this situation, rebase considers master fully up-to-date and would
    not do anything. However, if there were additional commits on origin,
    the rebase would run and move the commits x on top of origin.
    
    Here we change rebase to short-circuit out only if the history since origin
    is strictly linear. Consequently, the above as well as a history like this
    would be linearized:
    
      o--o               <- origin
          \
           x--x
            \  \
             x--M--x--x  <- master
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    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 Jun 25, 2007
  1. @dscho @gitster

    Teach rebase an interactive mode

    dscho authored gitster committed
    Don't you just hate the fact sometimes, that git-rebase just applies
    the patches, without any possibility to edit them, or rearrange them?
    With "--interactive", git-rebase now lets you edit the list of patches,
    so that you can reorder, edit and delete patches.
    
    Such a list will typically look like this:
    
    	pick deadbee The oneline of this commit
    	pick fa1afe1 The oneline of the next commit
    	...
    
    By replacing the command "pick" with the command "edit", you can amend
    that patch and/or its commit message, and by replacing it with "squash"
    you can tell rebase to fold that patch into the patch before that.
    
    It is derived from the script sent to the list in
    <Pine.LNX.4.63.0702252156190.22628@wbgn013.biozentrum.uni-wuerzburg.de>
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 2, 2007
  1. @jonas

    git-rebase: suggest to use git-add instead of git-update-index

    jonas authored Junio C Hamano committed
    The command is part of the main porcelain making git-add more
    appropriate.
    
    Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on May 10, 2007
  1. Add colour support in rebase and merge tree diff stats output.

    James Bowes authored Junio C Hamano committed
    The rebase and merge commands used diff-tree to display the summary stats of
    what files had changed from the operation. diff-tree does not read the
    diff ui configuration options, so the diff.color setting was not used.
    
    Have rebase and merge call diff rather than diff-tree, which does read the
    diff ui options.
    
    Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Apr 14, 2007
  1. @raalkml

    Use rev-list --reverse in git-rebase.sh

    raalkml authored Junio C Hamano committed
    ...and drop the last perl dependency in the script.
    
    Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 25, 2007
  1. @raalkml

    Use diff* with --exit-code in git-am, git-rebase and git-merge-ours

    raalkml authored Junio C Hamano committed
    This simplifies the shell code, reduces its memory footprint, and
    speeds things up. The performance improvements should be noticable
    when git-rebase works on big commits.
    
    Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 22, 2007
  1. git-rebase: make 'rebase HEAD branch' work as expected.

    Junio C Hamano authored
    When you want to amend the commit message of 3 commits before
    the tip of the current branch, say 'master',
    
    	A--B--C--D--E(master)
    
    it is sometimes handy to make your head detached at that commit
    with:
    
    	$ git checkout HEAD~3 ;# check out B
    	$ git commit --amend ;# without modifying contents...
    
    to create:
    
              .B'(HEAD)
             /
    	A--B--C--D--E(master)
    
    and then rebase 'master' branch onto HEAD with this:
    
    	$ git rebase HEAD master
    
    to result in:
    
              .B'-C'-D'-E(master=HEAD)
             /
    	A--B--C--D--E
    
    However, the current code interprets HEAD after it switches to
    the branch 'master', which means the rebase will not do
    anything.  You have to say something unwieldly like this
    instead:
    
    	$ git rebase $(git rev-parse HEAD) master
    
    This fixes it by expanding the $onto commit name before
    switching to the target branch.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 8, 2007
  1. add -C[NUM] to git-am

    Michael S. Tsirkin authored Junio C Hamano committed
    Add -C[NUM] to git-am and git-rebase so that patches can be applied even
    if context has changed a bit.
    
    Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 31, 2007
  1. @dkagedal

    Improved error message from git-rebase

    dkagedal authored Junio C Hamano committed
    If the index wasn't clean, git-rebase would simply show the output from
    git-diff-index with no further comment to the user.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 21, 2007
  1. git-rebase: allow rebasing a detached HEAD.

    Junio C Hamano authored
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 13, 2007
  1. Allow whole-tree operations to be started from a subdirectory

    Junio C Hamano authored
    This updates five commands (merge, pull, rebase, revert and cherry-pick)
    so that they can be started from a subdirectory.
    
    This may not actually be what we want to do.  These commands are
    inherently whole-tree operations, and an inexperienced user may
    mistakenly expect a "git pull" from a subdirectory would merge
    only the subdirectory the command started from.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 10, 2007
  1. @spearce

    Disallow working directory commands in a bare repository.

    spearce authored Junio C Hamano committed
    If the user tries to run a porcelainish command which requires
    a working directory in a bare repository they may get unexpected
    results which are difficult to predict and may differ from command
    to command.
    
    Instead we should detect that the current repository is a bare
    repository and refuse to run the command there, as there is no
    working directory associated with it.
    
    [jc: updated Shawn's original somewhat -- bugs are mine.]
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 28, 2006
  1. @spearce

    Use branch names in 'git-rebase -m' conflict hunks.

    spearce authored Junio C Hamano committed
    If a three-way merge in git-rebase generates a conflict then we
    should take advantage of git-merge-recursive's ability to include
    the branch name of each side of the conflict hunk by setting the
    GITHEAD_* environment variables.
    
    In the case of rebase there aren't really two clear branches; we
    have the branch we are rebasing onto, and we have the branch we are
    currently rebasing.  Since most conflicts will be arising between
    the user's current branch and the branch they are rebasing onto
    we assume the stuff that isn't in the current commit is the "onto"
    branch and the stuff in the current commit is the "current" branch.
    
    This assumption may however come up wrong if the user resolves one
    conflict in such a way that it conflicts again on a future commit
    also being rebased.  In this case the user's prior resolution will
    appear to be in the "onto" part of the hunk.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. @spearce

    Use GIT_REFLOG_ACTION environment variable instead.

    spearce authored Junio C Hamano committed
    Junio rightly pointed out that the --reflog-action parameter
    was starting to get out of control, as most porcelain code
    needed to hand it to other porcelain and plumbing alike to
    ensure the reflog contained the top-level user action and
    not the lower-level actions it invoked.
    
    At Junio's suggestion we are introducing the new set_reflog_action
    function to all shell scripts, allowing them to declare early on
    what their default reflog name should be, but this setting only
    takes effect if the caller has not already set the GIT_REFLOG_ACTION
    environment variable.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 22, 2006
  1. merge and reset: adjust for "reset --hard" messages

    Junio C Hamano authored
    An earlier commit made "reset --hard" chattier but leaking its
    message from "git rebase" (which calls it when first rewinding
    the current branch to prepare replaying our own changes) without
    explanation was confusing, so add an extra message to mention
    it.  Inside restorestate in merge (which is rarely exercised
    codepath, where more than one strategies are attempted),
    resetting to the original state uses "reset --hard" -- this can
    be squelched entirely.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 9, 2006
  1. rerere: record (or avoid misrecording) resolved, skipped or aborted r…

    Eric Wong authored Junio C Hamano committed
    …ebase/am
    
    Data in rr-cache isn't valid after a patch application is
    skipped or and aborted, so our next commit could be misrecorded
    as a resolution of that skipped/failed commit, which is wrong.
    
    git-am --skip, git-rebase --skip/--abort will automatically
    invoke git-rerere clear to avoid this.
    
    Also, since git-am --resolved indicates a resolution was
    succesful, remember to run git-rerere to record the resolution
    (and not surprise the user when the next commit is made).
    
    Signed-off-by: Eric Wong <normalperson@yhbt.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Nov 22, 2006
  1. remove merge-recursive-old

    Junio C Hamano authored
    This frees the Porcelain-ish that comes with the core Python-free.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Oct 4, 2006
  1. git-rebase: Add a -v option to show a diffstat of the changes upstrea…

    Robert Shearman authored Junio C Hamano committed
    …m at the start of a rebase.
    
    Signed-off-by: Robert Shearman <rob@codeweavers.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. git-rebase: Use --ignore-if-in-upstream option when executing git-for…

    Robert Shearman authored Junio C Hamano committed
    …mat-patch.
    
    This reduces the number of conflicts when rebasing after a series of
    patches to the same piece of code is committed upstream.
    
    Signed-off-by: Robert Shearman <rob@codeweavers.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Sep 25, 2006
  1. Deprecate merge-recursive.py

    Junio C Hamano authored
    This renames merge-recursive written in Python to merge-recursive-old,
    and makes merge-recur as a synonym to merge-recursive.  We do not remove
    merge-recur yet, but we will remove merge-recur and merge-recursive-old
    in a few releases down the road.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Aug 13, 2006
  1. Merge branch 'master' into js/c-merge-recursive

    Junio C Hamano authored
    Adjust to hold_lock_file_for_update() change on the master.
Commits on Jul 31, 2006
  1. rebase: Make the fast-fowarding message more user-friendly by using b…

    Robert Shearman authored Junio C Hamano committed
    …ranch names instead of SHA1 IDs.
    
    Signed-off-by: Robert Shearman <rob@codeweavers.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. rebase: Fix the detection of fast-forwarding of the current branch to…

    Robert Shearman authored Junio C Hamano committed
    … upstream.
    
    Previously, a rebasing operation with on a branch that is just tracking
    an upstream branch would output a confusing "Nothing to do" due to no
    patches being given to git-am.
    
    The test brings the behaviour back into line with that of just before
    e646c9c.
    
    Signed-off-by: Robert Shearman <rob@codeweavers.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Merge branch 'js/read-tree' into js/c-merge-recursive

    Junio C Hamano authored
    * js/read-tree: (107 commits)
      read-tree: move merge functions to the library
      read-trees: refactor the unpack_trees() part
      tar-tree: illustrate an obscure feature better
      git.c: allow alias expansion without a git directory
      setup_git_directory_gently: do not barf when GIT_DIR is given.
      Build on Debian GNU/kFreeBSD
      Call setup_git_directory() much earlier
      Call setup_git_directory() early
      Display an error from update-ref if target ref name is invalid.
      Fix http-fetch
      t4103: fix binary patch application test.
      git-apply -R: binary patches are irreversible for now.
      Teach git-apply about '-R'
      Makefile: ssh-pull.o depends on ssh-fetch.c
      log and diff family: honor config even from subdirectories
      git-reset: detect update-ref error and report it.
      lost-found: use fsck-objects --full
      Teach git-http-fetch the --stdin switch
      Teach git-local-fetch the --stdin switch
      Make pull() support fetching multiple targets at once
      ...
Commits on Jul 14, 2006
  1. recur vs recursive: help testing without touching too many stuff.

    Junio C Hamano authored
    During git-merge-recur development, you could set an environment
    variable GIT_USE_RECUR_FOR_RECURSIVE to use WIP recur in place
    of the recursive strategy.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. @dscho

    Status update on merge-recursive in C

    dscho authored Junio C Hamano committed
    This is just an update for people being interested. Alex and me were
    busy with that project for a few days now. While it has progressed nicely,
    there are quite a couple TODOs in merge-recursive.c, just search for "TODO".
    
    For impatient people: yes, it passes all the tests, and yes, according
    to the evil test Alex did, it is faster than the Python script.
    
    But no, it is not yet finished. Biggest points are:
    
    - there are still three external calls
    - in the end, it should not be necessary to write the index more than once
      (just before exiting)
    - a lot of things can be refactored to make the code easier and shorter
    
    BTW we cannot just plug in git-merge-tree yet, because git-merge-tree
    does not handle renames at all.
    
    This patch is meant for testing, and as such,
    
    - it compile the program to git-merge-recur
    - it adjusts the scripts and tests to use git-merge-recur instead of
      git-merge-recursive
    - it provides "TEST", a script to execute the tests regarding -recursive
    - it inlines the changes to read-cache.c (read_cache_from(), discard_cache()
      and refresh_cache_entry())
    
    Brought to you by Alex Riesen and Dscho
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. @spearce

    Record rebase changes as 'rebase' in the reflog.

    spearce authored Junio C Hamano committed
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jul 8, 2006
  1. Using 'perl' in *.sh

    Michal Rokos authored Junio C Hamano committed
    Some GIT's shell script are using bare 'perl' for perl invocation.
    Use @@PERL@@ symbol and replace it with PERL_PATH_SQ everywhere.
    
    Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.