git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: ELI <eliptus@gmail.com>
To: git@vger.kernel.org
Subject: Subtree Split Includes Commits Outside Prefix Directory
Date: Fri, 22 Apr 2016 11:38:35 -0700	[thread overview]
Message-ID: <CAKU2X8bAXmVfJz9P7d3k-_d12sjyrzWt+kJCGj8V6fTDAjsFog@mail.gmail.com> (raw)

I attempt a subtree push to a sub-project which I knew not to have had
any local modification since the last subtree push it had received,
but it failed.

To subproject
 ! [rejected]        5a9ad640651d3d54387afa5b7eaf89ed0b392a01 ->
master (non-fast-forward)
error: failed to push some refs to 'subproject'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


The first step I took to understand the cause was to do a subtree
split and inspect the commit history of the resulting branch.  I found
that it contained commits that did not touch any files in the
subproject.  Doing a git show on these commits revealed that they were
not empty commits, but contained diff information for paths in the
main project, and in some cases, other subprojects that exist in the
main project.


I then reviewed the commit history of contrib/subtree/git-subtree.sh
and determined that the last successful subtree push was performed
prior to the integration of this change:
https://git.kernel.org/cgit/git/git.git/commit/contrib/subtree/git-subtree.sh?id=933cfeb90b5d03b4096db6d60494a6eedea25d03

As a next step, I reversed that patch on my local install of git
subtree, and the result was a successful subtree push.


Unfortunately, I have not yet reproduced this with a test main project
and subprojects, and I cannot make the project I observed it in
public.


- Harpreet "Eli" Sangha

             reply	other threads:[~2016-04-22 18:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 18:38 ELI [this message]
2016-05-21 23:06 ` Subtree Split Includes Commits Outside Prefix Directory David A. Greene
     [not found]   ` <CAKU2X8ZTf6_ptGkD4na+j5MPeD=yCKUTpK6VT2Ye87Ffs_KdrA@mail.gmail.com>
2016-06-24  2:32     ` ELI
2016-08-30  5:12       ` ELI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKU2X8bAXmVfJz9P7d3k-_d12sjyrzWt+kJCGj8V6fTDAjsFog@mail.gmail.com \
    --to=eliptus@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).