Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 19, 2014
  1. @artagnon @gitster

    rebase -i: handle "Nothing to do" case with autostash

    artagnon authored gitster committed
    When a user invokes
    
      $ git rebase -i @~3
    
    with dirty files and rebase.autostash turned on, and exits the $EDITOR
    with an empty buffer, the autostash fails to apply. Although the primary
    focus of rr/rebase-autostash was to get the git-rebase--backend.sh
    scripts to return control to git-rebase.sh, it missed this case in
    git-rebase--interactive.sh. Since this case is unlike the other cases
    which return control for housekeeping, assign it a special return status
    and handle that return value explicitly in git-rebase.sh.
    
    Reported-by: Karen Etheridge <ether@cpan.org>
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 24, 2013
  1. @artagnon @gitster

    rebase: use a better reflog message

    artagnon authored gitster committed
    Now that the "checkout" invoked internally from "rebase" knows to
    honor GIT_REFLOG_ACTION, we can start to use it to write a better
    reflog message when "rebase anotherbranch", "rebase --onto branch",
    etc. internally checks out the new fork point.  We will write:
    
      rebase: checkout master
    
    instead of the old
    
      rebase
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 17, 2013
  1. @artagnon @gitster

    rebase: use 'git stash store' to simplify logic

    artagnon authored gitster committed
    rebase has no reason to know about the implementation of the stash.  In
    the case when applying the autostash results in conflicts, replace the
    relevant code in finish_rebase () to simply call 'git stash store'.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 14, 2013
  1. @artagnon @gitster

    rebase: use peel_committish() where appropriate

    artagnon authored gitster committed
    The revisions specified on the command-line as <onto> and <upstream>
    arguments could be of the form :/quuxery; so, use peel_committish() to
    resolve them.  The failing tests in t/rebase and t/rebase-interactive
    now pass.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 13, 2013
  1. @artagnon @gitster

    rebase: finish_rebase() in noop rebase

    artagnon authored gitster committed
    In the following case
    
      $ git rebase master
      Current branch autostash-fix is up to date.
    
    the autostash is not applied automatically, because this codepath
    forgets to call finish_rebase().  Fix this.  Also add a test to guard
    against regressions.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @artagnon @gitster

    rebase: finish_rebase() in fast-forward rebase

    artagnon authored gitster committed
    In the following case
    
      $ git rebase master
      Fast-forwarded autostash-fix to master.
    
    The autostash is not applied automatically, because this codepath
    forgets to call finish_rebase().  Fix this.  Also add a test to guard
    against regressions.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @artagnon @gitster

    rebase: guard against missing files in read_basic_state()

    artagnon authored gitster committed
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 29, 2013
  1. @artagnon @gitster

    rebase: implement --[no-]autostash and rebase.autostash

    artagnon authored gitster committed
    This new feature allows a rebase to be executed on a dirty worktree or
    index.  It works by creating a temporary "dangling merge commit" out
    of the worktree and index changes (via 'git stash create'), and
    automatically applying it after a successful rebase or abort.
    
    rebase stores the SHA-1 hex of the temporary merge commit, along with
    the rest of the rebase state, in either
    .git/{rebase-merge,rebase-apply}/autostash depending on the kind of
    rebase.  Since $state_dir is automatically removed at the end of a
    successful rebase or abort, so is the autostash.
    
    The advantage of this approach is that we do not affect the normal
    stash's reflogs, making the autostash invisible to the end-user.  This
    means that you can use 'git stash' during a rebase as usual.
    
    When the autostash application results in a conflict, we push
    $state_dir/autostash onto the normal stash and remove $state_dir
    ending the rebase.  The user can inspect the stash, and pop or drop at
    any time.
    
    Most significantly, this feature means that a caller like pull (with
    pull.rebase set to true) can easily be patched to remove the
    require_clean_work_tree restriction.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 13, 2013
  1. @artagnon @gitster

    rebase: prepare to do generic housekeeping

    artagnon authored gitster committed
    On successful completion of a rebase in git-rebase--$backend.sh, the
    $backend script cleans up on its own and exits.  The cleanup routine
    is however, independent of the $backend, and each $backend script
    unnecessarily duplicates this work:
    
        rm -rf "$state_dir"
        git gc --auto
    
    Prepare git-rebase.sh for later patches that return control from each
    $backend script back to us, for performing this generic cleanup
    routine.  The code that this patch adds is currently unreachable, and
    will only start to be used when git-rebase--$backend.sh scripts are
    taught to return control in later patches.
    
    Another advantage is that git-rebase.sh can implement a generic
    finish_rebase() to possibly do additional tasks in addition to the
    cleanup.
    
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 28, 2010
  1. @artagnon @gitster

    Porcelain scripts: Rewrite cryptic "needs update" error message

    artagnon authored gitster committed
    Although Git interally has the facility to differentiate between
    porcelain and plubmbing commands and appropriately print errors,
    several shell scripts invoke plubming commands triggering cryptic
    plumbing errors to be displayed on a porcelain interface. This patch
    replaces the "needs update" message in git-pull and git-rebase, when
    `git update-index` is run, with a more friendly message.
    
    Reported-by: Joshua Jensen <jjensen@workspacewhiz.com>
    Reported-by: Thore Husfeldt <thore.husfeldt@gmail.com>
    Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.