From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Fleischer Newsgroups: gmane.emacs.help Subject: Re: Git/Magit: To which branch was a commit was originally committed? Date: Mon, 01 Nov 2021 18:09:05 +0200 Message-ID: References: <87zgqo2b5q.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14487"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin) Cc: Emacs mailing list To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 01 17:10:26 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhZtC-0003a7-C8 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Nov 2021 17:10:26 +0100 Original-Received: from localhost ([::1]:47660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhZtA-0004BA-Ft for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Nov 2021 12:10:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhZrz-00048j-Kz for help-gnu-emacs@gnu.org; Mon, 01 Nov 2021 12:09:11 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:41776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhZrw-0002Pe-PI for help-gnu-emacs@gnu.org; Mon, 01 Nov 2021 12:09:11 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id f7-20020a1c1f07000000b0032ee11917ceso290955wmf.0 for ; Mon, 01 Nov 2021 09:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lWDjnoBQz5E1YrfuJaKuezy3ZRddo5cznGZkD+XLTYY=; b=Mvf+cHbgOkSPkfeC7d/Yq8Eq9cNMeBNWYwFJGBv8D0Mnm3lk3D935QtfhMC3/4O0Vg +n/ruKETHK3P5XBw8QgujBIXVNgPX7t2RtcVVUigcClFCoJhADgleWDWbOS/b1CFhg8E nWugI14DYb4ePDJEznIY1yMUW8hlMGzZg0HwGQXacZxixSUPNSykvLq+FL+O8wlZhCSk MdwAFP7KCPtEbacUMuj/Yn0mXfOWLyY65TAPqawbs3dfRkH7yabDir+eYBhCSkPKQ01p aXfyvnkyyGXMTj4E5eiFKHbIYJE50/pwYiiaC1Q8O5dbto3UCw+ghgI0C3bRH42hGn51 w3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lWDjnoBQz5E1YrfuJaKuezy3ZRddo5cznGZkD+XLTYY=; b=r3LsuUyvuaGYhWKnCuFe6OSpEvs6nQGalisAUe62czQTP1BYKGjaAV92GMX7cQzWu7 RTDNLAxreXZRUcDLfAfHodiVwCcKvgEd0tpvyErvymvm/dGwlP2Cq9RUE/b9yU5ysHoH MaW8bazsocvQ3PBlAcSFowi8rEn6vQLx8K++22zuMWs6X3dEklAnva0zsedFtgEzZ2At r3+ykeoV9LBoC6gvZw+8HsdzIuluwDGBKUulegLs6BpZz6BF+ZA3gY8791Kb//0CetmV ++JC/lM60VqreIOU7gJI1g9MiKaGwXMb71x7cpjd/bX7qyeNUJIPqESr3JZLcR8eiy+a 0IJw== X-Gm-Message-State: AOAM5328wdr0P3T/bwSr2PYTvIibXcZhzVYnchB68AgXJzOclrshtpBY tOQCcM5C9PXhy7UmPtjxpSU+v7SjXwM= X-Google-Smtp-Source: ABdhPJzpgDg7dSW/ItZH0RqF+MQKB92lilVxV7to/nE2ENIvFRNjfDU1G5ckpUevUeMZD6OXa23FoQ== X-Received: by 2002:a05:600c:22cb:: with SMTP id 11mr26140939wmg.181.1635782947513; Mon, 01 Nov 2021 09:09:07 -0700 (PDT) Original-Received: from Home-Mac ([188.120.142.204]) by smtp.gmail.com with ESMTPSA id u16sm15987669wmc.21.2021.11.01.09.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:09:07 -0700 (PDT) In-Reply-To: <87zgqo2b5q.fsf@web.de> (Michael Heerdegen's message of "Mon, 01 Nov 2021 15:38:57 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=danflscr@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134296 Archived-At: Upon thinking, one cannot answer the question you're asking. This is because commits do not hold this information; they don't "remember" in which branch they were. Git history is a graph where commits are nodes. Branches are labels we stick to specific nodes. When we update, we move a label forward to another node. That previous node does not "remember" that a label was used to be attached to it. The answer I gave you a minute ago only answers the following question: if I start from a given commit/node and go forward in time, which branches/labels would I meet? it answers your question only in the simplest cases (no splits) but hopefully that is what you're looking for. Best, -- Daniel Fleischer